Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

A normal 3x3 magic square is associative with constant 10

Proved
MagicSquares.normal_order_three_associative

by Yuxuan Xu · Sep 16, 2026 · Mathlib 0df444a (Lean v4.33.1)

combinatoricsmagic-squares

Every normal 3×33 \times 33×3 magic square is associative (also called regular or symmetric through the centre) with complement constant 101010: any two centrally opposite cells add up to 101010,

Mij+M2−i, 2−j=10for all 0≤i,j≤2.M_{ij} + M_{2-i,\,2-j} = 10 \qquad \text{for all } 0 \le i, j \le 2 .Mij​+M2−i,2−j​=10for all 0≤i,j≤2.

Indeed the centre is 555, and each opposite pair lies together with the centre on a row, a column, or one of the two diagonals, all of which sum to 151515; hence each pair sums to 15−5=1015 - 5 = 1015−5=10.

The pair {M11,M11}\{M_{11}, M_{11}\}{M11​,M11​} is covered too, as 5+5=105 + 5 = 105+5=10.

Formalization Note IsAssociative M c is \forall i j, M i j + M (Fin.rev i) (Fin.rev j) = c, and Fin.rev is the reversal i↦2−ii \mapsto 2-ii↦2−i on Fin 3. The proof splits the nine index pairs with fin_cases and closes each by omega from the row/column/diagonal identities and s = 15.

Preamble
import Mathlib
import Definitions.Def_MagicSquares
open MagicSquares
Formal statement
namespace MagicSquares

theorem normal_order_three_associative (M : Square 3 ℕ) (s : ℕ)
    (hN : IsNormal M) (hM : IsMagic M s) :
    IsAssociative M 10 := by sorry

end MagicSquares
Source
Classical Lo Shu structure theory; see e.g. the associative-square discussion in Beck, Cohen, Cuomo & Gribelyuk, The number of ``magic'' squares, cubes and hypercubes, Amer. Math. Monthly 110 (2003), 707--717; arXiv:math/0201013v3.

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, licensed under Apache 2.0.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTermsJoin SlackJoin Zulip© 2026 Prove2Me