defs/notes: more robust transitivity reasoning;
authorwenzelm
Thu, 14 Dec 2006 15:31:22 +0100
changeset 21845 da545169fe06
parent 21844 e10b8bd7a886
child 21846 c898fdd6ff2d
defs/notes: more robust transitivity reasoning;
src/Pure/Isar/theory_target.ML
--- a/src/Pure/Isar/theory_target.ML	Thu Dec 14 15:31:21 2006 +0100
+++ b/src/Pure/Isar/theory_target.ML	Thu Dec 14 15:31:22 2006 +0100
@@ -121,12 +121,9 @@
 
 (* defs *)
 
-local
+
 
-infix also;
-
-fun eq1 also eq2 =
-  eq2 COMP (eq1 COMP (Drule.incr_indexes2 eq1 eq2 transitive_thm));
+local
 
 fun expand_term ctxt t =
   let
@@ -157,10 +154,10 @@
         val (def, lthy3) = lthy2
           |> LocalTheory.theory_result (add_def (name', Logic.mk_equals (lhs', rhs')));
 
-        val eq =
-          (*c == loc.c xs*) lhs_def
-          (*lhs' == rhs'*)  also def
-          (*rhs' == rhs*)   also Thm.symmetric rhs_conv;
+        val eq = LocalDefs.trans_terms lthy3
+          [(*c == loc.c xs*) lhs_def,
+           (*lhs' == rhs'*)  def,
+           (*rhs' == rhs*)   Thm.symmetric rhs_conv];
       in ((lhs, ((name', atts), [([eq], [])])), lthy3) end;
 
     val ((lhss, facts), lthy') = lthy0 |> fold_map def args |>> split_list;
@@ -246,7 +243,7 @@
     val result'' =
       (case SINGLE (Seq.INTERVAL assm_tac 1 nprems) result' of
         NONE => raise THM ("Failed to re-import result", 0, [result'])
-      | SOME res => res) COMP (concl_conv COMP_INCR Drule.equal_elim_rule2)
+      | SOME res => LocalDefs.trans_props ctxt [res, Thm.symmetric concl_conv])
       |> Goal.norm_result
       |> PureThy.name_thm false false name;