Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.HaarActualScanWords

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

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

2 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarSkeletonSegmentation7import Nonadditivity.HaarPaletteDecoder8import Nonadditivity.HaarRefinedPaletteFibre9import Nonadditivity.HaarReducedChunks1011/-! # Actual decoded chunks of the reconstructed refined path1213The decoder's reversed scan is exactly the consecutive occurrence partition14of the original path. Its chunks are reduced and nontrivial, and their product15is the literal recolored word, for every independent profile assignment.16-/17noncomputable section18set_option backward.isDefEq.respectTransparency false19set_option maxHeartbeats 100000020namespace Nonadditivity.HaarActualScanWords21open HaarPathGraph HaarProfileCoefficient HaarSkeletonSegmentation HaarPaletteDecoder22  NoncommutativeCS HaarNonbacktracking2324variable {V : Type*} [Fintype V] [DecidableEq V] {d m : ℕ}25    (P : Path V d m) (cs : List P.CoreChain)26    (R : EndpointSkeleton P.unorientedChains27      (Fin.elim0 : Fin 0 → P.unorientedChains) (Fin.elim0 : Fin 0 → P.unorientedChains))2829theorem scanWords_eq_actual_chunks30    (hw : R.word=(cs.map P.chainLabel).reverse) (σ : P.ChainPalette) :31    scanWords R (decode (blockDirections P (R.occurrenceBlocks cs.reverse))) (chainEmbed P σ) =32      (R.occurrenceBlocks cs.reverse).map33        (fun block => (block.reverse.map (fun c => word (P.paletteWord σ c))).prod) := by34  have hmap := R.map_occurrenceBlocks P.chainLabel cs.reverse35    (by simpa only [List.map_reverse] using hw.symm)36  apply List.ext_getElem37  · simp [scanWords]38  · intro k hk hk'39    have hkB : k<(R.occurrenceBlocks cs.reverse).length := by simpa using hk'40    have hkR : k<R.blocks.length := by simpa [scanWords] using hk41    have hget : R.blocks[k]=(R.occurrenceBlocks cs.reverse)[k].map P.chainLabel := by42      have he := congrArg (fun ls : List (List P.unorientedChains) => ls.getD k []) hmap43      dsimp only at he44      rw [List.getD_eq_getElem _ _ (by simpa using hkB),45        List.getD_eq_getElem _ _ hkR,List.getElem_map] at he46      exact he.symm47    simp only [scanWords,List.getElem_mapIdx,List.getElem_map]48    rw [hget]49    simp only [List.map_map,Function.comp_def]50    exact decode_actual_block P σ (R.occurrenceBlocks cs.reverse) k hkB5152/-- Every remaining reduced-word hypothesis of the analytic segmented53coefficient theorem holds for the actual independent profile palettes. -/54theorem actualScanWords_spec55    (hcs : (cs.map Subtype.val).flatten=P.traversalList)56    (hR : R.Compressed) (hw : R.word=(cs.map P.chainLabel).reverse)57    (σ : P.ChainPalette) :58    let gs := (scanWords R59      (decode (blockDirections P (R.occurrenceBlocks cs.reverse))) (chainEmbed P σ)).reverse60    gs.prod=FreeGroup.mk (List.ofFn (P.paletteColoring σ).path.colors) ∧61      (∀ g∈gs, g≠1) ∧ FreeGroup.IsReduced (gs.flatMap FreeGroup.toWord) := by62  let φ : P.CoreChain → FreeGroup (Fin d) := fun c => word (P.paletteWord σ c)63  let chunks := ((R.occurrenceBlocks cs.reverse).map List.reverse).reverse64  have hw' : cs.reverse.map P.chainLabel=R.word := by65    simpa only [List.map_reverse] using hw.symm66  have hflat : chunks.flatten=cs := R.flatten_map_reversed_occurrenceBlocks P.chainLabel cs hw'67  have hchunks : ∀ c∈chunks, c≠[] := by68    intro c hc69    obtain ⟨b,hb,rfl⟩ := List.mem_map.mp (List.mem_reverse.mp hc)70    exact fun he => R.occurrenceBlocks_nonempty hR P.chainLabel cs.reverse hw' b hb71      (List.reverse_eq_nil_iff.mp he)72  have hred : FreeGroup.IsReduced ((cs.map φ).flatMap FreeGroup.toWord) :=73    (P.paletteColoring σ).assignedWords_reduced cs hcs74  have hne : ∀ c∈cs, φ c≠1 := fun c _ => word_ne_one (P.paletteWord σ c)75  have hs := occurrence_chunk_spec cs chunks φ hflat hred hne hchunks76  dsimp only at hs77  have hg : (scanWords R78      (decode (blockDirections P (R.occurrenceBlocks cs.reverse))) (chainEmbed P σ)).reverse =79      chunks.map (fun c => (c.map φ).prod) := by80    rw [scanWords_eq_actual_chunks P cs R hw σ]81    simp only [chunks,List.map_reverse,List.map_map,Function.comp_def,φ]82  dsimp only83  rw [hg]84  refine ⟨?_,hs.2.2.1,hs.2.1⟩85  exact hs.2.2.2.trans ((P.paletteColoring σ).assignedWords_prod cs hcs)8687end Nonadditivity.HaarActualScanWords