AFTD Auto-Formalizing Theoretical Domains

is_maximal_zero_sum_free

def

For a natural number n, an additive commutative group G, and a multiset S of elements of G, is_maximal_zero_sum_free n S asserts that S contains no submultiset of cardinality n with sum 0, and for every element x of G, the multiset S + {x} contains a submultiset of cardinality n with sum 0.

Statement

def is_maximal_zero_sum_free (n : ℕ) {G : Type*} [AddCommGroup G] (S : Multiset G) : Prop
Defined in
arXiv:2610.35819 Section 8
Verified
28 Oct 2026
Axioms
none listed
Used by 2

Read back from the Lean

Given a natural number n, an additive commutative group G, and a multiset S of elements of G, is_maximal_zero_sum_free n S is the proposition that: 1. There does not exist a submultiset W ≤ S such that W has cardinality n and the sum of the elements in W is 0; and 2. For every element x in G, there exists a submultiset W ≤ S + {x} such that W has cardinality n and the sum of the elements in W is 0.

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

/-- Predicate that a multiset over an additive commutative group G is maximal without n-term zero-sum submultisets. -/
def is_maximal_zero_sum_free (n : ℕ) {G : Type*} [AddCommGroup G] (S : Multiset G) : Prop := (¬ ∃ W : Multiset G, W ≤ S ∧ W.card = n ∧ W.sum = 0) ∧ (∀ x : G, ∃ W : Multiset G, W ≤ S + {x} ∧ W.card = n ∧ W.sum = 0)
See it in the graphDiscuss this resultChallenge it