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.PrimePow

19 declarations. Mathlib docs · Source

theorem IsPrimePow.minFac_pow_factorization_eq E0 #

∀ {n : ℕ}, IsPrimePow n → n.minFac ^ n.factorization n.minFac = n

theorem isPrimePow_of_minFac_pow_factorization_eq E0 #

∀ {n : ℕ}, n.minFac ^ n.factorization n.minFac = n → n ≠ 1 → IsPrimePow n

theorem isPrimePow_iff_minFac_pow_factorization_eq E0 #

∀ {n : ℕ}, n ≠ 1 → (IsPrimePow n ↔ n.minFac ^ n.factorization n.minFac = n)

theorem isPrimePow_iff_factorization_eq_single E1 #

∀ {n : ℕ}, IsPrimePow n ↔ ∃ p k, 0 < k ∧ n.factorization = fun₀ | p => k

theorem isPrimePow_iff_card_primeFactors_eq_one E1 #

∀ {n : ℕ}, IsPrimePow n ↔ n.primeFactors.card = 1

theorem Nat.not_isPrimePow_iff_nontrivial_of_two_le E1 #

∀ {n : ℕ}, 2 ≤ n → (¬IsPrimePow n ↔ n.primeFactors.Nontrivial)

theorem IsPrimePow.exists_ordCompl_eq_one E1 #

∀ {n : ℕ}, IsPrimePow n → ∃ p, Nat.Prime p ∧ n / p ^ n.factorization p = 1

theorem exists_ordCompl_eq_one_iff_isPrimePow E1 #

∀ {n : ℕ}, n ≠ 1 → (IsPrimePow n ↔ ∃ p, Nat.Prime p ∧ n / p ^ n.factorization p = 1)

theorem isPrimePow_iff_unique_prime_dvd E1 #

∀ {n : ℕ}, IsPrimePow n ↔ ∃! p, Nat.Prime p ∧ p ∣ n

An equivalent definition for prime powers: n is a prime power iff there is a unique prime dividing it.

theorem isPrimePow_pow_iff E0 #

∀ {n k : ℕ}, k ≠ 0 → (IsPrimePow (n ^ k) ↔ IsPrimePow n)

theorem Nat.Coprime.isPrimePow_dvd_mul E1 #

∀ {n a b : ℕ}, a.Coprime b → IsPrimePow n → (n ∣ a * b ↔ n ∣ a ∨ n ∣ b)

theorem Nat.mul_divisors_filter_prime_pow E1 #

∀ {a b : ℕ}, a.Coprime b → {d ∈ (a * b).divisors | IsPrimePow d} = {d ∈ a.divisors ∪ b.divisors | IsPrimePow d}

def Nat.Primes.prodNatEquiv E1 #

Nat.Primes × ℕ ≃ { n // IsPrimePow n }

The canonical equivalence between pairs (p, k) with p a prime and k : ℕ and the set of prime powers given by (p, k) ↦ p^(k+1).

theorem Nat.Primes.prodNatEquiv_apply E0 #

∀ (p : Nat.Primes) (k : ℕ), Nat.Primes.prodNatEquiv (p, k) = ⟨↑p ^ (k + 1), ⋯⟩

theorem Nat.Primes.coe_prodNatEquiv_apply E0 #

∀ (p : Nat.Primes) (k : ℕ), ↑(Nat.Primes.prodNatEquiv (p, k)) = ↑p ^ (k + 1)

theorem Nat.Primes.prodNatEquiv_symm_apply E0 #

∀ {n : ℕ} (hn : IsPrimePow n), Nat.Primes.prodNatEquiv.symm ⟨n, hn⟩ = (⟨n.minFac, ⋯⟩, n.factorization n.minFac - 1)

theorem Nat.exponent_eq_exponent_mul_factorization_of_prime_pow_eq_base_pow E1 #

∀ {p a m n : ℕ}, Nat.Prime p → p ^ m = a ^ n → m = n * a.factorization p

theorem Nat.exponent_dvd_of_prime_pow_eq_pow E1 #

∀ {p a m n : ℕ}, Nat.Prime p → p ^ m = a ^ n → n ∣ m

theorem Nat.exists_base_eq_prime_pow_of_prime_pow_eq_base_pow E1 #

∀ {p a m n : ℕ}, Nat.Prime p → n ≠ 0 → p ^ m = a ^ n → ∃ k, a = p ^ k