Archive:Proof assistant: Difference between revisions
No edit summary |
m 50 revisions imported: Import with full history |
||
| (41 intermediate revisions by 27 users not shown) | |||
| Line 1: | Line 1: | ||
{{Short description| | {{Short description|Interactive theorem prover software}} | ||
{{hatnote group| | {{hatnote group| | ||
{{for|verification in computer science|Formal verification}} | {{for|verification in computer science|Formal verification}} | ||
}} | }} | ||
{{distinguish|Interactive proof system}} | {{distinguish|Interactive proof system}} | ||
[[Image:CoqProofOfDecidablityOfEqualityOnNaturalNumbers.png|thumb|upright=1.7|An interactive proof session in RocqIDE, showing the proof script on the left and the proof state on the right]] | [[Image:CoqProofOfDecidablityOfEqualityOnNaturalNumbers.png|thumb|upright=1.7|An interactive proof session in RocqIDE, showing the proof script on the left and the proof state on the right]] | ||
In [[computer science]] and [[mathematical logic]], a '''proof assistant''' or '''interactive theorem prover''' is a software tool to assist with the development of [[formal proof]]s by human–machine collaboration. This involves some sort of interactive proof editor, or other [[User interface|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]]. | In [[computer science]] and [[mathematical logic]], a '''proof assistant''' or '''interactive theorem prover''' is a software tool to assist with the development of [[formal proof]]s by human–machine collaboration. This involves some sort of interactive proof editor, or other [[User interface|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 | A recent effort within this field is making these tools use [[artificial intelligence in mathematics|artificial intelligence to automate the formalization]] of ordinary mathematics.<ref>{{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/}}</ref> | ||
== {{ | == Automated proof checking == | ||
'''Automated proof checking''' is the process of using software for checking [[Mathematical proof|proofs]] for correctness. It is one of the most developed fields in [[automated reasoning]]. Automated proof checking differs from [[automated theorem proving]] in that automated proof checking simply mechanically checks the formal workings of an existing proof, instead of trying to develop new proofs or theorems itself. Because of this, the task of automated proof verification is much simpler than that of automated theorem proving, allowing automated proof checking software to be much simpler than automated theorem proving software. | |||
Because of this small size, some automated proof checking systems can have less than a thousand lines of core code, and are thus themselves amenable to both hand-checking and automated software verification. The [[Mizar system]], [[HOL Light]], and [[Metamath]] are examples of automated proof checking systems. Automated proof checking can be done either as a batch operation, or interactively, as part of an [[Proof assistant|interactive theorem proving]] system. | |||
== History == | |||
[[Automath]], which was developed by [[Nicolaas Govert de Bruijn]] starting in 1967, is often considered the first proof checker and the first system to utilize the [[Curry–Howard correspondence]] between programs and proofs.<ref>{{Cite journal|url=https://www.cs.ru.nl/~herman/PUBS/proofassistants.pdf|title=Proof Assistants: history, ideas and future|last=Geuvers|first=Herman|date=16 July 2009|journal=[[Sādhanā (journal)|Sādhanā]]|volume=34|pages=3-25}}</ref> Automath was used by L.S. van Benthem Jutting in 1977 to formalize Landau's ''Foundations of Analysis'', which was the first formalization of the real numbers.<ref name="Paulson">{{cite web |last=Paulson |first=Lawrence |date=2026-04-23 |title=Why not use Lean? |url=https://lawrencecpaulson.github.io/2026/04/23/Why_not_Lean.html|access-date=2026-04-23}}</ref> | |||
In 1973, [[Robert S. Boyer|Robert Boyer]] and [[J Strother Moore|J Moore]] published ''Proving Theorems about LISP Functions'' which aimed to verify programs, not mathematics.<ref>{{Cite journal|url=https://dl.acm.org/doi/10.1145/321864.321875|title=Proving Theorems about LISP Functions|last=Boyer|first=Robert|last2=Moore|first2=J.|journal=[[Association for Computing Machinery]]|volume=22|pages=129–144}}</ref> Their theorem prover is now known as [[ACL2]]. | |||
In the 1970s, [[Logic for Computable Functions|Edinburgh LCF]] introduced the idea of using a [[functional programming language]] as the metalanguage for a theorem prover, and led to the [[HOL (proof assistant)|HOL]] family of proof assistants.<ref name="Paulson" /> | |||
The 1990s saw the rise of [[Rocq]], (then known as Coq), which has been used for many [[#Notable_formalized_proofs|large-scale formalization projects]]. Since the late 2010s, [[Lean (proof assistant)|Lean]], a proof assistant strongly influenced by Rocq, has become another popular choice, especially for formalizing mathematics. | |||
== <span class="anchor" id="Comparison"></span>System comparison == | |||
{{see also|Dependent type#Comparison|Automated theorem proving#Comparison}} | {{see also|Dependent type#Comparison|Automated theorem proving#Comparison}} | ||
<!-- Need to add at least [[Automath]], [[PhoX]] --> | <!-- Need to add at least [[Automath]], [[PhoX]] --> | ||
| Line 22: | Line 33: | ||
! [[Higher-order logic]] !! [[Dependent type]]s !! [[de Bruijn criterion|Small<br/>kernel]] !! [[Proof automation]] !! Proof by<br/>reflection !! [[Code generation (compiler)|Code generation]] | ! [[Higher-order logic]] !! [[Dependent type]]s !! [[de Bruijn criterion|Small<br/>kernel]] !! [[Proof automation]] !! Proof by<br/>reflection !! [[Code generation (compiler)|Code generation]] | ||
|- | |- | ||
| [[ACL2]] || 8.3 || [[Matt Kaufmann]], [[J Strother Moore]] || [[Common Lisp]] || {{no}} || {{n/a|Untyped}} || {{no}} || {{yes}} || {{yes}}<ref>{{cite book |last1=Hunt |first1=Warren |last2=Kaufmann |first2=Matt |author2-link=Matt Kaufmann |last3=Krug |first3=Robert Bellarmine |last4=Moore |first4=J. |last5=Smith |first5=Eric W. |year=2005 |title=Theorem Proving in Higher Order Logics |chapter=Meta Reasoning in ACL2|series=Lecture Notes in Computer Science |volume=3603 |pages=163–178 |doi=10.1007/11541868_11 |isbn=978-3-540-28372-0|chapter-url= | | [[ACL2]] || 8.3 || [[Matt Kaufmann]], [[J Strother Moore]] || [[Common Lisp]] || {{no}} || {{n/a|Untyped}} || {{no}} || {{yes}} || {{yes}}<ref>{{cite book |last1=Hunt |first1=Warren |last2=Kaufmann |first2=Matt |author2-link=Matt Kaufmann |last3=Krug |first3=Robert Bellarmine |last4=Moore |first4=J. |last5=Smith |first5=Eric W. |year=2005 |title=Theorem Proving in Higher Order Logics |chapter=Meta Reasoning in ACL2|series=Lecture Notes in Computer Science |volume=3603 |pages=163–178 |doi=10.1007/11541868_11 |isbn=978-3-540-28372-0|chapter-url=https://www.cs.utexas.edu/~moore/publications/meta-05.pdf}}</ref> || {{n/a|Already executable}} | ||
|- | |- | ||
| [[Agda (programming language)|Agda]] || 2. | | [[Agda (programming language)|Agda]] || 2.8.0<ref name="github-agda"/> || Ulf Norell, Nils Anders Danielsson, and Andreas Abel ([[Chalmers University of Technology|Chalmers]] and [[University of Gothenburg|Gothenburg]])<ref name="github-agda"/> || [[Haskell]]<ref name="github-agda"/> || {{yes}}<br/>{{Cn|date=July 2024}} || {{yes}}<br/><ref name="agdaWiki"/> || {{yes}}<br/>{{Cn|date=July 2024}} || {{yes}}<br/>{{Cn|date=July 2024}} || {{partial}}<br/>{{Cn|date=July 2024}} || {{n/a|Already executable}}<br/>{{Cn|date=July 2024}} | ||
|- | |- | ||
| Albatross || 0.4 || Helmut Brandl || [[OCaml]] || {{yes}} || {{no}} || {{yes}} || {{yes}} || {{unknown}} || {{not yet}} implemented | | Albatross || 0.4 || Helmut Brandl || [[OCaml]] || {{yes}} || {{no}} || {{yes}} || {{yes}} || {{unknown}} || {{not yet}} implemented | ||
| Line 39: | Line 50: | ||
|- | |- | ||
|[[Lean (proof assistant)|Lean]] | |[[Lean (proof assistant)|Lean]] | ||
| | |4.35.0-rc2<ref>{{Cite web|url=https://github.com/leanprover/lean4/releases|title=Lean 4 Releases Page |website=GitHub |access-date=22 September 2026}}</ref> | ||
|[[Leonardo de Moura]] ([[ | |[[Leonardo de Moura]] ([[AWS]]) | ||
|[[C++]], Lean | |[[C++]], Lean | ||
|{{yes}} | |{{yes}} | ||
| Line 51: | Line 62: | ||
| [[LEGO (proof assistant)|LEGO]] || 1.3.1 || Randy Pollack ([[University of Edinburgh|Edinburgh]]) || [[Standard ML]] || {{yes}} || {{yes}} || {{yes}} || {{no}} || {{no}} || {{no}} | | [[LEGO (proof assistant)|LEGO]] || 1.3.1 || Randy Pollack ([[University of Edinburgh|Edinburgh]]) || [[Standard ML]] || {{yes}} || {{yes}} || {{yes}} || {{no}} || {{no}} || {{no}} | ||
|- | |- | ||
| [[Metamath]] || | | [[Metamath]] || 0.198<ref>{{cite web |url=https://github.com/metamath/metamath-exe/releases/tag/v0.198 |title=Release v0.198 metamath/Metamath-exe |website=[[GitHub]]}}</ref> || Norman Megill || [[ANSI C]] || || || || || || | ||
|- | |- | ||
| [[Mizar system|Mizar]] || 8.1.11 || [[Białystok University]] || [[Free Pascal]] || {{partial}} || {{yes}} || {{no}} || {{no}} || {{no}} || {{no}} | | [[Mizar system|Mizar]] || 8.1.11 || [[Białystok University]] || [[Free Pascal]] || {{partial}} || {{yes}} || {{no}} || {{no}} || {{no}} || {{no}} | ||
| Line 67: | Line 78: | ||
* [[ACL2]] – a programming language, a first-order logical theory, and a theorem prover (with both interactive and automatic modes) in the Boyer–Moore tradition. | * [[ACL2]] – a programming language, a first-order logical theory, and a theorem prover (with both interactive and automatic modes) in the Boyer–Moore tradition. | ||
* [[HOL theorem prover]]s – 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: | |||
* [[HOL theorem prover]]s – 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]]. | **[[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. | **[[HOL Light]] – A thriving "minimalist fork". [[OCaml]] based. | ||
**ProofPower – Went proprietary, then returned to open source. Based on [[Standard ML]]. | **ProofPower – Went proprietary, then returned to open source. Based on [[Standard ML]]. | ||
* IMPS, An Interactive Mathematical Proof System.<ref>{{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|url-access=subscription}}</ref> | * IMPS, An Interactive Mathematical Proof System.<ref>{{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|url-access=subscription}}</ref> | ||
* [[Isabelle theorem prover|Isabelle]] is an interactive theorem prover, | * [[Isabelle theorem prover|Isabelle]] is an interactive theorem prover where other systems can be encoded. Isabelle/HOL is its most popular instance, whose foundation is close to that of the HOL prover. Other instances include Isabelle/ZF and Isabelle/FOL<ref>Isabelle Documentation webpage. Retrieved 22 April 2026: https://isabelle.in.tum.de/documentation.html</ref>. The main code-base is BSD-licensed, but the Isabelle distribution bundles many add-on tools with different licenses. | ||
* [[Jape (software)|Jape]] – Java based. | * [[Jape (software)|Jape]] – Java based. | ||
* [[Lean (proof assistant)|Lean]] | * [[Lean (proof assistant)|Lean]] is both an interactive theorem prover and a functional, dependently-typed programming language. It is based on the [[calculus of inductive constructions]] with non-cumulative universes. Since version 4 (released in 2023), it is self-hosting. It can be used to formalize mathematics (and has a large, coherent library for formal mathematics), but also for software and hardware verification. | ||
* [[LEGO (proof assistant)|LEGO]] | * [[LEGO (proof assistant)|LEGO]] | ||
* [[Matita]] – A light system based on the | * [[Matita]] – A light system based on the calculus of inductive constructions. | ||
* [[MINLOG]] – A proof assistant based on first-order minimal logic. | * [[MINLOG]] – A proof assistant based on first-order minimal logic. | ||
* [[Mizar system|Mizar]] – A proof assistant based on first-order logic, in a [[natural deduction]] style, and [[Tarski–Grothendieck set theory]]. | * [[Mizar system|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. | * [[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. | * [[Prototype Verification System]] (PVS) – a proof language and system based on higher-order logic. | ||
* [[Rocq]] (formerly named ''Coq'') – A popular interactive theorem prover based on the calculus of inductive constructions. | |||
* [[Theorem Proving System]] (TPS) and ETPS – Interactive theorem provers also based on simply typed lambda calculus, but based on an independent [[Q0 Logic|formulation]] of the logical theory and independent implementation. | * [[Theorem Proving System]] (TPS) and ETPS – Interactive theorem provers also based on simply typed lambda calculus, but based on an independent [[Q0 Logic|formulation]] of the logical theory and independent implementation. | ||
== User interfaces == | == User interfaces == | ||
A | A commonly used front-end for proof assistants was the [[Emacs]]-based Proof General, developed at the [[University of Edinburgh]]. Nowadays, many provers include their own editor. Rocq includes RocqIDE, which is based on OCaml/[[Gtk]]. Isabelle includes Isabelle/jEdit, which is based on [[jEdit]] and the Isabelle/[[Scala (programming language)|Scala]] infrastructure for document-oriented proof processing. More recently, [[Visual Studio Code]] extensions have been developed for Rocq,<ref>{{Cite web|url=https://github.com/coq-community/vscoq|title=coq-community/vscoq|date=July 29, 2024|via=GitHub}}</ref> Isabelle by Makarius Wenzel,<ref>{{cite web |last1=Wenzel |first1=Makarius |title=Isabelle |url=https://marketplace.visualstudio.com/items?itemName=makarius.isabelle |access-date=2 November 2019}}</ref> and for Lean 4 by the leanprover developers.<ref>{{cite web |title=VS Code Lean 4 |url=https://github.com/leanprover/vscode-lean4 |website=GitHub |access-date=15 October 2023}}</ref> | ||
Rocq includes RocqIDE, which is based on OCaml/[[Gtk]]. Isabelle includes Isabelle/jEdit, which is based on [[jEdit]] and the Isabelle/[[Scala (programming language)|Scala]] infrastructure for document-oriented proof processing. More recently, [[Visual Studio Code]] extensions have been developed for Rocq,<ref>{{Cite web|url=https://github.com/coq-community/vscoq|title=coq-community/vscoq|date=July 29, 2024|via=GitHub}}</ref> Isabelle by Makarius Wenzel,<ref>{{cite web |last1=Wenzel |first1=Makarius |title=Isabelle |url=https://marketplace.visualstudio.com/items?itemName=makarius.isabelle |access-date=2 November 2019}}</ref> and for Lean 4 by the leanprover developers.<ref>{{cite web |title=VS Code Lean 4 |url=https://github.com/leanprover/vscode-lean4 |website=GitHub |access-date=15 October 2023}}</ref> | |||
== Formalization extent == | == Formalization extent == | ||
| Line 124: | Line 133: | ||
* {{annotated link|Computer-assisted proof}} | * {{annotated link|Computer-assisted proof}} | ||
* {{annotated link|Formal verification}} | * {{annotated link|Formal verification}} | ||
* [[Prover9]] – is an [[Automated theorem proving|automated theorem prover]] for [[First-order logic|first-order and equational logic]] | |||
* {{annotated link|QED manifesto}} | * {{annotated link|QED manifesto}} | ||
* {{annotated link|Satisfiability modulo theories}} | * {{annotated link|Satisfiability modulo theories}} | ||
* | * {{annotated link|List of mathematical discoveries by artificial intelligence}} | ||
== | == References== | ||
{{Reflist|refs= | {{Reflist|refs= | ||
<ref name="agdaWiki">{{cite web |title=The Agda Wiki |url=https://wiki.portal.chalmers.se/agda/pmwiki.php |access-date=31 July 2024}}</ref> | <ref name="agdaWiki">{{cite web |title=The Agda Wiki |url=https://wiki.portal.chalmers.se/agda/pmwiki.php |access-date=31 July 2024}}</ref> | ||
| Line 145: | Line 155: | ||
* [https://theoremprover-museum.github.io/ Theorem Prover Museum] | * [https://theoremprover-museum.github.io/ Theorem Prover Museum] | ||
* [http://adam.chlipala.net/cpdt/html/Intro.html "Introduction"] in ''Certified Programming with Dependent Types''. | * [http://adam.chlipala.net/cpdt/html/Intro.html "Introduction"] in ''Certified Programming with Dependent Types''. | ||
* [ | * [https://video.ias.edu/univalent/appel Introduction to the Coq Proof Assistant] (with a general introduction to interactive theorem proving) | ||
* [http://www.cs.swan.ac.uk/~csetzer/lectures/intertheo/07/interactiveTheoremProvingForAgdaUsers.html Interactive Theorem Proving for Agda Users] | * [http://www.cs.swan.ac.uk/~csetzer/lectures/intertheo/07/interactiveTheoremProvingForAgdaUsers.html Interactive Theorem Proving for Agda Users] | ||
* [https://github.com/johnyf/tool_lists/blob/master/verification_synthesis.md#theorem-provers A list of theorem proving tools] | * [https://github.com/johnyf/tool_lists/blob/master/verification_synthesis.md#theorem-provers A list of theorem proving tools] | ||
| Line 157: | Line 167: | ||
* {{cite web | title=Specific Logical Frameworks and Implementations | url=https://www.cs.cmu.edu/~fp/lfs-impl.html | access-date=15 February 2024 | archive-date=10 April 2022 | archive-url=https://web.archive.org/web/20220410151836/https://www.cs.cmu.edu/~fp/lfs-impl.html | url-status=dead }} (By Frank Pfenning). | * {{cite web | title=Specific Logical Frameworks and Implementations | url=https://www.cs.cmu.edu/~fp/lfs-impl.html | access-date=15 February 2024 | archive-date=10 April 2022 | archive-url=https://web.archive.org/web/20220410151836/https://www.cs.cmu.edu/~fp/lfs-impl.html | url-status=dead }} (By Frank Pfenning). | ||
* [[DMOZ]]: [http://www.dmoz.org/Science/Math/Logic_and_Foundations/Computational_Logic/Logical_Frameworks/ Science: Math: Logic and Foundations: Computational Logic: Logical Frameworks] | * [[DMOZ]]: [http://www.dmoz.org/Science/Math/Logic_and_Foundations/Computational_Logic/Logical_Frameworks/ Science: Math: Logic and Foundations: Computational Logic: Logical Frameworks] | ||
{{Mathematical software}} | |||
[[Category:Argument technology]] | [[Category:Argument technology]] | ||