Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.ProductHaagerupIndex

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

Direct imports

Imported by project modules

2 direct reverse imports

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

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

41 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.ProductHaagerupBall78/-! # Canonical indices for finite product free-group balls -/9noncomputable section10universe u11namespace Nonadditivity.ProductHaagerupProduct12attribute [local instance] Classical.propDecidable13open scoped BigOperators14open ProductHaagerupBall (BallWords)1516/-- Parenthesized product group used to expose the coordinate induction. -/17def GroupIndex (α : Type u) : ℕ → Type u18  | 0 => PUnit19  | j+1 => FreeGroup α × GroupIndex α j2021instance groupIndexGroup (α : Type*) (j : ℕ) : Group (GroupIndex α j) := by22  induction j with23  | zero => exact inferInstanceAs (Group PUnit)24  | succ j ih =>25    letI := ih26    exact inferInstanceAs (Group (FreeGroup α × GroupIndex α j))2728/-- One independently reduced word per free-group coordinate. -/29def WordIndex (α : Type u) (q : ℕ) : ℕ → Type u30  | 0 => PUnit31  | j+1 => BallWords α q × WordIndex α q j3233instance wordIndexFintype (α : Type*) [Fintype α] (q j : ℕ) : Fintype (WordIndex α q j) := by34  induction j with35  | zero => exact inferInstanceAs (Fintype PUnit)36  | succ j ih =>37    letI := ih38    exact inferInstanceAs (Fintype (BallWords α q × WordIndex α q j))3940def wordValue {α : Type*} {q : ℕ} : {j : ℕ} → WordIndex α q j → GroupIndex α j41  | 0, _ => PUnit.unit42  | _+1, w => (FreeGroup.mk w.1.2.1, wordValue w.2)4344def reduced {α : Type*} {q : ℕ} : {j : ℕ} → WordIndex α q j → Prop45  | 0, _ => True46  | _+1, w => FreeGroup.IsReduced w.1.2.1 ∧ reduced w.2474849instance groupIndexDecidableEq (α : Type*) [DecidableEq α] (j : ℕ) :50    DecidableEq (GroupIndex α j) := by51  induction j with52  | zero => exact inferInstanceAs (DecidableEq PUnit)53  | succ j ih =>54    letI := ih55    exact inferInstanceAs (DecidableEq (FreeGroup α × GroupIndex α j))5657def RadiusLe {α : Type*} [DecidableEq α] (q : ℕ) : {j : ℕ} → GroupIndex α j → Prop58  | 0, _ => True59  | _+1, g => FreeGroup.norm g.1 ≤ q ∧ RadiusLe q g.26061section Canonical62variable {α : Type*} [DecidableEq α] {q j : ℕ}6364def canonicalBallWord (g : FreeGroup α) (hg : FreeGroup.norm g ≤ q) : BallWords α q :=65  ⟨⟨g.toWord.length, by change FreeGroup.norm g < q+1; omega⟩, ⟨g.toWord, rfl⟩⟩6667def canonicalWord : {j : ℕ} → (g : GroupIndex α j) → RadiusLe q g → WordIndex α q j68  | 0, _, _ => PUnit.unit69  | _+1, g, hg => (canonicalBallWord g.1 hg.1, canonicalWord g.2 hg.2)7071theorem wordValue_canonical (g : GroupIndex α j) (hg : RadiusLe q g) :72    wordValue (canonicalWord g hg) = g := by73  induction j with74  | zero => exact @Subsingleton.elim PUnit inferInstance _ _75  | succ j ih =>76    apply Prod.ext77    · exact FreeGroup.mk_toWord78    · exact ih _ _7980theorem canonical_reduced (g : GroupIndex α j) (hg : RadiusLe q g) :81    reduced (canonicalWord g hg) := by82  induction j with83  | zero => trivial84  | succ j ih => exact ⟨FreeGroup.isReduced_toWord, ih _ _⟩8586theorem wordValue_radius (w : WordIndex α q j) : RadiusLe q (wordValue w) := by87  induction j with88  | zero => trivial89  | succ j ih =>90    refine ⟨?_, ih _⟩91    exact (FreeGroup.norm_mk_le.trans_eq w.1.2.2).trans (by omega)9293theorem ballWord_mk_injective {u v : BallWords α q}94    (hu : FreeGroup.IsReduced u.2.1) (hv : FreeGroup.IsReduced v.2.1)95    (h : FreeGroup.mk u.2.1 = FreeGroup.mk v.2.1) : u = v := by96  have hl := congrArg FreeGroup.toWord h97  rw [FreeGroup.toWord_mk, FreeGroup.toWord_mk, hu.reduce_eq, hv.reduce_eq] at hl98  rcases u with ⟨lu,u⟩99  rcases v with ⟨lv,v⟩100  have he : lu = lv := by101    apply Fin.ext102    exact u.2.symm.trans ((congrArg List.length hl).trans v.2)103  subst lv104  congr 1105  exact Subtype.ext hl106107/-- Reduced word indices do not count any group element twice. -/108theorem wordValue_injective_reduced {u v : WordIndex α q j}109    (hu : reduced u) (hv : reduced v) (h : wordValue u = wordValue v) : u = v := by110  induction j with111  | zero => exact @Subsingleton.elim PUnit inferInstance _ _112  | succ j ih =>113    apply Prod.ext114    · exact ballWord_mk_injective hu.1 hv.1 (congrArg Prod.fst h)115    · exact ih hu.2 hv.2 (congrArg Prod.snd h)116117118/-- Exact summation over canonical reduced word representatives. -/119theorem sum_reduced_wordIndex [Fintype α] {M : Type*} [AddCommMonoid M]120    (S : Finset (GroupIndex α j)) (hS : ∀ g ∈ S, RadiusLe q g)121    (F : GroupIndex α j → M) :122    (∑ w : WordIndex α q j,123      if reduced w ∧ wordValue w ∈ S then F (wordValue w) else 0) = ∑ g ∈ S, F g := by124  classical125  rw [← Finset.sum_filter]126  apply Finset.sum_bij (fun w _ => wordValue w)127  · intro w hw128    exact (Finset.mem_filter.mp hw).2.2129  · intro u hu v hv huv130    exact wordValue_injective_reduced (Finset.mem_filter.mp hu).2.1131      (Finset.mem_filter.mp hv).2.1 huv132  · intro g hg133    refine ⟨canonicalWord g (hS g hg), ?_, wordValue_canonical g (hS g hg)⟩134    simp only [Finset.mem_filter, Finset.mem_univ, true_and]135    exact ⟨canonical_reduced g _, by rwa [wordValue_canonical]⟩136  · intro w hw137    rfl138139end Canonical140end Nonadditivity.ProductHaagerupProduct