davenport_box_three_odd_sequence_card
The sequence T(m) (odd case) has length 16m^3 - 16m^2 + 10m - 2.
Statement
theorem davenport_box_three_odd_sequence_card (m : ℕ) (hm : 2 ≤ m) :
Multiset.card (davenport_box_three_odd_sequence m) = 16 * m ^ 3 - 16 * m ^ 2 + 10 * m - 2- Source
- Step of the proof of Theorem 3 of arXiv:2610.16562 (odd m): the length of T(m).
- Verified
- 19 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 3
- davenport_box_three_odd_sequenceThe sequence T(m) for odd m: (-m,-m,-m) repeated 4m^3-8m^2+5m-2 times, (-m,m-1,m) repeated 4m^3-2m^2+2m times, (m,-m,m-2) 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_oddTheorem 3 of arXiv:2610.16562, odd m: for every odd m ≥ 2, the maximal length of a minimal zero-sum sequence over [[-m,m]]^3 with support…
The proof, explained
The multiset cardinality of the sequence is evaluated by unfolding its definition into four replicated multisets and applying the additivity of multiset cardinality. Because natural-number subtraction truncates at zero, auxiliary inequalities are verified using m ≥ 2 to ensure that all subtractions in the formula do not underflow. The identity is then cast into ℤ and closed by polynomial ring arithmetic.
The multiset cardinality reduces to the sum of the lengths of the four replicated components in ℕ: (4m³ - 8m² + 5m - 2) + (4m³ - 2m² + 2m) + (4m³ - 2m² + m) + (4m³ - 4m² + 2m) = 16m³ - 16m² + 10m - 2.
Unfolding the definition of davenport_box_three_odd_sequence shows that the sequence is the sum of four replicated multisets in ℤ³. Rewriting with Multiset.card_add and Multiset.card_replicate reduces the cardinality of this sum to the addition of the four multiplicities as natural numbers.
uses
Multiset.card_add,Multiset.card_replicatedsimp [davenport_box_three_odd_sequence] simp only [Multiset.card_add, Multiset.card_replicate]
All natural-number subtractions in the expression are well-ordered: 8m² ≤ 4m³, 2 ≤ 4m³ - 8m² + 5m, 2m² ≤ 4m³, 4m² ≤ 4m³, 16m² ≤ 16m³, and 2 ≤ 16m³ - 16m² + 10m.
Because m ≥ 2, the cubic terms dominate the lower-degree terms. Nonlinear arithmetic (nlinarith) directly verifies the four inequalities without subtractions. For the remaining two inequalities (h2 and h6), casting intermediate expressions to ℤ via zify enables nlinarith to establish that neither subtraction truncates at zero.
have h1 : 8 * m ^ 2 ≤ 4 * m ^ 3 := by nlinarith have h2 : 2 ≤ 4 * m ^ 3 - 8 * m ^ 2 + 5 * m := by zify [h1] nlinarith have h3 : 2 * m ^ 2 ≤ 4 * m ^ 3 := by nlinarith have h4 : 4 * m ^ 2 ≤ 4 * m ^ 3 := by nlinarith have h5 : 16 * m ^ 2 ≤ 16 * m ^ 3 := by nlinarith have h6 : 2 ≤ 16 * m ^ 3 - 16 * m ^ 2 + 10 * m := by zify [h5] nlinarith
The arithmetic identity holds, completing the evaluation of the multiset cardinality.
With the six inequalities guaranteeing that no subtraction in ℕ truncates, zify lifts the equality from ℕ to the ring of integers ℤ. The resulting polynomial identity in ℤ is verified by polynomial expansion and collecting terms (ring).
zify [h1, h2, h3, h4, h5, h6] ring
Multiset.card_add- The cardinality of the sum of two multisets is the sum of their cardinalities: |s + t| = |s| + |t|.
Multiset.card_replicate- The cardinality of a multiset consisting of n copies of an element is n.
- In Lean, subtraction on natural numbers truncates at zero (a - b = 0 when a ≤ b). Proving an identity in ℕ that contains subtractions requires first proving that each minuend is at least the subtrahend (lines 5–14) so that the equation can be faithfully cast into ℤ, a formal step with no counterpart on paper.
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_odd_sequence_card (m : ℕ) (hm : 2 ≤ m) : Multiset.card (davenport_box_three_odd_sequence m) = 16 * m ^ 3 - 16 * m ^ 2 + 10 * m - 2 := by dsimp [davenport_box_three_odd_sequence] simp only [Multiset.card_add, Multiset.card_replicate] have h1 : 8 * m ^ 2 ≤ 4 * m ^ 3 := by nlinarith have h2 : 2 ≤ 4 * m ^ 3 - 8 * m ^ 2 + 5 * m := by zify [h1] nlinarith have h3 : 2 * m ^ 2 ≤ 4 * m ^ 3 := by nlinarith have h4 : 4 * m ^ 2 ≤ 4 * m ^ 3 := by nlinarith have h5 : 16 * m ^ 2 ≤ 16 * m ^ 3 := by nlinarith have h6 : 2 ≤ 16 * m ^ 3 - 16 * m ^ 2 + 10 * m := by zify [h5] nlinarith zify [h1, h2, h3, h4, h5, h6] ring