Documentation

Mathlib.Data.Nat.PadicValNat

The p-adic valuation on natural numbers #

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 n defaults to 0.

Equations
Instances For
    @[deprecated multiplicity_zero_left (since := "2026-10-28")]
    theorem padicValNat_zero_left {α : Type u_1} [MonoidWithZero α] (a : α) :

    Alias of multiplicity_zero_left.

    @[deprecated multiplicity_one_left (since := "2026-10-28")]
    theorem padicValNat_one_left {α : Type u_1} [Monoid α] (b : α) :

    Alias of multiplicity_one_left.

    @[deprecated multiplicity_zero_right (since := "2026-10-28")]
    theorem padicValNat_zero_right {α : Type u_1} [MonoidWithZero α] (a : α) :

    Alias of multiplicity_zero_right.

    theorem Nat.maxPowDvdDiv_of_not_dvd {p n : ℕ} (h : ¬p ∣ n) :
    @[deprecated multiplicity_one_right (since := "2026-10-28")]
    theorem padicValNat_one_right {α : Type u_1} [Monoid α] {a : α} :

    Alias of multiplicity_one_right.

    @[simp]
    theorem Nat.divMaxPow_one_left (p : ℕ) :
    divMaxPow 1 p = 1
    @[deprecated Nat.pow_multiplicity_mul_divMaxPow (since := "2026-10-28")]

    Alias of Nat.pow_multiplicity_mul_divMaxPow.

    @[deprecated pow_multiplicity_dvd (since := "2026-10-28")]
    theorem pow_padicValNat_dvd {α : Type u_1} [Monoid α] (a b : α) :

    Alias of pow_multiplicity_dvd.

    theorem Nat.multiplicity_lt_self {p n : ℕ} (hn : n ≠ 0) :
    @[deprecated Nat.multiplicity_lt_self (since := "2026-10-28")]
    theorem Nat.padicValNat_lt_self {p n : ℕ} (hn : n ≠ 0) :

    Alias of Nat.multiplicity_lt_self.

    @[deprecated Nat.multiplicity_le_self (since := "2026-10-28")]
    theorem Nat.padicValNat_le_self {p : ℕ} (n : ℕ) :

    Alias of Nat.multiplicity_le_self.

    theorem Nat.pow_dvd_iff_le_multiplicity {p k n : ℕ} (hp : p ≠ 1) (hn : n ≠ 0) :
    p ^ k ∣ n ↔ k ≤ multiplicity p n

    If p > 1, n > 0, then the first component of maxPowDvdDiv is the maximal power of p that divides n.

    @[deprecated Nat.pow_dvd_iff_le_multiplicity (since := "2026-10-28")]
    theorem Nat.pow_dvd_iff_le_padicValNat {p k n : ℕ} (hp : p ≠ 1) (hn : n ≠ 0) :
    p ^ k ∣ n ↔ k ≤ multiplicity p n

    Alias of Nat.pow_dvd_iff_le_multiplicity.


    If p > 1, n > 0, then the first component of maxPowDvdDiv is the maximal power of p that divides n.

    theorem Nat.maxPowDvdDiv_of_pow_mul_eq {p n k l : ℕ} (hn : n ≠ 0) (h : p ^ k * l = n) (hl : ¬p ∣ l) :
    @[simp]
    theorem Nat.maxPowDvdDiv_base_pow_mul {p n : ℕ} (hp : 1 < p) (hn : n ≠ 0) (k : ℕ) :
    @[simp]
    theorem multiplicity_base_pow_mul {p n : ℕ} (hp : 1 < p) (hn : n ≠ 0) (k : ℕ) :
    multiplicity p (p ^ k * n) = multiplicity p n + k
    @[deprecated multiplicity_base_pow_mul (since := "2026-10-28")]
    theorem padicValNat_base_pow_mul {p n : ℕ} (hp : 1 < p) (hn : n ≠ 0) (k : ℕ) :
    multiplicity p (p ^ k * n) = multiplicity p n + k

    Alias of multiplicity_base_pow_mul.

    @[simp]
    theorem Nat.divMaxPow_base_pow_mul {p : ℕ} (hp : p ≠ 0) (n k : ℕ) :
    (p ^ k * n).divMaxPow p = n.divMaxPow p
    @[simp]
    theorem Nat.maxPowDvdDiv_base_mul {p n : ℕ} (hp : 1 < p) (hn : n ≠ 0) :
    @[simp]
    theorem multiplicity_base_mul {p n : ℕ} (hp : 1 < p) (hn : n ≠ 0) :
    multiplicity p (p * n) = multiplicity p n + 1
    @[deprecated multiplicity_base_mul (since := "2026-10-28")]
    theorem padicValNat_base_mul {p n : ℕ} (hp : 1 < p) (hn : n ≠ 0) :
    multiplicity p (p * n) = multiplicity p n + 1

    Alias of multiplicity_base_mul.

    @[simp]
    theorem Nat.divMaxPow_base_mul {p : ℕ} (hp : p ≠ 0) (n : ℕ) :
    (p * n).divMaxPow p = n.divMaxPow p
    @[simp]
    theorem Nat.maxPowDvdDiv_base_pow {p : ℕ} (hp : 1 < p) (k : ℕ) :
    p.maxPowDvdDiv (p ^ k) = (k, 1)
    @[simp]
    theorem multiplicity_base_pow {p : ℕ} (hp : 1 < p) (k : ℕ) :
    multiplicity p (p ^ k) = k
    @[deprecated multiplicity_base_pow (since := "2026-10-28")]
    theorem padicValNat_base_pow {p : ℕ} (hp : 1 < p) (k : ℕ) :
    multiplicity p (p ^ k) = k

    Alias of multiplicity_base_pow.

    @[simp]
    theorem Nat.divMaxPow_base_pow {p : ℕ} (hp : p ≠ 0) (k : ℕ) :
    (p ^ k).divMaxPow p = 1
    @[simp]
    theorem Nat.maxPowDvdDiv_self {p : ℕ} (hp : 1 < p) :
    @[simp]
    theorem Nat.multiplicity_self {p : ℕ} (hp : 1 < p) :
    @[deprecated Nat.multiplicity_self (since := "2026-10-28")]
    theorem padicValNat_base {p : ℕ} (hp : 1 < p) :

    Alias of Nat.multiplicity_self.

    @[simp]
    theorem Nat.divMaxPow_self {p : ℕ} (hp : p ≠ 0) :
    p.divMaxPow p = 1
    @[simp]
    theorem Nat.fst_maxPowDvdDiv (p n : ℕ) :
    @[simp]
    theorem Nat.snd_maxPowDvdDiv (p n : ℕ) :