mathlib documentation

data.padics.padic_integers

p-adic integers #

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 (nat.prime p)] 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

def padic_int (p : ℕ) [fact (nat.prime p)] :
Type

The p-adic integers ℤ_p are the p-adic numbers with norm ≤ 1.

Equations

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
@[protected, instance]

Addition on ℤ_p is inherited from ℚ_p.

Equations
  • padic_int.has_add = {add := λ (_x : ℤ_[p]), padic_int.has_add._match_2 _x}
  • padic_int.has_add._match_2 ⟨x, hx⟩ = λ (_x : ℤ_[p]), padic_int.has_add._match_1 x hx _x
  • padic_int.has_add._match_1 x hx ⟨y, hy⟩ = ⟨x + y, _⟩
@[protected, instance]

Multiplication on ℤ_p is inherited from ℚ_p.

Equations
  • padic_int.has_mul = {mul := λ (_x : ℤ_[p]), padic_int.has_mul._match_2 _x}
  • padic_int.has_mul._match_2 ⟨x, hx⟩ = λ (_x : ℤ_[p]), padic_int.has_mul._match_1 x hx _x
  • padic_int.has_mul._match_1 x hx ⟨y, hy⟩ = ⟨x * y, _⟩
@[protected, instance]

Negation on ℤ_p is inherited from ℚ_p.

Equations
@[protected, instance]

Subtraction on ℤ_p is inherited from ℚ_p.

Equations
  • padic_int.has_sub = {sub := λ (_x : ℤ_[p]), padic_int.has_sub._match_2 _x}
  • padic_int.has_sub._match_2 ⟨x, hx⟩ = λ (_x : ℤ_[p]), padic_int.has_sub._match_1 x hx _x
  • padic_int.has_sub._match_1 x hx ⟨y, hy⟩ = ⟨x - y, _⟩
@[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_coe {p : ℕ} [fact (nat.prime p)] (n : ℕ) :
@[simp, norm_cast]
theorem padic_int.coe_coe_int {p : ℕ} [fact (nat.prime p)] (z : ℤ) :
@[simp, norm_cast]
theorem padic_int.coe_zero {p : ℕ} [fact (nat.prime p)] :
↑0 = 0

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
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]
@[protected, instance]
Equations
@[protected]
theorem padic_int.mul_comm {p : ℕ} [fact (nat.prime p)] (z1 z2 : ℤ_[p]) :
z1 * z2 = z2 * z1
@[protected]
theorem padic_int.zero_ne_one {p : ℕ} [fact (nat.prime p)] :
0 ≠ 1
@[protected]
theorem padic_int.eq_zero_or_eq_zero_of_mul_eq_zero {p : ℕ} [fact (nat.prime p)] (a b : ℤ_[p]) :
a * b = 0 → a = 0 ∨ b = 0
theorem padic_int.norm_def {p : ℕ} [fact (nat.prime p)] {z : ℤ_[p]} :
@[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]
Equations
theorem padic_int.exists_pow_neg_lt (p : ℕ) [hp_prime : fact (nat.prime p)] {ε : ℝ} (hε : 0 < ε) :
∃ (k : ℕ), ↑p ^ -↑k < ε
theorem padic_int.exists_pow_neg_lt_rat (p : ℕ) [hp_prime : fact (nat.prime p)] {ε : ℚ} (hε : 0 < ε) :
∃ (k : ℕ), ↑p ^ -↑k < ε
theorem padic_int.norm_int_lt_one_iff_dvd {p : ℕ} [hp_prime : fact (nat.prime p)] (k : ℤ) :
theorem padic_int.norm_int_le_pow_iff_dvd {p : ℕ} [hp_prime : fact (nat.prime p)] {k : ℤ} {n : ℕ} :

Valuation on ℤ_[p] #

def padic_int.valuation {p : ℕ} [hp_prime : 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_prime : fact (nat.prime p)] {x : ℤ_[p]} (hx : x ≠ 0) :
@[simp]
theorem padic_int.valuation_zero {p : ℕ} [hp_prime : fact (nat.prime p)] :
@[simp]
theorem padic_int.valuation_one {p : ℕ} [hp_prime : fact (nat.prime p)] :
@[simp]
theorem padic_int.valuation_p {p : ℕ} [hp_prime : fact (nat.prime p)] :
theorem padic_int.valuation_nonneg {p : ℕ} [hp_prime : fact (nat.prime p)] (x : ℤ_[p]) :
@[simp]
theorem padic_int.valuation_p_pow_mul {p : ℕ} [hp_prime : fact (nat.prime p)] (n : ℕ) (c : ℤ_[p]) (hc : c ≠ 0) :
((↑p ^ n) * c).valuation = ↑n + c.valuation

Units of ℤ_[p] #

theorem padic_int.mul_inv {p : ℕ} [hp_prime : fact (nat.prime p)] {z : ℤ_[p]} :
∥z∥ = 1 → z * z.inv = 1
theorem padic_int.inv_mul {p : ℕ} [hp_prime : fact (nat.prime p)] {z : ℤ_[p]} (hz : ∥z∥ = 1) :
(z.inv) * z = 1
theorem padic_int.is_unit_iff {p : ℕ} [hp_prime : fact (nat.prime p)] {z : ℤ_[p]} :
theorem padic_int.norm_lt_one_add {p : ℕ} [hp_prime : 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_prime : fact (nat.prime p)] {z1 z2 : ℤ_[p]} (hz2 : ∥z2∥ < 1) :
∥z1 * z2∥ < 1
@[simp]
theorem padic_int.mem_nonunits {p : ℕ} [hp_prime : fact (nat.prime p)] {z : ℤ_[p]} :
def padic_int.mk_units {p : ℕ} [hp_prime : 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_prime : fact (nat.prime p)] {u : ℚ_[p]} (h : ∥u∥ = 1) :
@[simp]
theorem padic_int.norm_units {p : ℕ} [hp_prime : fact (nat.prime p)] (u : units ℤ_[p]) :
def padic_int.unit_coeff {p : ℕ} [hp_prime : 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_prime : fact (nat.prime p)] {x : ℤ_[p]} (hx : x ≠ 0) :
theorem padic_int.unit_coeff_spec {p : ℕ} [hp_prime : 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_prime : fact (nat.prime p)] (x : ℤ_[p]) (hx : x ≠ 0) (n : ℕ) :
theorem padic_int.mem_span_pow_iff_le_valuation {p : ℕ} [hp_prime : fact (nat.prime p)] (x : ℤ_[p]) (hx : x ≠ 0) (n : ℕ) :
theorem padic_int.norm_le_pow_iff_mem_span_pow {p : ℕ} [hp_prime : fact (nat.prime p)] (x : ℤ_[p]) (n : ℕ) :
theorem padic_int.norm_le_pow_iff_norm_lt_pow_add_one {p : ℕ} [hp_prime : 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_prime : fact (nat.prime p)] (x : ℤ_[p]) (n : ℤ) :
∥x∥ < ↑p ^ n ↔ ∥x∥ ≤ ↑p ^ (n - 1)
theorem padic_int.norm_lt_one_iff_dvd {p : ℕ} [hp_prime : fact (nat.prime p)] (x : ℤ_[p]) :
@[simp]
theorem padic_int.pow_p_dvd_int_iff {p : ℕ} [hp_prime : fact (nat.prime p)] (n : ℕ) (a : ℤ) :
↑p ^ n ∣ ↑a ↔ ↑p ^ n ∣ a

Discrete valuation ring #

@[protected, instance]
def padic_int.local_ring {p : ℕ} [hp_prime : fact (nat.prime p)] :
theorem padic_int.p_nonnunit {p : ℕ} [hp_prime : fact (nat.prime p)] :
theorem padic_int.prime_p {p : ℕ} [hp_prime : fact (nat.prime p)] :
theorem padic_int.irreducible_p {p : ℕ} [hp_prime : fact (nat.prime p)] :
@[protected, instance]
theorem padic_int.ideal_eq_span_pow_p {p : ℕ} [hp_prime : fact (nat.prime p)] {s : ideal ℤ_[p]} (hs : s ≠ ⊥) :
∃ (n : ℕ), s = ideal.span {↑p ^ n}