| 1 |
(* Test that it raises a normal error and not an anomaly *) |
| 2 |
Set Primitive Projections. |
| 3 |
Record prod A B := pair { fst : A ; snd : B }. |
| 4 |
Arguments fst {A B} _. |
| 5 |
Arguments snd {A B} _. |
| 6 |
Arguments pair {A B} _ _. |
| 7 |
Record piis := { dep_types : Type; indep_args : dep_types -> Type }. |
| 8 |
Import EqNotations. |
| 9 |
Goal forall (id : Set) (V : id) (piiio : id -> piis) |
| 10 |
(Z : {ridc : id & prod (dep_types (piiio ridc)) True}) |
| 11 |
(P : dep_types (piiio V) -> Type) (W : {x : dep_types (piiio V) & P x}), |
| 12 |
let ida := fun (x : id) (y : dep_types (piiio x)) => indep_args (piiio x) y in |
| 13 |
prod True (ida V (projT1 W)) -> |
| 14 |
Z = existT _ V (pair (projT1 W) I) -> |
| 15 |
ida (projT1 Z) (fst (projT2 Z)). |
| 16 |
intros. |
| 17 |
refine (rew <- [fun k' => ida (projT1 k') (fst (projT2 k'))] |
| 18 |
H in |
| 19 |
let v := I in |
| 20 |
_); |
| 21 |
refine (snd X). |
| 22 |
Undo. |
| 23 |
Fail refine (rew <- [fun k' => ida (projT1 k') (fst (projT2 k'))] |
| 24 |
H in |
| 25 |
let v := I in |
| 26 |
snd X). |
| 27 |
Abort. |