mathlib3 documentation

number_theory.padics.padic_integers

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]

The relation between ℤ_[p] and zmod p is established in another file.

Important definitions #

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 #

Tags #

p-adic, p adic, padic, p-adic integer

Ring structure and coercion to ℚ_[p] #

@[protected, instance]
Equations
theorem padic_int.ext {p : } [fact (nat.prime p)] {x y : ℤ_[p]} :
x = y x = y

The p-adic integers as a subring of ℚ_[p].

Equations
@[simp]
@[protected, instance]

Addition on ℤ_[p] is inherited from ℚ_[p].

Equations
@[protected, instance]

Multiplication on ℤ_[p] is inherited from ℚ_[p].

Equations
@[protected, instance]

Negation on ℤ_[p] is inherited from ℚ_[p].

Equations
@[protected, instance]

Subtraction on ℤ_[p] is inherited from ℚ_[p].

Equations
@[protected, instance]

Zero on ℤ_[p] is inherited from ℚ_[p].

Equations
@[protected, instance]
Equations
@[protected, instance]

One on ℤ_[p] is inherited from ℚ_[p].

Equations
@[simp]
theorem padic_int.mk_zero {p : } [fact (nat.prime p)] {h : 0 1} :
0, h⟩ = 0
@[simp]
theorem padic_int.val_eq_coe {p : } [fact (nat.prime p)] (z : ℤ_[p]) :
z.val = z
@[simp, norm_cast]
theorem padic_int.coe_add {p : } [fact (nat.prime p)] (z1 z2 : ℤ_[p]) :
(z1 + z2) = z1 + z2
@[simp, norm_cast]
theorem padic_int.coe_mul {p : } [fact (nat.prime p)] (z1 z2 : ℤ_[p]) :
(z1 * z2) = z1 * z2
@[simp, norm_cast]
theorem padic_int.coe_neg {p : } [fact (nat.prime p)] (z1 : ℤ_[p]) :
-z1 = -z1
@[simp, norm_cast]
theorem padic_int.coe_sub {p : } [fact (nat.prime p)] (z1 z2 : ℤ_[p]) :
(z1 - z2) = z1 - z2
@[simp, norm_cast]
theorem padic_int.coe_one {p : } [fact (nat.prime p)] :
1 = 1
@[simp, norm_cast]
theorem padic_int.coe_zero {p : } [fact (nat.prime p)] :
0 = 0
theorem padic_int.coe_eq_zero {p : } [fact (nat.prime p)] (z : ℤ_[p]) :
z = 0 z = 0
theorem padic_int.coe_ne_zero {p : } [fact (nat.prime p)] (z : ℤ_[p]) :
z 0 z 0
@[simp, norm_cast]
theorem padic_int.coe_nat_cast {p : } [fact (nat.prime p)] (n : ) :
@[simp, norm_cast]
theorem padic_int.coe_int_cast {p : } [fact (nat.prime p)] (z : ) :

The coercion from ℤ_[p] to ℚ_[p] as a ring homomorphism.

Equations
@[simp, norm_cast]
theorem padic_int.coe_pow {p : } [fact (nat.prime p)] (x : ℤ_[p]) (n : ) :
(x ^ n) = x ^ n
@[simp]
theorem padic_int.mk_coe {p : } [fact (nat.prime p)] (k : ℤ_[p]) :
k, _⟩ = k
noncomputable def padic_int.inv {p : } [fact (nat.prime p)] :

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.

Equations
@[protected, instance]
@[simp, norm_cast]
theorem padic_int.coe_int_eq {p : } [fact (nat.prime p)] (z1 z2 : ) :
z1 = z2 z1 = z2
def padic_int.of_int_seq {p : } [fact (nat.prime p)] (seq : ) (h : is_cau_seq (padic_norm p) (λ (n : ), (seq n))) :

A sequence of integers that is Cauchy with respect to the p-adic norm converges to a p-adic integer.

Equations

Instances #

We now show that ℤ_[p] is a

@[protected, instance]
noncomputable def padic_int.metric_space (p : ) [fact (nat.prime p)] :
Equations
@[protected, instance]
@[protected, instance]
noncomputable def padic_int.has_norm (p : ) [fact (nat.prime p)] :
Equations
theorem padic_int.norm_def {p : } [fact (nat.prime p)] {z : ℤ_[p]} :
@[protected, instance]
@[protected, instance]
@[protected, instance]

Norm #

theorem padic_int.norm_le_one {p : } [fact (nat.prime p)] (z : ℤ_[p]) :
@[simp]
theorem padic_int.norm_mul {p : } [fact (nat.prime p)] (z1 z2 : ℤ_[p]) :
z1 * z2 = z1 * z2
@[simp]
theorem padic_int.norm_pow {p : } [fact (nat.prime p)] (z : ℤ_[p]) (n : ) :
z ^ n = z ^ n
theorem padic_int.norm_eq_of_norm_add_lt_right {p : } [fact (nat.prime p)] {z1 z2 : ℤ_[p]} (h : z1 + z2 < z2) :
theorem padic_int.norm_eq_of_norm_add_lt_left {p : } [fact (nat.prime p)] {z1 z2 : ℤ_[p]} (h : z1 + z2 < z1) :
@[simp]
theorem padic_int.norm_eq_padic_norm {p : } [fact (nat.prime p)] {q : ℚ_[p]} (hq : q 1) :
q, hq⟩ = q
@[simp]
theorem padic_int.norm_p {p : } [fact (nat.prime p)] :
@[simp]
theorem padic_int.norm_p_pow {p : } [fact (nat.prime p)] (n : ) :
@[protected, instance]
theorem padic_int.exists_pow_neg_lt (p : ) [hp : fact (nat.prime p)] {ε : } (hε : 0 < ε) :
(k : ), p ^ -k < ε
theorem padic_int.exists_pow_neg_lt_rat (p : ) [hp : fact (nat.prime p)] {ε : } (hε : 0 < ε) :
(k : ), p ^ -k < ε
theorem padic_int.norm_int_lt_one_iff_dvd {p : } [hp : fact (nat.prime p)] (k : ) :
theorem padic_int.norm_int_le_pow_iff_dvd {p : } [hp : fact (nat.prime p)] {k : } {n : } :

Valuation on ℤ_[p] #

noncomputable def padic_int.valuation {p : } [hp : fact (nat.prime p)] (x : ℤ_[p]) :

padic_int.valuation lifts the p-adic valuation on to ℤ_[p].

Equations
theorem padic_int.norm_eq_pow_val {p : } [hp : fact (nat.prime p)] {x : ℤ_[p]} (hx : x 0) :
@[simp]
theorem padic_int.valuation_zero {p : } [hp : fact (nat.prime p)] :
@[simp]
theorem padic_int.valuation_one {p : } [hp : fact (nat.prime p)] :
@[simp]
theorem padic_int.valuation_p {p : } [hp : fact (nat.prime p)] :
theorem padic_int.valuation_nonneg {p : } [hp : fact (nat.prime p)] (x : ℤ_[p]) :
@[simp]
theorem padic_int.valuation_p_pow_mul {p : } [hp : fact (nat.prime p)] (n : ) (c : ℤ_[p]) (hc : c 0) :

Units of ℤ_[p] #

theorem padic_int.mul_inv {p : } [hp : fact (nat.prime p)] {z : ℤ_[p]} :
z = 1 z * z.inv = 1
theorem padic_int.inv_mul {p : } [hp : fact (nat.prime p)] {z : ℤ_[p]} (hz : z = 1) :
z.inv * z = 1
theorem padic_int.is_unit_iff {p : } [hp : fact (nat.prime p)] {z : ℤ_[p]} :
theorem padic_int.norm_lt_one_add {p : } [hp : fact (nat.prime p)] {z1 z2 : ℤ_[p]} (hz1 : z1 < 1) (hz2 : z2 < 1) :
z1 + z2 < 1
theorem padic_int.norm_lt_one_mul {p : } [hp : fact (nat.prime p)] {z1 z2 : ℤ_[p]} (hz2 : z2 < 1) :
z1 * z2 < 1
@[simp]
theorem padic_int.mem_nonunits {p : } [hp : fact (nat.prime p)] {z : ℤ_[p]} :
noncomputable def padic_int.mk_units {p : } [hp : fact (nat.prime p)] {u : ℚ_[p]} (h : u = 1) :

A p-adic number u with ‖u‖ = 1 is a unit of ℤ_[p].

Equations
@[simp]
theorem padic_int.mk_units_eq {p : } [hp : fact (nat.prime p)] {u : ℚ_[p]} (h : u = 1) :
@[simp]
theorem padic_int.norm_units {p : } [hp : fact (nat.prime p)] (u : ℤ_[p]ˣ) :
noncomputable def padic_int.unit_coeff {p : } [hp : fact (nat.prime p)] {x : ℤ_[p]} (hx : x 0) :

unit_coeff hx is the unit u in the unique representation x = u * p ^ n. See unit_coeff_spec.

Equations
@[simp]
theorem padic_int.unit_coeff_coe {p : } [hp : fact (nat.prime p)] {x : ℤ_[p]} (hx : x 0) :
theorem padic_int.unit_coeff_spec {p : } [hp : fact (nat.prime p)] {x : ℤ_[p]} (hx : x 0) :

Various characterizations of open unit balls #

theorem padic_int.norm_le_pow_iff_le_valuation {p : } [hp : fact (nat.prime p)] (x : ℤ_[p]) (hx : x 0) (n : ) :
theorem padic_int.mem_span_pow_iff_le_valuation {p : } [hp : fact (nat.prime p)] (x : ℤ_[p]) (hx : x 0) (n : ) :
theorem padic_int.norm_le_pow_iff_norm_lt_pow_add_one {p : } [hp : fact (nat.prime p)] (x : ℤ_[p]) (n : ) :
x p ^ n x < p ^ (n + 1)
theorem padic_int.norm_lt_pow_iff_norm_le_pow_sub_one {p : } [hp : fact (nat.prime p)] (x : ℤ_[p]) (n : ) :
x < p ^ n x p ^ (n - 1)
theorem padic_int.norm_lt_one_iff_dvd {p : } [hp : fact (nat.prime p)] (x : ℤ_[p]) :
@[simp]
theorem padic_int.pow_p_dvd_int_iff {p : } [hp : fact (nat.prime p)] (n : ) (a : ) :
p ^ n a p ^ n a

Discrete valuation ring #

@[protected, instance]
theorem padic_int.prime_p {p : } [hp : fact (nat.prime p)] :
@[protected, instance]
theorem padic_int.ideal_eq_span_pow_p {p : } [hp : fact (nat.prime p)] {s : ideal ℤ_[p]} (hs : s ) :
(n : ), s = ideal.span {p ^ n}
@[protected, instance]
Equations
@[simp]
theorem padic_int.algebra_map_apply {p : } [hp : fact (nat.prime p)] (x : ℤ_[p]) :
@[protected, instance]