Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.GaussianNormalization

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

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

32 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarMomentTail78/-! Deterministic polar normalization of a rectangular matrix close to an isometry. -/9noncomputable section10set_option backward.isDefEq.respectTransparency false11set_option linter.unusedSectionVars false12set_option maxHeartbeats 120000013namespace Nonadditivity.GaussianNormalization14open scoped BigOperators Matrix Matrix.Norms.L2Operator Kronecker ComplexConjugate15open Channels16variable {D B E : Type*} [Fintype D] [DecidableEq D] [Nonempty D]17  [Fintype B] [DecidableEq B] [Fintype E] [DecidableEq E]1819/-- The positive inverse square root, constructed by the matrix spectral theorem. -/20def normalizer (A : Matrix D D ℂ) (hA : A.IsHermitian) : Matrix D D ℂ :=21  Unitary.conjStarAlgAut ℂ _ hA.eigenvectorUnitary22    (Matrix.diagonal fun i => ((Real.sqrt (hA.eigenvalues i))⁻¹ : ℂ))2324theorem eigenvalue_lower (A : Matrix D D ℂ) (hA : A.IsHermitian)25    (hclose : ‖A-1‖≤1/2) (i : D) : 1/2 ≤ hA.eigenvalues i := by26  letI : CStarAlgebra (Matrix D D ℂ) := {}27  let f : D → ℂ := fun i => (hA.eigenvalues i : ℂ)-128  have hnorm : ‖A-1‖ = ‖f‖ := by29    conv_lhs => rw [hA.spectral_theorem]30    rw [← map_one (Unitary.conjStarAlgAut ℂ _ hA.eigenvectorUnitary), ←map_sub,31      StarAlgEquiv.norm_map]32    have hd : Matrix.diagonal (fun i => (hA.eigenvalues i : ℂ)) - 1 = Matrix.diagonal f := by33      rw [← Matrix.diagonal_one, ← Matrix.diagonal_sub]34    change ‖Matrix.diagonal (fun i => (hA.eigenvalues i : ℂ)) - 1‖ = ‖f‖35    rw [hd,Matrix.l2_opNorm_diagonal]36  have hi : |hA.eigenvalues i-1| ≤ 1/2 := by37    have h := (norm_le_pi_norm f i).trans (hnorm ▸ hclose)38    simpa only [f, ←Complex.ofReal_one, ←Complex.ofReal_sub,Complex.norm_real,Real.norm_eq_abs] using h39  linarith [(abs_le.mp hi).1]4041theorem normalizer_hermitian (A : Matrix D D ℂ) (hA : A.IsHermitian) :42    (normalizer A hA).IsHermitian := by43  change star (normalizer A hA) = normalizer A hA44  unfold normalizer45  rw [← map_star]46  congr 147  ext i j48  by_cases h:i=j49  · subst j; simp [Matrix.star_apply]50  · simp [Matrix.star_apply,h,Ne.symm h]5152theorem inv_sqrt_identity (x : ℝ) (hx : 0<x) :53    ((Real.sqrt x)⁻¹:ℂ) * (x:ℂ) * ((Real.sqrt x)⁻¹:ℂ) = 1 := by54  have h : (Real.sqrt x)⁻¹ * x * (Real.sqrt x)⁻¹ = (1:ℝ) := by55    have hsq := Real.sq_sqrt hx.le56    have hn := (Real.sqrt_pos.mpr hx).ne'57    field_simp58    nlinarith59  exact_mod_cast h6061theorem normalizer_identity (A : Matrix D D ℂ) (hA : A.IsHermitian)62    (hclose : ‖A-1‖≤1/2) : normalizer A hA * A * normalizer A hA = 1 := by63  let U := Unitary.conjStarAlgAut ℂ _ hA.eigenvectorUnitary64  have ha : A = U (Matrix.diagonal fun i => (hA.eigenvalues i:ℂ)) := hA.spectral_theorem65  unfold normalizer66  change U _ * A * U _ = 167  conv_lhs => arg 1; arg 2; rw [ha]68  rw [←map_mul,←map_mul,←map_one U]69  congr 170  rw [Matrix.diagonal_mul_diagonal,Matrix.diagonal_mul_diagonal]71  ext i j72  by_cases h:i=j73  · subst j74    simp only [Matrix.diagonal_apply_eq,Matrix.one_apply_eq]75    exact inv_sqrt_identity _ (by have := eigenvalue_lower A hA hclose i; linarith)76  · simp [h]7778theorem normalizer_norm_sq (A : Matrix D D ℂ) (hA : A.IsHermitian)79    (hclose : ‖A-1‖≤1/2) : ‖normalizer A hA‖^2≤2 := by80  letI : CStarAlgebra (Matrix D D ℂ) := {}81  have hnorm : ‖normalizer A hA‖ ≤ Real.sqrt 2 := by82    unfold normalizer83    rw [StarAlgEquiv.norm_map,Matrix.l2_opNorm_diagonal]84    apply (pi_norm_le_iff_of_nonneg (Real.sqrt_nonneg _)).mpr85    intro i86    have hl := eigenvalue_lower A hA hclose i87    have hx : 0 < hA.eigenvalues i := by linarith88    have hinv : ((Real.sqrt (hA.eigenvalues i))⁻¹)^2≤2 := by89      rw [inv_pow,Real.sq_sqrt hx.le]90      rw [inv_eq_one_div]91      exact (div_le_iff₀ hx).mpr (by linarith)92    have hs := Real.sq_sqrt (show (0:ℝ)≤2 by norm_num)93    have hi : (Real.sqrt (hA.eigenvalues i))⁻¹ ≤ Real.sqrt 2 := by nlinarith [Real.sqrt_nonneg (2:ℝ)]94    simpa only [norm_inv,Complex.norm_real,Real.norm_eq_abs,abs_of_nonneg (Real.sqrt_nonneg _)] using hi95  nlinarith [Real.sq_sqrt (show (0:ℝ)≤2 by norm_num),norm_nonneg (normalizer A hA)]9697def gram (G : Matrix (B×E) D ℂ) : Matrix D D ℂ := G.conjTranspose * G9899theorem gram_hermitian (G : Matrix (B×E) D ℂ) : (gram G).IsHermitian :=100  Matrix.isHermitian_conjTranspose_mul_self G101102def normalized (G : Matrix (B×E) D ℂ) : Matrix (B×E) D ℂ :=103  G * normalizer (gram G) (gram_hermitian G)104105theorem normalized_isometry (G : Matrix (B×E) D ℂ) (hclose : ‖gram G-1‖≤1/2) :106    (normalized G).conjTranspose * normalized G = 1 := by107  unfold normalized108  rw [Matrix.conjTranspose_mul,(normalizer_hermitian (gram G) (gram_hermitian G)).eq]109  simpa only [Matrix.mul_assoc,gram] using normalizer_identity (gram G) (gram_hermitian G) hclose110111/-- Slicing an actual isometry into environment-indexed Kraus matrices. -/112def channelOfIsometry (V : Matrix (B×E) D ℂ) (hV : V.conjTranspose*V=1) : KrausChannel D B E where113  kraus e b d := V (b,e) d114  complete := by115    ext i j116    have h := congrArg (fun M : Matrix D D ℂ => M i j) hV117    simp only [Matrix.sum_apply,Matrix.mul_apply,Matrix.conjTranspose_apply,Fintype.sum_prod_type] at h ⊢118    rw [Finset.sum_comm] at h119    exact h120121/-- An actual finite channel obtained by polar normalization of `G`. -/122def channel (G : Matrix (B×E) D ℂ) (hclose : ‖gram G-1‖≤1/2) : KrausChannel D B E :=123  channelOfIsometry (normalized G) (normalized_isometry G hclose)124125def slice (G : Matrix (B×E) D ℂ) (e : E) : Matrix B D ℂ := fun b d => G (b,e) d126127/-- The unnormalized adjoint compression whose Gaussian concentration is needed. -/128def rawAdjoint (G : Matrix (B×E) D ℂ) (A : Matrix B B ℂ) : Matrix D D ℂ :=129  G.conjTranspose * (A ⊗ₖ (1 : Matrix E E ℂ)) * G130131theorem rawAdjoint_eq_sum (G : Matrix (B×E) D ℂ) (A : Matrix B B ℂ) :132    rawAdjoint G A = ∑ e, (slice G e).conjTranspose * A * slice G e := by133  ext i j134  simp only [rawAdjoint,Matrix.mul_assoc,Matrix.mul_apply,Matrix.kronecker_apply,135    Matrix.one_apply,Matrix.conjTranspose_apply,Matrix.sum_apply,Fintype.sum_prod_type,slice]136  simp only [mul_ite,mul_one,mul_zero,Finset.sum_ite_eq',Finset.mem_univ,if_true]137  simp only [Finset.mul_sum,Finset.sum_mul,mul_assoc]138  rw [Finset.sum_comm]139  apply Finset.sum_congr rfl140  intro e _141  exact Finset.sum_comm142143theorem channelOfIsometry_adjoint (V : Matrix (B×E) D ℂ) (hV : V.conjTranspose*V=1)144    (A : Matrix B B ℂ) : (channelOfIsometry V hV).adjointMap A = rawAdjoint V A := by145  rw [rawAdjoint_eq_sum]146  rfl147148theorem rawAdjoint_normalized (G : Matrix (B×E) D ℂ) (A : Matrix B B ℂ) :149    rawAdjoint (normalized G) A = normalizer (gram G) (gram_hermitian G) *150      rawAdjoint G A * normalizer (gram G) (gram_hermitian G) := by151  simp only [rawAdjoint,normalized,Matrix.conjTranspose_mul,152    (normalizer_hermitian (gram G) (gram_hermitian G)).eq,Matrix.mul_assoc]153154theorem channel_adjoint (G : Matrix (B×E) D ℂ) (hclose : ‖gram G-1‖≤1/2)155    (A : Matrix B B ℂ) : (channel G hclose).adjointMap A =156      normalizer (gram G) (gram_hermitian G) * rawAdjoint G A *157        normalizer (gram G) (gram_hermitian G) := by158  exact (channelOfIsometry_adjoint _ _ A).trans (rawAdjoint_normalized G A)159160/-- Polar normalization costs at most a factor two in every adjoint observable bound. -/161theorem channel_adjoint_norm_le (G : Matrix (B×E) D ℂ) (hclose : ‖gram G-1‖≤1/2)162    (A : Matrix B B ℂ) : ‖(channel G hclose).adjointMap A‖ ≤ 2*‖rawAdjoint G A‖ := by163  rw [channel_adjoint]164  let S := normalizer (gram G) (gram_hermitian G)165  calc166    ‖S * rawAdjoint G A * S‖ ≤ (‖S‖*‖rawAdjoint G A‖)*‖S‖ :=167      (norm_mul_le _ _).trans (mul_le_mul_of_nonneg_right (norm_mul_le _ _) (norm_nonneg _))168    _ = ‖S‖^2*‖rawAdjoint G A‖ := by ring169    _ ≤ 2*‖rawAdjoint G A‖ := mul_le_mul_of_nonneg_right170      (normalizer_norm_sq (gram G) (gram_hermitian G) hclose) (norm_nonneg _)171172theorem transfer_observable_bound (G : Matrix (B×E) D ℂ) (hclose : ‖gram G-1‖≤1/2)173    (A : Matrix B B ℂ) (t h : ℝ) (hraw : ‖rawAdjoint G A‖ ≤ t*h) :174    ‖(channel G hclose).adjointMap A‖ ≤ (2*t)*h :=175  (channel_adjoint_norm_le G hclose A).trans (by nlinarith)176177end Nonadditivity.GaussianNormalization