Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§V, equations (37)–(38): error bounds for an arbitrary additive law

Open
QAlgorithms.Papers.Independent.Intake100.P31.general_noise

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. Assume maximum-dimension universality with ε≥1\varepsilon\ge1ε≥1 and put R=tmax⁡/nR=t_{\max}/nR=tmax​/n. Let B(x,C)B(x,C)B(x,C) indicate the existence of a nonzero c∈Cc\in Cc∈C with ∣x−c∣≤∣x∣|x-c|\le|x|∣x−c∣≤∣x∣, conservatively treating ties as failures. Then

ErB(x,Cr)≤εFR(∣x∣),ErPe(Cr)≤ε∑k=1nP^(k)FR(k).\mathbb E_r B(x,C_r)\le\varepsilon F_R(|x|),\qquad\mathbb E_r P_e(C_r)\le\varepsilon\sum_{k=1}^n\widehat P(k)F_R(k).Er​B(x,Cr​)≤εFR​(∣x∣),Er​Pe​(Cr​)≤εk=1∑n​P(k)FR​(k).

The translated Hamming ball is essential. ML error is bounded above by the Hamming estimate; it is not identified with it for an arbitrary noise law.

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 pp.9--10 (35)--(38), corrected translated Hamming ball and ML inequality.
The conservative failure indicator includes every tie, so its law also bounds ML error. -/
theorem general_noise {n : ℕ} (hn : 0 < n) {I : Type*} [Fintype I] [Nonempty I]
    (C : I → BinaryLinearCode n) (eps : ℝ) (heps : 1 ≤ eps)
    (hu : UniversalAt C (maxDim C) eps) (P : ErrorLaw n) :
    (∀ x : BinaryBlock n, avg (fun r => hammingBad (C r) x) ≤ eps *
      (2 : ℝ) ^ (-(n : ℝ) * max (1 - binEntropy2 (min ((wt x : ℝ) / n) (1 / 2)) -
        (maxDim C : ℝ) / n) 0)) ∧
    avg (fun r => cosetWordError ⊥ (C r) P.mass) ≤
      wordNoiseBound P.mass ((maxDim C : ℝ) / n) 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, §V, equations (37)–(38): error bounds for an arbitrary additive law
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 of binary linear subspaces Cr⊆F2nC_r\subseteq\mathbb F_2^nCr​⊆F2n​ indexed by r∈Ir\in Ir∈I, every real ε≥1\varepsilon\ge1ε≥1, and every function P:F2n→RP:\mathbb F_2^n\to\mathbb RP:F2n​→R satisfying P(x)≥0P(x)\ge0P(x)≥0 for all xxx and ∑xP(x)=1\sum_xP(x)=1∑x​P(x)=1, let d=max⁡r∈Idim⁡Crd=\max_{r\in I}\dim C_rd=maxr∈I​dimCr​. Assume that every nonzero v∈F2nv\in\mathbb F_2^nv∈F2n​ satisfies

∣{r∈I:v∈Cr}∣∣I∣≤ε 2d−n.\frac{|\{r\in I:v\in C_r\}|}{|I|}\le\varepsilon\,2^{d-n}.∣I∣∣{r∈I:v∈Cr​}∣​≤ε2d−n.

Write wt⁡(x)\operatorname{wt}(x)wt(x) for the number of nonzero coordinates, 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 endpoint terms 0log⁡20=00\log_2 0=00log2​0=0, and put

F(k)=2−nmax⁡(1−H2 ⁣(min⁡(kn,12))−dn, 0).F(k)=2^{-n\max\left(1-H_2\!\left(\min\left(\frac{k}{n},\frac12\right)\right)-\frac dn,\,0\right)}.F(k)=2−nmax(1−H2​(min(nk​,21​))−nd​,0).

For a code CCC, define its decoder on yyy by choosing an error eee maximizing P(e)P(e)P(e) among all eee with y−e∈Cy-e\in Cy−e∈C, and returning a^C(y)=y−e\widehat a_C(y)=y-eaC​(y)=y−e, using the fixed choice made in the definition when maximizers tie. Then both

∀x∈F2n,1∣I∣∑r∈I1{∃c∈Cr∖{0}:wt⁡(x−c)≤wt⁡(x)}≤εF(wt⁡(x))\forall x\in\mathbb F_2^n,\qquad \frac1{|I|}\sum_{r\in I} \mathbf1_{\{\exists c\in C_r\setminus\{0\}:\operatorname{wt}(x-c)\le\operatorname{wt}(x)\}} \le\varepsilon F(\operatorname{wt}(x))∀x∈F2n​,∣I∣1​r∈I∑​1{∃c∈Cr​∖{0}:wt(x−c)≤wt(x)}​≤εF(wt(x))

and

1∣I∣∑r∈I1∣Cr∣∑a∈Cr∑xP(x) 1{a^Cr(a+x)≠a}≤ε∑k=1n(∑wt⁡(x)=kP(x))F(k)\frac1{|I|}\sum_{r\in I}\frac1{|C_r|} \sum_{a\in C_r}\sum_xP(x)\, \mathbf1_{\{\widehat a_{C_r}(a+x)\ne a\}} \le \varepsilon\sum_{k=1}^{n} \left(\sum_{\operatorname{wt}(x)=k}P(x)\right)F(k)∣I∣1​r∈I∑​∣Cr​∣1​a∈Cr​∑​x∑​P(x)1{aCr​​(a+x)=a}​≤εk=1∑n​​wt(x)=k∑​P(x)​F(k)

hold. The first assertion includes x=0x=0x=0 and counts weight ties through the non-strict inequality; the second bound omits the weight-zero term, and zero-dimensional codes are 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