Documentation

Projects.BlockSubstitution.Batches

theorem BlockSubst.substList_eq_flatMap_batches {α : Type u_1} {xs : List α} {B : BlockSubst α} (h : B.ListCnd' xs) :
theorem BlockSubst.substSeq_step' {α : Type u_1} {B : BlockSubst α} [wf : B.WF] {a : ℕ → α} (ha : B.SeqCnd a) :
B.substSeq a = fun (i : ℕ) => if h : 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.exi_mem_f_of_mem_substList' {α : Type u_1} {B : BlockSubst α} [wf : B.WF] {xs : List α} {x : α} (h : x ∈ B.substList xs) :
∃ (ys : List α), ys <:+: xs ∧ B.ListCnd ys ∧ x ∈ B.f ys
theorem BlockSubst.f_eq_nil_iff_not_listCnd {α : Type u_1} {B : BlockSubst α} [H : B.WF] {xs : List α} (h : B.len ≠ 0) :
B.f xs = [] ↔ ¬B.ListCnd xs
theorem BlockSubst.substWord_eq_flatMap_batches {α : Type u_1} {B : BlockSubst α} [H : B.WF] {w : Word α} (h : B.WordCnd w) :
B.substWord w = (w.batches B.len).flatMap fun (x : List α) => Word.ofList (B.f x)
theorem BlockSubst.substList_mkList_of_len_eq_two {α : Type u_1} {B : BlockSubst α} {w : ℕ → α} {n : ℕ} (h₁ : B.len = 2) (h₂ : ∀ k < n * 2, w k ∈ B.domain) :
B.substList (mkList (n * 2) w) = (mkList n fun (k : ℕ) => B.f [w (k * 2), w (k * 2 + 1)]).flatten
theorem BlockSubst.substList_of_len_eq_two_and_odd_length {α : Type u_1} {B : BlockSubst α} {xs : List α} (h₁ : B.len = 2) (h₂ : Odd xs.length) :