AFTD Auto-Formalizing Theoretical Domains

css_z_distance_ge_three

def

A CSS quantum code specified by a k by n logical X-operator matrix K and an s by n X-stabilizer matrix S over ZMod 2 has Z-distance at least 3 if every vector v in (ZMod 2)^n satisfying Sv = 0 and Kv ≠ 0 has Hamming weight at least 3.

Statement

def css_z_distance_ge_three {k s n : ℕ}
    (K : Matrix (Fin k) (Fin n) (ZMod 2)) (S : Matrix (Fin s) (Fin n) (ZMod 2)) : Prop
Defined in
arXiv:2610.09341 Eq. 5
Verified
18 Oct 2026
Axioms
none listed
Used by 5
  • op_159_css_ccz_no_code_s_zeroFor any block length n, no 3 by n logical X-operator matrix K and 0 by n X-stabilizer matrix S over ZMod 2 form a CSS quasi-transversal…
  • css_quasi_transversal_ccz_codeA CSS quantum code of block length n specified by a 3 by n logical X-operator matrix K and an s by n X-stabilizer matrix S over ZMod 2 has…
  • css_z_distance_ge_three_iff_colsA CSS quantum code specified by a k by n logical X-operator matrix K and an s by n X-stabilizer matrix S over ZMod 2 has Z-distance at…
  • op_159_css_ccz_no_code_s_oneFor any block length n, no 3 by n logical X-operator matrix K and 1 by n X-stabilizer matrix S over ZMod 2 form a CSS quasi-transversal…
  • not_css_quasi_transversal_ccz_code_zeroThe zero logical and stabilizer matrices over ZMod 2 do not form a CSS quasi-transversal CCZ code of any block length n and stabilizer…

Read back from the Lean

Given natural numbers $k$, $s$, and $n$, and matrices $K \in M_{k \times n}(\mathbb{Z}/2\mathbb{Z})$ and $S \in M_{s \times n}(\mathbb{Z}/2\mathbb{Z})$, css_z_distance_ge_three K S asserts that for every vector $v \in (\mathbb{Z}/2\mathbb{Z})^n$, if $S v = 0$ and $K v \ne 0$, then the Hamming weight of $v$ (the cardinality of the set of indices $j \in \{0, \dots, n-1\}$ where $v(j) \ne 0$) is at least $3$.

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

Lean source view module on GitHub

/-- A CSS code specified by a k x n logical X-matrix K and an s x n X-stabilizer matrix S has Z-distance at least 3. -/
def css_z_distance_ge_three {k s n : ℕ}
    (K : Matrix (Fin k) (Fin n) (ZMod 2)) (S : Matrix (Fin s) (Fin n) (ZMod 2)) : Prop :=
  ∀ v : Fin n → ZMod 2, Matrix.mulVec S v = 0 → Matrix.mulVec K v ≠ 0 →
    3 ≤ (Finset.univ.filter (fun j => v j ≠ 0)).card
See it in the graphDiscuss this resultChallenge it