Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.QuantumCodingRates

Download original .lean · View on GitHub · Jump to source

Direct imports

Imported by project modules

2 direct reverse imports

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

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

18 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.OperationalCapacity7import Mathlib.Analysis.SpecificLimits.Basic8import Mathlib.Algebra.Order.Floor.Ring910/-! # Integer message counts and the vanishing coding error1112Rounding exponential message counts up preserves the desired communication13rate. The finite typical-projector packing bound tends to zero whenever14that rate lies strictly below the interference exponent.15-/1617noncomputable section18namespace Nonadditivity.QuantumCoding1920open Filter Topology2122/-- Positive integer message counts at a specified rate in nats. -/23def expMessages (r : ℝ) (n : ℕ) : ℕ :=24  ⌈Real.exp (((n + 1 : ℕ) : ℝ) * r)⌉₊2526theorem expMessages_pos (r : ℝ) (n : ℕ) : 0 < expMessages r n := by27  exact Nat.ceil_pos.mpr (Real.exp_pos _)2829theorem expMessages_lower (r : ℝ) (n : ℕ) :30    Real.exp (((n + 1 : ℕ) : ℝ) * r) ≤ (expMessages r n : ℝ) :=31  Nat.le_ceil _3233theorem expMessages_upper {r : ℝ} (hr : 0 ≤ r) (n : ℕ) :34    (expMessages r n : ℝ) ≤ 2 * Real.exp (((n + 1 : ℕ) : ℝ) * r) := by35  have hc := Nat.ceil_lt_add_one (Real.exp_nonneg (((n + 1 : ℕ) : ℝ) * r))36  have he : 1 ≤ Real.exp (((n + 1 : ℕ) : ℝ) * r) :=37    Real.one_le_exp (mul_nonneg (Nat.cast_nonneg _) hr)38  change (⌈Real.exp (((n + 1 : ℕ) : ℝ) * r)⌉₊ : ℝ) ≤ _39  linarith4041/-- The rounded message counts meet the target rate at every length. -/42theorem expMessages_rate_lower (r : ℝ) (n : ℕ) :43    r / Real.log 2 ≤ Scalar.log2 (expMessages r n) / ((n + 1 : ℕ) : ℝ) := by44  have hn : (0 : ℝ) < ((n + 1 : ℕ) : ℝ) := by positivity45  have hlog := Real.log_le_log (Real.exp_pos _) (expMessages_lower r n)46  rw [Real.log_exp] at hlog47  apply (le_div_iff₀ hn).mpr48  apply (le_div_iff₀ Scalar.log_two_pos).mpr49  have hcancel : r / Real.log 2 * ((n + 1 : ℕ) : ℝ) * Real.log 2 =50      ((n + 1 : ℕ) : ℝ) * r := by51    field_simp52  rwa [hcancel]5354theorem inverse_blocklength_tendsto :55    Tendsto (fun n : ℕ => 1 / ((n + 1 : ℕ) : ℝ)) atTop (𝓝 0) :=56  (tendsto_const_nhds.div_atTop tendsto_natCast_atTop_atTop).comp57    (tendsto_add_atTop_nat 1)5859theorem exp_negative_blocklength_tendsto {c : ℝ} (hc : 0 < c) :60    Tendsto (fun n : ℕ => Real.exp (-((n + 1 : ℕ) : ℝ) * c)) atTop (𝓝 0) := by61  have h := tendsto_pow_atTop_nhds_zero_of_lt_one (Real.exp_nonneg (-c))62    (Real.exp_lt_one_iff.mpr (neg_neg_of_pos hc))63  simpa only [← Real.exp_nat_mul, mul_neg, neg_mul] using64    h.comp (tendsto_add_atTop_nat 1)6566/-- Explicit upper bound after choosing the integer number of messages. -/67theorem expMessages_interference_le {r : ℝ} (hr : 0 ≤ r) (I : ℝ) (n : ℕ) :68    (expMessages r n : ℝ) * Real.exp (-((n + 1 : ℕ) : ℝ) * I) ≤69      2 * Real.exp (-((n + 1 : ℕ) : ℝ) * (I - r)) := by70  calc71    _ ≤ (2 * Real.exp (((n + 1 : ℕ) : ℝ) * r)) *72        Real.exp (-((n + 1 : ℕ) : ℝ) * I) :=73      mul_le_mul_of_nonneg_right (expMessages_upper hr n) (Real.exp_nonneg _)74    _ = _ := by75      rw [mul_assoc, ← Real.exp_add]76      congr 277      ring7879/-- The actual finite packing estimate vanishes with positive rate slack. -/80theorem packingError_tendsto_zero {r I : ℝ} (hr : 0 ≤ r) (hgap : r < I)81    (V : ℝ) :82    Tendsto (fun n : ℕ => V / ((n + 1 : ℕ) : ℝ) +83      4 * (expMessages r n : ℝ) * Real.exp (-((n + 1 : ℕ) : ℝ) * I))84      atTop (𝓝 0) := by85  have hfirst : Tendsto (fun n : ℕ => V / ((n + 1 : ℕ) : ℝ)) atTop (𝓝 0) := by86    simpa only [mul_one_div, mul_zero] using inverse_blocklength_tendsto.const_mul V87  have hsecond : Tendsto (fun n : ℕ =>88      4 * (expMessages r n : ℝ) * Real.exp (-((n + 1 : ℕ) : ℝ) * I))89      atTop (𝓝 0) := by90    apply squeeze_zero (fun n => by positivity)91      (fun n => ?_) (by92        simpa only [mul_zero] using93          (exp_negative_blocklength_tendsto (sub_pos.mpr hgap)).const_mul 8)94    have h := expMessages_interference_le hr I n95    nlinarith96  simpa only [zero_add] using hfirst.add hsecond9798/-- Assemble an actual code at every length into an operationally achievable99rate. The premise is a quantitative statement about physical code errors,100and is discharged by the finite packing construction. -/101theorem achievableRate_of_finite_codes {ι ο κ : Type*}102    [Fintype ι] [DecidableEq ι] [Nonempty ι]103    [Fintype ο] [DecidableEq ο] [Nonempty ο] [Fintype κ]104    (T : Channels.KrausChannel ι ο κ) {r I : ℝ}105    (hr : 0 ≤ r) (hgap : r < I) (V : ℝ)106    (hcode : ∀ n, ∃ C : Operational.Code (RegularizedHolevo.positiveTensorPower T n)107      (expMessages r n), C.error ≤ V / ((n + 1 : ℕ) : ℝ) +108        4 * (expMessages r n : ℝ) * Real.exp (-((n + 1 : ℕ) : ℝ) * I)) :109    Operational.AchievableRate T (r / Real.log 2) := by110  classical111  let S : Operational.CodeSequence T := {112    messages := expMessages r113    messages_pos := expMessages_pos r114    code := fun n => (hcode n).choose }115  refine ⟨S, ?_, ?_⟩116  · apply squeeze_zero (fun n => (S.code n).error_nonneg)117      (fun n => (hcode n).choose_spec) (packingError_tendsto_zero hr hgap V)118  · intro q hq119    apply Filter.Eventually.of_forall120    intro n121    exact hq.le.trans (expMessages_rate_lower r n)122123end Nonadditivity.QuantumCoding