lean-golf Lean 4 proof leaderboard

Infinitude of primes

219 characters · @majdi19 ·

Statement

import Mathlib.Data.Nat.Prime.Infinite
theorem LeanGolf.inf_primes (n : ℕ) : ∃ p, n ≤ p ∧ Nat.Prime p

Record proof

import Mathlib.Data.Nat.Prime.Infinite

theorem LeanGolf.inf_primes (n : ℕ) : ∃ p, n ≤ p ∧ Nat.Prime p := by
  let m := n.factorial+1
  have P : m.minFac.Prime := Nat.minFac_prime (by have := Nat.factorial_pos n; dsimp [m]; omega)
  refine ⟨_,?_,P⟩
  by_contra! H
  exact P.not_dvd_one ((Nat.dvd_add_iff_right (Nat.dvd_factorial P.pos H.le)).mpr (Nat.minFac_dvd m))

Record card (SVG)

Record history

HolderCharactersDate
@majdi19219
@lean-golf-seed294