Compare commits

..

3 commits

Author SHA1 Message Date
Yiyun Liu
398a18d770 Finish renaming 2025-01-24 14:58:35 -07:00
Yiyun Liu
255bd4acbf Rename the term constructors 2025-01-24 14:52:35 -07:00
1f7460fd11 Add new syntax for booleans 2025-01-20 20:42:40 -05:00
5 changed files with 1448 additions and 769 deletions

View file

@ -1,17 +1,29 @@
nat : Type nat : Type
PTm(VarPTm) : Type
Tm(VarTm) : Type Tm(VarTm) : Type
PTag : Type PTag : Type
TTag : Type TTag : Type
bool : Type
PL : PTag PL : PTag
PR : PTag PR : PTag
TPi : TTag TPi : TTag
TSig : TTag TSig : TTag
PAbs : (bind PTm in PTm) -> PTm
PApp : PTm -> PTm -> PTm
PPair : PTm -> PTm -> PTm
PProj : PTag -> PTm -> PTm
PConst : TTag -> PTm
PUniv : nat -> PTm
PBot : PTm
Abs : (bind Tm in Tm) -> Tm Abs : (bind Tm in Tm) -> Tm
App : Tm -> Tm -> Tm App : Tm -> Tm -> Tm
Pair : Tm -> Tm -> Tm Pair : Tm -> Tm -> Tm
Proj : PTag -> Tm -> Tm Proj : PTag -> Tm -> Tm
TBind : TTag -> Tm -> (bind Tm in Tm) -> Tm TBind : TTag -> Tm -> (bind Tm in Tm) -> Tm
Const : TTag -> Tm
Univ : nat -> Tm Univ : nat -> Tm
Bot : Tm BVal : bool -> Tm
Bool : Tm
If : Tm -> Tm -> Tm -> Tm

File diff suppressed because it is too large Load diff

View file

@ -15,11 +15,14 @@ Module Compile.
| Pair a b => Pair (F a) (F b) | Pair a b => Pair (F a) (F b)
| Proj t a => Proj t (F a) | Proj t a => Proj t (F a)
| Bot => Bot | Bot => Bot
| If a b c => App (App (F a) (F b)) (F c)
| BVal b => if b then (Abs (Abs (VarTm (shift var_zero)))) else (Abs (Abs (VarTm var_zero)))
| Bool => Bool
end. end.
Lemma renaming n m (a : Tm n) (ξ : fin n -> fin m) : Lemma renaming n m (a : Tm n) (ξ : fin n -> fin m) :
F (ren_Tm ξ a)= ren_Tm ξ (F a). F (ren_Tm ξ a)= ren_Tm ξ (F a).
Proof. move : m ξ. elim : n / a => //=; scongruence. Qed. Proof. move : m ξ. elim : n / a => //=; hauto lq:on. Qed.
#[local]Hint Rewrite Compile.renaming : compile. #[local]Hint Rewrite Compile.renaming : compile.
@ -33,6 +36,8 @@ Module Compile.
- hauto lq:on rew:off. - hauto lq:on rew:off.
- hauto lq:on. - hauto lq:on.
- hauto lq:on inv:option rew:db:compile unfold:funcomp. - hauto lq:on inv:option rew:db:compile unfold:funcomp.
- hauto lq:on rew:off.
- hauto lq:on rew:off.
Qed. Qed.
Lemma substing n b (a : Tm (S n)) : Lemma substing n b (a : Tm (S n)) :

View file

@ -18,3 +18,25 @@ a0 >> a1
| | | |
v v v v
b0 >> b1 b0 >> b1
prov x (x, x)
prov x b
a => b
prov x a
prov y b
prov x c
prov y c
extract c = x
extract c = y
prov x b
pr

File diff suppressed because it is too large Load diff