Natural number multiplicity #
This file contains lemmas about the multiplicity function (the maximum prime power dividing a number) when applied to naturals, in particular calculating it for factorials and binomial coefficients.
Multiplicity calculations #
- Nat.Prime.multiplicity_factorial: Legendre's Theorem. The multiplicity of- pin- n!is- n / p + ... + n / p ^ bfor any- bsuch that- n / p ^ (b + 1) = 0. See- padicValNat_factorialfor this result stated in the language of- p-adic valuations and- sub_one_mul_padicValNat_factorialfor a related result.
- Nat.Prime.multiplicity_factorial_mul: The multiplicity of- pin- (p * n)!is- nmore than that of- n!.
- Nat.Prime.multiplicity_choose: Kummer's Theorem. The multiplicity of- pin- n.choose kis the number of carries when- kand- n - kare added in base- p. See- padicValNat_choosefor the same result but stated in the language of- p-adic valuations and- sub_one_mul_padicValNat_choose_eq_sub_sum_digitsfor a related result.
Other declarations #
- Nat.multiplicity_eq_card_pow_dvd: The multiplicity of- min- nis the number of positive natural numbers- isuch that- m ^ idivides- n.
- Nat.multiplicity_two_factorial_lt: The multiplicity of- 2in- n!is strictly less than- n.
- Nat.Prime.multiplicity_something: Specialization of- multiplicity.somethingto a prime in the naturals. Avoids having to provide- p ≠ 1and other trivialities, along with translating between- Primeand- Nat.Prime.
TODO #
Derive results from the corresponding ones Mathlib.Data.Nat.Factorization.Multiplicity
Tags #
Legendre, p-adic
Legendre's Theorem
The multiplicity of a prime in n! is the sum of the quotients n / p ^ i. This sum is expressed
over the finset Ico 1 b where b is any bound greater than log p n.
The multiplicity of p in (p * (n + 1))! is one more than the sum
of the multiplicities of p in (p * n)! and n + 1.
The multiplicity of p in (p * n)! is n more than that of n!.
A prime power divides n! iff it is at most the sum of the quotients n / p ^ i.
This sum is expressed over the set Ico 1 b where b is any bound greater than log p n
A lower bound on the multiplicity of p in choose n k.