Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.HaarPathClassStats

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

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

21 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarPathRefinedCounting7import Nonadditivity.HaarOperatorPathSum8import Nonadditivity.HaarPathScalarSummation910/-! # Actual statistics and cardinalities for the nonzero refined classes -/11noncomputable section12set_option backward.isDefEq.respectTransparency false13attribute [local instance 2000] instBEqOfDecidableEq14namespace Nonadditivity.HaarPathClasses15open HaarPathGraph HaarPathMultiplicity16attribute [local instance] Classical.propDecidable17variable {V : Type*} [Fintype V] [DecidableEq V] {d m : ℕ}1819def refinedSingletonCount (C : RefinedClass V d m) : ℕ :=20  (singletonEdges (Quotient.out C).edgeList).card2122def refinedVertexCount (C : RefinedClass V d m) : ℕ :=23  (Quotient.out C).vertices.card2425def refinedVertexDeficit (C : RefinedClass V d m) : ℕ :=26  m/2-refinedVertexCount C2728theorem refinedSingletonCount_le (C : RefinedClass V d m) :29    refinedSingletonCount C ≤ m := by30  have h := Finset.card_filter_le (Quotient.out C).edgeList.toFinset31    (fun e => (Quotient.out C).edgeList.count e=1)32  have hl := List.toFinset_card_le (Quotient.out C).edgeList33  rw [(Quotient.out C).edgeList_length] at hl34  exact h.trans hl3536theorem refinedVertexDeficit_le (C : RefinedClass V d m) :37    refinedVertexDeficit C ≤ m/2 := Nat.sub_le _ _3839theorem classDefectTwice_refined_eq (C : RefinedClass V d m) (hm : 0 < m) :40    classDefectTwice hm (refinedToCoarse C)=(Quotient.out C).defectTwice := by41  have hc : (Quotient.mk pathSetoid (Quotient.out C) : PathClass V d m)=42      refinedToCoarse C := by43    rw [←refinedToCoarse_mk,Quotient.out_eq]44  rw [←hc]45  rfl4647/-- On the nonvanishing range, the integer graph defect is exactly the48singleton count plus twice the vertex deficit. -/49theorem refined_defect_identity (C : RefinedClass V d m) (hm : 0 < m)50    (ht : Even m) (hv : refinedVertexCount C ≤ m/2) :51    classDefectTwice hm (refinedToCoarse C)=52      refinedSingletonCount C+2*refinedVertexDeficit C := by53  rw [classDefectTwice_refined_eq]54  exact HaarMomentConstants.graph_defect_eq_singletons_add_twice_deficit55    (HaarMomentConstants.even_length_deficit_identity ht hv)5657end Nonadditivity.HaarPathClasses5859namespace Nonadditivity.HaarOperatorPathBridge60open HaarPathGraph HaarPathClasses HaarPathWeights HaarMomentConstants61open scoped BigOperators62attribute [local instance] Classical.propDecidable6364/-- The actual refined classes whose representative has nonzero Haar weight. -/65def activeRefinedClasses (N t : ℕ) : Finset (RefinedClass (Fin (N+1)) 2 t) :=66  Finset.univ.filter (fun C => pathWeight (Quotient.out C) ≠ 0)6768@[simp] theorem mem_activeRefinedClasses {N t : ℕ} (C : RefinedClass (Fin (N+1)) 2 t) :69    C ∈ activeRefinedClasses N t ↔ pathWeight (Quotient.out C) ≠ 0 := by70  simp [activeRefinedClasses]7172theorem active_refined_even {N t : ℕ} {C : RefinedClass (Fin (N+1)) 2 t}73    (hC : C ∈ activeRefinedClasses N t) : Even t :=74  even_length_of_integral_ne_zero (Quotient.out C) ((mem_activeRefinedClasses C).mp hC)7576theorem active_refined_vertices_le {N t : ℕ} {C : RefinedClass (Fin (N+1)) 2 t}77    (hC : C ∈ activeRefinedClasses N t) : refinedVertexCount C ≤ t/2 := by78  have hn := (mem_activeRefinedClasses C).mp hC79  exact (Quotient.out C).vertices_le_half_of_balanced80    (locallyBalanced_of_integral_ne_zero (Quotient.out C) hn)81    (active_refined_even hC)8283theorem active_refined_defect_identity {N t : ℕ} (ht : 0 < t)84    {C : RefinedClass (Fin (N+1)) 2 t} (hC : C ∈ activeRefinedClasses N t) :85    classDefectTwice ht (refinedToCoarse C)=86      refinedSingletonCount C+2*refinedVertexDeficit C :=87  refined_defect_identity C ht (active_refined_even hC) (active_refined_vertices_le hC)8889/-- The actual class statistics lie in the finite rectangle used by the90scalar geometric sums. -/91theorem active_refined_stats {N t : ℕ} {C : RefinedClass (Fin (N+1)) 2 t}92    (_hC : C ∈ activeRefinedClasses N t) :93    refinedSingletonCount C < t+1 ∧ refinedVertexDeficit C < t/2+1 := by94  exact ⟨Nat.lt_succ_of_le (refinedSingletonCount_le C),95    Nat.lt_succ_of_le (refinedVertexDeficit_le C)⟩9697/-- Actual fixed-statistic fibres inject into the counted fixed-defect98quotient, supplying the scalar summation's cardinality bound. -/99theorem card_active_refined_fibre_le {N t : ℕ} (ht : 0 < t) (e r : ℕ) :100    ((activeRefinedClasses N t).filter101      (fun C => refinedSingletonCount C=e ∧ refinedVertexDeficit C=r)).card ≤102        128^(e+2*r+2)*t^(3*(e+2*r)+6)*(4*t^2)^(3*(e+2*r)+4) := by103  apply card_refined_subfamily_le ht (e+2*r)104  intro C hC105  obtain ⟨hC,he,hr⟩ := Finset.mem_filter.mp hC106  rw [active_refined_defect_identity ht hC,he,hr]107108theorem card_active_refined_fibre_le_majorant {N t : ℕ} (ht : 0 < t) (e r : ℕ) :109    (((activeRefinedClasses N t).filter110      (fun C => refinedSingletonCount C=e ∧ refinedVertexDeficit C=r)).card:ℝ) ≤111        refinedClassCountMajorant t e r := by112  unfold refinedClassCountMajorant113  exact_mod_cast card_active_refined_fibre_le (N := N) ht e r114115/-- All hypotheses concerning class counts and statistics in the scalar116summation are now discharged for the genuine nonzero refined classes. -/117theorem norm_sum_active_refined_le {E : Type*} [NormedAddCommGroup E]118    {N t : ℕ} (ht : 0 < t) (term : RefinedClass (Fin (N+1)) 2 t → E)119    {p scale : ℝ} (hp : 0 ≤ p) (htp : (t:ℝ) ≤ p) (hscale : 0 ≤ scale)120    (hterm : ∀ C ∈ activeRefinedClasses N t, ‖term C‖ ≤121      refinedClassWeightMajorant p (N+1) t (refinedSingletonCount C)122        (refinedVertexDeficit C)*scale) :123    ‖∑ C ∈ activeRefinedClasses N t, term C‖ ≤124      encodingMajorant p (N+1) t (t+1) (t/2+1)*scale := by125  apply norm_sum_classes_le_encodingMajorant (activeRefinedClasses N t)126    refinedSingletonCount refinedVertexDeficit term hp (by positivity)127    (by exact_mod_cast ht) htp hscale (t+1) (t/2+1)128  · intro C hC129    exact active_refined_stats hC130  · intro e _ r _131    exact card_active_refined_fibre_le_majorant ht e r132  · exact hterm133134/-- Moment-sized rectangle, matching `OnePairLengthBounds` exactly. -/135theorem norm_sum_active_refined_le_moment {E : Type*} [NormedAddCommGroup E]136    {N p t : ℕ} (ht : 0 < t) (htp : t ≤ p)137    (term : RefinedClass (Fin (N+1)) 2 t → E)138    {scale : ℝ} (hscale : 0 ≤ scale)139    (hterm : ∀ C ∈ activeRefinedClasses N t, ‖term C‖ ≤140      refinedClassWeightMajorant p (N+1) t (refinedSingletonCount C)141        (refinedVertexDeficit C)*scale) :142    ‖∑ C ∈ activeRefinedClasses N t, term C‖ ≤143      encodingMajorant p (N+1) t (p+1) (p+1)*scale := by144  apply norm_sum_classes_le_encodingMajorant (activeRefinedClasses N t)145    refinedSingletonCount refinedVertexDeficit term (by positivity) (by positivity)146    (by exact_mod_cast ht) (by exact_mod_cast htp) hscale (p+1) (p+1)147  · intro C hC148    have hs := active_refined_stats hC149    have hh := Nat.div_le_self t 2150    omega151  · intro e _ r _152    exact card_active_refined_fibre_le_majorant ht e r153  · exact hterm154155end Nonadditivity.HaarOperatorPathBridge