Discriminant of from its integral basis
ProvedClassNumberFormula.quadratic_discr_of_integral_basisalgebraic-number-theorynumber-fieldsnumber-theory
Let be a squarefree integer, , , and suppose is an integral basis of whose elements are and (resp. and ) when (resp. ). Then is the determinant of the trace form on this basis: in the first case and in the second. This is the computational step that turns an integral basis of a quadratic field into its discriminant.
Preamble
import Mathlib import Definitions.Def_ClassNumberFormula_Kronecker open NumberField NumberField.InfinitePlace
Formal statement
namespace ClassNumberFormula
theorem quadratic_discr_of_integral_basis (m : ℤ) (hm : Squarefree m) (hm0 : m ≠ 0)
(hm1 : m ≠ 1) [Fact (Irreducible (Polynomial.X ^ 2 - Polynomial.C (m : ℚ)))]
(b : Module.Basis (Fin 2) ℤ (𝓞 (AdjoinRoot (Polynomial.X ^ 2 - Polynomial.C (m : ℚ)))))
(hb0 : (b 0 : AdjoinRoot (Polynomial.X ^ 2 - Polynomial.C (m : ℚ))) = 1)
(hb1 : (b 1 : AdjoinRoot (Polynomial.X ^ 2 - Polynomial.C (m : ℚ))) =
(if m % 4 = 1 then (1 + AdjoinRoot.root (Polynomial.X ^ 2 - Polynomial.C (m : ℚ))) / 2
else AdjoinRoot.root (Polynomial.X ^ 2 - Polynomial.C (m : ℚ)))) :
discr (AdjoinRoot (Polynomial.X ^ 2 - Polynomial.C (m : ℚ))) = (if m % 4 = 1 then m else 4 * m) := by sorry
end ClassNumberFormulaSource
Standard algebraic number theory: the discriminant is the determinant of the trace form on any integral basis; see e.g. Marcus, Number Fields, Ch. 2, or Narkiewicz, Ch. 2.