Proof assistant

{{Short description|Software tool to assist with the development of formal proofs by human–machine collaboration}}

{{for|verification in computer science|formal verification}}

{{for|the academic conference|Interactive Theorem Proving (conference)}}

{{distinguish|Interactive proof system}}

{{missing information|automated proof checking|date=February 2024}}

{{more footnotes|date=November 2018}}

Image:CoqProofOfDecidablityOfEqualityOnNaturalNumbers.png

In computer science and mathematical logic, a proof assistant or interactive theorem prover is a software tool to assist with the development of formal proofs by human–machine collaboration. This involves some sort of interactive proof editor, or other interface, with which a human can guide the search for proofs, the details of which are stored in, and some steps provided by, a computer.

A recent effort within this field is making these tools use artificial intelligence to automate the formalization of ordinary mathematics.{{Cite web |last=Ornes |first=Stephen |date=August 27, 2020 |title=Quanta Magazine – How Close Are Computers to Automating Mathematical Reasoning? |url=https://www.quantamagazine.org/how-close-are-computers-to-automating-mathematical-reasoning-20200827/}}

{{anchor|Comparison}}System comparison

{{see also|Dependent type#Comparison|Automated theorem proving#Comparison}}

class=wikitable
rowspan=2 | Namerowspan=2 | Latest versionrowspan=2 | Developer(s)rowspan=2 | Implementation languagecolspan=6 | Features
Higher-order logicDependent typesSmall kernelProof automationProof by reflectionCode generation
ACL28.3Matt Kaufmann and J Strother MooreCommon Lisp{{no}}{{n/a|Untyped}}{{no}}{{yes}}{{yes}}{{cite book|last=Hunt|first=Warren|author2=Matt Kaufmann |author3=Robert Bellarmine Krug |author4=J Moore |author5=Eric W. Smith |title=Theorem Proving in Higher Order Logics|chapter=Meta Reasoning in ACL2|series=Lecture Notes in Computer Science|year=2005|volume=3603|pages=163–178|doi=10.1007/11541868_11|isbn=978-3-540-28372-0|chapter-url=http://www.cs.utexas.edu/~moore/publications/meta-05.pdf}}{{n/a|Already executable}}
Agda2.6.4.3Ulf Norell, Nils Anders Danielsson, and Andreas Abel (Chalmers and Gothenburg)Haskell{{yes}}
{{Cn|date=July 2024}}
{{yes}}
{{yes}}
{{Cn|date=July 2024}}
{{no}}
{{Cn|date=July 2024}}
{{partial}}
{{Cn|date=July 2024}}
{{n/a|Already executable}}
{{Cn|date=July 2024}}
Albatross0.4Helmut BrandlOCaml{{yes}}{{no}}{{yes}}{{yes}}{{unknown}}{{not yet}} Implemented
Rocq (formerly known as Coq)9.0INRIAOCaml{{yes}}{{yes}}{{yes}}{{yes}}{{yes}}{{yes}}
F*repositoryMicrosoft Research and INRIAF*{{yes}}{{yes}}{{no}}{{yes}}{{yes}}Search for "proofs by reflection": {{ArXiv|1803.06547}}{{yes}}
HOL LightrepositoryJohn HarrisonOCaml{{yes}}{{no}}{{yes}}{{yes}}{{no}}{{no}}
HOL4Kananaskis-13 (or repo)Michael Norrish, Konrad Slind, and othersStandard ML{{yes}}{{no}}{{yes}}{{yes}}{{no}}{{yes}}
Idris2 0.6.0.Edwin BradyIdris{{yes}}{{yes}}{{yes}}{{unknown}}{{partial}}{{yes}}
IsabelleIsabelle2024 (May 2024)Larry Paulson (Cambridge), Tobias Nipkow (München) and Makarius WenzelStandard ML, Scala{{yes}}{{no}}{{yes}}{{yes}}{{yes}}{{yes}}
Lean

|v4.7.0{{Cite web|url=https://github.com/leanprover/lean4/releases|title=Lean 4 Releases Page |website=GitHub |access-date=15 October 2023}}

|Leonardo de Moura (Microsoft Research)

|C++, Lean

|{{yes}}

|{{yes}}

|{{yes}}

|{{yes}}

|{{yes}}

|{{yes}}

LEGO1.3.1Randy Pollack (Edinburgh)Standard ML{{yes}}{{yes}}{{yes}}{{no}}{{no}}{{no}}
Metamathv0.198{{cite web | url=https://github.com/metamath/metamath-exe/releases/tag/v0.198 | title=Release v0.198 · metamath/Metamath-exe | website=GitHub }}Norman MegillANSI C
Mizar8.1.11Białystok UniversityFree Pascal{{partial}}{{yes}}{{no}}{{no}}{{no}}{{no}}
Nqthm
NuPRL5Cornell UniversityCommon Lisp{{yes}}{{yes}}{{yes}}{{yes}}{{unknown}}{{yes}}
PVS6.0SRI InternationalCommon Lisp{{yes}}{{yes}}{{no}}{{yes}}{{no}}{{unknown}}
Twelf1.7.1Frank Pfenning and Carsten SchürmannStandard ML{{yes}}{{yes}}{{unknown}}{{no}}{{no}}{{unknown}}

  • ACL2 – a programming language, a first-order logical theory, and a theorem prover (with both interactive and automatic modes) in the Boyer–Moore tradition.
  • Rocq (formerly known as Coq)  – Allows the expression of mathematical assertions, mechanically checks proofs of these assertions, helps to find formal proofs, and extracts a certified program from the constructive proof of its formal specification.
  • HOL theorem provers – A family of tools ultimately derived from the LCF theorem prover. In these systems the logical core is a library of their programming language. Theorems represent new elements of the language and can only be introduced via "strategies" which guarantee logical correctness. Strategy composition gives users the ability to produce significant proofs with relatively few interactions with the system. Members of the family include:
  • HOL4 – The "primary descendant", still under active development. Support for both Moscow ML and Poly/ML. Has a BSD-style license.
  • HOL Light – A thriving "minimalist fork". OCaml based.
  • ProofPower – Went proprietary, then returned to open source. Based on Standard ML.
  • IMPS, An Interactive Mathematical Proof System.{{cite journal |last1=Farmer |first1=William M. |last2=Guttman |first2=Joshua D. |last3=Thayer |first3=F. Javier |title=IMPS: An interactive mathematical proof system |journal=Journal of Automated Reasoning |date=1993 |volume=11 |issue=2 |pages=213–248 |doi=10.1007/BF00881906 |s2cid=3084322 |access-date=22 January 2020|url=https://core.ac.uk/display/23376340}}
  • Isabelle is an interactive theorem prover, successor of HOL. The main code-base is BSD-licensed, but the Isabelle distribution bundles many add-on tools with different licenses.
  • Jape – Java based.
  • Lean
  • LEGO
  • Matita – A light system based on the Calculus of Inductive Constructions.
  • MINLOG – A proof assistant based on first-order minimal logic.
  • Mizar – A proof assistant based on first-order logic, in a natural deduction style, and Tarski–Grothendieck set theory.
  • PhoX – A proof assistant based on higher-order logic which is eXtensible.
  • Prototype Verification System (PVS) – a proof language and system based on higher-order logic.
  • TPS and ETPS – Interactive theorem provers also based on simply typed lambda calculus, but based on an independent formulation of the logical theory and independent implementation.

User interfaces

A popular front-end for proof assistants is the Emacs-based Proof General, developed at the University of Edinburgh.

Coq includes CoqIDE, which is based on OCaml/Gtk. Isabelle includes Isabelle/jEdit, which is based on jEdit and the Isabelle/Scala infrastructure for document-oriented proof processing. More recently, Visual Studio Code extensions have been developed for Coq,{{Cite web|url=https://github.com/coq-community/vscoq|title=coq-community/vscoq|date=July 29, 2024|via=GitHub}} Isabelle by Makarius Wenzel,{{cite web |last1=Wenzel |first1=Makarius |title=Isabelle |url=https://marketplace.visualstudio.com/items?itemName=makarius.isabelle |access-date=2 November 2019}} and for Lean 4 by the leanprover developers.{{cite web |title=VS Code Lean 4 |url=https://github.com/leanprover/vscode-lean4 |website=GitHub |access-date=15 October 2023}}

Formalization extent

Freek Wiedijk has been keeping a ranking of proof assistants by the amount of formalized theorems out of a list of 100 well-known theorems. As of September 2023, only five systems have formalized proofs of more than 70% of the theorems, namely Isabelle, HOL Light, Rocq, Lean, and Metamath.{{cite web |url=https://www.cs.ru.nl/~freek/100/ |title=Formalizing 100 Theorems |first=Freek |last=Wiedijk |date=15 September 2023 }}{{cite journal |url=https://www.ias.ac.in/article/fulltext/sadh/034/01/0003-0025 |title=Proof assistants: History, ideas and future |first=Herman |last=Geuvers |journal=Sādhanā |volume=34 |issue=1 |date=February 2009 |pages=3–25 |doi= 10.1007/s12046-009-0001-5|s2cid=14827467 |doi-access=free |hdl=2066/75958 |hdl-access=free }}

Notable formalized proofs

{{See also|Computer-assisted proof#Theorems proved with the help of computer programs}}

The following is a list of notable proofs that have been formalized within proof assistants.

class=wikitable

! scope="col" | Theorem

! scope="col" | Proof assistant

! scope="col" | Year

Four color theorem{{Citation |last=Gonthier |first=Georges |author-link=Georges Gonthier |title=Formal Proof—The Four-Color Theorem |journal=Notices of the American Mathematical Society |volume=55 |year=2008 |url=https://www.ams.org/notices/200811/tx081101382p.pdf |archive-url=https://web.archive.org/web/20110805094909/http://www.ams.org/notices/200811/tx081101382p.pdf |archive-date=2011-08-05 |url-status=live |issue=11 |pages=1382–1393 |mr=2463991 }}Coq2005
Feit–Thompson theorem{{Cite web |date=2016-11-19 |title=Feit thomson proved in coq - Microsoft Research Inria Joint Centre |url=http://www.msr-inria.fr/news/feit-thomson-proved-in-coq/ |access-date=2023-12-07 |archive-url=https://web.archive.org/web/20161119094854/http://www.msr-inria.fr/news/feit-thomson-proved-in-coq/ |archive-date=2016-11-19 }}Coq2012
Fundamental group of the circle{{Cite book |title=2013 28th Annual ACM/IEEE Symposium on Logic in Computer Science |url=https://ieeexplore.ieee.org/document/6571554 |access-date=2023-12-07 |doi=10.1109/lics.2013.28 |date=2013 |last1=Licata |first1=Daniel R. |last2=Shulman |first2=Michael |chapter=Calculating the Fundamental Group of the Circle in Homotopy Type Theory |pages=223–232 |arxiv=1301.3443 |isbn=978-1-4799-0413-6 |s2cid=5661377 }}Coq2013
Erdős–Graham problem{{Cite web |date=2022-03-11 |title=Math Problem 3,500 Years In The Making Finally Gets A Solution |url=https://www.iflscience.com/math-problem-3500-years-in-the-making-finally-gets-a-solution-62925 |access-date=2024-02-09 |website=IFLScience |language=en}}{{Cite arXiv |last=Avigad |first=Jeremy |date=2023 |class=math.HO |title=Mathematics and the formal turn |eprint=2311.00007 }}

|Lean

|2022

Polynomial Freiman-Ruzsa conjecture over \mathbb F_2{{Cite web |last=Sloman |first=Leila |date=2023-12-06 |title='A-Team' of Math Proves a Critical Link Between Addition and Sets |url=https://www.quantamagazine.org/a-team-of-math-proves-a-critical-link-between-addition-and-sets-20231206/ |access-date=2023-12-07 |website=Quanta Magazine |language=en}}Lean2023
BB(5) = 47,176,870{{Cite web |date=2024-07-02 |title=We have proved "BB(5) = 47,176,870" |url=https://discuss.bbchallenge.org/t/july-2nd-2024-we-have-proved-bb-5-47-176-870/237 |access-date=2024-07-09 |website=The Busy Beaver Challenge |language=en}}

|Coq

|2024

See also

Notes

{{Reflist|refs=

{{cite web |title=The Agda Wiki |url=https://wiki.portal.chalmers.se/agda/pmwiki.php |access-date=31 July 2024}}

{{cite web |title=agda/agda: Agda is a dependently typed programming language / interactive theorem prover. |url=https://github.com/agda/agda |website=GitHub |access-date=31 July 2024}}

}}

References

  • {{cite book |author1-link=Henk Barendregt |first1=Henk |last1=Barendregt |first2=Herman |last2=Geuvers |chapter=18. Proof-assistants using Dependent Type Systems |chapter-url=http://www.ncc.up.pt/~nam/aulas/0506/t_coq/barendregt01proofassistants.pdf |editor1-first=Alan J. A. |editor1-last=Robinson |editor2-first=Andrei |editor2-last=Voronkov |title=Handbook of Automated Reasoning |publisher=Elsevier |volume=2 |date=2001 |isbn=978-0-444-50812-6 |pages=1149– |archive-url=https://web.archive.org/web/20070727062855/http://www.ncc.up.pt/~nam/aulas/0506/t_coq/barendregt01proofassistants.pdf |archive-date=2007-07-27 |ref={{harvid|Handbook vol 2|2001}}}}
  • {{cite book |author1-link=Frank Pfenning |first1=Frank |last1=Pfenning |chapter-url=https://www.cs.cmu.edu/~fp/papers/handbook01.pdf |chapter=17. Logical frameworks |title={{harvnb|Handbook vol 2|2001}} |pages=1065–1148}}
  • {{cite book |first=Frank |last=Pfenning |chapter=The practice of logical frameworks |chapter-url= |editor-first=H. |editor-last=Kirchner |title=Trees in Algebra and Programming – CAAP '96 |publisher=Springer |series=Lecture Notes in Computer Science |volume=1059 |date=1996 |isbn=3-540-61064-2 |pages=119–134 |doi=10.1007/3-540-61064-2_33}}
  • {{cite book |author1-link=Robert L. Constable |first=Robert L. |last=Constable |chapter=X. Types in computer science, philosophy and logic |chapter-url={{GBurl|MfTMDeCq7ukC|p=683}} |editor-first=S. R. |editor-last=Buss |title=Handbook of Proof Theory |publisher=Elsevier |series=Studies in Logic |volume=137 |date=1998 |isbn=978-0-08-053318-6 |pages=683–786 |url=}}
  • {{cite web |first=Freek |last=Wiedijk |title=The Seventeen Provers of the World |date=2005 |publisher=Radboud University Nijmegen |url=https://www.cs.ru.nl/~freek/comparison/comparison.pdf }}