Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/plt-amy/dep
A very small implementation of the Calculus of Constructions for experimentation purposes
https://github.com/plt-amy/dep
type-theory
Last synced: 3 months ago
JSON representation
A very small implementation of the Calculus of Constructions for experimentation purposes
- Host: GitHub
- URL: https://github.com/plt-amy/dep
- Owner: plt-amy
- License: bsd-3-clause
- Created: 2018-06-17T23:08:35.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-06-17T23:16:53.000Z (over 6 years ago)
- Last Synced: 2024-05-01T16:34:57.365Z (7 months ago)
- Topics: type-theory
- Language: Haskell
- Size: 8.79 KB
- Stars: 12
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog.md
- License: LICENSE
Awesome Lists containing this project
README
dep
===A small implementation of the Calculus of Constructions, a pure type
system (PTS) corresponding to the λΠ corner of Barendgret's
lambda cube. That is, it has:- terms depending on terms (functions)
- types depending on types (type operators)
- types depending on terms (dependent functions)
- values depending on types (polymorphism)While simply-typed languages have distinct "type level" and "value
level" grammars, the CoC does away with the stratification by merging
these levels into a single language, expressed by the following Haskell
data type.```haskell
data Term
= Var String -- x
| Lam String Term Term -- \(x : t). e
| Pi String Term Term -- forall (x : k). t
| Term :$ Term -- f x
| Term ::: Term -- e : t
| Type Int -- type i
deriving (Eq, Ord)
```