deleted Ad-hoc recipe
authorChristian Urban <urbanc@in.tum.de>
Wed, 25 Feb 2009 22:13:41 +0000
changeset 148 84d1392186d3
parent 147 6dafb0815ae6
child 149 253ea99c1441
deleted Ad-hoc recipe
CookBook/ROOT.ML
CookBook/Recipes/Transformation.thy
CookBook/Tactical.thy
cookbook.pdf
--- 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";
--- 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
-  
-
-
-
--- 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 @@
   "\<lambda>P. True \<and> P \<and> Foo \<equiv> \<lambda>P. P \<and> 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 \<and> P then P else True \<and> False \<Longrightarrow>
-  (if True \<and> Q then Q else P) \<longrightarrow> True \<and> (True \<and> Q)"
+  (if True \<and> Q then True \<and> Q else P) \<longrightarrow> True \<and> (True \<and> 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.
Binary file cookbook.pdf has changed