Exact Lean source
Nonadditivity.QuantumCodingRates
Download original .lean · View on GitHub · Jump to source
Direct imports
Nonadditivity.OperationalCapacityMathlib.Analysis.SpecificLimits.BasicdependencyMathlib.Algebra.Order.Floor.Ringdependency
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
Nonadditivity.QuantumCoding.achievableRate_of_finite_codesNonadditivity.QuantumCoding.expMessagesNonadditivity.QuantumCoding.expMessages_interference_leNonadditivity.QuantumCoding.expMessages_lowerNonadditivity.QuantumCoding.expMessages_posNonadditivity.QuantumCoding.expMessages_rate_lowerNonadditivity.QuantumCoding.expMessages_rate_lower._simp_1_1internal/detail/privateNonadditivity.QuantumCoding.expMessages_rate_lower._simp_1_2internal/detail/privateNonadditivity.QuantumCoding.expMessages_rate_lower._simp_1_3internal/detail/privateNonadditivity.QuantumCoding.expMessages_rate_lower._simp_1_4internal/detail/privateNonadditivity.QuantumCoding.expMessages_rate_lower._simp_1_5internal/detail/privateNonadditivity.QuantumCoding.expMessages_rate_lower._simp_1_6internal/detail/privateNonadditivity.QuantumCoding.expMessages_rate_lower._simp_1_7internal/detail/privateNonadditivity.QuantumCoding.expMessages_upperNonadditivity.QuantumCoding.exp_negative_blocklength_tendstoNonadditivity.QuantumCoding.exp_negative_blocklength_tendsto._simp_1_1internal/detail/privateNonadditivity.QuantumCoding.inverse_blocklength_tendstoNonadditivity.QuantumCoding.packingError_tendsto_zero
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 := by27exact Nat.ceil_pos.mpr (Real.exp_pos _)2829theorem expMessages_lower (r : ℝ) (n : ℕ) :30Real.exp (((n + 1 : ℕ) : ℝ) * r) ≤ (expMessages r n : ℝ) :=31Nat.le_ceil _3233theorem expMessages_upper {r : ℝ} (hr : 0 ≤ r) (n : ℕ) :34(expMessages r n : ℝ) ≤ 2 * Real.exp (((n + 1 : ℕ) : ℝ) * r) := by35have hc := Nat.ceil_lt_add_one (Real.exp_nonneg (((n + 1 : ℕ) : ℝ) * r))36have he : 1 ≤ Real.exp (((n + 1 : ℕ) : ℝ) * r) :=37Real.one_le_exp (mul_nonneg (Nat.cast_nonneg _) hr)38change (⌈Real.exp (((n + 1 : ℕ) : ℝ) * r)⌉₊ : ℝ) ≤ _39linarith4041/-- The rounded message counts meet the target rate at every length. -/42theorem expMessages_rate_lower (r : ℝ) (n : ℕ) :43r / Real.log 2 ≤ Scalar.log2 (expMessages r n) / ((n + 1 : ℕ) : ℝ) := by44have hn : (0 : ℝ) < ((n + 1 : ℕ) : ℝ) := by positivity45have hlog := Real.log_le_log (Real.exp_pos _) (expMessages_lower r n)46rw [Real.log_exp] at hlog47apply (le_div_iff₀ hn).mpr48apply (le_div_iff₀ Scalar.log_two_pos).mpr49have hcancel : r / Real.log 2 * ((n + 1 : ℕ) : ℝ) * Real.log 2 =50((n + 1 : ℕ) : ℝ) * r := by51field_simp52rwa [hcancel]5354theorem inverse_blocklength_tendsto :55Tendsto (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) :60Tendsto (fun n : ℕ => Real.exp (-((n + 1 : ℕ) : ℝ) * c)) atTop (𝓝 0) := by61have 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))63simpa only [← Real.exp_nat_mul, mul_neg, neg_mul] using64h.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) ≤692 * Real.exp (-((n + 1 : ℕ) : ℝ) * (I - r)) := by70calc71_ ≤ (2 * Real.exp (((n + 1 : ℕ) : ℝ) * r)) *72Real.exp (-((n + 1 : ℕ) : ℝ) * I) :=73mul_le_mul_of_nonneg_right (expMessages_upper hr n) (Real.exp_nonneg _)74_ = _ := by75rw [mul_assoc, ← Real.exp_add]76congr 277ring7879/-- The actual finite packing estimate vanishes with positive rate slack. -/80theorem packingError_tendsto_zero {r I : ℝ} (hr : 0 ≤ r) (hgap : r < I)81(V : ℝ) :82Tendsto (fun n : ℕ => V / ((n + 1 : ℕ) : ℝ) +834 * (expMessages r n : ℝ) * Real.exp (-((n + 1 : ℕ) : ℝ) * I))84atTop (𝓝 0) := by85have hfirst : Tendsto (fun n : ℕ => V / ((n + 1 : ℕ) : ℝ)) atTop (𝓝 0) := by86simpa only [mul_one_div, mul_zero] using inverse_blocklength_tendsto.const_mul V87have hsecond : Tendsto (fun n : ℕ =>884 * (expMessages r n : ℝ) * Real.exp (-((n + 1 : ℕ) : ℝ) * I))89atTop (𝓝 0) := by90apply squeeze_zero (fun n => by positivity)91(fun n => ?_) (by92simpa only [mul_zero] using93(exp_negative_blocklength_tendsto (sub_pos.mpr hgap)).const_mul 8)94have h := expMessages_interference_le hr I n95nlinarith96simpa 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 : ℕ) : ℝ) +1084 * (expMessages r n : ℝ) * Real.exp (-((n + 1 : ℕ) : ℝ) * I)) :109Operational.AchievableRate T (r / Real.log 2) := by110classical111let S : Operational.CodeSequence T := {112messages := expMessages r113messages_pos := expMessages_pos r114code := fun n => (hcode n).choose }115refine ⟨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 hq119apply Filter.Eventually.of_forall120intro n121exact hq.le.trans (expMessages_rate_lower r n)122123end Nonadditivity.QuantumCoding