Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§1.2: exact lossless memory

Proved
QAlgorithms.Papers.Independent.Intakenext100.P07.lossless_memory

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ε.

The minimum fixed binary memory for zero-error source compression is ceil(log2 |supp ρ_X|).

mbitsexact=⌈log⁡2∣supp⁡p∣⌉.m_{\rm bits}^{\rm exact}=\left\lceil\log_2|\operatorname{supp}p|\right\rceil.mbitsexact​=⌈log2​∣suppp∣⌉.

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.lossless
§1.2: exact lossless memory, arXiv:1504.00233v5, PDF p.12. -/
theorem lossless_memory [Nonempty X] (p : X → ℝ) (hp : paperProbability p) :
    let k := Nat.ceil (Real.logb 2 ((Finset.univ.filter (fun x => 0 < p x)).card:ℝ))
    (∃ c : paperSourceCode X (2^k), ∀ x, 0 < p x → c.decode (c.encode x) = x) ∧
    ∀ m : ℕ, (∃ c : paperSourceCode X (2^m), ∀ x, 0 < p x → c.decode (c.encode x) = x) → k ≤ m := by sorry

end QAlgorithms.Papers.Independent.Intakenext100.P07

end
Source
Quantum Information Processing with Finite Resources -- Mathematical Foundations, arXiv:1504.00233v5, PDF p. 12, §1.2: exact lossless memory
Read-back

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

Let XXX be a finite nonempty type, with decidable equality, and 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. Define s=∣{x∈X:p(x)>0}∣s=|\{x\in X:p(x)>0\}|s=∣{x∈X:p(x)>0}∣ and k=⌈log⁡2s⌉Nk=\lceil\log_2s\rceil_{\mathbb N}k=⌈log2​s⌉N​, where the ceiling is taken in the natural numbers. There exist functions encode:X→{0,…,2k−1}\mathrm{encode}:X\to\{0,\ldots,2^k-1\}encode:X→{0,…,2k−1} and decode:{0,…,2k−1}→X\mathrm{decode}:\{0,\ldots,2^k-1\}\to Xdecode:{0,…,2k−1}→X such that decode(encode(x))=x\mathrm{decode}(\mathrm{encode}(x))=xdecode(encode(x))=x whenever p(x)>0p(x)>0p(x)>0. Moreover, for every natural number mmm, if such functions exist with 2m2^m2m messages, then k≤mk\le mk≤m. No reconstruction condition is imposed on symbols of probability zero. The hypotheses ensure s≥1s\ge1s≥1; the statement includes k=0k=0k=0 and m=0m=0m=0, for which the message set has one element.

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