Nqthm
Nqthm is a theorem prover sometimes referred to as the Boyer–Moore theorem prover. It was a precursor to ACL2.
History
The system was developed by Robert S. Boyer and J Strother Moore, professors of computer science at the University of Texas, Austin. They began work on the system in 1971 in Edinburgh, Scotland. Their goal was to make a fully automatic, logic-based theorem prover. They used a variant of Pure LISP as the working logic.Definitions
Definitions are formed as totally recursive functions, the system makes extensive use of rewriting and an induction heuristic that is used when rewriting and something that they called symbolic evaluation fails.The system was built on top of Lisp and had some very basic knowledge in what was called "Ground-zero", the state of the machine after bootstrapping it onto a Common Lisp implementation.
This is an example of the proof of a simple arithmetic theorem. The function is part of the and is defined to be
0
))
Theorem formulation
The formulation of the theorem is also given in a Lisp-like syntax:))
Should the theorem prove to be true, it will be added to the knowledge basis of the system and can be used as a rewrite rule for future proofs.
The proof itself is given in a quasi-natural language manner. The authors randomly choose typical mathematical phrases for embedding the steps in the mathematical proof, which does actually make the proofs quite readable. There are macros for LaTeX that can transform the Lisp structure into more or less readable mathematical language.
The proof of the commutativity of times continues:
Give the conjecture the name *1.
We will appeal to induction. Two inductions are suggested by terms in the conjecture,
both of which are flawed. We limit our consideration to the two suggested by the
largest number of nonprimitive recursive functions in the conjecture. Since both of
these are equally likely, we will choose arbitrarily. We will induct according to
the following scheme:
)
)).
Linear arithmetic, the lemma COUNT-NUMBERP, and the definition of ZEROP inform
us that the measure decreases according to the well-founded relation
LESSP in each induction step of the scheme. The above induction scheme
produces the following two new conjectures:
Case 2.
)).
and after winding itself through a number of induction proofs, finally concludes that
Case 1. )
).
This simplifies, expanding the definitions of ZEROP, TIMES, PLUS, and EQUAL, to:
T.
That finishes the proof of *1.1, which also finishes the proof of *1.
Q.E.D.
COMMUTATIVITY-OF-TIMES
Proofs
Many proofs have been done or confirmed with the system, particularly- list concatenation
- insertion sort
- a binary adder
- an expression compiler for a stack machine
- uniqueness of prime factorizations
- invertibility of the RSA encryption algorithm
- unsolvability of the halting problem for Pure Lisp
- FM8501 microprocessor
- Gödel's incompleteness theorem
- CLI Stack
- Gauss' law of quadratic reciprocity
- Byzantine Generals and Clock Synchronization
- A compiler for a subset of the Nqthm language
- bi-phase mark asynchronous communications protocol
- Motorola MC68020 and Berkeley C String Library
- Paris–Harrington Ramsey theorem
- The equivalence of NFSA and DFSA