FLiP 1.0: Logical Framework in Python

Jon Jacky jon.p.jacky at gmail.com
Fri Jul 31 19:47:45 CEST 2009


Flip is a logical framework written in Python.  Code, documentation,
and downloads are available:

 http://staff.washington.edu/jon/flip/www/

A logical framework is a library for defining logics and writing
applications such as theorem provers.  One Flip application is a proof
checker for entering and editing proofs in natural deduction style:

[(Text('~Ax.P(x) |- Ex.~P(x)'), comment),
    (Not(A(x, P(x))), given),
    (Not(E(x, Not(P(x)))), assume),
    (New(x), new),
    (Not(P(x)), assume),
    (E(x, Not(P(x))), Ei, 4),
    (F, contra, 5,2),
    (Not(Not(P(x))), raa, 4,6),
    (P(x), ne, 7),
    (A(x, P(x)), Ai, 3,8),
    (F, contra, 9,1),
    (Not(Not(E(x, Not(P(x))))), raa, 2,10),
    (E(x, Not(P(x))), ne, 11)]

The checker can use different logics; Flip comes with several.  You
can add another logic, or add axioms and derived rules, by writing a
module in Python.  Python is both the object language and the
metalanguage.  Formulas, inference rules, and entire proofs are Python
expressions.  Prover commands are Python functions.  The Python
interpreter itself is the only user interface to the proof checker
application.  (It is not necessary to know much Python to use the
checker.)

Flip was undertaken as a Python programming exercise.  It is not
intended to compete with industrial-strength theorem provers such as
HOL nor with nicely-designed educational provers such as Jape.  That
said, the checker is quite capable of working the examples and
exercises in university-level textbooks on logic for computer science
or mathematics (such as those by Kaye, Huth and Ryan, or Bornat).


More information about the Python-announce-list mailing list