Documentation

Projects.Kolakoski.Bounds

theorem Kolakoski.KolIter.mem_of_length_eq_three {xs ys : List ℕ} {c : ℕ} [h : KolIter xs] (hc : c = 1 ∨ c = 2) (h₁ : ys.length = 3) (h₂ : ys <:+: xs) :
c ∈ ys
theorem Kolakoski.KolIter.mem_of_three_le_length {xs ys : List ℕ} {c : ℕ} [h : KolIter xs] (hc : c = 1 ∨ c = 2) (h₁ : 3 ≤ ys.length) (h₂ : ys <:+: xs) :
c ∈ ys
theorem Kolakoski.KolIter.lb_count {xs : List ℕ} {c : ℕ} [h : KolIter xs] (hc : c = 1 ∨ c = 2) :
theorem Kolakoski.lb_f₁ {n : ℕ} :
(7 / 6) ^ (n - 1) ≤ ↑(f₁^[n] [1, 2]).length ∧ (7 / 6) ^ n ≤ ↑(f₁^[n] [1, 2]).sum
theorem Kolakoski.lb_length_f₁ {n : ℕ} :
(7 / 6) ^ (n - 1) ≤ ↑(f₁^[n] [1, 2]).length
theorem Kolakoski.lb_sum_f₁ {n : ℕ} :
(7 / 6) ^ n ≤ ↑(f₁^[n] [1, 2]).sum
theorem Kolakoski.KolIter.of_mem {xs : List ℕ} {c : ℕ} [h : KolIter xs] (hc : c ∈ xs) :
c = 1 ∨ c = 2
theorem Kolakoski.KolIter.count_eq_sub {xs : List ℕ} {c : ℕ} [h : KolIter xs] (hc : c = 1 ∨ c = 2) :
List.count c xs = xs.length - List.count (3 - c) xs
theorem Kolakoski.KolIter.count_three_sub_eq_sub {xs : List ℕ} {c : ℕ} [h : KolIter xs] (hc : c = 1 ∨ c = 2) :
List.count (3 - c) xs = xs.length - List.count c xs
theorem Kolakoski.KolIter.length_eq_count_add_count_of {xs : List ℕ} {c : ℕ} [h : KolIter xs] (hc : c = 1 ∨ c = 2) :
xs.length = List.count c xs + List.count (3 - c) xs
theorem Kolakoski.KolIter.ub_count {xs : List ℕ} {c : ℕ} [h : KolIter xs] (hc : c = 1 ∨ c = 2) :
List.count c xs ≤ xs.length * 2 / 3 + 1
theorem Kolakoski.KolIter.sum_f₁_add_le_of_le {xs ys : List ℕ} [h₁ : KolIter xs] [h₂ : KolIter ys] (h : xs.length ≤ ys.length) :
(f₁ xs).sum + ys.sum ≤ (f₁ ys).sum + xs.sum
@[simp]
theorem Kolakoski.KolIter.sum_lt_sum_f₁ {xs : List ℕ} [h : KolIter xs] :
xs.sum < (f₁ xs).sum
@[simp]
theorem Kolakoski.KolIter.sum_le_sum_f₁ {xs : List ℕ} [h : KolIter xs] :
xs.sum ≤ (f₁ xs).sum
@[simp]
theorem Kolakoski.lt_length_f₂_same {n : ℕ} :
n < (f₂ [1, 2] (n + 1) (n + 1)).length
theorem Kolakoski.KolIter.getElem_eq_getElem_iff {xs ys : List ℕ} {i : ℕ} [hx : KolIter xs] [hy : KolIter ys] {hh₁ : i < xs.length} {hh₂ : i < ys.length} :
xs[i] = ys[i]
@[simp]
theorem Kolakoski.KolIter.getElem_eq_getElem_iff_simp {xs ys : List ℕ} {i : ℕ} [hx : KolIter xs] [hy : KolIter ys] {hh₁ : i < xs.length} {hh₂ : i < ys.length} :
xs[i] = ys[i] ↔ True
@[simp]
theorem Kolakoski.getElem_f₂ {n m i : ℕ} {hh : i < (f₂ [1, 2] n m).length} :
(f₂ [1, 2] n m)[i] = (f₁^[i] [1, 2])[i]
@[simp]
theorem Kolakoski.KolIter.not_infix_pat_aaa {xs : List ℕ} {a : ℕ} [h : KolIter xs] :
¬[a, a, a] <:+: xs