| 1 |
(* In 8.1 autorewrite used to raised an anomaly here *) |
| 2 |
(* After resolution of the bug, autorewrite succeeded *) |
| 3 |
(* From forthcoming 8.4, autorewrite is forbidden to instantiate *) |
| 4 |
(* evars, so the new test just checks it is not an anomaly *) |
| 5 |
|
| 6 |
Set Implicit Arguments. |
| 7 |
|
| 8 |
Record Place (Env A: Type) : Type := { |
| 9 |
read: Env -> A ; |
| 10 |
write: Env -> A -> Env ; |
| 11 |
write_read: forall (e:Env), (write e (read e))=e |
| 12 |
}. |
| 13 |
|
| 14 |
#[export] Hint Rewrite -> write_read: placeeq. |
| 15 |
|
| 16 |
Record sumPl (Env A B: Type) (vL:(Place Env A)) (vR:(Place Env B)) : Type := |
| 17 |
{ |
| 18 |
mkEnv: A -> B -> Env ; |
| 19 |
mkEnv2writeL: forall (e:Env) (x:A), (mkEnv x (read vR e))=(write vL e x) |
| 20 |
}. |
| 21 |
|
| 22 |
(* when the following line is commented, the bug does not appear *) |
| 23 |
#[export] Hint Rewrite -> mkEnv2writeL: placeeq. |
| 24 |
|
| 25 |
Lemma autorewrite_raise_anomaly: forall (Env A:Type) (e: Env) (p:Place Env A), |
| 26 |
(exists e1:Env, e=(write p e1 (read p e))). |
| 27 |
Proof. |
| 28 |
intros Env A e p; eapply ex_intro. |
| 29 |
autorewrite with placeeq. (* Here is the bug *) |
| 30 |
Abort. |