AFTD Auto-Formalizing Theoretical Domains

consecutive_sum_max_terms

def

For integers a and K, the set of all integers x such that there exist a length n : ℕ and a sequence s : ℕ → ℤ satisfying is_valid_consecutive_sum_seq a K n s and s n = x, collecting the terminal values across all valid sequences of any length.

Statement

def consecutive_sum_max_terms (a K : ℤ) : Set ℤ
Defined in
arXiv:2611.30462 Section 3
Verified
25 Nov 2026
Axioms
none listed
Built on 1
  • is_valid_consecutive_sum_seqA sequence s of integers of length n ≥ 1 starting at s(1) = a is valid with step bound K if it is strictly increasing with adjacent…
Used by 1
  • extremal_consecutive_sumFor integers a and K, the extremal value f(a, K) defined as the integer supremum (sSup) of the set consecutive_sum_max_terms a K of…

Read back from the Lean

Given integers a and K, consecutive_sum_max_terms a K is the set of all integers x such that there exist a natural number n and a sequence s : ℕ → ℤ such that: 1. 1 ≤ n; 2. s 1 = a; 3. for all natural numbers i such that 1 ≤ i < n, s i < s (i + 1) and s (i + 1) - s i ≤ K; 4. for all natural numbers u, r, v, and s_len, if u + r ≤ n, v + s_len ≤ n, 0 < r, and 0 < s_len, then ∑_{i = u + 1}^{u + r} s i = ∑_{j = v + 1}^{v + s_len} s j implies u = v and r = s_len (that is, all non-empty contiguous subarray sums from indices within {1, ..., n} are distinct); 5. s n = x.

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 of terminal values s(n) of valid sequences starting at a with step bound K and distinct consecutive sums. -/
def consecutive_sum_max_terms (a K : ℤ) : Set ℤ :=
  { x : ℤ | ∃ (n : ℕ) (s : ℕ → ℤ), is_valid_consecutive_sum_seq a K n s ∧ s n = x }
See it in the graphDiscuss this resultChallenge it