Skip to content
A proof checker for a proof calculus of first order logic
Haskell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows
app
docs
src
test
.gitignore
FOL-proof-checker.cabal
LICENSE
README.md
Setup.hs
nohup.out
package.yaml
stack.yaml
stack.yaml.lock

README.md

FOL proof checker

A proof checker for a proof calculus of first order logic.

This program reads formal proofs in the language of first order logic (FOL) and checks them for correctness. I developed this for fun and educational purposes only, but am nevertheless open to contributions or suggestions.

Proof calculus

The axioms and inference rules can be found under docs/proof-calculus.pdf. A proof is just a sequence of formulae, each of which either:

  • follows from two previous ones by modus ponens
  • follows from a previous one by generalisation
  • is an instance of a logical axiom
  • is a non-logical axiom

There is also some (so far only very basic) syntax to define the signature and theory a proof uses. For convenience, Peano arithmetic (PA) is predefined and can be "imported" using the preamble #PA (See for example test/proofs/correct/example-1.2.proof).

CLI interface

The CLI program takes as input a path to a text file containing a proof, checks it and prints the results. If the proof is not correct, the checker stops at the first incorrect step. Using stack, you can compile and run this project as follows:

stack build
stack exec FOL-proof-checker-exe path/to/some-proof.txt
You can’t perform that action at this time.