# Primality Testing is Polynomial-time: A Mechanised Verification of the AKS Algorithm

@inproceedings{Chan2019PrimalityTI, title={Primality Testing is Polynomial-time: A Mechanised Verification of the AKS Algorithm}, author={Hing-Lun Chan}, year={2019} }

We present a formalisation of the Agrawal-Kayal-Saxena (AKS) algorithm, a deterministic polynomial-time primality test. This algorithm was first announced by the AKS team in 2002, later improved in 2004. Our work is based on the improved version, with Parts 1 and 2 aim at a formal proof of the correctness of the algorithm, and Part 3 aims at a formal analysis of the complexity of the algorithm. The entire work is carried out in the HOL4 theorem prover. The correctness of the AKS algorithm…

## Figures and Tables from this paper

## 3 Citations

Mechanisation of the AKS Algorithm

- Computer Science, MathematicsJ. Autom. Reason.
- 2021

An implementation of the AKS algorithm in the authors' theorem prover HOL4, together with a proof of its correctness and its computational complexity.

Windmills of the minds: an algorithm for fermat’s two squares theorem

- MathematicsCPP
- 2022

The two squares theorem of Fermat is a gem in number theory, with a spectacular one-sentence "proof from the Book". Here is a formalisation of this proof, with an interpretation using windmill…

Verified Textbook Algorithms - A Biased Survey

- Computer ScienceATVA
- 2020

The state of the art of verifying standard textbook algorithms is surveyed, largely on the classic text by Cormen et al.

## References

SHOWING 1-10 OF 95 REFERENCES

Proving Divide and Conquer Complexities in Isabelle/HOL

- Computer ScienceJournal of Automated Reasoning
- 2016

This work describes a formalisation of the Akra–Bazzi method in the interactive theorem prover Isabelle/HOL and the derivation of a generalised version of the Master Theorem from it, which is the first formalised of theorems for the analysis of such recurrences.

The Correctness of the AKS Primality Test in Coq ∗

- Computer Science, Mathematics
- 2008

The first results are presented in order to get a complete formalization of AKS, the first polinomial algorithm that can decide in deterministic polynomial time if a given number is prime or not.

Towards the Verification of The AKS Primality Test in ACL 2

- Computer Science
- 2004

A recursive implementation of the Agrawal, Kayal and Saxena primality testing algorithm, which is the first unconditional deterministic polynomial time primalityTesting algorithm, focuses on verifying that if n is prime, then the AKS algorithm will return PRIME.

A formalization of the Berlekamp-Zassenhaus factorization algorithm

- Computer ScienceCPP
- 2017

The Berlekamp–Zassenhaus algorithm for factoring square-free integer polynomials in Isabelle/HOL is formalized using Isabelle’s recent addition of local type definitions to provide an efficient and certified factorization algorithm for arbitrary univariate polynOMials.

Zen and the art of formalisation

- Computer ScienceMathematical Structures in Computer Science
- 2011

G.N. de Bruijn, now professor emeritus of the Eindhoven University of Technology, was a pioneer in the field of interactive theorem proving, as evidenced by the many mathematical notions and results that bear his name.

Formalization of some central theorems in combinatorics of finite sets

- MathematicsLPAR
- 2017

Full formalized proofs of some central theorems from combinatorics, including Dilworth's decomposition theorem, Mirsky's theorem, Hall's marriage theorem and the Erd-Szekeres theorem are presented.

About the Formalization of Some Results by Chebyshev in Number Theory

- Mathematics, Computer ScienceTYPES
- 2008

We discuss the formalization, in the Matita Interactive Theorem Prover, of a famous result by Chebyshev concerning the distribution of prime numbers, essentially subsuming, as a corollary, Bertrand's…

A Machine-Checked Proof of the Odd Order Theorem

- MathematicsITP
- 2013

This paper reports on a six-year collaborative effort that culminated in a complete formalization of a proof of the Feit-Thompson Odd Order Theorem in the Coq proof assistant, using a comprehensive set of reusable libraries of formalized mathematics.

Mechanisation of AKS Algorithm: Part 1 - The Main Theorem

- Computer ScienceITP
- 2015

This paper describes the first step towards the goal of a full mechanisation of the AKS Main Theorem, which justifies the correctness (but not the complexity) of theAKS algorithm.

A Formal Proof of Borodin-Trakhtenbrot's Gap Theorem

- Mathematics, Computer ScienceCPP
- 2013

The proof is done at an abstract, machine independent level, and is particularly aimed to identify the minimal set of assumptions required to prove the result (smaller than expected, actually).