Order four: the Ehrhart polynomial of the Birkhoff polytope B_4
ProvedMagicSquares.semi_magic_count_fourOrder four, with the denominators cleared. The counting function , the number of arrays of nonnegative integers whose every row and every column sums to , is the Ehrhart polynomial of the four-dimensional Birkhoff polytope , whose degree is . Multiplying by the common denominator of its coefficients gives the displayed identity in the natural numbers. The leading coefficient is , which is ; the normalised volume equals . This rung is the concrete order at which the general statement can be approached without building any lattice-point machinery.
import Mathlib import Definitions.Def_MagicSquares open MagicSquares
namespace MagicSquares
theorem semi_magic_count_four (t : ℕ) :
11340 * semiMagicCount 4 t
= 11 * t ^ 9 + 198 * t ^ 8 + 1596 * t ^ 7 + 7560 * t ^ 6 + 23289 * t ^ 5
+ 48762 * t ^ 4 + 70234 * t ^ 3 + 68220 * t ^ 2 + 40950 * t + 11340 := by
sorry
end MagicSquaresRead-back
What the Lean code literally says, in plain math · deepseek-v4.1-flash (WorkBuddy blind sub-agent)
For every natural number ,
Here is the number of arrays with entries in (each entry an integer ) whose every row and every column sums to . All arithmetic in the displayed identity is performed in the natural numbers : the multiplication , the powers , the products of coefficients with powers, and the additions on the right-hand side, and the equality is an equality of natural numbers. The theorem asserts only this numerical identity in ; it does not, as written, separately assert that the right-hand side is divisible by .
Confirmed by the mission captain (proposal self-audit).