test-suite/bugs/bug_7675_2.v
raw| 1 | Require Import Setoid CMorphisms. |
| 2 | |
| 3 | Parameter A : Type. |
| 4 | Parameter R : A -> A -> Type. |
| 5 | |
| 6 | Inductive P : A -> Type := c1 : forall a, P a | c2 : forall a, P a. |
| 7 | (* requires at least two constructors for the issue to appear *) |
| 8 | #[local] Instance P_R : Proper (R ==> arrow) P. Admitted. |
| 9 | |
| 10 | Goal forall a b, R a b -> P a -> P b. |
| 11 | Proof. |
| 12 | intros a b HR HP. |
| 13 | Succeed rewrite HR in HP. |
| 14 | Succeed rewrite <- HR. |
| 15 | apply (P_R _ _ HR HP). |
| 16 | Qed. |