| 1 |
(* Some boilerplate *) |
| 2 |
Fixpoint fib n := match n with |
| 3 |
| O => 1 |
| 4 |
| S m => match m with |
| 5 |
| O => 1 |
| 6 |
| S o => fib o + fib m end end. |
| 7 |
|
| 8 |
Ltac sleep n := |
| 9 |
try (cut (fib n = S (fib n)); reflexivity). |
| 10 |
|
| 11 |
(* Tune that depending on your PC *) |
| 12 |
Let time := 18. |
| 13 |
|
| 14 |
|
| 15 |
(* Beginning of demo *) |
| 16 |
|
| 17 |
Section Demo. |
| 18 |
|
| 19 |
Variable i : True. |
| 20 |
|
| 21 |
Lemma a : True. |
| 22 |
Proof using i. |
| 23 |
sleep time. |
| 24 |
idtac. |
| 25 |
sleep time. |
| 26 |
(* Error, jump back to fix it, then Qed again *) |
| 27 |
exact (i i). |
| 28 |
Qed. |
| 29 |
|
| 30 |
Lemma b : True. |
| 31 |
Proof using i. |
| 32 |
sleep time. |
| 33 |
idtac. |
| 34 |
sleep time. |
| 35 |
(* Here we use "a" *) |
| 36 |
exact a. |
| 37 |
Qed. |
| 38 |
|
| 39 |
Lemma work_here : True /\ True. |
| 40 |
Proof using i. |
| 41 |
(* Jump directly here, Coq reacts immediately *) |
| 42 |
split. |
| 43 |
exact b. (* We can use the lemmas above *) |
| 44 |
exact a. |
| 45 |
Qed. |
| 46 |
|
| 47 |
End Demo. |