files / problems / covering / share / 2026-08-16 / result / VERIFY_PLAN.md

12 KB · on GitHub

Verification plan

Written before any verifier code, per the working protocol for this artifact. Everything below is a commitment about what the two verifiers must do; if the implementation later disagrees with this plan, the plan is wrong and gets amended in place with a note, not silently.

What is being certified

A binary r×nr\times n matrix HH over F2\mathbb F_2 is the parity-check matrix of an [n,n−r]2[n,n-r]_2 code of covering radius ≤2\le 2 iff its column multiset S⊂F2 rS\subset\mathbb F_2^{\,r} satisfies

{0}∪S∪(S+S)=F2 r.\{0\}\cup S\cup(S+S)=\mathbb F_2^{\,r}.

Covering radius is exactly 2 iff additionally some syndrome is neither 00 nor a single column. The four matrices to certify:

file rr nn provenance
data/H_r10_n50.txt 10 50 the result; copied verbatim from ../compute/
data/kr_r10_n51.txt 10 51 Kaikkonen–Rosendahl 2003 baseline, rebuilt from the hex in arXiv:2511.02542 Thm 4.3
data/H_r18_n815.txt 18 815 QM22_2^2 at m=4m=4, built by verify/build_propagation.py
data/H_r20_n1631.txt 20 1631 QM22_2^2 at m=5m=5, built by verify/build_propagation.py

Exhaustive means exhaustive: 220=1,048,5762^{20}=1{,}048{,}576 syndromes at the top end, enumerated, no sampling, no early exit, no consulting a stored certificate.

Encoding convention (the one thing most likely to go wrong)

Two conventions collide here and they are reverses of each other.

The reconstruction of HKRH_{KR} must therefore reverse the ten bits. A verifier that skips the reversal will report a spurious failure on the KR baseline only — the other three matrices never touch the paper's hex — which is a diagnostic worth stating out loud, because "only KR fails" means encoding, not mathematics.

Independent self-test of the reversal, taken from Thm 5.2(ii): the paper asserts h5+h27+h29=0h_5+h_{27}+h_{29}=0 with h5=(00 0010 0000)trh_5=(00\,0010\,0000)^{tr}, h27=h_{27}=274, h29=h_{29}=254. Under the correct reversal this must come out as 16⊕rev(0x274)⊕rev(0x254)=016 \oplus \texttt{rev}(\texttt{0x274}) \oplus \texttt{rev}(\texttt{0x254}) = 0. The builder asserts this. It is a bit-order canary that costs nothing.

Verifier #1 — verify/verify.py (Python 3, stdlib only)

Reads a matrix .txt. Never reads a JSON certificate for the covering claim.

  1. Parse. Strip # comments and blank lines. Require every remaining line to have the same number of whitespace-separated tokens, each in {0,1}. rr = number of lines, nn = tokens per line. Assemble column jj as ∑irowi[j] 2i\sum_i \text{row}_i[j]\,2^{i} (LSB-first).
  2. Well-formedness. All nn columns nonzero; all nn pairwise distinct; every column <2r< 2^r. Shape matches the expected (r,n)(r,n) passed on the command line.
  3. Rank. F2\mathbb F_2 Gaussian elimination on the integer columns (pivot = lowest set bit, XOR-reduce). Assert rank =r= r; this is what makes the redundancy genuinely rr.
  4. Exhaustive coverage. Allocate an integer array mult of length 2r2^r initialised to 0. Increment mult[0] once for the empty sum. Increment mult[h] for each column hh. Increment mult[h_i ^ h_j] for every unordered pair i<ji<j — all (n2)\binom n2 of them, no shortcuts. Then assert min(mult) >= 1 over the whole range. This is a full enumeration of {0}∪S∪(S+S)\{0\}\cup S\cup(S+S) by construction, and it yields the multiplicity data for free.
  5. Radius exactly 2. Assert some ss has s≠0s\ne0, s∉Ss\notin S. Since coverage already holds, the radius is not ≤1\le 1, hence exactly 2.
  6. Reporting. Multiplicity histogram over all 2r2^r syndromes (counting the empty sum, singletons and unordered pairs as above); the pair-only histogram restricted to the syndromes that are neither 00 nor a column (these are the ones that genuinely need a pair); the count of such syndromes; the count with a unique pair representation (call these the forced-split pairs — the two columns involved must land in distinct blocks of any 2-partition, so this number lower-bounds how constrained p(H)p(H) is); the covering density (1+n+(n2))/2r\bigl(1+n+\binom n2\bigr)/2^r as an exact fractions.Fraction, printed reduced, alongside its decimal expansion.
  7. Minimum distance and dependent triples. d≥3d\ge3 already follows from distinct-and-nonzero. Enumerate all (n3)\binom n3 triples — or equivalently all pairs i<ji<j with hi⊕hj∈Sh_i\oplus h_j\in S at index k>jk>j, which is the same set and cheaper — and report the count. d=3d=3 iff that count is positive. Report the triples explicitly.
  8. Minimality (LO check). For each of the nn columns, delete it and recount uncovered syndromes over the full 2r2^r range. Report the minimum over all deletions. If that minimum is ≥1\ge1, no single column is redundant and the set is a minimal 1-saturating set in PG(r−1,2)PG(r-1,2), equivalently a locally optimal covering code. Implemented by decrementing the shared mult array rather than recomputing from scratch, then restoring it — and the restore is checked by re-asserting the total.
  9. Partition checker (separate entry point, --partition). Loads data/partition_p10.json for the block assignment only, and re-derives the columns from the .txt. Cross-checks that the JSON columns list equals the columns parsed from the matrix text as a set and in order. Then for every syndrome s∈F2 rs\in\mathbb F_2^{\,r}: if s=0s=0 or s∈Ss\in S, pass by definition (Def. 3.2 allows sums of 0 or 1 columns); otherwise require some pair hi⊕hj=sh_i\oplus h_j=s with block[i] != block[j]. Report the number of blocks p(H)p(H) and which syndromes, if any, fail.

Output is a stable, sorted, machine-readable dump (--emit-facts <path> writes JSON) so the shell driver can assert on it and so the prose in NOTE.md can be checked against it mechanically rather than by eye.

Verifier #2 — verify/verify.rs (Rust, no crates, rustc only)

Written after #1 exists but deliberately not a port of it. Sharing an encoding convention is unavoidable — that is the specification, not an implementation choice — but sharing an algorithm would make the pair redundant. So #2 differs where it can:

Honest limitation, stated up front. Both verifiers were written in the same session by the same author. "Independent" here means: two languages, two algorithms, two parsers, two arithmetic paths, and no shared code or shared intermediate files. It does not mean two people. The one shared assumption that cannot be factored out is the LSB-first column encoding — and that assumption is itself pinned by the h5+h27+h29=0h_5+h_{27}+h_{29}=0 canary against the published paper. A third party re-deriving the columns under the opposite convention would get the bit-reverse of every column, which is an F2\mathbb F_2-linear relabelling of F210\mathbb F_2^{10} and therefore preserves every claim made here.

Builder — verify/build_propagation.py

Implements Construction QM22_2^2 (arXiv:2511.02542, Thm 4.1, eq. (4.2) and (4.4)) literally, from the paper, not from any prior script.

Family table

Generated, not typed. From (4.2)/(4.4): a state is (t,p)(t,p) with r=2tr=2t and pp an upper bound on p(H)p(H); the length is n(t)=51⋅2t−5−1n(t)=51\cdot2^{t-5}-1. A step with parameter mm is legal iff n(t)≥2m≥pn(t)\ge 2^m\ge p, and produces (t+m, 2m+1+1)(t+m,\ 2^{m+1}+1) with n(t+m)=2m(n(t)+1)−1n(t+m)=2^m(n(t)+1)-1. Breadth-first from the seed (t,p)=(5,10)(t,p)=(5,10), keeping for each reachable tt the smallest pp found, gives the reachable even rr honestly — including the gaps, which are real and must be shown as gaps. Closed form n=51⋅2r/2−5−1n=51\cdot2^{r/2-5}-1 and asymptotic density 512/21151^2/2^{11} both fall out and are asserted against the table.

Driver — run_all.sh

set -euo pipefail, deterministic, byte-identical across runs (no timestamps, no paths outside the repo, sorted output, LC_ALL=C). Rebuilds the propagated matrices from scratch into a temp dir and cmps them against the committed copies, so a stale committed matrix is a hard failure. Runs both verifiers on all four matrices, diffs their fact dumps, and asserts each hard-coded expected value individually with a named failure message. Exit 0 only if everything passes.