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 / V02. Numbers

Mathlib.Data.Nat.Factorization.Induction

8 declarations. Mathlib docs · Source

Induction principles involving factorizations

Definitions

Lemmas on multiplicative functions

def Nat.recOnPrimePow E1 #

{motive : ℕ → Sort u_1} →
  motive 0 →
    motive 1 → ((a p n : ℕ) → Nat.Prime p → ¬p ∣ a → 0 < n → motive a → motive (p ^ n * a)) → (a : ℕ) → motive a

Given P 0, P 1 and a way to extend P a to P (p ^ n * a) for prime p not dividing a, we can define P for all natural numbers.

def Nat.recOnPosPrimePosCoprime E1 #

{motive : ℕ → Sort u_1} →
  ((p n : ℕ) → Nat.Prime p → 0 < n → motive (p ^ n)) →
    motive 0 →
      motive 1 → ((a b : ℕ) → 1 < a → 1 < b → a.Coprime b → motive a → motive b → motive (a * b)) → (a : ℕ) → motive a

Given P 0, P 1, and P (p ^ n) for positive prime powers, and a way to extend P a and P b to P (a * b) when a, b are positive coprime, we can define P for all natural numbers.

def Nat.recOnPrimeCoprime E1 #

{motive : ℕ → Sort u_1} →
  motive 0 →
    ((p n : ℕ) → Nat.Prime p → motive (p ^ n)) →
      ((a b : ℕ) → 1 < a → 1 < b → a.Coprime b → motive a → motive b → motive (a * b)) → (a : ℕ) → motive a

Given P 0, P (p ^ n) for all prime powers, and a way to extend P a and P b to P (a * b) when a, b are positive coprime, we can define P for all natural numbers.

def Nat.recOnMul E1 #

{motive : ℕ → Sort u_1} →
  motive 0 →
    motive 1 →
      ((p : ℕ) → Nat.Prime p → motive p) → ((a b : ℕ) → motive a → motive b → motive (a * b)) → (a : ℕ) → motive a

Given P 0, P 1, P p for all primes, and a way to extend P a and P b to P (a * b), we can define P for all natural numbers.

theorem induction_on_primes E1 #

∀ {motive : ℕ → Prop},
  motive 0 → motive 1 → (∀ (p a : ℕ), Nat.Prime p → motive a → motive (p * a)) → ∀ (n : ℕ), motive n

theorem Nat.prime_composite_induction E1 #

∀ {motive : ℕ → Prop},
  motive 0 →
    motive 1 →
      (∀ (p : ℕ), Nat.Prime p → motive p) →
        (∀ (a : ℕ), 2 ≤ a → motive a → ∀ (b : ℕ), 2 ≤ b → motive b → motive (a * b)) → ∀ (n : ℕ), motive n

theorem Nat.multiplicative_factorization E1 #

∀ {β : Type u_1} [inst : CommMonoid β] (f : ℕ → β),
  (∀ (x y : ℕ), x.Coprime y → f (x * y) = f x * f y) →
    f 1 = 1 → ∀ {n : ℕ}, n ≠ 0 → f n = n.factorization.prod fun p k ↦ f (p ^ k)

For any multiplicative function f with f 1 = 1 and any n ≠ 0, we can evaluate f n by evaluating f at p ^ k over the factorization of n

theorem Nat.multiplicative_factorization' E1 #

∀ {n : ℕ} {β : Type u_1} [inst : CommMonoid β] (f : ℕ → β),
  (∀ (x y : ℕ), x.Coprime y → f (x * y) = f x * f y) →
    f 0 = 1 → f 1 = 1 → f n = n.factorization.prod fun p k ↦ f (p ^ k)

For any multiplicative function f with f 1 = 1 and f 0 = 1, we can evaluate f n by evaluating f at p ^ k over the factorization of n