| 1 |
Require Program.Tactics. |
| 2 |
|
| 3 |
Set Suggest Proof Using. |
| 4 |
Set Warnings "-opaque-let". |
| 5 |
|
| 6 |
Lemma nosec : nat. Proof. exact 0. Qed. |
| 7 |
|
| 8 |
Lemma nosec_exactproof : bool. Proof false. |
| 9 |
|
| 10 |
Program Definition nosec_program : nat := _. |
| 11 |
Next Obligation. exact 1. Qed. |
| 12 |
|
| 13 |
Lemma nosec_abstract : nat. |
| 14 |
Proof. abstract exact 3. Defined. |
| 15 |
|
| 16 |
Section Sec. |
| 17 |
Variables A B : Type. |
| 18 |
|
| 19 |
(* Some normal lemma. *) |
| 20 |
Lemma Nat : Set. |
| 21 |
Proof. |
| 22 |
exact nat. |
| 23 |
Qed. |
| 24 |
|
| 25 |
(* Make sure All is suggested even though we add an unused variable |
| 26 |
to the context. *) |
| 27 |
Let foo : Type. |
| 28 |
Proof. |
| 29 |
exact (A -> B). |
| 30 |
Qed. |
| 31 |
|
| 32 |
(* Having a [Proof using] disables the suggestion message. *) |
| 33 |
Definition bar : Type. |
| 34 |
Proof using A. |
| 35 |
exact A. |
| 36 |
Qed. |
| 37 |
|
| 38 |
(* Transparent definitions don't get a suggestion message. *) |
| 39 |
Definition baz : Type. |
| 40 |
Proof. |
| 41 |
exact A. |
| 42 |
Defined. |
| 43 |
|
| 44 |
(* No suggest, is this OK? There's nowhere to put it anyway. *) |
| 45 |
Program Definition program : nat := _. |
| 46 |
Next Obligation. exact 1. Qed. |
| 47 |
|
| 48 |
(* Must not suggest *) |
| 49 |
Lemma sec_abstract : nat. |
| 50 |
Proof. abstract exact 3. Defined. |
| 51 |
|
| 52 |
(* Suggests even though there's nowhere to put it, bug? *) |
| 53 |
Lemma sec_exactproof : bool. Proof true. |
| 54 |
|
| 55 |
End Sec. |