Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.QuantumCodingTraceDistance

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

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

6 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.QuantumCodingContinuity7import Nonadditivity.AdjointPurity89/-! Convexity and disturbance estimates for the actual spectral trace distance. -/10noncomputable section11namespace Nonadditivity.QuantumCodingContinuity12open Entropy EntropyMixtures13open scoped BigOperators ComplexOrder Matrix ComplexConjugate14set_option backward.isDefEq.respectTransparency false15set_option maxHeartbeats 10000001617variable {ι : Type*} [Fintype ι] [DecidableEq ι]1819/-- Absolute diagonal sum in every orthonormal basis is at most spectral trace norm. -/20theorem sum_abs_diagonal_unitary_le (A : Matrix ι ι ℂ) (hA : A.IsHermitian)21    (U : unitary (Matrix ι ι ℂ)) :22    (∑ i, |(((U : Matrix ι ι ℂ) * A * (star U : Matrix ι ι ℂ)) i i).re|) ≤23      ∑ i, |hA.eigenvalues i| := by24  let V := U * hA.eigenvectorUnitary25  have hmat : (U : Matrix ι ι ℂ) * A * (star U : Matrix ι ι ℂ) =26      (V : Matrix ι ι ℂ) * Matrix.diagonal (fun i => (hA.eigenvalues i : ℂ)) *27        (star V : Matrix ι ι ℂ) := by28    conv_lhs => rw [hA.spectral_theorem, Unitary.conjStarAlgAut_apply]29    simp only [V, Submonoid.coe_mul, star_mul, Matrix.mul_assoc]30    rfl31  simp_rw [hmat, diagonal_unitary_conjugate]32  calc33    _ ≤ ∑ i, ∑ j, unitaryWeights V i j * |hA.eigenvalues j| := by34      apply Finset.sum_le_sum35      intro i _36      calc37        _ ≤ ∑ j, |unitaryWeights V i j * hA.eigenvalues j| :=38          Finset.abs_sum_le_sum_abs _ _39        _ = _ := by simp only [abs_mul, abs_of_nonneg (unitaryWeights_nonneg V _ _)]40    _ = ∑ j, |hA.eigenvalues j| := by41      rw [Finset.sum_comm]42      simp only [← Finset.sum_mul, unitaryWeights_col_sum, one_mul]4344/-- Convexity of the spectral trace norm, including singular matrices and zero coefficients. -/45theorem eigenvalue_abs_sum_le_of_mixture {κ : Type*} [Fintype κ]46    (A : Matrix ι ι ℂ) (hA : A.IsHermitian) (B : κ → Matrix ι ι ℂ)47    (hB : ∀ j, (B j).IsHermitian) (p : κ → ℝ) (hp : ∀ j, 0 ≤ p j)48    (hmix : A = ∑ j, (p j : ℂ) • B j) :49    (∑ i, |hA.eigenvalues i|) ≤ ∑ j, p j * ∑ i, |(hB j).eigenvalues i| := by50  let U := star hA.eigenvectorUnitary51  have hd : (U : Matrix ι ι ℂ) * A * (star U : Matrix ι ι ℂ) =52      Matrix.diagonal (fun i => (hA.eigenvalues i : ℂ)) :=53    hA.conjStarAlgAut_star_eigenvectorUnitary54  have he (i : ι) : hA.eigenvalues i =55      ∑ j, p j * (((U : Matrix ι ι ℂ) * B j * (star U : Matrix ι ι ℂ)) i i).re := by56    have hc : (U : Matrix ι ι ℂ) * A * (star U : Matrix ι ι ℂ) =57        ∑ j, (p j : ℂ) • ((U : Matrix ι ι ℂ) * B j * (star U : Matrix ι ι ℂ)) := by58      calc59        _ = (U : Matrix ι ι ℂ) * (∑ j, (p j : ℂ) • B j) * (star U : Matrix ι ι ℂ) :=60          congrArg (fun X : Matrix ι ι ℂ => (U : Matrix ι ι ℂ) * X * (star U : Matrix ι ι ℂ)) hmix61        _ = _ := by simp only [Matrix.mul_sum, Matrix.sum_mul, Matrix.mul_smul, Matrix.smul_mul]62    have hh := congrArg (fun M : Matrix ι ι ℂ => (M i i).re) (hd.symm.trans hc)63    simpa only [Matrix.diagonal_apply_eq, Complex.ofReal_re, Matrix.sum_apply,64      Matrix.mul_smul, Matrix.smul_mul, Matrix.smul_apply, smul_eq_mul,65      Complex.re_sum, Complex.mul_re, Complex.ofReal_re, Complex.ofReal_im,66      zero_mul, sub_zero] using hh67  simp_rw [he]68  calc69    _ ≤ ∑ i, ∑ j, p j *70        |(((U : Matrix ι ι ℂ) * B j * (star U : Matrix ι ι ℂ)) i i).re| := by71      apply Finset.sum_le_sum72      intro i _73      calc74        _ ≤ ∑ j, |p j * (((U : Matrix ι ι ℂ) * B j * (star U : Matrix ι ι ℂ)) i i).re| :=75          Finset.abs_sum_le_sum_abs _ _76        _ = _ := by simp only [abs_mul, abs_of_nonneg (hp _)]77    _ = ∑ j, p j * ∑ i,78        |(((U : Matrix ι ι ℂ) * B j * (star U : Matrix ι ι ℂ)) i i).re| := by79      rw [Finset.sum_comm]80      simp only [Finset.mul_sum]81    _ ≤ _ := Finset.sum_le_sum fun j _ => mul_le_mul_of_nonneg_left82      (sum_abs_diagonal_unitary_le (B j) (hB j) U) (hp j)8384/-- Convexity of the actual half trace distance under normalized finite mixtures. -/85theorem traceDistance_mixture_le {κ : Type*} [Fintype κ]86    (p : κ → ℝ) (hp : ∀ j, 0 ≤ p j) (hs : ∑ j, p j = 1)87    (ρ σ : κ → DensityMatrix ι) :88    traceDistance (DensityMatrix.mixture p hp hs ρ) (DensityMatrix.mixture p hp hs σ) ≤89      ∑ j, p j * traceDistance (ρ j) (σ j) := by90  have h := eigenvalue_abs_sum_le_of_mixture91    ((DensityMatrix.mixture p hp hs ρ).matrix - (DensityMatrix.mixture p hp hs σ).matrix)92    (differenceHermitian _ _) (fun j => (ρ j).matrix - (σ j).matrix)93    (fun j => differenceHermitian (ρ j) (σ j)) p hp (by94      simp only [DensityMatrix.mixture_matrix, smul_sub, Finset.sum_sub_distrib])95  have hh := div_le_div_of_nonneg_right h (show (0 : ℝ) ≤ 2 by norm_num)96  simpa only [traceDistance, Finset.sum_div, mul_div_assoc] using hh979899/-- Symmetry follows from the basis-independent spectral trace norm. -/100theorem traceDistance_comm (ρ σ : DensityMatrix ι) : traceDistance ρ σ = traceDistance σ ρ := by101  have hone (ρ σ : DensityMatrix ι) : traceDistance ρ σ ≤ traceDistance σ ρ := by102    let U := star (differenceHermitian ρ σ).eigenvectorUnitary103    have hd : (U : Matrix ι ι ℂ) * (ρ.matrix - σ.matrix) * (star U : Matrix ι ι ℂ) =104        Matrix.diagonal (fun i => ((differenceHermitian ρ σ).eigenvalues i : ℂ)) :=105      (differenceHermitian ρ σ).conjStarAlgAut_star_eigenvectorUnitary106    have hn : (U : Matrix ι ι ℂ) * (σ.matrix - ρ.matrix) * (star U : Matrix ι ι ℂ) =107        -Matrix.diagonal (fun i => ((differenceHermitian ρ σ).eigenvalues i : ℂ)) := by108      calc109        _ = -((U : Matrix ι ι ℂ) * (ρ.matrix - σ.matrix) * (star U : Matrix ι ι ℂ)) := by110          simp only [Matrix.mul_sub, Matrix.sub_mul, neg_sub]111        _ = _ := congrArg Neg.neg hd112    have h := sum_abs_diagonal_unitary_le (σ.matrix - ρ.matrix) (differenceHermitian σ ρ) U113    rw [hn] at h114    simp only [Matrix.neg_apply, Matrix.diagonal_apply_eq, Complex.neg_re, Complex.ofReal_re,115      abs_neg] at h116    exact div_le_div_of_nonneg_right h (by norm_num)117  exact le_antisymm (hone ρ σ) (hone σ ρ)118119end Nonadditivity.QuantumCodingContinuity