Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.HaarEncodingSlack

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

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

14 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarMomentSlack7import Nonadditivity.HaarTensorConstants89/-! # Explicit slack for corrected two-generator path encoding1011The actual prescribed moment order satisfies the stronger dimension condition12`2^80*p^80 ≤ N`. It absorbs a factor `128` per important event and the extra13three powers of path length from the corrected event count. The combinatorial14encoding itself remains a separate theorem.15-/16noncomputable section17namespace Nonadditivity.HaarMomentConstants18open scoped BigOperators1920theorem prescribed_dimension_strong {h n : ℝ}21    (hh : (2:ℝ)/3 ≤ h) (hn : 2 ≤ n) :22    2^80 * (Quantitative.momentParameter h n:ℝ)^80 ≤23      (Quantitative.dimensionChoice h n:ℝ) := by24  obtain ⟨_,_,_,hp⟩ := Quantitative.moment_parameter_bounds hh hn25  have hD : 0 < (Quantitative.dimensionChoice h n:ℝ) :=26    (Real.exp_pos _).trans_le (Nat.le_ceil _)27  have htwop : 2*(Quantitative.momentParameter h n:ℝ) ≤28      Real.exp (Real.log (Quantitative.dimensionChoice h n:ℝ)/80) := by linarith29  have he : (Real.exp (Real.log (Quantitative.dimensionChoice h n:ℝ)/80))^80 =30      (Quantitative.dimensionChoice h n:ℝ) := by31    rw [← Real.exp_nat_mul]32    norm_num only [Nat.cast_ofNat]33    rw [show (80:ℝ)*(Real.log (Quantitative.dimensionChoice h n:ℝ)/80) =34      Real.log (Quantitative.dimensionChoice h n:ℝ) by ring, Real.exp_log hD]35  rw [← mul_pow]36  exact he ▸ pow_le_pow_left₀ (by positivity) htwop 803738theorem strong_implies_dimension {p N : ℝ} (hN : 2^80*p^80 ≤ N) :39    2^32*p^80 ≤ N := by40  exact (mul_le_mul_of_nonneg_right (by norm_num : (2:ℝ)^32 ≤ 2^80)41    (by positivity)).trans hN4243theorem strong_fourth_root_lower {p N : ℝ} (hp : 2 ≤ p) (hN : 2^80*p^80 ≤ N) :44    2^20*p^20 ≤ N^(1/4:ℝ) := by45  have hN0 := (dimension_pos hp (strong_implies_dimension hN)).le46  apply le_of_pow_le_pow_left₀ (n := 4) (by norm_num) (Real.rpow_nonneg hN0 _)47  have he : (N^(1/4:ℝ))^4=N := by48    simpa using Real.rpow_inv_natCast_pow hN0 (by norm_num : (4:ℕ) ≠ 0)49  rw [he]50  convert hN using 1; ring5152theorem strong_square_root_lower {p N : ℝ} (hp : 2 ≤ p) (hN : 2^80*p^80 ≤ N) :53    2^40*p^40 ≤ N^(1/2:ℝ) := by54  have hN0 := (dimension_pos hp (strong_implies_dimension hN)).le55  apply le_of_pow_le_pow_left₀ (n := 2) (by norm_num) (Real.rpow_nonneg hN0 _)56  have he : (N^(1/2:ℝ))^2=N := by57    simpa using Real.rpow_inv_natCast_pow hN0 (by norm_num : (2:ℕ) ≠ 0)58  rw [he]59  convert hN using 1; ring6061theorem encoding_alpha_le {p N : ℝ} (hp : 2 ≤ p) (hN : 2^80*p^80 ≤ N) :62    128*alpha p N ≤ 1/2 := by63  have hN0 := dimension_pos hp (strong_implies_dimension hN)64  have hr := strong_fourth_root_lower hp hN65  unfold alpha66  rw [← mul_div_assoc]67  apply (div_le_iff₀ (Real.rpow_pos_of_pos hN0 _)).mpr68  norm_num at hr69  nlinarith [show 0 ≤ p^20 by positivity]7071theorem encoding_beta_le {p N : ℝ} (hp : 2 ≤ p) (hN : 2^80*p^80 ≤ N) :72    16384*beta p N ≤ 1/2 := by73  have hN0 := dimension_pos hp (strong_implies_dimension hN)74  have hpow : p^38 ≤ p^80 := pow_le_pow_right₀ (by linarith) (by norm_num)75  unfold beta76  rw [← mul_div_assoc]77  apply (div_le_iff₀ hN0).mpr78  norm_num at hN79  nlinarith [show 0 ≤ p^80 by positivity]8081def encodingMajorant (p N t : ℝ) (a b : ℕ) : ℝ :=82  16384*t^3 * ((25/4)*(4*t^3)^4*p^11/N * Real.exp (t^2/N^(1/4:ℝ)) *83    (∑ i ∈ Finset.range a, (128*alpha p N)^i) *84    (∑ i ∈ Finset.range b, (16384*beta p N)^i))8586theorem encodingMajorant_le {p N t : ℝ} (hp : 2 ≤ p) (hN : 2^80*p^80 ≤ N)87    (ht0 : 0 ≤ t) (ht : t ≤ p) (a b : ℕ) :88    encodingMajorant p N t a b ≤ 16384*6400*Real.exp 1*p^11/N*t^15 := by89  have hNc := strong_implies_dimension hN90  have hN0 := dimension_pos hp hNc91  have ha0 := (alpha_bounds hp hNc).192  have hb0 := (beta_bounds hp hNc).193  have ha := geometric_sum_bound (show 0 ≤ 128*alpha p N by positivity)94    (encoding_alpha_le hp hN) a95  have hb := geometric_sum_bound (show 0 ≤ 16384*beta p N by positivity)96    (encoding_beta_le hp hN) b97  have he := exponential_bound hp hNc ht0 ht98  unfold encodingMajorant99  calc100    _ ≤ 16384*t^3 * ((25/4)*(4*t^3)^4*p^11/N * Real.exp 1 * 2 * 2) := by gcongr101    _ = _ := by ring102103theorem encoding_final_error_le {p N : ℝ} (hp : 2 ≤ p) (hN : 2^80*p^80 ≤ N) :104    16384*6400*Real.exp 1*p^27/N ≤ N^(-(1/2:ℝ)) := by105  have hN0 := dimension_pos hp (strong_implies_dimension hN)106  have hs := strong_square_root_lower hp hN107  have hpow : p^27 ≤ p^40 := pow_le_pow_right₀ (by linarith) (by norm_num)108  have he := mul_le_mul_of_nonneg_right Real.exp_one_lt_three.le109    (show 0 ≤ p^27 by positivity)110  have hsmall : 16384*6400*Real.exp 1*p^27 ≤ N^(1/2:ℝ) := by111    norm_num at hs112    nlinarith [show 0 ≤ p^27 by positivity]113  have hroot : N^(1/2:ℝ)*N^(1/2:ℝ)=N := by rw [← Real.rpow_add hN0]; norm_num114  rw [Real.rpow_neg hN0.le, ← one_div]115  apply (div_le_div_iff₀ hN0 (Real.rpow_pos_of_pos hN0 _)).mpr116  nlinarith [mul_le_mul_of_nonneg_right hsmall (Real.rpow_nonneg hN0.le (1/2:ℝ))]117118119/-- Finite summation of corrected encoding contributions preserves the exact120one-pair target error. The path-length estimates remain explicit premises. -/121theorem sum_encoding_errors_le {p : ℕ} {N ρ : ℝ}122    (hp : 2 ≤ p) (hN : 2^80*(p:ℝ)^80 ≤ N) (hρ : 0 ≤ ρ)123    (D : ℕ → ℝ) (a b : ℕ → ℕ)124    (hD : ∀ t ∈ Finset.Icc 1 p,125      |D t| ≤ encodingMajorant p N t (a t) (b t) * ρ^p) :126    |∑ t ∈ Finset.Icc 1 p, D t| ≤ N^(-(1/2:ℝ))*ρ^p := by127  have hpr : (2:ℝ) ≤ p := by exact_mod_cast hp128  have hN0 := dimension_pos hpr (strong_implies_dimension hN)129  have hpoint : ∀ t ∈ Finset.Icc 1 p,130      |D t| ≤ (16384*6400*Real.exp 1*(p:ℝ)^11/N*(t:ℝ)^15)*ρ^p := by131    intro t ht132    exact (hD t ht).trans (mul_le_mul_of_nonneg_right133      (encodingMajorant_le hpr hN (by positivity)134        (by exact_mod_cast (Finset.mem_Icc.mp ht).2) (a t) (b t)) (pow_nonneg hρ p))135  calc136    _ ≤ ∑ t ∈ Finset.Icc 1 p, |D t| := Finset.abs_sum_le_sum_abs _ _137    _ ≤ ∑ t ∈ Finset.Icc 1 p,138        (16384*6400*Real.exp 1*(p:ℝ)^11/N*(t:ℝ)^15)*ρ^p := Finset.sum_le_sum hpoint139    _ = (16384*6400*Real.exp 1*(p:ℝ)^11/N*140        (∑ t ∈ Finset.Icc 1 p, (t:ℝ)^15))*ρ^p := by141      rw [← Finset.sum_mul, ← Finset.mul_sum]142    _ ≤ (16384*6400*Real.exp 1*(p:ℝ)^11/N*(p:ℝ)^16)*ρ^p := by143      gcongr144      exact length_sum_bound_with_overhead p 3145    _ = (16384*6400*Real.exp 1*(p:ℝ)^27/N)*ρ^p := by ring146    _ ≤ _ := mul_le_mul_of_nonneg_right (encoding_final_error_le hpr hN) (pow_nonneg hρ p)147148end Nonadditivity.HaarMomentConstants