Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Dirichlet's unit theorem

Proved
DirichletUnitTheorem.dirichlet_unit_theorem

by Lucas · Oct 9, 2026 · Mathlib 0df444a (Lean v4.33.1)

algebraic-number-theorynumber-theory

Dirichlet's unit theorem. Let KKK be a number field with ring of integers OK\mathcal O_KOK​, let r1r_1r1​ be the number of real embeddings of KKK and r2r_2r2​ the number of conjugate pairs of complex (non-real) embeddings of KKK. Then the unit group OK×\mathcal O_K^\timesOK×​ is finitely generated, and its rank (the maximal number of multiplicatively independent units) is

rank⁡ OK×=r1+r2−1.\operatorname{rank}\,\mathcal O_K^\times = r_1 + r_2 - 1.rankOK×​=r1​+r2​−1.

Together with the finiteness of the torsion subgroup this means OK×≅μ(K)×Zr1+r2−1\mathcal O_K^\times \cong \mu(K)\times\mathbb Z^{r_1+r_2-1}OK×​≅μ(K)×Zr1​+r2​−1, where μ(K)\mu(K)μ(K) is the finite cyclic group of roots of unity in KKK. It is one of the two basic finiteness theorems of algebraic number theory, alongside finiteness of the class group.

Formalization Note The rank is Mathlib's Module.rank ℤ of the additive version of the unit group, a cardinal; r1r_1r1​ and r2r_2r2​ are Mathlib's nrRealPlaces and nrComplexPlaces. The natural-number subtraction is harmless because r1+r2≥1r_1+r_2\ge 1r1​+r2​≥1.

Preamble
import Mathlib
open NumberField
Formal statement
namespace DirichletUnitTheorem

theorem dirichlet_unit_theorem (K : Type*) [Field K] [NumberField K] :
    Group.FG (𝓞 K)ˣ ∧
      Module.rank ℤ (Additive (𝓞 K)ˣ) =
        ((InfinitePlace.nrRealPlaces K + InfinitePlace.nrComplexPlaces K - 1 : ℕ) : Cardinal) := by sorry

end DirichletUnitTheorem
Source
Wikipedia, "Dirichlet's unit theorem" (article supplied by the account owner as a PDF), lead section ("The statement is that the group of units is finitely generated and has rank ... r = r1 + r2 − 1").
Read-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, KKK is a number field (a field of characteristic zero that is finite-dimensional over Q\mathbb QQ), OK\mathcal O_KOK​ is its ring of integers and OK×\mathcal O_K^\timesOK×​ the unit group. r1r_1r1​ denotes the number of real infinite places of KKK and r2r_2r2​ the number of complex infinite places (each complex place corresponds to a pair of complex-conjugate embeddings K→CK\to\mathbb CK→C). The rank of an abelian group AAA is its rank as a Z\mathbb ZZ-module: the supremum of the cardinalities of Z\mathbb ZZ-linearly independent families (for the multiplicative group OK×\mathcal O_K^\timesOK×​: multiplicatively independent families). Torsion elements never belong to such a family. Statement. For every number field KKK (in an arbitrary universe):

  1. the multiplicative group OK×\mathcal O_K^\timesOK×​ is finitely generated as a group, and
  2. the rank of OK×\mathcal O_K^\timesOK×​, viewed as a cardinal number, equals the natural number r1+r2−1r_1 + r_2 - 1r1​+r2​−1 (computed with truncated natural-number subtraction, which would give 000 if r1+r2=0r_1+r_2=0r1​+r2​=0; this cannot occur, since every number field has at least one infinite place).

No other hypotheses are made.

Human review
  • Endorsed by Shuze Chen · Oct 10, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Lucas · Oct 10, 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