Documentation

Projects.BlockSubstitution.Complement

noncomputable def BlockSubst.complElem {α : Type u_1} (B : BlockSubst α) (x : α) :
α
Equations
Instances For
    noncomputable def BlockSubst.complList {α : Type u_1} (B : BlockSubst α) (xs : List α) :
    List α
    Equations
    Instances For
      noncomputable def BlockSubst.complSeq {α : Type u_1} (B : BlockSubst α) (a : ℕ → α) (i : ℕ) :
      α
      Equations
      Instances For
        noncomputable def BlockSubst.complWord {α : Type u_1} (B : BlockSubst α) (xs : Word α) :
        Word α
        Equations
        Instances For
          structure BlockSubst.Complement {α : Type u_1} (B₁ B₂ : BlockSubst α) :
          Instances For
            noncomputable def BlockSubst.compl {α : Type u_1} (B : BlockSubst α) :
            Equations
            Instances For
              @[simp]
              theorem BlockSubst.Complement.ncard?_domain_right {α : Type u_1} {B₁ B₂ : BlockSubst α} (h : B₁.Complement B₂) :
              theorem BlockSubst.Complement.listCnd'_iff {α : Type u_1} {B₁ B₂ : BlockSubst α} (h : B₁.Complement B₂) {xs : List α} :
              B₁.ListCnd' xs ↔ B₂.ListCnd' xs
              theorem BlockSubst.Complement.listCnd_iff {α : Type u_1} {B₁ B₂ : BlockSubst α} (h : B₁.Complement B₂) {xs : List α} :
              B₁.ListCnd xs ↔ B₂.ListCnd xs
              theorem BlockSubst.Complement.exi_domain_eq {α : Type u_1} {B₁ B₂ : BlockSubst α} (h : B₁.Complement B₂) :
              ∃ (x : α) (y : α), x ≠ y ∧ B₁.domain = {x, y} ∧ B₂.domain = {x, y}
              theorem BlockSubst.Complement.complElem_eq {α : Type u_1} {B₁ B₂ : BlockSubst α} (h : B₁.Complement B₂) :
              theorem BlockSubst.Complement.complList_eq {α : Type u_1} {B₁ B₂ : BlockSubst α} (h : B₁.Complement B₂) :
              theorem BlockSubst.Complement.complSeq_eq {α : Type u_1} {B₁ B₂ : BlockSubst α} (h : B₁.Complement B₂) :
              B₁.complSeq = B₂.complSeq
              theorem BlockSubst.Complement.listCnd_left {α : Type u_1} {B₁ B₂ : BlockSubst α} (_h : B₁.Complement B₂) {xs : List α} :
              B₁.ListCnd xs ↔ xs.length = B₁.len ∧ ∀ x ∈ xs, x ∈ B₁.domain
              theorem BlockSubst.Complement.listCnd_right {α : Type u_1} {B₁ B₂ : BlockSubst α} (h : B₁.Complement B₂) {xs : List α} :
              B₂.ListCnd xs ↔ xs.length = B₁.len ∧ ∀ x ∈ xs, x ∈ B₁.domain
              theorem BlockSubst.complElem_eq_of {α : Type u_1} {B : BlockSubst α} {x : α} (y : α) (h₁ : x ≠ y) (h₂ : B.domain = {x, y}) :
              B.complElem x = y
              @[simp]
              theorem BlockSubst.length_complList {α : Type u_1} {B : BlockSubst α} {xs : List α} :
              theorem BlockSubst.len_ne_zero_of_mem_domain {α : Type u_1} {B : BlockSubst α} [wf : B.WF] {x : α} (h : x ∈ B.domain) :
              B.len ≠ 0
              theorem BlockSubst.len_ne_zero_of_domain_ne_empty {α : Type u_1} {B : BlockSubst α} [wf : B.WF] (h : B.domain ≠ ∅) :
              B.len ≠ 0
              @[simp]
              theorem BlockSubst.complList_nil {α : Type u_1} {B : BlockSubst α} :
              @[simp]
              theorem BlockSubst.complList_cons {α : Type u_1} {B : BlockSubst α} {x : α} {xs : List α} :
              B.complList (x :: xs) = B.complElem x :: B.complList xs
              @[simp]
              theorem BlockSubst.complList_append {α : Type u_1} {B : BlockSubst α} {xs ys : List α} :
              B.complList (xs ++ ys) = B.complList xs ++ B.complList ys
              theorem BlockSubst.Complement.iff_aux₁ {α : Type u_1} {B₁ B₂ : BlockSubst α} (h : B₁.Complement B₂) :
              B₁.WF ∧ B₂.WF ∧ ∃ (x : α) (y : α) (f : List α → List α) (n : ℕ), x ≠ y ∧ B₁ = { domain := {x, y}, len := n, f := f } ∧ B₂ = { domain := {x, y}, len := n, f := fun (xs : List α) => List.map (fun (z : α) => if z = x then y else x) (f xs) }
              theorem BlockSubst.Complement.iff_aux₂ {α : Type u_1} {B₁ B₂ : BlockSubst α} [ha : DecidableEq α] (h : B₁.WF ∧ B₂.WF ∧ ∃ (x : α) (y : α) (f : List α → List α) (n : ℕ), x ≠ y ∧ B₁ = { domain := {x, y}, len := n, f := f } ∧ B₂ = { domain := {x, y}, len := n, f := fun (xs : List α) => List.map (fun (z : α) => if z = x then y else x) (f xs) }) :
              B₁.Complement B₂
              theorem BlockSubst.Complement.iff {α : Type u_1} {B₁ B₂ : BlockSubst α} :
              B₁.Complement B₂ ↔ B₁.WF ∧ B₂.WF ∧ ∃ (x : α) (y : α) (f : List α → List α) (n : ℕ), x ≠ y ∧ B₁ = { domain := {x, y}, len := n, f := f } ∧ B₂ = { domain := {x, y}, len := n, f := fun (xs : List α) => List.map (fun (z : α) => if z = x then y else x) (f xs) }
              theorem BlockSubst.Complement.seqCnd_iff {α : Type u_1} {B₁ B₂ : BlockSubst α} (h : B₁.Complement B₂) {a : ℕ → α} :
              B₁.SeqCnd a ↔ B₂.SeqCnd a
              theorem BlockSubst.complElem_ne_of {α : Type u_1} {B : BlockSubst α} {x : α} (y : α) (h₁ : x ≠ y) (h₂ : B.domain = {x, y}) :
              theorem BlockSubst.complElem_idem {α : Type u_1} {B : BlockSubst α} {x : α} (h₁ : B.domain.ncard? = some 2) (h₂ : x ∈ B.domain) :
              theorem BlockSubst.complList_idem {α : Type u_1} {B : BlockSubst α} {xs : List α} (h₁ : B.domain.ncard? = some 2) (h₂ : B.ListCnd' xs) :
              B.complList (B.complList xs) = xs
              theorem BlockSubst.complSeq_idem {α : Type u_1} {B : BlockSubst α} {a : ℕ → α} (h₁ : B.domain.ncard? = some 2) (h₂ : B.SeqCnd a) :
              B.complSeq (B.complSeq a) = a
              theorem BlockSubst.Complement.complElem_idem {α : Type u_1} {B₁ B₂ : BlockSubst α} {x : α} (h : B₁.Complement B₂) (hx : x ∈ B₁.domain) :
              B₁.complElem (B₁.complElem x) = x
              theorem BlockSubst.Complement.complList_idem {α : Type u_1} {B₁ B₂ : BlockSubst α} {xs : List α} (h : B₁.Complement B₂) (hx : B₁.ListCnd' xs) :
              B₁.complList (B₁.complList xs) = xs
              theorem BlockSubst.Complement.complSeq_idem {α : Type u_1} {B₁ B₂ : BlockSubst α} {a : ℕ → α} (h : B₁.Complement B₂) (ha : B₁.SeqCnd a) :
              B₁.complSeq (B₁.complSeq a) = a
              theorem BlockSubst.Complement.complElem_inj {α : Type u_1} {B₁ B₂ : BlockSubst α} {x y : α} (h : B₁.Complement B₂) (hx : x ∈ B₁.domain) (hy : y ∈ B₁.domain) :
              B₁.complElem x = B₁.complElem y ↔ x = y
              theorem BlockSubst.Complement.complList_inj {α : Type u_1} {B₁ B₂ : BlockSubst α} {xs ys : List α} (h : B₁.Complement B₂) (hx : B₁.ListCnd' xs) (hy : B₁.ListCnd' ys) :
              B₁.complList xs = B₁.complList ys ↔ xs = ys
              theorem BlockSubst.Complement.complSeq_inj {α : Type u_1} {B₁ B₂ : BlockSubst α} {a b : ℕ → α} (h : B₁.Complement B₂) (ha : B₁.SeqCnd a) (hb : B₁.SeqCnd b) :
              B₁.complSeq a = B₁.complSeq b ↔ a = b
              theorem BlockSubst.complElem_mem_of_domain_eq {α : Type u_1} {B : BlockSubst α} {x y z : α} (h₁ : B.domain = {x, y}) (h₂ : x ≠ y) (hx : z ∈ B.domain) :
              theorem BlockSubst.Complement.complElem_mem {α : Type u_1} {B₁ B₂ : BlockSubst α} {x : α} (h : B₁.Complement B₂) (hx : x ∈ B₁.domain) :
              B₁.complElem x ∈ B₁.domain
              theorem BlockSubst.substList_eq_of_len_eq_zero {α : Type u_1} {B : BlockSubst α} (h : B.len = 0) :
              B.substList = fun (x : List α) => []
              theorem BlockSubst.domain_eq_empty_of_len_eq_zero {α : Type u_1} {B : BlockSubst α} [wf : B.WF] (h : B.len = 0) :
              theorem BlockSubst.len_ne_zero_of_substList_ne_nil {α : Type u_1} {B : BlockSubst α} {xs : List α} (h : B.substList xs ≠ []) :
              B.len ≠ 0
              theorem BlockSubst.len_ne_zero_of_mem_substList {α : Type u_1} {B : BlockSubst α} {xs : List α} {x : α} (h : x ∈ B.substList xs) :
              B.len ≠ 0
              theorem BlockSubst.listCnd_of_f_ne_nil {α : Type u_1} {B : BlockSubst α} [wf : B.WF] {xs : List α} (h : B.f xs ≠ []) :
              B.ListCnd xs
              theorem BlockSubst.listCnd_of_mem_f {α : Type u_1} {B : BlockSubst α} [wf : B.WF] {xs : List α} {x : α} (h : x ∈ B.f xs) :
              B.ListCnd xs
              theorem BlockSubst.mem_domain_of_mem_f {α : Type u_1} {B : BlockSubst α} [wf : B.WF] {xs : List α} {x : α} (h : x ∈ B.f xs) :
              theorem BlockSubst.exi_mem_f_of_mem_substList {α : Type u_1} {B : BlockSubst α} [wf : B.WF] {xs : List α} {x : α} (h : x ∈ B.substList xs) :
              ∃ (ys : List α), B.ListCnd ys ∧ x ∈ B.f ys
              theorem BlockSubst.mem_domain_of_mem_substList {α : Type u_1} {B : BlockSubst α} [wf : B.WF] {xs : List α} {x : α} (h : x ∈ B.substList xs) :
              theorem BlockSubst.Complement.substList_left {α : Type u_1} {B₁ B₂ : BlockSubst α} {xs : List α} (h : B₁.Complement B₂) (h₁ : B₁.ListCnd' xs) :
              B₁.substList xs = B₁.complList (B₂.substList xs)
              theorem BlockSubst.Complement.symm {α : Type u_1} {B₁ B₂ : BlockSubst α} (h : B₁.Complement B₂) :
              B₂.Complement B₁
              theorem BlockSubst.Complement.comm {α : Type u_1} {B₁ B₂ : BlockSubst α} :
              B₁.Complement B₂ ↔ B₂.Complement B₁
              theorem BlockSubst.substList_eq_fun_nil_of_forall_eq_nil {α : Type u_1} {B : BlockSubst α} [wf : B.WF] (h : ∀ (xs : List α), B.ListCnd xs → B.f xs = []) :
              B.substList = fun (x : List α) => []
              theorem BlockSubst.exi_listCnd_and_f_ne_nil_of_domain_ne_empty {α : Type u_1} {B : BlockSubst α} [wf : B.WF] (h : B.domain ≠ ∅) :
              ∃ (xs : List α), B.ListCnd xs ∧ B.f xs ≠ []
              theorem BlockSubst.Complement.complElem_ne_self_of_domain_eq {α : Type u_1} {B : BlockSubst α} {x y z : α} (h₁ : B.domain = {x, y}) (h₂ : x ≠ y) (hx : z ∈ B.domain) :
              theorem BlockSubst.Complement.complElem_ne_self {α : Type u_1} {B₁ B₂ : BlockSubst α} {x : α} (h : B₁.Complement B₂) (h₁ : x ∈ B₁.domain) :
              B₁.complElem x ≠ x
              theorem BlockSubst.seqCnd_substSeq {α : Type u_1} {B : BlockSubst α} {a : ℕ → α} [wf : B.WF] (h : B.SeqCnd a) :
              @[simp]
              theorem BlockSubst.getElem_complList {α : Type u_1} {B : BlockSubst α} {xs : List α} {i : ℕ} {h : i < (B.complList xs).length} :
              (B.complList xs)[i] = B.complElem xs[i]
              theorem BlockSubst.substList_of_len_eq_zero {α : Type u_1} {B : BlockSubst α} {xs : List α} (h : B.len = 0) :
              theorem BlockSubst.substList_of_length_le_len {α : Type u_1} {B : BlockSubst α} {xs : List α} (h : xs.length < B.len) :
              theorem BlockSubst.substList_step' {α : Type u_1} {B : BlockSubst α} {xs ys : List α} (h₁ : B.len ≠ 0) (h₂ : xs.length = B.len) :
              B.substList (xs ++ ys) = B.f xs ++ B.substList ys
              theorem BlockSubst.substList_eq_substList_take {α : Type u_1} {B : BlockSubst α} {xs : List α} :
              B.substList xs = B.substList (List.take (xs.length - xs.length % B.len) xs)
              @[simp]
              theorem BlockSubst.substList_prefix_append {α : Type u_1} {B : BlockSubst α} {xs ys : List α} :
              B.substList xs <+: B.substList (xs ++ ys)
              theorem BlockSubst.substList_prefix_of_prefix {α : Type u_1} {B : BlockSubst α} {xs ys : List α} (h₂ : xs <+: ys) :
              @[simp]
              theorem BlockSubst.Complement.irrefl {α : Type u_1} {B : BlockSubst α} [wf : B.WF] :
              theorem BlockSubst.substSeq_eq_getElem_of_le' {α : Type u_1} {B : BlockSubst α} [wf : B.WF] {a : ℕ → α} {i j : ℕ} (ha : B.SeqCnd a) (h : i ≤ j) :
              B.substSeq a i = (B.substList (mkList (B.seqIdx a j) a))[i]
              theorem BlockSubst.substSeq_eq_getElem_of_le_proof₁ {α : Type u_1} {B : BlockSubst α} [wf : B.WF] {a : ℕ → α} {i j : ℕ} (ha : B.SeqCnd a) (h : B.seqIdx a i ≤ j) :
              i < (B.substList (mkList j a)).length
              theorem BlockSubst.substSeq_eq_getElem_of_le {α : Type u_1} {B : BlockSubst α} [wf : B.WF] {a : ℕ → α} {i j : ℕ} (ha : B.SeqCnd a) (h : B.seqIdx a i ≤ j) :
              B.substSeq a i = (B.substList (mkList j a))[i]
              theorem BlockSubst.Complement.substSeq_left {α : Type u_1} {B₁ B₂ : BlockSubst α} {a : ℕ → α} (h : B₁.Complement B₂) (ha : B₁.SeqCnd a) :
              B₁.substSeq a = B₁.complSeq (B₂.substSeq a)
              theorem BlockSubst.Complement.substSeq_right {α : Type u_1} {B₁ B₂ : BlockSubst α} {a : ℕ → α} (h : B₁.Complement B₂) (ha : B₁.SeqCnd a) :
              B₂.substSeq a = B₁.complSeq (B₁.substSeq a)
              @[simp]
              theorem BlockSubst.complList_eq_nil_iff {α : Type u_1} {B : BlockSubst α} {xs : List α} :
              B.complList xs = [] ↔ xs = []
              theorem BlockSubst.substList_of_listCnd {α : Type u_1} {B : BlockSubst α} {xs : List α} [wf : B.WF] (h₁ : B.len ≠ 0) (h₂ : B.ListCnd xs) :
              B.substList xs = B.f xs
              theorem BlockSubst.Complement.len_left_ne_zero {α : Type u_1} {B₁ B₂ : BlockSubst α} (h : B₁.Complement B₂) :
              B₁.len ≠ 0
              theorem BlockSubst.Complement.len_right_ne_zero {α : Type u_1} {B₁ B₂ : BlockSubst α} (h : B₁.Complement B₂) :
              B₂.len ≠ 0
              theorem BlockSubst.Complement.f_left {α : Type u_1} {B₁ B₂ : BlockSubst α} {xs : List α} (h : B₁.Complement B₂) :
              B₁.f xs = B₁.complList (B₂.f xs)
              theorem BlockSubst.Complement.f_right {α : Type u_1} {B₁ B₂ : BlockSubst α} {xs : List α} (h : B₁.Complement B₂) :
              B₂.f xs = B₁.complList (B₁.f xs)
              @[simp]
              theorem BlockSubst.listCnd'_f {α : Type u_1} {B : BlockSubst α} {xs : List α} [wf : B.WF] :
              B.ListCnd' (B.f xs)
              theorem BlockSubst.eq_of_complement_and_complement {α : Type u_1} {B₁ B₂ B₃ : BlockSubst α} (h₁ : B₁.Complement B₂) (h₂ : B₂.Complement B₃) :
              B₁ = B₃
              theorem BlockSubst.substList_eq_of_length_lt {α : Type u_1} {B : BlockSubst α} {xs : List α} (h : xs.length < B.len) :
              theorem BlockSubst.complement_of {α : Type u_1} {B₁ B₂ : BlockSubst α} [wf₁ : B₁.WF] [wf₂ : B₂.WF] (x y : α) (h₁ : x ≠ y) (h₂ : B₁.domain = {x, y}) (h₃ : B₂.domain = {x, y}) (h₄ : B₁.len = B₂.len) (h₅ : ∀ (xs : List α), B₁.ListCnd xs → B₂.ListCnd xs → B₂.f xs = B₁.complList (B₁.f xs)) :
              B₁.Complement B₂
              theorem BlockSubst.Complement.iff' {α : Type u_1} {B₁ B₂ : BlockSubst α} :
              B₁.Complement B₂ ↔ B₁.WF ∧ B₂.WF ∧ ∃ (x : α) (y : α), x ≠ y ∧ B₁.domain = {x, y} ∧ B₂.domain = {x, y} ∧ B₁.len = B₂.len ∧ ∀ (xs : List α), B₁.ListCnd xs → B₂.ListCnd xs → B₂.f xs = B₁.complList (B₁.f xs)
              theorem BlockSubst.Complement.seqCnd_complSeq {α : Type u_1} {B₁ B₂ : BlockSubst α} {a : ℕ → α} (h : B₁.Complement B₂) (h₁ : B₁.SeqCnd a) :
              B₁.SeqCnd (B₁.complSeq a)