AFTD Auto-Formalizing Theoretical Domains

zero_sum_index_sets

def

Given an additive commutative group G, a natural number N, and a sequence U : Fin N → G, zero_sum_index_sets U is the finset (of type Finset (Finset (Fin N))) of all nonempty subsets E of Fin N such that the sum of U j over j ∈ E equals 0.

Statement

open Classical in
noncomputable def zero_sum_index_sets {G : Type*} [AddCommGroup G] {N : ℕ} (U : Fin N → G) :
    Finset (Finset (Fin N))
Defined in
arXiv:2611.20197
Verified
18 Nov 2026
Axioms
none listed
Used by 3
  • zero_sum_index_sets_empty_not_memThe empty set is not in the finset of zero-sum index sets of a sequence U.
  • zero_sum_separatorGiven an additive commutative group G, a natural number N, a sequence U : Fin N → G, an integer t : ℕ, and a commutative ring R, a…
  • zero_sum_incidence_identityGiven an additive commutative group G, a natural number N, a sequence U : Fin N → G, an integer t : ℕ, and a commutative ring R, a family…

Read back from the Lean

Given an additive commutative group $G$, a natural number $N$, and a function $U : \mathrm{Fin}(N) \to G$, zero_sum_index_sets U is the finite set of all non-empty subsets $E \subseteq \mathrm{Fin}(N)$ such that $\sum_{j \in E} U(j) = 0$ in $G$.

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

open Classical in
/-- The finset of nonempty zero-sum index sets of a sequence U of N elements in an abelian group G. -/
noncomputable def zero_sum_index_sets {G : Type*} [AddCommGroup G] {N : ℕ} (U : Fin N → G) :
    Finset (Finset (Fin N)) :=
  Finset.univ.filter fun E => E.Nonempty ∧ ∑ j ∈ E, U j = 0
See it in the graphDiscuss this resultChallenge it