AFTD Auto-Formalizing Theoretical Domains

davenport_box_three_even_sequence_sum

theoremverified

The sequence T(m) (even case) is a zero-sum sequence, for every m ≥ 2.

Statement

theorem davenport_box_three_even_sequence_sum (m : ℕ) (hm : 2 ≤ m) :
    (davenport_box_three_even_sequence m).sum = 0
Source
Step of the proof of Theorem 3 of arXiv:2610.16562 (even m): T(m) sums to zero.
Verified
19 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 3
  • davenport_box_three_even_sequenceThe sequence T(m) for even m: (-m,-m,-m) repeated 4m^3-6m^2+4m-1 times, (-m,m-1,m) repeated 4m^3-4m^2+2m times, (m,-(m-1),m-1) repeated…
  • TotalPreorderA total preorder: a preorder where ≤ is total (complete). This is weaker than LinearOrder — it does NOT require antisymmetry or…
  • LinearOrder.toTotalPreorderEvery LinearOrder is a TotalPreorder.
Used by 1

The proof, explained

The sequence $T(m)$ is defined as a multiset of four vectors in $\mathbb{Z}^3$ repeated with specific polynomial multiplicities in $m$. The proof first proves three helper identities showing that the multiplicities, though written using natural number subtraction, cast faithfully to integer polynomials without truncating at zero when $m \ge 2$. It then expands the multiset sum into a linear combination of the four vectors and verifies coordinate by coordinate that the polynomial coefficients cancel to zero.

  1. The natural expression $4m^3 - 6m^2 + 4m - 1$ casts to the corresponding polynomial in $\mathbb{Z}$ (lemma `hc1`).

    For $m \ge 2$, nonlinear arithmetic establishes $6m^2 \le 4m^3$, and Presburger arithmetic confirms $1 \le 4m^3 - 6m^2 + 4m$. By `Nat.cast_sub`, casting from $\mathbb{N}$ to $\mathbb{Z}$ commutes with these subtractions, and ring normalization confirms the identity in $\mathbb{Z}$.

    lines 3–11

    uses Nat.cast_sub

      have hc1 : ((4 * m ^ 3 - 6 * m ^ 2 + 4 * m - 1 : ℕ) : ℤ) =
          4 * (m : ℤ) ^ 3 - 6 * (m : ℤ) ^ 2 + 4 * (m : ℤ) - 1 := by
        have h1 : 6 * m ^ 2 ≤ 4 * m ^ 3 := by nlinarith
        have h2 : 1 ≤ 4 * m ^ 3 - 6 * m ^ 2 + 4 * m := by omega
        rw [Nat.cast_sub h2]
        push_cast
        rw [Nat.cast_sub h1]
        push_cast
        ring
  2. The natural expression $4m^3 - 4m^2$ casts to $4m^3 - 4m^2$ in $\mathbb{Z}$ (lemma `hc2`).

    Since $4m^2 \le 4m^3$ for $m \ge 2$, `Nat.cast_sub` ensures the natural subtraction casts to integer subtraction, which matches the integer polynomial.

    lines 12–16

    uses Nat.cast_sub

      have hc2 : ((4 * m ^ 3 - 4 * m ^ 2 : ℕ) : ℤ) = 4 * (m : ℤ) ^ 3 - 4 * (m : ℤ) ^ 2 := by
        have h3 : 4 * m ^ 2 ≤ 4 * m ^ 3 := by nlinarith
        rw [Nat.cast_sub h3]
        push_cast
        ring
  3. The natural expression $4m^3 - 2m^2$ casts to $4m^3 - 2m^2$ in $\mathbb{Z}$ (lemma `hc3`).

    Since $2m^2 \le 4m^3$ for $m \ge 2$, `Nat.cast_sub` ensures the natural subtraction casts to integer subtraction, which matches the integer polynomial.

    lines 17–21

    uses Nat.cast_sub

      have hc3 : ((4 * m ^ 3 - 2 * m ^ 2 : ℕ) : ℤ) = 4 * (m : ℤ) ^ 3 - 2 * (m : ℤ) ^ 2 := by
        have h4 : 2 * m ^ 2 ≤ 4 * m ^ 3 := by nlinarith
        rw [Nat.cast_sub h4]
        push_cast
        ring
  4. The total sum of the multiset is expressed as a linear combination of four vectors in $\mathbb{Z}^3$.

    Unfolding the definition of `davenport_box_three_even_sequence` expresses the multiset as four replicated vectors. Rewriting using `Multiset.sum_add` and `Multiset.sum_replicate` converts the sum of the multiset into a sum of scalar multiples of the four vectors.

    lines 22–23

    uses Multiset.sum_add, Multiset.sum_replicate

      dsimp [davenport_box_three_even_sequence]
      simp only [Multiset.sum_add, Multiset.sum_replicate]
  5. Each of the three coordinate components of the linear combination is zero.

    By function extensionality (`ext i`), it suffices to check each coordinate $i \in \{0, 1, 2\}$ separately. Case exhaustion on $i$ followed by evaluation yields an integer linear combination for each coordinate. Substituting the coercion identities `hc1`, `hc2`, and `hc3` replaces the natural multiplicity casts with integer polynomials, and polynomial ring arithmetic (`ring`) confirms that all terms cancel to 0 in all three components.

    lines 24–25

      ext i
      fin_cases i <;> simp <;> { rw [hc1, hc2, hc3]; ring }
Nat.cast_sub
For natural numbers $m \le n$, the cast into an additive group preserves subtraction: $\uparrow(n - m) = \uparrow n - \uparrow m$.
Multiset.sum_add
The sum of the concatenation (sum) of two multisets is the sum of their sums: $(s + t).\text{sum} = s.\text{sum} + t.\text{sum}$.
Multiset.sum_replicate
The sum of $n$ replicated copies of an element $a$ in an additive monoid is $n \cdot a$.

Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.

Lean source view module on GitHub

theorem davenport_box_three_even_sequence_sum (m : ℕ) (hm : 2 ≤ m) :    (davenport_box_three_even_sequence m).sum = 0 := by  have hc1 : ((4 * m ^ 3 - 6 * m ^ 2 + 4 * m - 1 : ℕ) : ℤ) =      4 * (m : ℤ) ^ 3 - 6 * (m : ℤ) ^ 2 + 4 * (m : ℤ) - 1 := by    have h1 : 6 * m ^ 2 ≤ 4 * m ^ 3 := by nlinarith    have h2 : 1 ≤ 4 * m ^ 3 - 6 * m ^ 2 + 4 * m := by omega    rw [Nat.cast_sub h2]    push_cast    rw [Nat.cast_sub h1]    push_cast    ring  have hc2 : ((4 * m ^ 3 - 4 * m ^ 2 : ℕ) : ℤ) = 4 * (m : ℤ) ^ 3 - 4 * (m : ℤ) ^ 2 := by    have h3 : 4 * m ^ 2 ≤ 4 * m ^ 3 := by nlinarith    rw [Nat.cast_sub h3]    push_cast    ring  have hc3 : ((4 * m ^ 3 - 2 * m ^ 2 : ℕ) : ℤ) = 4 * (m : ℤ) ^ 3 - 2 * (m : ℤ) ^ 2 := by    have h4 : 2 * m ^ 2 ≤ 4 * m ^ 3 := by nlinarith    rw [Nat.cast_sub h4]    push_cast    ring  dsimp [davenport_box_three_even_sequence]  simp only [Multiset.sum_add, Multiset.sum_replicate]  ext i  fin_cases i <;> simp <;> { rw [hc1, hc2, hc3]; ring }
See it in the graphDiscuss this resultChallenge it