{
  "id": "8628",
  "ident": "NS.08628",
  "slug": "wikipedia-weighingmatrix",
  "title": "Weighing matrices and the Geramita–Seberry conjecture",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "**Weighing matrix conjecture** (Wallis 1972; Geramita–Seberry [GS79]): for every positive integer\n$m \\ge 1$ and every weight $0 \\le w \\le 4m$, there exists a weighing matrix $W(4m, w)$ of order\n$4m$ and weight $w$.\n\nAt $w = 4m$, this specializes to Hadamard's conjecture.",
  "subjects": [
    "math.CO",
    "math.RA",
    "msc:05",
    "msc:15"
  ],
  "tags": [],
  "collection": "wikipedia",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "WeighingMatrix.weighing_matrix_conjecture",
  "statement_lean": "theorem weighing_matrix_conjecture (m w : ℕ) (hm : 1 ≤ m) (hw : w ≤ 4 * m) :\n    ∃ W, IsWeighingMatrix (n := 4 * m) w W",
  "challenge_source": "/-\nCopyright 2026 The Formal Conjectures Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    https://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-/\nmodule\n\npublic import FormalConjecturesUtil\n\n/-!\n# Weighing matrices and the Geramita–Seberry conjecture\n\nA *weighing matrix* $W(n, w)$ of order $n$ and weight $w$ is an $n \\times n$ matrix with entries in\n$\\{-1, 0, 1\\}$ satisfying $W W^{\\mathsf{T}} = w I_n$. At $w = n$, this recovers Hadamard matrices.\n\n*References:*\n- [Wikipedia](https://en.wikipedia.org/wiki/Weighing_matrix)\n- [Ea76] Eades, P. (1976). *Some asymptotic existence results for orthogonal designs*, Ars Combin.\n  1, 109--118.\n- [GS79] Geramita, A. V. and Seberry, J. (1979). *Orthogonal Designs: Quadratic Forms and Hadamard\n  Matrices*, Lecture Notes in Pure and Applied Mathematics 45, Marcel Dekker, New York.\n-/\n\n@[expose] public section\n\nnamespace WeighingMatrix\n\n/-- `W` is a **weighing matrix** $W(n, w)$ of order $n$ and weight $w$ if its entries lie in\n$\\{-1, 0, 1\\}$ and $W W^{\\mathsf{T}} = w I_n$.\n\nAt $n = 0$, `Matrix (Fin 0) (Fin 0) ℤ` is a subsingleton, so the empty matrix trivially satisfies\n`IsWeighingMatrix (n := 0) w 0` for every $w$; existence statements below restrict to $n \\ge 1$. -/\ndef IsWeighingMatrix {n : ℕ} (w : ℕ) (W : Matrix (Fin n) (Fin n) ℤ) : Prop :=\n  (∀ i j, W i j = -1 ∨ W i j = 0 ∨ W i j = 1) ∧\n    W * W.transpose = (w : ℤ) • 1\n\n/-- For every order $n$, the zero matrix is a weighing matrix $W(n, 0)$ of weight $0$. -/\n@[category API, AMS 5 15]\ntheorem isWeighingMatrix_zero (n : ℕ) : IsWeighingMatrix (n := n) 0 0 :=\n  ⟨fun _ _ => .inr (.inl rfl), by simp⟩\n\n/-- For every order $n$, the identity matrix is a weighing matrix $W(n, 1)$ of weight $1$. -/\n@[category API, AMS 5 15]\ntheorem isWeighingMatrix_one (n : ℕ) : IsWeighingMatrix (n := n) 1 1 := by\n  refine ⟨fun i j => ?_, by simp⟩\n  by_cases hij : i = j <;> simp [Matrix.one_apply, hij]\n\n/-- Negating a weighing matrix $W(n, w)$ yields a weighing matrix of the same order and weight. -/\n@[category API, AMS 5 15]\ntheorem IsWeighingMatrix.neg {n w : ℕ} {W : Matrix (Fin n) (Fin n) ℤ}\n    (hW : IsWeighingMatrix w W) :\n    IsWeighingMatrix w (-W) := by\n  refine ⟨fun i j => ?_, ?_⟩\n  · rcases hW.1 i j with h | h | h <;> simp [h]\n  · rw [Matrix.transpose_neg, neg_mul_neg, hW.2]\n\n/-- The $2 \\times 2$ Sylvester matrix $\\begin{pmatrix} 1 & 1 \\\\ 1 & -1 \\end{pmatrix}$ is a weighing\nmatrix $W(2, 2)$. -/\n@[category test, AMS 5 15]\ntheorem isWeighingMatrix_two_two : IsWeighingMatrix (n := 2) 2 !![1, 1; 1, -1] := by\n  refine ⟨fun i j => ?_, ?_⟩\n  · fin_cases i <;> fin_cases j <;> decide\n  · ext i j\n    fin_cases i <;> fin_cases j <;> decide\n\n/-- No weighing matrix $W(2, 3)$ exists because each row of length $2$ over $\\{-1, 0, 1\\}$ has\nsquared norm at most $2$. -/\n@[category test, AMS 5 15]\ntheorem not_exists_isWeighingMatrix_two_three : ¬ ∃ W, IsWeighingMatrix (n := 2) 3 W := by\n  rintro ⟨W, hent, hmul⟩\n  have h00 := congrArg (fun M => M 0 0) hmul\n  simp [Matrix.mul_apply, Fin.sum_univ_two] at h00\n  have hsq0 : W 0 0 * W 0 0 ≤ 1 := by\n    rcases hent 0 0 with h | h | h <;> rw [h] <;> norm_num\n  have hsq1 : W 0 1 * W 0 1 ≤ 1 := by\n    rcases hent 0 1 with h | h | h <;> rw [h] <;> norm_num\n  linarith\n\n/--\n**Weighing matrix conjecture** (Wallis 1972; Geramita–Seberry [GS79]): for every positive integer\n$m \\ge 1$ and every weight $0 \\le w \\le 4m$, there exists a weighing matrix $W(4m, w)$ of order\n$4m$ and weight $w$.\n\nAt $w = 4m$, this specializes to Hadamard's conjecture.\n-/\n@[category research open, AMS 5 15]\ntheorem weighing_matrix_conjecture (m w : ℕ) (hm : 1 ≤ m) (hw : w ≤ 4 * m) :\n    ∃ W, IsWeighingMatrix (n := 4 * m) w W := by\n  sorry\n\n/--\n**Asymptotic existence of weighing matrices** (Eades [Ea76]; Geramita–Seberry [GS79], Thm. 7.17):\nfor every fixed weight $w$, a weighing matrix $W(4m, w)$ exists for all sufficiently large multiples\n$4m$.\n-/\n@[category research solved, AMS 5 15]\ntheorem weighing_matrix_conjecture.variants.asymptotic (w : ℕ) :\n    ∀ᶠ m in Filter.atTop, ∃ W, IsWeighingMatrix (n := 4 * m) w W := by\n  sorry\n\nend WeighingMatrix\n",
  "statement_hash": "c76532464e84a981af4ee3d008997c9c349ed44de2aa3335b12f2236d515287a",
  "toolchain": "leanprover/lean4:v4.33.1",
  "upstream_commit": "f9b3868d5ca994a7bf95039bcec05338c0c21e2f",
  "workspace": "formal-conjectures",
  "field": "math",
  "formalization": "formal",
  "verification": "lean-kernel",
  "license": "Apache-2.0",
  "attribution": "google-deepmind/formal-conjectures contributors",
  "metric_name": null,
  "metric_direction": null,
  "critiques": [],
  "public_partial_proofs": [],
  "research_threads": [],
  "instructions": "Read research_threads first: other people's public repositories and what they already tried. Write Solution.lean starting from challenge_source. Keep every definition identical, prove decl_name with exactly the same type, no sorry in its dependency closure, no new axioms, no native_decide, no metaprogramming. Submit with POST /api/v1/submissions."
}