AFTD Auto-Formalizing Theoretical Domains

sumset_null_vectors

def

The set R_{h,k} is defined as the set of all nonzero vectors d : Fin k → ℤ such that ∑ i, d i = 0, sumset_vector_weight d ≤ (h : ℤ), Finset.gcd Finset.univ (fun i => (d i).natAbs) = 1, and sumset_first_nonzero_pos d.

Statement

def sumset_null_vectors (h k : ℕ) : Set (Fin k → ℤ)
Defined in
arXiv:2611.07303, Definition 3.1
Verified
06 Nov 2026
Axioms
none listed
Built on 2
  • sumset_vector_weightThe weight of an integer vector d is the sum of its positive parts max(d_i, 0).
  • sumset_first_nonzero_posAn integer vector has its first nonzero entry positive if there is an index i such that all previous entries are zero and the i-th entry…

Read back from the Lean

For given natural numbers h and k, sumset_null_vectors h k is defined as the set of vectors d : Fin k → ℤ satisfying the following five conditions: 1. d ≠ 0 (it is not the all-zero vector); 2. ∑ i, d i = 0 (the sum of the coordinates of d is 0); 3. sumset_vector_weight d ≤ (h : ℤ) (the sum of the positive parts of the coordinates of d, ∑ i, max (d i) 0, is at most h); 4. Finset.gcd Finset.univ (fun i => (d i).natAbs) = 1 (the greatest common divisor of the absolute values of all coordinates of d is 1); 5. sumset_first_nonzero_pos d (there exists an index i : Fin k such that d j = 0 for all j < i and d i > 0, i.e., the first nonzero coordinate of d is strictly positive).

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

/-- The set R_{h,k} of primitive nonzero null vectors with coordinate sum zero, weight at most h, and positive first nonzero entry. -/
def sumset_null_vectors (h k : ℕ) : Set (Fin k → ℤ) :=
  {d : Fin k → ℤ | d ≠ 0 ∧
    ∑ i, d i = 0 ∧
    sumset_vector_weight d ≤ (h : ℤ) ∧
    Finset.gcd Finset.univ (fun i => (d i).natAbs) = 1 ∧
    sumset_first_nonzero_pos d}
See it in the graphDiscuss this resultChallenge it