@@ -3,12 +3,16 @@ From MetaCoq.Utils Require Import MCPrelude MCReflect MCList MCRelations MCProd
33From Equations Require Import Equations.
44Import ListNotations.
55
6+ Local Set Universe Polymorphism.
7+ Local Set Polymorphic Inductive Cumulativity.
8+ Local Unset Universe Minimization ToSet.
9+
610Derive Signature for Forall Forall2.
711
812(** Combinators *)
913
1014(** Forall combinators in Type to allow building them by recursion *)
11- Polymorphic Cumulative Inductive All {A} (P : A -> Type ) : list A -> Type :=
15+ Inductive All {A} (P : A -> Type ) : list A -> Type :=
1216 All_nil : All P []
1317 | All_cons : forall (x : A) (l : list A),
1418 P x -> All P l -> All P (x :: l).
@@ -355,7 +359,7 @@ Lemma All2_map_equiv {A B C D} {R : C -> D -> Type} {f : A -> C} {g : B -> D} {l
355359 All2 (fun x y => R (f x) (g y)) l l' <~> All2 R (map f l) (map g l').
356360Proof .
357361 split.
358- - induction 1; simpl; constructor; try congruence.
362+ - induction 1; simpl; constructor; try congruence; try assumption .
359363 - induction l in l' |- *; destruct l'; intros H; depelim H; constructor; auto.
360364Qed .
361365
@@ -833,11 +837,11 @@ Proof. induction 1; simpl; congruence. Qed.
833837
834838Lemma OnOne2_mapP {A B} {P} {l l' : list A} (f : A -> B) :
835839 OnOne2 (on_rel P f) l l' -> OnOne2 P (map f l) (map f l').
836- Proof . induction 1; simpl; constructor; try congruence. apply p . Qed .
840+ Proof . induction 1; simpl; constructor; try congruence; try assumption . Qed .
837841
838842Lemma OnOne2_map {A B} {P : B -> B -> Type } {l l' : list A} (f : A -> B) :
839843 OnOne2 (on_Trel P f) l l' -> OnOne2 P (map f l) (map f l').
840- Proof . induction 1; simpl; constructor; try congruence. apply p . Qed .
844+ Proof . induction 1; simpl; constructor; try congruence; try assumption . Qed .
841845
842846Lemma OnOne2_sym {A} (P : A -> A -> Type) l l' : OnOne2 (fun x y => P y x) l' l -> OnOne2 P l l'.
843847Proof .
@@ -1048,11 +1052,11 @@ Proof. induction 1; simpl; congruence. Qed.
10481052
10491053Lemma OnOne2i_mapP {A B} {P} {i} {l l' : list A} (f : A -> B) :
10501054 OnOne2i (fun i => on_rel (P i) f) i l l' -> OnOne2i P i (map f l) (map f l').
1051- Proof . induction 1; simpl; constructor; try congruence. apply p . Qed .
1055+ Proof . induction 1; simpl; constructor; try congruence; try assumption . Qed .
10521056
10531057Lemma OnOne2i_map {A B} {P : nat -> B -> B -> Type } {i} {l l' : list A} (f : A -> B) :
10541058 OnOne2i (fun i => on_Trel (P i) f) i l l' -> OnOne2i P i (map f l) (map f l').
1055- Proof . induction 1; simpl; constructor; try congruence. apply p . Qed .
1059+ Proof . induction 1; simpl; constructor; try congruence; try assumption . Qed .
10561060
10571061Lemma OnOne2i_sym {A} (P : nat -> A -> A -> Type) i l l' : OnOne2i (fun i x y => P i y x) i l' l -> OnOne2i P i l l'.
10581062Proof .
@@ -1234,15 +1238,15 @@ Proof. induction 1; simpl; congruence. Qed.
12341238
12351239Lemma OnOne2All_mapP {A B I} {P} {i : list I} {l l' : list A} (f : A -> B) :
12361240 OnOne2All (fun i => on_rel (P i) f) i l l' -> OnOne2All P i (map f l) (map f l').
1237- Proof . induction 1; simpl; constructor; try congruence. apply p . now rewrite map_length. Qed .
1241+ Proof . induction 1; simpl; constructor; try congruence; try assumption . now rewrite map_length. Qed .
12381242
12391243Lemma OnOne2All_map {A I B} {P : I -> B -> B -> Type } {i : list I} {l l' : list A} (f : A -> B) :
12401244 OnOne2All (fun i => on_Trel (P i) f) i l l' -> OnOne2All P i (map f l) (map f l').
1241- Proof . induction 1; simpl; constructor; try congruence. apply p . now rewrite map_length. Qed .
1245+ Proof . induction 1; simpl; constructor; try congruence; try assumption . now rewrite map_length. Qed .
12421246
12431247Lemma OnOne2All_map_all {A B I I'} {P} {i : list I} {l l' : list A} (g : I -> I') (f : A -> B) :
12441248 OnOne2All (fun i => on_Trel (P (g i)) f) i l l' -> OnOne2All P (map g i) (map f l) (map f l').
1245- Proof . induction 1; simpl; constructor; try congruence. apply p . now rewrite !map_length. Qed .
1249+ Proof . induction 1; simpl; constructor; try congruence; try assumption . now rewrite !map_length. Qed .
12461250
12471251
12481252Lemma OnOne2All_sym {A B} (P : B -> A -> A -> Type) i l l' : OnOne2All (fun i x y => P i y x) i l' l -> OnOne2All P i l l'.
@@ -2894,11 +2898,11 @@ Qed.
28942898
28952899Lemma All2i_map {A B C D} (R : nat -> C -> D -> Type ) (f : A -> C) (g : B -> D) n l l' :
28962900 All2i (fun i x y => R i (f x) (g y)) n l l' -> All2i R n (map f l) (map g l').
2897- Proof . induction 1; simpl; constructor; try congruence. Qed .
2901+ Proof . induction 1; simpl; constructor; try congruence; try assumption . Qed .
28982902
28992903Lemma All2i_map_right {B C D} (R : nat -> C -> D -> Type ) (g : B -> D) n l l' :
29002904 All2i (fun i x y => R i x (g y)) n l l' -> All2i R n l (map g l').
2901- Proof . induction 1; simpl; constructor; try congruence. Qed .
2905+ Proof . induction 1; simpl; constructor; try congruence; try assumption . Qed .
29022906
29032907Lemma All2i_nth_impl_gen {A B} (R : nat -> A -> B -> Type ) n l l' :
29042908 All2i R n l l' ->
@@ -3563,7 +3567,6 @@ Proof.
35633567 all: now apply In_All; constructor => //.
35643568Qed .
35653569
3566- Local Set Universe Polymorphism.
35673570Lemma All_eta3 {A B C P} ls
35683571 : @All (A * B * C)%type (fun '(a, b, c) => P a b c) ls <~> All (fun abc => P abc.1.1 abc.1.2 abc.2) ls.
35693572Proof .
0 commit comments