Section 1 principle: superposing two letter arrangements gives a magic square
ProvedRamanujanNotebooks.entry_1_1Let , let and be natural numbers and let each cell of an array carry one index and one index so that every index of either kind occurs exactly once in each row, each column and each of the two diagonals, and every pair occurs in exactly one cell. Then the array with entries has all row sums, column sums and both diagonal sums equal to .
Discrepancy from the printed source. Page 16 describes a letter-placement construction in prose. This version uses two index maps: each map permutes its indices along every row, column and diagonal, while the two maps together match cells with all pairs. The array size is positive, and the common sum is the sum of the two lists. Values in those lists may repeat; distinct numerical entries are not required.
import Mathlib import Definitions.Def_RamanujanNotebooks_ch01_ch1AntiDiagSum import Definitions.Def_RamanujanNotebooks_ch01_ch1DiagSum import Definitions.Def_RamanujanNotebooks_ch01_ch1IsMagic import Definitions.Def_RamanujanNotebooks_ch01_ch1IsSemiMagic
namespace RamanujanNotebooks
theorem entry_1_1 (n : ℕ) (hn : 0 < n) (a p : Fin n → ℕ) (σ τ : Fin n → Fin n → Fin n)
(hσrow : ∀ i : Fin n, Function.Bijective (fun j : Fin n => σ i j))
(hσcol : ∀ j : Fin n, Function.Bijective (fun i : Fin n => σ i j))
(hσdiag : Function.Bijective (fun i : Fin n => σ i i))
(hσanti : Function.Bijective (fun i : Fin n => σ i (Fin.rev i)))
(hτrow : ∀ i : Fin n, Function.Bijective (fun j : Fin n => τ i j))
(hτcol : ∀ j : Fin n, Function.Bijective (fun i : Fin n => τ i j))
(hτdiag : Function.Bijective (fun i : Fin n => τ i i))
(hτanti : Function.Bijective (fun i : Fin n => τ i (Fin.rev i)))
(hpair : Function.Bijective (fun x : Fin n × Fin n => (σ x.1 x.2, τ x.1 x.2))) :
ch1IsMagic (fun i j : Fin n => a (σ i j) + p (τ i j))
((∑ k : Fin n, a k) + (∑ k : Fin n, p k)) := by sorry
end RamanujanNotebooksConfirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.