Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.HaarPathChainCount

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

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

12 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarPathChains7import Nonadditivity.HaarPathInvolution89/-! # Exact incidence budget for core chains -/10noncomputable section11namespace Nonadditivity.HaarPathGraph.Path12open scoped BigOperators13variable {V : Type*} [DecidableEq V] {d m : ℕ} (P : Path V d m)1415instance coreChainDecidableEq : DecidableEq P.CoreChain := Classical.decEq _1617theorem card_coreDarts_eq_sum :18    P.coreDarts.card = ∑ v ∈ P.coreVertices, P.degree v := by19  exact (Finset.sum_card_fiberwise_eq_card_filter P.darts P.coreVertices source).symm2021/-- The incidences at core vertices account for exactly twice the Euler22core-edge budget. Internal vertices each consume exactly two incidences. -/23theorem card_coreDarts_eq_twice_budget : P.coreDarts.card = 2*P.coreEdgeBudget := by24  have hfilter : (P.vertices.filter fun v => v ∈ P.coreVertices) = P.coreVertices :=25    Finset.filter_mem_eq_inter.trans (Finset.inter_eq_right.mpr (Finset.filter_subset _ _))26  have hdeg (v : V) (hv : v ∈ P.vertices.filter (fun v => v ∉ P.coreVertices)) :27      P.degree v=2 := by28    by_contra h29    have hmem := (Finset.mem_filter.mp hv).130    have hnot := (Finset.mem_filter.mp hv).231    exact hnot (Finset.mem_filter.mpr ⟨hmem,Or.inr h⟩)32  have hs := Finset.sum_filter_add_sum_filter_not P.vertices33    (fun v => v ∈ P.coreVertices) P.degree34  have hcards := Finset.card_filter_add_card_filter_not (s := P.vertices)35    (fun v => v ∈ P.coreVertices)36  rw [hfilter,←P.card_coreDarts_eq_sum,P.sum_degrees] at hs37  rw [Finset.sum_congr rfl hdeg] at hs38  simp only [Finset.sum_const,smul_eq_mul] at hs39  rw [hfilter] at hcards40  have hv := P.vertices_le_edges41  dsimp [coreEdgeBudget]42  omega4344/-- There are at most twice the Euler budget oriented maximal chains. -/45theorem card_coreChain_le_twice_budget : Fintype.card P.CoreChain ≤ 2*P.coreEdgeBudget := by46  simpa only [P.card_coreDarts_eq_twice_budget] using P.card_coreChain_le_coreDarts4748/-- Actual core chains with the two orientations identified. -/49def unorientedChains : Finset (Finset P.CoreChain) :=50  HaarPathInvolution.pairs P.coreChainReverse5152/-- The number of actual compressed chains has the BC Euler budget. This53uses first-dart reconstruction and the proved free orientation reversal. -/54theorem card_unorientedChains_le_budget : P.unorientedChains.card ≤ P.coreEdgeBudget := by55  have hp := HaarPathInvolution.twice_card_pairs P.coreChainReverse_involutive56    P.coreChainReverse_ne_self57  have hc := P.card_coreChain_le_twice_budget58  change 2*P.unorientedChains.card = _ at hp59  omega6061/-- Core-chain count in the exact exponent form of BC Lemma 5.8. -/62theorem twice_card_unorientedChains_le_defect :63    2*P.unorientedChains.card ≤ 3*P.defectTwice+4 := by64  have hb := P.card_unorientedChains_le_budget65  have hd := P.twice_coreEdgeBudget_le66  omega6768/-- Assigning realizable bounded-length profiles to the actual unoriented69core chains costs at most the profile factor in BC Lemma 5.8. -/70theorem card_chainProfileAssignments_le (hm : 0 < m) (hd : 0 < d) :71    Fintype.card (P.unorientedChains → HaarPathProfiles.BoundedProfile72      (HaarPathProfiles.Color d) m) ≤73      (2*d*m^d)^(3*P.defectTwice+4) := by74  rw [Fintype.card_fun,Fintype.card_coe]75  have hp := HaarPathProfiles.card_signedProfile_le d m76  calc77    _ ≤ ((2*d*m^d)^2)^P.unorientedChains.card := Nat.pow_le_pow_left hp _78    _ = (2*d*m^d)^(2*P.unorientedChains.card) := (pow_mul _ _ _).symm79    _ ≤ _ := Nat.pow_le_pow_right (by positivity) P.twice_card_unorientedChains_le_defect8081end Nonadditivity.HaarPathGraph.Path