Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Table 9 — new [[336,20,12]][[336,20,12]][[336,20,12]] code, class 1

Open
BBCode.new336_class1_params

by Winningatmath · Oct 16, 2026 · Mathlib 0df444a (Lean v4.33.1)

coding-theoryquantum-error-correction

New bivariate-bicycle code, class 1 of the two [[336,20,12]][[336,20,12]][[336,20,12]] symmetry classes.

Let G=Z2×Z84G=\mathbb Z_{2}\times\mathbb Z_{84}G=Z2​×Z84​ and let

A=1+y+xy5,B=1+y4+y62A=1+y+xy^{5},\qquad B=1+y^{4}+y^{62}A=1+y+xy5,B=1+y4+y62

in F2[x,y]/(x2−1, y84−1)\mathbb F_2[x,y]/(x^{2}-1,\,y^{84}-1)F2​[x,y]/(x2−1,y84−1). The bivariate-bicycle code with check matrices HX=[A∣B]H_X=[A\mid B]HX​=[A∣B] and HZ=[BT∣AT]H_Z=[B^{\mathsf T}\mid A^{\mathsf T}]HZ​=[BT∣AT] is an

[[336,20,12]][[336,20,12]][[336,20,12]]

code in both sectors:

  1. it acts on n=336=2⋅2⋅84n=336=2\cdot2\cdot84n=336=2⋅2⋅84 qubits;
  2. it encodes k=20k=20k=20 logical qubits: rank⁡F2HX+rank⁡F2HZ+20=336\operatorname{rank}_{\mathbb F_2}H_X+\operatorname{rank}_{\mathbb F_2}H_Z+20=336rankF2​​HX​+rankF2​​HZ​+20=336;
  3. its X-distance is exactly 121212: some vvv with HZv=0H_Zv=0HZ​v=0 and v∉row⁡(HX)v\notin\operatorname{row}(H_X)v∈/row(HX​) has weight 121212, and every such vvv has weight at least 121212;
  4. its Z-distance is exactly 121212 (dually, with HXH_XHX​ and HZH_ZHZ​ exchanged).

Formalization Note Polynomials are Finsets of monomials (i,j)(i,j)(i,j) in ZMod l × ZMod m; IsCode A B n k d is defined in BBCode_Setting.

Preamble
import Mathlib
import Definitions.Def_BBCode_Setting
Formal statement
namespace BBCode

theorem new336_class1_params :
    IsCode (l := 2) (m := 84) {(0, 0), (0, 1), (1, 5)} {(0, 0), (0, 4), (0, 62)} 336 20 12 := by
  sorry

end BBCode
Source
B. W. Daugherty, S. Ryan, G. Ward, New distance-12 bivariate-bicycle codes with 20 and 24 logical qubits: an exhaustive classification and checkable distances to 360 qubits, Zenodo v1.0.0 (2026), https://doi.org/10.5281/zenodo.23382175, Table 3 (p. 5); polynomials from Table 9 (p. 15)
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

This statement concerns one specific bivariate-bicycle code with l=2l=2l=2, m=84m=84m=84, so G=Z2×Z84G=\mathbb Z_{2}\times\mathbb Z_{84}G=Z2​×Z84​ has 168168168 elements and there are 2lm=3362lm=3362lm=336 qubits. The two polynomials are

A={(0,0),(0,1),(1,5)}    (i.e. A=1+y+xy5),B={(0,0),(0,4),(0,62)}    (i.e. B=1+y4+y62),A=\{(0,0),(0,1),(1,5)\}\;\;(\text{i.e. }A=1+y+xy^5),\qquad B=\{(0,0),(0,4),(0,62)\}\;\;(\text{i.e. }B=1+y^4+y^{62}),A={(0,0),(0,1),(1,5)}(i.e. A=1+y+xy5),B={(0,0),(0,4),(0,62)}(i.e. B=1+y4+y62),

each a set of three distinct monomials (no exponent pair collides after reduction mod lll and mod mmm).

Unfolded definitions used below. For l,m≥1l,m\ge 1l,m≥1 write G=Zl×ZmG=\mathbb Z_l\times\mathbb Z_mG=Zl​×Zm​; an element (i,j)∈G(i,j)\in G(i,j)∈G stands for the monomial xiyjx^iy^jxiyj, and a "polynomial" is a finite subset P⊆GP\subseteq GP⊆G (its support, coefficients in F2\mathbb F_2F2​). The circulant MPM_PMP​ is the G×GG\times GG×G matrix over F2\mathbb F_2F2​ with (MP)g,h=1(M_P)_{g,h}=1(MP​)g,h​=1 iff h−g∈Ph-g\in Ph−g∈P and 000 otherwise. The qubit set is Q=G⊔GQ=G\sqcup GQ=G⊔G (a left block LLL and a right block RRR, ∣Q∣=2lm|Q|=2lm∣Q∣=2lm). The check matrices (rows indexed by GGG, columns by QQQ) are

HX=[ MA  ∣  MB ],HZ=[ MB⊤  ∣  MA⊤ ],H_X=\big[\,M_A\;\big|\;M_B\,\big],\qquad H_Z=\big[\,M_B^{\top}\;\big|\;M_A^{\top}\,\big],HX​=[MA​​MB​],HZ​=[MB⊤​​MA⊤​],

with the first block on LLL and the second on RRR. A vector v∈F2Qv\in\mathbb F_2^{Q}v∈F2Q​ is a nontrivial Z-logical if HXv=0H_Xv=0HX​v=0 and v∉row⁡(HZ)v\notin\operatorname{row}(H_Z)v∈/row(HZ​) (the F2\mathbb F_2F2​-span of the rows of HZH_ZHZ​); it is a nontrivial X-logical if HZv=0H_Zv=0HZ​v=0 and v∉row⁡(HX)v\notin\operatorname{row}(H_X)v∈/row(HX​). The weight ∣v∣|v|∣v∣ is the number of nonzero coordinates of vvv.

Assertion. The code of (A,B)(A,B)(A,B) satisfies all four of the following simultaneously:

  1. n=336=2⋅2⋅84n=336=2\cdot 2\cdot 84n=336=2⋅2⋅84 (a purely arithmetic identity).
  2. rank⁡F2HX+rank⁡F2HZ+20=336\operatorname{rank}_{\mathbb F_2}H_X+\operatorname{rank}_{\mathbb F_2}H_Z+20=336rankF2​​HX​+rankF2​​HZ​+20=336, i.e. the number of logical qubits is k=20k=20k=20 (stated additively, so no truncated subtraction is involved).
  3. X-distance exactly 121212: there exists a nontrivial X-logical vvv with ∣v∣=12|v|=12∣v∣=12, and every nontrivial X-logical has ∣v∣≥12|v|\ge 12∣v∣≥12.
  4. Z-distance exactly 121212: there exists a nontrivial Z-logical vvv with ∣v∣=12|v|=12∣v∣=12, and every nontrivial Z-logical has ∣v∣≥12|v|\ge 12∣v∣≥12.

So it claims an exact value d=12d=12d=12 for both sectors (a lower bound and attainment), not merely an upper or lower bound. Nothing is asserted about the connectivity of the Tanner graph or about any other code; the predicate does not include a connectivity condition.

Note that BBB involves only powers of yyy (all its xxx-exponents are 000), while AAA contains the single xxx-dependent term xy5xy^5xy5; here Z2\mathbb Z_2Z2​ means integers mod 222.

Human review
  • Endorsed by Shuze Chen · Oct 18, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Winningatmath · Oct 18, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me