Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.Dimensions

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

Direct imports

  • Nonadditivity.Scalar
  • Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics dependency
  • Mathlib.Algebra.Order.Floor.Semiring dependency

Imported by project modules

3 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

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

8 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.Scalar7import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics8import Mathlib.Algebra.Order.Floor.Semiring910/-!11# The input-qubit count for the exact integer dimension1213These are numerical dimension statements. They do not assert existence of a14channel with these dimensions. Unlike a big-O-only estimate, the ceiling15error below vanishes even after multiplication by the block length.16-/1718noncomputable section1920namespace Nonadditivity.Dimensions2122open Scalar Filter Topology2324def inputDimension (K N n : ℕ) : ℕ := 2 * N ^ n * K ^ (2 * n)25def matrixDimension (b : ℝ) (n : ℕ) : ℕ := ⌈Real.exp (b * n)⌉₊26def inputQubits (K N n : ℕ) : ℝ := log2 (inputDimension K N n : ℝ)2728theorem input_qubits_formula {K N : ℕ} (n : ℕ) (hK : 0 < K) (hN : 0 < N) :29    inputQubits K N n = 1 + (n : ℝ) * log2 N + 2 * (n : ℝ) * log2 K := by30  have hKr : (K : ℝ) ≠ 0 := by exact_mod_cast Nat.ne_of_gt hK31  have hNr : (N : ℝ) ≠ 0 := by exact_mod_cast Nat.ne_of_gt hN32  unfold inputQubits inputDimension log233  push_cast34  rw [Real.log_mul (by positivity) (pow_ne_zero _ hKr),35    Real.log_mul (by norm_num) (pow_ne_zero _ hNr), Real.log_pow, Real.log_pow]36  push_cast37  field_simp3839theorem matrixDimension_pos (b : ℝ) (n : ℕ) : 0 < matrixDimension b n := by40  apply Nat.ceil_pos.mpr41  exact Real.exp_pos _4243/-- The exact ceiling contributes at most exp(-bn) to its logarithm. -/44theorem log_matrixDimension_error (b : ℝ) (n : ℕ) :45    0 ≤ Real.log (matrixDimension b n : ℝ) - b * n ∧46      Real.log (matrixDimension b n : ℝ) - b * n ≤ Real.exp (-(b * n)) := by47  have hexp : 0 < Real.exp (b * n) := Real.exp_pos _48  have hN : 0 < (matrixDimension b n : ℝ) := by49    exact_mod_cast matrixDimension_pos b n50  have hlo : Real.exp (b * n) ≤ (matrixDimension b n : ℝ) := Nat.le_ceil _51  have hhi : (matrixDimension b n : ℝ) ≤ Real.exp (b * n) + 1 :=52    (Nat.ceil_lt_add_one hexp.le).le53  have hloglo := Real.log_le_log hexp hlo54  rw [Real.log_exp] at hloglo55  have hloghi := Real.log_le_log hN hhi56  have hsplit : Real.exp (b * n) + 1 =57      Real.exp (b * n) * (1 + Real.exp (-(b * n))) := by58    rw [mul_add, mul_one, ← Real.exp_add]59    simp60  rw [hsplit, Real.log_mul hexp.ne' (by positivity), Real.log_exp] at hloghi61  have hsmall := Real.log_le_sub_one_of_pos62      (show 0 < 1 + Real.exp (-(b * n)) by positivity)63  constructor <;> linarith6465theorem weighted_log_ceiling_error_tendsto {b : ℝ} (hb : 0 < b) :66    Tendsto (fun n : ℕ => (n : ℝ) *67      (Real.log (matrixDimension b n : ℝ) - b * n)) atTop (𝓝 0) := by68  have hexp : Tendsto (fun n : ℕ => (n : ℝ) * Real.exp (-(b * n))) atTop (𝓝 0) := by69    simpa only [Real.rpow_one, neg_mul] using70      (tendsto_rpow_mul_exp_neg_mul_atTop_nhds_zero 1 b hb).comp71      tendsto_natCast_atTop_atTop72  apply squeeze_zero (fun n => mul_nonneg (Nat.cast_nonneg n)73      (log_matrixDimension_error b n).1)74    (fun n => mul_le_mul_of_nonneg_left (log_matrixDimension_error b n).275      (Nat.cast_nonneg n)) hexp7677/-- The input-size equation in the manuscript, including the o(1) ceiling78correction. Written as a remainder tending to zero to avoid informal notation. -/79theorem input_size_remainder_tendsto {K : ℕ} (hK : 0 < K) {b : ℝ} (hb : 0 < b) :80    Tendsto (fun n : ℕ => inputQubits K (matrixDimension b n) n -81      (b / Real.log 2 * (n : ℝ) ^ 2 + 2 * (n : ℝ) * log2 K + 1))82      atTop (𝓝 0) := by83  have h : Tendsto (fun n : ℕ => ((n : ℝ) *84      (Real.log (matrixDimension b n : ℝ) - b * n)) / Real.log 2) atTop (𝓝 0) := by85    simpa only [zero_div] using86      (weighted_log_ceiling_error_tendsto hb).div_const (Real.log 2)87  convert h using 188  ext n89  rw [input_qubits_formula n hK (matrixDimension_pos b n)]90  unfold log291  ring9293end Nonadditivity.Dimensions