p-adic numbers #
This file defines the p
-adic numbers (rationals) ℚ_[p]
as
the completion of ℚ
with respect to the p
-adic norm.
We show that the p
-adic norm on ℚ
extends to ℚ_[p]
, that ℚ
is embedded in ℚ_[p]
,
and that ℚ_[p]
is Cauchy complete.
Important definitions #
Padic
: the type ofp
-adic numberspadicNormE
: the rational valuedp
-adic norm onℚ_[p]
Padic.addValuation
: the additivep
-adic valuation onℚ_[p]
, with values inWithTop ℤ
Notation #
We introduce the notation ℚ_[p]
for the p
-adic numbers.
Implementation notes #
Much, but not all, of this file assumes that p
is prime. This assumption is inferred automatically
by taking [Fact p.Prime]
as a type class argument.
We use the same concrete Cauchy sequence construction that is used to construct ℝ
.
ℚ_[p]
inherits a field structure from this construction.
The extension of the norm on ℚ
to ℚ_[p]
is not analogous to extending the absolute value to
ℝ
and hence the proof that ℚ_[p]
is complete is different from the proof that ℝ is complete.
A small special-purpose simplification tactic, padic_index_simp
, is used to manipulate sequence
indices in the proof that the norm extends.
padicNormE
is the rational-valued p
-adic norm on ℚ_[p]
.
To instantiate ℚ_[p]
as a normed field, we must cast this into an ℝ
-valued norm.
The ℝ
-valued norm, using notation ‖ ‖
from normed spaces,
is the canonical representation of this norm.
simp
prefers padicNorm
to padicNormE
when possible.
Since padicNormE
and ‖ ‖
have different types, simp
does not rewrite one to the other.
Coercions from ℚ
to ℚ_[p]
are set up to work with the norm_cast
tactic.
References #
- [F. Q. Gouvêa, p-adic numbers][gouvea1997]
- [R. Y. Lewis, A formal proof of Hensel's lemma over the p-adic integers][lewis2019]
Tags #
p-adic, p adic, padic, norm, valuation, cauchy, completion, p-adic completion
For all n ≥ stationaryPoint f hf
, the p
-adic norm of f n
is the same.
Equations
- PadicSeq.stationaryPoint hf = Classical.choose (_ : ∃ (N : ℕ), ∀ (m n : ℕ), N ≤ m → N ≤ n → padicNorm p (↑f n) = padicNorm p (↑f m))
Instances For
Since the norm of the entries of a Cauchy sequence is eventually stationary, we can lift the norm to sequences.
Equations
- PadicSeq.norm f = if hf : f ≈ 0 then 0 else padicNorm p (↑f (PadicSeq.stationaryPoint hf))
Instances For
The p
-adic valuation on ℚ
lifts to PadicSeq p
.
Valuation f
is defined to be the valuation of the (ℚ
-valued) stationary point of f
.
Equations
- PadicSeq.valuation f = if hf : f ≈ 0 then 0 else padicValRat p (↑f (PadicSeq.stationaryPoint hf))
Instances For
notation for p-padic rationals
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Padic.instAddCommGroupPadic = inferInstance
The rational-valued p
-adic norm on ℚ_[p]
is lifted from the norm on Cauchy sequences. The
canonical form of this function is the normed space instance, with notation ‖ ‖
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Theorems about padicNormE
are named with a '
so the names do not conflict with the
equivalent theorems about norm
(‖ ‖
).
limSeq f
, for f
a Cauchy sequence of p
-adic numbers, is a sequence of rationals with the
same limit point as f
.
Equations
- Padic.limSeq f n = Classical.choose (_ : ∃ (r : ℚ), padicNormE (↑f n - ↑r) < 1 / (↑n + 1))
Instances For
Equations
- Padic.metricSpace p = MetricSpace.mk (_ : ∀ {x y : ℚ_[p]}, dist x y = 0 → x = y)
Equations
- One or more equations did not get rendered due to their size.
Equations
- padicNormE.instNontriviallyNormedFieldPadic = let src := Padic.normedField p; NontriviallyNormedField.mk (_ : ∃ (x : ℚ_[p]), 1 < ‖x‖)
ratNorm q
, for a p
-adic number q
is the p
-adic norm of q
, as rational number.
The lemma padicNormE.eq_ratNorm
asserts ‖q‖ = ratNorm q
.
Equations
- padicNormE.ratNorm q = Classical.choose (_ : ∃ (q' : ℚ), ‖q‖ = ↑q')
Instances For
Equations
- (_ : CauSeq.IsComplete ℚ_[p] norm) = (_ : CauSeq.IsComplete ℚ_[p] norm)
Equations
- (_ : CompleteSpace ℚ_[p]) = (_ : CompleteSpace ℚ_[p])
Valuation on ℚ_[p]
#
Padic.valuation
lifts the p
-adic valuation on rationals to ℚ_[p]
.
Equations
- Padic.valuation = Quotient.lift PadicSeq.valuation (_ : ∀ (f g : CauSeq ℚ (padicNorm p)), f ≈ g → PadicSeq.valuation f = PadicSeq.valuation g)
Instances For
The additive p
-adic valuation on ℚ_[p]
, with values in WithTop ℤ
.
Equations
- Padic.addValuationDef x = if x = 0 then ⊤ else ↑(Padic.valuation x)
Instances For
The additive p
-adic valuation on ℚ_[p]
, as an addValuation
.
Equations
- One or more equations did not get rendered due to their size.