Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.HaarCoreChainAddress

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

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

11 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarCoreChainLabels78/-! # Exact coordinates of graph darts on suppressed chains910The positions of all oriented core chains partition the literal graph darts.11The address map and its inverse are actual bijections, not chosen encodings12with a coverage or reconstruction premise.13-/1415noncomputable section16set_option backward.isDefEq.respectTransparency false1718namespace Nonadditivity.HaarPathGraph.Path1920variable {V : Type*} [DecidableEq V] {d m : ℕ} (P : Path V d m)2122abbrev ChainPosition := Σ c : P.CoreChain, Fin c.val.length2324def positionDart (p : P.ChainPosition) : P.darts :=25  ⟨p.1.val.get p.2, P.toCore_mem p.1.property.1 (List.get_mem _ _)⟩2627/-- A literal oriented dart determines both its chain and its position. -/28theorem positionDart_injective : Function.Injective P.positionDart := by29  rintro ⟨c,i⟩ ⟨c',i'⟩ he30  have heq : c.val.get i = c'.val.get i' := congrArg Subtype.val he31  have hc : c = c' := P.coreChain_eq_of_common_dart c c'32    (List.get_mem _ _) (heq.symm ▸ List.get_mem _ _)33  subst c'34  have hi : i = i' := (P.toCore_nodup c.property.1).injective_get heq35  subst i'36  rfl3738/-- Every actual graph dart lies on one of the complete oriented core chains. -/39theorem positionDart_surjective : Function.Surjective P.positionDart := by40  intro q41  obtain ⟨i,hi | hi⟩ := P.dart_eq_traversal_or_reverse q.val q.property42  all_goals43    have hm : 0 < m := Nat.zero_lt_of_lt i.isLt44    obtain ⟨cs,hcs⟩ := P.exists_traversal_chain_decomposition hm45    have hmem : P.traversal i ∈ (cs.map Subtype.val).flatten := by46      rw [hcs]47      exact List.mem_ofFn.mpr ⟨i,rfl⟩48    obtain ⟨l,hl,hil⟩ := List.mem_flatten.mp hmem49    obtain ⟨c,hc,rfl⟩ := List.mem_map.mp hl50  · have hqc : q.val ∈ c.val := hi.symm ▸ hil51    obtain ⟨j,hj⟩ := List.mem_iff_get.mp hqc52    exact ⟨⟨c,j⟩,Subtype.ext hj⟩53  · have hqc : q.val ∈ (P.coreChainReverse c).val := by54      rw [hi]55      exact List.mem_map.mpr ⟨P.traversal i,List.mem_reverse.mpr hil,rfl⟩56    obtain ⟨j,hj⟩ := List.mem_iff_get.mp hqc57    exact ⟨⟨P.coreChainReverse c,j⟩,Subtype.ext hj⟩5859/-- The canonical finite position address of each oriented dart. -/60def positionEquiv : P.ChainPosition ≃ P.darts :=61  Equiv.ofBijective P.positionDart ⟨P.positionDart_injective,P.positionDart_surjective⟩6263@[simp] theorem positionEquiv_apply (p : P.ChainPosition) : P.positionEquiv p = P.positionDart p := rfl6465/-- Recolor every graph dart using arbitrary prescribed lists on the chains. -/66def recolor (F : ∀ c : P.CoreChain, Fin c.val.length → HaarPathProfiles.Color d)67    (q : P.darts) : HaarPathProfiles.Color d :=68  F (P.positionEquiv.symm q).1 (P.positionEquiv.symm q).26970@[simp] theorem recolor_position (F : ∀ c : P.CoreChain, Fin c.val.length → HaarPathProfiles.Color d)71    (c : P.CoreChain) (i : Fin c.val.length) :72    P.recolor F (P.positionDart ⟨c,i⟩) = F c i := by73  change F (P.positionEquiv.symm (P.positionEquiv ⟨c,i⟩)).174    (P.positionEquiv.symm (P.positionEquiv ⟨c,i⟩)).2 = _75  rw [Equiv.symm_apply_apply]7677/-- Reading back a recolored chain returns exactly its assigned finite word. -/78theorem recolor_chain (F : ∀ c : P.CoreChain, Fin c.val.length → HaarPathProfiles.Color d)79    (c : P.CoreChain) :80    List.ofFn (fun i : Fin c.val.length => P.recolor F (P.positionDart ⟨c,i⟩)) =81      List.ofFn (F c) := by82  simp only [P.recolor_position]8384end Nonadditivity.HaarPathGraph.Path