Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Corollary 3: reliability exponent and positivity

Open
QAlgorithms.Papers.Independent.Intake100.P31.corollary3

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 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)]. For maximum-dimension universality with ε>0\varepsilon>0ε>0, iid BSC parameter p∈[0,1]p\in[0,1]p∈[0,1], and R=tmax⁡/nR=t_{\max}/nR=tmax​/n, the ML word error satisfies

ErPe(Cr)≤2−nE(R,p)max⁡{ε,1},R<1−h(p)⟹E(R,p)>0.\mathbb E_r P_e(C_r)\le2^{-nE(R,p)}\max\{\varepsilon,1\},\qquad R<1-h(p)\Longrightarrow E(R,p)>0.Er​Pe​(Cr​)≤2−nE(R,p)max{ε,1},R<1−h(p)⟹E(R,p)>0.

This retains both the ensemble bound and its positivity regime.

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, Corollary 3: gallagerExponent bound and the strictly positive regime. -/
theorem corollary3 {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)) ≤
      (2 : ℝ) ^ (-(n : ℝ) * gallagerExponent ((maxDim C : ℝ) / n) p) * max eps 1 ∧
    (((maxDim C : ℝ) / n) < 1 - binEntropy2 p →
      0 < gallagerExponent ((maxDim C : ℝ) / n) p) := 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, Corollary 3: reliability exponent and positivity
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], put d=max⁡r∈Idim⁡Crd=\max_{r\in I}\dim C_rd=maxr∈I​dimCr​ and R=d/nR=d/nR=d/n, and assume that ∣{r:v∈Cr}∣/∣I∣≤ε2d−n|\{r:v\in C_r\}|/|I|\le\varepsilon2^{d-n}∣{r:v∈Cr​}∣/∣I∣≤ε2d−n for every nonzero v∈F2nv\in\mathbb F_2^nv∈F2n​. Define

Pp(x)=∏i=1n{1−p,xi=0,p,xi≠0,E(R,p)=sup⁡0≤s≤1[−sR+s−(1+s)log⁡2 ⁣(p1/(1+s)+(1−p)1/(1+s))].P_p(x)=\prod_{i=1}^{n} \begin{cases}1-p,&x_i=0,\\p,&x_i\ne0,\end{cases} \qquad E(R,p)=\sup_{0\le s\le1} \left[-sR+s-(1+s)\log_2\!\left(p^{1/(1+s)}+(1-p)^{1/(1+s)}\right)\right].Pp​(x)=i=1∏n​{1−p,p,​xi​=0,xi​=0,​E(R,p)=0≤s≤1sup​[−sR+s−(1+s)log2​(p1/(1+s)+(1−p)1/(1+s))].

For each code CCC, decode yyy as a^C(y)=y−e\widehat a_C(y)=y-eaC​(y)=y−e, with eee the fixed chosen maximizer of Pp(e)P_p(e)Pp​(e) subject to y−e∈Cy-e\in Cy−e∈C. Then both

1∣I∣∑r∈I1∣Cr∣∑a∈Cr∑xPp(x) 1{a^Cr(a+x)≠a}≤2−nE(R,p)max⁡(ε,1)\frac1{|I|}\sum_{r\in I}\frac1{|C_r|} \sum_{a\in C_r}\sum_xP_p(x)\, \mathbf1_{\{\widehat a_{C_r}(a+x)\ne a\}} \le 2^{-nE(R,p)}\max(\varepsilon,1)∣I∣1​r∈I∑​∣Cr​∣1​a∈Cr​∑​x∑​Pp​(x)1{aCr​​(a+x)=a}​≤2−nE(R,p)max(ε,1)

and

R<1−H2(p) ⟹ E(R,p)>0R<1-H_2(p)\ \Longrightarrow\ E(R,p)>0R<1−H2​(p) ⟹ E(R,p)>0

hold, where H2(p)=−plog⁡2p−(1−p)log⁡2(1−p)H_2(p)=-p\log_2p-(1-p)\log_2(1-p)H2​(p)=−plog2​p−(1−p)log2​(1−p), with 0log⁡20=00\log_2 0=00log2​0=0. The positivity assertion is conditional on the strict rate inequality; both endpoints p=0,1p=0,1p=0,1 are included.

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