Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§1.2 (1.6)–(1.7): one-shot compression sandwich

Open
QAlgorithms.Papers.Independent.Intakenext100.P07.one_shot_compression_sandwich

by Gohan · Oct 31, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

Let ppp be a probability law on a finite nonempty alphabet XXX. A code consists of an encoder into an alphabet of m≥1m\ge1m≥1 symbols and a decoder, and its error is the probability of recovering the wrong source symbol. Logs are binary, and H(p)H(p)H(p) is Shannon entropy. Introductory smooth max-entropy minimizes the order-1/21/21/2 Rényi entropy over normalized probability laws within variational distance ε\varepsilonε.

Let p be a finite probability source and 0<epsilon<1. For every 0<delta<epsilon, a code exists whenever log2 m is at least the variation-smoothed order-1/2 entropy at epsilon-delta plus log2(1/delta). Every epsilon-error code obeys the converse lower bound. The least positive feasible alphabet size m*(epsilon) exists and obeys the displayed sandwich.

Hmax⁡ε(p)≤log⁡2m∗(ε)≤inf⁡0<δ<ε⌈Hmax⁡ε−δ(p)+log⁡21δ⌉.H_{\max}^{\varepsilon}(p)\le\log_2m^*(\varepsilon)\le\inf_{0<\delta<\varepsilon}\left\lceil H_{\max}^{\varepsilon-\delta}(p)+\log_2\frac1\delta\right\rceil.Hmaxε​(p)≤log2​m∗(ε)≤0<δ<εinf​⌈Hmaxε−δ​(p)+log2​δ1​⌉.

This result records the source’s operational or structural relation, with the stated endpoint and attainment clauses retained.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intakenext100_P07
Formal statement
noncomputable section

open Filter

open scoped BigOperators Matrix ComplexConjugate ComplexOrder Matrix.Norms.L2Operator Topology

namespace QAlgorithms.Papers.Independent.Intakenext100.P07

attribute [local instance] Classical.propDecidable Classical.decEq

variable {I J A B C D X Y Z : Type*}

variable [Fintype I] [DecidableEq I] [Fintype J] [DecidableEq J]

variable [Fintype A] [DecidableEq A] [Fintype B] [DecidableEq B]

variable [Fintype C] [DecidableEq C] [Fintype D] [DecidableEq D]

variable [Fintype X] [DecidableEq X] [Fintype Y] [DecidableEq Y]

variable [Fintype Z] [DecidableEq Z]

/-- NODE paper:1504.00233#1.smoothcompression
Equations (1.6)-(1.7), PDF pp.13-14. The plan's rounding concern is discharged by an explicit power-of-two candidate:
m=2^ceil(H+log(1/d)). The minimum over all alphabet sizes is at most this candidate;
no power-of-two restriction is imposed on the optimum. Independent moderation pending. -/
theorem one_shot_compression_sandwich [Nonempty X] (p : X → ℝ) (hp : paperProbability p)
    (e : ℝ) (he : 0 < e) (he1 : e < 1) :
    (∀ d : ℝ, 0 < d → d < e → ∀ m : ℕ, 0 < m →
      introSmoothMax p (e-d)+Real.logb 2 (1/d) ≤ Real.logb 2 m →
      ∃ c : paperSourceCode X m, paperCodeError p c ≤ e) ∧
    (∀ m : ℕ, 0 < m → ∀ c : paperSourceCode X m, paperCodeError p c ≤ e → introSmoothMax p e ≤ Real.logb 2 m) ∧
    (0 < optimalCardinality p e ∧ ∃ c : paperSourceCode X (optimalCardinality p e), paperCodeError p c ≤ e) ∧
    introSmoothMax p e ≤ Real.logb 2 (optimalCardinality p e) ∧
    Real.logb 2 (optimalCardinality p e) ≤ sInf {v : ℝ | ∃ d : ℝ, 0 < d ∧ d < e ∧
      v = (Nat.ceil (introSmoothMax p (e-d)+Real.logb 2 (1/d)):ℝ)} := by sorry

end QAlgorithms.Papers.Independent.Intakenext100.P07

end
Source
Quantum Information Processing with Finite Resources -- Mathematical Foundations, arXiv:1504.00233v5, PDF p. 13, §1.2 (1.6)–(1.7): one-shot compression sandwich
Read-back

What the Lean code literally says, in plain math · gpt-6.1-sol

Let XXX be a nonempty finite type with decidable equality, let p:X→Rp:X\to\mathbb Rp:X→R satisfy p(x)≥0p(x)\ge0p(x)≥0 for every xxx and ∑xp(x)=1\sum_xp(x)=1∑x​p(x)=1, and let 0<e<10<e<10<e<1. For a real radius uuu, write

Hu(p)=inf⁡{2log⁡2 ⁣(∑xq(x)):q:X→R, q(x)≥0, ∑xq(x)=1, 12∑x∣p(x)−q(x)∣≤u},H_u(p)=\inf\left\{ 2\log_2\!\left(\sum_x\sqrt{q(x)}\right): q:X\to\mathbb R,\ q(x)\ge0,\ \sum_xq(x)=1,\ \frac12\sum_x|p(x)-q(x)|\le u \right\},Hu​(p)=inf{2log2​(x∑​q(x)​):q:X→R, q(x)≥0, x∑​q(x)=1, 21​x∑​∣p(x)−q(x)∣≤u},

where the infimum is taken in R\mathbb RR, with its total infimum convention. A code of cardinality mmm consists of functions f:X→{0,…,m−1}f:X\to\{0,\ldots,m-1\}f:X→{0,…,m−1} and g:{0,…,m−1}→Xg:\{0,\ldots,m-1\}\to Xg:{0,…,m−1}→X, and its error is ∑x:g(f(x))≠xp(x)\sum_{x:g(f(x))\ne x}p(x)∑x:g(f(x))=x​p(x). Let m∗(p,e)m_*(p,e)m∗​(p,e) be the natural-number infimum of the positive cardinalities admitting a code of error at most eee, with value 000 if that set is empty. The assertion is the conjunction of the following claims: for every real ddd with 0<d<e0<d<e0<d<e and every natural number m>0m>0m>0, the inequality He−d(p)+log⁡2(1/d)≤log⁡2mH_{e-d}(p)+\log_2(1/d)\le\log_2 mHe−d​(p)+log2​(1/d)≤log2​m implies that a code of cardinality mmm and error at most eee exists; every code of positive cardinality mmm and error at most eee satisfies He(p)≤log⁡2mH_e(p)\le\log_2 mHe​(p)≤log2​m; m∗(p,e)>0m_*(p,e)>0m∗​(p,e)>0 and a code of exactly that cardinality and error at most eee exists; and

He(p)≤log⁡2m∗(p,e)≤inf⁡{⌈He−d(p)+log⁡2(1/d)⌉N:d∈R, 0<d<e}.H_e(p)\le\log_2 m_*(p,e) \le \inf\left\{ \left\lceil H_{e-d}(p)+\log_2(1/d)\right\rceil_{\mathbb N}: d\in\mathbb R,\ 0<d<e \right\}.He​(p)≤log2​m∗​(p,e)≤inf{⌈He−d​(p)+log2​(1/d)⌉N​:d∈R, 0<d<e}.

In the last expression, the ceiling is the least natural number at least the displayed real number, so it is 000 when that number is nonpositive, and its result is then regarded as a real number before taking the infimum.

Human review
  • Endorsed by Shuze Chen · Oct 31, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 31, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me