Skip to content

Commit 736ac17

Browse files
committed
Merge remote-tracking branch 'origin/coq-8.16' into coq-8.17
2 parents e61cd19 + 74f668a commit 736ac17

File tree

3 files changed

+21
-26
lines changed

3 files changed

+21
-26
lines changed

INSTALL.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ to have a dedicated `opam` switch (see below).
6767
To get the source code:
6868

6969
# git clone https://github.com/MetaCoq/metacoq.git
70-
# git checkout -b coq-8.14 origin/coq-8.14
70+
# git checkout -b coq-8.16 origin/coq-8.16
7171
# git status
7272

73-
This checks that you are indeed on the `coq-8.14` branch.
73+
This checks that you are indeed on the `coq-8.16` branch.
7474

7575
### Setting up an `opam` switch
7676

@@ -109,14 +109,12 @@ the sources directory.
109109
Then use:
110110

111111
- `make` to compile the `template-coq` plugin, the `pcuic`
112-
development and the `safechecker` and `erasure` plugins.
112+
development and the `safechecker` and `erasure` plugins,
113+
along with the `test-suite`, `translations`, `examples`
114+
and `quotation` libraries.
113115
You can also selectively build each target.
114116

115-
- `make translations` to compile the translation plugins
116-
117-
- `make test-suite` to compile the test suite
118-
119-
- `make install` to install the plugin in `Coq`'s `user-contrib` local
117+
- `make install` to install the plugins in `Coq`'s `user-contrib` local
120118
library. Then the `MetaCoq` namespace can be used for `Require
121119
Import` statements, e.g. `From MetaCoq.Template Require Import All.`.
122120

pcuic/theories/PCUICCanonicity.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ From MetaCoq.PCUIC Require Import PCUICTyping PCUICEquality PCUICAst PCUICAstUti
2020
Lemma pcuic_canonicity {cf:checker_flags} {nor : normalizing_flags} Σ {normalization_in: NormalizationIn Σ} t i u args :
2121
axiom_free Σ -> wf Σ ->
2222
Σ ;;; [] |- t : mkApps (tInd i u) args ->
23-
{ t':term & (Σ ;;; [] |- t =s t') * construct_cofix_discr (head t')}.
23+
{ t':term & (Σ ;;; [] |- t' : mkApps (tInd i u) args) * (Σ ;;; [] |- t =s t') * construct_cofix_discr (head t')}.
2424
Proof.
2525
intros axΣ wfΣ typ_ind. pose proof (_ ; typ_ind) as wt.
2626
eapply wh_normalization in wt ; eauto.
@@ -29,7 +29,7 @@ Proof.
2929
pose proof (typ_ind' := typ_ind).
3030
eapply subject_reduction in typ_ind; eauto.
3131
eapply whnf_classification with (args := args) in typ_ind as ctor; auto.
32-
exists t'; split; eauto.
32+
exists t'; repeat split; eauto.
3333
eapply cumulAlgo_cumulSpec.
3434
eapply red_ws_cumul_pb. split; eauto.
3535
now eapply subject_is_open_term.

pcuic/theories/PCUICConsistency.v

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -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

2020
From Equations Require Import Equations.
2121

@@ -46,28 +46,23 @@ Theorem pcuic_consistent {cf:checker_flags} {nor : normalizing_flags} Σ
4646
Σ ;;; [] |- t : tInd False_pcuic [] -> False.
4747
Proof.
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 ((?&?)&?).
@@ -77,7 +72,9 @@ Proof.
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'.
8380
Qed.

0 commit comments

Comments
 (0)