A Formal Logic framework for a variety of applications.
forseti is available on PyPI.
$ pip install forseti
- Download the source code:
$ git clone [email protected]:OpenReasoning/forseti.git $ python setup.py install
forseti comes with an internal representation of propositional calculus formulas (atomic, not, and, or, implication, and equivalance). It can generate this from a functional representation of any formula. Interally, it holds everything as formula objects, which can take in other formulas as appropriate (Symbols can only hold one string).
An example:
from forseti import parser
from forseti.predicate import Atomic, And
assert parser.parse("and(a, b)") == And(Atomic('a'), Atomic('b'))
Additionally, it also comes with a builtin prover that can validate a propositional calculus argument
from forseti.prover import Prover
prover = Prover()
prover.add_formula("if(A,and(B,C))")
prover.add_formula("iff(C,B)")
prover.add_formula("not(C)")
prover.add_goal("not(A)")
assert_true(prover.run_prover())
- First Order Logic Prover
- Optimizations
These projects use forseti at their core:
Using forseti to implement the following programs/applications
- Automated Theorem Prover (done in forseti core)
- Implement Davis-Putnam Algorithm
- Truth Trees
- Slate / Fitch