LegendreQF
Lean code formalizing a proof of Legendre's theorem on diagonal ternary quadratic forms
This repository contains lean3 code (using mathlib3; in the lean3 directory) and
lean4 code (using mathlib4; in the lean4 directory)
formalizing a proof of Legendre's Theorem on diagonal ternary quadratic forms:
Theorem. Let
do not have the same sign, is a square mod , is a square mod , is a sqaure mod .
It is easy to see that the conditions are necessary; the main part of the statement is that they are also sufficient.
The statement implies the Hasse Principle (for the ternary quadratic forms considered):
A ternary quadratic form as above has a nontrivial rational zero if and only if
it has a nontrivial real zero and nontrivial