| 1 |
Set Warnings "+bad-relevance". |
| 2 |
|
| 3 |
Module Test1. |
| 4 |
|
| 5 |
Axiom Prop1 : Prop. |
| 6 |
Axiom Prop2 : Prop. |
| 7 |
Axiom equiv : Prop1 <-> Prop2. |
| 8 |
|
| 9 |
Lemma buggy (P : SProp) : Prop1 -> P -> P. |
| 10 |
Proof. |
| 11 |
intros HO. |
| 12 |
apply equiv in HO. |
| 13 |
refine (fun x => x). |
| 14 |
Qed. (* Bad relevance in case annotation. [bad-relevance,debug] *) |
| 15 |
|
| 16 |
End Test1. |
| 17 |
|
| 18 |
Module Test2. |
| 19 |
|
| 20 |
Axiom Type1 : Type. |
| 21 |
Axiom Type2 : Type. |
| 22 |
Axiom equiv : inhabited (Type1 -> Type1). |
| 23 |
|
| 24 |
Lemma buggy (P : Prop) : Type1 -> True. |
| 25 |
Proof. |
| 26 |
intros H. |
| 27 |
Fail apply equiv in H. |
| 28 |
Abort. |
| 29 |
|
| 30 |
End Test2. |
| 31 |
|
| 32 |
Module Test3. |
| 33 |
|
| 34 |
Axiom In : forall [A : Type] (a : A) (l : list A), Prop. |
| 35 |
Definition all_equiv (l: list Prop) := forall x y, In x l -> In y l -> (x <-> y). |
| 36 |
|
| 37 |
Axiom last : forall [A : Type], list A -> A -> A. |
| 38 |
Axiom in_eq : forall [A : Type] (a : A) (l : list A), In a (a :: l). |
| 39 |
Axiom in_last : forall [A : Type] (a b : A) (l : list A), In (last (b :: l) a) (a :: b :: l). |
| 40 |
|
| 41 |
(* Check that apply in handles correctly binders in the lemma *) |
| 42 |
Goal forall (b : Prop) (l : list Prop) (a : Prop) |
| 43 |
(H : all_equiv (a :: b :: l)), last (b :: l) a -> a. |
| 44 |
Proof. |
| 45 |
intros b l a H. |
| 46 |
apply H. |
| 47 |
+ apply in_eq. |
| 48 |
+ apply in_last. |
| 49 |
Qed. |
| 50 |
|
| 51 |
End Test3. |