diff options
Diffstat (limited to 'theories/Init/Tactics.v')
| -rw-r--r-- | theories/Init/Tactics.v | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/theories/Init/Tactics.v b/theories/Init/Tactics.v index 29ec5f8882..de38e88c14 100644 --- a/theories/Init/Tactics.v +++ b/theories/Init/Tactics.v @@ -49,23 +49,23 @@ Ltac contradict name := end end). -(* to contradict an hypothesis without copying its type. *) +(* Transforming a negative goal [ H:~A |- ~B ] into a positive one [ B |- A ]*) + +Ltac swap H := + idtac "swap is OBSOLETE: use contradict instead."; + intro; apply H; clear H. +(* to contradict an hypothesis without copying its type. *) Ltac absurd_hyp h := - (* idtac "absurd_hyp is OBSOLETE: use contradict instead."; *) + idtac "contradict is OBSOLETE: use contradict instead."; let T := type of h in absurd T. -(* A useful complement to absurd_hyp. Here t : ~ A where H : A. *) -Ltac false_hyp H t := -absurd_hyp H; [apply t | assumption]. - -(* Transforming a negative goal [ H:~A |- ~B ] into a positive one [ B |- A ]*) +(* A useful complement to contradict. Here t : ~ A where H : A. *) -Ltac swap H := - (* idtac "swap is OBSOLETE: use contradict instead."; *) - intro; apply H; clear H. +Ltac false_hyp h t := + let T := type of h in absurd T; [ apply t | assumption ]. (* A case with no loss of information. *) |
