davenport_box_three_even_sequence_card
The sequence T(m) (even case) has length 16m^3 - 16m^2 + 8m - 1.
Statement
theorem davenport_box_three_even_sequence_card (m : ℕ) (hm : 2 ≤ m) :
Multiset.card (davenport_box_three_even_sequence m) = 16 * m ^ 3 - 16 * m ^ 2 + 8 * m - 1- Source
- Step of the proof of Theorem 3 of arXiv:2610.16562 (even m): the length of T(m).
- 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 thanLinearOrder— it does NOT require antisymmetry or… - LinearOrder.toTotalPreorderEvery
LinearOrderis aTotalPreorder.
- Used by 1
- davenport_constant_support_four_int_box_three_ge_evenTheorem 3 of arXiv:2610.16562, even m: for every even m ≥ 2, the maximal length of a minimal zero-sum sequence over [[-m,m]]^3 with…
The proof, explained
The proof computes the cardinality of the multiset $T(m)$ by unfolding its definition as the sum of four replicated multisets and applying `Multiset.card_add` and `Multiset.card_replicate`. Because subtraction in $\mathbb{N}$ truncates at zero, it establishes six ordering inequalities from $m \ge 2$ ensuring no subtraction underflows. Finally, `zify` casts the identity to $\mathbb{Z}$, where it is verified by polynomial ring normalization.
The multiset cardinality reduces to the natural number sum $(4m^3 - 6m^2 + 4m - 1) + (4m^3 - 4m^2 + 2m) + (4m^3 - 2m^2 + m) + (4m^3 - 4m^2 + m) = 16m^3 - 16m^2 + 8m - 1$.
Unfolding the definition of `davenport_box_three_even_sequence`, the multiset is expressed as the sum of four replicated vectors of lengths $4m^3 - 6m^2 + 4m - 1$, $4m^3 - 4m^2 + 2m$, $4m^3 - 2m^2 + m$, and $4m^3 - 4m^2 + m$. Simplifying with `Multiset.card_add` and `Multiset.card_replicate` expresses the total cardinality as the sum of these four counts.
uses
Multiset.card_add,Multiset.card_replicatedsimp [davenport_box_three_even_sequence] simp only [Multiset.card_add, Multiset.card_replicate]
The ordering inequalities $6m^2 \le 4m^3$, $1 \le 4m^3 - 6m^2 + 4m$, $4m^2 \le 4m^3$, $2m^2 \le 4m^3$, $16m^2 \le 16m^3$, and $1 \le 16m^3 - 16m^2 + 8m$ all hold.
To ensure that the natural number subtractions in the expression do not truncate at zero, we establish bounds on the terms from the assumption $m \ge 2$. The inequalities $h_1, h_3, h_4, h_5$ are proved by nonlinear arithmetic (`nlinarith`), and the inequalities $h_2, h_6$ are closed by integer arithmetic (`omega`).
have h1 : 6 * m ^ 2 ≤ 4 * m ^ 3 := by nlinarith have h2 : 1 ≤ 4 * m ^ 3 - 6 * m ^ 2 + 4 * m := by omega have h3 : 4 * m ^ 2 ≤ 4 * m ^ 3 := by nlinarith have h4 : 2 * m ^ 2 ≤ 4 * m ^ 3 := by nlinarith have h5 : 16 * m ^ 2 ≤ 16 * m ^ 3 := by nlinarith have h6 : 1 ≤ 16 * m ^ 3 - 16 * m ^ 2 + 8 * m := by omega
The multiset cardinality equals $16m^3 - 16m^2 + 8m - 1$.
Using `zify` along with the bounds $h_1$ through $h_6$, each truncated subtraction in $\mathbb{N}$ is converted into standard subtraction in $\mathbb{Z}$. The resulting polynomial identity in $\mathbb{Z}$ is then verified by commutative ring normalization (`ring`).
zify [h1, h2, h3, h4, h5, h6] ring
Multiset.card_add- The cardinality of the sum (disjoint union) of two multisets is the sum of their cardinalities.
Multiset.card_replicate- The cardinality of a multiset formed by replicating an element $n$ times is $n$.
- In Lean, subtraction on natural numbers truncates at zero (so $a - b = 0$ whenever $a \le b$). Proving an algebraic identity involving subtractions in $\mathbb{N}$ therefore requires explicitly establishing that no intermediate subtraction underflows before casting the equation to $\mathbb{Z}$.
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
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
theorem davenport_box_three_even_sequence_card (m : ℕ) (hm : 2 ≤ m) : Multiset.card (davenport_box_three_even_sequence m) = 16 * m ^ 3 - 16 * m ^ 2 + 8 * m - 1 := by dsimp [davenport_box_three_even_sequence] simp only [Multiset.card_add, Multiset.card_replicate] have h1 : 6 * m ^ 2 ≤ 4 * m ^ 3 := by nlinarith have h2 : 1 ≤ 4 * m ^ 3 - 6 * m ^ 2 + 4 * m := by omega have h3 : 4 * m ^ 2 ≤ 4 * m ^ 3 := by nlinarith have h4 : 2 * m ^ 2 ≤ 4 * m ^ 3 := by nlinarith have h5 : 16 * m ^ 2 ≤ 16 * m ^ 3 := by nlinarith have h6 : 1 ≤ 16 * m ^ 3 - 16 * m ^ 2 + 8 * m := by omega zify [h1, h2, h3, h4, h5, h6] ring