Skip to content

Commit ac5651a

Browse files
authored
Merge pull request #1154 from MetaCoq/cherry-picks-on-9.0
Cherry picks on 9.0
2 parents 917ec73 + 1923084 commit ac5651a

15 files changed

+133
-71
lines changed

erasure/theories/EArities.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ Proof.
858858
eapply PCUICSpine.inversion_it_mkProd_or_LetIn in ty; eauto.
859859
epose proof (typing_spine_proofs _ _ [] _ _ _ [] _ _ wfΣ ty).
860860
forward H0 by constructor. eapply has_sort_isType; eauto.
861-
simpl. now eapply has_sort_isType. eapply PCUICConversion.ws_cumul_pb_eq_le_gen, PCUICSR.wt_cumul_pb_refl; eauto.
861+
simpl. now eapply has_sort_isType. eapply ws_cumul_eq_pb, PCUICSR.wt_cumul_pb_refl; eauto.
862862
destruct H0 as [_ sorts].
863863
specialize (sorts _ _ decli c) as [sorts sorts'].
864864
forward sorts' by constructor.

pcuic/theories/PCUICAlpha.v

+2-2
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ Section Alpha.
338338
eapply eq_term_mkApps.
339339
- eapply eq_term_upto_univ_lift.
340340
rewrite /ptm /ptm'.
341-
eapply eq_term_upto_univ_it_mkLambda_or_LetIn. tc.
341+
eapply eq_term_upto_univ_it_mkLambda_or_LetIn; tc.
342342
eapply eq_context_upto_empty_impl; tea.
343343
eapply eq_term_upto_univ_empty_impl; tea; tc.
344344
- eapply All2_app.
@@ -425,7 +425,7 @@ Section Alpha.
425425
2:{ eapply All2_refl. reflexivity. }
426426
len. eapply eq_term_upto_univ_lift.
427427
eapply eq_term_upto_univ_impl; revgoals.
428-
eapply eq_term_upto_univ_it_mkLambda_or_LetIn; tea.
428+
eapply eq_term_upto_univ_it_mkLambda_or_LetIn; tea. 1,2: tc.
429429
reflexivity. lia. all:tc.
430430
Qed.
431431

pcuic/theories/PCUICConfluence.v

+26-5
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ Proof.
834834
].
835835
(* tLambda and tProd *)
836836
idtac.
837-
10,15:solve [
837+
15:solve [
838838
dependent destruction e ;
839839
edestruct (IHh pb) as [? [? ?]] ; [ .. | tea | ] ; eauto;
840840
clear h;
@@ -857,16 +857,38 @@ Proof.
857857
eapply eq_term_upto_univ_leq ; eauto
858858
]
859859
].
860+
10:solve [
861+
dependent destruction e ;
862+
edestruct (IHh Conv) as [? [? ?]] ; [ .. | tea | ] ; tc ; eauto;
863+
clear h;
864+
lazymatch goal with
865+
| r : red1 _ (?Γ,, vass ?na ?A) ?u ?v,
866+
e : eq_term_upto_univ_napp _ _ _ _ _ ?A ?B
867+
|- _ =>
868+
let hh := fresh "hh" in
869+
eapply red1_eq_context_upto_l in r as hh ; revgoals;
870+
[ constructor ; [
871+
eapply (eq_context_upto_refl _ _ _ Conv); eauto ; tc
872+
| constructor; tea
873+
]
874+
| tc ..];
875+
destruct hh as [? [? ?]]
876+
end;
877+
eexists ; split; [ solve [ econstructor ; eauto ]
878+
| constructor ; eauto ;
879+
eapply eq_term_upto_univ_trans ; eauto ; tc
880+
]
881+
].
860882
- dependent destruction e. dependent destruction e1.
861883
eexists. split.
862884
+ constructor.
863885
+ eapply eq_term_upto_univ_substs ; eauto.
864-
eapply leq_term_leq_term_napp; eauto.
886+
eapply eq_term_upto_univ_leq; tea; eauto with arith.
865887
- dependent destruction e.
866888
eexists. split.
867889
+ constructor.
868890
+ eapply eq_term_upto_univ_substs ; try assumption.
869-
eapply leq_term_leq_term_napp; eauto.
891+
eapply eq_term_upto_univ_leq; tea; eauto with arith.
870892
auto.
871893
- dependent destruction e.
872894
eexists. split.
@@ -990,7 +1012,7 @@ Proof.
9901012
+ eapply eq_term_upto_univ_leq ; eauto.
9911013
eapply eq_term_eq_term_napp; auto.
9921014
- dependent destruction e.
993-
edestruct IHh as [? [? ?]] ; [ .. | eassumption | ] ; eauto.
1015+
edestruct IHh as [? [? ?]] ; [ .. | eassumption | ] ; tc ; eauto.
9941016
clear h.
9951017
lazymatch goal with
9961018
| r : red1 _ (?Γ,, vdef ?na ?a ?A) ?u ?v,
@@ -1010,7 +1032,6 @@ Proof.
10101032
+ eapply letin_red_body ; eauto.
10111033
+ constructor ; eauto.
10121034
eapply eq_term_upto_univ_trans ; eauto ; tc.
1013-
eapply eq_term_upto_univ_leq ; eauto.
10141035
- dependent destruction e.
10151036
destruct e as [? [? [? ?]]].
10161037
eapply OnOne2_prod_inv in X as [_ X].

pcuic/theories/PCUICConversion.v

+23-29
Original file line numberDiff line numberDiff line change
@@ -2684,22 +2684,14 @@ Section ConvRedConv.
26842684
Σ ;;; Γ ⊢ tCoFix mfix idx = tCoFix mfix' idx.
26852685
Proof using wfΣ. eapply (ws_cumul_pb_fix_or_cofix (b:=false)). Qed.
26862686

2687-
Lemma ws_cumul_pb_eq_le_gen {pb Γ T U} :
2688-
Σ ;;; Γ ⊢ T = U ->
2689-
Σ ;;; Γ ⊢ T ≤[pb] U.
2690-
Proof using Type.
2691-
destruct pb => //.
2692-
eapply ws_cumul_pb_eq_le.
2693-
Qed.
2694-
26952687
Lemma ws_cumul_pb_Lambda_l {Γ na A b na' A' pb} :
26962688
eq_binder_annot na na' ->
26972689
is_open_term (Γ ,, vass na A) b ->
26982690
Σ ;;; Γ ⊢ A = A' ->
26992691
Σ ;;; Γ ⊢ tLambda na A b ≤[pb] tLambda na' A' b.
27002692
Proof using wfΣ.
27012693
intros hna hb h.
2702-
eapply ws_cumul_pb_eq_le_gen.
2694+
eapply ws_cumul_eq_pb.
27032695
eapply into_ws_cumul_pb.
27042696
{ clear -h hna; induction h.
27052697
- constructor; constructor; auto; reflexivity.
@@ -2710,7 +2702,7 @@ Section ConvRedConv.
27102702
Qed.
27112703

27122704
Lemma ws_cumul_pb_Lambda_r {pb Γ na A b b'} :
2713-
Σ ;;; Γ,, vass na A ⊢ b ≤[pb] b' ->
2705+
Σ ;;; Γ,, vass na A ⊢ b ≤[Conv] b' ->
27142706
Σ ;;; Γ ⊢ tLambda na A b ≤[pb] tLambda na A b'.
27152707
Proof using wfΣ.
27162708
intros h.
@@ -2736,9 +2728,10 @@ Section ConvRedConv.
27362728
rewrite /on_free_vars_decl /test_decl => /andP[] /= onty ont onu onu'.
27372729
eapply into_ws_cumul_pb => //.
27382730
{ clear -h. induction h.
2739-
- destruct pb;
2740-
eapply cumul_refl; constructor.
2741-
all: try reflexivity; auto.
2731+
- eapply cumul_red_l; pcuic.
2732+
eapply cumul_red_r; [|pcuic].
2733+
eapply cumul_refl.
2734+
apply eq_term_upto_univ_subst; trea; tc.
27422735
- destruct pb;
27432736
eapply cumul_red_l; tea; pcuic.
27442737
- destruct pb;
@@ -2748,12 +2741,12 @@ Section ConvRedConv.
27482741
Qed.
27492742

27502743
Lemma ws_cumul_pb_it_mkLambda_or_LetIn_codom {Δ Γ u v pb} :
2751-
Σ ;;; (Δ ,,, Γ) ⊢ u ≤[pb] v ->
2744+
Σ ;;; (Δ ,,, Γ) ⊢ u ≤[Conv] v ->
27522745
Σ ;;; Δ ⊢ it_mkLambda_or_LetIn Γ u ≤[pb] it_mkLambda_or_LetIn Γ v.
27532746
Proof using wfΣ.
27542747
intros h. revert Δ u v h.
27552748
induction Γ as [| [na [b|] A] Γ ih ] ; intros Δ u v h.
2756-
- assumption.
2749+
- by apply ws_cumul_eq_pb.
27572750
- simpl. cbn. eapply ih.
27582751
eapply ws_cumul_pb_LetIn_bo. assumption.
27592752
- simpl. cbn. eapply ih.
@@ -2791,7 +2784,7 @@ Section ConvRedConv.
27912784
Lemma ws_cumul_pb_Lambda {pb Γ na1 na2 A1 A2 t1 t2} :
27922785
eq_binder_annot na1 na2 ->
27932786
Σ ;;; Γ ⊢ A1 = A2 ->
2794-
Σ ;;; Γ ,, vass na1 A1 ⊢ t1 ≤[pb] t2 ->
2787+
Σ ;;; Γ ,, vass na1 A1 ⊢ t1 ≤[Conv] t2 ->
27952788
Σ ;;; Γ ⊢ tLambda na1 A1 t1 ≤[pb] tLambda na2 A2 t2.
27962789
Proof using wfΣ.
27972790
intros eqna X.
@@ -2805,7 +2798,7 @@ Section ConvRedConv.
28052798
Lemma conv_cum_Lambda leq Γ na1 na2 A1 A2 t1 t2 :
28062799
eq_binder_annot na1 na2 ->
28072800
Σ ;;; Γ ⊢ A1 = A2 ->
2808-
sq_ws_cumul_pb leq Σ (Γ ,, vass na1 A1) t1 t2 ->
2801+
sq_ws_cumul_pb Conv Σ (Γ ,, vass na1 A1) t1 t2 ->
28092802
sq_ws_cumul_pb leq Σ Γ (tLambda na1 A1 t1) (tLambda na2 A2 t2).
28102803
Proof using wfΣ.
28112804
intros eqna X []; sq. now apply ws_cumul_pb_Lambda.
@@ -2857,7 +2850,7 @@ Section ConvRedConv.
28572850
intros hna ont ona onu.
28582851
etransitivity.
28592852
{ eapply ws_cumul_pb_LetIn_bo; tea. }
2860-
eapply ws_cumul_pb_eq_le_gen.
2853+
eapply ws_cumul_eq_pb.
28612854
etransitivity.
28622855
{ eapply ws_cumul_pb_LetIn_ty; tea; eauto with fvs. }
28632856
eapply ws_cumul_pb_LetIn_tm; tea; eauto with fvs.
@@ -2866,12 +2859,13 @@ Section ConvRedConv.
28662859

28672860
Lemma ws_cumul_pb_it_mkLambda_or_LetIn {pb Γ Δ1 Δ2 t1 t2} :
28682861
Σ ⊢ Γ ,,, Δ1 = Γ ,,, Δ2 ->
2869-
Σ ;;; Γ ,,, Δ1 ⊢ t1 ≤[pb] t2 ->
2862+
Σ ;;; Γ ,,, Δ1 ⊢ t1 = t2 ->
28702863
Σ ;;; Γ ⊢ it_mkLambda_or_LetIn Δ1 t1 ≤[pb] it_mkLambda_or_LetIn Δ2 t2.
28712864
Proof using wfΣ.
28722865
induction Δ1 in Δ2, t1, t2 |- *; intros X Y.
28732866
- apply All2_fold_length in X.
28742867
destruct Δ2; cbn in *; [trivial|].
2868+
1: by apply ws_cumul_eq_pb.
28752869
rewrite length_app in X; lia.
28762870
- apply All2_fold_length in X as X'.
28772871
destruct Δ2 as [|c Δ2]; simpl in *; [rewrite length_app in X'; lia|].
@@ -2916,7 +2910,7 @@ Section ConvRedConv.
29162910
Lemma ws_cumul_pb_Lambda_inv :
29172911
forall pb Γ na1 na2 A1 A2 b1 b2,
29182912
Σ ;;; Γ ⊢ tLambda na1 A1 b1 ≤[pb] tLambda na2 A2 b2 ->
2919-
[× eq_binder_annot na1 na2, Σ ;;; Γ ⊢ A1 = A2 & Σ ;;; Γ ,, vass na1 A1 ⊢ b1 ≤[pb] b2].
2913+
[× eq_binder_annot na1 na2, Σ ;;; Γ ⊢ A1 = A2 & Σ ;;; Γ ,, vass na1 A1 ⊢ b1 = b2].
29202914
Proof using wfΣ.
29212915
intros *.
29222916
move/ws_cumul_pb_red; intros (v & v' & [redv redv' eq]).
@@ -2951,7 +2945,7 @@ Section ConvRedConv.
29512945
Lemma Lambda_conv_cum_inv :
29522946
forall leq Γ na1 na2 A1 A2 b1 b2,
29532947
sq_ws_cumul_pb leq Σ Γ (tLambda na1 A1 b1) (tLambda na2 A2 b2) ->
2954-
eq_binder_annot na1 na2 /\ ∥ Σ ;;; Γ ⊢ A1 = A2 ∥ /\ sq_ws_cumul_pb leq Σ (Γ ,, vass na1 A1) b1 b2.
2948+
eq_binder_annot na1 na2 /\ ∥ Σ ;;; Γ ⊢ A1 = A2 ∥ /\ sq_ws_cumul_pb Conv Σ (Γ ,, vass na1 A1) b1 b2.
29552949
Proof using wfΣ.
29562950
intros * []. eapply ws_cumul_pb_Lambda_inv in X as [].
29572951
intuition auto. all:sq; auto.
@@ -3257,7 +3251,7 @@ Section ConvSubst.
32573251
move: clctx. rewrite on_free_vars_ctx_app !app_context_length H => /andP[] //. }
32583252
etransitivity.
32593253
* eapply untyped_substitution_ws_cumul_pb; tea. fvs.
3260-
* eapply ws_cumul_pb_eq_le_gen.
3254+
* eapply ws_cumul_eq_pb.
32613255
eapply (untyped_substitution_ws_cumul_pb_subst_conv (Δ := Γ0) (Δ' := Γ1)); tea; eauto.
32623256
Qed.
32633257

@@ -3557,7 +3551,7 @@ Qed.
35573551

35583552
Lemma ws_cumul_pb_rel_it_mkLambda_or_LetIn {cf pb Σ} {wfΣ : wf Σ} (Δ Γ Γ' : context) (B B' : term) :
35593553
ws_cumul_ctx_pb_rel Conv Σ Δ Γ Γ' ->
3560-
Σ ;;; Δ ,,, Γ ⊢ B ≤[pb] B' ->
3554+
Σ ;;; Δ ,,, Γ ⊢ B = B' ->
35613555
Σ ;;; Δ ⊢ it_mkLambda_or_LetIn Γ B ≤[pb] it_mkLambda_or_LetIn Γ' B'.
35623556
Proof.
35633557
move/ws_cumul_ctx_pb_rel_app => hc hb.
@@ -3687,7 +3681,7 @@ Section CumulSubst.
36873681
Σ ;;; Γ ,,, subst_context s 0 Γ' ⊢ subst s #|Γ'| b ≤[pb] subst s' #|Γ'| b.
36883682
Proof using wfΣ.
36893683
move=> cl cl' clb eqsub subs subs'.
3690-
eapply ws_cumul_pb_eq_le_gen.
3684+
eapply ws_cumul_eq_pb.
36913685
eapply substitution_ws_cumul_pb_subst_conv; tea; eauto with pcuic.
36923686
Qed.
36933687

@@ -3957,7 +3951,7 @@ Proof.
39573951
eapply (ws_cumul_pb_refl' (exist Γ _) (exist t _)) end.
39583952
all: intros Γ pb; revert Γ.
39593953
- intros; etransitivity; eauto.
3960-
- intros. apply ws_cumul_pb_eq_le_gen. apply symmetry.
3954+
- intros. apply ws_cumul_eq_pb. apply symmetry.
39613955
eauto.
39623956
- intros Γ t; intros. unshelve eapply (ws_cumul_pb_refl' (exist Γ _) (exist t _)); eauto.
39633957
- intros Γ ev args args' Hargsargs' Hargsargs'_dep HΓ Hargs Hargs'. cbn in *. eapply ws_cumul_pb_Evar; eauto.
@@ -3979,7 +3973,7 @@ Proof.
39793973
- intros Γ na na' t t' ty ty' u u' Hna _ Heqtt' _ Heqtyty' _ Hequu' HΓ HM HN.
39803974
cbn in *. apply andb_andI in HM; apply andb_andI in HN; destruct HM as [Ht Htyu]; destruct HN as [Ht' Htyu'].
39813975
apply andb_andI in Htyu; apply andb_andI in Htyu'; destruct Htyu as [Hty Hu]; destruct Htyu' as [Hty' Hu'].
3982-
eapply ws_cumul_pb_LetIn; eauto. eapply Hequu'; eauto.
3976+
eapply ws_cumul_pb_LetIn; eauto. apply ws_cumul_eq_pb. eapply Hequu'; eauto.
39833977
* change (is_closed_context (Γ,, vdef na t ty)). rewrite on_free_vars_ctx_snoc. apply andb_and. split; eauto.
39843978
rewrite /on_free_vars_decl /test_decl. apply andb_and. split; eauto.
39853979
* rewrite shiftnP_S; eauto.
@@ -3989,7 +3983,7 @@ Proof.
39893983
apply andb_andI in H; apply andb_andI in H'; destruct H as [Hreturn H]; destruct H' as [Hreturn' H'].
39903984
apply andb_andI in H; apply andb_andI in H'; destruct H as [Hcontext H]; destruct H' as [Hcontext' H'].
39913985
apply andb_andI in H; apply andb_andI in H'; destruct H as [Hc Hbrs]; destruct H' as [Hc' Hbrs'].
3992-
eapply ws_cumul_pb_eq_le_gen. eapply ws_cumul_pb_Case; eauto.
3986+
eapply ws_cumul_eq_pb. eapply ws_cumul_pb_Case; eauto.
39933987
* rewrite is_open_case_split. repeat (apply andb_and; split); eauto.
39943988
* rewrite is_open_case_split. repeat (apply andb_and; split); eauto.
39953989
* unfold cumul_predicate in Hpp'. unfold ws_cumul_pb_predicate. destruct Hpp' as [Hpp' [Hinst [Hpcon Hpret]]].
@@ -4018,7 +4012,7 @@ Proof.
40184012
rewrite <- length_app in *. tea.
40194013
- intros; eapply ws_cumul_pb_Proj_c; eauto.
40204014
- intros Γ mfix mfix' idx Hmfixmfix' Hmfixmfix'_dep HΓ H H'. cbn in *.
4021-
eapply ws_cumul_pb_eq_le_gen. eapply ws_cumul_pb_Fix; eauto. repeat toAll.
4015+
eapply ws_cumul_eq_pb. eapply ws_cumul_pb_Fix; eauto. repeat toAll.
40224016
eapply All2_impl. 1: tea. cbn; intros; destruct_head'_prod.
40234017
pose proof (Hfix := All2_length ltac:(eassumption)).
40244018
unfold test_def in *; repeat toProp; destruct_head'_and.
@@ -4028,7 +4022,7 @@ Proof.
40284022
* rewrite -> shiftnP_add, <- fix_context_length, <- length_app in *; tea.
40294023
* rewrite -> shiftnP_add, <- Hfix, <- fix_context_length, <- length_app in *; tea.
40304024
- intros Γ mfix mfix' idx Hmfixmfix' Hmfixmfix'_dep HΓ H H'. cbn in *.
4031-
eapply ws_cumul_pb_eq_le_gen. eapply ws_cumul_pb_CoFix; eauto. repeat toAll.
4025+
eapply ws_cumul_eq_pb. eapply ws_cumul_pb_CoFix; eauto. repeat toAll.
40324026
eapply All2_impl. 1: tea. pose proof (Hfix := All2_length ltac:(eassumption)); cbn; intros. destruct_head'_prod.
40334027
unfold test_def in *.
40344028
repeat toProp; destruct_head'_and.

pcuic/theories/PCUICCumulativitySpec.v

+4-4
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ Inductive cumulSpec0 {cf : checker_flags} (Σ : global_env_ext) Γ (pb : conv_pb
115115
| cumul_Lambda : forall na na' ty ty' t t',
116116
eq_binder_annot na na' ->
117117
Σ ;;; Γ ⊢ ty ≤s[Conv] ty' ->
118-
Σ ;;; Γ ,, vass na ty ⊢ t ≤s[pb] t' ->
118+
Σ ;;; Γ ,, vass na ty ⊢ t ≤s[Conv] t' ->
119119
Σ ;;; Γ ⊢ tLambda na ty t ≤s[pb] tLambda na' ty' t'
120120

121121
| cumul_Prod : forall na na' a a' b b',
@@ -128,7 +128,7 @@ Inductive cumulSpec0 {cf : checker_flags} (Σ : global_env_ext) Γ (pb : conv_pb
128128
eq_binder_annot na na' ->
129129
Σ ;;; Γ ⊢ t ≤s[Conv] t' ->
130130
Σ ;;; Γ ⊢ ty ≤s[Conv] ty' ->
131-
Σ ;;; Γ ,, vdef na t ty ⊢ u ≤s[pb] u' ->
131+
Σ ;;; Γ ,, vdef na t ty ⊢ u ≤s[Conv] u' ->
132132
Σ ;;; Γ ⊢ tLetIn na t ty u ≤s[pb] tLetIn na' t' ty' u'
133133

134134
| cumul_Case indn : forall p p' c c' brs brs',
@@ -358,7 +358,7 @@ Lemma cumulSpec0_rect :
358358
(forall (Γ : context) (pb : conv_pb) (na na' : aname) (ty ty' t t' : term)
359359
(Hna : eq_binder_annot na na')
360360
(Hty : cumulSpec0 Σ Γ Conv ty ty') (_ : P cf Σ Γ Conv ty ty' Hty)
361-
(Ht : cumulSpec0 Σ (Γ ,, vass na ty) pb t t') ( _ : P cf Σ (Γ ,, vass na ty) pb t t' Ht),
361+
(Ht : cumulSpec0 Σ (Γ ,, vass na ty) Conv t t') ( _ : P cf Σ (Γ ,, vass na ty) Conv t t' Ht),
362362
P cf Σ Γ pb (tLambda na ty t) (tLambda na' ty' t')
363363
(cumul_Lambda _ _ _ _ _ _ _ _ _ Hna Hty Ht)) ->
364364

@@ -373,7 +373,7 @@ Lemma cumulSpec0_rect :
373373
(Hna : eq_binder_annot na na')
374374
(Ht : cumulSpec0 Σ Γ Conv t t') (_ : P cf Σ Γ Conv t t' Ht)
375375
(Hty : cumulSpec0 Σ Γ Conv ty ty') (_ : P cf Σ Γ Conv ty ty' Hty)
376-
(Hu : cumulSpec0 Σ (Γ,, vdef na t ty) pb u u') (_ : P cf Σ (Γ,, vdef na t ty) pb u u' Hu),
376+
(Hu : cumulSpec0 Σ (Γ,, vdef na t ty) Conv u u') (_ : P cf Σ (Γ,, vdef na t ty) Conv u u' Hu),
377377
P cf Σ Γ pb (tLetIn na t ty u) (tLetIn na' t' ty' u')
378378
(cumul_LetIn _ _ _ _ _ _ _ _ _ _ _ Hna Ht Hty Hu)) ->
379379

pcuic/theories/PCUICEquality.v

+12-9
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ Inductive eq_term_upto_univ_napp Σ
437437
| eq_Lambda : forall na na' ty ty' t t',
438438
eq_binder_annot na na' ->
439439
Σ ⊢ ty <==[ Conv , 0 ] ty' ->
440-
Σ ⊢ t <==[ pb , 0 ] t' ->
440+
Σ ⊢ t <==[ Conv , 0 ] t' ->
441441
Σ ⊢ tLambda na ty t <==[ pb , napp ] tLambda na' ty' t'
442442

443443
| eq_Prod : forall na na' a a' b b',
@@ -450,7 +450,7 @@ Inductive eq_term_upto_univ_napp Σ
450450
eq_binder_annot na na' ->
451451
Σ ⊢ t <==[ Conv , 0 ] t' ->
452452
Σ ⊢ ty <==[ Conv , 0 ] ty' ->
453-
Σ ⊢ u <==[ pb , 0 ] u' ->
453+
Σ ⊢ u <==[ Conv , 0 ] u' ->
454454
Σ ⊢ tLetIn na t ty u <==[ pb , napp ] tLetIn na' t' ty' u'
455455

456456
| eq_Case : forall indn p p' c c' brs brs',
@@ -1688,19 +1688,22 @@ Proof.
16881688
Qed.
16891689

16901690
Lemma eq_term_upto_univ_it_mkLambda_or_LetIn Σ cmp_universe cmp_sort pb :
1691-
Proper (eq_context_upto Σ cmp_universe cmp_sort Conv ==> eq_term_upto_univ Σ cmp_universe cmp_sort pb ==> eq_term_upto_univ Σ cmp_universe cmp_sort pb) it_mkLambda_or_LetIn.
1691+
RelationClasses.subrelation (cmp_universe Conv) (cmp_universe pb) ->
1692+
RelationClasses.subrelation (cmp_sort Conv) (cmp_sort pb) ->
1693+
Proper (eq_context_upto Σ cmp_universe cmp_sort Conv ==> eq_term_upto_univ Σ cmp_universe cmp_sort Conv ==> eq_term_upto_univ Σ cmp_universe cmp_sort pb) it_mkLambda_or_LetIn.
16921694
Proof.
1693-
intros Γ Δ eq u v h.
1695+
intros ?? Γ Δ eq u v h.
16941696
induction eq in u, v, h |- *.
1695-
- assumption.
1697+
- cbn.
1698+
eapply eq_term_upto_univ_leq; trea.
16961699
- simpl. cbn. apply IHeq => //.
16971700
destruct p; cbn; constructor ; tas; try reflexivity.
16981701
Qed.
16991702

1700-
Lemma eq_term_upto_univ_it_mkLambda_or_LetIn_r Σ cmp_universe cmp_sort pb Γ :
1703+
Lemma eq_term_upto_univ_it_mkLambda_or_LetIn_r Σ cmp_universe cmp_sort Γ :
17011704
RelationClasses.Reflexive (cmp_universe Conv) ->
17021705
RelationClasses.Reflexive (cmp_sort Conv) ->
1703-
respectful (eq_term_upto_univ Σ cmp_universe cmp_sort pb) (eq_term_upto_univ Σ cmp_universe cmp_sort pb)
1706+
respectful (eq_term_upto_univ Σ cmp_universe cmp_sort Conv) (eq_term_upto_univ Σ cmp_universe cmp_sort Conv)
17041707
(it_mkLambda_or_LetIn Γ) (it_mkLambda_or_LetIn Γ).
17051708
Proof.
17061709
intros univ_refl sort_refl u v h.
@@ -1719,10 +1722,10 @@ Proof.
17191722
apply eq_term_upto_univ_it_mkLambda_or_LetIn_r; exact _.
17201723
Qed.
17211724

1722-
Lemma eq_term_upto_univ_it_mkProd_or_LetIn Σ cmp_universe cmp_sort pb Γ :
1725+
Lemma eq_term_upto_univ_it_mkProd_or_LetIn Σ cmp_universe cmp_sort Γ :
17231726
RelationClasses.Reflexive (cmp_universe Conv) ->
17241727
RelationClasses.Reflexive (cmp_sort Conv) ->
1725-
respectful (eq_term_upto_univ Σ cmp_universe cmp_sort pb) (eq_term_upto_univ Σ cmp_universe cmp_sort pb)
1728+
respectful (eq_term_upto_univ Σ cmp_universe cmp_sort Conv) (eq_term_upto_univ Σ cmp_universe cmp_sort Conv)
17261729
(it_mkProd_or_LetIn Γ) (it_mkProd_or_LetIn Γ).
17271730
Proof.
17281731
intros univ_refl sort_refl u v h.

0 commit comments

Comments
 (0)