Relating ℤ_[p]
to ZMod (p ^ n)
#
In this file we establish connections between the p
-adic integers $\mathbb{Z}_p$
and the integers modulo powers of p
, $\mathbb{Z}/p^n\mathbb{Z}$.
Main declarations #
We show that $\mathbb{Z}_p$ has a ring hom to $\mathbb{Z}/p^n\mathbb{Z}$ for each n
.
The case for n = 1
is handled separately, since it is used in the general construction
and we may want to use it without the ^1
getting in the way.
PadicInt.toZMod
: ring hom toZMod p
PadicInt.toZModPow
: ring hom toZMod (p^n)
PadicInt.ker_toZMod
/PadicInt.ker_toZModPow
: the kernels of these maps are the ideals generated byp^n
We also establish the universal property of $\mathbb{Z}_p$ as a projective limit. Given a family of compatible ring homs $f_k : R \to \mathbb{Z}/p^n\mathbb{Z}$, there is a unique limit $R \to \mathbb{Z}_p$.
PadicInt.lift
: the limit functionPadicInt.lift_spec
/PadicInt.lift_unique
: the universal property
Implementation notes #
The ring hom constructions go through an auxiliary constructor PadicInt.toZModHom
,
which removes some boilerplate code.
modPart p r
is an integer that satisfies
‖(r - modPart p r : ℚ_[p])‖ < 1
when ‖(r : ℚ_[p])‖ ≤ 1
,
see PadicInt.norm_sub_modPart
.
It is the unique non-negative integer that is < p
with this property.
(Note that this definition assumes r : ℚ
.
See PadicInt.zmodRepr
for a version that takes values in ℕ
and works for arbitrary x : ℤ_[p]
.)
Equations
- PadicInt.modPart p r = r.num * Nat.gcdA r.den p % ↑p
Instances For
zmod_repr x
is the unique natural number smaller than p
satisfying ‖(x - zmod_repr x : ℤ_[p])‖ < 1
.
Equations
- PadicInt.zmodRepr x = Classical.choose (_ : ∃ n < p, x - ↑n ∈ LocalRing.maximalIdeal ℤ_[p])
Instances For
toZModHom
is an auxiliary constructor for creating ring homs from ℤ_[p]
to ZMod v
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
z - (toZMod z : ℤ_[p])
is contained in the maximal ideal of ℤ_[p]
, for every z : ℤ_[p]
.
The coercion from ZMod p
to ℤ_[p]
is ZMod.cast
,
which coerces ZMod p
into arbitrary rings.
This is unfortunate, but a consequence of the fact that we allow ZMod p
to coerce to rings of arbitrary characteristic, instead of only rings of characteristic p
.
This coercion is only a ring homomorphism if it coerces into a ring whose characteristic divides
p
. While this is not the case here we can still make use of the coercion.
Universal property as projective limit #
Given a family of ring homs f : Π n : ℕ, R →+* ZMod (p ^ n)
,
nthHom f r
is an integer-valued sequence
whose n
th value is the unique integer k
such that 0 ≤ k < p ^ n
and f n r = (k : ZMod (p ^ n))
.
Equations
- PadicInt.nthHom f r n = ↑(ZMod.val ((f n) r))
Instances For
nthHomSeq f_compat r
bundles PadicInt.nthHom f r
as a Cauchy sequence of rationals with respect to the p
-adic norm.
The n
th value of the sequence is ((f n r).val : ℚ)
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
limNthHom f_compat r
is the limit of a sequence f
of compatible ring homs R →+* ZMod (p^k)
.
This is itself a ring hom: see PadicInt.lift
.
Equations
- PadicInt.limNthHom f_compat r = PadicInt.ofIntSeq (PadicInt.nthHom f r) (_ : IsCauSeq (padicNorm p) fun (n : ℕ) => ↑(PadicInt.nthHom (fun (k2 : ℕ) => f k2) r n))
Instances For
lift f_compat
is the limit of a sequence f
of compatible ring homs R →+* ZMod (p^k)
,
with the equality lift f_compat r = PadicInt.limNthHom f_compat r
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
One part of the universal property of ℤ_[p]
as a projective limit.
See also PadicInt.lift_unique
.
One part of the universal property of ℤ_[p]
as a projective limit.
See also PadicInt.lift_spec
.