Primality certificate from a partially factored predecessor
ProvedErdos287.pocklington_prime_certificateegyptian-fractionserdos-problemsnumber-theory
Let n>1 and let F be a positive divisor of n-1 with F squared greater than n. For every prime d dividing F suppose there is a witness a with a^(n-1)=1 modulo n and a^((n-1)/d)-1 a unit modulo n. Then n is prime.
Preamble
import Mathlib
Formal statement
theorem Erdos287.pocklington_prime_certificate (n F : ℕ) (hn : 1 < n) (hF : 0 < F) (hdiv : F ∣ n - 1)
(hsize : n < F ^ 2)
(hw : ∀ d : ℕ, d.Prime → d ∣ F → ∃ a : ℕ,
(a : ZMod n) ^ (n - 1) = 1 ∧ IsUnit ((a : ZMod n) ^ ((n - 1) / d) - 1)) :
n.Prime := by sorry
Source
Pocklington primality criterion for the Erdős #287 finite certificates.