https://github.com/ozekik/mathesis
Python library for computational formal logic, formal semantics, and theorem proving
https://github.com/ozekik/mathesis
first-order-logic formal-logic logic mathematical-logic philosophical-logic philosophy proof propositional-logic prover semantics
Last synced: 6 months ago
JSON representation
Python library for computational formal logic, formal semantics, and theorem proving
- Host: GitHub
- URL: https://github.com/ozekik/mathesis
- Owner: ozekik
- License: mit
- Created: 2023-08-04T21:00:44.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-26T16:10:54.000Z (over 1 year ago)
- Last Synced: 2024-04-27T16:55:59.484Z (over 1 year ago)
- Topics: first-order-logic, formal-logic, logic, mathematical-logic, philosophical-logic, philosophy, proof, propositional-logic, prover, semantics
- Language: Python
- Homepage: https://ozekik.github.io/mathesis/
- Size: 1020 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: docs/contributing.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Mathesis
[](https://pypi.org/project/mathesis/)
[](https://ozekik.github.io/mathesis/)
[](https://pypistats.org/packages/mathesis)[Mathesis](//github.com/ozekik/mathesis) is a human-friendly Python library for computational formal logic (including mathematical, symbolic, philosophical logic), formal semantics, and theorem proving.
It is particularly well-suited for:- Students learning logic and educators teaching it
- Researchers in fields like logic, philosophy, linguistics, computer science, and many others**Documentation:**
## Installation
```bash
pip install mathesis
```## Key features
- Interactive theorem proving for humans (proof assistant)
- Automated reasoning (theorem prover)
- Define models and check validity of inferences in the models
- JupyterLab/Jupyter Notebook support
- Output formulas/proofs in LaTeX
- Customizable ASCII/Unicode syntax (like `A -> B`, `A → B`, `A ⊃ B` for the conditional)## Supported logics
### Propositional logics
| | Truth Table | Tableau | Natural Deduction | Sequent Calculus |
|---:|:---:|:---:|:---:|:---:|
| Classical logic | ✅ | ✅ | ✅ | ✅ |
| Many-valued logics | ✅ | - | - | - |
| Intuitionistic logic | n/a | - | - | ✅ |#### In Progress
- Modal logics
- Fuzzy logics
- Substructural logics
- Epistemic, doxastic, deontic logics
- Temporal logics### First-order logics (quantified, predicate logics)
| | Model | Tableau | Natural Deduction | Sequent Calculus |
|---:|:---:|:---:|:---:|:---:|
| Classical logic | ✅ | ✅ | - | - |#### In Progress
- Many-valued logics
- Modal logics
- Intuitionistic logic
- Fuzzy logics
- Substructural logics
- Higher-order logics## Development status
### Proof theories
- **Tableaux** (semantic tableaux, analytic tableaux)
* [x] Unsigned tableaux
* [x] Signed tableaux
- **Hilbert systems**
* [ ] Hilbert systems
- **Natural deduction**
* [x] Generic natural deduction
* [x] Gentzen-style natural deduction (Output)
* [ ] Fitch-style natural deduction
- **Sequent calculi** (Gentzen-style sequent calculi)
- [x] Two-sided sequent calculi
- [ ] Hilbert systems in sequent calculus
- [ ] Natural deduction in sequent calculus### Semantics
- [x] Truth tables
- [x] Set-theoretic models
- [ ] Possible world semantics (Kripke semantics)
- [ ] Algebraic semantics
- [ ] Game-theoretic semantics
- [ ] Category-theoretic semantics## Internals
- Parsing with [lark](https://github.com/lark-parser/lark)
- Trees with [anytree](https://github.com/c0fec0de/anytree)## Roadmap
- [ ] Add tests
- [ ] Hilbert systems
- [x] Natural deduction
- [ ] Boolean algebra
- [ ] Type theory
- [ ] Metatheorems
- [ ] Output graphical representations of models
- [ ] Support tptp syntax