Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.QuadraticNet

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

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

8 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.ObservableDimension7import Mathlib.LinearAlgebra.Complex.FiniteDimensional8import Mathlib.Analysis.InnerProductSpace.Rayleigh910/-! Quadratic tests on a finite sphere net control the norm of an actual symmetric operator. -/11noncomputable section12set_option backward.isDefEq.respectTransparency false13set_option linter.unusedSectionVars false14namespace Nonadditivity.QuadraticNet15open scoped InnerProductSpace16variable {F : Type*} [NormedAddCommGroup F] [InnerProductSpace ℝ F]1718/-- Quadratic forms have a dimension-independent Lipschitz bound on the unit sphere. -/19theorem quadratic_difference (T : F →L[ℝ] F) (x y : F) :20    |⟪T x,x⟫_ℝ-⟪T y,y⟫_ℝ| ≤ ‖T‖*‖x-y‖*(‖x‖+‖y‖) := by21  have heq : ⟪T x,x⟫_ℝ-⟪T y,y⟫_ℝ = ⟪T (x-y),x⟫_ℝ+⟪T y,x-y⟫_ℝ := by22    simp only [map_sub,inner_sub_left,inner_sub_right]23    ring24  rw [heq]25  calc26    |⟪T (x-y),x⟫_ℝ+⟪T y,x-y⟫_ℝ| ≤ |⟪T (x-y),x⟫_ℝ|+|⟪T y,x-y⟫_ℝ| := abs_add_le _ _27    _ ≤ (‖T‖*‖x-y‖)*‖x‖+(‖T‖*‖y‖)*‖x-y‖ := by28      apply add_le_add29      · exact (abs_real_inner_le_norm _ _).trans30          (mul_le_mul_of_nonneg_right (T.le_opNorm _) (norm_nonneg _))31      · exact (abs_real_inner_le_norm _ _).trans32          (mul_le_mul_of_nonneg_right (T.le_opNorm _) (norm_nonneg _))33    _ = _ := by ring3435theorem norm_le_of_unit_quadratic (T : F →L[ℝ] F) (hT : T.IsSymmetric)36    {C : ℝ} (hC : 0≤C) (hquad : ∀x:F, ‖x‖=1 → |⟪T x,x⟫_ℝ|≤C) : ‖T‖≤C := by37  rw [T.norm_eq_iSup_rayleighQuotient hT]38  apply ciSup_le39  intro x40  by_cases hx:x=041  · simpa [hx] using hC42  · have hxnorm : ‖x‖≠0 := norm_ne_zero_iff.mpr hx43    have hu : ‖‖x‖⁻¹ • x‖=1 := by simp [norm_smul,hxnorm]44    have h := hquad (‖x‖⁻¹ • x) hu45    have hr := T.rayleigh_smul x (inv_ne_zero hxnorm)46    rw [←hr]47    simpa only [ContinuousLinearMap.rayleighQuotient,ContinuousLinearMap.reApplyInnerSelf_apply,48      RCLike.re_to_real,hu,one_pow,div_one] using h4950/-- The actual quadratic net loss is `1/(1-2δ)`. -/51theorem norm_le_of_unitSphereNet (T : F →L[ℝ] F) (hT : T.IsSymmetric)52    {tests : Finset F} {δ C : ℝ} (hδ : 0≤δ) (hδhalf : δ<1/2) (hC : 0≤C)53    (hunit : ∀y∈tests, ‖y‖=1) (hnet : UnitSphereNet tests δ)54    (htests : ∀y∈tests, |⟪T y,y⟫_ℝ|≤C) : ‖T‖≤C/(1-2*δ) := by55  have hbound : ‖T‖≤C+2*δ*‖T‖ := by56    apply norm_le_of_unit_quadratic T hT (by positivity)57    intro x hx58    obtain ⟨y,hy,hxy⟩ := hnet x hx59    have hdist : ‖x-y‖≤δ := by simpa only [dist_eq_norm] using hxy60    have hd := quadratic_difference T x y61    rw [hx,hunit y hy] at hd62    have hq : |⟪T x,x⟫_ℝ|≤|⟪T x,x⟫_ℝ-⟪T y,y⟫_ℝ|+|⟪T y,y⟫_ℝ| :=63      calc64        |⟪T x,x⟫_ℝ| = |(⟪T x,x⟫_ℝ-⟪T y,y⟫_ℝ)+⟪T y,y⟫_ℝ| := by congr 1; ring65        _ ≤ _ := abs_add_le _ _66    have hm := mul_le_mul_of_nonneg_left hdist (norm_nonneg T)67    linarith [htests y hy]68  exact (le_div_iff₀ (by linarith)).mpr (by nlinarith)6970/-- Actual finite sphere nets, with the proved volume cardinality estimate. -/71theorem exists_net {δ : ℝ} (hδ : 0<δ) (hδtwo : δ<2) [FiniteDimensional ℝ F] :72    ∃tests : Finset F, (∀x∈tests,‖x‖=1) ∧ UnitSphereNet tests δ ∧73      (tests.card:ℝ) ≤ (1+2/δ)^Module.finrank ℝ F := by74  classical75  obtain ⟨tests,_,hunit,_,_,hnet,hcard⟩ :=76    QuantitativeNet.exists_symmetric_unitSphereNet_containing (∅:Finset F) hδ hδtwo77      (by simp) (by simp) (by simp)78  exact ⟨tests,hunit,hnet,hcard⟩7980/-- A quarter-net of the complex input sphere has at most `9^(2D)` tests. -/81theorem exists_complex_input_net (D : Type*) [Fintype D] :82    ∃tests : Finset (EuclideanSpace ℂ D), (∀x∈tests,‖x‖=1) ∧83      UnitSphereNet tests (1/4) ∧ tests.card ≤ 9^(2*Fintype.card D) := by84  have hdim : Module.finrank ℝ (EuclideanSpace ℂ D) = 2*Fintype.card D := by85    rw [←Module.finrank_mul_finrank ℝ ℂ (EuclideanSpace ℂ D)]86    simp87  obtain ⟨tests,hunit,hnet,hcard⟩ := exists_net (F := EuclideanSpace ℂ D)88    (show (0:ℝ)<1/4 by norm_num) (by norm_num)89  refine ⟨tests,hunit,hnet,?_⟩90  rw [hdim] at hcard91  norm_num at hcard92  exact_mod_cast hcard9394/-- A half-net of traceless Hermitian HS-unit observables has at most `5^(K²)` tests. -/95theorem exists_observable_net (B : Type*) [Fintype B] [DecidableEq B] [Nonempty B] :96    ∃tests : Finset (FiniteRealization.ObservableSpace B), (∀x∈tests,‖x‖=1) ∧97      UnitSphereNet tests (1/2) ∧ tests.card ≤ 5^(Fintype.card B)^2 := by98  obtain ⟨tests,hunit,hnet,hcard⟩ := exists_net (F := FiniteRealization.ObservableSpace B)99    (show (0:ℝ)<1/2 by norm_num) (by norm_num)100  refine ⟨tests,hunit,hnet,?_⟩101  rw [ObservableDimension.observableSpace_finrank] at hcard102  norm_num at hcard103  have hsmall : tests.card ≤ 5^(Fintype.card B^2-1) := by exact_mod_cast hcard104  exact hsmall.trans (Nat.pow_le_pow_right (by omega) (Nat.sub_le _ _))105106open scoped Matrix.Norms.L2Operator107108/-- Complex Hermitian matrix version, with the Euclidean operator norm and literal quadratic form. -/109theorem matrix_norm_le_of_unitSphereNet {D : Type*} [Fintype D] [DecidableEq D]110    (A : Matrix D D ℂ) (hA : A.IsHermitian)111    {tests : Finset (EuclideanSpace ℂ D)} {δ C : ℝ}112    (hδ : 0≤δ) (hδhalf : δ<1/2) (hC : 0≤C)113    (hunit : ∀x∈tests,‖x‖=1) (hnet : UnitSphereNet tests δ)114    (htests : ∀x∈tests, |(⟪(Matrix.toEuclideanCLM (n := D) (𝕜 := ℂ)) A x,x⟫_ℂ).re|≤C) :115    ‖A‖≤C/(1-2*δ) := by116  letI : InnerProductSpace ℝ (EuclideanSpace ℂ D) := InnerProductSpace.rclikeToReal ℂ _117  let T := ((Matrix.toEuclideanCLM (n := D) (𝕜 := ℂ)) A).restrictScalars ℝ118  have hT : T.IsSymmetric := (Matrix.isHermitian_iff_isSymmetric.mp hA).restrictScalars119  have h := norm_le_of_unitSphereNet T hT hδ hδhalf hC hunit hnet (by120    intro x hx121    simpa only [T,ContinuousLinearMap.coe_restrictScalars,real_inner_eq_re_inner]122      using htests x hx)123  exact h124125end Nonadditivity.QuadraticNet