772772 case: eqb_spec.
773773 intros ->.
774774 eapply lookup_global_Some_fresh in hl.
775- rewrite e in wf. destruct wf as [_ ond]; depelim ond.
775+ rewrite e in wf. destruct wf as [_ ond]; depelim ond. destruct o as [f ? ? ? ].
776776 cbn in *. eapply Forall_app in f as []. contradiction.
777777 intros _.
778778 eapply IHx; trea.
@@ -908,7 +908,7 @@ Next Obligation.
908908 { now eexists. }
909909 destruct (abstract_pop_decls_correct X decls prop' _ _ HX H) as [? []].
910910 clear H. specialize (prop _ HX). destruct x, Σ, H0; cbn in *.
911- subst. sq. destruct wfX. depelim o0. split => //.
911+ subst. sq. destruct wfX. depelim o0. destruct o1. split => //.
912912Qed .
913913Next Obligation .
914914 pose proof (abstract_env_ext_wf _ H) as [wf].
@@ -922,7 +922,7 @@ Next Obligation.
922922 pose proof (abstract_make_wf_env_ext_correct _ _ _ _ _ HX' H).
923923 clear H HX'. specialize (prop _ HX). destruct x, Σ as [[] u], H0; cbn in *.
924924 subst. sq. inversion H3. subst. clear H3. destruct wfX. cbn in *.
925- rewrite prop in o0. depelim o0. cbn in o2. apply o2 .
925+ rewrite prop in o0. depelim o0. destruct o1. exact on_global_decl_d .
926926Qed .
927927Next Obligation .
928928 pose proof (abstract_env_exists X) as [[? HX]].
@@ -1218,7 +1218,7 @@ Proof.
12181218 induction er using erases_deps_forall_ind; try solve [now constructor].
12191219 - assert (kn <> kn0).
12201220 { inv wfΣ. inv X. intros <-.
1221- eapply lookup_env_Some_fresh in H. contradiction. }
1221+ eapply lookup_env_Some_fresh in H. destruct X1. contradiction. }
12221222 eapply erases_deps_tConst with cb cb'; eauto.
12231223 red. rewrite /lookup_env lookup_env_cons_fresh //.
12241224 red.
@@ -1240,15 +1240,15 @@ Proof.
12401240 red in H. red.
12411241 inv wfΣ. inv X.
12421242 rewrite -H. simpl. unfold lookup_env; simpl. destruct (eqb_spec (inductive_mind p.1) kn); try congruence.
1243- eapply lookup_env_Some_fresh in H. subst kn; contradiction.
1243+ eapply lookup_env_Some_fresh in H. destruct X1. subst kn; contradiction.
12441244 - econstructor; eauto.
12451245 red. destruct H. split; eauto.
12461246 destruct d0; split; eauto.
12471247 destruct d0; split; eauto.
12481248 inv wfΣ. inv X.
12491249 red in H |- *.
12501250 rewrite -H. simpl. unfold lookup_env; simpl; destruct (eqb_spec (inductive_mind p.(proj_ind)) kn); try congruence.
1251- eapply lookup_env_Some_fresh in H. subst kn. contradiction.
1251+ eapply lookup_env_Some_fresh in H. subst kn. destruct X1. contradiction.
12521252Qed .
12531253
12541254Lemma lookup_env_ext {Σ kn kn' d d'} :
@@ -1259,7 +1259,7 @@ Proof.
12591259 intros wf hl.
12601260 eapply lookup_env_Some_fresh in hl.
12611261 inv wf. inv X.
1262- destruct (eqb_spec kn kn'); subst; congruence.
1262+ destruct (eqb_spec kn kn'); subst; destruct X1; congruence.
12631263Qed .
12641264
12651265Lemma lookup_env_cons_disc {Σ kn kn' d} :
@@ -1288,11 +1288,11 @@ Proof.
12881288 exists cst. split.
12891289 red in declc |- *. unfold lookup_env in *.
12901290 rewrite lookup_env_cons_fresh //.
1291- { eapply lookup_env_Some_fresh in declc.
1291+ { eapply lookup_env_Some_fresh in declc. destruct X1.
12921292 intros <-; contradiction. }
12931293 exists cst'.
12941294 unfold EGlobalEnv.declared_constant. rewrite EGlobalEnv.elookup_env_cons_fresh //.
1295- { eapply lookup_env_Some_fresh in declc.
1295+ { eapply lookup_env_Some_fresh in declc. destruct X1.
12961296 intros <-; contradiction. }
12971297 red in ebody. unfold erases_constant_body.
12981298 destruct (cst_body cst) eqn:bod; destruct (E.cst_body cst') eqn:bod' => //.
@@ -1327,7 +1327,7 @@ Proof.
13271327 unfold lookup_env in *.
13281328 rewrite lookup_env_cons_fresh //.
13291329 { eapply lookup_env_Some_fresh in declc.
1330- intros <-. contradiction. }
1330+ intros <-. destruct X1. contradiction. }
13311331 exists cst'.
13321332 unfold EGlobalEnv.declared_constant.
13331333 red in ebody. unfold erases_constant_body.
@@ -1462,7 +1462,9 @@ Proof.
14621462 cbn in o0, o. rewrite prf' in o0. rewrite <- Hpop in o0. rewrite Hpop' in o. clear -o o0.
14631463 now depelim o0.
14641464 depelim wf. rewrite Hpop' in o0.
1465- cbn in o0, o. rewrite prf' in o0. rewrite <- Hpop in o0. clear -o0. now depelim o0. }
1465+ cbn in o0, o. rewrite prf' in o0. rewrite <- Hpop in o0. clear -o0. depelim o0.
1466+ now destruct o.
1467+ }
14661468 all: eauto.
14671469 apply IHdecls; eauto.
14681470 { intros. pose proof (abstract_env_wf _ wfpop) as [wf'].
@@ -1603,11 +1605,12 @@ Lemma on_global_env_ind (P : forall Σ : global_env, wf Σ -> Type)
16031605 (pd : on_global_decl cumulSpec0 (lift_typing typing)
16041606 ({| universes := Σ.(universes); declarations := Σ.(declarations); retroknowledge := Σ.(retroknowledge) |}, udecl) kn d),
16051607 P Σ wf -> P (add_global_decl Σ (kn, d))
1606- (fst wf, globenv_decl _ _ Σ.(universes) Σ.(retroknowledge) Σ.(declarations) kn d (snd wf) Hfresh onud pd))
1608+ (fst wf, globenv_decl _ _ Σ.(universes) Σ.(retroknowledge) Σ.(declarations) kn d (snd wf)
1609+ {| kn_fresh := Hfresh ; on_udecl_udecl := onud ; on_global_decl_d := pd |}))
16071610 (Σ : global_env) (wfΣ : wf Σ) : P Σ wfΣ.
16081611Proof .
16091612 destruct Σ as [univs Σ]. destruct wfΣ; cbn in *.
1610- induction o0. apply Pnil.
1613+ induction o0. apply Pnil. destruct o1.
16111614 apply (Pcons {| universes := univs; declarations := Σ |} kn d (o, o0)).
16121615 exact IHo0.
16131616Qed .
@@ -2122,19 +2125,19 @@ Proof.
21222125 + constructor. eapply IHdecls => //; eauto. eapply erase_global_cst_decl_wf_glob; auto.
21232126 eapply erase_global_decls_fresh; auto.
21242127 destruct wfΣ. destruct wfΣpop.
2125- rewrite (heq _ wf) in o0. now depelim o0.
2128+ rewrite (heq _ wf) in o0. depelim o0. now destruct o3 .
21262129 + cbn. eapply IHdecls; eauto.
21272130 + constructor. eapply IHdecls; eauto.
21282131 destruct wfΣ as [[onu ond]].
2129- rewrite (heq _ wf) in o. depelim o.
2132+ rewrite (heq _ wf) in o. depelim o. destruct o0.
21302133 eapply (erase_global_ind_decl_wf_glob (kn:=kn)); tea.
21312134 intros. rewrite (abstract_env_irr _ H wfpop).
21322135 unshelve epose proof (abstract_pop_decls_correct X decls _ _ _ wf wfpop) as [? ?].
21332136 {intros; now eexists. }
21342137 destruct Σpop, Σ; cbn in *. now subst.
21352138 eapply erase_global_decls_fresh.
21362139 destruct wfΣ as [[onu ond]].
2137- rewrite (heq _ wf) in o. now depelim o.
2140+ rewrite (heq _ wf) in o. depelim o. now destruct o0.
21382141 + eapply IHdecls; eauto.
21392142Qed .
21402143
@@ -2167,7 +2170,7 @@ Proof.
21672170 eapply erase_global_cst_decl_wf_glob.
21682171 eapply erase_global_decls_fresh => //.
21692172 pose proof (abstract_env_wf _ wf) as [wfΣ].
2170- depelim wfΣ. rewrite (prf _ wf) in o0. clear - o0. now depelim o0.
2173+ depelim wfΣ. rewrite (prf _ wf) in o0. clear - o0. depelim o0. now destruct o.
21712174 unfold eg', eg'', hidebody.
21722175 erewrite erase_global_decls_irr.
21732176 eapply IHdecls.
@@ -2188,12 +2191,12 @@ Proof.
21882191 { now eexists. }
21892192 destruct Σ, Σ0. cbn in *. rewrite prf' in wfΣ.
21902193 depelim wfΣ. cbn in *. rewrite <- H1, H0, <- H2.
2191- now depelim o0.
2194+ depelim o0. now destruct o1.
21922195 eapply erase_global_decls_fresh => //.
21932196 pose proof (abstract_env_wf _ wf) as [wfΣ].
21942197 pose proof (prf _ wf) as prf'.
21952198 destruct Σ. cbn in *. rewrite prf' in wfΣ.
2196- clear -wfΣ. destruct wfΣ. cbn in *. now depelim o0.
2199+ clear -wfΣ. destruct wfΣ. cbn in *. depelim o0. now destruct o1.
21972200 unfold eg'', hidebody. erewrite erase_global_decls_irr.
21982201 eapply IHdecls. intros x hin. now eapply sub.
21992202 eapply IHdecls => //. }
@@ -2526,8 +2529,8 @@ Next Obligation.
25262529 pose proof (abstract_env_wf _ H) as [?].
25272530 specialize_Σ H. sq. split. cbn. apply X3. cbn.
25282531 eapply decls_prefix_wf in X3; tea.
2529- destruct X3 as [onu ond]. cbn in ond.
2530- now depelim ond.
2532+ destruct X3 as [onu ond]. cbn in ond.
2533+ depelim ond. now destruct o.
25312534Qed .
25322535Next Obligation .
25332536 pose proof (abstract_env_ext_wf _ H) as [?].
@@ -2569,7 +2572,7 @@ Proof.
25692572 induction suffix.
25702573 - cbn. rewrite eqb_refl //.
25712574 - cbn. intros ond.
2572- depelim ond. cbn. red in f.
2575+ depelim ond. destruct o as [f ? ? ? ]. cbn. red in f.
25732576 eapply Forall_app in f as []. depelim H0. cbn in H0.
25742577 destruct (eqb_spec kn kn0); [contradiction|].
25752578 now apply IHsuffix.
0 commit comments