Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.HaarPathScalarSummation

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

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

30 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarEncodingSlack78/-! # Scalar summation of the corrected two-generator path bounds910The input bounds retain their literal combinatorial factors: the coarse11class count, refinement count, coefficient cost, and Haar entry cost.12Their finite sum is bounded by the tracked prescribed-dimension majorant.13No path counting or operator estimate is postulated by this module.14-/15noncomputable section16namespace Nonadditivity.HaarMomentConstants17open scoped BigOperators1819/-- Coarse classes times refinements at singleton count `e` and vertex20deficit `r`; the graph defect is exactly `e + 2*r`. -/21def refinedClassCountMajorant (t : ℝ) (e r : ℕ) : ℝ :=22  128^(e+2*r+2) * t^(3*(e+2*r)+6) * (4*t^2)^(3*(e+2*r)+4)2324/-- The normalized entry bound times the grouped coefficient bound after25the `N^v` vertex-label count cancels `N^(t/2)`. -/26def refinedClassWeightMajorant (p N t : ℝ) (e r : ℕ) : ℝ :=27  (4/N^(r+1))*t^(e+2*r)*(t/N^(1/4:ℝ))^e * 2^e*p^(9*(e+2*r)+11)2829def localEncodingAlpha (p N t : ℝ) : ℝ :=30  16384*t^11*p^9/N^(1/4:ℝ)3132def localEncodingBeta (p N t : ℝ) : ℝ :=33  67108864*t^20*p^18/N3435theorem refinedClassCountMajorant_nonneg {t : ℝ} (ht : 0 ≤ t) (e r : ℕ) :36    0 ≤ refinedClassCountMajorant t e r := by37  unfold refinedClassCountMajorant38  positivity3940theorem refinedClassWeightMajorant_nonneg {p N t : ℝ}41    (hp : 0 ≤ p) (hN : 0 ≤ N) (ht : 0 ≤ t) (e r : ℕ) :42    0 ≤ refinedClassWeightMajorant p N t e r := by43  unfold refinedClassWeightMajorant44  positivity4546/-- Exact collection of all constants and all powers, including the47corrected extra factor `128` per important event. -/48theorem refinedClass_product_eq (p N t : ℝ) (e r : ℕ) :49    refinedClassCountMajorant t e r * refinedClassWeightMajorant p N t e r =50      (4*16384*256*t^14*p^11/N) *51        localEncodingAlpha p N t ^ e * localEncodingBeta p N t ^ r := by52  unfold refinedClassCountMajorant refinedClassWeightMajorant53    localEncodingAlpha localEncodingBeta54  have h3 : 3*(e+2*r)+6=e*3+r*6+6 := by omega55  have h4 : 3*(e+2*r)+4=e*3+r*6+4 := by omega56  have h9 : 9*(e+2*r)+11=e*9+r*18+11 := by omega57  rw [h3,h4,h9]58  rw [show (16384:ℝ)=128*4^3*2 by norm_num,59    show (67108864:ℝ)=128^2*4^6 by norm_num]60  simp only [pow_add, pow_mul, mul_pow, div_pow, pow_succ]61  ring6263theorem localEncodingAlpha_le {p N t : ℝ} (hp : 0 ≤ p)64    (hN : 0 ≤ N) (ht0 : 0 ≤ t) (ht : t ≤ p) :65    localEncodingAlpha p N t ≤ 128*alpha p N := by66  have h := mul_le_mul_of_nonneg_left (local_alpha_le hp hN ht0 ht)67    (by norm_num : (0:ℝ) ≤ 128)68  unfold localEncodingAlpha69  convert h using 1 <;> ring7071theorem localEncodingBeta_le {p N t : ℝ}72    (hN : 0 ≤ N) (ht0 : 0 ≤ t) (ht : t ≤ p) :73    localEncodingBeta p N t ≤ 16384*beta p N := by74  have h := mul_le_mul_of_nonneg_left (local_beta_le hN ht0 ht)75    (by norm_num : (0:ℝ) ≤ 16384)76  unfold localEncodingBeta77  convert h using 1 <;> ring7879/-- A single pair of graph statistics contributes one term of the two80finite geometric sums in the encoding majorant. -/81theorem refinedClass_product_le {p N t : ℝ}82    (hp : 0 ≤ p) (hN : 0 < N) (ht1 : 1 ≤ t) (ht : t ≤ p) (e r : ℕ) :83    refinedClassCountMajorant t e r * refinedClassWeightMajorant p N t e r ≤84      (16384*t^3*((25/4)*(4*t^3)^4*p^11/N*85        Real.exp (t^2/N^(1/4:ℝ)))) *86        (128*alpha p N)^e*(16384*beta p N)^r := by87  have ht0 : 0 ≤ t := by linarith88  have ha0 : 0 ≤ localEncodingAlpha p N t := by89    unfold localEncodingAlpha90    positivity91  have hb0 : 0 ≤ localEncodingBeta p N t := by92    unfold localEncodingBeta93    positivity94  have ht14 : t^14 ≤ t^15 := pow_le_pow_right₀ ht1 (by norm_num)95  have he : 1 ≤ Real.exp (t^2/N^(1/4:ℝ)) := Real.one_le_exp (by positivity)96  have hbase : 4*16384*256*t^14*p^11/N ≤97      16384*t^3*((25/4)*(4*t^3)^4*p^11/N*98        Real.exp (t^2/N^(1/4:ℝ))) := by99    calc100      _ ≤ (25/4)*16384*256*t^15*p^11/N*Real.exp (t^2/N^(1/4:ℝ)) := by101        calc102          _ ≤ (25/4)*16384*256*t^15*p^11/N := by gcongr <;> norm_num103          _ ≤ _ := le_mul_of_one_le_right (by positivity) he104      _ = _ := by ring105  rw [refinedClass_product_eq]106  have ha' : 0 ≤ 128*alpha p N := by unfold alpha; positivity107  exact mul_le_mul108    (mul_le_mul hbase (pow_le_pow_left₀ ha0 (localEncodingAlpha_le hp hN.le ht0 ht) e)109      (pow_nonneg ha0 e) (by positivity))110    (pow_le_pow_left₀ hb0 (localEncodingBeta_le hN.le ht0 ht) r)111    (pow_nonneg hb0 r) (by positivity)112113/-- Summing every admissible singleton/vertex-deficit pair yields exactly114the finite majorant required by the later error estimate. -/115theorem sum_refinedClass_products_le {p N t : ℝ}116    (hp : 0 ≤ p) (hN : 0 < N) (ht1 : 1 ≤ t) (ht : t ≤ p) (a b : ℕ) :117    (∑ e ∈ Finset.range a, ∑ r ∈ Finset.range b,118      refinedClassCountMajorant t e r * refinedClassWeightMajorant p N t e r) ≤119        encodingMajorant p N t a b := by120  calc121    _ ≤ ∑ e ∈ Finset.range a, ∑ r ∈ Finset.range b,122        (16384*t^3*((25/4)*(4*t^3)^4*p^11/N*123          Real.exp (t^2/N^(1/4:ℝ)))) *124          (128*alpha p N)^e*(16384*beta p N)^r := by125      exact Finset.sum_le_sum fun e _ => Finset.sum_le_sum fun r _ =>126        refinedClass_product_le hp hN ht1 ht e r127    _ = _ := by128      simp only [encodingMajorant, ← Finset.mul_sum, ← Finset.sum_mul]129      ring130131/-- Finite classes may be indexed by any concrete type. Their actual132singleton and vertex-deficit fibres supply the counting hypotheses. -/133theorem sum_class_weights_le_encodingMajorant {C : Type*} [DecidableEq C]134    (s : Finset C) (singleton deficit : C → ℕ) (weight : C → ℝ)135    {p N t : ℝ} (hp : 0 ≤ p) (hN : 0 < N) (ht1 : 1 ≤ t) (ht : t ≤ p)136    (a b : ℕ)137    (hstats : ∀ c ∈ s, singleton c < a ∧ deficit c < b)138    (hcard : ∀ e ∈ Finset.range a, ∀ r ∈ Finset.range b,139      ((s.filter (fun c => singleton c=e ∧ deficit c=r)).card:ℝ) ≤140        refinedClassCountMajorant t e r)141    (hweight : ∀ c ∈ s, weight c ≤142      refinedClassWeightMajorant p N t (singleton c) (deficit c)) :143    (∑ c ∈ s, weight c) ≤ encodingMajorant p N t a b := by144  classical145  have hm : ∀ c ∈ s, (singleton c,deficit c) ∈146      (Finset.range a).product (Finset.range b) := by147    intro c hc148    exact Finset.mem_product.mpr149      ⟨Finset.mem_range.mpr (hstats c hc).1, Finset.mem_range.mpr (hstats c hc).2⟩150  calc151    _ ≤ ∑ c ∈ s, refinedClassWeightMajorant p N t (singleton c) (deficit c) :=152      Finset.sum_le_sum hweight153    _ = ∑ e ∈ Finset.range a, ∑ r ∈ Finset.range b,154        ((s.filter (fun c => singleton c=e ∧ deficit c=r)).card:ℝ) *155          refinedClassWeightMajorant p N t e r := by156      have hh := Finset.sum_fiberwise_of_maps_to' hm157        (fun q : ℕ × ℕ => refinedClassWeightMajorant p N t q.1 q.2)158      rw [Finset.product_eq_sprod, Finset.sum_product] at hh159      simpa only [Finset.sum_product, Prod.mk.injEq, Finset.sum_const,160        nsmul_eq_mul] using hh.symm161    _ ≤ ∑ e ∈ Finset.range a, ∑ r ∈ Finset.range b,162        refinedClassCountMajorant t e r * refinedClassWeightMajorant p N t e r := by163      apply Finset.sum_le_sum164      intro e he165      apply Finset.sum_le_sum166      intro r hr167      exact mul_le_mul_of_nonneg_right (hcard e he r hr)168        (refinedClassWeightMajorant_nonneg hp hN.le (by linarith) e r)169    _ ≤ _ := sum_refinedClass_products_le hp hN ht1 ht a b170171/-- The same finite class sum with the common polynomial norm factor. -/172theorem sum_class_weights_le_encodingMajorant_mul {C : Type*} [DecidableEq C]173    (s : Finset C) (singleton deficit : C → ℕ) (weight : C → ℝ)174    {p N t scale : ℝ} (hp : 0 ≤ p) (hN : 0 < N)175    (ht1 : 1 ≤ t) (ht : t ≤ p) (hscale : 0 ≤ scale) (a b : ℕ)176    (hstats : ∀ c ∈ s, singleton c < a ∧ deficit c < b)177    (hcard : ∀ e ∈ Finset.range a, ∀ r ∈ Finset.range b,178      ((s.filter (fun c => singleton c=e ∧ deficit c=r)).card:ℝ) ≤179        refinedClassCountMajorant t e r)180    (hweight : ∀ c ∈ s, weight c ≤181      refinedClassWeightMajorant p N t (singleton c) (deficit c)*scale) :182    (∑ c ∈ s, weight c) ≤ encodingMajorant p N t a b*scale := by183  calc184    _ ≤ ∑ c ∈ s,185        refinedClassWeightMajorant p N t (singleton c) (deficit c)*scale :=186      Finset.sum_le_sum hweight187    _ = (∑ c ∈ s, refinedClassWeightMajorant p N t (singleton c) (deficit c))*scale :=188      (Finset.sum_mul ..).symm189    _ ≤ _ := mul_le_mul_of_nonneg_right190      (sum_class_weights_le_encodingMajorant s singleton deficit _ hp hN ht1 ht a b191        hstats hcard (fun _ _ => le_rfl)) hscale192193/-- Operator-valued grouped class sums use exactly the same scalar bound. -/194theorem norm_sum_classes_le_encodingMajorant {C E : Type*} [DecidableEq C]195    [NormedAddCommGroup E] (s : Finset C) (singleton deficit : C → ℕ) (term : C → E)196    {p N t scale : ℝ} (hp : 0 ≤ p) (hN : 0 < N)197    (ht1 : 1 ≤ t) (ht : t ≤ p) (hscale : 0 ≤ scale) (a b : ℕ)198    (hstats : ∀ c ∈ s, singleton c < a ∧ deficit c < b)199    (hcard : ∀ e ∈ Finset.range a, ∀ r ∈ Finset.range b,200      ((s.filter (fun c => singleton c=e ∧ deficit c=r)).card:ℝ) ≤201        refinedClassCountMajorant t e r)202    (hterm : ∀ c ∈ s, ‖term c‖ ≤203      refinedClassWeightMajorant p N t (singleton c) (deficit c)*scale) :204    ‖∑ c ∈ s, term c‖ ≤ encodingMajorant p N t a b*scale := by205  exact (norm_sum_le s term).trans206    (sum_class_weights_le_encodingMajorant_mul s singleton deficit (fun c => ‖term c‖)207      hp hN ht1 ht hscale a b hstats hcard hterm)208209/-- The trace normalization and vertex-label count leave precisely one210dimension denominator for each deficit and one for the normalized trace. -/211theorem vertex_dimension_cancellation {N : ℝ} (hN : N ≠ 0) (v r : ℕ) :212    (N^v/N) * (4/N^(v+r)) = 4/N^(r+1) := by213  rw [pow_add, pow_succ]214  field_simp215216theorem graph_defect_eq_singletons_add_twice_deficit217    {t v e r : ℕ} (hlen : t=2*(v+r)) :218    t+e-2*v=e+2*r := by omega219220theorem even_length_deficit_identity {t v : ℕ} (ht : Even t) (hv : v ≤ t/2) :221    t=2*(v+(t/2-v)) := by222  obtain ⟨k,hk⟩ := ht223  omega224225end Nonadditivity.HaarMomentConstants