Created
March 20, 2019 16:54
-
-
Save VictorTaelin/a55870c2721d855a3ca96dc249b78ddb to your computer and use it in GitHub Desktop.
ESCoC + EAL parigot nat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Typ | |
: {T : (Typ T)} Type | |
= [T] {self : (T self)} Type | |
Rat | |
: (Typ Rat) | |
= [self] | |
{-Prop : {self : (Rat self)} {fold : (Prop self fold)} Type} | |
{succ : !succ {-pred : (Rat pred)} {fold : (Prop pred fold)} (Prop (Rat.succ pred) (succ -pred fold))} | |
{zero : !zero (Prop Rat.zero zero)} | |
!here (Prop self here) | |
Rat.succ | |
: {pred : (Rat pred)} (Rat (Rat.succ pred)) | |
= [pred] [-Prop] [succ] [zero] [S = succ] [Z = zero] | |
[F = (pred -Prop <succ>S <zero>Z)] | |
<here : (Prop (Rat.succ pred) here)> | |
(S -pred F) | |
Rat.zero | |
: (Rat Rat.zero) | |
= [-Prop] [succ] [zero] [S = succ] [Z = zero] | |
<zero : (Prop Rat.zero zero)> | |
Z | |
Cat | |
: Type | |
= !self (Rat self) | |
Cat.zero | |
: Cat | |
= <self : (Rat self)> | |
Rat.zero | |
Cat.succ | |
: {n : Cat} Cat | |
= [n] [N = n] | |
<self : (Rat self)> | |
(Rat.succ N) | |
_ = (Cat.succ (Cat.succ Cat.zero)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
checker