Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.HaarPathNormalizedTree

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

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

23 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarPathTreeSegment7import Nonadditivity.HaarPathVertexNames89/-! # Endpoint reconstruction of actual old-tree intervals -/10noncomputable section11set_option maxHeartbeats 150000012set_option linter.unusedSectionVars false13namespace Nonadditivity.HaarPathGraph.Path14open HaarPathGraph HaarPathProfiles HaarPathClasses15variable {V : Type*} [DecidableEq V] {d m : ℕ}1617theorem discoveryGraph_eq_of_vertex_prefix (P Q : Path V d m) (a : ℕ)18    (hv : ∀ j : Fin (m+1), j.val ≤ a → P.vertex j=Q.vertex j) :19    P.discoveryGraph a=Q.discoveryGraph a := by20  have hf (i : Fin m) (hi : i.val<a) : P.FirstVisit i ↔ Q.FirstVisit i := by21    constructor22    · intro hp j hj23      rw [← hv j (by omega), ← hv i.succ (by simp; omega)]24      exact hp j hj25    · intro hq j hj26      rw [hv j (by omega), hv i.succ (by simp; omega)]27      exact hq j hj28  ext x y29  constructor30  · rintro ⟨i,hi,hia,hxy⟩31    refine ⟨i,(hf i hia).mp hi,hia,?_⟩32    simpa only [hv i.castSucc (by simp; omega),hv i.succ (by simp; omega)] using hxy33  · rintro ⟨i,hi,hia,hxy⟩34    refine ⟨i,(hf i hia).mpr hi,hia,?_⟩35    simpa only [hv i.castSucc (by simp; omega),hv i.succ (by simp; omega)] using hxy3637/-- An old-tree interval is determined by the decoded tree and its endpoint,38including the interval length. -/39theorem old_tree_segment_reconstruction (P Q : Path V d m) (a lP lQ : ℕ)40    (hP : a+lP ≤ m) (hQ : a+lQ ≤ m)41    (htP : ∀ i : Fin m, a ≤ i.val → i.val<a+lP → P.edgeAt i∈P.treeEdges)42    (hoP : ∀ i : Fin m, a ≤ i.val → i.val<a+lP → ¬P.FirstVisit i)43    (htQ : ∀ i : Fin m, a ≤ i.val → i.val<a+lQ → Q.edgeAt i∈Q.treeEdges)44    (hoQ : ∀ i : Fin m, a ≤ i.val → i.val<a+lQ → ¬Q.FirstVisit i)45    (hv : ∀ j : Fin (m+1), j.val ≤ a → P.vertex j=Q.vertex j)46    (he : P.vertexAt (a+lP)=Q.vertexAt (a+lQ)) :47    lP=lQ ∧ ∀ t, t ≤ lP → P.vertexAt (a+t)=Q.vertexAt (a+t) := by48  have hg := discoveryGraph_eq_of_vertex_prefix P Q a hv49  have hs : P.vertexAt a=Q.vertexAt a := by50    rw [P.vertexAt_eq a (by omega),Q.vertexAt_eq a (by omega)]51    exact hv ⟨a,by omega⟩ le_rfl52  let wP := P.oldTreeSegment a lP hP htP hoP53  let wQ := Q.oldTreeSegment a lQ hQ htQ hoQ54  let w := (wP.mapLe hg.le).copy hs he55  have hr : w.edges.IsChain (· ≠ ·) := by56    simpa only [w,SimpleGraph.Walk.edges_copy,SimpleGraph.Walk.edges_mapLe_eq_edges] using57      P.oldTreeSegment_reduced a lP hP htP hoP58  have hw : w=wQ := Q.discovery_tree_route_unique a w wQ hr59    (Q.oldTreeSegment_reduced a lQ hQ htQ hoQ)60  have hlist : List.ofFn (fun t : Fin (lP+1) => P.vertexAt (a+t.val)) =61      List.ofFn (fun t : Fin (lQ+1) => Q.vertexAt (a+t.val)) := by62    have hh := congrArg SimpleGraph.Walk.support hw63    simpa only [w,wP,wQ,SimpleGraph.Walk.support_copy,SimpleGraph.Walk.support_mapLe_eq_support,64      oldTreeSegment_support] using hh65  have hlen : lP=lQ := by66    have hh := congrArg List.length hlist67    simp only [List.length_ofFn] at hh68    omega69  refine ⟨hlen,?_⟩70  subst lQ71  intro t ht72  exact congrFun (List.ofFn_inj.mp hlist) ⟨t,by omega⟩7374theorem namedPath_tree_edge_mem_iff (P : Path V d m) (hm : 0<m) (i : Fin m) :75    (P.namedPath hm).edgeAt i ∈ (P.namedPath hm).treeEdges ↔ P.edgeAt i ∈ P.treeEdges := by76  simp only [treeEdges,Finset.mem_image,P.namedPath_firstTimes hm,P.namedPath_edgeAt_eq_iff hm]7778/-- Matching names at the old endpoint identify the whole old-tree route. -/79theorem named_old_tree_reconstruction (P Q : Path V d m) (hm : 0<m)80    (a bP bQ : ℕ) (haP : a ≤ bP) (haQ : a ≤ bQ) (hPm : bP ≤ m) (hQm : bQ ≤ m)81    (htP : ∀ i : Fin m, a ≤ i.val → i.val<bP → P.edgeAt i∈P.treeEdges)82    (hoP : ∀ i : Fin m, a ≤ i.val → i.val<bP → ¬P.FirstVisit i)83    (htQ : ∀ i : Fin m, a ≤ i.val → i.val<bQ → Q.edgeAt i∈Q.treeEdges)84    (hoQ : ∀ i : Fin m, a ≤ i.val → i.val<bQ → ¬Q.FirstVisit i)85    (hv : ∀ j : Fin (m+1), j.val ≤ a → P.vertexName hm j=Q.vertexName hm j)86    (he : P.vertexName hm ⟨bP,by omega⟩=Q.vertexName hm ⟨bQ,by omega⟩) :87    bP=bQ ∧ ∀ j : Fin (m+1), a ≤ j.val → j.val ≤ bP →88      P.vertexName hm j=Q.vertexName hm j := by89  have hbP : a+(bP-a)=bP := by omega90  have hbQ : a+(bQ-a)=bQ := by omega91  obtain ⟨hl,hv'⟩ := old_tree_segment_reconstruction (P.namedPath hm) (Q.namedPath hm)92    a (bP-a) (bQ-a) (by omega) (by omega)93    (fun i hi hj => (P.namedPath_tree_edge_mem_iff hm i).mpr (htP i hi (by omega)))94    (fun i hi hj h => hoP i hi (by omega) ((P.namedPath_firstVisit_iff hm i).mp h))95    (fun i hi hj => (Q.namedPath_tree_edge_mem_iff hm i).mpr (htQ i hi (by omega)))96    (fun i hi hj h => hoQ i hi (by omega) ((Q.namedPath_firstVisit_iff hm i).mp h))97    hv (by rw [hbP,hbQ,(P.namedPath hm).vertexAt_eq bP hPm,98      (Q.namedPath hm).vertexAt_eq bQ hQm]; exact he)99  refine ⟨by omega,?_⟩100  intro j haj hjP101  have h := hv' (j.val-a) (by omega)102  have hj : a+(j.val-a)=j.val := by omega103  rw [hj,vertexAt_fin,vertexAt_fin] at h104  exact h105106end Nonadditivity.HaarPathGraph.Path