Documentation

Mathlib.NumberTheory.Padics.PadicNumbers

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 #

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.

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 #

Tags #

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

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

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

Equations
Instances For
    theorem PadicSeq.stationary {p : ℕ} [Fact (Nat.Prime p)] {f : CauSeq ℚ (padicNorm p)} (hf : ¬f ≈ 0) :
    ∃ (N : ℕ), ∀ (m n : ℕ), N ≤ m → N ≤ n → padicNorm p (↑f n) = padicNorm p (↑f m)

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

    def PadicSeq.stationaryPoint {p : ℕ} [Fact (Nat.Prime p)] {f : PadicSeq p} (hf : ¬f ≈ 0) :

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

    Equations
    Instances For
      theorem PadicSeq.stationaryPoint_spec {p : ℕ} [Fact (Nat.Prime p)] {f : PadicSeq p} (hf : ¬f ≈ 0) {m : ℕ} {n : ℕ} :
      def PadicSeq.norm {p : ℕ} [Fact (Nat.Prime p)] (f : PadicSeq p) :

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

      Equations
      Instances For
        theorem PadicSeq.equiv_zero_of_val_eq_of_equiv_zero {p : ℕ} [Fact (Nat.Prime p)] {f : PadicSeq p} {g : PadicSeq p} (h : ∀ (k : ℕ), padicNorm p (↑f k) = padicNorm p (↑g k)) (hf : f ≈ 0) :
        g ≈ 0
        theorem PadicSeq.norm_eq_norm_app_of_nonzero {p : ℕ} [Fact (Nat.Prime p)] {f : PadicSeq p} (hf : ¬f ≈ 0) :
        ∃ (k : ℚ), PadicSeq.norm f = padicNorm p k ∧ k ≠ 0
        theorem PadicSeq.lift_index_left_left {p : ℕ} [Fact (Nat.Prime p)] {f : PadicSeq p} (hf : ¬f ≈ 0) (v2 : ℕ) (v3 : ℕ) :

        An auxiliary lemma for manipulating sequence indices.

        theorem PadicSeq.lift_index_left {p : ℕ} [Fact (Nat.Prime p)] {f : PadicSeq p} (hf : ¬f ≈ 0) (v1 : ℕ) (v3 : ℕ) :

        An auxiliary lemma for manipulating sequence indices.

        theorem PadicSeq.lift_index_right {p : ℕ} [Fact (Nat.Prime p)] {f : PadicSeq p} (hf : ¬f ≈ 0) (v1 : ℕ) (v2 : ℕ) :

        An auxiliary lemma for manipulating sequence indices.

        Valuation on PadicSeq #

        def PadicSeq.valuation {p : ℕ} [Fact (Nat.Prime p)] (f : PadicSeq p) :

        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
        Instances For
          theorem PadicSeq.norm_values_discrete {p : ℕ} [hp : Fact (Nat.Prime p)] (a : PadicSeq p) (ha : ¬a ≈ 0) :
          ∃ (z : ℤ), PadicSeq.norm a = ↑p ^ (-z)
          theorem PadicSeq.norm_equiv {p : ℕ} [hp : Fact (Nat.Prime p)] {f : PadicSeq p} {g : PadicSeq p} (hfg : f ≈ g) :
          theorem PadicSeq.norm_eq {p : ℕ} [hp : Fact (Nat.Prime p)] {f : PadicSeq p} {g : PadicSeq p} (h : ∀ (k : ℕ), padicNorm p (↑f k) = padicNorm p (↑g k)) :
          def Padic (p : ℕ) [Fact (Nat.Prime p)] :

          The p-adic numbers ℚ_[p] are the Cauchy completion of ℚ with respect to the p-adic norm.

          Equations
          Instances For

            notation for p-padic rationals

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              instance Padic.field {p : ℕ} [Fact (Nat.Prime p)] :
              Equations
              • Padic.field = CauSeq.Completion.Cauchy.field
              Equations
              • Padic.instInhabitedPadic = { default := 0 }
              Equations
              • Padic.instCommRingPadic = CauSeq.Completion.Cauchy.commRing
              Equations
              • Padic.instRingPadic = CauSeq.Completion.Cauchy.ring
              Equations
              • Padic.instZeroPadic = inferInstance
              Equations
              • Padic.instOnePadic = inferInstance
              Equations
              • Padic.instAddPadic = inferInstance
              Equations
              • Padic.instMulPadic = inferInstance
              Equations
              • Padic.instSubPadic = inferInstance
              Equations
              • Padic.instNegPadic = inferInstance
              Equations
              • Padic.instDivPadic = inferInstance
              Equations
              • Padic.instAddCommGroupPadic = inferInstance
              def Padic.mk {p : ℕ} [Fact (Nat.Prime p)] :

              Builds the equivalence class of a Cauchy sequence of rationals.

              Equations
              • Padic.mk = Quotient.mk'
              Instances For
                theorem Padic.zero_def (p : ℕ) [Fact (Nat.Prime p)] :
                0 = ⟦0⟧
                theorem Padic.mk_eq (p : ℕ) [Fact (Nat.Prime p)] {f : PadicSeq p} {g : PadicSeq p} :
                theorem Padic.coe_inj (p : ℕ) [Fact (Nat.Prime p)] {q : ℚ} {r : ℚ} :
                ↑q = ↑r ↔ q = r
                theorem Padic.coe_add (p : ℕ) [Fact (Nat.Prime p)] {x : ℚ} {y : ℚ} :
                ↑(x + y) = ↑x + ↑y
                theorem Padic.coe_neg (p : ℕ) [Fact (Nat.Prime p)] {x : ℚ} :
                ↑(-x) = -↑x
                theorem Padic.coe_mul (p : ℕ) [Fact (Nat.Prime p)] {x : ℚ} {y : ℚ} :
                ↑(x * y) = ↑x * ↑y
                theorem Padic.coe_sub (p : ℕ) [Fact (Nat.Prime p)] {x : ℚ} {y : ℚ} :
                ↑(x - y) = ↑x - ↑y
                theorem Padic.coe_div (p : ℕ) [Fact (Nat.Prime p)] {x : ℚ} {y : ℚ} :
                ↑(x / y) = ↑x / ↑y
                theorem Padic.coe_one (p : ℕ) [Fact (Nat.Prime p)] :
                ↑1 = 1
                theorem Padic.coe_zero (p : ℕ) [Fact (Nat.Prime p)] :
                ↑0 = 0

                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 = { toMulHom := { toFun := Quotient.lift PadicSeq.norm ⋯, map_mul' := ⋯ }, nonneg' := ⋯, eq_zero' := ⋯, add_le' := ⋯ }
                Instances For
                  theorem padicNormE.defn {p : ℕ} [Fact (Nat.Prime p)] (f : PadicSeq p) {ε : ℚ} (hε : 0 < ε) :
                  ∃ (N : ℕ), ∀ i ≥ N, padicNormE (Padic.mk f - ↑(↑f i)) < ε
                  theorem padicNormE.nonarchimedean' {p : ℕ} [Fact (Nat.Prime p)] (q : ℚ_[p]) (r : ℚ_[p]) :
                  padicNormE (q + r) ≤ max (padicNormE q) (padicNormE r)

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

                  theorem padicNormE.add_eq_max_of_ne' {p : ℕ} [Fact (Nat.Prime p)] {q : ℚ_[p]} {r : ℚ_[p]} :
                  padicNormE q ≠ padicNormE r → padicNormE (q + r) = max (padicNormE q) (padicNormE r)

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

                  @[simp]
                  theorem padicNormE.eq_padic_norm' {p : ℕ} [Fact (Nat.Prime p)] (q : ℚ) :
                  padicNormE ↑q = padicNorm p q
                  theorem padicNormE.image' {p : ℕ} [Fact (Nat.Prime p)] {q : ℚ_[p]} :
                  q ≠ 0 → ∃ (n : ℤ), padicNormE q = ↑p ^ (-n)
                  theorem Padic.rat_dense' {p : ℕ} [Fact (Nat.Prime p)] (q : ℚ_[p]) {ε : ℚ} (hε : 0 < ε) :
                  ∃ (r : ℚ), padicNormE (q - ↑r) < ε
                  def Padic.limSeq {p : ℕ} [Fact (Nat.Prime p)] (f : CauSeq ℚ_[p] ⇑padicNormE) :
                  ℕ → ℚ

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

                  Equations
                  Instances For
                    theorem Padic.exi_rat_seq_conv {p : ℕ} [Fact (Nat.Prime p)] (f : CauSeq ℚ_[p] ⇑padicNormE) {ε : ℚ} (hε : 0 < ε) :
                    ∃ (N : ℕ), ∀ i ≥ N, padicNormE (↑f i - ↑(Padic.limSeq f i)) < ε
                    theorem Padic.complete' {p : ℕ} [Fact (Nat.Prime p)] (f : CauSeq ℚ_[p] ⇑padicNormE) :
                    ∃ (q : ℚ_[p]), ∀ ε > 0, ∃ (N : ℕ), ∀ i ≥ N, padicNormE (q - ↑f i) < ε
                    theorem Padic.complete'' {p : ℕ} [Fact (Nat.Prime p)] (f : CauSeq ℚ_[p] ⇑padicNormE) :
                    ∃ (q : ℚ_[p]), ∀ ε > 0, ∃ (N : ℕ), ∀ i ≥ N, padicNormE (↑f i - q) < ε
                    Equations
                    Equations
                    Equations
                    instance Padic.isAbsoluteValue (p : ℕ) [Fact (Nat.Prime p)] :
                    Equations
                    • ⋯ = ⋯
                    theorem Padic.rat_dense (p : ℕ) [Fact (Nat.Prime p)] (q : ℚ_[p]) {ε : ℝ} (hε : 0 < ε) :
                    ∃ (r : ℚ), ‖q - ↑r‖ < ε
                    @[simp]
                    theorem padicNormE.mul {p : ℕ} [hp : Fact (Nat.Prime p)] (q : ℚ_[p]) (r : ℚ_[p]) :
                    theorem padicNormE.is_norm {p : ℕ} [hp : Fact (Nat.Prime p)] (q : ℚ_[p]) :
                    ↑(padicNormE q) = ‖q‖
                    theorem padicNormE.nonarchimedean {p : ℕ} [hp : Fact (Nat.Prime p)] (q : ℚ_[p]) (r : ℚ_[p]) :
                    theorem padicNormE.add_eq_max_of_ne {p : ℕ} [hp : Fact (Nat.Prime p)] {q : ℚ_[p]} {r : ℚ_[p]} (h : ‖q‖ ≠ ‖r‖) :
                    @[simp]
                    theorem padicNormE.eq_padicNorm {p : ℕ} [hp : Fact (Nat.Prime p)] (q : ℚ) :
                    ‖↑q‖ = ↑(padicNorm p q)
                    @[simp]
                    theorem padicNormE.norm_p {p : ℕ} [hp : Fact (Nat.Prime p)] :
                    ‖↑p‖ = (↑p)⁻¹
                    theorem padicNormE.norm_p_lt_one {p : ℕ} [hp : Fact (Nat.Prime p)] :
                    ‖↑p‖ < 1
                    @[simp]
                    theorem padicNormE.norm_p_zpow {p : ℕ} [hp : Fact (Nat.Prime p)] (n : ℤ) :
                    ‖↑p ^ n‖ = ↑p ^ (-n)
                    @[simp]
                    theorem padicNormE.norm_p_pow {p : ℕ} [hp : Fact (Nat.Prime p)] (n : ℕ) :
                    ‖↑p ^ n‖ = ↑p ^ (-↑n)
                    Equations
                    theorem padicNormE.image {p : ℕ} [hp : Fact (Nat.Prime p)] {q : ℚ_[p]} :
                    q ≠ 0 → ∃ (n : ℤ), ‖q‖ = ↑(↑p ^ (-n))
                    theorem padicNormE.is_rat {p : ℕ} [hp : Fact (Nat.Prime p)] (q : ℚ_[p]) :
                    ∃ (q' : ℚ), ‖q‖ = ↑q'
                    def padicNormE.ratNorm {p : ℕ} [hp : Fact (Nat.Prime p)] (q : ℚ_[p]) :

                    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
                      theorem padicNormE.norm_rat_le_one {p : ℕ} [hp : Fact (Nat.Prime p)] {q : ℚ} :
                      ¬p ∣ q.den → ‖↑q‖ ≤ 1
                      theorem padicNormE.norm_int_le_one {p : ℕ} [hp : Fact (Nat.Prime p)] (z : ℤ) :
                      ‖↑z‖ ≤ 1
                      theorem padicNormE.norm_int_lt_one_iff_dvd {p : ℕ} [hp : Fact (Nat.Prime p)] (k : ℤ) :
                      ‖↑k‖ < 1 ↔ ↑p ∣ k
                      theorem padicNormE.norm_int_le_pow_iff_dvd {p : ℕ} [hp : Fact (Nat.Prime p)] (k : ℤ) (n : ℕ) :
                      ‖↑k‖ ≤ ↑p ^ (-↑n) ↔ ↑p ^ n ∣ k
                      theorem padicNormE.eq_of_norm_add_lt_right {p : ℕ} [hp : Fact (Nat.Prime p)] {z1 : ℚ_[p]} {z2 : ℚ_[p]} (h : ‖z1 + z2‖ < ‖z2‖) :
                      theorem padicNormE.eq_of_norm_add_lt_left {p : ℕ} [hp : Fact (Nat.Prime p)] {z1 : ℚ_[p]} {z2 : ℚ_[p]} (h : ‖z1 + z2‖ < ‖z1‖) :
                      instance Padic.complete {p : ℕ} [hp : Fact (Nat.Prime p)] :
                      Equations
                      • ⋯ = ⋯
                      theorem Padic.padicNormE_lim_le {p : ℕ} [hp : Fact (Nat.Prime p)] {f : CauSeq ℚ_[p] norm} {a : ℝ} (ha : 0 < a) (hf : ∀ (i : ℕ), ‖↑f i‖ ≤ a) :

                      Valuation on ℚ_[p] #

                      def Padic.valuation {p : ℕ} [hp : Fact (Nat.Prime p)] :
                      ℚ_[p] → ℤ

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

                      Equations
                      Instances For
                        @[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]} :
                        x ≠ 0 → ‖x‖ = ↑p ^ (-Padic.valuation x)
                        @[simp]
                        theorem Padic.valuation_p {p : ℕ} [hp : Fact (Nat.Prime p)] :
                        theorem Padic.valuation_map_add {p : ℕ} [hp : Fact (Nat.Prime p)] {x : ℚ_[p]} {y : ℚ_[p]} (hxy : x + y ≠ 0) :
                        @[simp]
                        theorem Padic.valuation_map_mul {p : ℕ} [hp : Fact (Nat.Prime p)] {x : ℚ_[p]} {y : ℚ_[p]} (hx : x ≠ 0) (hy : y ≠ 0) :

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

                        Equations
                        Instances For

                          The additive p-adic valuation on ℚ_[p], as an addValuation.

                          Equations
                          Instances For
                            @[simp]
                            theorem Padic.addValuation.apply {p : ℕ} [hp : Fact (Nat.Prime p)] {x : ℚ_[p]} (hx : x ≠ 0) :
                            Padic.addValuation x = ↑(Padic.valuation x)

                            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)