Tiny CoC-based theorem prover with inductive types
Project description
Tinyprove
A small, minimal theorem prover.
pytorch : tinygrad :: lean : tinyprove
Get started:
from parser import parse
from tinyprove import infer, check
from axiom_defs import DEFNS
Parser supports parsing with a context of existing variables specified.
ctx = [("A", parse("Type0"))]
identity = parse("λ x: A -> x", ctx)
Terms can be printed (need to pass context).
print(identity.str(ctx))
Type inference:
identity_ty = infer(identity, ctx)
DEFNS supplies some basic inductive types (False, And, Or, Exists, Nat), plus the classical excluded middle axiom (.em).
identity_ty = infer(identity, ctx, defns=DEFNS)
Since identity doesn't use any of these definitions, the result is the same.
To see how you can prove some basic theorems, check test.py.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tinyprove-0.1.0.tar.gz.
File metadata
- Download URL: tinyprove-0.1.0.tar.gz
- Upload date:
- Size: 15.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70e690e6ea60f928d411f503fef762b34b085a776c91baa1a510e7746b4b1fe4
|
|
| MD5 |
d1d2fbaeadc17996cf6238fadd5f99df
|
|
| BLAKE2b-256 |
066d3b5892c1bf6aec97daae828dc2df04095676c3c127d083ebf67c294ca3c5
|
File details
Details for the file tinyprove-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tinyprove-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46dbd4fbc9e5c648f2b0919bb93520223b4a2bed3ca5c6a83572207d47b11967
|
|
| MD5 |
a26cb138aba98c0c9e8a548ed31776c6
|
|
| BLAKE2b-256 |
4894355b109956232655666dab19bc099daeba088daa293144d0e6c751a23d77
|