You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lemma All2_over_undep {A B : Set} {P : A → B → Set} {l : list A} {l' : list B} (a : All2_Set P l l') (Q : A -> B → Type) :
113
-
All2_over a (fun x y _ => Q x y) <~> All2 Q l l'.
114
-
Proof.
115
-
split.
116
-
- induction a; cbn; constructor; intuition eauto.
117
-
- induction a; cbn; intuition eauto; now depelim X.
118
-
Qed.
119
-
120
72
Section Wcbv.
121
73
Context {wfl : WcbvFlags}.
122
74
Context (Σ : global_declarations).
123
75
(* The local context is fixed: we are only doing weak reductions *)
124
76
125
-
Variant eval_primitive (eval : term -> term -> Set) : prim_val term -> prim_val term -> Set :=
77
+
Variant eval_primitive {term term' : Set} (eval : term -> term' -> Set) : prim_val term -> prim_val term' -> Set :=
126
78
| evalPrimInt i : eval_primitive eval (prim_int i) (prim_int i)
127
79
| evalPrimFloat f : eval_primitive eval (prim_float f) (prim_float f)
128
80
| evalPrimArray v def v' def'
@@ -133,7 +85,7 @@ Section Wcbv.
133
85
eval_primitive eval (prim_array a) (prim_array a').
134
86
Derive Signature for eval_primitive.
135
87
136
-
Variant eval_primitive_ind (eval : term -> term -> Set) (P : forall x y, eval x y -> Type) : forall x y, eval_primitive eval x y -> Type :=
88
+
Variant eval_primitive_ind {term term' : Set} (eval : term -> term' -> Set) (P : forall x y, eval x y -> Type) : forall x y, eval_primitive eval x y -> Type :=
137
89
| evalPrimIntDep i : eval_primitive_ind eval P (prim_int i) (prim_int i) (evalPrimInt eval i)
138
90
| evalPrimFloatDep f : eval_primitive_ind eval P (prim_float f) (prim_float f) (evalPrimFloat eval f)
139
91
| evalPrimArrayDep v def v' def'
@@ -145,6 +97,19 @@ Section Wcbv.
145
97
eval_primitive_ind eval P (prim_array a) (prim_array a') (evalPrimArray eval v def v' def' ev ed).
146
98
Derive Signature for eval_primitive_ind.
147
99
100
+
Section map_eval_prim.
101
+
Context {term term' : Set}.
102
+
Context {eval : term -> term' -> Set}.
103
+
Context {P : forall x y, eval x y -> Type}.
104
+
Context (F : forall x y (e : eval x y), P x y e).
105
+
106
+
Equations map_eval_primitive {p : prim_val term} {p' : prim_val term'} (ev : eval_primitive eval p p') : eval_primitive_ind eval P p p' ev :=
0 commit comments