Skip to main content

F L i P : Logical Framework in Python

Flip is a logical framework written in Python. 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. Here is some output from the checker, generated from a Python proof script:

Kaye ex. 9.12, ~Ax.P(x) |- Ex.~P(x)  (0)  Comment
~Ax.P(x)                  (1)  Given
|~Ex.~P(x)                (2)  Assumption
||Let x be arbitrary      (3)  New variable for subproof
|||~P(x)                  (4)  Assumption
|||Ex.~P(x)               (5)  E-Introduction (4)
|||F                      (6)  Contradiction (5) (2)
||~~P(x)                  (7)  Reductio Ad Absurdum (4) (6)
||P(x)                    (8)  Not-Elimination (7)
|Ax.P(x)                  (9)  A-Introduction (3) (8)
|F                       (10)  Contradiction (9) (1)
~~Ex.~P(x)               (11)  Reductio Ad Absurdum (2) (10)
Ex.~P(x)                 (12)  Not-Elimination (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 Kaye, Huth and Ryan, and Bornat.

Metadata

Release files for FLiP 1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distributions (sdists)

Source distribution for FLiP 1.2
File Size Uploaded
FLiP-1.2.zip 144.2 kB Details
FLiP-1.2.tar.gz 93.3 kB Details

Release files / FLiP-1.2.zip

Download URL FLiP-1.2.zip
Size 144.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f7d509d5dad2ff876182f7d9653ab30d078f544fece8db5cfd734ce04f97e671
BLAKE2b-256 checksum
How to use checksums
db4ad97c4531c8ab44ea69a76798158079266432c946c26a59cddd939584dd89
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / FLiP-1.2.tar.gz

Download URL FLiP-1.2.tar.gz
Size 93.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b2061c550ca0d51d759800788542dcfa73f2421d42b6ae458702ef3cc55c141c
BLAKE2b-256 checksum
How to use checksums
9f1e8048c9b55659576e745c830be73f1087f22a8df70b4a4768675bbe016bd8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.2 This release

2 release files

1.1

2 release files

1.0

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page