| 1 |
(************************************************************************) |
| 2 |
(* * The Rocq Prover / The Rocq Development Team *) |
| 3 |
(* v * Copyright INRIA, CNRS and contributors *) |
| 4 |
(* <O___,, * (see version control and CREDITS file for authors & dates) *) |
| 5 |
(* \VV/ **************************************************************) |
| 6 |
(* // * This file is distributed under the terms of the *) |
| 7 |
(* * GNU Lesser General Public License Version 2.1 *) |
| 8 |
(* * (see LICENSE file for the text of the license) *) |
| 9 |
(************************************************************************) |
| 10 |
|
| 11 |
Require Import ssrmatching. |
| 12 |
|
| 13 |
(*Set Debug SsrMatching.*) |
| 14 |
|
| 15 |
Tactic Notation "at" "[" ssrpatternarg(pat) "]" tactic(t) := |
| 16 |
let name := fresh in |
| 17 |
let def_name := fresh in |
| 18 |
ssrpattern pat; |
| 19 |
intro name; |
| 20 |
pose proof (refl_equal name) as def_name; |
| 21 |
unfold name at 1 in def_name; |
| 22 |
t def_name; |
| 23 |
[ rewrite <- def_name | idtac.. ]; |
| 24 |
clear name def_name. |
| 25 |
|
| 26 |
Lemma test (H : True -> True -> 3 = 7) : 28 = 3 * 4. |
| 27 |
Proof. |
| 28 |
at [ X in X * 4 ] ltac:(fun place => rewrite -> H in place). |
| 29 |
- reflexivity. |
| 30 |
- trivial. |
| 31 |
- trivial. |
| 32 |
Qed. |