mathlib3 documentation

number_theory.padics.padic_numbers

p-adic numbers #

THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.

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 #

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.

padic_norm_e is the rational-valued p-adic norm on ℚ_[p]. To instantiate ℚ_[p] as a normed field, we must cast this into a ℝ-valued norm. The ℝ-valued norm, using notation ‖ ‖ from normed spaces, is the canonical representation of this norm.

simp prefers padic_norm to padic_norm_e when possible. Since padic_norm_e 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 #

Tags #

p-adic, p adic, padic, norm, valuation, cauchy, completion, p-adic completion

@[reducible]
def padic_seq (p : ℕ) :

The type of Cauchy sequences of rationals with respect to the p-adic norm.

Equations
theorem padic_seq.stationary {p : ℕ} [fact (nat.prime p)] {f : cau_seq ℚ (padic_norm p)} (hf : ¬f ≈ 0) :
∃ (N : ℕ), ∀ (m n : ℕ), N ≤ m → N ≤ n → padic_norm p (⇑f n) = padic_norm p (⇑f m)

The p-adic norm of the entries of a nonzero Cauchy sequence of rationals is eventually constant.

noncomputable def padic_seq.stationary_point {p : ℕ} [fact (nat.prime p)] {f : padic_seq p} (hf : ¬f ≈ 0) :

For all n ≥ stationary_point f hf, the p-adic norm of f n is the same.

Equations
noncomputable def padic_seq.norm {p : ℕ} [fact (nat.prime p)] (f : padic_seq p) :

Since the norm of the entries of a Cauchy sequence is eventually stationary, we can lift the norm to sequences.

Equations
theorem padic_seq.norm_zero_iff {p : ℕ} [fact (nat.prime p)] (f : padic_seq p) :
f.norm = 0 ↔ f ≈ 0
theorem padic_seq.equiv_zero_of_val_eq_of_equiv_zero {p : ℕ} [fact (nat.prime p)] {f g : padic_seq p} (h : ∀ (k : ℕ), padic_norm p (⇑f k) = padic_norm p (⇑g k)) (hf : f ≈ 0) :
g ≈ 0
theorem padic_seq.norm_nonzero_of_not_equiv_zero {p : ℕ} [fact (nat.prime p)] {f : padic_seq p} (hf : ¬f ≈ 0) :
f.norm ≠ 0
theorem padic_seq.norm_eq_norm_app_of_nonzero {p : ℕ} [fact (nat.prime p)] {f : padic_seq p} (hf : ¬f ≈ 0) :
∃ (k : ℚ), f.norm = padic_norm p k ∧ k ≠ 0
theorem padic_seq.norm_nonneg {p : ℕ} [fact (nat.prime p)] (f : padic_seq p) :
0 ≤ f.norm

An auxiliary lemma for manipulating sequence indices.

An auxiliary lemma for manipulating sequence indices.

An auxiliary lemma for manipulating sequence indices.

Valuation on padic_seq #

noncomputable def padic_seq.valuation {p : ℕ} [fact (nat.prime p)] (f : padic_seq p) :

The p-adic valuation on ℚ lifts to padic_seq p. valuation f is defined to be the valuation of the (ℚ-valued) stationary point of f.

Equations
theorem padic_seq.norm_eq_pow_val {p : ℕ} [fact (nat.prime p)] {f : padic_seq p} (hf : ¬f ≈ 0) :
theorem padic_seq.val_eq_iff_norm_eq {p : ℕ} [fact (nat.prime p)] {f g : padic_seq p} (hf : ¬f ≈ 0) (hg : ¬g ≈ 0) :

This is a special-purpose tactic that lifts padic_norm (f (stationary_point f)) to padic_norm (f (max _ _ _)).

theorem padic_seq.norm_mul {p : ℕ} [hp : fact (nat.prime p)] (f g : padic_seq p) :
(f * g).norm = f.norm * g.norm
theorem padic_seq.norm_values_discrete {p : ℕ} [hp : fact (nat.prime p)] (a : padic_seq p) (ha : ¬a ≈ 0) :
∃ (z : ℤ), a.norm = ↑p ^ -z
theorem padic_seq.norm_one {p : ℕ} [hp : fact (nat.prime p)] :
1.norm = 1
theorem padic_seq.norm_equiv {p : ℕ} [hp : fact (nat.prime p)] {f g : padic_seq p} (hfg : f ≈ g) :
f.norm = g.norm
theorem padic_seq.norm_eq {p : ℕ} [hp : fact (nat.prime p)] {f g : padic_seq p} (h : ∀ (k : ℕ), padic_norm p (⇑f k) = padic_norm p (⇑g k)) :
f.norm = g.norm
theorem padic_seq.norm_neg {p : ℕ} [hp : fact (nat.prime p)] (a : padic_seq p) :
(-a).norm = a.norm
theorem padic_seq.norm_eq_of_add_equiv_zero {p : ℕ} [hp : fact (nat.prime p)] {f g : padic_seq p} (h : f + g ≈ 0) :
f.norm = g.norm
theorem padic_seq.add_eq_max_of_ne {p : ℕ} [hp : fact (nat.prime p)] {f g : padic_seq p} (hfgne : f.norm ≠ g.norm) :
@[protected, instance]
noncomputable def padic.field {p : ℕ} [fact (nat.prime p)] :
Equations
@[protected, instance]
noncomputable def padic.inhabited {p : ℕ} [fact (nat.prime p)] :
Equations
@[protected, instance]
def padic.ring {p : ℕ} [fact (nat.prime p)] :
Equations
@[protected, instance]
Equations
@[protected, instance]
Equations
@[protected, instance]
Equations
@[protected, instance]
Equations
@[protected, instance]
Equations
@[protected, instance]
Equations
@[protected, instance]
noncomputable def padic.has_div {p : ℕ} [fact (nat.prime p)] :
Equations
def padic.mk {p : ℕ} [fact (nat.prime p)] :

Builds the equivalence class of a Cauchy sequence of rationals.

Equations
theorem padic.zero_def (p : ℕ) [fact (nat.prime p)] :
theorem padic.mk_eq (p : ℕ) [fact (nat.prime p)] {f g : padic_seq p} :
@[norm_cast]
theorem padic.coe_inj (p : ℕ) [fact (nat.prime p)] {q r : ℚ} :
↑q = ↑r ↔ q = r
@[protected, instance]
@[norm_cast]
theorem padic.coe_add (p : ℕ) [fact (nat.prime p)] {x y : ℚ} :
↑(x + y) = ↑x + ↑y
@[norm_cast]
theorem padic.coe_neg (p : ℕ) [fact (nat.prime p)] {x : ℚ} :
@[norm_cast]
theorem padic.coe_mul (p : ℕ) [fact (nat.prime p)] {x y : ℚ} :
↑(x * y) = ↑x * ↑y
@[norm_cast]
theorem padic.coe_sub (p : ℕ) [fact (nat.prime p)] {x y : ℚ} :
↑(x - y) = ↑x - ↑y
@[norm_cast]
theorem padic.coe_div (p : ℕ) [fact (nat.prime p)] {x y : ℚ} :
↑(x / y) = ↑x / ↑y
@[norm_cast]
theorem padic.coe_one (p : ℕ) [fact (nat.prime p)] :
↑1 = 1
@[norm_cast]
theorem padic.coe_zero (p : ℕ) [fact (nat.prime p)] :
↑0 = 0
noncomputable def padic_norm_e {p : ℕ} [hp : fact (nat.prime p)] :

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
theorem padic_norm_e.defn {p : ℕ} [fact (nat.prime p)] (f : padic_seq p) {ε : ℚ} (hε : 0 < ε) :
∃ (N : ℕ), ∀ (i : ℕ), i ≥ N → ⇑padic_norm_e (⟦f⟧ - ↑(⇑f i)) < ε

Theorems about padic_norm_e are named with a ' so the names do not conflict with the equivalent theorems about norm (‖ ‖).

Theorems about padic_norm_e are named with a ' so the names do not conflict with the equivalent theorems about norm (‖ ‖).

@[protected]
theorem padic_norm_e.image' {p : ℕ} [fact (nat.prime p)] {q : ℚ_[p]} :
q ≠ 0 → (∃ (n : ℤ), ⇑padic_norm_e q = ↑p ^ -n)
theorem padic.rat_dense' {p : ℕ} [fact (nat.prime p)] (q : ℚ_[p]) {ε : ℚ} (hε : 0 < ε) :
∃ (r : ℚ), ⇑padic_norm_e (q - ↑r) < ε
noncomputable def padic.lim_seq {p : ℕ} [fact (nat.prime p)] (f : cau_seq ℚ_[p] ⇑padic_norm_e) :

lim_seq f, for f a Cauchy sequence of p-adic numbers, is a sequence of rationals with the same limit point as f.

Equations
theorem padic.exi_rat_seq_conv {p : ℕ} [fact (nat.prime p)] (f : cau_seq ℚ_[p] ⇑padic_norm_e) {ε : ℚ} (hε : 0 < ε) :
∃ (N : ℕ), ∀ (i : ℕ), i ≥ N → ⇑padic_norm_e (⇑f i - ↑(padic.lim_seq f i)) < ε
theorem padic.complete' {p : ℕ} [fact (nat.prime p)] (f : cau_seq ℚ_[p] ⇑padic_norm_e) :
∃ (q : ℚ_[p]), ∀ (ε : ℚ), ε > 0 → (∃ (N : ℕ), ∀ (i : ℕ), i ≥ N → ⇑padic_norm_e (q - ⇑f i) < ε)
@[protected, instance]
noncomputable def padic.has_dist (p : ℕ) [fact (nat.prime p)] :
Equations
@[protected, instance]
noncomputable def padic.has_norm (p : ℕ) [fact (nat.prime p)] :
Equations
@[protected, instance]
noncomputable def padic.normed_field (p : ℕ) [fact (nat.prime p)] :
Equations
@[protected, instance]
theorem padic.rat_dense (p : ℕ) [fact (nat.prime p)] (q : ℚ_[p]) {ε : ℝ} (hε : 0 < ε) :
∃ (r : ℚ), ‖q - ↑r‖ < ε
@[protected, simp]
theorem padic_norm_e.mul {p : ℕ} [hp : fact (nat.prime p)] (q r : ℚ_[p]) :
@[protected]
theorem padic_norm_e.is_norm {p : ℕ} [hp : fact (nat.prime p)] (q : ℚ_[p]) :
@[simp]
theorem padic_norm_e.eq_padic_norm {p : ℕ} [hp : fact (nat.prime p)] (q : ℚ) :
@[simp]
theorem padic_norm_e.norm_p {p : ℕ} [hp : fact (nat.prime p)] :
theorem padic_norm_e.norm_p_lt_one {p : ℕ} [hp : fact (nat.prime p)] :
@[simp]
theorem padic_norm_e.norm_p_zpow {p : ℕ} [hp : fact (nat.prime p)] (n : ℤ) :
@[simp]
theorem padic_norm_e.norm_p_pow {p : ℕ} [hp : fact (nat.prime p)] (n : ℕ) :
@[protected]
theorem padic_norm_e.image {p : ℕ} [hp : fact (nat.prime p)] {q : ℚ_[p]} :
q ≠ 0 → (∃ (n : ℤ), ‖q‖ = ↑(↑p ^ -n))
@[protected]
theorem padic_norm_e.is_rat {p : ℕ} [hp : fact (nat.prime p)] (q : ℚ_[p]) :
∃ (q' : ℚ), ‖q‖ = ↑q'
noncomputable def padic_norm_e.rat_norm {p : ℕ} [hp : fact (nat.prime p)] (q : ℚ_[p]) :

rat_norm q, for a p-adic number q is the p-adic norm of q, as rational number.

The lemma padic_norm_e.eq_rat_norm asserts ‖q‖ = rat_norm q.

Equations
theorem padic_norm_e.norm_rat_le_one {p : ℕ} [hp : fact (nat.prime p)] {q : ℚ} (hq : ¬p ∣ q.denom) :
theorem padic_norm_e.norm_int_le_one {p : ℕ} [hp : fact (nat.prime p)] (z : ℤ) :
theorem padic_norm_e.norm_int_le_pow_iff_dvd {p : ℕ} [hp : fact (nat.prime p)] (k : ℤ) (n : ℕ) :
theorem padic_norm_e.eq_of_norm_add_lt_right {p : ℕ} [hp : fact (nat.prime p)] {z1 z2 : ℚ_[p]} (h : ‖z1 + z2‖ < ‖z2‖) :
theorem padic_norm_e.eq_of_norm_add_lt_left {p : ℕ} [hp : fact (nat.prime p)] {z1 z2 : ℚ_[p]} (h : ‖z1 + z2‖ < ‖z1‖) :
@[protected, instance]
theorem padic.padic_norm_e_lim_le {p : ℕ} [hp : fact (nat.prime p)] {f : cau_seq ℚ_[p] has_norm.norm} {a : ℝ} (ha : 0 < a) (hf : ∀ (i : ℕ), ‖⇑f i‖ ≤ a) :
@[protected, instance]

Valuation on ℚ_[p] #

noncomputable def padic.valuation {p : ℕ} [hp : fact (nat.prime p)] :

padic.valuation lifts the p-adic valuation on rationals to ℚ_[p].

Equations
@[simp]
theorem padic.valuation_zero {p : ℕ} [hp : fact (nat.prime p)] :
@[simp]
theorem padic.valuation_one {p : ℕ} [hp : fact (nat.prime p)] :
theorem padic.norm_eq_pow_val {p : ℕ} [hp : fact (nat.prime p)] {x : ℚ_[p]} :
@[simp]
theorem padic.valuation_p {p : ℕ} [hp : fact (nat.prime p)] :
theorem padic.valuation_map_add {p : ℕ} [hp : fact (nat.prime p)] {x y : ℚ_[p]} (hxy : x + y ≠ 0) :
@[simp]
theorem padic.valuation_map_mul {p : ℕ} [hp : fact (nat.prime p)] {x y : ℚ_[p]} (hx : x ≠ 0) (hy : y ≠ 0) :
noncomputable def padic.add_valuation_def {p : ℕ} [hp : fact (nat.prime p)] :

The additive p-adic valuation on ℚ_[p], with values in with_top ℤ.

Equations
@[simp]
@[simp]
theorem padic.add_valuation.apply {p : ℕ} [hp : fact (nat.prime p)] {x : ℚ_[p]} (hx : x ≠ 0) :

Various characterizations of open unit balls #

theorem padic.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.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)