Holevo Additivity Gap in Lean 4

Lean explorer

Exact Lean source

Nonadditivity.Scalar

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

Direct imports

  • Mathlib.Analysis.SpecialFunctions.Log.Basic dependency
  • Mathlib.Tactic.Linarith dependency
  • Mathlib.Tactic.FieldSimp dependency
  • Mathlib.Tactic.Ring dependency
  • Mathlib.Tactic.Positivity dependency
  • Mathlib.Tactic.NormNum dependency

Imported by project modules

4 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

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

24 declarations

Full module

1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Mathlib.Analysis.SpecialFunctions.Log.Basic7import Mathlib.Tactic.Linarith8import Mathlib.Tactic.FieldSimp9import Mathlib.Tactic.Ring10import Mathlib.Tactic.Positivity11import Mathlib.Tactic.NormNum1213/-!14# Scalar consequences of the nonadditivity construction1516All logarithms in information quantities are base two. This module proves17the real-variable inequalities in the manuscript. The channel quantities18are explicit real arguments: their quantum interpretation and the unitary19existence assertion are not asserted by this module.20-/2122noncomputable section2324namespace Nonadditivity.Scalar2526def log2 (x : ℝ) : ℝ := Real.log x / Real.log 227def aK (K : ℝ) : ℝ := log2 (1 + 9 / K)28def deltaK (K : ℝ) : ℝ := log2 K / K - 2 * aK K2930theorem log_two_pos : 0 < Real.log 2 := Real.log_pos (by norm_num)3132theorem aK_pos {K : ℝ} (hK : 0 < K) : 0 < aK K := by33  unfold aK log234  have h9 : 0 < 9 / K := by positivity35  exact div_pos (Real.log_pos (by linarith)) log_two_pos3637theorem aK_le {K : ℝ} (hK : 0 < K) : aK K ≤ 9 / (K * Real.log 2) := by38  have h := Real.log_le_sub_one_of_pos (show 0 < 1 + 9 / K by positivity)39  have h' : Real.log (1 + 9 / K) ≤ 9 / K := by linarith40  calc41    aK K ≤ (9 / K) / Real.log 2 :=42      (div_le_div_of_nonneg_right h' log_two_pos.le)43    _ = 9 / (K * Real.log 2) := by ring4445theorem deltaK_lower {K : ℝ} (hK : 0 < K) :46    (Real.log K - 18) / (K * Real.log 2) ≤ deltaK K := by47  have h := aK_le hK48  unfold deltaK log249  have heq : (Real.log K - 18) / (K * Real.log 2) =50      (Real.log K / Real.log 2) / K - 2 * (9 / (K * Real.log 2)) := by ring51  rw [heq]52  linarith5354theorem deltaK_pos {K : ℝ} (hK : 0 < K) (hlog : 18 < Real.log K) :55    0 < deltaK K := by56  exact lt_of_lt_of_le (div_pos (sub_pos.mpr hlog) (mul_pos hK log_two_pos))57    (deltaK_lower hK)5859theorem ratio_identity {K : ℝ} (hK : 0 < K) :60    1 + deltaK K / (2 * aK K) = log2 K / (2 * K * aK K) := by61  have ha := ne_of_gt (aK_pos hK)62  unfold deltaK63  field_simp64  ring6566theorem ratio_lower {K : ℝ} (hK : 1 < K) :67    Real.log K / 18 ≤ log2 K / (2 * K * aK K) := by68  have hK0 : 0 < K := by linarith69  have ha := aK_pos hK070  have hlog := (Real.log_pos hK).le71  have haBound := aK_le hK072  have hd : 0 < 2 * K * aK K := by positivity73  apply (le_div_iff₀ hd).mpr74  unfold log275  apply (le_div_iff₀ log_two_pos).mpr76  have hden : 2 * K * aK K * Real.log 2 ≤ 18 := by77    have h := (le_div_iff₀ (mul_pos hK0 log_two_pos)).mp haBound78    nlinarith79  nlinarith8081/-- Equation (certificate-gap), conditional only on the two stated82Holevo estimates. This is also the last algebraic step of the main theorem. -/83theorem holevo_gap {K n η χ₁ χ₂ : ℝ}84    (hχ₁ : χ₁ ≤ n * aK K + η)85    (hχ₂ : n * (log2 K / K) ≤ χ₂) :86    n * deltaK K - 2 * η ≤ χ₂ - 2 * χ₁ := by87  unfold deltaK88  nlinarith8990/-- Equation (capacity-gap), using the two-use coding lower bound. -/91theorem capacity_gap {K n η χ₁ χ₂ C : ℝ}92    (hχ₁ : χ₁ ≤ n * aK K + η)93    (hχ₂ : n * (log2 K / K) ≤ χ₂)94    (hC : χ₂ / 2 ≤ C) :95    n * deltaK K / 2 - η ≤ C - χ₁ := by96  have h := holevo_gap hχ₁ hχ₂97  linarith9899/-- The scalar final step of the switch and Weyl conversion, equations100(certificate-holevo). It states exactly which entropy identities are needed. -/101theorem conversion {K n κ s₁ s₂ χ₁ χ₂ : ℝ}102    (hs₁ : n * (log2 K - aK K) - 2 * log2 κ ≤ s₁)103    (hs₂ : s₂ ≤ n * (2 * log2 K - log2 K / K))104    (hχ₁ : χ₁ = n * log2 K - s₁)105    (hχ₂ : 2 * n * log2 K - s₂ ≤ χ₂) :106    χ₁ ≤ n * aK K + 2 * log2 κ ∧107      n * (log2 K / K) ≤ χ₂ := by108  constructor <;> nlinarith109110theorem purity_inflation {L r κ : ℝ} (hL : 0 < L) (hκ : 1 ≤ κ) :111    1 + L * (κ ^ 2 * ((r - 1) / L)) ≤ κ ^ 2 * r := by112  have hκsq : 1 ≤ κ ^ 2 := by nlinarith113  have hid : L * (κ ^ 2 * ((r - 1) / L)) = κ ^ 2 * (r - 1) := by114    field_simp115  rw [hid]116  nlinarith117118/-- The basic implication used in Lemma (purity), including the zero case. -/119theorem norm_bound_of_square {x t : ℝ} (ht : 0 ≤ t)120    (h : x ^ 2 ≤ t * x) : x ≤ t := by121  nlinarith122123end Nonadditivity.Scalar