Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§V, equation (45): one code works for every BSC

Open
QAlgorithms.Papers.Independent.Intake100.P31.deterministic_ecc

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. 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 every 1≤t≤n1\le t\le n1≤t≤n, one can choose a dimension-ttt binary code CCC before choosing the BSC parameter, so that

∀p∈[0,1],Pe(C;p)≤(n+1)2−nE(t/n,p).\forall p\in[0,1],\qquad P_e(C;p)\le(n+1)2^{-nE(t/n,p)}.∀p∈[0,1],Pe​(C;p)≤(n+1)2−nE(t/n,p).

The decoder may depend on ppp, while the selected code does not.

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.11 (45): the code is chosen before the BSC parameter. -/
theorem deterministic_ecc {n t : ℕ} (hn : 0 < n) (ht : 1 ≤ t) (htn : t ≤ n) :
    ∃ C : BinaryLinearCode n, Module.finrank (ZMod 2) C = t ∧
      ∀ p : ℝ, p ∈ Set.Icc 0 1 → cosetWordError ⊥ C (bsc p) ≤
        (n + 1) * (2 : ℝ) ^ (-(n : ℝ) * gallagerExponent ((t : ℝ) / 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. 11, §V, equation (45): one code works for every BSC
Read-back

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

For all natural numbers n,tn,tn,t with n>0n>0n>0 and 1≤t≤n1\le t\le n1≤t≤n, there exists a single binary linear subspace C⊆Bn:=F2nC\subseteq B_n:=\mathbb F_2^nC⊆Bn​:=F2n​ of dimension ttt such that, for every real p∈[0,1]p\in[0,1]p∈[0,1],

1∣C∣∑a∈C∑x∈BnPp(x) 1{dC,p(a+x)≠a}≤(n+1) 2−nG(t/n,p).\frac1{|C|}\sum_{a\in C}\sum_{x\in B_n} P_p(x)\,\mathbf 1_{\{d_{C,p}(a+x)\ne a\}} \le (n+1)\,2^{-nG(t/n,p)}.∣C∣1​a∈C∑​x∈Bn​∑​Pp​(x)1{dC,p​(a+x)=a}​≤(n+1)2−nG(t/n,p).

Here Pp(x)=∏i=0n−1(1−p)P_p(x)=\prod_{i=0}^{n-1}(1-p)Pp​(x)=∏i=0n−1​(1−p) or ppp, with the factor 1−p1-p1−p when xi=0x_i=0xi​=0 and ppp otherwise; dC,p(y)=y−eyd_{C,p}(y)=y-e_ydC,p​(y)=y−ey​, where eye_yey​ is the fixed choice of an error maximizing Pp(e)P_p(e)Pp​(e) among all e∈Bne\in B_ne∈Bn​ satisfying y−e∈Cy-e\in Cy−e∈C, with ties resolved by the choice used in the definition; and

G(R,p)=sup⁡0≤s≤1[−sR+s−(1+s)log⁡2 ⁣(p1/(1+s)+(1−p)1/(1+s))],log⁡2u=log⁡ulog⁡2.G(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], \qquad \log_2 u=\frac{\log u}{\log2}.G(R,p)=0≤s≤1sup​[−sR+s−(1+s)log2​(p1/(1+s)+(1−p)1/(1+s))],log2​u=log2logu​.

The error expression is the given coset error with the smaller code equal to {0}\{0\}{0}. The same code must satisfy the bound for all ppp, including p=0p=0p=0 and p=1p=1p=1; t=nt=nt=n is also 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