@@ -15,7 +15,7 @@ From MetaCoq.PCUIC Require Import PCUICTyping PCUICEquality PCUICAst PCUICAstUti
1515 PCUICParallelReductionConfluence
1616 PCUICWcbvEval PCUICClosed PCUICClosedTyp
1717 PCUICReduction PCUICCSubst PCUICOnFreeVars PCUICWellScopedCumulativity
18- PCUICWcbvEval PCUICClassification PCUICSN PCUICNormalization PCUICViews.
18+ PCUICWcbvEval PCUICClassification PCUICCanonicity PCUICSN PCUICNormalization PCUICViews.
1919
2020From Equations Require Import Equations.
2121
@@ -46,28 +46,23 @@ Theorem pcuic_consistent {cf:checker_flags} {nor : normalizing_flags} Σ
4646 Σ ;;; [] |- t : tInd False_pcuic [] -> False.
4747Proof .
4848 intros Hdecl wfΣ axΣ typ_false.
49- pose proof (_ ; typ_false ) as wt .
49+ destruct (pcuic_canonicity Σ t False_pcuic [] [] ) as [t' [[typ_false' eqtt'] ctor]]; eauto .
5050 destruct Hdecl as [Hdecl Hidecl].
5151 destruct False_pcuic as [kn n]. destruct n; cbn in *; [| now rewrite nth_error_nil in Hidecl].
52- eapply wh_normalization in wt ; eauto. destruct wt as [empty [Hnormal Hempty]].
53- pose proof (Hempty_ := Hempty).
54- eapply subject_reduction in typ_false; eauto.
55- eapply ind_whnf_classification with (indargs := []) in typ_false as ctor; auto.
56- - unfold isConstruct_app in ctor.
57- destruct decompose_app eqn:decomp.
58- apply decompose_app_inv in decomp.
59- rewrite decomp in typ_false.
60- destruct t0; try discriminate ctor.
61- apply PCUICValidity.inversion_mkApps in typ_false as H; auto.
52+ rewrite /construct_cofix_discr /head in ctor.
53+ destruct decompose_app eqn:decomp.
54+ apply decompose_app_inv in decomp; subst.
55+ destruct t0; try discriminate ctor.
56+ - apply PCUICValidity.inversion_mkApps in typ_false' as H; auto.
6257 destruct H as (?&typ_ctor&_).
6358 apply inversion_Construct in typ_ctor as (?&?&?&?&?&?&?); auto.
64- eapply Construct_Ind_ind_eq with (args' := []) in typ_false; tea.
59+ eapply Construct_Ind_ind_eq with (args' := []) in typ_false' ; tea.
6560 2: eauto.
6661 destruct (on_declared_constructor d).
6762 destruct p.
6863 destruct s.
6964 destruct p.
70- destruct typ_false as (((((->&_)&_)&_)&_)&_).
65+ destruct typ_false' as (((((->&_)&_)&_)&_)&_).
7166 clear -Hdecl d wfΣ. destruct wfΣ.
7267 cbn in *.
7368 destruct d as ((?&?)&?).
7772 cbn in H0. noconf H0.
7873 cbn in H1. rewrite nth_error_nil in H1.
7974 discriminate.
80- - unfold notCoInductive, check_recursivity_kind. destruct wfΣ.
75+ - eapply @typing_cofix_coind with (indargs := []) in typ_false'; eauto.
76+ unfold check_recursivity_kind in typ_false'. destruct wfΣ.
8177 unshelve eapply declared_minductive_to_gen in Hdecl; eauto.
82- red in Hdecl. cbn. rewrite Hdecl; cbn. auto.
78+ red in Hdecl. rewrite Hdecl in typ_false'.
79+ cbn in typ_false'. inversion typ_false'.
8380Qed .
0 commit comments