AFTD Auto-Formalizing Theoretical Domains

consecutive_sum_ne_mul_prime

theoremverifiedformalization

Let a ≥ 1 and p a prime with p > 2n and 2an − T_{2a−1} < ap, where T_m = m(m+1)/2. Then a·p is not a sum of consecutive integers from {1, …, n} (it is not a standard arc sum of the n-cycle).

Statement

theorem consecutive_sum_ne_mul_prime (n a p i j : ℕ) (hp : p.Prime) (hpn : 2 * n < p)
    (ha : 0 < a) (hap : 2 * a * n < a * p + a * (2 * a - 1)) (hi : 1 ≤ i) (hij : i ≤ j)
    (hjn : j ≤ n) :
    ∑ x ∈ Finset.Icc i j, x ≠ a * p
Formalizes
arXiv:2610.08889 (Consecutive Cycle Sums), Lemma 2 (2an − T_{2a−1} < ap written as 2an < ap + a(2a − 1)); proved here from the stronger consecutive_sum_ne_mul_prime_of_two_mul_lt, which drops that hypothesis.
Verified
09 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1

The proof, explained

The theorem is proved by directly applying `consecutive_sum_ne_mul_prime_of_two_mul_lt`. That prior result already shows that no consecutive sum of elements from $\{1, \dots, n\}$ can equal $a \cdot p$ given $p > 2n$, $p$ prime, and $a > 0$. As a result, the stronger condition $2an < ap + a(2a-1)$ in the theorem statement is not needed in the proof.

  1. $\sum_{x=i}^j x \ne a \cdot p$

    This is an immediate application of the lemma `consecutive_sum_ne_mul_prime_of_two_mul_lt` with the parameters $n, a, p, i, j$ and the hypotheses $p$ is prime, $2n < p$, $a > 0$, and $1 \le i \le j \le n$. The additional inequality $2an < ap + a(2a-1)$ is not needed.

    line 5

    uses consecutive_sum_ne_mul_prime_of_two_mul_lt

      consecutive_sum_ne_mul_prime_of_two_mul_lt n a p i j hp hpn ha hi hij hjn
consecutive_sum_ne_mul_prime_of_two_mul_lt
For a prime $p > 2n$, integer $a > 0$, and indices $1 ≤ i ≤ j ≤ n$, the sum of consecutive integers $\sum_{x=i}^j x$ does not equal $a \cdot p$.

Written by a model (gemini-3.8-flash) from the Lean source alone (no goal states were available). Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.

Lean source view module on GitHub

theorem consecutive_sum_ne_mul_prime (n a p i j : ℕ) (hp : p.Prime) (hpn : 2 * n < p)    (ha : 0 < a) (hap : 2 * a * n < a * p + a * (2 * a - 1)) (hi : 1 ≤ i) (hij : i ≤ j)    (hjn : j ≤ n) :    ∑ x ∈ Finset.Icc i j, x ≠ a * p :=  consecutive_sum_ne_mul_prime_of_two_mul_lt n a p i j hp hpn ha hi hij hjn
See it in the graphDiscuss this resultChallenge it