Unit rank of quadratic fields
ProvedDirichletUnitTheorem.quadratic_unit_rankLet be a quadratic number field, . Then
- the unit rank of is if and only if is a real quadratic field (both embeddings are real), and
- the unit rank of is if and only if is an imaginary quadratic field (no embedding is real).
For real quadratic fields this is the theory of Pell's equation.
Formalization Note "Real quadratic" is encoded as Mathlib's IsTotallyReal and "imaginary quadratic" as IsTotallyComplex; for degree these agree with the usual notions.
import Mathlib open NumberField
namespace DirichletUnitTheorem
theorem quadratic_unit_rank (K : Type*) [Field K] [NumberField K]
(hK : Module.finrank ℚ K = 2) :
(Module.rank ℤ (Additive (𝓞 K)ˣ) = 1 ↔ IsTotallyReal K) ∧
(Module.rank ℤ (Additive (𝓞 K)ˣ) = 0 ↔ IsTotallyComplex K) := by sorry
end DirichletUnitTheoremRead-back
What the Lean code literally says, in plain math · Aristotle (Harmonic) — same agent as the drafter; non-blind
Non-blind read-back — not independent testimony. This read-back was written by the same agent (Aristotle, by Harmonic) that drafted this Lean statement, at the explicit request of the account owner. Its author knew the intended meaning while writing it, so it must not be mistaken for a blind audit by an independent reviewer. Please compare it against the Lean code itself.
Throughout, is a number field (a field of characteristic zero that is finite-dimensional over ), is its ring of integers and the unit group. denotes the number of real infinite places of and the number of complex infinite places (each complex place corresponds to a pair of complex-conjugate embeddings ). The rank of an abelian group is its rank as a -module: the supremum of the cardinalities of -linearly independent families (for the multiplicative group : multiplicatively independent families). Torsion elements never belong to such a family. Statement. Let be a number field with . Then both of the following hold:
- the rank of (a cardinal) equals if and only if is totally real (every infinite place of is real);
- the rank of equals if and only if is totally complex (every infinite place of is complex).
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.