Tiny theorem prover with syntax like Lean 4
Project description
TinyLean
Tiny theorem prover in Python, with syntax like Lean 4.
Tour
An identity function in TinyLean:
def id {T: Type} (a: T): T := a
example := id Type
Inductive data types:
inductive Maybe (A: Type) where
| Nothing
| Just (a: A)
open Maybe
inductive N where
| Z
| S (n: N)
open N
inductive Vec (A: Type) (n: N) where
| Nil (n := Z)
| Cons {m: N} (a: A) (v: Vec A m) (n := S m)
open Vec
The typechecker knows if any case is impossible (i.e. dependent pattern matching):
def v0: Vec N Z := Nil
example :=
match v0 with
| Nil => Z
/- Cons is impossible, leaving it here yields errors. -/
So a bottom type eliminator is trivial via DPM:
inductive Weird (n: N) where
| MkWeird (n := Z)
open Weird
/- Impossible to construct a term for type `Weird (S Z)`. -/
example {A: Type} (x: Weird (S Z)): A := nomatch x
License
MIT
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 tinylean-0.7.0.tar.gz.
File metadata
- Download URL: tinylean-0.7.0.tar.gz
- Upload date:
- Size: 21.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3dd660e625158a927645803cee77c15c3d7ec916f50ce2cec073cf5a58e3299f
|
|
| MD5 |
171ffa61643032e76e917ce988d8662e
|
|
| BLAKE2b-256 |
b7d26bbe44460a0d9043a863495e1394da4b3787680fd5fa7756d7835c43a1a9
|
Provenance
The following attestation bundles were made for tinylean-0.7.0.tar.gz:
Publisher:
release.yml on anqurvanillapy/TinyLean
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tinylean-0.7.0.tar.gz -
Subject digest:
3dd660e625158a927645803cee77c15c3d7ec916f50ce2cec073cf5a58e3299f - Sigstore transparency entry: 180392099
- Sigstore integration time:
-
Permalink:
anqurvanillapy/TinyLean@f0086817fe165d56c6e07f4570d231986cda8f3c -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/anqurvanillapy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f0086817fe165d56c6e07f4570d231986cda8f3c -
Trigger Event:
push
-
Statement type:
File details
Details for the file tinylean-0.7.0-py3-none-any.whl.
File metadata
- Download URL: tinylean-0.7.0-py3-none-any.whl
- Upload date:
- Size: 23.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92b60fa7c9775257423be75865ec3ff95cc2b302852c8256283a2dfdaef0a00f
|
|
| MD5 |
e1ab706c002bff717090491bb05a9870
|
|
| BLAKE2b-256 |
d3c52f4f815c83be359c0f43a17d821c162733b454896fdf5023627f72c7b94e
|
Provenance
The following attestation bundles were made for tinylean-0.7.0-py3-none-any.whl:
Publisher:
release.yml on anqurvanillapy/TinyLean
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tinylean-0.7.0-py3-none-any.whl -
Subject digest:
92b60fa7c9775257423be75865ec3ff95cc2b302852c8256283a2dfdaef0a00f - Sigstore transparency entry: 180392101
- Sigstore integration time:
-
Permalink:
anqurvanillapy/TinyLean@f0086817fe165d56c6e07f4570d231986cda8f3c -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/anqurvanillapy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f0086817fe165d56c6e07f4570d231986cda8f3c -
Trigger Event:
push
-
Statement type: