| 1 |
Require Import ssreflect. |
| 2 |
|
| 3 |
Ltac fancy := case; last first. |
| 4 |
|
| 5 |
Notation fancy := (ltac:( fancy )). |
| 6 |
|
| 7 |
Ltac replicate n := |
| 8 |
let what := fresh "_replicate_" in |
| 9 |
move=> what; do n! [ have := what ]; clear what. |
| 10 |
|
| 11 |
Notation replicate n := (ltac:( replicate n )). |
| 12 |
|
| 13 |
Lemma foo x (w : nat) (J : bool -> nat -> nat) : exists y, x=0+y. |
| 14 |
Proof. |
| 15 |
move: (w) => /ltac:(idtac) _. |
| 16 |
move: w => /(replicate 6) w1 w2 w3 w4 w5 w6. |
| 17 |
move: w1 => /J/fancy [w'||];last exact: false. |
| 18 |
move: w' => /J/fancy[w''||]; last exact: false. |
| 19 |
by exists x. |
| 20 |
by exists x. |
| 21 |
by exists x. |
| 22 |
Qed. |
| 23 |
|
| 24 |
Ltac unfld what := rewrite /what. |
| 25 |
|
| 26 |
Notation "% n" := (ltac:( unfld n )) (at level 1) : ssripat_scope. |
| 27 |
Notation "% n" := n : nat_scope. |
| 28 |
|
| 29 |
Open Scope nat_scope. |
| 30 |
|
| 31 |
|
| 32 |
Definition def := 4. |
| 33 |
|
| 34 |
Lemma test : True -> def = 4. |
| 35 |
Proof. |
| 36 |
move=> _ /(% def). |
| 37 |
match goal with |- 4 = 4 => reflexivity end. |
| 38 |
Qed. |