Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.OperationalHolevoConverse

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

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

33 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.OperationalNaimark7import Nonadditivity.QuantumCodingTraceDistance89/-! # Entropy estimates for actual finite quantum codes -/1011noncomputable section1213namespace Nonadditivity.Operational1415open Entropy Channels QuantumCodingContinuity16open scoped BigOperators ComplexOrder1718variable {ι ο κ : Type*} [Fintype ι] [DecidableEq ι]19  [Fintype ο] [DecidableEq ο] [Fintype κ]2021def uniformWeight (M : ℕ) : Fin M → ℝ := fun _ => 1 / (M : ℝ)2223theorem uniformWeight_nonneg (M : ℕ) (m : Fin M) : 0 ≤ uniformWeight M m := by24  unfold uniformWeight25  positivity2627theorem uniformWeight_sum {M : ℕ} (hM : 0 < M) : ∑ m, uniformWeight M m = 1 := by28  simp [uniformWeight, Nat.ne_of_gt hM]2930theorem mean_sqrt_le_sqrt_mean {M : ℕ} (hM : 0 < M) (a : Fin M → ℝ)31    (ha : ∀ m, 0 ≤ a m) :32    (∑ m, Real.sqrt (a m)) / M ≤ Real.sqrt ((∑ m, a m) / M) := by33  have hMpos : (0 : ℝ) < M := by exact_mod_cast hM34  have hs := Real.sum_sqrt_mul_sqrt_le (Finset.univ : Finset (Fin M))35    (f := fun _ => (1 : ℝ)) (g := a) (fun _ => zero_le_one) ha36  simp only [Real.sqrt_one, one_mul, Finset.sum_const, Finset.card_univ,37    Fintype.card_fin, nsmul_eq_mul, mul_one] at hs38  have haSum : 0 ≤ ∑ m, a m := Finset.sum_nonneg fun m _ => ha m39  have hrootSum : 0 ≤ ∑ m, Real.sqrt (a m) := by positivity40  have hsq : (∑ m, Real.sqrt (a m)) ^ 2 ≤ (M : ℝ) * ∑ m, a m := by41    have hs2 := sq_le_sq₀ hrootSum42      (mul_nonneg (Real.sqrt_nonneg (M : ℝ)) (Real.sqrt_nonneg (∑ m, a m))) |>.mpr hs43    simpa only [mul_pow, Real.sq_sqrt hMpos.le, Real.sq_sqrt haSum] using hs244  apply Real.le_sqrt_of_sq_le45  have hh := div_le_div_of_nonneg_right hsq (sq_nonneg (M : ℝ))46  convert hh using 1 <;> field_simp4748def uniformAverage {M : ℕ} (hM : 0 < M) (ρ : Fin M → DensityMatrix ο) : DensityMatrix ο :=49  DensityMatrix.mixture (uniformWeight M) (uniformWeight_nonneg M) (uniformWeight_sum hM) ρ5051def uniformInformation {M : ℕ} (hM : 0 < M) (ρ : Fin M → DensityMatrix ο) : ℝ :=52  (uniformAverage hM ρ).vonNeumann - (∑ m, (ρ m).vonNeumann) / M5354namespace Code5556variable {T : KrausChannel ι ο κ} {M : ℕ}5758def outputEnsemble (C : Code T M) (hM : 0 < M) : StateEnsembles.Ensemble T.outputs where59  size := M60  weight := uniformWeight M61  weight_nonneg := uniformWeight_nonneg M62  weight_sum := uniformWeight_sum hM63  state := fun m => T.output (C.encode m)64  state_mem := fun m => ⟨C.encode m, rfl⟩6566theorem outputEnsemble_information (C : Code T M) (hM : 0 < M) :67    (C.outputEnsemble hM).information = uniformInformation hM (fun m => T.output (C.encode m)) := by68  unfold StateEnsembles.Ensemble.information uniformInformation69  congr 170  simp [outputEnsemble, uniformWeight, ← Finset.mul_sum, div_eq_mul_inv, mul_comm]71  left72  rfl7374theorem uniformInformation_le_holevo [Nonempty ο] (C : Code T M) (hM : 0 < M) :75    uniformInformation hM (fun m => T.output (C.encode m)) ≤ T.holevo := by76  rw [← C.outputEnsemble_information hM]77  exact le_csSup (StateEnsembles.information_bddAbove T.outputs) ⟨C.outputEnsemble hM, rfl⟩7879theorem mean_failure_eq_error (C : Code T M) (hM : 0 < M) :80    (∑ m, (1 - C.decode.probability (T.output (C.encode m)) m)) / M = C.error := by81  have hMne : (M : ℝ) ≠ 0 := by exact_mod_cast Nat.ne_of_gt hM82  simp only [Code.error, Code.success, Finset.sum_sub_distrib, Finset.sum_const,83    Finset.card_univ, Fintype.card_fin, nsmul_eq_mul, mul_one, sub_div,84    div_self hMne]8586end Code8788/-- Isometric Naimark dilation preserves the actual uniform ensemble's89Holevo information, including its average state. -/90theorem uniformInformation_dilate {μ : Type*} [Fintype μ] [DecidableEq μ]91    (P : POVM ο μ) {M : ℕ} (hM : 0 < M) (ρ : Fin M → DensityMatrix ο) :92    uniformInformation hM (fun m => P.dilate (ρ m)) = uniformInformation hM ρ := by93  unfold uniformInformation uniformAverage94  rw [← P.dilate_mixture]95  simp only [POVM.dilate_entropy]9697/-- Two ensembles with controlled mean trace distance and controlled98average-state distance have close Holevo informations. These distance99premises will be supplied by the actual decoder's gentle projection. -/100theorem uniformInformation_le_add_of_traceDistance [Nonempty ο]101    {M : ℕ} (hM : 0 < M) (ρ σ : Fin M → DensityMatrix ο) {t : ℝ}102    (haverage : traceDistance (uniformAverage hM σ) (uniformAverage hM ρ) ≤ t)103    (hstates : (∑ m, traceDistance (σ m) (ρ m)) / M ≤ t) :104    uniformInformation hM σ ≤ uniformInformation hM ρ +105      2 * t * Real.log (Fintype.card ο) + 4 * Real.log 2 := by106  have hd : 0 ≤ Real.log (Fintype.card ο : ℝ) :=107    Real.log_nonneg (by exact_mod_cast Fintype.card_pos)108  have hMpos : (0 : ℝ) < M := by exact_mod_cast hM109  have ha := (le_abs_self ((uniformAverage hM σ).vonNeumann -110    (uniformAverage hM ρ).vonNeumann)).trans111      (vonNeumann_traceDistance_bound_uniform (uniformAverage hM σ) (uniformAverage hM ρ))112  have ha' : (uniformAverage hM σ).vonNeumann - (uniformAverage hM ρ).vonNeumann ≤113      t * Real.log (Fintype.card ο) + 2 * Real.log 2 := by114    have hmul := mul_le_mul_of_nonneg_right haverage hd115    linarith116  have hs (m : Fin M) : (ρ m).vonNeumann - (σ m).vonNeumann ≤117      traceDistance (σ m) (ρ m) * Real.log (Fintype.card ο) + 2 * Real.log 2 := by118    have hh := vonNeumann_traceDistance_bound_uniform (σ m) (ρ m)119    have hl := (neg_le_abs ((σ m).vonNeumann - (ρ m).vonNeumann)).trans hh120    linarith121  have hb := div_le_div_of_nonneg_right122    (Finset.sum_le_sum fun m (_ : m ∈ Finset.univ) => hs m) hMpos.le123  have hleft : (∑ m, ((ρ m).vonNeumann - (σ m).vonNeumann)) / (M : ℝ) =124      (∑ m, (ρ m).vonNeumann) / M - (∑ m, (σ m).vonNeumann) / M := by125    rw [Finset.sum_sub_distrib, sub_div]126  have hright : (∑ m : Fin M, (traceDistance (σ m) (ρ m) *127      Real.log (Fintype.card ο) + 2 * Real.log 2)) / M =128      ((∑ m, traceDistance (σ m) (ρ m)) / M) * Real.log (Fintype.card ο) +129        2 * Real.log 2 := by130    rw [Finset.sum_add_distrib, ← Finset.sum_mul]131    simp only [Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul]132    field_simp133  rw [hleft, hright] at hb134  have hc := mul_le_mul_of_nonneg_right hstates hd135  unfold uniformInformation136  linarith137138/-- Convexity of trace distance discharges the average-state requirement,139so only the mean of the individual actual state distances is needed. -/140theorem uniformInformation_le_add_of_mean_traceDistance [Nonempty ο]141    {M : ℕ} (hM : 0 < M) (ρ σ : Fin M → DensityMatrix ο) {t : ℝ}142    (hstates : (∑ m, traceDistance (σ m) (ρ m)) / M ≤ t) :143    uniformInformation hM σ ≤ uniformInformation hM ρ +144      2 * t * Real.log (Fintype.card ο) + 4 * Real.log 2 := by145  apply uniformInformation_le_add_of_traceDistance hM ρ σ _ hstates146  have h := traceDistance_mixture_le (uniformWeight M) (uniformWeight_nonneg M)147    (uniformWeight_sum hM) σ ρ148  change traceDistance (uniformAverage hM σ) (uniformAverage hM ρ) ≤ _ at h149  have he : (∑ m, uniformWeight M m * traceDistance (σ m) (ρ m)) =150      (∑ m, traceDistance (σ m) (ρ m)) / M := by151    simp only [uniformWeight, ← Finset.mul_sum]152    ring153  rw [he] at h154  exact h.trans hstates155156end Nonadditivity.Operational