Primality certificates #
The type of primality certificates and the certifier that constructs a Nat.Prime proof term.
A primality certificate for p (not recorded in the type).
- normNum : Cert
pis proved prime bynorm_num. - known : Cert
A proof that
pis prime is provided, which should be stored in the initial state ofcertifyPrime. - lucas (root : ℕ) (factorization : List (ℕ × ℕ × Cert)) : Cert
A Lucas certificate with the primitive root
rootand the factorization ofp - 1infactorization, each prime factor with its exponent and certificate.
Instances For
partial def Mathlib.Tactic.Primality.certifyPrime (p : ℕ) (cert : Cert) :
StateT (Std.HashMap ℕ Lean.Expr) Lean.MetaM Q(Nat.Prime «$p»)
Proves Nat.Prime p from the certificate cert. Each prime is proved only once.