Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.HaarPathReconstruction

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

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

17 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarPathMarks7import Nonadditivity.HaarPathNormalizedFresh89/-! # Reconstruction of the normalized data from sparse exploration marks1011Pointwise prefix data are stronger than path equivalence. Each important12mark extends those data by one step; the tree and fresh-run bridges then13reconstruct the intervening unmarked steps.14-/15noncomputable section16namespace Nonadditivity.HaarPathClasses17open HaarPathGraph HaarPathProfiles18variable {V : Type*} [DecidableEq V] {m : ℕ}19variable {P Q : Path V 2 m}2021/-- Literal equality of all normalized data in the decoded prefix. -/22def NormalizedPrefixEq (P Q : Path V 2 m) (hm : 0 < m) (k : ℕ) : Prop :=23  (∀ j : Fin (m+1), j.val ≤ k → P.vertexName hm j=Q.vertexName hm j) ∧24  ∀ a : Incidence m, a.1.val < k → normalColor P hm a=normalColor Q hm a2526theorem normalizedPrefixEq_zero (P Q : Path V 2 m) (hm : 0 < m) :27    NormalizedPrefixEq P Q hm 0 := by28  constructor29  · intro j hj30    have he : j=0 := Fin.ext (by change j.val=0; omega)31    subst j32    rw [P.vertexName_root hm,Q.vertexName_root hm]33  · intro a ha34    omega3536theorem normalizedPrefixEq_mono (hm : 0 < m) {j k : ℕ}37    (h : NormalizedPrefixEq P Q hm k) (hjk : j ≤ k) : NormalizedPrefixEq P Q hm j :=38  ⟨fun a ha => h.1 a (ha.trans hjk),fun a ha => h.2 a (ha.trans_le hjk)⟩3940theorem normalizedPrefixEq_full (hm : 0 < m)41    (h : NormalizedPrefixEq P Q hm m) : SamePattern P Q := by42  apply samePattern_of_named_data hm (colorNormalizer P hm) (colorNormalizer Q hm)43  · intro j44    exact h.1 j (by omega)45  · intro a46    exact h.2 a a.1.isLt4748/-- Extend by an actual step once its target and two incidence labels are49known. This covers important edges, including loops and repeated edges. -/50theorem normalizedPrefixEq_extend (hm : 0 < m) (i : Fin m)51    (hp : NormalizedPrefixEq P Q hm i.val)52    (ht : P.vertexName hm i.succ=Q.vertexName hm i.succ)53    (hc : ∀ b : Bool, normalColor P hm (i,b)=normalColor Q hm (i,b)) :54    NormalizedPrefixEq P Q hm (i.val+1) := by55  constructor56  · intro j hj57    by_cases hj' : j.val ≤ i.val58    · exact hp.1 j hj'59    · have he : j=i.succ := Fin.ext (by simp; omega)60      subst j61      exact ht62  · rintro ⟨j,b⟩ hj63    by_cases hj' : j.val < i.val64    · exact hp.2 (j,b) hj'65    · have he : j=i := Fin.ext (by change j.val < i.val+1 at hj; omega)66      subst j67      exact hc b6869/-- Projection of the actual sparse mark supplies all data of an important70step, using no lookup in the unreconstructed final graph. -/71theorem normalizedPrefixEq_extend_mark (hm : 0 < m) (i : Fin m)72    (hp : NormalizedPrefixEq P Q hm i.val)73    (hmark : explorationMark P hm i=explorationMark Q hm i) :74    NormalizedPrefixEq P Q hm (i.val+1) := by75  apply normalizedPrefixEq_extend hm i hp76  · exact congrArg Prod.fst hmark77  · intro b78    cases b79    · exact congrArg (fun x : ExplorationMark m => x.2.2.2.1) hmark80    · exact congrArg (fun x : ExplorationMark m => x.2.2.1) hmark8182theorem nextImportant_eq_of_eventList_eq (hm : 0 < m)83    (h : explorationEventList P hm=explorationEventList Q hm) (a : ℕ) :84    P.nextImportant a=Q.nextImportant a := by85  have hi := importantTimes_eq_of_eventList_eq hm h86  simp only [Path.nextImportant,Path.importantStops,hi]8788theorem normalizer_freshNormalization (P : Path V 2 m) (hm : 0 < m) :89    FreshNormalization P (colorNormalizer P hm) initialColor nextColor := by90  constructor91  · intro i hi92    exact normalColor_incoming P hm i hi93  · intro i j hi hij94    have hv : j.castSucc=i.succ := Fin.ext (by simpa using hij.symm)95    simpa only [normalColor,normalizedIncidenceColor,incidenceVertex,incidenceColor,96      if_true,hv] using normalColor_after_firstVisit P hm i j hi hij9798end Nonadditivity.HaarPathClasses