Basic lemmas on prime factorizations #
Basic facts about factorization #
Lemmas characterising when n.factorization p = 0 #
The only numbers with empty prime factorization are 0 and 1
Lemmas about factorizations of products and powers #
A product over n.factorization can be written as a product over n.primeFactors;
A product over n.primeFactors can be written as a product over n.factorization;
Lemmas about factorizations of primes and prime powers #
The multiplicity of prime p in p is 1
If the factorization of n contains just one number p then n is a power of p
The only prime factor of prime p is p itself.
Equivalence between ℕ+ and ℕ →₀ ℕ with support in the primes. #
Factorization and divisibility #
A crude upper bound on n.factorization p
An upper bound on n.factorization p
The set of positive powers of prime p that divide n is exactly the set of
positive natural numbers up to n.factorization p.
The factorization of m in n is the number of positive natural numbers i such that m ^ i
divides n. Note m is prime. This set is expressed by filtering Ico 1 b where b is any bound
greater than log m n.
Factorization and coprimes #
If p is a prime factor of a then the power of p in a is the same that in a * b,
for any b coprime to a.
If p is a prime factor of b then the power of p in b is the same that in a * b,
for any a coprime to b.
Two positive naturals are equal if their prime padic valuations are equal
Lemmas about factorizations of particular functions #
Exactly n / p naturals in [1, n] are multiples of p.
See Nat.card_multiples' for an alternative spelling of the statement.
Exactly n / p naturals in (0, n] are multiples of p.
There are exactly ⌊N/n⌋ positive multiples of n that are ≤ N.
See Nat.card_multiples for a "shifted-by-one" version.