Make progress on wt_unique

This commit is contained in:
Yiyun Liu 2025-04-03 23:20:49 -04:00
parent fbbce90304
commit 5eb1f9df0b
6 changed files with 145 additions and 31 deletions

View file

@ -10,7 +10,7 @@ Module Compile.
match a with
| TBind p A B => PPair (PPair (PConst (compileTag p)) (F A)) (PAbs (F B))
| Univ i => PConst (3 + i)
| Abs a => PAbs (F a)
| Abs _ a => PAbs (F a)
| App a b => PApp (F a) (F b)
| VarTm i => VarPTm i
| Pair a b => PPair (F a) (F b)
@ -75,6 +75,17 @@ Module Join.
tauto.
Qed.
Lemma BindCong p A0 A1 B0 B1 :
R A0 A1 ->
R B0 B1 ->
R (TBind p A0 B0) (TBind p A1 B1).
Proof.
move => h0 h1. rewrite /R /=.
apply join_pair_inj.
split. apply join_pair_inj. split. apply join_refl. done.
by apply Join.AbsCong.
Qed.
Lemma UnivInj i j : R (Univ i : Tm) (Univ j) -> i = j.
Proof. hauto l:on use:join_const_inj. Qed.