Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.GaussianCertificates

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

Direct imports

Imported by project modules

2 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

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

3 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.GaussianQuadratic78/-! # A concrete Gaussian union budget for the one-block construction910All probability estimates are derived in `GaussianQuadratic`. This file fixes11explicit constants for combining the isometry and observable tests.12-/1314noncomputable section1516open MeasureTheory ProbabilityTheory Real17open scoped BigOperators1819namespace Nonadditivity.GaussianCertificates2021/-- The two finite nets fit inside the proved Gaussian probability budget. -/22theorem net_budget_lt_one (K N : ℕ) (hK : 4096 ≤ K) (hN : K ^ 2 ≤ N) :23    2 * (9 : ℝ) ^ (2 * N) * exp (-(K : ℝ) * N / 128) +24      2 * ((5 : ℝ) ^ (K ^ 2) * (9 : ℝ) ^ (2 * N)) *25        exp (-(63 / 2 : ℝ) * N) < 1 := by26  have hKr : (4096 : ℝ) ≤ K := by exact_mod_cast hK27  have hNr : (K : ℝ) ^ 2 ≤ N := by exact_mod_cast hN28  have hNpos : (1 : ℝ) ≤ N := by nlinarith29  have h9 : (9 : ℝ) ≤ exp 8 := by linarith [add_one_le_exp (8 : ℝ)]30  have h5 : (5 : ℝ) ≤ exp 4 := by linarith [add_one_le_exp (4 : ℝ)]31  have hp9 : (9 : ℝ) ^ (2 * N) ≤ exp (16 * N) := by32    calc33      _ ≤ (exp 8) ^ (2 * N) := pow_le_pow_left₀ (by norm_num) h9 _34      _ = _ := by rw [← exp_nat_mul]; congr 1; push_cast; ring35  have hp5 : (5 : ℝ) ^ (K ^ 2) ≤ exp (4 * N) := by36    calc37      _ ≤ (exp 4) ^ (K ^ 2) := pow_le_pow_left₀ (by norm_num) h5 _38      _ = exp (4 * (K : ℝ) ^ 2) := by rw [← exp_nat_mul]; congr 1; push_cast; ring39      _ ≤ _ := exp_le_exp.mpr (by nlinarith)40  have hfirst : 2 * (9 : ℝ) ^ (2 * N) * exp (-(K : ℝ) * N / 128) ≤41      2 * exp (-10 * N) := by42    calc43      _ ≤ 2 * exp (16 * N) * exp (-(K : ℝ) * N / 128) := by gcongr44      _ = 2 * exp (16 * N - (K : ℝ) * N / 128) := by45        rw [mul_assoc, ← exp_add]46        congr 247        ring48      _ ≤ _ := by49        gcongr50        nlinarith [mul_nonneg (by linarith : 0 ≤ (K : ℝ) - 4096) (by positivity : 0 ≤ (N : ℝ))]51  have hsecond : 2 * ((5 : ℝ) ^ (K ^ 2) * (9 : ℝ) ^ (2 * N)) *52      exp (-(63 / 2 : ℝ) * N) ≤ 2 * exp (-10 * N) := by53    calc54      _ ≤ 2 * (exp (4 * N) * exp (16 * N)) * exp (-(63 / 2 : ℝ) * N) := by gcongr55      _ = 2 * exp (-(23 / 2 : ℝ) * N) := by56        rw [mul_assoc, mul_assoc, ← exp_add, ← exp_add]57        congr 258        ring59      _ ≤ _ := by gcongr; linarith60  have hlast : 4 * exp (-10 * (N : ℝ)) < 1 := by61    rw [show -10 * (N : ℝ) = -(10 * N) by ring, exp_neg]62    apply (mul_inv_lt_iff₀ (exp_pos _)).mpr63    linarith [add_one_le_exp (10 * (N : ℝ))]64  linarith65666768/-- A concrete Gaussian sample simultaneously passes the two net families.69The premises are only deterministic norm, trace, and cardinality inequalities. -/70theorem exists_isometry_and_observable_tests71    {E J₀ J₁ : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]72    [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E]73    [Fintype J₀] [Fintype J₁]74    (K N : ℕ) (hK : 4096 ≤ K) (hN : K ^ 2 ≤ N)75    (T₀ : J₀ → E →L[ℝ] E) (T₁ : J₁ → E →L[ℝ] E)76    (hT₀ : ∀ j, (T₀ j).toLinearMap.IsSymmetric)77    (hT₁ : ∀ j, (T₁ j).toLinearMap.IsSymmetric)78    (hnorm₀ : ∀ j, (2 * (K : ℝ) * N) * ‖T₀ j‖ ≤ 1)79    (hnorm₁ : ∀ j, (2 * (K : ℝ) * N) * ‖T₁ j‖ ≤ 1)80    (hvar₀ : ∀ j, (2 * (K : ℝ) * N) *81      ((T₀ j).toLinearMap * (T₀ j).toLinearMap).trace ℝ E ≤ 1)82    (hvar₁ : ∀ j, (2 * (K : ℝ) ^ 2 * N) *83      ((T₁ j).toLinearMap * (T₁ j).toLinearMap).trace ℝ E ≤ 1)84    (hcard₀ : (Fintype.card J₀ : ℝ) ≤ (9 : ℝ) ^ (2 * N))85    (hcard₁ : (Fintype.card J₁ : ℝ) ≤ (5 : ℝ) ^ (K ^ 2) * (9 : ℝ) ^ (2 * N)) :86    ∃ z : E,87      (∀ j, |inner ℝ (T₀ j z) z - (T₀ j).toLinearMap.trace ℝ E| < 1 / 4) ∧88      (∀ j, |inner ℝ (T₁ j z) z - (T₁ j).toLinearMap.trace ℝ E| < 64 / K) := by89  have hKpos : (0 : ℝ) < K := by exact_mod_cast (by omega : 0 < K)90  have hNpos : (0 : ℝ) < N := by91    have : 0 < N := lt_of_lt_of_le (pow_pos (by omega : 0 < K) _) hN92    exact_mod_cast this93  let T : J₀ ⊕ J₁ → E →L[ℝ] E := Sum.elim T₀ T₁94  let s : J₀ ⊕ J₁ → ℝ := Sum.elim (fun _ => (K : ℝ) * N / 16) (fun _ => (K : ℝ) * N / 2)95  let t : J₀ ⊕ J₁ → ℝ := Sum.elim (fun _ => 1 / 4) (fun _ => 64 / (K : ℝ))96  have hsym (j) : (T j).toLinearMap.IsSymmetric := by97    cases j with98    | inl j => exact hT₀ j99    | inr j => exact hT₁ j100  have hsmall (j) : s j * ‖T j‖ ≤ 1 / 4 := by101    cases j with102    | inl j => dsimp [s, T]; nlinarith [hnorm₀ j]103    | inr j => dsimp [s, T]; nlinarith [hnorm₁ j]104  have hb₀ (j : J₀) : -(K : ℝ) * N / 16 * (1 / 4) +105      4 * ((K : ℝ) * N / 16) ^ 2 *106        ((T₀ j).toLinearMap * (T₀ j).toLinearMap).trace ℝ E ≤ -(K : ℝ) * N / 128 := by107    have hv := mul_le_mul_of_nonneg_left (hvar₀ j)108      (show 0 ≤ (K : ℝ) * N / 128 by positivity)109    nlinarith110  have hb₁ (j : J₁) : -((K : ℝ) * N / 2) * (64 / (K : ℝ)) +111      4 * ((K : ℝ) * N / 2) ^ 2 *112        ((T₁ j).toLinearMap * (T₁ j).toLinearMap).trace ℝ E ≤ -(63 / 2 : ℝ) * N := by113    have hv := mul_le_mul_of_nonneg_left (hvar₁ j) (show 0 ≤ (N : ℝ) / 2 by positivity)114    have hcancel : -((K : ℝ) * N / 2) * (64 / (K : ℝ)) = -32 * N := by115      field_simp116      ring117    rw [hcancel]118    nlinarith119  have hbudget : (∑ j, 2 * exp (-s j * t j +120      4 * s j ^ 2 * ((T j).toLinearMap * (T j).toLinearMap).trace ℝ E)) < 1 := by121    calc122      _ ≤ (∑ _ : J₀, 2 * exp (-(K : ℝ) * N / 128)) +123          ∑ _ : J₁, 2 * exp (-(63 / 2 : ℝ) * N) := by124        rw [Fintype.sum_sum_type]125        apply add_le_add126        · apply Finset.sum_le_sum127          intro j _128          dsimp [s, t, T]129          gcongr130          convert hb₀ j using 1; ring131        · apply Finset.sum_le_sum132          intro j _133          dsimp [s, t, T]134          gcongr135          exact hb₁ j136      _ ≤ 2 * (9 : ℝ) ^ (2 * N) * exp (-(K : ℝ) * N / 128) +137          2 * ((5 : ℝ) ^ (K ^ 2) * (9 : ℝ) ^ (2 * N)) * exp (-(63 / 2 : ℝ) * N) := by138        simp only [Finset.sum_const, Finset.card_univ, nsmul_eq_mul]139        calc140          _ ≤ ((9 : ℝ) ^ (2 * N)) * (2 * exp (-(K : ℝ) * N / 128)) +141              ((5 : ℝ) ^ (K ^ 2) * (9 : ℝ) ^ (2 * N)) * (2 * exp (-(63 / 2 : ℝ) * N)) := by142            gcongr143          _ = _ := by ring144      _ < 1 := net_budget_lt_one K N hK hN145  obtain ⟨z, hz⟩ := GaussianQuadratic.exists_simultaneous_quadratic_bounds T hsym s t146    (fun j => by cases j <;> dsimp [s] <;> positivity) hsmall hbudget147  exact ⟨z, fun j => hz (.inl j), fun j => hz (.inr j)⟩148149end Nonadditivity.GaussianCertificates