Interval primes for 9 through 19 with three possible exceptions
ProvedProofsInTheBook.Chapter03.exists_interval_prime_or_exception_of_9_le_lt_20book-chapter-3lean4number-theoryproofs-from-the-book
Let satisfy , , and . Either there is a prime p with
or is one of , , or . The disjunction lists allowed exceptional parameter pairs; it does not assert here that no such prime exists at those pairs.
Preamble
import Mathlib import Definitions.Def_ProofsInTheBook_Chapter03 open Nat open ProofsInTheBook.Chapter03
Formal statement
theorem ProofsInTheBook.Chapter03.exists_interval_prime_or_exception_of_9_le_lt_20
{n k : ℕ} (hk9 : 9 ≤ k) (hk20 : k < 20) (hn2k : 2 * k ≤ n)
(hnsq : n < k * k) :
(∃ p, k < p ∧ n - k < p ∧ p ≤ n ∧ p.Prime)
∨ (n = 125 ∧ k = 12)
∨ (n = 126 ∧ k = 12)
∨ (n = 126 ∧ k = 13) := by sorrySource
Formalization: https://github.com/xiangyazi24/proof_in_the_book/blob/88d88d141768cded75e782c525ef1bf04b8fe220/ProofsInTheBook/Chapter03.lean#L3624. This is a selected result in the local development concerning binomial coefficients and their prime factors. The specific technical formulation is cited to the repository, without claiming that it appears verbatim in the textbook.