Skip to content

Commit a6214f9

Browse files
committed
Fixes after merge
1 parent 8c7a672 commit a6214f9

15 files changed

+23
-22
lines changed

erasure-plugin/theories/ErasureCorrectness.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -1153,7 +1153,7 @@ Section PCUICErase.
11531153
set(prf := fun (n : nat) => _).
11541154
set(prf' := fun (Σ : global_env) => _).
11551155
unshelve eexists. intros ? ->; reflexivity.
1156-
epose proof (@erase_global_deps_fast_erase_global_deps (term_global_deps er') optimized_abstract_env_impl wfe (declarations p.1)) as [nin2 eq].
1156+
epose proof (@erase_global_deps_fast_erase_global_deps (term_global_deps er') optimized_abstract_env_impl wfe (declarations p.1) _ _ _) as [nin2 eq].
11571157
exists nin2.
11581158
set(prf'' := fun (Σ : global_env) => _).
11591159
set(prf''' := ETransform.erase_pcuic_program_obligation_6 _ _ _ _ _ _).

erasure/theories/EEtaExpanded.v

+2-1
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,7 @@ Variable Σ : global_declarations.
458458

459459
Local Unset Elimination Schemes.
460460

461+
#[universes(template=no)]
461462
Inductive expanded : term -> Prop :=
462463
| expanded_tRel (n : nat) : expanded (tRel n)
463464
| expanded_tVar (id : ident) : expanded (tVar id)
@@ -477,7 +478,7 @@ Inductive expanded : term -> Prop :=
477478
#|args| >= cstr_arity mind cdecl ->
478479
Forall expanded args ->
479480
expanded (mkApps (tConstruct ind idx []) args)
480-
| expanded_tPrim p : primProp expanded p -> expanded (tPrim p)
481+
| expanded_tPrim p : primProp@{Set Set} expanded p -> expanded (tPrim p)
481482
| expanded_tBox : expanded tBox.
482483

483484
End expanded.

erasure/theories/EEtaExpandedFix.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Inductive expanded (Γ : list nat): term -> Prop :=
6060
#|args| >= ind_npars mind + cdecl.(cstr_nargs) ->
6161
Forall (expanded Γ) args ->
6262
expanded Γ (mkApps (tConstruct ind idx []) args)
63-
| expanded_tPrim p : primProp (expanded Γ) p -> expanded Γ (tPrim p)
63+
| expanded_tPrim p : primProp@{Set Set} (expanded Γ) p -> expanded Γ (tPrim p)
6464
| expanded_tBox : expanded Γ tBox.
6565

6666
End expanded.

erasure/theories/ESubstitution.v

+4-4
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,13 @@ Proof.
110110
- econstructor.
111111
eapply All2_All_mix_left in X3; eauto.
112112
eapply All2_impl. exact X3.
113-
intros ? ? [(? & _) [? []]]; tea.
114-
split; eauto.
113+
intros ? ? [? [? []]]; tea.
114+
split; eauto. eapply o; eauto.
115115
- econstructor.
116116
eapply All2_All_mix_left in X3; eauto.
117117
eapply All2_impl. exact X3.
118-
intros ? ? [(? & _) [? []]]; tea.
119-
split; eauto.
118+
intros ? ? [? [? []]]; tea.
119+
repeat split; eauto. now eapply o.
120120
- econstructor.
121121
induction H3; constructor.
122122
induction X2; constructor; depelim X1; eauto.

erasure/theories/Typed/OptimizeCorrectness.v

+2
Original file line numberDiff line numberDiff line change
@@ -3874,6 +3874,8 @@ Section dearg.
38743874

38753875
End dearg.
38763876

3877+
Set SsrRewrite.
3878+
38773879
Lemma env_closed_dearg Σ :
38783880
env_closed (trans_env Σ) ->
38793881
env_closed (trans_env (dearg_env Σ)).

pcuic/theories/Conversion/PCUICNamelessConv.v

+2-2
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,15 @@ Proof.
159159
* rewrite forallb_map.
160160
eapply All_forallb. unfold ondecl in *. solve_all.
161161
rewrite /nameless_decl /= b.
162-
destruct (decl_body x); simpl in *; auto.
162+
destruct (decl_body x); simpl in *; auto with bool.
163163
* induction l.
164164
+ reflexivity.
165165
+ cbn. depelim X0. destruct p0.
166166
repeat (eapply andb_true_intro ; split) ; try assumption.
167167
++ rewrite forallb_map.
168168
eapply All_forallb. unfold ondecl in *; solve_all.
169169
rewrite /nameless_decl /= b.
170-
destruct (decl_body x); simpl in *; auto.
170+
destruct (decl_body x); simpl in *; auto with bool.
171171
++ eapply IHl. assumption.
172172
- simpl ; repeat (eapply andb_true_intro ; split) ; try assumption.
173173
+ induction m.

pcuic/theories/PCUICExpandLetsCorrectness.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICOnOne PCUICCases P
1818
PCUICCases PCUICWellScopedCumulativity PCUICSpine PCUICSR
1919
PCUICSafeLemmata PCUICInductives PCUICInductiveInversion.
2020
From MetaCoq.PCUIC Require Import PCUICExpandLets.
21-
Set Warnings "+notation_overridden".
21+
Set Warnings "+notation-overridden".
2222

2323
Import MCMonadNotation.
2424

pcuic/theories/PCUICNormal.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ Proof.
317317
- inv whn; solve_discr; easy.
318318
Qed.
319319

320-
Set Firstorder Solver auto with core.
320+
#[local] Set Firstorder Solver auto with core.
321321

322322
Definition whnf_whne_dec flags Σ Γ t :
323323
({∥whnf flags Σ Γ t∥} + {~∥whnf flags Σ Γ t∥}) *

pcuic/theories/PCUICWcbvEval.v

+1-3
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,6 @@ Section Wcbv.
837837
move=> /= Hf Heq'; noconf Heq'.
838838
eapply closedn_subst0. unfold fix_subst. clear -Hf. generalize #|mfix|.
839839
induction n; simpl; auto.
840-
apply/andP; split; auto.
841840
simpl. rewrite fix_subst_length. solve_all.
842841
eapply All_nth_error in Hf; eauto. unfold test_def in Hf.
843842
rewrite PeanoNat.Nat.add_0_r in Hf. now move/andP: Hf.
@@ -937,8 +936,7 @@ Section Wcbv.
937936
move=> /= Hf Heq'; noconf Heq'.
938937
eapply closedn_subst0. unfold cofix_subst. clear -Hf. generalize #|mfix|.
939938
induction n; simpl; auto.
940-
apply/andP; split; auto.
941-
simpl. rewrite cofix_subst_length. solve_all.
939+
rewrite cofix_subst_length. solve_all.
942940
eapply All_nth_error in Hf; eauto. unfold test_def in Hf.
943941
rewrite PeanoNat.Nat.add_0_r in Hf. now move/andP: Hf.
944942
discriminate.

pcuic/theories/Typing/PCUICClosedTyp.v

-1
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,6 @@ Proof.
754754
- move: h4; rewrite !on_free_vars_mkApps.
755755
move=> /andP [] hcofix ->.
756756
eapply on_free_vars_unfold_cofix in hcofix; eauto.
757-
now rewrite hcofix.
758757
- move: hav; rewrite !on_free_vars_mkApps => /andP [] hcofix ->.
759758
eapply on_free_vars_unfold_cofix in H as ->; eauto.
760759
- eapply closed_on_free_vars. rewrite closedn_subst_instance.

template-coq/src/ast_quoter.ml

+1
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ struct
100100
| Sorts.SProp -> Universes0.Sort.Coq_sSProp
101101
| Sorts.Prop -> Universes0.Sort.Coq_sProp
102102
| Sorts.Type u -> Universes0.Sort.Coq_sType (quote_universe u)
103+
| Sorts.QSort (_, u) -> Universes0.Sort.Coq_sType (quote_universe u) (* FIXME *)
103104

104105
let quote_sort_family s =
105106
match s with

template-coq/src/constr_quoter.ml

+2-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ struct
139139
| _ -> failwith "byte_ind : tByte is not bound to an inductive type")
140140

141141
let quote_char i =
142-
Constr.mkConstruct (Lazy.force byte_ind, (i+1))
142+
Constr.UnsafeMonomorphic.mkConstruct (Lazy.force byte_ind, (i+1))
143143

144144
let chars = lazy (Array.init 255 quote_char)
145145

@@ -333,6 +333,7 @@ struct
333333
| Sorts.Prop -> Lazy.force prop
334334
| Sorts.SProp -> Lazy.force sprop
335335
| Sorts.Type u -> constr_mkApp (sType, [| Lazy.force tuniverse; quote_universe u |])
336+
| Sorts.QSort (_, u) -> constr_mkApp (sType, [| Lazy.force tuniverse; quote_universe u |]) (* FIXME *)
336337

337338
let quote_sort_family = function
338339
| Sorts.InProp -> Lazy.force sfProp

utils/theories/MCList.v

-1
Original file line numberDiff line numberDiff line change
@@ -1443,7 +1443,6 @@ Lemma forallb_repeat {A} {p : A -> bool} {a : A} {n} :
14431443
Proof.
14441444
intros pa.
14451445
induction n; cbn; auto.
1446-
now rewrite pa IHn.
14471446
Qed.
14481447

14491448
Lemma map_repeat {A B} (f : A -> B) a n :

utils/theories/MCPrelude.v

+5
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ Hint Extern 10 (@eq nat _ _) => lia : terms.
114114

115115
Ltac easy ::= easy0 || solve [intuition eauto 3 with core terms].
116116

117+
From Coq Require btauto.Algebra.
118+
119+
#[global]
120+
Hint Extern 5 => progress Algebra.bool : core.
121+
117122
Ltac inv H := inversion_clear H.
118123

119124
(** Turns a subterm of the goal into an evar + equality subgoal

utils/theories/wGraph.v

-5
Original file line numberDiff line numberDiff line change
@@ -656,10 +656,6 @@ Module WeightedGraph (V : UsualOrderedType) (VSet : MSetInterface.S with Module
656656
apply negb_true_iff in h1. apply VSetFact.not_mem_iff in h1.
657657
assumption.
658658
Defined.
659-
Next Obligation.
660-
apply andb_andI in Hp0 as [? ?]. auto.
661-
Defined.
662-
663659

664660
Lemma weight_concat {x y z} (p : PathOf x y) (q : PathOf y z)
665661
: weight (concat p q) = weight p + weight q.
@@ -2219,7 +2215,6 @@ Module WeightedGraph (V : UsualOrderedType) (VSet : MSetInterface.S with Module
22192215
is_simple _ p -> ~~ VSet.mem y (nodes G p) -> is_simple _ (PathOf_add_end p e).
22202216
Proof using HI.
22212217
induction p; simpl; auto.
2222-
now rewrite andb_true_r.
22232218
move/andP => [nmen iss].
22242219
specialize (IHp e iss). intros Hm%negbe.
22252220
rewrite andb_and. split; auto.

0 commit comments

Comments
 (0)