Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.HaarPathVertexFibre

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

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

37 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarPathClasses78/-! # Exact separation of vertex labelings from a path class910For a fixed incidence pattern, choosing distinct labels for the visited11vertices is independent of the generator colors. This constructs the literal12bijection used to pull the `N^v` factor out of the grouped coefficient sum.13-/1415noncomputable section16set_option backward.isDefEq.respectTransparency false1718namespace Nonadditivity.HaarPathGraph.Path1920variable {V : Type*} {d m : ℕ}2122theorem ext_data {P Q : Path V d m} (hv : P.vertex = Q.vertex) (hc : P.colors = Q.colors) :23    P = Q := by24  cases P25  cases Q26  cases hv27  cases hc28  rfl2930instance [Fintype V] : Fintype (Path V d m) :=31  Fintype.ofInjective (fun P : Path V d m => (P.vertex,P.colors))32    (fun _ _ h => ext_data (congrArg Prod.fst h) (congrArg Prod.snd h))3334end Nonadditivity.HaarPathGraph.Path3536namespace Nonadditivity.HaarPathVertexFibre3738open scoped BigOperators39open HaarPathGraph HaarPathClasses HaarPathProfiles4041variable {V : Type*} [Fintype V] {d m : ℕ}4243/-- The actual coarse path class before quotienting. -/44def Fibre (P : Path V d m) := {Q : Path V d m // SamePattern P Q}4546/-- Its color fibre after fixing the original vertex labeling. -/47def ColorFibre (P : Path V d m) :=48  {Q : Path V d m // Q.vertex = P.vertex ∧ SamePattern P Q}4950instance (P : Path V d m) : Fintype (Fibre P) := by51  classical52  unfold Fibre53  infer_instance54instance (P : Path V d m) : Fintype (ColorFibre P) := by55  classical56  unfold ColorFibre57  infer_instance5859abbrev VertexLabels (P : Path V d m) := Set.range P.vertex ↪ V6061instance visitedFintype (P : Path V d m) : Fintype (Set.range P.vertex) := by62  classical63  infer_instance6465instance vertexLabelsFintype (P : Path V d m) : Fintype (VertexLabels P) := by66  classical67  unfold VertexLabels68  infer_instance6970/-- Keep the colors and restore the reference vertex names. -/71def normalize (P Q : Path V d m) : Path V d m where72  vertex := P.vertex73  colors := Q.colors74  closed := P.closed75  reduced := Q.reduced7677theorem normalize_samePattern {P Q : Path V d m} (h : SamePattern P Q) :78    SamePattern P (normalize P Q) := by79  refine ⟨fun _ _ => Iff.rfl, ?_⟩80  intro a b hab81  exact h.2 a b hab8283/-- The unique injection assigning the new name to each visited vertex. -/84def labels {P Q : Path V d m} (h : SamePattern P Q) : VertexLabels P :=85  (rangeEquivOfKernel P.vertex Q.vertex h.1).toEmbedding.trans86    (Function.Embedding.subtype (fun v => v ∈ Set.range Q.vertex))8788@[simp] theorem labels_apply {P Q : Path V d m} (h : SamePattern P Q) (i : Fin (m+1)) :89    labels h ⟨P.vertex i,⟨i,rfl⟩⟩ = Q.vertex i :=90  rangeEquivOfKernel_apply P.vertex Q.vertex h.1 i9192/-- Reconstruct a path by an injective choice of vertex names and a color fibre. -/93def reconstruct (P : Path V d m) (e : VertexLabels P) (C : ColorFibre P) : Path V d m where94  vertex i := e ⟨P.vertex i,⟨i,rfl⟩⟩95  colors := C.val.colors96  closed := by congr 1; exact Subtype.ext P.closed97  reduced := C.val.reduced9899theorem reconstruct_samePattern (P : Path V d m) (e : VertexLabels P) (C : ColorFibre P) :100    SamePattern P (reconstruct P e C) := by101  constructor102  · intro i j103    change P.vertex i = P.vertex j ↔ e ⟨P.vertex i,⟨i,rfl⟩⟩ = e ⟨P.vertex j,⟨j,rfl⟩⟩104    exact ⟨fun h => congrArg e (Subtype.ext h),fun h => congrArg Subtype.val (e.injective h)⟩105  · intro a b hab106    exact C.property.2.2 a b hab107108/-- Literal path-class parametrization: vertex injections times fixed-vertex colors. -/109def fibreEquiv (P : Path V d m) : Fibre P ≃ VertexLabels P × ColorFibre P where110  toFun Q := (labels Q.property, ⟨normalize P Q.val,rfl,normalize_samePattern Q.property⟩)111  invFun eC := ⟨reconstruct P eC.1 eC.2,reconstruct_samePattern P eC.1 eC.2⟩112  left_inv Q := by113    apply Subtype.ext114    apply Path.ext_data115    · funext i116      exact labels_apply Q.property i117    · rfl118  right_inv eC := by119    rcases eC with ⟨e,C⟩120    apply Prod.ext121    · apply Function.Embedding.ext122      intro v123      obtain ⟨i,hi⟩ := v.property124      have hv : v = ⟨P.vertex i,⟨i,rfl⟩⟩ := Subtype.ext hi.symm125      rw [hv,labels_apply]126      rfl127    · apply Subtype.ext128      exact Path.ext_data C.property.1.symm rfl129130/-- Exact grouped coefficient sum, since coefficients do not depend on vertex names. -/131theorem sum_fibre_colors {R : Type*} [AddCommMonoid R] (P : Path V d m)132    (f : (Fin m → Color d) → R) :133    ∑ Q : Fibre P, f Q.val.colors =134      Fintype.card (VertexLabels P) • ∑ C : ColorFibre P, f C.val.colors := by135  rw [← (fibreEquiv P).symm.sum_comp]136  simp only [Fintype.sum_prod_type, fibreEquiv, reconstruct]137  simp138139/-- The vertex factor has the exact dimension exponent, with no factorial loss. -/140theorem card_vertexLabels_le (P : Path V d m) :141    Fintype.card (VertexLabels P) ≤ Fintype.card V ^ Fintype.card (Set.range P.vertex) := by142  classical143  have h := Fintype.card_le_of_injective144    (fun e : VertexLabels P => (e : Set.range P.vertex → V)) Function.Embedding.coe_injective145  simpa only [Fintype.card_fun] using h146147end Nonadditivity.HaarPathVertexFibre