added cterm_rule;
authorwenzelm
Fri, 24 Nov 2006 22:05:15 +0100
changeset 21519 33f109ea389f
parent 21518 571b8cd087f8
child 21520 63c73f461eec
added cterm_rule;
src/Pure/drule.ML
--- a/src/Pure/drule.ML	Fri Nov 24 22:05:14 2006 +0100
+++ b/src/Pure/drule.ML	Fri Nov 24 22:05:15 2006 +0100
@@ -128,6 +128,7 @@
   val termI: thm
   val mk_term: cterm -> thm
   val dest_term: thm -> cterm
+  val cterm_rule: (thm -> thm) -> cterm -> cterm
   val term_rule: theory -> (thm -> thm) -> term -> term
   val sort_triv: theory -> typ * sort -> thm list
   val unconstrainTs: thm -> thm
@@ -968,8 +969,8 @@
     else raise THM ("dest_term", 0, [th])
   end;
 
-fun term_rule thy f t =
-  Thm.term_of (dest_term (f (mk_term (Thm.cterm_of thy t))));
+fun cterm_rule f = dest_term o f o mk_term;
+fun term_rule thy f t = Thm.term_of (cterm_rule f (Thm.cterm_of thy t));