Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 7: iid ensemble Gallager error bound

Open
QAlgorithms.Papers.Independent.Intake100.P31.theorem7

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

prove2quantum

Let n≥1n\ge1n≥1 and let Cr≤F2nC_r\le\mathbb F_2^nCr​≤F2n​ be indexed by a finite nonempty seed set III, sampled uniformly and independently of inputs. Repeated codes at distinct seeds retain their multiplicity. Write tmin⁡=min⁡rdim⁡Crt_{\min}=\min_r\dim C_rtmin​=minr​dimCr​ and tmax⁡=max⁡rdim⁡Crt_{\max}=\max_r\dim C_rtmax​=maxr​dimCr​. A dimension-ttt universality bound means Pr⁡r[x∈Cr]≤ε2t−n\Pr_r[x\in C_r]\le\varepsilon 2^{t-n}Prr​[x∈Cr​]≤ε2t−n for every nonzero xxx. For a normalized additive error law PPP, independent of the seed and uniformly transmitted codeword, let P^(k)=Pr⁡[∣X∣=k]\widehat P(k)=\Pr[|X|=k]P(k)=Pr[∣X∣=k]. Write [a]+=max⁡{a,0}[a]_+=\max\{a,0\}[a]+​=max{a,0} and FR(k)=2−n[1−h(min⁡{k/n,1/2})−R]+F_R(k)=2^{-n[1-h(\min\{k/n,1/2\})-R]_+}FR​(k)=2−n[1−h(min{k/n,1/2})−R]+​. Decoding means ML word decoding with a fixed syndrome-based deterministic tie rule, followed by quotient projection when an inner code is specified. For s∈[0,1]s\in[0,1]s∈[0,1] and p∈[0,1]p\in[0,1]p∈[0,1], define E0(s,p)=s−(1+s)log⁡2(p1/(1+s)+(1−p)1/(1+s))E_0(s,p)=s-(1+s)\log_2(p^{1/(1+s)}+(1-p)^{1/(1+s)})E0​(s,p)=s−(1+s)log2​(p1/(1+s)+(1−p)1/(1+s)) and E(R,p)=max⁡0≤s≤1[−sR+E0(s,p)]E(R,p)=\max_{0\le s\le1}[-sR+E_0(s,p)]E(R,p)=max0≤s≤1​[−sR+E0​(s,p)]. Suppose maximum-dimension universality holds with ε>0\varepsilon>0ε>0. For iid Bernoulli noise with parameter p∈[0,1]p\in[0,1]p∈[0,1] and rate R=tmax⁡/nR=t_{\max}/nR=tmax​/n,

ErPe(Cr)≤min⁡0≤s≤1εs2−n[−sR+E0(s,p)].\mathbb E_r P_e(C_r)\le\min_{0\le s\le1}\varepsilon^s2^{-n[-sR+E_0(s,p)]}.Er​Pe​(Cr​)≤0≤s≤1min​εs2−n[−sR+E0​(s,p)].

The factor εs\varepsilon^sεs remains inside the minimum. The decoder is ML for the actual parameter, including both deterministic endpoints and p>1/2p>1/2p>1/2.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intake100_P31
Formal statement
noncomputable section

namespace QAlgorithms.Papers.Independent.Intake100.P31

open scoped BigOperators Matrix ComplexConjugate

open QAlgorithms

local instance {n : ℕ} (C : BinaryLinearCode n) : Fintype C := Fintype.ofFinite C

/-- PDF p.10, Theorem 7: iid ML bound for all p in [0,1], including p>1/2. -/
theorem theorem7 {n : ℕ} (hn : 0 < n) {I : Type*} [Fintype I] [Nonempty I]
    (C : I → BinaryLinearCode n) (eps : ℝ) (heps : 0 < eps)
    (hu : UniversalAt C (maxDim C) eps) (p : ℝ) (hp : p ∈ Set.Icc 0 1) :
    avg (fun r => cosetWordError ⊥ (C r) (bsc p)) ≤
      gallagerBound n ((maxDim C : ℝ) / n) p eps := by sorry

end QAlgorithms.Papers.Independent.Intake100.P31

end
Source
Dual universality of hash functions and its applications to quantum cryptography, arXiv:1101.0064v4, PDF p. 10, Theorem 7: iid ensemble Gallager error bound
Read-back

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

For every positive integer nnn, every finite nonempty seed type III, every family Cr⊆F2nC_r\subseteq\mathbb F_2^nCr​⊆F2n​ of binary linear subspaces, every real ε>0\varepsilon>0ε>0, and every p∈[0,1]p\in[0,1]p∈[0,1], let d=max⁡r∈Idim⁡Crd=\max_{r\in I}\dim C_rd=maxr∈I​dimCr​, R=d/nR=d/nR=d/n, and assume

∀v≠0,∣{r∈I:v∈Cr}∣∣I∣≤ε 2d−n.\forall v\ne0,\qquad \frac{|\{r\in I:v\in C_r\}|}{|I|}\le\varepsilon\,2^{d-n}.∀v=0,∣I∣∣{r∈I:v∈Cr​}∣​≤ε2d−n.

Define Pp(x)=∏i=1n(1−p)P_p(x)=\prod_{i=1}^{n}(1-p)Pp​(x)=∏i=1n​(1−p) or ppp, taking the factor 1−p1-p1−p when xi=0x_i=0xi​=0 and ppp otherwise. For each code CCC, let a^C(y)=y−e\widehat a_C(y)=y-eaC​(y)=y−e, where eee is the fixed chosen maximizer of Pp(e)P_p(e)Pp​(e) among errors satisfying y−e∈Cy-e\in Cy−e∈C. Set

E0(s,p)=s−(1+s)log⁡2 ⁣(p1/(1+s)+(1−p)1/(1+s)).E_0(s,p)=s-(1+s)\log_2\!\left(p^{1/(1+s)}+(1-p)^{1/(1+s)}\right).E0​(s,p)=s−(1+s)log2​(p1/(1+s)+(1−p)1/(1+s)).

Then

1∣I∣∑r∈I1∣Cr∣∑a∈Cr∑xPp(x) 1{a^Cr(a+x)≠a}≤inf⁡0≤s≤1εs 2−n(−sR+E0(s,p)).\frac1{|I|}\sum_{r\in I}\frac1{|C_r|} \sum_{a\in C_r}\sum_x P_p(x)\, \mathbf1_{\{\widehat a_{C_r}(a+x)\ne a\}} \le \inf_{0\le s\le1} \varepsilon^s\,2^{-n(-sR+E_0(s,p))}.∣I∣1​r∈I∑​∣Cr​∣1​a∈Cr​∑​x∑​Pp​(x)1{aCr​​(a+x)=a}​≤0≤s≤1inf​εs2−n(−sR+E0​(s,p)).

The hypotheses include p=0p=0p=0, p=1p=1p=1, and families containing the zero subspace; they require only ε>0\varepsilon>0ε>0, not ε≥1\varepsilon\ge1ε≥1.

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