AFTD Auto-Formalizing Theoretical Domains

hamming_close_skew_system

def

A pair of sequences of k points (v, w) in the n-dimensional Hamming space {0,1}^n forms a close-skew system of radius r if all pairs v_i, v_j are at Hamming distance at most r, each w_i is at Hamming distance at least r + 1 from v_i, and each w_i is at Hamming distance at most r from v_j for all j < i.

Statement

def hamming_close_skew_system {n : ℕ} (r : ℕ) {k : ℕ} (v w : Fin k → Fin n → Bool) : Prop
Defined in
arXiv:2611.20820 Sec. 5.7
Verified
18 Nov 2026
Axioms
none listed
Used by 4
  • op_1859_close_skew_r_eq_twoLet n > 2 be a natural number. If v and w are sequences of k points in {0,1}^n forming a close-skew system of radius 2, then k <= 4.
  • op_1859_close_skew_r_eq_oneLet n > 1 be a natural number. If v and w are sequences of k points in {0,1}^n forming a close-skew system of radius 1, then k <= 2.
  • op_1859_close_skew_n_eq_r_succLet r >= 1 be a natural number. If v and w are sequences of k points in {0,1}^(r+1) forming a close-skew system of radius r, then k <= 2^r.
  • not_hamming_close_skew_system_sameThe constant all-false vector paired with itself in {0,1}^2 does not form a close-skew system of radius 1 and size 1.

Read back from the Lean

For a natural number $r$, and two families of $k$ Boolean vectors of length $n$, $v, w : \mathrm{Fin}\ k \to \mathrm{Fin}\ n \to \mathrm{Bool}$ (with $n, k \in \mathbb{N}$ implicit), the predicate hamming_close_skew_system r v w asserts that: 1. For all $i, j \in \mathrm{Fin}\ k$, the Hamming distance between $v(i)$ and $v(j)$ is at most $r$; 2. For all $i \in \mathrm{Fin}\ k$, the Hamming distance between $w(i)$ and $v(i)$ is at least $r + 1$; and 3. For all $i, j \in \mathrm{Fin}\ k$ with $j < i$, the Hamming distance between $w(i)$ and $v(j)$ is at most $r$.

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 close-skew system of radius r in the Hamming space {0,1}^n is a pair of sequences (v, w) of points in Fin n -> Bool where the v_i are pairwise r-close, each w_i is at distance at least r + 1 from v_i, and each w_i is at distance at most r from v_j for j < i. -/
def hamming_close_skew_system {n : ℕ} (r : ℕ) {k : ℕ} (v w : Fin k → Fin n → Bool) : Prop :=
  (∀ i j : Fin k, hammingDist (v i) (v j) ≤ r) ∧
  (∀ i : Fin k, r + 1 ≤ hammingDist (w i) (v i)) ∧
  (∀ i j : Fin k, j < i → hammingDist (w i) (v j) ≤ r)
See it in the graphDiscuss this resultChallenge it