Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.HaarPathNormalizedFresh

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

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

19 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarPathVertexNames7import Nonadditivity.HaarPathExplorationBlocks89/-! # Literal reconstruction of normalized fresh exploration runs1011Fresh vertex names are their first-arrival times. Incoming incidence labels12are fixed, as are outgoing labels after the first fresh step. Consequently13the start name and first outgoing label determine the whole interval's14normalized data.15-/1617noncomputable section18namespace Nonadditivity.HaarPathClasses19open HaarPathGraph HaarPathProfiles2021variable {V : Type*} [DecidableEq V] {d m : ℕ}2223/-- The two local normalization requirements at first arrivals. -/24def FreshNormalization (P : Path V d m) (β : V → Equiv.Perm (Color d))25    (c₀ c₁ : Color d) : Prop :=26  (∀ i : Fin m, P.FirstVisit i → β (P.vertex i.succ) (flipColor (P.colors i))=c₀) ∧27  (∀ i j : Fin m, P.FirstVisit i → i.val+1=j.val → β (P.vertex i.succ) (P.colors j)=c₁)2829/-- Reconstruct all names and both incidence labels on an actual fresh run.30No intermediate color choices or vertex correspondences are supplied. -/31theorem normalized_fresh_run (P Q : Path V d m) (hm : 0<m)32    (β γ : V → Equiv.Perm (Color d)) (c₀ c₁ : Color d)33    (hβ : FreshNormalization P β c₀ c₁) (hγ : FreshNormalization Q γ c₀ c₁)34    (a b : ℕ) (hab : a ≤ b) (hbm : b ≤ m)35    (hfresh : ∀ i : Fin m, a ≤ i.val → i.val<b → P.FirstVisit i ∧ Q.FirstVisit i)36    (hstart : P.vertexName hm ⟨a,by omega⟩=Q.vertexName hm ⟨a,by omega⟩)37    (hfirst : ∀ i : Fin m, i.val=a →38      normalizedIncidenceColor P β (i,true)=normalizedIncidenceColor Q γ (i,true)) :39    (∀ j : Fin (m+1), a ≤ j.val → j.val ≤ b → P.vertexName hm j=Q.vertexName hm j) ∧40    (∀ i : Fin m, a ≤ i.val → i.val<b →41      normalizedIncidenceColor P β (i,true)=normalizedIncidenceColor Q γ (i,true) ∧42      normalizedIncidenceColor P β (i,false)=normalizedIncidenceColor Q γ (i,false)) := by43  constructor44  · intro j haj hjb45    by_cases hja : j.val=a46    · have he : j=⟨a,by omega⟩ := Fin.ext hja47      simpa only [he] using hstart48    · let i : Fin m := ⟨j.val-1,by omega⟩49      have hij : i.succ=j := Fin.ext (by dsimp [i]; omega)50      have hi := hfresh i (by dsimp [i]; omega) (by dsimp [i]; omega)51      apply Fin.ext52      rw [←hij,P.vertexName_of_firstVisit hm hi.1,Q.vertexName_of_firstVisit hm hi.2]53  · intro i hai hib54    have hi := hfresh i hai hib55    constructor56    · by_cases hia : i.val=a57      · exact hfirst i hia58      · let j : Fin m := ⟨i.val-1,by omega⟩59        have hji : j.val+1=i.val := by dsimp [j]; omega60        have hidx : i.castSucc=j.succ := Fin.ext hji.symm61        have hj := hfresh j (by dsimp [j]; omega) (by dsimp [j]; omega)62        change β (P.vertex i.castSucc) (P.colors i)=γ (Q.vertex i.castSucc) (Q.colors i)63        rw [hidx,hβ.2 j i hj.1 hji,hγ.2 j i hj.2 hji]64    · change β (P.vertex i.succ) (flipColor (P.colors i))=65        γ (Q.vertex i.succ) (flipColor (Q.colors i))66      rw [hβ.1 i hi.1,hγ.1 i hi.2]6768/-- The initial fresh prefix requires no color mark: the root's outgoing69color is fixed by its own normalization. -/70theorem normalized_initial_fresh_run (P Q : Path V d m) (hm : 0<m)71    (β γ : V → Equiv.Perm (Color d)) (c₀ c₁ : Color d)72    (hβ : FreshNormalization P β c₀ c₁) (hγ : FreshNormalization Q γ c₀ c₁)73    (hβroot : β (P.vertex 0) (P.colors ⟨0,hm⟩)=c₀)74    (hγroot : γ (Q.vertex 0) (Q.colors ⟨0,hm⟩)=c₀)75    (b : ℕ) (hbm : b ≤ m)76    (hfresh : ∀ i : Fin m, i.val<b → P.FirstVisit i ∧ Q.FirstVisit i) :77    (∀ j : Fin (m+1), j.val ≤ b → P.vertexName hm j=Q.vertexName hm j) ∧78    (∀ i : Fin m, i.val<b →79      normalizedIncidenceColor P β (i,true)=normalizedIncidenceColor Q γ (i,true) ∧80      normalizedIncidenceColor P β (i,false)=normalizedIncidenceColor Q γ (i,false)) := by81  have hs : P.vertexName hm ⟨0,by omega⟩=Q.vertexName hm ⟨0,by omega⟩ := by simp82  have ho (i : Fin m) (hi : i.val=0) :83      normalizedIncidenceColor P β (i,true)=normalizedIncidenceColor Q γ (i,true) := by84    have he : i=⟨0,hm⟩ := Fin.ext hi85    subst i86    change β (P.vertex 0) (P.colors ⟨0,hm⟩)=γ (Q.vertex 0) (Q.colors ⟨0,hm⟩)87    rw [hβroot,hγroot]88  have h := normalized_fresh_run P Q hm β γ c₀ c₁ hβ hγ 0 b (by omega) hbm89    (fun i _ hi => hfresh i hi) hs ho90  exact ⟨fun j hj => h.1 j (by omega) hj,fun i hi => h.2 i (by omega) hi⟩9192/-- Before a shared first important time, the normalized data agree without93any stored labels. The fresh-run hypothesis follows from the actual paths. -/94theorem normalized_before_first_important (P Q : Path V d m) (hm : 0<m)95    (β γ : V → Equiv.Perm (Color d)) (c₀ c₁ : Color d)96    (hβ : FreshNormalization P β c₀ c₁) (hγ : FreshNormalization Q γ c₀ c₁)97    (hβroot : β (P.vertex 0) (P.colors ⟨0,hm⟩)=c₀)98    (hγroot : γ (Q.vertex 0) (Q.colors ⟨0,hm⟩)=c₀)99    (hb : P.nextImportant 0=Q.nextImportant 0) :100    (∀ j : Fin (m+1), j.val ≤ P.nextImportant 0 →101      P.vertexName hm j=Q.vertexName hm j) ∧102    (∀ i : Fin m, i.val<P.nextImportant 0 →103      normalizedIncidenceColor P β (i,true)=normalizedIncidenceColor Q γ (i,true) ∧104      normalizedIncidenceColor P β (i,false)=normalizedIncidenceColor Q γ (i,false)) := by105  apply normalized_initial_fresh_run P Q hm β γ c₀ c₁ hβ hγ hβroot hγroot106    (P.nextImportant 0) (P.nextImportant_bounds 0 (by omega)).2107  intro i hi108  exact ⟨P.initial_prefix_firstVisit i hi,Q.initial_prefix_firstVisit i (by simpa only [←hb] using hi)⟩109110end Nonadditivity.HaarPathClasses