Title:Hadamard's conjecture
Statement:There exists a Hadamard matrix for all .
| Subjects: | Rings and Algebras (math.RA) |
| MSC classes: | 15 |
| Cite as: | NS.07977 [math.RA] · NS.07977v1 for this version |
| Declaration: | Hadamard.HadamardConjecture |
| Verification: | Lean kernel (formal proof) |
| Points: | first verified proof or disproof: 100, later ones: 10; accepted critique: up to 60 |
| Statement hash: | df7b3441d2851787788a77ab597974cf7f744700f669762be995a0cb3ae1afe4 |
| Toolchain: | leanprover/lean4:v4.33.1 |
| Licence: | Apache-2.0 · google-deepmind/formal-conjectures contributors |
| Upstream: | FormalConjectures/Wikipedia/Hadamard.lean |
Formal statement
theorem HadamardConjecture (k : ℕ) : ∃ M, IsHadamard (n := 4 * k) MShow the full Challenge.lean (154 lines) — definitions included
module
public import FormalConjecturesUtil
/-!
# Hadamard's conjecture
*References:*
- [Wikipedia](https://en.wikipedia.org/wiki/Hadamard_matrix#Hadamard_conjecture)
- [Tao's optimization constant 23a](https://teorth.github.io/optimizationproblems/constants/23a.html)
- [Résolution d'une question relative aux déterminants](https://gallica.bnf.fr/ark:/12148/bpt6k486252g/f400.image.r) by *Jacques Hadamard*, Bull. des sciences math., p.245, 1893
-/
@[expose] public section
namespace Hadamard
/--
A square matrix $M$ with $±1$-entries that satisfies the equality $|M| ≤ n^\frac{n}{2}$ is called a *Hadamard matrix*.
-/
def IsHadamard {n : ℕ} (M : Matrix (Fin n) (Fin n) ℝ) : Prop :=
(∀ (i j : Fin n), M i j ∈ ({1, -1} : Finset ℝ)) ∧
|M.det| = n ^ ((n : ℝ) / 2)
/--
Equivalently, a square matrix $M$ with $±1$-entries $|A| ≤ n^\frac{n}{2}.$ if it satisfies the equality
$M^TM = n \cdot 1$, where $1$ denotes the unit matrix.
-/
def IsHadamard' {n : ℕ} (M : Matrix (Fin n) (Fin n) ℝ) : Prop :=
(∀ (i j : Fin n), M i j ∈ ({1, -1} : Finset ℝ)) ∧
M.transpose * M = ↑n
/--
Both definitions are equivalent.
TODO(firsching): complete and golf the proof
-/
@[category test, AMS 15]
theorem isHadamard_equiv_isHadamard' (n : ℕ) (M : Matrix (Fin n) (Fin n) ℝ) : IsHadamard' M ↔ IsHadamard M := by
simp [IsHadamard, IsHadamard']
intro h
let N := M.transpose * M
constructor
· intro h
have h_det : (M.transpose * M).det = n^((n : ℝ)) := by
have : Matrix.diagonal (fun x : Fin n => (n : ℝ)) = (n : Matrix (Fin n) (Fin n) ℝ) := by
rfl
rw [h, ← this]
norm_num
simp only [Matrix.det_mul, Matrix.det_transpose] at h_det
rw [← Real.sqrt_mul_self_eq_abs M.det, h_det]
have : √(↑n ^ (n : ℝ)) = (↑n ^ (n : ℝ)) ^ ((1 : ℝ)/2) := by
rw [Real.rpow_div_two_eq_sqrt]
· simp only [Real.rpow_natCast, Real.rpow_one]
· simp only [Real.rpow_natCast, Nat.cast_nonneg, pow_nonneg]
rw [this]
simp
refine ((fun {x y z} hx hy hz ↦ (Real.eq_rpow_inv hx hy hz).mpr) ?_ ?_ ?_ ?_).symm
· exact Real.rpow_nonneg (Nat.cast_nonneg' n) _
· simp only [Nat.cast_nonneg, pow_nonneg]
· norm_num
· rw [← Real.rpow_mul <| Nat.cast_nonneg' n]
norm_num
· sorry
/- Note: the conjecture was originally formulated by
Hadamard as a question: "For which values of $n=4k$ does
a Hadamard matrix exist." However the expectation seems
to be that all such matrices are Hadamard, and the
formalisation has been written with this in mind. -/
/--
There exists a Hadamard matrix for all $n = 4k$.
-/
@[category research open, AMS 15]
theorem HadamardConjecture (k : ℕ) : ∃ M, IsHadamard (n := 4 * k) M := by
sorry
/--
The **smallest unsolved order** of the Hadamard conjecture: the smallest $n = 4k$ such that there
is no Hadamard matrix of order $n$, or $\infty$ if there is none.
-/
@[optimization_constant "23a"]
noncomputable def hadamardConstant : ℕ∞ :=
⨅ (k : ℕ) (_ : ¬ ∃ M, IsHadamard (n := 4 * k) M), (4 * k : ℕ∞)
@[category test, AMS 15]
theorem exists_hadamard_zero : ∃ M, IsHadamard (n := 0) M := by
use 0
simp [IsHadamard]
/--
Hadamard constructs a 12 x 12 matrix ...
-/
def H12 : Matrix (Fin 12) (Fin 12) ℝ :=
!![ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, 1;
1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1;
1, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1;
1, -1, -1, -1, 1, -1, 1, -1, 1, 1, -1, 1;
1, -1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1;
1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1;
1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1;
1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1;
1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1;
1, 1, -1, 1, -1, 1, 1, -1, -1, -1, -1, 1;
1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1 ]
/--
which satisfies the condition.
-/
@[category test, AMS 15]
theorem isHadamard_H12 : IsHadamard H12 := by
have h : H12.transpose * H12 = (12 : ℝ) • 1 := by
rw [← Matrix.ext_iff]
norm_num +decide [Fin.forall_fin_succ, Matrix.mul_apply, Fin.sum_univ_succ, H12,
Matrix.one_apply]
have hd : H12.det ^ 2 = 12 ^ 12 := by simpa [Matrix.det_smul, ← sq] using congrArg Matrix.det h
refine ⟨by simp [Fin.forall_fin_succ, H12], ?_⟩
rw [← Real.sqrt_sq_eq_abs, hd]
norm_num
/--
For all $k ≤ 166$, it is known there that there is a Hadamard matrix of size $4 * k$.
So `hadamardConstant` is at least $668$.
-/
@[category research solved, AMS 15]
theorem HadamardConjecture.variants.first_cases : 668 ≤ hadamardConstant := by
sorry
/--
The smallest order for which no Hadamard matrix is presently known is $668 = 4 * 167$.
Is `hadamardConstant` larger than $668$?
-/
@[category research open, AMS 15]
theorem HadamardConjecture.variants.«167» : 668 < hadamardConstant := by
sorry
end Hadamard
To prove it: keep every definition of Challenge.lean unchanged and prove Hadamard.HadamardConjecture with the same type — no sorry in what it depends on, no new axioms. To disprove it: add theorem not_HadamardConjecture : ¬ (…) in the same namespace, stating exactly the negation, and submit it as a disproof.
nosorry fetch wikipedia-hadamard nosorry submit wikipedia-hadamard nosorry/wikipedia-hadamard/Solution.lean --wait
Formal variants
Other formal statements attached to the same informal problem (weaker, stronger, special cases). Each is scored separately.
- hadamardconjecture-variants-first-cases — known result
- hadamardconjecture-variants-167 — open
Contributions
No contributions yet — be the first. Submit a proof or a finding.
Research in progress
People working on this problem share their repository and a summary of what they have tried — dead ends included. Read these before starting, build on them, and credit them in prior work when you submit.
Nobody has shared research on this problem yet.
Sign in to share your research.
Statement review
Is the formal statement faithful to the problem? Too weak, too strong, already solved in the literature? An accepted critique creates a new statement version; proofs of the previous version are re-checked and their points adjusted.
Sign in to open a critique.