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.
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
- R. Y. Lewis, A formal proof of Hensel's lemma over the p-adic integers
- https://en.wikipedia.org/wiki/P-adic_number
Tags #
p-adic, p adic, padic, norm, valuation, cauchy, completion, p-adic completion
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
- f.valuation = 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.instAddCommGroup = 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
- padicNormE = { toFun := Quotient.lift PadicSeq.norm ⋯, map_mul' := ⋯, nonneg' := ⋯, eq_zero' := ⋯, add_le' := ⋯ }
Instances For
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 ⋯
Instances For
Equations
- ⋯ = ⋯
Equations
Equations
- Padic.normedField p = NormedField.mk ⋯ ⋯
Equations
- padicNormE.instNontriviallyNormedFieldPadic = NontriviallyNormedField.mk ⋯
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
Instances For
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Valuation on ℚ_[p]
#
Padic.valuation
lifts the p
-adic valuation on rationals to ℚ_[p]
.
Equations
- Padic.valuation = Quotient.lift PadicSeq.valuation ⋯
Instances For
The additive p
-adic valuation on ℚ_[p]
, as an addValuation
.
Equations
- Padic.addValuation = AddValuation.of Padic.addValuationDef ⋯ ⋯ ⋯ ⋯