Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

§6 — no connected three-term weight-6 BB code with n≤360n\le360n≤360, k≥20k\ge20k≥20 has distance ≥13\ge13≥13

Open
BBCode.envelope_no_distance_13

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

coding-theoryquantum-error-correction

Let l,m≥1l,m\ge1l,m≥1 with n=2lm≤360n=2lm\le 360n=2lm≤360, and let A,BA,BA,B be polynomials in F2[x,y]/(xl−1,ym−1)\mathbb F_2[x,y]/(x^l-1,y^m-1)F2​[x,y]/(xl−1,ym−1) with exactly three terms each. Suppose the bivariate-bicycle code BB(A,B)\mathrm{BB}(A,B)BB(A,B) has a connected Tanner graph and encodes k≥20k\ge 20k≥20 logical qubits. Then

min⁡(dX,dZ)≤12,\min(d_X,d_Z)\le 12,min(dX​,dZ​)≤12,

that is, there is a nontrivial X-logical or a nontrivial Z-logical of weight at most 121212.

This is the negative half of the source's weight-6 envelope classification: no code in this family and size range reaches distance 13.

Formalization Note The statement ranges over all l,m≥1l,m\ge1l,m≥1 with 2lm≤3602lm\le3602lm≤360 (971 shapes); the source's 961 omit the ten shapes with lm≤5lm\le5lm≤5, for which k≥20k\ge20k≥20 is impossible.

Preamble
import Mathlib
import Definitions.Def_BBCode_Setting
Formal statement
namespace BBCode

theorem envelope_no_distance_13 (l m : ℕ) [NeZero l] [NeZero m] (hn : 2 * (l * m) ≤ 360)
    (A B : Poly l m) (hA : A.card = 3) (hB : B.card = 3) (hconn : IsConnected A B)
    (k : ℕ) (hk : NumLogical A B k) (hk20 : 20 ≤ k) :
    ∃ v, (IsXLogical A B v ∨ IsZLogical A B v) ∧ weight v ≤ 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, §6 (pp. 9–10) and Table 8
Read-back

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

Universally quantified data. Natural numbers l,ml,ml,m with l≠0l\ne0l=0, m≠0m\ne0m=0; polynomials A,B⊆G=Zl×ZmA,B\subseteq G=\mathbb Z_l\times\mathbb Z_mA,B⊆G=Zl​×Zm​ (finite sets of monomials xiyjx^iy^jxiyj); a natural number kkk.

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.

Hypotheses.

  1. 2lm≤3602lm\le 3602lm≤360 (at most 360360360 qubits, i.e. lm≤180lm\le180lm≤180; includes the degenerate shapes l=1l=1l=1 or m=1m=1m=1).
  2. ∣A∣=3|A|=3∣A∣=3 and ∣B∣=3|B|=3∣B∣=3: each polynomial has exactly three distinct monomials (any monomials whatsoever, including 111, and A=BA=BA=B is allowed).
  3. The Tanner graph is connected: on vertices Q⊔CX⊔CZQ\sqcup C_X\sqcup C_ZQ⊔CX​⊔CZ​ (qubits, X-checks and Z-checks, each check set a copy of GGG), qubit qqq is joined to X-check ccc iff (HX)c,q=1(H_X)_{c,q}=1(HX​)c,q​=1 and to Z-check ccc iff (HZ)c,q=1(H_Z)_{c,q}=1(HZ​)c,q​=1, with no other edges; this single graph must be connected.
  4. rank⁡F2HX+rank⁡F2HZ+k=2lm\operatorname{rank}_{\mathbb F_2}H_X+\operatorname{rank}_{\mathbb F_2}H_Z+k=2lmrankF2​​HX​+rankF2​​HZ​+k=2lm (so kkk is the number of logical qubits), and k≥20k\ge 20k≥20.

Conclusion. There exists v∈F2Qv\in\mathbb F_2^{Q}v∈F2Q​ that is a nontrivial X-logical or a nontrivial Z-logical, with ∣v∣≤12|v|\le 12∣v∣≤12.

Equivalently, under these hypotheses min⁡(dX,dZ)≤12\min(d_X,d_Z)\le 12min(dX​,dZ​)≤12, where dX,dZd_X,d_ZdX​,dZ​ are the minimum weights of nontrivial X- and Z-logicals. It does not assert that both dX≤12d_X\le12dX​≤12 and dZ≤12d_Z\le12dZ​≤12, does not assert anything about codes with k<20k<20k<20, with more than 360360360 qubits, with ∣A∣|A|∣A∣ or ∣B∣≠3|B|\ne3∣B∣=3, or with disconnected Tanner graph, and asserts an upper bound ≤12\le 12≤12 only (not that the distance equals 121212). The conclusion's existential also guarantees nontrivial logicals exist, which is consistent with k≥20>0k\ge20>0k≥20>0. The hypotheses are not obviously contradictory, so the statement is not evidently vacuous; it is a claim about every pair (A,B)(A,B)(A,B) in a finite search space.

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