AFTD Auto-Formalizing Theoretical Domains

max_subset_sum_avoiding_size

def

For positive integers $M$ and $n$, $F(M, n)$ is the maximum cardinality of a subset of $\{1, \dots, M\}$ that avoids subset sum $n$.

Statement

noncomputable def max_subset_sum_avoiding_size (M n : ℕ) : ℕ
Defined in
arXiv:2611.17205 Forbidden subset sums in a linear range: an inverse theorem and the Erdős-Graham irregularity problem, Section 1.1
Verified
14 Nov 2026
Axioms
none listed
Built on 1
  • subset_sum_avoidersThe collection of all subsets of $\{1, \dots, M\}$ that avoid subset sum $n$.
Used by 1

Read back from the Lean

max_subset_sum_avoiding_size M n defines the maximum (supremum) cardinality among all subsets A of the integer interval {1, ..., M} such that every subset B ⊆ A whose sum of elements equals n is the empty set.

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 maximum cardinality of a subset of {1, ..., M} avoiding subset sum n. -/
noncomputable def max_subset_sum_avoiding_size (M n : ℕ) : ℕ := Finset.sup (subset_sum_avoiders M n) Finset.card
See it in the graphDiscuss this resultChallenge it