Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.QuantumCodingEnsembleTypicality

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

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

11 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.QuantumCodingPackingAverages7import Nonadditivity.QuantumCodingConditionalTypicality89/-! # Simultaneous global and conditional quantum typicality1011These estimates concern actual product output states and actual projectors.12Both lost probability and independently averaged test interference are13proved explicitly. The interference exponent is the ensemble's Holevo14information minus twice the tolerance.15-/1617noncomputable section18namespace Nonadditivity.QuantumCoding1920open Entropy21open scoped BigOperators ComplexOrder Matrix2223variable {ι α : Type*} [Fintype ι] [DecidableEq ι] [Fintype α]2425def ensembleConditionalEntropy (p : α → ℝ) (ρ : α → DensityMatrix ι) : ℝ :=26  ∑ a, p a * (ρ a).vonNeumann2728def ensembleConditionalVariance (p : α → ℝ) (ρ : α → DensityMatrix ι) : ℝ :=29  QuantumCodingConditionalTypicality.conditionalVariance p (fun a => (ρ a).weights)3031def conditionalTypicalProjector (p : α → ℝ) (ρ : α → DensityMatrix ι)32    (n : ℕ) (δ : ℝ) (x : Fin n → α) : Matrix (Fin n → ι) (Fin n → ι) ℂ :=33  tensorFamilyBandProjector (fun j => ρ (x j))34    ((n : ℝ) * ensembleConditionalEntropy p ρ) ((n : ℝ) * δ)3536theorem conditionalTypicalProjector_posSemidef (p : α → ℝ) (ρ : α → DensityMatrix ι)37    (n : ℕ) (δ : ℝ) (x : Fin n → α) :38    (conditionalTypicalProjector p ρ n δ x).PosSemidef :=39  tensorFamilyBandProjector_posSemidef _ _ _4041theorem conditionalTypicalProjector_idempotent (p : α → ℝ) (ρ : α → DensityMatrix ι)42    (n : ℕ) (δ : ℝ) (x : Fin n → α) :43    conditionalTypicalProjector p ρ n δ x * conditionalTypicalProjector p ρ n δ x =44      conditionalTypicalProjector p ρ n δ x :=45  tensorFamilyBandProjector_idempotent _ _ _4647theorem conditionalTypicalProjector_trace_bound (p : α → ℝ) (ρ : α → DensityMatrix ι)48    (n : ℕ) (δ : ℝ) (x : Fin n → α) :49    (conditionalTypicalProjector p ρ n δ x).trace.re ≤50      Real.exp ((n : ℝ) * ensembleConditionalEntropy p ρ + (n : ℝ) * δ) :=51  tensorFamilyBandProjector_trace_bound _ _ _5253/-- Conditional subspaces accept the actual ensemble word states with a54proved vanishing average error. -/55theorem conditionalTypicalProjector_average_acceptance_ge (p : α → ℝ)56    (hp : ∀ a, 0 ≤ p a) (hs : ∑ a, p a = 1) (ρ : α → DensityMatrix ι)57    {n : ℕ} (hn : 0 < n) {δ : ℝ} (hδ : 0 < δ) :58    1 - ensembleConditionalVariance p ρ / ((n : ℝ) * δ ^ 2) ≤59      ∑ x : Fin n → α, tensorWeights p n x *60        ((tensorFamilyState (fun j => ρ (x j))).matrix *61          conditionalTypicalProjector p ρ n δ x).trace.re := by62  simp only [conditionalTypicalProjector, tensorFamilyBandProjector_acceptance]63  exact QuantumCodingConditionalTypicality.average_conditional_band_mass_ge64    p (fun a => (ρ a).weights) hp hs (fun a => (ρ a).weights_nonneg)65      (fun a => (ρ a).weights_sum) n hn δ hδ6667theorem tensorState_average_acceptance (p : α → ℝ) (hp : ∀ a, 0 ≤ p a)68    (hs : ∑ a, p a = 1) (ρ : α → DensityMatrix ι) (n : ℕ)69    (P : Matrix (Fin n → ι) (Fin n → ι) ℂ) :70    (∑ x : Fin n → α, tensorWeights p n x *71      ((tensorFamilyState (fun j => ρ (x j))).matrix * P).trace.re) =72        ((tensorState (DensityMatrix.mixture p hp hs ρ) n).matrix * P).trace.re := by73  rw [tensorState_mixture_matrix]74  simp only [Matrix.sum_mul, Matrix.smul_mul, Matrix.trace_sum, Matrix.trace_smul,75    Complex.re_sum, smul_eq_mul, Complex.mul_re, Complex.ofReal_re,76    Complex.ofReal_im, zero_mul, sub_zero]7778/-- The global typical subspace accepts the same actual word ensemble. -/79theorem globalTypicalProjector_average_acceptance_ge (p : α → ℝ)80    (hp : ∀ a, 0 ≤ p a) (hs : ∑ a, p a = 1) (ρ : α → DensityMatrix ι)81    {n : ℕ} (hn : 0 < n) {δ : ℝ} (hδ : 0 < δ) :82    1 - QuantumCodingTypicality.variance (DensityMatrix.mixture p hp hs ρ).weights /83        ((n : ℝ) * δ ^ 2) ≤84      ∑ x : Fin n → α, tensorWeights p n x *85        ((tensorFamilyState (fun j => ρ (x j))).matrix *86          tensorTypicalProjector (DensityMatrix.mixture p hp hs ρ) n δ).trace.re := by87  rw [tensorState_average_acceptance]88  exact tensorTypicalProjector_acceptance_ge _ hn hδ8990/-- The exact one-shot interference estimate needed for random coding.91Its exponential rate is the actual finite ensemble Holevo information. -/92theorem typicalProjectors_average_cross_le (p : α → ℝ)93    (hp : ∀ a, 0 ≤ p a) (hs : ∑ a, p a = 1) (ρ : α → DensityMatrix ι)94    (n : ℕ) (δ : ℝ) :95    let σ := DensityMatrix.mixture p hp hs ρ96    let P := tensorTypicalProjector σ n δ97    (∑ y : Fin n → α, ∑ x : Fin n → α,98      tensorWeights p n y * tensorWeights p n x *99      (conditionalTypicalProjector p ρ n δ y * P *100        (tensorFamilyState (fun j => ρ (x j))).matrix * P).trace.re) ≤101      Real.exp (-(n : ℝ) * (σ.vonNeumann - ensembleConditionalEntropy p ρ - 2 * δ)) := by102  dsimp only103  let σ := DensityMatrix.mixture p hp hs ρ104  let P := tensorTypicalProjector σ n δ105  let a := Real.exp (-(n : ℝ) * (σ.vonNeumann - δ))106  let b := Real.exp ((n : ℝ) * ensembleConditionalEntropy p ρ + (n : ℝ) * δ)107  have hcap : ((a : ℂ) • (1 : Matrix (Fin n → ι) (Fin n → ι) ℂ) -108      P * (tensorState σ n).matrix * P).PosSemidef :=109    compression_cap_identity P _ (Real.exp_nonneg _) (tensorTypicalProjector_le_one σ n δ)110      (tensorTypicalProjector_compression_le σ n δ)111  have hmix : (DensityMatrix.mixture (tensorWeights p n)112      (tensorWeights_nonneg p hp n) (tensorWeights_sum p hs n)113      (fun x => tensorFamilyState (fun j => ρ (x j)))).matrix = (tensorState σ n).matrix :=114    (tensorState_mixture_matrix p hp hs ρ n).symm115  have h := average_cross_trace_le (tensorWeights p n) (tensorWeights_nonneg p hp n)116    (tensorWeights_sum p hs n) (fun x => tensorFamilyState (fun j => ρ (x j))) P117    (conditionalTypicalProjector p ρ n δ) (conditionalTypicalProjector_posSemidef p ρ n δ)118    (a := a) (b := b) (Real.exp_nonneg _)119    (conditionalTypicalProjector_trace_bound p ρ n δ) (by rw [hmix]; exact hcap)120  have hab : a * b =121      Real.exp (-(n : ℝ) * (σ.vonNeumann - ensembleConditionalEntropy p ρ - 2 * δ)) := by122    dsimp [a, b]123    rw [← Real.exp_add]124    congr 1125    ring126  rw [hab] at h127  exact h128129end Nonadditivity.QuantumCoding