Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.QuantumCodingPackingAverages

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.QuantumCodingTypicalProjectors7import Nonadditivity.StateEnsembles8import Nonadditivity.AdjointPurity910/-! # The packing cross term for an actual finite quantum ensemble1112The average tensor state is proved to be the mixture of the actual word13states. A spectral cap on its global compression and a trace bound on each14conditional projector give the required average interference bound.15-/1617noncomputable section18namespace Nonadditivity.QuantumCoding1920open Entropy AdjointPurity21open scoped BigOperators ComplexOrder Matrix2223variable {ι α : Type*} [Fintype ι] [DecidableEq ι] [Fintype α]2425/-- Independent sampling of input letters gives the genuine tensor power26of the single-letter average, as an exact matrix identity. -/27theorem tensorState_mixture_matrix (p : α → ℝ) (hp : ∀ x, 0 ≤ p x)28    (hs : ∑ x, p x = 1) (ρ : α → DensityMatrix ι) (n : ℕ) :29    (tensorState (DensityMatrix.mixture p hp hs ρ) n).matrix =30      ∑ x : Fin n → α, (tensorWeights p n x : ℂ) •31        (tensorFamilyState (fun j => ρ (x j))).matrix := by32  ext u v33  change (∏ j, (∑ a, (p a : ℂ) • (ρ a).matrix) (u j) (v j)) = _34  simp only [Matrix.sum_apply, Matrix.smul_apply, smul_eq_mul]35  rw [Fintype.prod_sum]36  apply Finset.sum_congr rfl37  intro x _38  change (∏ j, (p (x j) : ℂ) * (ρ (x j)).matrix (u j) (v j)) =39    (tensorWeights p n x : ℂ) * ∏ j, (ρ (x j)).matrix (u j) (v j)40  rw [Finset.prod_mul_distrib]41  simp only [tensorWeights, Complex.ofReal_prod]4243/-- Lift a spectral cap relative to a projection to a cap by the identity. -/44theorem compression_cap_identity (P R : Matrix ι ι ℂ) {a : ℝ} (ha : 0 ≤ a)45    (hP : (1 - P).PosSemidef) (hcap : ((a : ℂ) • P - P * R * P).PosSemidef) :46    ((a : ℂ) • (1 : Matrix ι ι ℂ) - P * R * P).PosSemidef := by47  have h := (hP.smul (show (0 : ℂ) ≤ (a : ℂ) by exact_mod_cast ha)).add hcap48  convert h using 149  simp only [smul_sub]50  abel5152/-- Any positive test has interference at most its trace times the cap. -/53theorem compressed_trace_le (P R Q : Matrix ι ι ℂ) {a : ℝ}54    (hQ : Q.PosSemidef)55    (hcap : ((a : ℂ) • (1 : Matrix ι ι ℂ) - P * R * P).PosSemidef) :56    (Q * P * R * P).trace.re ≤ a * Q.trace.re := by57  have h : 0 ≤ (Q * ((a : ℂ) • (1 : Matrix ι ι ℂ) - P * R * P)).trace.re :=58    (RCLike.nonneg_iff.mp (trace_mul_nonneg hQ hcap)).159  simp only [Matrix.mul_sub, Matrix.mul_smul, Matrix.mul_one, Matrix.trace_sub,60    Matrix.trace_smul, smul_eq_mul, Complex.sub_re, Complex.mul_re, Complex.ofReal_re, Complex.ofReal_im, zero_mul, sub_zero] at h61  simpa only [Matrix.mul_assoc] using (sub_nonneg.mp h)6263theorem weighted_compressed_trace (p : α → ℝ) (hp : ∀ x, 0 ≤ p x)64    (hs : ∑ x, p x = 1) (ρ : α → DensityMatrix ι) (P Q : Matrix ι ι ℂ) :65    (∑ x, p x * (Q * P * (ρ x).matrix * P).trace.re) =66      (Q * P * (DensityMatrix.mixture p hp hs ρ).matrix * P).trace.re := by67  simp only [DensityMatrix.mixture_matrix, Matrix.mul_sum, Matrix.sum_mul,68    Matrix.mul_smul, Matrix.smul_mul, Matrix.trace_sum, Matrix.trace_smul,69    Complex.re_sum, smul_eq_mul, Complex.mul_re, Complex.ofReal_re, Complex.ofReal_im, zero_mul, sub_zero]7071/-- Independent average over the true state and an interfering test. -/72theorem average_cross_trace_le (p : α → ℝ) (hp : ∀ x, 0 ≤ p x)73    (hs : ∑ x, p x = 1) (ρ : α → DensityMatrix ι)74    (P : Matrix ι ι ℂ) (Q : α → Matrix ι ι ℂ) (hQ : ∀ x, (Q x).PosSemidef)75    {a b : ℝ} (ha : 0 ≤ a) (htrace : ∀ x, (Q x).trace.re ≤ b)76    (hcap : ((a : ℂ) • (1 : Matrix ι ι ℂ) -77      P * (DensityMatrix.mixture p hp hs ρ).matrix * P).PosSemidef) :78    (∑ y, ∑ x, p y * p x * (Q y * P * (ρ x).matrix * P).trace.re) ≤ a * b := by79  calc80    _ = ∑ y, p y * (Q y * P * (DensityMatrix.mixture p hp hs ρ).matrix * P).trace.re := by81      apply Finset.sum_congr rfl82      intro y _83      have he (x : α) : p y * p x * (Q y * P * (ρ x).matrix * P).trace.re =84          p y * (p x * (Q y * P * (ρ x).matrix * P).trace.re) := mul_assoc _ _ _85      simp only [he, ← Finset.mul_sum]86      rw [weighted_compressed_trace]87    _ ≤ ∑ y, p y * (a * b) := by88      apply Finset.sum_le_sum89      intro y _90      apply mul_le_mul_of_nonneg_left _ (hp y)91      exact (compressed_trace_le P _ (Q y) (hQ y) hcap).trans92        (mul_le_mul_of_nonneg_left (htrace y) ha)93    _ = a * b := by rw [← Finset.sum_mul, hs, one_mul]9495end Nonadditivity.QuantumCoding