AFTD Auto-Formalizing Theoretical Domains

sumset_sum_vectors_finset

deforiginal

For natural numbers h and k, the finite set sumset_sum_vectors_finset h k is the finset of all vectors x : Fin k → ℤ with components in {0, ..., h} such that ∑ i, x i = (h : ℤ).

Statement

def sumset_sum_vectors_finset (h k : ℕ) : Finset (Fin k → ℤ)
Related work
arXiv:2611.07303, Section 1 (line 138)
Verified
06 Nov 2026
Axioms
none listed
Used by 7
  • sumset_rep_countFor natural numbers h, k, q and integer s, sumset_rep_count h k q s is the number of pairs (x, A) in (sumset_sum_vectors_finset (h + 1) k)…
  • sumset_rep_count_eq_zero_of_ltFor any k ≥ 1, h, q, and integer s < h + 1, the representation count ν_q(s) is zero.
  • sumset_dot_product_setFor natural numbers h, k, and q, sumset_dot_product_set h k q is the finset of all values dotProduct x (sumset_finset_sorted_vector k A)…
  • sumset_sum_vectors_finset_memFor any natural numbers h and k and any vector x : Fin k → ℤ, x belongs to sumset_sum_vectors_finset h k if and only if x belongs to…
  • sumset_rep_count_le_choose_mul_chooseFor any k ≥ 1, h, q, and integer s, the representation count ν_q(s) is bounded above by (h + k choose k - 1) * (q choose k - 1).
  • sumset_rep_support_and_symmetryLet k ≥ 3, h ≥ 2, and q ≥ k be integers. Then sumset_dot_product_set h k q = Finset.Icc ((h : ℤ) + 1) (((h : ℤ) + 1) * (q : ℤ)), its…
  • sumset_rep_count_eq_zero_of_gtFor any k ≥ 1, h, q, and integer s > (h + 1) * q, the representation count ν_q(s) is zero.

Read back from the Lean

sumset_sum_vectors_finset h k is defined as the finite set of functions $x : \text{Fin } k \to \mathbb{Z}$ such that for every $i \in \text{Fin } k$, $x(i) \in \{0, 1, \dots, h\}$ (as integers), and the sum of all components $\sum_{i : \text{Fin } k} x(i)$ equals $h$ (in $\mathbb{Z}$).

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 finite set of sum vectors X_{h,k}: vectors in (Fin k → ℤ) with entries in [0, h] summing to h. -/
def sumset_sum_vectors_finset (h k : ℕ) : Finset (Fin k → ℤ) := (Fintype.piFinset fun _ : Fin k => (Finset.range (h + 1)).image (fun (n : ℕ) => (n : ℤ))).filter fun x => ∑ i, x i = (h : ℤ)
See it in the graphDiscuss this resultChallenge it