Documentation

Projects.BlockSubstitution.Basic

@[simp]
theorem BlockSubst.len_ofMap {α : Type u_1} [ha₁ : DecidableEq α] [ha₂ : Hashable α] {mp : Map (List α) (List α)} :
(ofMap mp).len = (mp.keysSet.map fun (x : List α) => x.length).min!
@[simp]
theorem BlockSubst.len_ofList {α : Type u_1} [ha₁ : DecidableEq α] [ha₂ : Hashable α] {xs : List (List α × List α)} :
(ofList xs).len = (List.map (fun (x : List α × List α) => x.1.length) xs).min!
@[simp]
theorem BlockSubst.domain_ofMap {α : Type u_1} [ha₁ : DecidableEq α] [ha₂ : Hashable α] {mp : Map (List α) (List α)} :
(ofMap mp).domain = {x : α | ∃ xs ∈ mp, x ∈ xs}
@[simp]
theorem BlockSubst.domain_ofList {α : Type u_1} [ha₁ : DecidableEq α] [ha₂ : Hashable α] {xs : List (List α × List α)} :
(ofList xs).domain = {x : α | ∃ p ∈ xs, x ∈ p.1}
@[simp]
theorem BlockSubst.f_ofMap {α : Type u_1} [ha₁ : DecidableEq α] [ha₂ : Hashable α] {mp : Map (List α) (List α)} :
(ofMap mp).f = fun (i : List α) => Map.get! i mp
@[simp]
theorem BlockSubst.f_ofList {α : Type u_1} [ha₁ : DecidableEq α] [ha₂ : Hashable α] {xs : List (List α × List α)} :
(ofList xs).f = fun (i : List α) => Map.get! i (Map.ofList xs)
@[simp]
theorem BlockSubst.substList_nil {α : Type u_1} {B : BlockSubst α} :
theorem BlockSubst.substList_append {α : Type u_1} {xs ys : List α} {B : BlockSubst α} (h : B.len ∣ xs.length) :
B.substList (xs ++ ys) = B.substList xs ++ B.substList ys
@[simp]
theorem BlockSubst.listCnd'_append {α : Type u_1} {xs ys : List α} {B : BlockSubst α} :
B.ListCnd' (xs ++ ys) ↔ B.ListCnd' xs ∧ B.ListCnd' ys
theorem BlockSubst.substList_of_length_eq_len {α : Type u_1} {xs : List α} {B : BlockSubst α} (h₁ : B.len ≠ 0) (h₂ : xs.length = B.len) :
B.substList xs = B.f xs
theorem BlockSubst.not_listCnd' {α : Type u_1} {B : BlockSubst α} {xs : List α} :
¬B.ListCnd' xs ↔ ∃ x ∈ xs, x ∉ B.domain
theorem BlockSubst.not_listCnd {α : Type u_1} {B : BlockSubst α} {xs : List α} :
¬B.ListCnd xs ↔ xs.length ≠ B.len ∨ ∃ x ∈ xs, x ∉ B.domain
theorem BlockSubst.length_le_length_substList {α : Type u_1} {xs : List α} {B : BlockSubst α} (h₁ : ∀ (xs : List α), B.ListCnd xs → xs.length ≤ (B.f xs).length) (h₂ : B.ListCnd' xs) (h₃ : B.len ∣ xs.length) :
theorem BlockSubst.le_length_substList_of_le_length {α : Type u_1} {xs : List α} {B : BlockSubst α} {n : ℕ} (h : n ≤ xs.length) (h₁ : ∀ (xs : List α), B.ListCnd xs → xs.length ≤ (B.f xs).length) (h₂ : B.ListCnd' xs) (h₃ : B.len ∣ xs.length) :
theorem BlockSubst.listCnd'_mkList_of_seqCnd {α : Type u_1} {B : BlockSubst α} {a : ℕ → α} {n : ℕ} (h : B.SeqCnd a) :
theorem BlockSubst.substList_eq_nil_of_len_eq_zero {α : Type u_1} {xs : List α} {B : BlockSubst α} (h : B.len = 0) :
theorem BlockSubst.len_ne_zero_of_seqCnd {α : Type u_1} {B : BlockSubst α} [wf : B.WF] {a : ℕ → α} (ha : B.SeqCnd a) :
B.len ≠ 0
theorem BlockSubst.substList_mkList_len {α : Type u_1} {B : BlockSubst α} {a : ℕ → α} (h : B.len ≠ 0) :
B.substList (mkList B.len a) = B.f (mkList B.len a)
theorem BlockSubst.substList_mkList_len_add {α : Type u_1} {B : BlockSubst α} {a : ℕ → α} {n : ℕ} (h : B.len ≠ 0) :
B.substList (mkList (B.len + n) a) = B.f (mkList B.len a) ++ B.substList (mkList n fun (x : ℕ) => a (B.len + x))
theorem BlockSubst.seqCnd_apply {α : Type u_1} {B : BlockSubst α} {a : ℕ → α} {f : ℕ → ℕ} (h : B.SeqCnd a) :
B.SeqCnd fun (x : ℕ) => a (f x)
theorem BlockSubst.substWord_ofSeq_step {α : Type u_1} {B : BlockSubst α} [wf : B.WF] {a : ℕ → α} (ha : B.SeqCnd a) :
B.substWord (Word.ofSeq a) = Word.ofList (B.f (mkList B.len a)) ++ B.substWord (Word.ofSeq fun (x : ℕ) => a (B.len + x))
theorem BlockSubst.substSeq_step {α : Type u_1} {B : BlockSubst α} [wf : B.WF] {a : ℕ → α} (ha : B.SeqCnd a) :
B.substSeq a = fun (i : ℕ) => if i < (B.f (mkList B.len a)).length then (B.f (mkList B.len a))[i]! else B.substSeq (fun (x : ℕ) => a (B.len + x)) (i - (B.f (mkList B.len a)).length)
theorem BlockSubst.substList_step {α : Type u_1} {B : BlockSubst α} [wf : B.WF] {xs : List α} (h : B.len ≠ 0) :
B.substList xs = B.f (List.take B.len xs) ++ B.substList (List.drop B.len xs)
@[simp]
theorem BlockSubst.substWord_ofList {α : Type u_1} {B : BlockSubst α} {xs : List α} :
@[simp]
theorem BlockSubst.substWord_ofSeq {α : Type u_1} {B : BlockSubst α} {a : ℕ → α} :
@[simp]
theorem BlockSubst.wordListCnd_ofList {α : Type u_1} {B : BlockSubst α} {xs : List α} :
@[simp]
theorem BlockSubst.wordListCnd_ofSeq {α : Type u_1} {B : BlockSubst α} {a : ℕ → α} :
@[simp]
instance BlockSubst.finite_substWord_ofList {α : Type u_1} {B : BlockSubst α} {xs : List α} :
@[simp]
instance BlockSubst.infinite_substWord_ofSeq {α : Type u_1} {B : BlockSubst α} {a : ℕ → α} :
theorem BlockSubst.substWord_step {α : Type u_1} {B : BlockSubst α} [wf : B.WF] {xs : Word α} (h₁ : B.len ≠ 0) (h₂ : B.WordCnd xs) :
theorem BlockSubst.exi_seqFunIdxCnd {α : Type u_1} {B : BlockSubst α} [wf : B.WF] :
∃ (g : (ℕ → α) → ℕ → ℕ), SeqFunIdxCnd B.SeqCnd B.substList g
theorem BlockSubst.lt_length_substList_mkList_seqIdx {α : Type u_1} {B : BlockSubst α} [wf : B.WF] {a : ℕ → α} {i : ℕ} (ha : B.SeqCnd a) :
i < (B.substList (mkList (B.seqIdx a i) a)).length
theorem BlockSubst.lt_length_substList_mkList_seqIdx_of_le {α : Type u_1} {B : BlockSubst α} [wf : B.WF] {a : ℕ → α} {i j : ℕ} (ha : B.SeqCnd a) (h : i ≤ j) :
i < (B.substList (mkList (B.seqIdx a j) a)).length
theorem BlockSubst.substSeq_eq_getElem {α : Type u_1} {B : BlockSubst α} [wf : B.WF] {a : ℕ → α} (ha : B.SeqCnd a) (i : ℕ) :
B.substSeq a i = (B.substList (mkList (B.seqIdx a i) a))[i]
theorem BlockSubst.le_seqIdx {α : Type u_1} {B : BlockSubst α} [wf : B.WF] {a : ℕ → α} {i : ℕ} (ha : B.SeqCnd a) :
i ≤ B.seqIdx a i
theorem BlockSubst.seqIdx_le_iff {α : Type u_1} {B : BlockSubst α} [wf : B.WF] {a : ℕ → α} {i j : ℕ} (ha : B.SeqCnd a) :
B.seqIdx a i ≤ B.seqIdx a j ↔ i ≤ j
theorem BlockSubst.seqIdx_lt_iff {α : Type u_1} {B : BlockSubst α} [wf : B.WF] {a : ℕ → α} {i j : ℕ} (ha : B.SeqCnd a) :
B.seqIdx a i < B.seqIdx a j ↔ i < j
theorem BlockSubst.fixpoint_of {α : Type u_1} {B : BlockSubst α} [wf : B.WF] {a : ℕ → α} (ha : B.SeqCnd a) (h : B.substSeq a = a) :
theorem BlockSubst.uniqueFixpoint_of {α : Type u_1} {B : BlockSubst α} [wf : B.WF] {a : ℕ → α} (ha : B.SeqCnd a) (h : ∀ (b : ℕ → α), B.SeqCnd b → (B.substSeq b = b ↔ b = a)) :