Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.HaarNonbacktrackingSegmentation

Download original .lean · View on GitHub · Jump to source

Relationships above come from literal import commands. The declarations below link to types and references extracted from Lean’s environment. Source text is complete and unchanged.

Declarations in this module

14 project constants, including generated, internal and private declarations.

14 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarNonbacktrackingFirstStep7import Nonadditivity.HaarTimeCompositions89/-! # Exact iterated last-return segmentation of reduced free-group words -/1011noncomputable section12set_option backward.isDefEq.respectTransparency false1314namespace Nonadditivity.HaarNonbacktracking1516open scoped BigOperators17open HaarTimeCompositions1819section Words20variable {α : Type*} [DecidableEq α]2122theorem mk_flatMap_toWord (gs : List (FreeGroup α)) :23    FreeGroup.mk (gs.flatMap FreeGroup.toWord) = gs.prod := by24  induction gs with25  | nil => simp [← FreeGroup.one_eq_mk]26  | cons g gs ih =>27      rw [List.flatMap_cons, ← FreeGroup.mul_mk, FreeGroup.mk_toWord, ih, List.prod_cons]2829theorem toWord_prod_of_reduced (gs : List (FreeGroup α))30    (hred : FreeGroup.IsReduced (gs.flatMap FreeGroup.toWord)) :31    gs.prod.toWord = gs.flatMap FreeGroup.toWord := by32  rw [← mk_flatMap_toWord, FreeGroup.toWord_mk, hred.reduce_eq]3334theorem prod_cons_ne_one_of_reduced (g : FreeGroup α) (gs : List (FreeGroup α))35    (hg : g ≠ 1) (hred : FreeGroup.IsReduced ((g :: gs).flatMap FreeGroup.toWord)) :36    (g :: gs).prod ≠ 1 := by37  intro h38  have he := toWord_prod_of_reduced (g :: gs) hred39  rw [h, FreeGroup.toWord_one, List.flatMap_cons] at he40  have : g.toWord = [] := (List.append_eq_nil_iff.mp he.symm).141  exact hg (FreeGroup.toWord_eq_nil_iff.mp this)4243end Words4445section Ring46variable {G R : Type*} [Group G] [Ring R]4748/-- At all but the final segment use non-returning coefficients; the final49segment is the ordinary coefficient. Factors retain their actual order. -/50def segmentedProduct (A : MonoidAlgebra R G) : G → List G → List ℕ → R51  | g, [], [n] => (A ^ n) g52  | g, h :: gs, n :: ns => killedPolynomial A 1 n g * segmentedProduct A h gs ns53  | _, _, _ => 05455@[simp] theorem segmentedProduct_single (A : MonoidAlgebra R G) (g : G) (n : ℕ) :56    segmentedProduct A g [] [n] = (A ^ n) g := rfl5758@[simp] theorem segmentedProduct_cons (A : MonoidAlgebra R G) (g h : G)59    (gs : List G) (n : ℕ) (ns : List ℕ) :60    segmentedProduct A g (h :: gs) (n :: ns) =61      killedPolynomial A 1 n g * segmentedProduct A h gs ns := rfl6263end Ring6465variable {α R : Type*} [DecidableEq α] [Ring R]6667/-- Both segment lengths may be taken strictly positive. The omitted68endpoints vanish because neither word is the identity. -/69theorem coefficient_factorization_positive70    (A : MonoidAlgebra R (FreeGroup α))71    (hA : ∀ a ∈ A.support, a.toWord.length ≤ 1)72    (n : ℕ) (g h : FreeGroup α) (hg : g ≠ 1) (hh : h ≠ 1)73    (hred : FreeGroup.IsReduced (g.toWord ++ h.toWord)) :74    (A ^ n) (g * h) = ∑ k ∈ Finset.range n,75      killedPolynomial A 1 (k + 1) g * (A ^ (n - (k + 1))) h := by76  rw [coefficient_factorization_of_reduced_append A hA n g h hh hred]77  let f : ℕ → R := fun k => killedPolynomial A 1 k g * (A ^ (n - k)) h78  change ∑ k ∈ Finset.range n, f k = ∑ k ∈ Finset.range n, f (k + 1)79  have hzero : f 0 = 0 := by80    simp [f, killedPolynomial, MonoidAlgebra.one_def, Ne.symm hg]81  have hn : f n = 0 := by82    simp [f, MonoidAlgebra.one_def, Ne.symm hh]83  have he := Finset.sum_range_succ' f n84  rw [Finset.sum_range_succ] at he85  simpa [hzero, hn] using he8687/-- The full literal coefficient factorization over positive time88compositions. Every non-returning factor may subsequently be localized to89its terminal letter by `killedPolynomial_first_step`. -/90theorem coefficient_factorization_segments91    (A : MonoidAlgebra R (FreeGroup α))92    (hA : ∀ a ∈ A.support, a.toWord.length ≤ 1)93    (g : FreeGroup α) (gs : List (FreeGroup α))94    (hne : ∀ h ∈ g :: gs, h ≠ 1)95    (hred : FreeGroup.IsReduced ((g :: gs).flatMap FreeGroup.toWord)) (n : ℕ) :96    (A ^ n) (g :: gs).prod = ∑ t ∈ compositions gs.length n,97      segmentedProduct A g gs t := by98  induction gs generalizing g n with99  | nil =>100      by_cases hn : n = 0101      · subst n102        have hg := hne g (by simp)103        simp [MonoidAlgebra.one_def, Ne.symm hg]104      · simp [compositions, hn]105  | cons h gs ih =>106      have hg : g ≠ 1 := hne g (by simp)107      have hh : h ≠ 1 := hne h (by simp)108      have htred : FreeGroup.IsReduced ((h :: gs).flatMap FreeGroup.toWord) :=109        (List.isChain_append.mp hred).2.1110      have htword := toWord_prod_of_reduced (h :: gs) htred111      have hprefix : FreeGroup.IsReduced (g.toWord ++ (h :: gs).prod.toWord) := by112        simpa only [htword, List.flatMap_cons] using hred113      have htne := prod_cons_ne_one_of_reduced h gs hh htred114      rw [List.prod_cons, coefficient_factorization_positive A hA n g (h :: gs).prod115        hg htne hprefix, List.length_cons, sum_succ]116      apply Finset.sum_congr rfl117      intro k hk118      have htne' : ∀ w ∈ h :: gs, w ≠ 1 := fun w hw => hne w (by simp [hw])119      rw [ih h htne' htred (n - (k + 1)), Finset.mul_sum]120      apply Finset.sum_congr rfl121      intro t ht122      rfl123124end Nonadditivity.HaarNonbacktracking