# HG changeset patch # User Christian Urban # Date 1235600021 0 # Node ID 84d1392186d3b27629a91adda89d9bf1e5f05ef1 # Parent 6dafb0815ae61dd10a4eb91864f4712c88b04de4 deleted Ad-hoc recipe diff -r 6dafb0815ae6 -r 84d1392186d3 CookBook/ROOT.ML --- a/CookBook/ROOT.ML Wed Feb 25 21:55:08 2009 +0000 +++ b/CookBook/ROOT.ML Wed Feb 25 22:13:41 2009 +0000 @@ -16,7 +16,6 @@ use_thy "Appendix"; use_thy "Recipes/NamedThms"; -use_thy "Recipes/Transformation"; use_thy "Recipes/Antiquotes"; use_thy "Recipes/TimeLimit"; use_thy "Recipes/Config"; diff -r 6dafb0815ae6 -r 84d1392186d3 CookBook/Recipes/Transformation.thy --- a/CookBook/Recipes/Transformation.thy Wed Feb 25 21:55:08 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ - -theory Transformation -imports Main -begin - - -section {* Ad-hoc Transformations of Theorems *} - - - -end - - - - diff -r 6dafb0815ae6 -r 84d1392186d3 CookBook/Tactical.thy --- a/CookBook/Tactical.thy Wed Feb 25 21:55:08 2009 +0000 +++ b/CookBook/Tactical.thy Wed Feb 25 22:13:41 2009 +0000 @@ -1494,8 +1494,8 @@ "\P. True \ P \ Foo \ \P. P \ Foo"} The conversion that goes under an application is - @{ML Conv.combination_conv}. It expects two conversions, which each of them - is applied to the corresponding ``branch'' of the application. + @{ML Conv.combination_conv}. It expects two conversions as arguments, + each of which is applied to the corresponding ``branch'' of the application. We can now apply all these functions in a conversion that recursively descends a term and applies a conversion in all @@ -1598,8 +1598,8 @@ end)*} text {* - We call the conversions with the argument @{ML "~1"} in order to - analyse all parameters, premises and conclusions. If we call it with + We call the conversions with the argument @{ML "~1"}. This is to + analyse all parameters, premises and conclusions. If we call them with a non-negative number, say @{text n}, then these conversions will only be called on @{text n} premises (similar for parameters and conclusions). To test the tactic, consider the proof @@ -1607,7 +1607,7 @@ lemma "if True \ P then P else True \ False \ - (if True \ Q then Q else P) \ True \ (True \ Q)" + (if True \ Q then True \ Q else P) \ True \ (True \ Q)" apply(tactic {* true1_tac 1 *}) txt {* where the tactic yields the goal state @@ -1617,6 +1617,9 @@ (*<*)oops(*>*) text {* + As you can see, the premises are rewritten according to @{ML if_true1_conv}, while + the conclusion according to @{ML all_true1_conv}. + To sum up this section, conversions are not as powerful as the simplifier and simprocs; the advantage of conversions, however, is that you never have to worry about non-termination. diff -r 6dafb0815ae6 -r 84d1392186d3 cookbook.pdf Binary file cookbook.pdf has changed