Prime powers #
This file deals with prime powers: numbers which are positive integer powers of a single prime.
n
is a prime power if there is a prime p
and a positive natural k
such that n
can be
written as p^k
.
An equivalent definition for prime powers: n
is a prime power iff there is a prime p
and a
natural k
such that n
can be written as p^(k+1)
.
theorem
is_prime_pow.pow
{R : Type u_1}
[comm_monoid_with_zero R]
{n : R}
(hn : is_prime_pow n)
{k : ℕ}
(hk : k ≠ 0) :
is_prime_pow (n ^ k)
theorem
is_prime_pow.ne_zero
{R : Type u_1}
[comm_monoid_with_zero R]
[no_zero_divisors R]
{n : R}
(h : is_prime_pow n) :
n ≠ 0
theorem
is_prime_pow.ne_one
{R : Type u_1}
[comm_monoid_with_zero R]
{n : R}
(h : is_prime_pow n) :
n ≠ 1
@[protected, instance]
theorem
is_prime_pow_of_min_fac_pow_factorization_eq
{n : ℕ}
(h : n.min_fac ^ ⇑(n.factorization) n.min_fac = n)
(hn : n ≠ 1) :
theorem
is_prime_pow_iff_min_fac_pow_factorization_eq
{n : ℕ}
(hn : n ≠ 1) :
is_prime_pow n ↔ n.min_fac ^ ⇑(n.factorization) n.min_fac = n
theorem
is_prime_pow_iff_factorization_eq_single
{n : ℕ} :
is_prime_pow n ↔ ∃ (p k : ℕ), 0 < k ∧ n.factorization = finsupp.single p k
theorem
is_prime_pow_iff_card_support_factorization_eq_one
{n : ℕ} :
is_prime_pow n ↔ n.factorization.support.card = 1
An equivalent definition for prime powers: n
is a prime power iff there is a unique prime
dividing it.
theorem
nat.mul_divisors_filter_prime_pow
{a b : ℕ}
(hab : a.coprime b) :
finset.filter is_prime_pow (a * b).divisors = finset.filter is_prime_pow (a.divisors ∪ b.divisors)