p-adic integers #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
This file defines the p
-adic integers ℤ_[p]
as the subtype of ℚ_[p]
with norm ≤ 1
.
We show that ℤ_[p]
- is complete,
- is nonarchimedean,
- is a normed ring,
- is a local ring, and
- is a discrete valuation ring.
The relation between ℤ_[p]
and zmod p
is established in another file.
Important definitions #
padic_int
: the type ofp
-adic integers
Notation #
We introduce the notation ℤ_[p]
for the p
-adic integers.
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.
Coercions into ℤ_[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, p-adic integer
The p
-adic integers ℤ_[p]
are the p
-adic numbers with norm ≤ 1
.
Instances for padic_int
- padic_int.padic.has_coe
- padic_int.has_add
- padic_int.has_mul
- padic_int.has_neg
- padic_int.has_sub
- padic_int.has_zero
- padic_int.inhabited
- padic_int.has_one
- padic_int.add_comm_group
- padic_int.comm_ring
- padic_int.char_zero
- padic_int.metric_space
- padic_int.complete_space
- padic_int.has_norm
- padic_int.normed_comm_ring
- padic_int.norm_one_class
- padic_int.is_domain
- padic_int.complete
- padic_int.local_ring
- padic_int.discrete_valuation_ring
- padic_int.is_adic_complete
- padic_int.algebra
Ring structure and coercion to ℚ_[p]
#
Addition on ℤ_[p]
is inherited from ℚ_[p]
.
Equations
Multiplication on ℤ_[p]
is inherited from ℚ_[p]
.
Equations
Negation on ℤ_[p]
is inherited from ℚ_[p]
.
Equations
Subtraction on ℤ_[p]
is inherited from ℚ_[p]
.
Equations
Zero on ℤ_[p]
is inherited from ℚ_[p]
.
Equations
Equations
The coercion from ℤ_[p]
to ℚ_[p]
as a ring homomorphism.
Equations
The inverse of a p
-adic integer with norm equal to 1
is also a p
-adic integer.
Otherwise, the inverse is defined to be 0
.
A sequence of integers that is Cauchy with respect to the p
-adic norm converges to a p
-adic
integer.
Equations
Equations
- padic_int.normed_comm_ring p = {to_normed_ring := {to_has_norm := {norm := has_norm.norm (padic_int.has_norm p)}, to_ring := {add := comm_ring.add padic_int.comm_ring, add_assoc := _, zero := comm_ring.zero padic_int.comm_ring, zero_add := _, add_zero := _, nsmul := comm_ring.nsmul padic_int.comm_ring, nsmul_zero' := _, nsmul_succ' := _, neg := comm_ring.neg padic_int.comm_ring, sub := comm_ring.sub padic_int.comm_ring, sub_eq_add_neg := _, zsmul := comm_ring.zsmul padic_int.comm_ring, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _, int_cast := comm_ring.int_cast padic_int.comm_ring, nat_cast := comm_ring.nat_cast padic_int.comm_ring, one := comm_ring.one padic_int.comm_ring, nat_cast_zero := _, nat_cast_succ := _, int_cast_of_nat := _, int_cast_neg_succ_of_nat := _, mul := comm_ring.mul padic_int.comm_ring, mul_assoc := _, one_mul := _, mul_one := _, npow := comm_ring.npow padic_int.comm_ring, npow_zero' := _, npow_succ' := _, left_distrib := _, right_distrib := _}, to_metric_space := {to_pseudo_metric_space := metric_space.to_pseudo_metric_space (padic_int.metric_space p), eq_of_dist_eq_zero := _}, dist_eq := _, norm_mul := _}, mul_comm := _}