The Leopoldt defect of a number field at
DefinitionLeopoldtDefectThis file sets up the objects that the statement of Leopoldt's conjecture refers to, following Section 1.1 of the source.
Let be a prime and let be a number field with ring of integers and unit group . Four objects are defined.
-
The primes above . , the set of non-zero prime ideals of containing . This set is finite, and the finiteness is recorded so that it can be used as an instance.
-
The semilocal units. For let be the completion of at and its valuation ring. The group of semilocal units at is the product of the local unit groups,
a commutative topological group. The diagonal embedding sends a global unit to the tuple of its images under the completion maps.
- The -adic closure of the global units. With , and writing the product of two subgroups of the abelian group for their join,
- The Leopoldt defect. Writing for Dirichlet's unit rank and for the free -rank of ,
Leopoldt's conjecture for at is the assertion ; the defect is positive exactly when units independent over become dependent -adically after the diagonal embedding. For CM fields a positive defect is equivalent to the vanishing of the -adic regulator.
These are the objects every statement in this mission is phrased in, so they fix the meaning of the goal theorem. They are also reusable for any -adic question about global units: the semilocal unit group and the diagonal embedding are the standard setting for -adic regulators, -ramified class field theory, and the -rank computations of Iwasawa theory.
Formalization Note Four conventions are fixed here. First, is defined by the displayed intersection rather than as a topological closure; the source gives both descriptions, and the intersection avoids committing to a topology on . The two can differ by a finite subgroup, which does not change the -rank.
Second, the free -rank of a subgroup is defined as the largest below a cut-off admitting a continuous injective homomorphism , the cut-off being taken to be when the defect is formed. Continuity is essential, since as abstract groups embeds into for every ; and because is compact and the ambient group Hausdorff, such an injection is automatically a closed embedding. For a closed subgroup of , isomorphic to a finite group times , such injections exist exactly for . The cut-off is present only so that the supremum ranges over a visibly bounded set of naturals and never returns the junk value of a supremum of an unbounded set; since the -rank of itself is , it never binds.
Third, the subtraction defining the defect is truncated subtraction of natural numbers; since the -rank never exceeds the -rank this is never triggered, and vanishing of the defect is equivalent to equality of the two ranks.
Fourth, the auxiliary constructions leading up to the defect are stated for an arbitrary natural number , primality being assumed only where it is used, so they also carry (unused) meaning at and .
import Mathlib
/-!
# The Leopoldt defect of a number field at a prime `p`
This file formalises the objects of Section 1.1 ("Notations and fundamental facts") of
Preda Mihăilescu, *On CM `ℤ_p`-extensions and the Leopoldt conjecture for CM fields*,
arXiv:1105.4544,
which are what the statement of its Theorem 1 refers to.
Following the paper: `E = E(K) = 𝓞(K)ˣ` denotes the units of a number field `K`, and
`P = {℘ ⊂ 𝓞(K) : (p) ⊂ ℘}` the set of primes above `p`. The paper puts
`K_p = ∏_{℘ ∈ P} K_℘ = K ⊗_ℚ ℚ_p`, lets `ι : K → K_p` be the diagonal embedding and
`U ⊂ K_p^×` be "the group of units, thus the product of local units at the same
completions". It then defines the `p`-adic closure of the global units as
`Ē = closure(ι(E)) = ⋂_{n > 0} ι(E) · U^{p^n}`
and the *Leopoldt defect* as
`𝒟_L(K) = ℤ-rk(E) - ℤ_p-rk(Ē)`.
Leopoldt's conjecture for `K` at `p` is the assertion `𝒟_L(K) = 0`.
-/
namespace Leopoldt
open NumberField IsDedekindDomain
variable (p : ℕ) [Fact p.Prime] (K : Type*) [Field K] [NumberField K]
/-- The set `P = {℘ ⊂ 𝓞(K) : (p) ⊂ ℘}` of primes of `𝓞 K` above `p`. -/
abbrev PrimesOver := {v : HeightOneSpectrum (𝓞 K) // (p : 𝓞 K) ∈ v.asIdeal}
instance : Finite (PrimesOver p K) := by
have hpne : (p : 𝓞 K) ≠ 0 := Nat.cast_ne_zero.2 (Fact.out (p := p.Prime)).ne_zero
have hp0 : Ideal.span {(p : 𝓞 K)} ≠ 0 := by
simpa [Ideal.span_singleton_eq_bot] using hpne
apply Set.Finite.to_subtype
refine (Ideal.finite_factors (R := 𝓞 K) hp0).subset ?_
intro v hv
exact Ideal.dvd_iff_le.2 ((Ideal.span_singleton_le_iff_mem _).2 hv)
/-- `U`: the group of semilocal units at `p`, that is the product `∏_{℘ | p} 𝓞_℘^×` of the
local units at the primes above `p`. -/
abbrev SemilocalUnits := ∀ v : PrimesOver p K, (v.1.adicCompletionIntegers K)ˣ
/-- `ι : E(K) → U`, the diagonal embedding of the global units into the semilocal units. -/
noncomputable def diagonalUnits : (𝓞 K)ˣ →* SemilocalUnits p K :=
MonoidHom.pi fun v => Units.map (algebraMap (𝓞 K) (v.1.adicCompletionIntegers K)).toMonoidHom
/-- `Ē = ⋂_{n > 0} ι(E) · U^{p^n}`, the `p`-adic closure of the image of the global units
inside the semilocal units, exactly as the intersection is written in the source. -/
noncomputable def unitClosure : Subgroup (SemilocalUnits p K) :=
⨅ n : ℕ, ((diagonalUnits p K).range ⊔ (powMonoidHom (p ^ (n + 1))).range)
/-- The free `ℤ_p`-rank of a subgroup `H` of a commutative topological group, computed as the
largest `n ≤ bound` for which `ℤ_p^n` admits a continuous injective homomorphism into `H`.
For a closed subgroup of the semilocal units this is the usual free `ℤ_p`-rank: such a subgroup
is isomorphic to `Δ × ℤ_p^d` with `Δ` finite, and continuous injections from `ℤ_p^n` exist
exactly for `n ≤ d`. Continuity is essential — as abstract groups `ℤ_p^n` embeds into `ℤ_p`
for every `n`; and since `ℤ_p^n` is compact and the target Hausdorff, a continuous injection is
automatically a closed embedding.
The `bound` is carried only so that the supremum is visibly taken over a bounded set and never
falls back on the junk value of `sSup` on an unbounded set of naturals. Any `bound` at least as
large as the true rank yields the true rank. -/
noncomputable def zpRankBelow {G : Type*} [CommGroup G] [TopologicalSpace G]
(bound : ℕ) (H : Subgroup G) : ℕ :=
sSup {n : ℕ | n ≤ bound ∧ ∃ f : Multiplicative (Fin n → ℤ_[p]) →* G,
Function.Injective f ∧ Continuous f ∧ ∀ x, f x ∈ H}
/-- The **Leopoldt defect** `𝒟_L(K) = ℤ-rk(E) - ℤ_p-rk(Ē)` of `K` at `p`.
`ℤ-rk(E) = r₁ + r₂ - 1` is Dirichlet's unit rank, which Mathlib provides as
`NumberField.Units.rank`. The `ℤ_p`-rank of `Ē` is bounded by that of the whole semilocal unit
group `U`, which is `[K : ℚ]`, so taking `[K : ℚ]` as the bound never constrains it. -/
noncomputable def defect : ℕ :=
Units.rank K - zpRankBelow p (Module.finrank ℚ K) (unitClosure p K)
/-- **Leopoldt's conjecture** for `K` at `p`: the Leopoldt defect vanishes. -/
def LeopoldtConjecture : Prop := defect p K = 0
end Leopoldt
Read-back
What the Lean code literally says, in plain math · claude-opus-5
PrimesOver
For a natural number carrying the assumption that is prime, and a field carrying the assumption that is a number field (a finite-dimensional field extension of ), is defined to be the type of pairs consisting of a point of the height-one spectrum of the ring of integers — that is, a nonzero prime ideal (the height-one spectrum of a Dedekind domain packages an ideal together with proofs that it is prime and nonzero) — together with a proof that the image of under the canonical map lies in . So its elements are exactly the nonzero primes of containing , i.e. the primes of dividing . It is introduced as a reducible abbreviation, and and are explicit parameters; the primality of enters only through the ambient hypothesis and is not used in the defining condition itself, which is literally just "".
The finiteness instance for PrimesOver
A typeclass instance is registered asserting that, under the same hypotheses ( prime, a number field), the type of nonzero primes of containing is a finite type. This is a statement of finiteness only; it provides no cardinality, no lower bound, and no claim that the type is nonempty (although for a prime it is in fact nonempty, nothing here says so).
SemilocalUnits
Under the same hypotheses, is defined (again as a reducible abbreviation) to be the type of all functions assigning to each an element of the unit group , where denotes the ring of integers of the -adic completion of — concretely, the valuation subring of the completion of at the prime . Thus
the full unit group of the semilocal ring, taken as an unrestricted product over the (finitely many) primes above . It is the whole unit group of each local ring of integers: no restriction to principal units, one-units, or any congruence subgroup is imposed. Its group structure is the pointwise one (a commutative group, since each is a commutative ring), and its topology is the product of the topologies each inherits from via the embedding .
diagonalUnits
Under the same hypotheses, is defined to be the monoid homomorphism
whose -th component is the map on unit groups induced by the canonical algebra homomorphism ; that is, a global unit is sent to the family whose -th entry is the image of in , regarded as a unit there. It is a homomorphism of multiplicative monoids (hence of groups) only; the definition asserts nothing about injectivity, continuity, or the nature of the image.
unitClosure
Under the same hypotheses, is defined to be the following subgroup of . Write for the image subgroup of global units under the diagonal map just described, and for a natural number write for the image subgroup of the -th power homomorphism on , i.e. the subgroup of -th powers. Then
where denotes the join in the lattice of subgroups, i.e. the subgroup generated by and by all -st powers (since the ambient group is commutative this is the setwise product ). The index ranges over all of starting at , so the exponents occurring are and never ; the intersection is over the complete lattice infimum, i.e. it is the intersection of the underlying sets. No topological notion of closure is used in the definition, and no closedness of the resulting subgroup is asserted.
zpRankBelow
This is a general-purpose definition, stated for an arbitrary type equipped with a commutative group structure and, independently, an arbitrary topology (no compatibility between the group operations and the topology is assumed — in particular no continuity of multiplication or inversion, and no separation axiom), together with a prime (from the ambient hypotheses, needed to speak of ), a natural number , and a subgroup . Let denote the group of -tuples of -adic integers under pointwise addition, viewed as a multiplicative group by transport of structure (its topology is likewise transported from the product topology on ). Define
Then is defined to be , computed as the supremum in (which by convention returns when the set is empty or unbounded above — here the set is bounded above by by construction). The map is required only to be a homomorphism for the multiplicative structure: it need not be -linear, need not be a topological embedding, need not have closed or discrete image, and need not be closed. Note the degenerate member : is the trivial group, the unique homomorphism out of it is injective and continuous and sends its only element to the identity of , which lies in ; hence always, is nonempty and bounded, and the supremum is an attained maximum. Thus the value is the largest for which such an injective continuous multiplicative map landing inside exists.
defect
Under the standing hypotheses ( prime, a number field), is defined to be the natural number
where: is Mathlib's unit rank of , defined as (i.e. , itself a truncated natural-number subtraction); the bound supplied to is ; and the subgroup supplied is inside , as described above, with carrying the product-of-units-topologies mentioned above. The subtraction is truncated subtraction on : if the second term exceeds the first, the value is rather than a negative number.
LeopoldtConjecture
Under the standing hypotheses ( a prime, a number field), is defined to be the proposition
that is, with all definitions unfolded, the proposition that
holds after truncated subtraction — i.e., because the subtraction is truncated at , the proposition asserts only the inequality
and is satisfied in particular whenever the right-hand quantity is at least the unit rank, including any case where it exceeds it. This is a definition of a proposition, not a theorem: nothing here is proved, and no claim is made that the proposition is true for any particular and .
Confirmed by the mission captain (proposal self-audit).