Classification of symmetric order-three magic squares
ProvedMagicSquares.symmetric_magic_three_classifySymmetry pins down the square.
Let be a array of nonnegative integers which is symmetric () and magic of line sum . Then is completely determined by its top-left corner:
Proof. Symmetry identifies , and , so the eight line identities collapse to five: the three rows, the main diagonal , and the anti-diagonal . The anti-diagonal forces (subtracting it from the main diagonal gives , and the middle row then pins ). The rows and the remaining diagonal identities then express every other cell in terms of and :
This is exactly the shape packaged as symmMagic3 e a in the companion
definition MagicSquaresSpecial3.
Context. The statement is the order-three instance of the classical observation that symmetric magic squares are highly constrained: the symmetry removes three of the eight line conditions, and the remaining ones leave a one-parameter family rather than a two-parameter one. Iterating it gives the count . Unlike the panmagic case, the surviving family is genuinely non-trivial — the parameter ranges over — which is why the symmetric and panmagic counts of order three differ.
import Mathlib import Definitions.Def_MagicSquares import Definitions.Def_MagicSquaresSpecial3 open MagicSquares
namespace MagicSquares
theorem symmetric_magic_three_classify (e : ℕ) (M : Square 3 ℕ)
(hM : IsMagic M (3 * e)) (hsym : IsSymmetric M) :
M = symmMagic3 e (M 0 0) := by sorry
end MagicSquares
Confirmed by the mission captain (proposal self-audit).