Bertrand's postulate #
Since mathlib already pretty closely follows Proofs From The BOOK here, we on adapt a little here the proof formalized by Patrick Stevens and Bolton Bailey.
TODO #
- rewrite the proof to follow even more closely what is done int The BOOK.
- Appendix: Some estimates
- Estimating via integrals
- Estimating factorials - Stirling's formula
- Estimating binomial coefficients
theorem
chapter2.centralBinom_factorization_small
(n : ℕ)
(n_large : 2 < n)
(no_prime : ¬∃ (p : ℕ), Nat.Prime p ∧ n < p ∧ p ≤ 2 * n)
:
A lemma that tells us that, in the case where Bertrand's postulate does not hold, the prime
factorization of the central binomial coefficient only has factors at most 2 * n / 3 + 1
.
theorem
chapter2.centralBinom_le_of_no_bertrand_prime
(n : ℕ)
(n_big : 2 < n)
(no_prime : ¬∃ (p : ℕ), Nat.Prime p ∧ n < p ∧ p ≤ 2 * n)
:
An upper bound on the central binomial coefficient used in the proof of Bertrand's postulate.
The bound splits the prime factors of centralBinom n
into those
- At most
sqrt (2 * n)
, which contribute at most2 * n
for each such prime. - Between
sqrt (2 * n)
and2 * n / 3
, which contribute at most4^(2 * n / 3)
in total. - Between
2 * n / 3
andn
, which do not exist. - Between
n
and2 * n
, which would not exist in the case where Bertrand's postulate is false. - Above
2 * n
, which do not exist.
theorem
chapter2.exists_prime_lt_and_le_two_mul_succ
{n : ℕ}
(q : ℕ)
{p : ℕ}
(prime_p : Nat.Prime p)
(covering : p ≤ 2 * q)
(H : n < q → ∃ (p : ℕ), Nat.Prime p ∧ n < p ∧ p ≤ 2 * n)
(hn : n < p)
:
Proves that Bertrand's postulate holds over all positive naturals less than n by identifying a descending list of primes, each no more than twice the next, such that the list contains a witness for each number ≤ n.