Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.HaarReducedChunks

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

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

7 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarNonbacktrackingSegmentation7import Mathlib.Data.List.Infix89/-! # Reduced, nontrivial group words on actual contiguous chunks1011Grouping consecutive pieces of a reduced word introduces neither cancellation12nor trivial chunks. These identities supply the literal hypotheses of the13checked positive-time coefficient factorization.14-/15noncomputable section16namespace Nonadditivity.HaarNonbacktracking17variable {α C : Type*} [DecidableEq α]1819theorem chunk_flatMap_reduced (chunks : List (List (FreeGroup α)))20    (hred : FreeGroup.IsReduced (chunks.flatten.flatMap FreeGroup.toWord))21    {chunk : List (FreeGroup α)} (hc : chunk ∈ chunks) :22    FreeGroup.IsReduced (chunk.flatMap FreeGroup.toWord) := by23  exact hred.infix ((List.infix_of_mem_flatten hc).flatMap FreeGroup.toWord)2425theorem chunk_prod_toWord (chunks : List (List (FreeGroup α)))26    (hred : FreeGroup.IsReduced (chunks.flatten.flatMap FreeGroup.toWord))27    {chunk : List (FreeGroup α)} (hc : chunk ∈ chunks) :28    chunk.prod.toWord=chunk.flatMap FreeGroup.toWord :=29  toWord_prod_of_reduced chunk (chunk_flatMap_reduced chunks hred hc)3031theorem chunk_prod_ne_one (chunks : List (List (FreeGroup α)))32    (hred : FreeGroup.IsReduced (chunks.flatten.flatMap FreeGroup.toWord))33    (hne : ∀ g ∈ chunks.flatten, g≠1)34    {chunk : List (FreeGroup α)} (hc : chunk ∈ chunks) (hchunk : chunk≠[]) :35    chunk.prod≠1 := by36  cases chunk with37  | nil => exact (hchunk rfl).elim38  | cons g gs =>39      exact prod_cons_ne_one_of_reduced g gs40        (hne g (List.mem_flatten.mpr ⟨g::gs,hc,by simp⟩))41        (chunk_flatMap_reduced chunks hred hc)4243theorem chunk_products_flatMap (chunks : List (List (FreeGroup α)))44    (hred : FreeGroup.IsReduced (chunks.flatten.flatMap FreeGroup.toWord)) :45    (chunks.map List.prod).flatMap FreeGroup.toWord =46      chunks.flatten.flatMap FreeGroup.toWord := by47  rw [List.flatMap_map]48  calc49    _ = chunks.flatMap (fun c => c.flatMap FreeGroup.toWord) := by50      apply List.flatMap_congr51      intro c hc52      exact chunk_prod_toWord chunks hred hc53    _ = _ := by54      clear hred55      induction chunks with56      | nil => rfl57      | cons c cs ih =>58          simp only [List.flatMap_cons,List.flatten_cons,List.flatMap_append]59          exact congrArg (c.flatMap FreeGroup.toWord ++ ·) ih6061theorem chunk_products_reduced (chunks : List (List (FreeGroup α)))62    (hred : FreeGroup.IsReduced (chunks.flatten.flatMap FreeGroup.toWord)) :63    FreeGroup.IsReduced ((chunks.map List.prod).flatMap FreeGroup.toWord) := by64  rwa [chunk_products_flatMap chunks hred]6566theorem chunk_products_nontrivial (chunks : List (List (FreeGroup α)))67    (hred : FreeGroup.IsReduced (chunks.flatten.flatMap FreeGroup.toWord))68    (hne : ∀ g ∈ chunks.flatten, g≠1) (hchunks : ∀ c∈chunks, c≠[]) :69    ∀ g∈chunks.map List.prod, g≠1 := by70  intro g hg71  obtain ⟨c,hc,rfl⟩ := List.mem_map.mp hg72  exact chunk_prod_ne_one chunks hred hne hc (hchunks c hc)7374/-- Payload form: every original occurrence retains its own orientation and75word; the chunks need only concatenate to the original occurrence list. -/76theorem occurrence_chunk_spec (cs : List C) (chunks : List (List C))77    (φ : C → FreeGroup α) (hflat : chunks.flatten=cs)78    (hred : FreeGroup.IsReduced ((cs.map φ).flatMap FreeGroup.toWord))79    (hne : ∀ c∈cs, φ c≠1) (hchunks : ∀ c∈chunks, c≠[]) :80    let gs := chunks.map (fun c => (c.map φ).prod)81    gs.flatMap FreeGroup.toWord = (cs.map φ).flatMap FreeGroup.toWord ∧82      FreeGroup.IsReduced (gs.flatMap FreeGroup.toWord) ∧83      (∀ g∈gs, g≠1) ∧ gs.prod=(cs.map φ).prod := by84  let ls := chunks.map (List.map φ)85  have hl : ls.flatten=cs.map φ := by86    rw [←List.map_flatten,hflat]87  have hr : FreeGroup.IsReduced (ls.flatten.flatMap FreeGroup.toWord) := by rwa [hl]88  have hn : ∀ g∈ls.flatten, g≠1 := by89    rw [hl]90    intro g hg91    obtain ⟨c,hc,rfl⟩ := List.mem_map.mp hg92    exact hne c hc93  have hls : ∀ c∈ls, c≠[] := by94    intro c hc95    obtain ⟨b,hb,rfl⟩ := List.mem_map.mp hc96    exact fun he => hchunks b hb (List.map_eq_nil_iff.mp he)97  have hword := chunk_products_flatMap ls hr98  rw [hl] at hword99  have hgn := chunk_products_nontrivial ls hr hn hls100  have hgr := chunk_products_reduced ls hr101  have hprod := congrArg FreeGroup.mk hword102  rw [mk_flatMap_toWord,mk_flatMap_toWord] at hprod103  have hout := And.intro hword (And.intro hgr (And.intro hgn hprod))104  simpa only [ls,List.map_map,Function.comp_def] using hout105106end Nonadditivity.HaarNonbacktracking