Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.HaarMomentConstants

Download original .lean · View on GitHub · Jump to source

Direct imports

  • Nonadditivity.Quantitative
  • Mathlib.Algebra.Order.BigOperators.Group.Finset dependency
  • Mathlib.Order.Interval.Finset.Nat dependency
  • Mathlib.Tactic.GCongr dependency

Imported by project modules

4 direct reverse imports

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

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

22 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.Quantitative7import Mathlib.Algebra.Order.BigOperators.Group.Finset8import Mathlib.Order.Interval.Finset.Nat9import Mathlib.Tactic.GCongr1011/-! # The tracked scalar constants in the two-generator Haar moment estimate1213These are numerical inequalities and finite-sum consequences.  No Haar14moment estimate is assumed or asserted here: the final assembly consumes15explicit bounds for each nonzero word-length contribution.16-/17noncomputable section18namespace Nonadditivity.HaarMomentConstants19open scoped BigOperators2021def alpha (p N : ℝ) : ℝ := 128 * p ^ 20 / N ^ (1 / 4 : ℝ)22def beta (p N : ℝ) : ℝ := 4096 * p ^ 38 / N2324/-- The prefactor in the unitary entry-moment estimate of BC Lemma 5.4. -/25theorem entry_prefactor_bound {r N : ℝ} (hN : 0 < N)26    (hr : 2 * r ^ (7 / 2 : ℝ) ≤ N ^ 2) :27    1 + 3 * r ^ (7 / 2 : ℝ) / N ^ 2 ≤ 5 / 2 := by28  have : 3 * r ^ (7 / 2 : ℝ) / N ^ 2 ≤ 3 / 2 := by29    apply (div_le_iff₀ (pow_pos hN 2)).230    linarith31  linarith3233/-- Two independent Haar matrices give exactly the prefactor `25/4`;34adjoint entries remain in their original independent family. -/35theorem two_entry_prefactors_bound {x y : ℝ} (hx : x ≤ 5 / 2)36    (hy0 : 0 ≤ y) (hy : y ≤ 5 / 2) : x * y ≤ 25 / 4 := by37  calc38    x * y ≤ (5 / 2) * y := mul_le_mul_of_nonneg_right hx hy039    _ ≤ (5 / 2) * (5 / 2) := mul_le_mul_of_nonneg_left hy (by norm_num)40    _ = _ := by norm_num4142theorem local_alpha_le {p N t : ℝ} (hp : 0 ≤ p) (hN : 0 ≤ N)43    (ht0 : 0 ≤ t) (ht : t ≤ p) :44    128 * t ^ 11 * p ^ 9 / N ^ (1 / 4 : ℝ) ≤ alpha p N := by45  unfold alpha46  calc47    _ ≤ 128 * p ^ 11 * p ^ 9 / N ^ (1 / 4 : ℝ) := by gcongr48    _ = _ := by ring4950theorem local_beta_le {p N t : ℝ} (hN : 0 ≤ N)51    (ht0 : 0 ≤ t) (ht : t ≤ p) :52    4096 * t ^ 20 * p ^ 18 / N ≤ beta p N := by53  unfold beta54  calc55    _ ≤ 4096 * p ^ 20 * p ^ 18 / N := by gcongr56    _ = _ := by ring5758theorem dimension_pos {p N : ℝ} (hp : 2 ≤ p)59    (hN : 2 ^ 32 * p ^ 80 ≤ N) : 0 < N := by60  have : 0 < 2 ^ 32 * p ^ 80 := by positivity61  linarith6263theorem fourth_root_lower {p N : ℝ} (hp : 2 ≤ p)64    (hN : 2 ^ 32 * p ^ 80 ≤ N) :65    256 * p ^ 20 ≤ N ^ (1 / 4 : ℝ) := by66  have hN0 := (dimension_pos hp hN).le67  apply le_of_pow_le_pow_left₀ (n := 4) (by norm_num)68    (Real.rpow_nonneg hN0 _)69  have he : (N ^ (1 / 4 : ℝ)) ^ 4 = N := by70    simpa using Real.rpow_inv_natCast_pow hN0 (by norm_num : (4 : ℕ) ≠ 0)71  rw [he]72  convert hN using 173  ring7475theorem square_root_lower {p N : ℝ} (hp : 2 ≤ p)76    (hN : 2 ^ 32 * p ^ 80 ≤ N) :77    65536 * p ^ 40 ≤ N ^ (1 / 2 : ℝ) := by78  have hN0 := (dimension_pos hp hN).le79  apply le_of_pow_le_pow_left₀ (n := 2) (by norm_num)80    (Real.rpow_nonneg hN0 _)81  have he : (N ^ (1 / 2 : ℝ)) ^ 2 = N := by82    simpa using Real.rpow_inv_natCast_pow hN0 (by norm_num : (2 : ℕ) ≠ 0)83  rw [he]84  convert hN using 185  ring8687theorem alpha_bounds {p N : ℝ} (hp : 2 ≤ p)88    (hN : 2 ^ 32 * p ^ 80 ≤ N) : 0 ≤ alpha p N ∧ alpha p N ≤ 1 / 2 := by89  have hN0 := dimension_pos hp hN90  have hr := fourth_root_lower hp hN91  unfold alpha92  constructor93  · positivity94  · apply (div_le_iff₀ (Real.rpow_pos_of_pos hN0 _)).295    linarith9697theorem beta_bounds {p N : ℝ} (hp : 2 ≤ p)98    (hN : 2 ^ 32 * p ^ 80 ≤ N) : 0 ≤ beta p N ∧ beta p N ≤ 1 / 2 := by99  have hN0 := dimension_pos hp hN100  have hpow : p ^ 38 ≤ p ^ 80 := pow_le_pow_right₀ (by linarith) (by norm_num)101  unfold beta102  constructor103  · positivity104  · apply (div_le_iff₀ hN0).2105    have hpow0 : 0 ≤ p ^ 80 := by positivity106    norm_num at hN107    nlinarith108109theorem exponential_bound {p N t : ℝ} (hp : 2 ≤ p)110    (hN : 2 ^ 32 * p ^ 80 ≤ N) (ht0 : 0 ≤ t) (ht : t ≤ p) :111    Real.exp (t ^ 2 / N ^ (1 / 4 : ℝ)) ≤ Real.exp 1 := by112  have hN0 := dimension_pos hp hN113  have hr := fourth_root_lower hp hN114  have ht2 : t ^ 2 ≤ p ^ 2 := pow_le_pow_left₀ ht0 ht _115  have hp2 : p ^ 2 ≤ p ^ 20 := pow_le_pow_right₀ (by linarith) (by norm_num)116  apply Real.exp_le_exp.mpr117  apply (div_le_iff₀ (Real.rpow_pos_of_pos hN0 _)).2118  nlinarith [show 0 ≤ p ^ 20 by positivity]119120theorem geometric_sum_bound {q : ℝ} (hq0 : 0 ≤ q) (hq : q ≤ 1 / 2) (s : ℕ) :121    (∑ i ∈ Finset.range s, q ^ i) ≤ 2 := by122  have hs : ∀ s : ℕ, (∑ i ∈ Finset.range s, q ^ i) ≤ 2 * (1 - q ^ s) := by123    intro s124    induction s with125    | zero => simp126    | succ s ih =>127        rw [Finset.sum_range_succ, pow_succ]128        nlinarith [mul_le_mul_of_nonneg_left hq (pow_nonneg hq0 s)]129  exact (hs s).trans (by nlinarith [pow_nonneg hq0 s])130131/-- The exact constant after the two geometric sums and the length sum. -/132theorem final_error_bound {p N : ℝ} (hp : 2 ≤ p)133    (hN : 2 ^ 32 * p ^ 80 ≤ N) :134    6400 * Real.exp 1 * p ^ 24 / N ≤ N ^ (-(1 / 2 : ℝ)) := by135  have hN0 := dimension_pos hp hN136  have hs := square_root_lower hp hN137  have hpow : p ^ 24 ≤ p ^ 40 := pow_le_pow_right₀ (by linarith) (by norm_num)138  have hsmall : 6400 * Real.exp 1 * p ^ 24 ≤ N ^ (1 / 2 : ℝ) := by139    have he := Real.exp_one_lt_three140    have hp0 : 0 ≤ p ^ 24 := by positivity141    have hmul := mul_le_mul_of_nonneg_right he.le hp0142    nlinarith143  have hroot : N ^ (1 / 2 : ℝ) * N ^ (1 / 2 : ℝ) = N := by144    rw [← Real.rpow_add hN0]145    norm_num146  rw [Real.rpow_neg hN0.le, ← one_div]147  apply (div_le_div_iff₀ hN0 (Real.rpow_pos_of_pos hN0 _)).2148  nlinarith [mul_le_mul_of_nonneg_right hsmall (Real.rpow_nonneg hN0.le (1 / 2 : ℝ))]149150/-- The literal scalar majorant in the proof of BC Theorem 5.1 at two151generators, with finite partial geometric sums. -/152def lengthMajorant (p N t : ℝ) (a b : ℕ) : ℝ :=153  (25 / 4) * (4 * t ^ 3) ^ 4 * p ^ 11 / N *154    Real.exp (t ^ 2 / N ^ (1 / 4 : ℝ)) *155    (∑ i ∈ Finset.range a, (alpha p N) ^ i) *156    (∑ i ∈ Finset.range b, (beta p N) ^ i)157158theorem lengthMajorant_le {p N t : ℝ} (hp : 2 ≤ p)159    (hN : 2 ^ 32 * p ^ 80 ≤ N) (ht0 : 0 ≤ t) (ht : t ≤ p) (a b : ℕ) :160    lengthMajorant p N t a b ≤ 6400 * Real.exp 1 * p ^ 11 / N * t ^ 12 := by161  have hN0 := dimension_pos hp hN162  obtain ⟨ha0, ha⟩ := alpha_bounds hp hN163  obtain ⟨hb0, hb⟩ := beta_bounds hp hN164  have hea := geometric_sum_bound ha0 ha a165  have heb := geometric_sum_bound hb0 hb b166  have he := exponential_bound hp hN ht0 ht167  unfold lengthMajorant168  calc169    _ ≤ (25 / 4) * (4 * t ^ 3) ^ 4 * p ^ 11 / N * Real.exp 1 * 2 * 2 := by170      gcongr171    _ = _ := by ring172173theorem length_sum_bound (p : ℕ) :174    (∑ t ∈ Finset.Icc 1 p, (t : ℝ) ^ 12) ≤ (p : ℝ) ^ 13 := by175  calc176    _ ≤ ∑ _t ∈ Finset.Icc 1 p, (p : ℝ) ^ 12 := by177      apply Finset.sum_le_sum178      intro t ht179      apply pow_le_pow_left₀ (by positivity)180      exact_mod_cast (Finset.mem_Icc.mp ht).2181    _ = (p : ℝ) ^ 13 := by simp [pow_succ]; ring182183/-- Conditional assembly of the path-length estimates; the supplied premise184is precisely the separate analytic/combinatorial work, not the final claim. -/185theorem sum_length_errors_le {p : ℕ} {N ρ : ℝ} (hp : 2 ≤ p)186    (hN : 2 ^ 32 * (p : ℝ) ^ 80 ≤ N) (hρ : 0 ≤ ρ)187    (D : ℕ → ℝ) (a b : ℕ → ℕ)188    (hD : ∀ t ∈ Finset.Icc 1 p,189      |D t| ≤ lengthMajorant p N t (a t) (b t) * ρ ^ p) :190    |∑ t ∈ Finset.Icc 1 p, D t| ≤ N ^ (-(1 / 2 : ℝ)) * ρ ^ p := by191  have hpr : (2 : ℝ) ≤ p := by exact_mod_cast hp192  have hN0 := dimension_pos hpr hN193  have hpoint : ∀ t ∈ Finset.Icc 1 p,194      |D t| ≤ (6400 * Real.exp 1 * (p : ℝ) ^ 11 / N * (t : ℝ) ^ 12) * ρ ^ p := by195    intro t ht196    exact (hD t ht).trans (mul_le_mul_of_nonneg_right197      (lengthMajorant_le hpr hN (by positivity)198        (by exact_mod_cast (Finset.mem_Icc.mp ht).2) (a t) (b t)) (pow_nonneg hρ p))199  calc200    _ ≤ ∑ t ∈ Finset.Icc 1 p, |D t| := Finset.abs_sum_le_sum_abs _ _201    _ ≤ ∑ t ∈ Finset.Icc 1 p,202        (6400 * Real.exp 1 * (p : ℝ) ^ 11 / N * (t : ℝ) ^ 12) * ρ ^ p :=203      Finset.sum_le_sum hpoint204    _ = (6400 * Real.exp 1 * (p : ℝ) ^ 11 / N *205        (∑ t ∈ Finset.Icc 1 p, (t : ℝ) ^ 12)) * ρ ^ p := by206      rw [← Finset.sum_mul, ← Finset.mul_sum]207    _ ≤ (6400 * Real.exp 1 * (p : ℝ) ^ 11 / N * (p : ℝ) ^ 13) * ρ ^ p := by208      gcongr209      exact length_sum_bound p210    _ = (6400 * Real.exp 1 * (p : ℝ) ^ 24 / N) * ρ ^ p := by ring211    _ ≤ _ := mul_le_mul_of_nonneg_right (final_error_bound hpr hN) (pow_nonneg hρ p)212213end Nonadditivity.HaarMomentConstants