Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.HaarPathNormalizedTreeColors

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

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.HaarPathNormalizedTree78/-! # Old-tree routes reconstruct both normalized incidence labels -/9noncomputable section10set_option maxHeartbeats 150000011set_option linter.unusedSectionVars false12namespace Nonadditivity.HaarPathClasses13open HaarPathGraph HaarPathProfiles14variable {V : Type*} [DecidableEq V] {d m : ℕ}1516theorem normalized_repeated_edge (P Q : Path V d m)17    (β γ : V → Equiv.Perm (Color d)) (i k : Fin m)18    (hP : P.edgeAt i=P.edgeAt k) (hQ : Q.edgeAt i=Q.edgeAt k)19    (hnP : P.vertex k.castSucc ≠ P.vertex k.succ)20    (hnQ : Q.vertex k.castSucc ≠ Q.vertex k.succ)21    (hv : P.vertex i.castSucc=P.vertex k.castSucc ↔ Q.vertex i.castSucc=Q.vertex k.castSucc)22    (hc : ∀ b : Bool, normalizedIncidenceColor P β (k,b)=normalizedIncidenceColor Q γ (k,b)) :23    ∀ b : Bool, normalizedIncidenceColor P β (i,b)=normalizedIncidenceColor Q γ (i,b) := by24  rcases edge_eq_iff.mp hP with ⟨hPx,hPc,hPy⟩ | ⟨hPx,hPc,hPy⟩25  · rcases edge_eq_iff.mp hQ with ⟨hQx,hQc,hQy⟩ | ⟨hQx,hQc,hQy⟩26    · intro b27      cases b28      · simpa [normalizedIncidenceColor,incidenceVertex,incidenceColor,29          hPx,hPc,hPy,hQx,hQc,hQy] using hc false30      · simpa [normalizedIncidenceColor,incidenceVertex,incidenceColor,31          hPx,hPc,hPy,hQx,hQc,hQy] using hc true32    · exact (hnQ ((hv.mp hPx).symm.trans hQx)).elim33  · rcases edge_eq_iff.mp hQ with ⟨hQx,hQc,hQy⟩ | ⟨hQx,hQc,hQy⟩34    · exact (hnP ((hv.mpr hQx).symm.trans hPx)).elim35    · intro b36      cases b37      · simpa [normalizedIncidenceColor,incidenceVertex,incidenceColor,38          hPx,hPc,hPy,hQx,hQc,hQy,flipColor] using hc true39      · simpa [normalizedIncidenceColor,incidenceVertex,incidenceColor,40          hPx,hPc,hPy,hQx,hQc,hQy,flipColor] using hc false4142theorem normalized_old_tree_colors (P Q : Path V d m) (hm : 0<m)43    (β γ : V → Equiv.Perm (Color d)) (a b : ℕ) (hab : a ≤ b) (hbm : b ≤ m)44    (htP : ∀ i : Fin m, a ≤ i.val → i.val<b → P.edgeAt i∈P.treeEdges)45    (hoP : ∀ i : Fin m, a ≤ i.val → i.val<b → ¬P.FirstVisit i)46    (htQ : ∀ i : Fin m, a ≤ i.val → i.val<b → Q.edgeAt i∈Q.treeEdges)47    (hv : ∀ j : Fin (m+1), j.val ≤ b → P.vertexName hm j=Q.vertexName hm j)48    (hc : ∀ z : Incidence m, z.1.val<a →49      normalizedIncidenceColor P β z=normalizedIncidenceColor Q γ z) :50    ∀ i : Fin m, a ≤ i.val → i.val<b → ∀ c : Bool,51      normalizedIncidenceColor P β (i,c)=normalizedIncidenceColor Q γ (i,c) := by52  intro i hai hib53  obtain ⟨k,hk,hki⟩ := Finset.mem_image.mp (htP i hai hib)54  have hkf := (P.mem_firstTimes k).mp hk55  have hki' : k.val ≤ i.val := by56    by_contra h57    exact P.firstVisit_edge_not_earlier hkf (by omega) hki.symm58  have hka : k.val<a := by59    by_contra h60    exact hoP k (by omega) (by omega) hkf61  have hkQ : Q.FirstVisit k := by62    intro j hj he63    apply hkf j hj64    apply (P.vertexName_eq_iff hm j k.succ).mp65    rw [hv j (by omega),hv k.succ (by simp; omega)]66    exact (Q.vertexName_eq_iff hm j k.succ).mpr he67  have hkQt : Q.edgeAt k∈Q.treeEdges := Finset.mem_image.mpr68    ⟨k,(Q.mem_firstTimes k).mpr hkQ,rfl⟩69  have hkPt : P.edgeAt k∈P.treeEdges := Finset.mem_image.mpr ⟨k,hk,rfl⟩70  have heN : (P.namedPath hm).edgeAt k=(P.namedPath hm).edgeAt i :=71    (P.namedPath_edgeAt_eq_iff hm k i).mpr hki72  have heS := (P.namedPath hm).edgeAt_eq_unoriented heN73  have heQ : s((Q.namedPath hm).vertex k.castSucc,(Q.namedPath hm).vertex k.succ) =74      s((Q.namedPath hm).vertex i.castSucc,(Q.namedPath hm).vertex i.succ) := by75    simpa only [Path.namedPath,hv k.castSucc (by simp; omega),hv k.succ (by simp; omega),76      hv i.castSucc (by simp; omega),hv i.succ (by simp; omega)] using heS77  have hkiQ : Q.edgeAt k=Q.edgeAt i :=78    (Q.namedPath_edgeAt_eq_iff hm k i).mp ((Q.namedPath hm).tree_edge_eq_of_unoriented79      ((Q.namedPath_tree_edge_mem_iff hm k).mpr hkQt)80      ((Q.namedPath_tree_edge_mem_iff hm i).mpr (htQ i hai hib)) heQ)81  have hvertex : P.vertex i.castSucc=P.vertex k.castSucc ↔82      Q.vertex i.castSucc=Q.vertex k.castSucc := by83    rw [← P.vertexName_eq_iff hm i.castSucc k.castSucc,84      ← Q.vertexName_eq_iff hm i.castSucc k.castSucc,85      hv i.castSucc (by simp; omega),hv k.castSucc (by simp; omega)]86  exact normalized_repeated_edge P Q β γ i k hki.symm hkiQ.symm87    (P.tree_edge_nonloop hkPt) (Q.tree_edge_nonloop hkQt) hvertex88    (fun c => hc (k,c) hka)8990/-- Complete normalized reconstruction of an old-tree interval from the91decoded prefix and the endpoint's first-occurrence name. -/92theorem normalized_old_tree_reconstruction (P Q : Path V d m) (hm : 0<m)93    (β γ : V → Equiv.Perm (Color d))94    (a bP bQ : ℕ) (haP : a ≤ bP) (haQ : a ≤ bQ) (hPm : bP ≤ m) (hQm : bQ ≤ m)95    (htP : ∀ i : Fin m, a ≤ i.val → i.val<bP → P.edgeAt i∈P.treeEdges)96    (hoP : ∀ i : Fin m, a ≤ i.val → i.val<bP → ¬P.FirstVisit i)97    (htQ : ∀ i : Fin m, a ≤ i.val → i.val<bQ → Q.edgeAt i∈Q.treeEdges)98    (hoQ : ∀ i : Fin m, a ≤ i.val → i.val<bQ → ¬Q.FirstVisit i)99    (hv : ∀ j : Fin (m+1), j.val ≤ a → P.vertexName hm j=Q.vertexName hm j)100    (hc : ∀ z : Incidence m, z.1.val<a →101      normalizedIncidenceColor P β z=normalizedIncidenceColor Q γ z)102    (he : P.vertexName hm ⟨bP,by omega⟩=Q.vertexName hm ⟨bQ,by omega⟩) :103    bP=bQ ∧104    (∀ j : Fin (m+1), a ≤ j.val → j.val ≤ bP → P.vertexName hm j=Q.vertexName hm j) ∧105    (∀ i : Fin m, a ≤ i.val → i.val<bP → ∀ c : Bool,106      normalizedIncidenceColor P β (i,c)=normalizedIncidenceColor Q γ (i,c)) := by107  obtain ⟨hb,hv'⟩ := P.named_old_tree_reconstruction Q hm a bP bQ haP haQ hPm hQm108    htP hoP htQ hoQ hv he109  subst bQ110  refine ⟨rfl,hv',?_⟩111  apply normalized_old_tree_colors P Q hm β γ a bP haP hPm htP hoP htQ _ hc112  intro j hj113  by_cases hja : j.val ≤ a114  · exact hv j hja115  · exact hv' j (by omega) hj116117end Nonadditivity.HaarPathClasses