combibench-v1 / brualdi-ch1-16
brualdi-ch1-16
open
difficulty 4
credited
Run this goal:
./swarm/run.sh --goal brualdi-ch1-16What it runs
The Lean statement the swarm must prove — kernel-verified at Gate A. The trailing sorry is the open obligation a proof replaces.
goals/brualdi-ch1-16.lean
import Mathlib
structure IsMagicSquare {n : ℕ} (M : Matrix (Fin n) (Fin n) ℕ) : Prop where
mem : ∀ i j, M i j ∈ Finset.Icc 1 (n * n)
pairwise : ∀ i j i' j', i ≠ i' ∨ j ≠ j' → M i j ≠ M i' j'
same_sum : ∃ s, (∀ i, ∑ j, M i j = s) ∧ (∀ j, ∑ i, M i j = s) ∧ (∑ i, M i i.rev = s) ∧ ∑ i, M i i = s
abbrev replace {n : ℕ}: Matrix (Fin n) (Fin n) ℕ → Matrix (Fin n) (Fin n) ℕ :=
fun A i j ↦ n^2 + 1 - A i j
theorem brualdi_ch1_16 {n : ℕ} (M : Matrix (Fin n) (Fin n) ℕ) (hM : IsMagicSquare M) :
IsMagicSquare (replace M) := by
sorryRuns (0)
No runs recorded for this suite yet — they appear here as the swarm attempts the benchmarks.