14 research outputs found
A Formalisation of Lehmer’s Primality Criterion
In 1927, Lehmer presented criterions for primality, based on the converse of Fermat’s litte theorem [2]. This work formalizes the second criterion from Lehmer’s paper, a necessary and sufficient condition for primality. As a side product we formalize some properties of Euler’s ϕ-function, the notion of the order of an element of a group, and the cyclicity o
A Formalization of Pratt’s Primality Certificates
In 1975, Pratt introduced a proof system for certifying primes [1]. He showed that a number p is prime iff a primality certificate for p exists. By showing a logarithmic upper bound on the length of the certificates in size of the prime number, he concluded that the decision problem for prime numbers is in NP. This work formalizes soundness and completeness of Pratt’s proof system as well as an upper boun