Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§V, equation (43): finite type-method error bound

Open
QAlgorithms.Papers.Independent.Intake100.P31.type_bound

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

prove2quantum

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. Let n≥1n\ge1n≥1, R∈[0,1]R\in[0,1]R∈[0,1], p∈[0,1/2]p\in[0,1/2]p∈[0,1/2], and ε≥1\varepsilon\ge1ε≥1. For iid BSC noise, let d(q∥p)d(q\Vert p)d(q∥p) be Bernoulli divergence in bits, infinite if qqq assigns positive mass outside the support of ppp. Then

ε∑k=0nP^(k)FR(k)≤⌊n/2+2⌋ε2−ninf⁡0≤q≤1/2([1−h(q)−R]++d(q∥p)).\varepsilon\sum_{k=0}^n\widehat P(k)F_R(k)\le\left\lfloor n/2+2\right\rfloor\varepsilon2^{-n\inf_{0\le q\le1/2}([1-h(q)-R]_++d(q\Vert p))}.εk=0∑n​P(k)FR​(k)≤⌊n/2+2⌋ε2−ninf0≤q≤1/2​([1−h(q)−R]+​+d(q∥p)).

The extended-real infimum handles p=0p=0p=0 without converting forbidden off-support logarithms to zero.

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 (43): floor(n/2+2), with extended bernoulliDivergenceBits at p=0. -/
theorem type_bound {n : ℕ} (hn : 0 < n) (R p eps : ℝ)
    (hR : R ∈ Set.Icc 0 1) (hp : p ∈ Set.Icc 0 (1 / 2)) (heps : 1 ≤ eps) :
    noiseBound (bsc (n := n) p) R eps ≤
      (⌊(n : ℝ) / 2 + 2⌋₊ : ℝ) * eps * expFactor n (typeExponent R 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, §V, equation (43): finite type-method error bound
Read-back

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

For every positive integer nnn and real numbers R,p,εR,p,\varepsilonR,p,ε satisfying 0≤R≤10\le R\le10≤R≤1, 0≤p≤120\le p\le\frac120≤p≤21​, and ε≥1\varepsilon\ge1ε≥1, define

Pp(x)=∏i=1n{1−p,xi=0,p,xi≠0,Bk=∑x∈F2nwt⁡(x)=kPp(x),P_p(x)=\prod_{i=1}^{n} \begin{cases}1-p,&x_i=0,\\p,&x_i\ne0,\end{cases} \qquad B_k=\sum_{\substack{x\in\mathbb F_2^n\\\operatorname{wt}(x)=k}}P_p(x),Pp​(x)=i=1∏n​{1−p,p,​xi​=0,xi​=0,​Bk​=x∈F2n​wt(x)=k​∑​Pp​(x),

where wt⁡\operatorname{wt}wt counts nonzero coordinates, and let H2(u)=−ulog⁡2u−(1−u)log⁡2(1−u)H_2(u)=-u\log_2u-(1-u)\log_2(1-u)H2​(u)=−ulog2​u−(1−u)log2​(1−u), with zero endpoint terms. For q∈[0,12]q\in[0,\frac12]q∈[0,21​], define the extended-real quantity D2(q∥p)D_2(q\Vert p)D2​(q∥p) to be +∞+\infty+∞ if p=0p=0p=0 and q≠0q\ne0q=0, to be 000 if p=q=0p=q=0p=q=0, and otherwise to be

qlog⁡2(q/p)+(1−q)log⁡2((1−q)/(1−p)).q\log_2(q/p)+(1-q)\log_2((1-q)/(1-p)).qlog2​(q/p)+(1−q)log2​((1−q)/(1−p)).

Put

A=inf⁡0≤q≤1/2(max⁡(1−H2(q)−R,0)+D2(q∥p)),Fn(A)={0,A=+∞,2−nAR,A≠+∞,A=\inf_{0\le q\le1/2} \left(\max(1-H_2(q)-R,0)+D_2(q\Vert p)\right), \qquad F_n(A)= \begin{cases} 0,&A=+\infty,\\ 2^{-nA_{\mathbb R}},&A\ne+\infty, \end{cases}A=0≤q≤1/2inf​(max(1−H2​(q)−R,0)+D2​(q∥p)),Fn​(A)={0,2−nAR​,​A=+∞,A=+∞,​

where ARA_{\mathbb R}AR​ is the extended-real-to-real conversion, which fixes finite values and sends either infinity to zero. Then

ε∑k=0nBk 2−nmax⁡(1−H2 ⁣(min⁡(kn,12))−R, 0)≤⌊n2+2⌋NεFn(A).\varepsilon\sum_{k=0}^{n} B_k\,2^{-n\max\left(1-H_2\!\left(\min\left(\frac{k}{n},\frac12\right)\right)-R,\,0\right)} \le \left\lfloor\frac n2+2\right\rfloor_{\mathbb N}\varepsilon F_n(A).εk=0∑n​Bk​2−nmax(1−H2​(min(nk​,21​))−R,0)≤⌊2n​+2⌋N​εFn​(A).

Here ⌊⋅⌋N\lfloor\cdot\rfloor_{\mathbb N}⌊⋅⌋N​ denotes the natural-number floor, truncated at zero; the weight-zero term is included, and p=0p=0p=0 is allowed.

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