Documentation

Mathlib.NumberTheory.Padics.PadicVal.Defs

p-adic Valuation #

This file defines the p-adic valuation on ℕ, ℤ, and ℚ.

The p-adic valuation on ℚ is the difference of the multiplicities of p in the numerator and denominator of q. This function obeys the standard properties of a valuation, with the appropriate assumptions on p. The p-adic valuations on ℕ and ℤ agree with that on ℚ.

The valuation induces a norm on ℚ. This norm is defined in Mathlib/NumberTheory/Padics/PadicNorm.lean.

def padicValNat (p n : ℕ) :

For p ≠ 1, the p-adic valuation of a natural n ≠ 0 is the largest natural number k such that p^k divides n. If n = 0 or p = 1, then padicValNat p q defaults to 0.

Equations
Instances For
    theorem padicValNat_def' {p n : ℕ} (hp : p ≠ 1) (hn : n ≠ 0) :
    theorem padicValNat_def {p : ℕ} [hp : Fact (Nat.Prime p)] {n : ℕ} (hn : n ≠ 0) :

    A simplification of padicValNat when one input is prime, by analogy with padicValRat_def.

    theorem padicValNat_eq_emultiplicity {p : ℕ} [hp : Fact (Nat.Prime p)] {n : ℕ} (hn : n ≠ 0) :

    A simplification of padicValNat when one input is prime, by analogy with padicValRat_def.

    @[simp]
    theorem padicValNat.zero {p : ℕ} :

    padicValNat p 0 is 0 for any p.

    @[simp]
    theorem padicValNat.one {p : ℕ} :

    padicValNat p 1 is 0 for any p.

    @[simp]
    theorem padicValNat.eq_zero_iff {p n : ℕ} :
    padicValNat p n = 0 ↔ p = 1 ∨ n = 0 ∨ ¬p ∣ n