Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.OperationalWeakConverse

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

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

20 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.OperationalProjectedCode7import Nonadditivity.QuantumCodingGentle8import Nonadditivity.OperationalCapacity910/-! # Operational Holevo weak converse from actual decoders1112The proof embeds the actual POVM by its concrete Naimark isometry, projects13each successful message into its orthogonal label, and uses the proved gentle14projection and entropy-continuity estimates. No measured relative entropy15or coding inequality is assumed.16-/1718noncomputable section1920namespace Nonadditivity.Operational2122open Entropy Channels QuantumCodingContinuity OperationalFlaggedEntropy RegularizedHolevo23open Filter Topology24open scoped BigOperators ComplexOrder2526namespace POVM2728variable {ο μ : Type*} [Fintype ο] [DecidableEq ο] [Nonempty ο]29  [Fintype μ] [DecidableEq μ]3031/-- The actual orthogonal comparison state is close whenever that message32is decoded with high probability, including zero-probability fallback. -/33theorem projectedState_traceDistance (P : POVM ο μ) (ρ : DensityMatrix ο) (m : μ) :34    traceDistance (P.projectedState ρ m) (P.dilate ρ) ≤35      Real.sqrt (2 * (1 - P.probability ρ m)) := by36  by_cases h : 0 < P.probability ρ m37  · rw [traceDistance_comm]38    exact traceDistance_gentle_projection (P.dilate ρ) (P.projectedState ρ m)39      (labelProjection m) (labelProjection_hermitian m) (labelProjection_idempotent m)40      (P.probability ρ m) h (P.probability_le_one ρ m)41      (P.labelProjection_compress_trace ρ m)42      (by simpa only [Complex.ofReal_inv] using P.projectedState_matrix_of_pos ρ m h)43  · have hz : P.probability ρ m = 0 :=44      le_antisymm (le_of_not_gt h) (P.probability_nonneg ρ m)45    rw [hz]46    exact (traceDistance_le_one _ _).trans (by norm_num)4748end POVM4950namespace Code5152variable {ι ο κ : Type*} [Fintype ι] [DecidableEq ι]53  [Fintype ο] [DecidableEq ο] [Nonempty ο] [Fintype κ]54variable {T : KrausChannel ι ο κ} {M : ℕ}5556theorem mean_projected_distance_le (C : Code T M) (hM : 0 < M) :57    (∑ m, traceDistance (C.decode.projectedState (T.output (C.encode m)) m)58      (C.decode.dilate (T.output (C.encode m)))) / M ≤ Real.sqrt (2 * C.error) := by59  have h₁ := div_le_div_of_nonneg_right (Finset.sum_le_sum fun m (_ : m ∈ Finset.univ) =>60    C.decode.projectedState_traceDistance (T.output (C.encode m)) m) (Nat.cast_nonneg M)61  have h₂ := mean_sqrt_le_sqrt_mean hM62    (fun m => 2 * (1 - C.decode.probability (T.output (C.encode m)) m))63    (fun m => mul_nonneg (by norm_num) (sub_nonneg.mpr (C.decode.probability_le_one _ m)))64  have he : (∑ m, 2 * (1 - C.decode.probability (T.output (C.encode m)) m)) / M =65      2 * C.error := by66    rw [← Finset.mul_sum, mul_div_assoc, C.mean_failure_eq_error hM]67  rw [he] at h₂68  exact h₁.trans h₂6970/-- A finite-block Holevo converse for actual channel input codewords and71actual POVM decoding error. All analytic and coding inequalities are proved. -/72theorem log_messages_le_holevo_add_error (C : Code T M) (hM : 0 < M) :73    Real.log M ≤ T.holevo + 2 * Real.sqrt (2 * C.error) *74      Real.log ((M : ℝ) * Fintype.card ο) + 4 * Real.log 2 := by75  letI : NeZero M := ⟨Nat.ne_of_gt hM⟩76  have h := uniformInformation_le_add_of_mean_traceDistance hM77    (fun m => C.decode.dilate (T.output (C.encode m)))78    (fun m => C.decode.projectedState (T.output (C.encode m)) m)79    (C.mean_projected_distance_le hM)80  rw [uniformInformation_dilate] at h81  have hflag : uniformInformation hM82      (fun m => C.decode.projectedState (T.output (C.encode m)) m) = Real.log M :=83    uniformInformation_flags hM (fun m => C.decode.normalizedBlockState (T.output (C.encode m)) m)84  rw [hflag, Fintype.card_prod, Fintype.card_fin, Nat.cast_mul] at h85  have hinfo := C.uniformInformation_le_holevo hM86  linarith8788/-- At error at most one half, the actual dimension packing estimate89eliminates the message count from the continuity loss. -/90theorem log_messages_le_holevo_add_dimension_error (C : Code T M) (hM : 0 < M)91    (he : C.error ≤ 1 / 2) :92    Real.log M ≤ T.holevo + 2 * Real.sqrt (2 * C.error) *93      (Real.log 2 + 2 * Real.log (Fintype.card ο)) + 4 * Real.log 2 := by94  have hd : (0 : ℝ) < Fintype.card ο := by exact_mod_cast Fintype.card_pos95  have hMpos : (0 : ℝ) < M := by exact_mod_cast hM96  have hp := C.messages_le_dimension_div_one_sub_error (by norm_num) he97  norm_num at hp98  have hprod : (M : ℝ) * Fintype.card ο ≤ 2 * (Fintype.card ο : ℝ) ^ 2 := by99    nlinarith100  have hl := Real.log_le_log (mul_pos hMpos hd) hprod101  rw [Real.log_mul (by norm_num : (2 : ℝ) ≠ 0) (pow_ne_zero _ hd.ne'),102    Real.log_pow] at hl103  norm_num only [Nat.cast_ofNat] at hl104  have hm := mul_le_mul_of_nonneg_left hl105    (mul_nonneg (by norm_num : (0 : ℝ) ≤ 2) (Real.sqrt_nonneg (2 * C.error)))106  have hh := C.log_messages_le_holevo_add_error hM107  linarith108109end Code110111namespace CodeSequence112113variable {ι ο κ : Type*} [Fintype ι] [DecidableEq ι]114  [Fintype ο] [DecidableEq ο] [Nonempty ο] [Fintype κ]115variable {T : KrausChannel ι ο κ}116117/-- Explicit loss in the finite-block rate converse. -/118def holevoCorrection (S : CodeSequence T) (n : ℕ) : ℝ :=119  4 * Real.sqrt (2 * (S.code n).error) * Scalar.log2 (Fintype.card ο) +120    (2 * Real.sqrt (2 * (S.code n).error) + 4) / ((n + 1 : ℕ) : ℝ)121122theorem rate_le_normalizedPowerHolevo_add_correction (S : CodeSequence T) (n : ℕ)123    (he : (S.code n).error ≤ 1 / 2) :124    S.rate n ≤ normalizedPowerHolevo T n + S.holevoCorrection n := by125  have h := (S.code n).log_messages_le_holevo_add_dimension_error (S.messages_pos n) he126  simp only [positiveTensorIndex_card, Nat.cast_pow, Real.log_pow] at h127  have hn : (0 : ℝ) < ((n + 1 : ℕ) : ℝ) := by positivity128  have hd := div_le_div_of_nonneg_right h (mul_nonneg Scalar.log_two_pos.le hn.le)129  convert hd using 1 <;>130    dsimp [rate, holevoCorrection, normalizedPowerHolevo, KrausChannel.holevoBits, Scalar.log2] <;>131    (field_simp; all_goals ring)132133omit [Nonempty ο] in134theorem holevoCorrection_tendsto_zero (S : CodeSequence T) (he : S.VanishingError) :135    Tendsto (S.holevoCorrection) atTop (𝓝 0) := by136  have hs : Tendsto (fun n => Real.sqrt (2 * (S.code n).error)) atTop (𝓝 0) := by137    simpa using (he.const_mul 2).sqrt138  have hl : Tendsto (fun n : ℕ => ((n + 1 : ℕ) : ℝ)) atTop atTop :=139    tendsto_natCast_atTop_atTop.comp (tendsto_add_atTop_nat 1)140  have hfirst : Tendsto (fun n => 4 * Real.sqrt (2 * (S.code n).error) *141      Scalar.log2 (Fintype.card ο)) atTop (𝓝 0) := by142    simpa using (hs.const_mul 4).mul_const (Scalar.log2 (Fintype.card ο))143  have hsecond : Tendsto (fun n => (2 * Real.sqrt (2 * (S.code n).error) + 4) /144      ((n + 1 : ℕ) : ℝ)) atTop (𝓝 0) := by145    exact ((hs.const_mul 2).add_const 4).div_atTop hl146  simpa only [holevoCorrection, zero_add] using hfirst.add hsecond147148variable [Nonempty ι]149150theorem hasRate_le_regularizedHolevoSupremum (S : CodeSequence T) {R : ℝ}151    (he : S.VanishingError) (hr : S.HasRate R) :152    R ≤ sSup (Set.range (normalizedPowerHolevo T)) := by153  let C := sSup (Set.range (normalizedPowerHolevo T))154  have hb : BddAbove (Set.range (normalizedPowerHolevo T)) := by155    refine ⟨Scalar.log2 (Fintype.card ο), ?_⟩156    rintro _ ⟨n, rfl⟩157    exact normalizedPowerHolevo_le T n158  have hle (n : ℕ) : normalizedPowerHolevo T n ≤ C := le_csSup hb ⟨n, rfl⟩159  have hbound : ∀ᶠ n in atTop, S.rate n ≤ C + S.holevoCorrection n := by160    have hevent : ∀ᶠ n in atTop, (S.code n).error < 1 / 2 :=161      he.eventually (gt_mem_nhds (by norm_num))162    filter_upwards [hevent] with n hn163    have h₁ := S.rate_le_normalizedPowerHolevo_add_correction n hn.le164    linarith [hle n]165  have hlimit : Tendsto (fun n => C + S.holevoCorrection n) atTop (𝓝 C) := by166    simpa using tendsto_const_nhds.add (S.holevoCorrection_tendsto_zero he)167  by_contra h168  have hCR : C < R := lt_of_not_ge h169  let r := (C + R) / 2170  have hCr : C < r := by dsimp [r]; linarith171  have hrR : r < R := by dsimp [r]; linarith172  have hlo : ∀ᶠ n in atTop, r ≤ C + S.holevoCorrection n := by173    filter_upwards [hr r hrR, hbound] with n hn hb using hn.trans hb174  have hc := ge_of_tendsto hlimit hlo175  linarith176177end CodeSequence178179variable {ι ο κ : Type*} [Fintype ι] [DecidableEq ι] [Nonempty ι]180  [Fintype ο] [DecidableEq ο] [Nonempty ο] [Fintype κ]181182/-- Every operationally achievable rate is bounded by the regularized183Holevo supremum, with no coding theorem used as an assumption. -/184theorem achievableRate_le_regularizedHolevoSupremum {T : KrausChannel ι ο κ} {R : ℝ}185    (hR : AchievableRate T R) : R ≤ sSup (Set.range (normalizedPowerHolevo T)) := by186  obtain ⟨S, he, hr⟩ := hR187  exact S.hasRate_le_regularizedHolevoSupremum he hr188189/-- Operational capacity, independently defined through actual encoders and190decoders with vanishing average error, is at most the regularized Holevo191supremum of the genuine tensor powers. -/192theorem operationalCapacity_le_regularizedHolevoSupremum (T : KrausChannel ι ο κ) :193    operationalCapacity T ≤ sSup (Set.range (normalizedPowerHolevo T)) :=194  csSup_le ⟨0, zero_achievable T⟩ (fun _ h => achievableRate_le_regularizedHolevoSupremum h)195196end Nonadditivity.Operational