Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Hasse–Minkowski: local-global principle for integral quadratic forms

Proved
Gelbart.hasse_minkowski

by LG · Sep 14, 2026 · Mathlib 0df444a (Lean v4.33.1)

number-theoryp-adicquadratic-forms

Theorem (Hasse–Minkowski). Let Q(x1,…,xn)=∑i,jaijxixjQ(x_1,\dots,x_n) = \sum_{i,j} a_{ij} x_i x_jQ(x1​,…,xn​)=∑i,j​aij​xi​xj​ be a quadratic form with symmetric integer coefficient matrix (aij)(a_{ij})(aij​) and det⁡(aij)≠0\det(a_{ij}) \ne 0det(aij​)=0. Then QQQ has a nontrivial integer zero if and only if it has a nontrivial real zero and a nontrivial ppp-adic zero for every prime ppp.

This is the instance of the local-global principle quoted by Gelbart in §II.A as the motivation for passing from Q\mathbb{Q}Q to its completions. Symmetry of the matrix is stated explicitly here, where the source leaves it implicit in writing det⁡(aij)\det(a_{ij})det(aij​).

Preamble
import Mathlib
Formal statement
namespace Gelbart

theorem hasse_minkowski
    (n : ℕ) (A : Matrix (Fin n) (Fin n) ℤ) (hsymm : A.IsSymm) (hdet : A.det ≠ 0) :
    (∃ x : Fin n → ℤ, x ≠ 0 ∧ ∑ i, ∑ j, A i j * x i * x j = 0) ↔
      ((∃ x : Fin n → ℝ, x ≠ 0 ∧ ∑ i, ∑ j, (A i j : ℝ) * x i * x j = 0) ∧
        ∀ (p : ℕ) (hp : p.Prime),
          letI : Fact p.Prime := ⟨hp⟩
          ∃ x : Fin n → ℚ_[p], x ≠ 0 ∧ ∑ i, ∑ j, (A i j : ℚ_[p]) * x i * x j = 0) := by sorry

end Gelbart
Source
S. Gelbart, An elementary introduction to the Langlands program, Bull. Amer. Math. Soc. (N.S.) 10 (1984), no. 2, 177-219, https://doi.org/10.1090/S0273-0979-1984-15237-6, p. 186, §II.A, Theorem (Hasse-Minkowski)
Read-back

What the Lean code literally says, in plain math · Aristotle (Harmonic) — same agent that drafted the statements (non-blind)

⚠️ NON-BLIND READ-BACK — NOT INDEPENDENT TESTIMONY. This read-back was written by the same agent that drafted the Lean statements in this proposal, on the explicit instruction of the proposal owner. It was not written blind by an independent auditor: its author had full sight of the source text, the intended informal statement, and the drafting rationale. It therefore carries no independent evidential weight, and a reviewer must not treat it as an audit or as corroboration of faithfulness. An independent, blind read-back is still outstanding for every item in this proposal.

Fix a natural number nnn and an n×nn \times nn×n matrix AAA with integer entries AijA_{ij}Aij​. Assume AAA is symmetric (equal to its transpose) and that its determinant is nonzero. The claim is an equivalence between:

  • (left) there exists a vector x∈Znx \in \mathbb{Z}^{n}x∈Zn, not the zero vector, with ∑i∑jAij xi xj=0\sum_{i}\sum_{j} A_{ij}\,x_i\,x_j = 0∑i​∑j​Aij​xi​xj​=0; and
  • (right) the conjunction of two things: first, there exists a nonzero vector x∈Rnx \in \mathbb{R}^{n}x∈Rn with ∑i∑jAij xi xj=0\sum_{i}\sum_{j} A_{ij}\,x_i\,x_j = 0∑i​∑j​Aij​xi​xj​=0 (entries of AAA cast to reals); second, for every natural number ppp and every proof that ppp is prime, there exists a nonzero vector x∈Qpnx \in \mathbb{Q}_p^{n}x∈Qpn​ with ∑i∑jAij xi xj=0\sum_{i}\sum_{j} A_{ij}\,x_i\,x_j = 0∑i​∑j​Aij​xi​xj​=0 (entries cast into Qp\mathbb{Q}_pQp​).

"Nonzero vector" means the function xxx is not identically zero. The double sums range over all pairs of indices in {0,…,n−1}\{0,\dots,n-1\}{0,…,n−1}, so each off-diagonal coefficient is counted twice; no restriction to i≤ji \le ji≤j is made. Degenerate case: for n=0n = 0n=0 the determinant of the empty matrix is 1≠01 \ne 01=0, the only vector is the zero vector, so both sides are false and the equivalence holds vacuously. Only finite ppp-adic completions and the real place occur; nothing is asserted about solutions modulo prime powers.

Human review
  • Endorsed by Shuze Chen · Sep 14, 2026

  • Endorsed by LG · Sep 14, 2026

    Confirmed by the mission captain (proposal self-audit).

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, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me