Python API
This document contains information for scripting in Python. The web interface is available here.
Installation
Docker
To run the Docker image from Docker Hub:
Run the command:
docker run -p 8080:8080 owings1/pytableaux:latestAccess the web interface at http://localhost:8080
Git
To install from git source, follow these steps. Note that Python 3.11 or later is required.
Download the source, for example:
git clone https://github.com/owings1/pytableaux cd pytableauxInstall dependencies:
pipenv installLaunch the web interface, for example:
pipenv install --categories="web-packages" python3 -m pytableaux.webThen access http://localhost:8080
Running
The following is an example for building a proof in for Modus Ponens:
from pytableaux.lang import Parser
from pytableaux.proof import Tableau, TabWriter
# Create an argument
parser = Parser(notation='polish')
argument = parser.argument('b', ('Uab', 'a'))
# Build a tableau for the logic CPL
tableau = Tableau('CPL', argument)
tableau.build()
# Output the proof
writer = TabWriter(format='latex', notation='standard')
content = writer(tableau)
print(content)
The full API docs are available here.
Development
For development information, refer to the README on GitHub
Contributing
To contribute in any way (documentation, code, testing, suggestions, etc.), contact me at doug@dougowings.net. You can also submit issues and merge requests on GitHub.