The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V12. Number theory

Mathlib.NumberTheory.Multiplicity

25 declarations and 6 deprecated aliases. Mathlib docs · Source

Multiplicity in Number Theory

This file contains results in number theory relating to multiplicity.

Main statements

  • multiplicity.Int.pow_sub_pow is the lifting the exponent lemma for odd primes. We also prove several variations of the lemma.

References

theorem dvd_geom_sum₂_iff_of_dvd_sub E1 #

∀ {R : Type u_1} {n : ℕ} [inst : CommRing R] {x y p : R},
  p ∣ x - y → (p ∣ ∑ i ∈ Finset.range n, x ^ i * y ^ (n - 1 - i) ↔ p ∣ ↑n * y ^ (n - 1))

theorem dvd_geom_sum₂_iff_of_dvd_sub' E1 #

∀ {R : Type u_1} {n : ℕ} [inst : CommRing R] {x y p : R},
  p ∣ x - y → (p ∣ ∑ i ∈ Finset.range n, x ^ i * y ^ (n - 1 - i) ↔ p ∣ ↑n * x ^ (n - 1))

theorem dvd_geom_sum₂_self E1 #

∀ {R : Type u_1} {n : ℕ} [inst : CommRing R] {x y : R}, ↑n ∣ x - y → ↑n ∣ ∑ i ∈ Finset.range n, x ^ i * y ^ (n - 1 - i)

theorem sq_dvd_add_pow_sub_sub E1 #

∀ {R : Type u_1} [inst : CommRing R] (p x : R) (n : ℕ), p ^ 2 ∣ (x + p) ^ n - x ^ (n - 1) * p * ↑n - x ^ n

theorem not_dvd_geom_sum₂ E1 #

∀ {R : Type u_1} {n : ℕ} [inst : CommRing R] {x y p : R},
  Prime p → p ∣ x - y → ¬p ∣ x → ¬p ∣ ↑n → ¬p ∣ ∑ i ∈ Finset.range n, x ^ i * y ^ (n - 1 - i)

theorem odd_sq_dvd_geom_sum₂_sub E1 #

∀ {R : Type u_1} [inst : CommRing R] (a b : R) {p : ℕ},
  Odd p → ↑p ^ 2 ∣ ∑ i ∈ Finset.range p, (a + ↑p * b) ^ i * a ^ (p - 1 - i) - ↑p * a ^ (p - 1)

theorem emultiplicity_pow_sub_pow_of_prime E1 #

∀ {R : Type u_1} [inst : CommRing R] [IsDomain R] {p : R},
  Prime p →
    ∀ {x y : R}, p ∣ x - y → ¬p ∣ x → ∀ {n : ℕ}, ¬p ∣ ↑n → emultiplicity p (x ^ n - y ^ n) = emultiplicity p (x - y)

theorem emultiplicity_geom_sum₂_eq_one E1 #

∀ {R : Type u_1} [inst : CommRing R] {x y : R} {p : ℕ} [IsDomain R],
  Prime ↑p → Odd p → ↑p ∣ x - y → ¬↑p ∣ x → emultiplicity (↑p) (∑ i ∈ Finset.range p, x ^ i * y ^ (p - 1 - i)) = 1

theorem emultiplicity_pow_prime_sub_pow_prime E1 #

∀ {R : Type u_1} [inst : CommRing R] {x y : R} {p : ℕ} [IsDomain R],
  Prime ↑p → Odd p → ↑p ∣ x - y → ¬↑p ∣ x → emultiplicity (↑p) (x ^ p - y ^ p) = emultiplicity (↑p) (x - y) + 1

theorem emultiplicity_pow_prime_pow_sub_pow_prime_pow E1 #

∀ {R : Type u_1} [inst : CommRing R] {x y : R} {p : ℕ} [IsDomain R],
  Prime ↑p →
    Odd p →
      ↑p ∣ x - y → ¬↑p ∣ x → ∀ (a : ℕ), emultiplicity (↑p) (x ^ p ^ a - y ^ p ^ a) = emultiplicity (↑p) (x - y) + ↑a

theorem Int.emultiplicity_pow_sub_pow E1 #

∀ {p : ℕ},
  Nat.Prime p →
    Odd p →
      ∀ {x y : ℤ},
        ↑p ∣ x - y →
          ¬↑p ∣ x → ∀ (n : ℕ), emultiplicity (↑p) (x ^ n - y ^ n) = emultiplicity (↑p) (x - y) + emultiplicity p n

Lifting the exponent lemma for odd primes.

theorem Int.emultiplicity_pow_add_pow E1 #

∀ {p : ℕ},
  Nat.Prime p →
    Odd p →
      ∀ {x y : ℤ},
        ↑p ∣ x + y →
          ¬↑p ∣ x →
            ∀ {n : ℕ}, Odd n → emultiplicity (↑p) (x ^ n + y ^ n) = emultiplicity (↑p) (x + y) + emultiplicity p n

theorem Nat.emultiplicity_pow_sub_pow E1 #

∀ {p : ℕ},
  Nat.Prime p →
    Odd p →
      ∀ {x y : ℕ},
        p ∣ x - y → ¬p ∣ x → ∀ (n : ℕ), emultiplicity p (x ^ n - y ^ n) = emultiplicity p (x - y) + emultiplicity p n

theorem Nat.emultiplicity_pow_add_pow E1 #

∀ {p : ℕ},
  Nat.Prime p →
    Odd p →
      ∀ {x y : ℕ},
        p ∣ x + y →
          ¬p ∣ x → ∀ {n : ℕ}, Odd n → emultiplicity p (x ^ n + y ^ n) = emultiplicity p (x + y) + emultiplicity p n

theorem pow_two_pow_sub_pow_two_pow E1 #

∀ {R : Type u_1} [inst : CommRing R] {x y : R} (n : ℕ),
  x ^ 2 ^ n - y ^ 2 ^ n = (∏ i ∈ Finset.range n, (x ^ 2 ^ i + y ^ 2 ^ i)) * (x - y)

theorem Int.two_pow_two_pow_add_two_pow_two_pow E1 #

∀ {x y : ℤ}, ¬2 ∣ x → 4 ∣ x - y → ∀ (i : ℕ), emultiplicity 2 (x ^ 2 ^ i + y ^ 2 ^ i) = ↑1

theorem Int.two_pow_two_pow_sub_pow_two_pow E1 #

∀ {x y : ℤ} (n : ℕ), 4 ∣ x - y → ¬2 ∣ x → emultiplicity 2 (x ^ 2 ^ n - y ^ 2 ^ n) = emultiplicity 2 (x - y) + ↑n

theorem Int.two_pow_sub_pow' E1 #

∀ {x y : ℤ} (n : ℕ), 4 ∣ x - y → ¬2 ∣ x → emultiplicity 2 (x ^ n - y ^ n) = emultiplicity 2 (x - y) + emultiplicity 2 ↑n

theorem Int.two_pow_sub_pow E1 #

∀ {x y : ℤ} {n : ℕ},
  2 ∣ x - y →
    ¬2 ∣ x →
      Even n →
        emultiplicity 2 (x ^ n - y ^ n) + 1 = emultiplicity 2 (x + y) + emultiplicity 2 (x - y) + emultiplicity 2 ↑n

Lifting the exponent lemma for p = 2

theorem Nat.two_pow_sub_pow E1 #

∀ {x y : ℕ},
  2 ∣ x - y →
    ¬2 ∣ x →
      ∀ {n : ℕ},
        Even n →
          emultiplicity 2 (x ^ n - y ^ n) + 1 = emultiplicity 2 (x + y) + emultiplicity 2 (x - y) + emultiplicity 2 n

theorem Nat.multiplicity_pow_two_sub_pow E1 #

∀ {x y : ℕ},
  y < x →
    2 ∣ x - y →
      ¬2 ∣ x →
        ∀ {n : ℕ},
          n ≠ 0 →
            Even n →
              multiplicity 2 (x ^ n - y ^ n) + 1 = multiplicity 2 (x + y) + multiplicity 2 (x - y) + multiplicity 2 n

theorem Nat.multiplicity_pow_two_sub_one E1 #

∀ {x n : ℕ},
  1 < x →
    ¬2 ∣ x →
      n ≠ 0 →
        Even n → multiplicity 2 (x ^ n - 1) + 1 = multiplicity 2 (x + 1) + multiplicity 2 (x - 1) + multiplicity 2 n

theorem Nat.multiplicity_pow_two_sub_one_ge E1 #

∀ {n x : ℕ}, 1 < x → ¬2 ∣ x → n ≠ 0 → Even n → multiplicity 2 n + 2 ≤ multiplicity 2 (x ^ n - 1)

theorem Nat.multiplicity_pow_sub_pow E1 #

∀ {x y p : ℕ} [hp : Fact (Nat.Prime p)],
  Odd p →
    y < x →
      p ∣ x - y → ¬p ∣ x → ∀ {n : ℕ}, n ≠ 0 → multiplicity p (x ^ n - y ^ n) = multiplicity p (x - y) + multiplicity p n

theorem Nat.multiplicity_pow_add_pow E1 #

∀ {x y p : ℕ} [hp : Fact (Nat.Prime p)],
  Odd p →
    p ∣ x + y → ¬p ∣ x → ∀ {n : ℕ}, Odd n → multiplicity p (x ^ n + y ^ n) = multiplicity p (x + y) + multiplicity p n

Deprecated aliases

NameNew nameSince
Int.sq_mod_four_eq_one_of_oddInt.sq_emod_four_eq_one_of_odd2026-08-12
padicValNat.pow_add_powNat.multiplicity_pow_add_pow2026-10-28
padicValNat.pow_sub_powNat.multiplicity_pow_sub_pow2026-10-28
padicValNat.pow_two_sub_oneNat.multiplicity_pow_two_sub_one2026-10-28
padicValNat.pow_two_sub_one_geNat.multiplicity_pow_two_sub_one_ge2026-10-28
padicValNat.pow_two_sub_powNat.multiplicity_pow_two_sub_pow2026-10-28