Prove that beta-eta equivalent types have the same meaning

This commit is contained in:
Yiyun Liu 2024-12-30 15:52:35 -05:00
parent 86b8043215
commit dd63ebf2e9
2 changed files with 27 additions and 4 deletions

View file

@ -1677,7 +1677,7 @@ Proof. sfirstorder unfold:join. Qed.
Lemma join_refl n (a : Tm n) : join a a. Lemma join_refl n (a : Tm n) : join a a.
Proof. hauto lq:on ctrs:rtc unfold:join. Qed. Proof. hauto lq:on ctrs:rtc unfold:join. Qed.
Lemma join_univ_inj n i j (C : Tm n) : Lemma join_univ_inj n i j :
join (Univ i : Tm n) (Univ j) -> i = j. join (Univ i : Tm n) (Univ j) -> i = j.
Proof. Proof.
sfirstorder use:pars_univ_inj. sfirstorder use:pars_univ_inj.

View file

@ -108,6 +108,17 @@ Proof.
hauto lq:on ctrs:InterpExt use:RPar_substone. hauto lq:on ctrs:InterpExt use:RPar_substone.
Qed. Qed.
Lemma InterpExt_Univ_inv n i I j P
(h : @Univ n j i ;; I P) :
P = I n j /\ j < i.
Proof.
move : h.
move E : (@Univ n j) => T h. move : j E.
elim : T P /h => //.
- hauto l:on.
- hauto lq:on rew:off inv:RPar.R.
Qed.
Lemma InterpExt_Bind_nopf n p i I (A : Tm n) B PA : Lemma InterpExt_Bind_nopf n p i I (A : Tm n) B PA :
A i ;; I PA -> A i ;; I PA ->
(forall a, PA a -> exists PB, subst_Tm (scons a VarTm) B i ;; I PB) -> (forall a, PA a -> exists PB, subst_Tm (scons a VarTm) B i ;; I PB) ->
@ -261,6 +272,18 @@ Proof.
have : join (TBind p A B) (Univ j) by eauto using join_transitive. have : join (TBind p A B) (Univ j) by eauto using join_transitive.
move => ?. exfalso. move => ?. exfalso.
eauto using join_univ_pi_contra. eauto using join_univ_pi_contra.
- admit. - move => j ? B PB /InterpExtInv.
- admit. move => [+ []]. case => //=.
Admitted. + move => p A0 B0 _ [].
move /RPars_join => *.
have ? : join (TBind p A0 B0) (Univ j) by eauto using join_symmetric, join_transitive.
exfalso.
eauto using join_univ_pi_contra.
+ move => m _ [/RPars_join h0 + h1].
have /join_univ_inj {h0 h1} ? : join (Univ j : Tm n) (Univ m) by eauto using join_transitive.
subst.
move /InterpExt_Univ_inv. firstorder.
- move => A A0 PA h.
have /join_symmetric {}h : join A A0 by hauto lq:on ctrs:rtc use:RPar_Par, relations.rtc_once.
eauto using join_transitive.
Qed.