| 1 |
Arguments plus : simpl never. |
| 2 |
|
| 3 |
Lemma test1 P : P 3 -> P (1 + 2). |
| 4 |
Proof. |
| 5 |
intros p3. |
| 6 |
simpl. |
| 7 |
match goal with |- P (_ + _) => idtac "ok" end. |
| 8 |
assumption. |
| 9 |
Qed. |
| 10 |
|
| 11 |
Definition plus' := plus. |
| 12 |
|
| 13 |
Lemma test2 P : P 3 -> P (plus' 1 2). |
| 14 |
Proof. |
| 15 |
intros p3. |
| 16 |
simpl. |
| 17 |
match goal with |- P (plus' _ _) => idtac "ok" end. |
| 18 |
assumption. |
| 19 |
Qed. |
| 20 |
|
| 21 |
Lemma test3 P : P 3 -> P (1 + 2). |
| 22 |
Proof. |
| 23 |
intros p3. |
| 24 |
pose (plus'' := plus). |
| 25 |
assert (P (plus'' 1 2)). |
| 26 |
simpl. |
| 27 |
match goal with |- P (plus'' _ _) => idtac "ok" end. |
| 28 |
assumption. |
| 29 |
assumption. |
| 30 |
Qed. |
| 31 |
|
| 32 |
Fixpoint rec_id (x : nat) := match x with O => O | S p => S (rec_id p) end. |
| 33 |
|
| 34 |
Arguments rec_id : simpl never. |
| 35 |
|
| 36 |
Lemma test4 P : P 3 -> P (rec_id 3). |
| 37 |
Proof. |
| 38 |
intros p3. |
| 39 |
simpl. |
| 40 |
match goal with |- P (rec_id _) => idtac "ok" end. |
| 41 |
assumption. |
| 42 |
Qed. |
| 43 |
|
| 44 |
Arguments rec_id ! _ / . |
| 45 |
Lemma test5 P : P 3 -> P (rec_id 3). |
| 46 |
Proof. |
| 47 |
intros p3. |
| 48 |
simpl. |
| 49 |
match goal with |- P 3 => idtac "ok" end. |
| 50 |
assumption. |
| 51 |
Qed. |