| 1 |
(* Test pattern with dependent occurrences; Note that it does not |
| 2 |
behave as the succession of three generalize because each |
| 3 |
quantification introduces new occurrences that are automatically |
| 4 |
abstracted with the numbering still based on the original statement *) |
| 5 |
|
| 6 |
Goal (id true,id false)=(id true,id true). |
| 7 |
generalize bool at 2 4 6 8 10 as B, true at 3 as tt, false as ff. |
| 8 |
Abort. |
| 9 |
|
| 10 |
(* Check use of occurrences in hypotheses for a reduction tactic such |
| 11 |
as pattern *) |
| 12 |
|
| 13 |
(* Did not work in 8.2 *) |
| 14 |
Goal 0=0->True. |
| 15 |
intro H. |
| 16 |
pattern 0 in H at 2. |
| 17 |
set (f n := 0 = n) in H. (* check pattern worked correctly *) |
| 18 |
Abort. |
| 19 |
|
| 20 |
(* Syntactic variant which was working in 8.2 *) |
| 21 |
Goal 0=0->True. |
| 22 |
intro H. |
| 23 |
pattern 0 at 2 in H. |
| 24 |
set (f n := 0 = n) in H. (* check pattern worked correctly *) |
| 25 |
Abort. |
| 26 |
|
| 27 |
(* Ambiguous occurrence selection *) |
| 28 |
Goal 0=0->True. |
| 29 |
intro H. |
| 30 |
pattern 0 at 1 in H at 2 || exact I. (* check pattern fails *) |
| 31 |
Qed. |
| 32 |
|
| 33 |
(* Ambiguous occurrence selection *) |
| 34 |
Goal 0=1->True. |
| 35 |
intro H. |
| 36 |
pattern 0, 1 in H at 1 2 || exact I. (* check pattern fails *) |
| 37 |
Qed. |
| 38 |
|
| 39 |
(* Occurrence selection shared over hypotheses is difficult to advocate and |
| 40 |
hence no longer allowed *) |
| 41 |
Goal 0=1->1=0->True. |
| 42 |
intros H1 H2. |
| 43 |
pattern 0 at 1, 1 in H1, H2 || exact I. (* check pattern fails *) |
| 44 |
Qed. |
| 45 |
|
| 46 |
(* Test catching of reduction tactics errors (was not the case in 8.2) *) |
| 47 |
Goal eq_refl 0 = eq_refl 0. |
| 48 |
pattern 0 at 1 || reflexivity. |
| 49 |
Qed. |