The form of an oriented ideal basis lies in the forms of discriminant
OpenClassNumberFormula.BinaryQuadForm.ofIdealBasis_memalgebraic-number-theorynumber-fieldsnumber-theoryquadratic-forms
The form attached to an oriented basis of a nonzero ideal has discriminant , and when its leading coefficient is positive (norms of nonzero elements are positive in the imaginary case). So the construction lands in the type of forms counted by the form class number.
Preamble
import Mathlib import Definitions.Def_ClassNumberFormula_Kronecker import Definitions.Def_ClassNumberFormula_FormClassNumber import Definitions.Def_ClassNumberFormula_FormIdeal open NumberField NumberField.InfinitePlace
Formal statement
namespace ClassNumberFormula
theorem BinaryQuadForm.ofIdealBasis_mem (m : ℤ) [Fact (Irreducible (Polynomial.X ^ 2 - Polynomial.C (m : ℚ)))]
(b : Module.Basis (Fin 2) ℤ (𝓞 (AdjoinRoot (Polynomial.X ^ 2 - Polynomial.C (m : ℚ)))))
{I : Ideal (𝓞 (AdjoinRoot (Polynomial.X ^ 2 - Polynomial.C (m : ℚ))))} (hI : I ≠ 0) (e : Module.Basis (Fin 2) ℤ I)
(he : BinaryQuadForm.OrientedBasis m b e) :
(BinaryQuadForm.ofIdealBasis m e).disc = quadDisc m ∧
(quadDisc m < 0 → 0 < (BinaryQuadForm.ofIdealBasis m e).a) := by sorry
end ClassNumberFormulaSource
Gauss correspondence between binary quadratic forms and ideal classes of quadratic fields; see e.g. Cox, Primes of the Form x^2 + ny^2, Ch. 2-3, or Davenport, Multiplicative Number Theory, Ch. 6. Part of the Gap B (forms = classes) tree for Dirichlet's class number formula.