Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.OperationalBlockRates

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

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.OperationalCapacity7import Mathlib.Analysis.SpecificLimits.Basic89/-! # Full-length rate preservation when padding fixed-size channel blocks -/1011noncomputable section12namespace Nonadditivity.Operational.BlockRates13open Filter Topology1415/-- Number of complete blocks of `k+1` uses within a length-`n+1` code. -/16def blockCount (k n : ℕ) : ℕ := (n+1)/(k+1)1718/-- Positive-power index of the complete blocks; only its eventual values matter. -/19def blockIndex (k n : ℕ) : ℕ := blockCount k n - 12021theorem blockCount_tendsto (k : ℕ) : Tendsto (blockCount k) atTop atTop :=22  (Nat.tendsto_div_const_atTop (Nat.succ_ne_zero k)).comp (tendsto_add_atTop_nat 1)2324theorem blockIndex_tendsto (k : ℕ) : Tendsto (blockIndex k) atTop atTop :=25  (tendsto_sub_atTop_nat 1).comp (blockCount_tendsto k)2627theorem blockCount_pos {k n : ℕ} (h : k ≤ n) : 0 < blockCount k n := by28  unfold blockCount29  exact Nat.div_pos (by omega) (by omega)3031theorem blockIndex_add_one {k n : ℕ} (h : k ≤ n) :32    blockIndex k n + 1 = blockCount k n := by33  unfold blockIndex34  exact Nat.sub_add_cancel (blockCount_pos h)3536/-- At most `k` padding uses are discarded, so their relative cost vanishes. -/37theorem coveredFraction_tendsto_one (k : ℕ) :38    Tendsto (fun n => (blockCount k n : ℝ) * ((k+1 : ℕ) : ℝ) / ((n+1 : ℕ) : ℝ))39      atTop (𝓝 1) := by40  have hmod := (tendsto_mod_div_atTop_nhds_zero_nat (Nat.succ_pos k)).comp41    (tendsto_add_atTop_nat 1)42  have hlim : Tendsto (fun n : ℕ => 1 - (((n+1)%(k+1) : ℕ) : ℝ) /43      ((n+1 : ℕ) : ℝ)) atTop (𝓝 1) := by44    simpa using tendsto_const_nhds.sub hmod45  convert hlim using 146  funext n47  have hn : (((n+1 : ℕ) : ℝ)) ≠ 0 := by positivity48  have hid : ((((n+1)%(k+1) : ℕ) : ℝ)) + ((k+1 : ℕ) : ℝ) * (blockCount k n : ℝ) =49      ((n+1 : ℕ) : ℝ) := by exact_mod_cast Nat.mod_add_div (n+1) (k+1)50  field_simp51  nlinarith5253theorem blockCount_ratio_tendsto (k : ℕ) :54    Tendsto (fun n => (blockCount k n : ℝ) / ((n+1 : ℕ) : ℝ))55      atTop (𝓝 (1 / ((k+1 : ℕ) : ℝ))) := by56  have h := (coveredFraction_tendsto_one k).div_const ((k+1 : ℕ) : ℝ)57  convert h using 158  funext n59  have hk : (((k+1 : ℕ) : ℝ)) ≠ 0 := by positivity60  field_simp6162theorem blockIndex_ratio_tendsto (k : ℕ) :63    Tendsto (fun n => ((blockIndex k n+1 : ℕ) : ℝ) / ((n+1 : ℕ) : ℝ))64      atTop (𝓝 (1 / ((k+1 : ℕ) : ℝ))) := by65  apply (blockCount_ratio_tendsto k).congr'66  filter_upwards [eventually_ge_atTop k] with n hn67  rw [blockIndex_add_one hn]6869/-- Any eventual lower communication rate on complete blocks transfers to all70lengths with exactly the factor `k+1`, including the intervening padded lengths. -/71theorem rescaled_rate (k : ℕ) (f : ℕ → ℝ) {R : ℝ}72    (hR : ∀ r < R, ∀ᶠ n in atTop, r ≤ f n / ((n+1 : ℕ) : ℝ)) :73    ∀ r < R / ((k+1 : ℕ) : ℝ),74      ∀ᶠ n in atTop, r ≤ f (blockIndex k n) / ((n+1 : ℕ) : ℝ) := by75  intro r hr76  have hk : (0 : ℝ) < ((k+1 : ℕ) : ℝ) := by positivity77  have hrR : r * ((k+1 : ℕ) : ℝ) < R := (lt_div_iff₀ hk).mp hr78  obtain ⟨s, hrs, hsR⟩ := exists_between hrR79  have hrs' : r < s / ((k+1 : ℕ) : ℝ) := (lt_div_iff₀ hk).mpr hrs80  have hlimit : Tendsto (fun n => s *81      (((blockIndex k n+1 : ℕ) : ℝ) / ((n+1 : ℕ) : ℝ)))82      atTop (𝓝 (s / ((k+1 : ℕ) : ℝ))) := by83    simpa only [mul_one_div] using (blockIndex_ratio_tendsto k).const_mul s84  have hlower := (blockIndex_tendsto k).eventually (hR s hsR)85  have hnear : ∀ᶠ n in atTop, r < s *86      (((blockIndex k n+1 : ℕ) : ℝ) / ((n+1 : ℕ) : ℝ)) :=87    hlimit.eventually (lt_mem_nhds hrs')88  filter_upwards [hlower, hnear] with n hn hsn89  have hden : (0 : ℝ) < ((blockIndex k n+1 : ℕ) : ℝ) := by positivity90  have hn' := (le_div_iff₀ hden).mp hn91  apply hsn.le.trans92  rw [← mul_div_assoc]93  exact div_le_div_of_nonneg_right hn' (by positivity)9495/-- Vanishing errors remain vanishing under the complete-block subsequence. -/96theorem error_subsequence {E : ℕ → ℝ} (k : ℕ)97    (hE : Tendsto E atTop (𝓝 0)) :98    Tendsto (fun n => E (blockIndex k n)) atTop (𝓝 0) :=99  hE.comp (blockIndex_tendsto k)100101end Nonadditivity.Operational.BlockRates