Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.HaarRefinedVertexFibre

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

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

24 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarPathVertexFibre7import Nonadditivity.HaarPathRefined89/-! # Exact vertex-label factor for the genuine refined path class -/1011noncomputable section12set_option backward.isDefEq.respectTransparency false1314namespace Nonadditivity.HaarRefinedVertexFibre1516open scoped BigOperators17open HaarPathGraph HaarPathClasses HaarPathProfiles18open HaarPathVertexFibre (VertexLabels)1920variable {V : Type*} [Fintype V] [DecidableEq V] {d m : ℕ}2122def Fibre (P : Path V d m) := {Q : Path V d m // RefinedPattern P Q}23def ColorFibre (P : Path V d m) :=24  {Q : Path V d m // Q.vertex=P.vertex ∧ RefinedPattern P Q}2526instance (P : Path V d m) : Fintype (Fibre P) := by27  classical28  unfold Fibre29  infer_instance30instance (P : Path V d m) : Fintype (ColorFibre P) := by31  classical32  unfold ColorFibre33  infer_instance3435/-- Changing only vertex labels preserves every actual core-chain profile. -/36theorem normalize_refined {P Q : Path V d m} (h : RefinedPattern P Q) :37    RefinedPattern P (HaarPathVertexFibre.normalize P Q) := by38  have hcoarse := h.samePattern.symm.trans (HaarPathVertexFibre.normalize_samePattern h.samePattern)39  exact h.trans (RefinedPattern.of_colors_eq hcoarse rfl)4041def coarseColor {P : Path V d m} (C : ColorFibre P) : HaarPathVertexFibre.ColorFibre P :=42  ⟨C.val,C.property.1,C.property.2.samePattern⟩4344theorem reconstruct_refined (P : Path V d m) (e : VertexLabels P) (C : ColorFibre P) :45    RefinedPattern P (HaarPathVertexFibre.reconstruct P e (coarseColor C)) := by46  have hcoarse := C.property.2.samePattern.symm.trans47    (HaarPathVertexFibre.reconstruct_samePattern P e (coarseColor C))48  exact C.property.2.trans (RefinedPattern.of_colors_eq hcoarse rfl)4950/-- Genuine refined paths are exactly independent vertex injections and51fixed-vertex refined colorings. -/52def fibreEquiv (P : Path V d m) : Fibre P ≃ VertexLabels P × ColorFibre P where53  toFun Q := (HaarPathVertexFibre.labels Q.property.samePattern,54    ⟨HaarPathVertexFibre.normalize P Q.val,rfl,normalize_refined Q.property⟩)55  invFun eC := ⟨HaarPathVertexFibre.reconstruct P eC.1 (coarseColor eC.2),56    reconstruct_refined P eC.1 eC.2⟩57  left_inv Q := by58    apply Subtype.ext59    apply Path.ext_data60    · funext i61      exact HaarPathVertexFibre.labels_apply Q.property.samePattern i62    · rfl63  right_inv eC := by64    rcases eC with ⟨e,C⟩65    apply Prod.ext66    · apply Function.Embedding.ext67      intro v68      obtain ⟨i,hi⟩ := v.property69      have hv : v = ⟨P.vertex i,⟨i,rfl⟩⟩ := Subtype.ext hi.symm70      rw [hv,HaarPathVertexFibre.labels_apply]71      rfl72    · apply Subtype.ext73      exact Path.ext_data C.property.1.symm rfl7475/-- Exact vertex factor in the grouped operator coefficient sum. -/76theorem sum_fibre_colors {R : Type*} [AddCommMonoid R] (P : Path V d m)77    (f : (Fin m → Color d) → R) :78    ∑ Q : Fibre P, f Q.val.colors =79      Fintype.card (VertexLabels P) • ∑ C : ColorFibre P, f C.val.colors := by80  rw [← (fibreEquiv P).symm.sum_comp]81  simp only [Fintype.sum_prod_type, fibreEquiv, HaarPathVertexFibre.reconstruct, coarseColor]82  simp8384/-- The visited-vertex range is precisely the graph's original vertex set. -/85theorem range_vertex_eq (P : Path V d m) (hm : 0 < m) :86    Set.range P.vertex = (P.vertices : Set V) := by87  ext v88  constructor89  · rintro ⟨j,rfl⟩90    by_cases hj : j.val < m91    · have he : j = (⟨j.val,hj⟩ : Fin m).castSucc := Fin.ext rfl92      rw [he]93      exact P.start_mem _94    · have he : j = Fin.last m := Fin.ext (by simp only [Fin.val_last]; omega)95      rw [he,P.closed]96      exact P.start_mem ⟨0,hm⟩97  · intro hv98    obtain ⟨i,hi,rfl⟩ := Finset.mem_image.mp hv99    exact ⟨i.castSucc,rfl⟩100101theorem card_vertexLabels_le (P : Path V d m) (hm : 0 < m) :102    Fintype.card (VertexLabels P) ≤ Fintype.card V ^ P.vertices.card := by103  have hc : Fintype.card (Set.range P.vertex) = P.vertices.card := by104    exact Fintype.card_of_finset' P.vertices (fun v => by105      rw [range_vertex_eq P hm]106      rfl)107  simpa only [hc] using HaarPathVertexFibre.card_vertexLabels_le P108109end Nonadditivity.HaarRefinedVertexFibre