Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.Net

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

Direct imports

  • Mathlib.Analysis.Normed.Module.FiniteDimension dependency
  • Mathlib.Data.Real.Sqrt dependency
  • Mathlib.MeasureTheory.Measure.Typeclasses.Probability dependency
  • Mathlib.Tactic.Abel dependency
  • Mathlib.Tactic.FieldSimp dependency
  • Mathlib.Tactic.Linarith dependency
  • Mathlib.Tactic.Positivity dependency
  • Mathlib.Tactic.Ring dependency

Imported by project modules

6 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

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

47 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Mathlib.Analysis.Normed.Module.FiniteDimension7import Mathlib.Data.Real.Sqrt8import Mathlib.MeasureTheory.Measure.Typeclasses.Probability9import Mathlib.Tactic.Abel10import Mathlib.Tactic.FieldSimp11import Mathlib.Tactic.Linarith12import Mathlib.Tactic.Positivity13import Mathlib.Tactic.Ring1415/-!16# Finite observable tests and the uniform norm certificate1718The traceless Hermitian matrices with Hilbert--Schmidt norm form a real19finite dimensional normed space.  The results below apply to this space20without replacing a linear operator by a table of scalar bounds.2122The external Collins--Youn and random-matrix convergence theorems are23represented by explicit bound and convergence hypotheses. They are not24declared as axioms or treated as results proved by this file.25-/2627namespace Nonadditivity2829open Metric3031section FiniteNet3233variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]34  [NormedAddCommGroup F] [NormedSpace ℝ F]3536/-- A finite set of tests approximating every unit vector. -/37def UnitSphereNet (tests : Finset E) (δ : ℝ) : Prop :=38  ∀ x : E, ‖x‖ = 1 → ∃ y ∈ tests, dist x y ≤ δ3940/-- Compactness supplies finite unit-vector tests independently of any map. -/41theorem exists_unitSphereNet [FiniteDimensional ℝ E] {δ : ℝ} (hδ : 0 < δ) :42    ∃ tests : Finset E,43      (∀ y ∈ tests, ‖y‖ = 1) ∧ UnitSphereNet tests δ := by44  classical45  obtain ⟨s, hsphere, hs, hcover⟩ := (isCompact_sphere (0 : E) 1).finite_cover_balls hδ46  refine ⟨hs.toFinset, ?_, ?_⟩47  · intro y hy48    have := hsphere (hs.mem_toFinset.mp hy)49    simpa [Metric.mem_sphere, dist_zero_right] using this50  · intro x hx51    have hxmem : x ∈ sphere (0 : E) 1 := by simpa [Metric.mem_sphere, dist_zero_right]52    obtain ⟨y, hy, hxy⟩ := Set.mem_iUnion₂.mp (hcover hxmem)53    exact ⟨y, hs.mem_toFinset.mpr hy, le_of_lt hxy⟩5455/-- The central net argument: finite test bounds control the actual operator norm.56The estimate is valid in arbitrary real normed spaces once a net is given. -/57theorem opNorm_le_of_unitSphereNet (T : E →L[ℝ] F) {tests : Finset E} {δ B : ℝ}58    (hδnonneg : 0 ≤ δ) (hδ : δ < 1) (hB : 0 ≤ B)59    (hnet : UnitSphereNet tests δ) (htests : ∀ y ∈ tests, ‖T y‖ ≤ B) :60    ‖T‖ ≤ B / (1 - δ) := by61  have hunit : ‖T‖ ≤ B + δ * ‖T‖ := by62    apply ContinuousLinearMap.opNorm_le_of_unit_norm63      (add_nonneg hB (mul_nonneg hδnonneg (norm_nonneg T)))64    intro x hx65    obtain ⟨y, hy, hxy⟩ := hnet x hx66    calc67      ‖T x‖ = ‖T y + T (x - y)‖ := by rw [map_sub]; congr 1; abel68      _ ≤ ‖T y‖ + ‖T (x - y)‖ := norm_add_le _ _69      _ ≤ B + ‖T‖ * ‖x - y‖ := add_le_add (htests y hy) (T.le_opNorm _)70      _ ≤ B + ‖T‖ * δ := add_le_add (le_refl B)71        (mul_le_mul_of_nonneg_left (by simpa [dist_eq_norm] using hxy) (norm_nonneg T))72      _ = B + δ * ‖T‖ := by ring73  apply (le_div_iff₀ (by linarith : 0 < 1 - δ)).mpr74  nlinarith7576/-- Homogeneous form of the finite-test certificate. -/77theorem norm_apply_le_of_unitSphereNet (T : E →L[ℝ] F) {tests : Finset E} {δ B : ℝ}78    (hδnonneg : 0 ≤ δ) (hδ : δ < 1) (hB : 0 ≤ B)79    (hnet : UnitSphereNet tests δ) (htests : ∀ y ∈ tests, ‖T y‖ ≤ B) (x : E) :80    ‖T x‖ ≤ (B / (1 - δ)) * ‖x‖ :=81  (T.le_opNorm x).trans (mul_le_mul_of_nonneg_right82    (opNorm_le_of_unitSphereNet T hδnonneg hδ hB hnet htests) (norm_nonneg x))8384/-- The paper's choice of net radius gives exactly the prescribed loss κ. -/85theorem kappa_net_certificate (T : E →L[ℝ] F) {tests : Finset E} {κ c : ℝ}86    (hκ : 1 < κ) (hc : 0 ≤ c)87    (hnet : UnitSphereNet tests ((κ - 1) / (κ + 1)))88    (htests : ∀ y ∈ tests, ‖T y‖ ≤ (1 + (κ - 1) / (κ + 1)) * c) (x : E) :89    ‖T x‖ ≤ κ * c * ‖x‖ := by90  have hden : 0 < κ + 1 := by linarith91  have hδ0 : 0 ≤ (κ - 1) / (κ + 1) := div_nonneg (by linarith) (le_of_lt hden)92  have hδ1 : (κ - 1) / (κ + 1) < 1 := by93    apply (div_lt_one hden).mpr94    linarith95  have hidentity :96      ((1 + (κ - 1) / (κ + 1)) * c) / (1 - (κ - 1) / (κ + 1)) = κ * c := by97    field_simp98    ring99  simpa [hidentity] using norm_apply_le_of_unitSphereNet T hδ0 hδ1100    (mul_nonneg (by linarith) hc) hnet htests x101102/-- The explicit appendix uses radius `1/n`, giving loss `(n+1)/(n-1)`. -/103theorem inverse_n_net_certificate (T : E →L[ℝ] F) {tests : Finset E} {n c : ℝ}104    (hn : 1 < n) (hc : 0 ≤ c) (hnet : UnitSphereNet tests (1 / n))105    (htests : ∀ y ∈ tests, ‖T y‖ ≤ (1 + 1 / n) * c) (x : E) :106    ‖T x‖ ≤ ((n + 1) / (n - 1)) * c * ‖x‖ := by107  have hn0 : 0 < n := by linarith108  have hδ0 : 0 ≤ 1 / n := by positivity109  have hδ1 : 1 / n < 1 := (div_lt_one hn0).mpr hn110  have hidentity : ((1 + 1 / n) * c) / (1 - 1 / n) = ((n + 1) / (n - 1)) * c := by111    field_simp112  have h := norm_apply_le_of_unitSphereNet T hδ0 hδ1113    (mul_nonneg (by linarith) hc) hnet htests x114  rw [hidentity] at h115  exact h116117/-- Prescribed tests can be included before a map or random matrices are chosen. -/118theorem exists_unitSphereNet_containing [FiniteDimensional ℝ E]119    (seeds : Finset E) (hseeds : ∀ y ∈ seeds, ‖y‖ = 1) {δ : ℝ} (hδ : 0 < δ) :120    ∃ tests : Finset E, seeds ⊆ tests ∧121      (∀ y ∈ tests, ‖y‖ = 1) ∧ UnitSphereNet tests δ := by122  classical123  obtain ⟨tests, htests, hnet⟩ := exists_unitSphereNet (E := E) hδ124  refine ⟨seeds ∪ tests, Finset.subset_union_left, ?_, ?_⟩125  · intro y hy126    rcases Finset.mem_union.mp hy with h | h127    · exact hseeds y h128    · exact htests y h129  · intro x hx130    obtain ⟨y, hy, hxy⟩ := hnet x hx131    exact ⟨y, Finset.mem_union_right seeds hy, hxy⟩132133/-- The appendix needs tests closed under negation, including its chosen test.134Symmetrizing a compactness net preserves its radius.  This theorem does not135claim the appendix's sharper volume estimate for a maximal separated net. -/136theorem exists_symmetric_unitSphereNet_containing [FiniteDimensional ℝ E]137    (seeds : Finset E) (hseeds : ∀ y ∈ seeds, ‖y‖ = 1) {δ : ℝ} (hδ : 0 < δ) :138    ∃ tests : Finset E, seeds ⊆ tests ∧139      (∀ y ∈ tests, ‖y‖ = 1) ∧140      (∀ y ∈ tests, -y ∈ tests) ∧ UnitSphereNet tests δ := by141  classical142  obtain ⟨tests, hseedsmem, htests, hnet⟩ :=143    exists_unitSphereNet_containing seeds hseeds hδ144  refine ⟨tests ∪ tests.image (- ·), hseedsmem.trans Finset.subset_union_left, ?_, ?_, ?_⟩145  · intro y hy146    rcases Finset.mem_union.mp hy with hy | hy147    · exact htests y hy148    · obtain ⟨z, hz, rfl⟩ := Finset.mem_image.mp hy149      simpa only [norm_neg] using htests z hz150  · intro y hy151    rcases Finset.mem_union.mp hy with hy | hy152    · exact Finset.mem_union_right _ (Finset.mem_image.mpr ⟨y, hy, rfl⟩)153    · obtain ⟨z, hz, rfl⟩ := Finset.mem_image.mp hy154      simpa only [neg_neg] using Finset.mem_union_left (tests.image (- ·)) hz155  · intro x hx156    obtain ⟨y, hy, hxy⟩ := hnet x hx157    exact ⟨y, Finset.mem_union_left _ hy, hxy⟩158159/-- The finite union bound selects an actual sampled map satisfying every160test. Independence is unnecessary for this step. The failure probabilities161are the precise input supplied by convergence in probability. -/162theorem exists_norm_certificate_of_failure_sum_lt_one163    {Ω : Type*} [MeasurableSpace Ω] (μ : MeasureTheory.Measure Ω)164    [MeasureTheory.IsProbabilityMeasure μ] (T : Ω → E →L[ℝ] F)165    {tests : Finset E} {δ B : ℝ}166    (hδnonneg : 0 ≤ δ) (hδ : δ < 1) (hB : 0 ≤ B)167    (hnet : UnitSphereNet tests δ)168    (hfailure : ∑ y ∈ tests, μ {ω | B < ‖T ω y‖} < 1) :169    ∃ ω, ‖T ω‖ ≤ B / (1 - δ) ∧170      ∀ x : E, ‖T ω x‖ ≤ (B / (1 - δ)) * ‖x‖ := by171  classical172  let failures : Set Ω := ⋃ y ∈ tests, {ω | B < ‖T ω y‖}173  have hmeasure : μ failures < 1 :=174    (MeasureTheory.measure_biUnion_finset_le tests (fun y => {ω | B < ‖T ω y‖})).trans_lt hfailure175  have hproper : failures ≠ Set.univ := by176    intro heq177    rw [heq, MeasureTheory.measure_univ] at hmeasure178    exact lt_irrefl _ hmeasure179  obtain ⟨ω, hω⟩ := (Set.ne_univ_iff_exists_notMem failures).mp hproper180  have htests : ∀ y ∈ tests, ‖T ω y‖ ≤ B := by181    intro y hy182    apply le_of_not_gt183    intro hbad184    exact hω (Set.mem_iUnion₂.mpr ⟨y, hy, hbad⟩)185  exact ⟨ω, opNorm_le_of_unitSphereNet (T ω) hδnonneg hδ hB hnet htests,186    norm_apply_le_of_unitSphereNet (T ω) hδnonneg hδ hB hnet htests⟩187188/-- Finitely many test failure probabilities tending to zero yield eventual189existence of a uniform certificate. The probability spaces may change with190the index, as the Haar unitary spaces do when their dimension increases. -/191theorem eventually_exists_norm_certificate_of_test_failures192    {ι : Type*} {Ω : ι → Type*} [∀ i, MeasurableSpace (Ω i)]193    {G : ι → Type*} [∀ i, NormedAddCommGroup (G i)] [∀ i, NormedSpace ℝ (G i)]194    (μ : (i : ι) → MeasureTheory.Measure (Ω i))195    [∀ i, MeasureTheory.IsProbabilityMeasure (μ i)]196    (T : (i : ι) → Ω i → E →L[ℝ] G i) (l : Filter ι)197    {tests : Finset E} {δ B : ℝ}198    (hδnonneg : 0 ≤ δ) (hδ : δ < 1) (hB : 0 ≤ B)199    (hnet : UnitSphereNet tests δ)200    (hfailure : ∀ y ∈ tests, Filter.Tendsto201      (fun i => μ i {ω | B < ‖T i ω y‖}) l (nhds 0)) :202    Filter.Eventually (fun i => ∃ ω, ‖T i ω‖ ≤ B / (1 - δ) ∧203      ∀ x : E, ‖T i ω x‖ ≤ (B / (1 - δ)) * ‖x‖) l := by204  have hsum : Filter.Tendsto205      (fun i => ∑ y ∈ tests, μ i {ω | B < ‖T i ω y‖}) l (nhds 0) := by206    simpa only [Finset.sum_const_zero] using207      tendsto_finset_sum tests (fun y hy => hfailure y hy)208  have hsmall := hsum.eventually_lt_const (by simp : (0 : ENNReal) < 1)209  exact hsmall.mono fun i hi =>210    exists_norm_certificate_of_failure_sum_lt_one (μ i) (T i)211      hδnonneg hδ hB hnet hi212213/-- Norm convergence in probability on the fixed finite tests gives the214failure-probability premise of the preceding theorem. This is the tail215formulation of convergence in probability, valid for changing sample spaces. -/216theorem eventually_exists_norm_certificate_of_norm_convergence217    {ι : Type*} {Ω : ι → Type*} [∀ i, MeasurableSpace (Ω i)]218    {G : ι → Type*} [∀ i, NormedAddCommGroup (G i)] [∀ i, NormedSpace ℝ (G i)]219    (μ : (i : ι) → MeasureTheory.Measure (Ω i))220    [∀ i, MeasureTheory.IsProbabilityMeasure (μ i)]221    (T : (i : ι) → Ω i → E →L[ℝ] G i) (l : Filter ι)222    (limitNorm : E → ℝ) {tests : Finset E} {δ B c : ℝ}223    (hδnonneg : 0 ≤ δ) (hδ : δ < 1) (hB : 0 ≤ B) (hcB : c < B)224    (hnet : UnitSphereNet tests δ) (hlimit : ∀ y ∈ tests, limitNorm y ≤ c)225    (hconvergence : ∀ y ∈ tests, ∀ ε : ℝ, 0 < ε → Filter.Tendsto226      (fun i => μ i {ω | ε ≤ |‖T i ω y‖ - limitNorm y|}) l (nhds 0)) :227    Filter.Eventually (fun i => ∃ ω, ‖T i ω‖ ≤ B / (1 - δ) ∧228      ∀ x : E, ‖T i ω x‖ ≤ (B / (1 - δ)) * ‖x‖) l := by229  apply eventually_exists_norm_certificate_of_test_failures μ T l hδnonneg hδ hB hnet230  intro y hy231  have htail := hconvergence y hy (B - c) (sub_pos.mpr hcB)232  refine tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds htail233    (fun _ => zero_le _) ?_234  intro i235  apply MeasureTheory.measure_mono236  intro ω hω237  have hnorm : B < ‖T i ω y‖ := hω238  have hlim := hlimit y hy239  have habs := le_abs_self (‖T i ω y‖ - limitNorm y)240  change B - c ≤ |‖T i ω y‖ - limitNorm y|241  linarith242243/-- The full finite-dimensional net argument in Lemma `cy`, conditional only244on the free unit-sphere bound and the stated strong-convergence input.245All nets, finite probability unions, random realizations, and the uniform246extension are constructed in the proof. -/247theorem eventually_exists_kappa_norm_certificate [FiniteDimensional ℝ E]248    {ι : Type*} {Ω : ι → Type*} [∀ i, MeasurableSpace (Ω i)]249    {G : ι → Type*} [∀ i, NormedAddCommGroup (G i)] [∀ i, NormedSpace ℝ (G i)]250    (μ : (i : ι) → MeasureTheory.Measure (Ω i))251    [∀ i, MeasureTheory.IsProbabilityMeasure (μ i)]252    (T : (i : ι) → Ω i → E →L[ℝ] G i) (l : Filter ι)253    (limitNorm : E → ℝ) {κ c : ℝ} (hκ : 1 < κ) (hc : 0 < c)254    (hlimit : ∀ y, ‖y‖ = 1 → limitNorm y ≤ c)255    (hconvergence : ∀ y, ‖y‖ = 1 → ∀ ε : ℝ, 0 < ε → Filter.Tendsto256      (fun i => μ i {ω | ε ≤ |‖T i ω y‖ - limitNorm y|}) l (nhds 0)) :257    Filter.Eventually (fun i => ∃ ω, ∀ x : E, ‖T i ω x‖ ≤ κ * c * ‖x‖) l := by258  have hden : 0 < κ + 1 := by linarith259  have hξpos : 0 < (κ - 1) / (κ + 1) := div_pos (by linarith) hden260  have hξlt : (κ - 1) / (κ + 1) < 1 := by261    apply (div_lt_one hden).mpr262    linarith263  obtain ⟨tests, hunit, hnet⟩ := exists_unitSphereNet (E := E) hξpos264  have hBpos : 0 < (1 + (κ - 1) / (κ + 1)) * c :=265    mul_pos (by linarith) hc266  have hcB : c < (1 + (κ - 1) / (κ + 1)) * c := by267    have := mul_pos hξpos hc268    nlinarith269  have hcertificate := eventually_exists_norm_certificate_of_norm_convergence μ T l limitNorm270    (le_of_lt hξpos) hξlt (le_of_lt hBpos) hcB hnet271    (fun y hy => hlimit y (hunit y hy))272    (fun y hy => hconvergence y (hunit y hy))273  have hidentity :274      ((1 + (κ - 1) / (κ + 1)) * c) / (1 - (κ - 1) / (κ + 1)) = κ * c := by275    field_simp276    ring277  exact hcertificate.mono fun i ⟨ω, _, hω⟩ => ⟨ω, by simpa only [hidentity] using hω⟩278279/-- Division by the output dimension turns the unnormalized free-group bound280into the Hilbert--Schmidt norm certificate in Lemma `cy`. -/281theorem normalized_norm_bound (T : E →L[ℝ] F) {L a : ℝ} (hL : 0 < L) (ha : 0 ≤ a)282    (hT : ∀ x, ‖T x‖ ≤ Real.sqrt (L * a) * ‖x‖) (x : E) :283    ‖(L⁻¹ • T) x‖ ≤ Real.sqrt (a / L) * ‖x‖ := by284  have hnormalize : Real.sqrt (L * a) / L = Real.sqrt (a / L) := by285    calc286      Real.sqrt (L * a) / L = Real.sqrt a * (Real.sqrt L / L) := by287        rw [Real.sqrt_mul (le_of_lt hL)]288        ring289      _ = Real.sqrt a * (Real.sqrt L)⁻¹ := by rw [Real.sqrt_div_self]290      _ = Real.sqrt (a / L) := by rw [Real.sqrt_div ha]; ring291  calc292    ‖(L⁻¹ • T) x‖ = L⁻¹ * ‖T x‖ := by293      simp only [ContinuousLinearMap.smul_apply, norm_smul, Real.norm_eq_abs,294        abs_of_pos (inv_pos.mpr hL)]295    _ ≤ L⁻¹ * (Real.sqrt (L * a) * ‖x‖) :=296      mul_le_mul_of_nonneg_left (hT x) (le_of_lt (inv_pos.mpr hL))297    _ = (Real.sqrt (L * a) / L) * ‖x‖ := by ring298    _ = Real.sqrt (a / L) * ‖x‖ := by rw [hnormalize]299300end FiniteNet301302section Constants303304/-- The Collins--Youn coefficient, with `q = (1+9/K)^n` and `L = K^n`. -/305noncomputable def freeNormConstant (L q : ℝ) : ℝ := Real.sqrt ((q - 1) / L)306307theorem freeNormConstant_nonneg (L q : ℝ) : 0 ≤ freeNormConstant L q :=308  Real.sqrt_nonneg _309310theorem freeNormConstant_pos {L q : ℝ} (hL : 0 < L) (hq : 1 < q) :311    0 < freeNormConstant L q :=312  Real.sqrt_pos.mpr (div_pos (sub_pos.mpr hq) hL)313314theorem freeNormConstant_sq {L q : ℝ} (hL : 0 < L) (hq : 1 ≤ q) :315    freeNormConstant L q ^ 2 = (q - 1) / L := by316  exact Real.sq_sqrt (div_nonneg (sub_nonneg.mpr hq) (le_of_lt hL))317318/-- Scalar identity used when substituting the norm certificate into purity. -/319theorem purity_factor_identity {L q κ : ℝ} (hL : 0 < L) (hq : 1 ≤ q) :320    1 + L * (κ * freeNormConstant L q) ^ 2 = κ ^ 2 * q + 1 - κ ^ 2 := by321  rw [mul_pow, freeNormConstant_sq hL hq]322  field_simp323  ring324325/-- For `κ ≥ 1` the negative correction may be dropped. -/326theorem purity_factor_le {L q κ : ℝ} (hL : 0 < L) (hq : 1 ≤ q) (hκ : 1 ≤ κ) :327    1 + L * (κ * freeNormConstant L q) ^ 2 ≤ κ ^ 2 * q := by328  rw [purity_factor_identity hL hq]329  nlinarith330331/-- The exact constant `c_n` used throughout the manuscript. -/332noncomputable def collinsYounConstant (K n : ℕ) : ℝ :=333  freeNormConstant ((K : ℝ) ^ n) ((1 + 9 / (K : ℝ)) ^ n)334335theorem collinsYounConstant_pos {K n : ℕ} (hK : 2 ≤ K) (hn : 1 ≤ n) :336    0 < collinsYounConstant K n := by337  have hKr : (2 : ℝ) ≤ K := by exact_mod_cast hK338  have hKpos : (0 : ℝ) < K := by linarith339  apply freeNormConstant_pos (pow_pos hKpos n)340  apply one_lt_pow₀341  · have := div_pos (by norm_num : (0 : ℝ) < 9) hKpos342    linarith343  · exact Nat.ne_of_gt (Nat.lt_of_lt_of_le Nat.zero_lt_one hn)344345theorem collinsYounConstant_sq {K n : ℕ} (hK : 2 ≤ K) :346    collinsYounConstant K n ^ 2 = ((1 + 9 / (K : ℝ)) ^ n - 1) / (K : ℝ) ^ n := by347  have hKr : (2 : ℝ) ≤ K := by exact_mod_cast hK348  have hKpos : (0 : ℝ) < K := by linarith349  apply freeNormConstant_sq (pow_pos hKpos n)350  apply one_le_pow₀351  have := div_nonneg (by norm_num : (0 : ℝ) ≤ 9) (le_of_lt hKpos)352  linarith353354/-- Specialized scalar purity estimate for the exact channel-output dimension. -/355theorem collinsYoun_purity_factor_le {K n : ℕ} {κ : ℝ} (hK : 2 ≤ K) (hκ : 1 ≤ κ) :356    1 + (K : ℝ) ^ n * (κ * collinsYounConstant K n) ^ 2 ≤357      κ ^ 2 * (1 + 9 / (K : ℝ)) ^ n := by358  have hKr : (2 : ℝ) ≤ K := by exact_mod_cast hK359  have hKpos : (0 : ℝ) < K := by linarith360  apply purity_factor_le (pow_pos hKpos n) _ hκ361  apply one_le_pow₀362  have := div_nonneg (by norm_num : (0 : ℝ) ≤ 9) (le_of_lt hKpos)363  linarith364365end Constants366367end Nonadditivity