ND-Prover
A Fitch-style natural deduction proof generator and checker, implemented in Python.
It is based on the natural deduction system presented in forall x: Calgary and builds on Kevin Klement's proof checker.
Try ND-Prover online at ndprover.org.
Supported Logics
- Propositional logic
- First-order logic
- Modal logic (K, T, S4, S5)
- First-order modal logic
Features
- Support for both classical and intuitionistic logics
- Argument validity checking
- Automated proof generation for valid arguments
- Countermodel generation for invalid arguments
- Verification of user-provided proofs
- Step-by-step hints for completing partial proofs
- Plain-text and LaTeX proof export
Package Installation
ND-Prover can be installed using pip:
pip install nd-prover
or by directly cloning the git repository:
git clone https://github.com/daniyal1249/nd-prover.git
and running the following in the cloned repo:
pip install .
Package Example Usage
$ nd-prover
Select logic (TFL, FOL, K, T, S4, S5, QK, QT, QS4, QS5): TFL
Enter premises (separated by "," or ";"), or "NA" if none: P -> Q, P
Enter conclusion: Q
1 │ P → Q PR
│
2 │ P PR
├───
1 - Add a new line
2 - Begin a new subproof
3 - End the current subproof
4 - End the current subproof and begin a new one
5 - Delete the last line
Select edit: 1
Enter line: Q ; ->E, 1,2
1 │ P → Q PR
│
2 │ P PR
├───
3 │ Q →E, 1,2
Proof complete! 🎉
A proof of the law of excluded middle (LEM) using ND-Prover:
Proof of ∴ P ∨ ¬P
1 │ │ ¬(P ∨ ¬P) AS
│ ├───────────
2 │ │ │ P AS
│ │ ├───
3 │ │ │ P ∨ ¬P ∨I, 2
│ │ │
4 │ │ │ ⊥ ¬E, 1,3
│ │
5 │ │ ¬P ¬I, 2-4
│ │
6 │ │ P ∨ ¬P ∨I, 5
│ │
7 │ │ ⊥ ¬E, 1,6
│
8 │ P ∨ ¬P IP, 1-7
Proof complete! 🎉
A proof that identity is symmetric:
Proof of ∴ ∀x∀y(x = y → y = x)
1 │ │ a = b AS
│ ├───────
2 │ │ a = a =I
│ │
3 │ │ b = a =E, 1,2
│
4 │ a = b → b = a →I, 1-3
│
5 │ ∀y(a = y → y = a) ∀I, 4
│
6 │ ∀x∀y(x = y → y = x) ∀I, 5
Proof complete! 🎉
A proof in modal logic S5:
Proof of ◇☐A ∴ ☐A
1 │ ◇☐A PR
├─────
2 │ ¬☐¬☐A Def◇, 1
│
3 │ │ ¬☐A AS
│ ├─────
4 │ │ │ ☐ AS
│ │ ├───
5 │ │ │ ¬☐A R5, 3
│ │
6 │ │ ☐¬☐A ☐I, 4-5
│ │
7 │ │ ⊥ ¬E, 2,6
│
8 │ ☐A IP, 3-7
Proof complete! 🎉
Metadata
Release files for nd-prover 3.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nd_prover-3.2.0.tar.gz | 39.6 kB | Without provenance | Details for nd_prover-3.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nd_prover-3.2.0-py3-none-any.whl | Python 3 | none | any | Details for nd_prover-3.2.0-py3-none-any.whl |
Total release size: 75.7 kB
Release files / nd_prover-3.2.0.tar.gz
| Download URL | nd_prover-3.2.0.tar.gz |
|---|---|
| Size | 39.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f154c163656b116cf684db0a42089cb75c0ce932de1db36c9c99e7ab791dbe25
|
|
BLAKE2b-256 checksum How to use checksums |
03d39097972a7aebbda4bab8e73e019c65f80836f5a9e0c4081587492aa2cb8c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|
Release files / nd_prover-3.2.0-py3-none-any.whl
| Download URL | nd_prover-3.2.0-py3-none-any.whl |
|---|---|
| Size | 36.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7c650dfaf75dcaaab30aeb6a0749d7ae7058bb2c69f41c0b55c9231bee60c125
|
|
BLAKE2b-256 checksum How to use checksums |
1ffb4b63d22d90429bd32364f9a2a0f901a4d5beaf92d4cde6d3b6875e562724
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|
Security for nd-prover 3.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.