src/Pure/old_goals.ML
changeset 23239 3648e97da60b
parent 22826 0f4c501a691e
child 23635 e31a814c080a
equal deleted inserted replaced
23238:3de6e253efc4 23239:3648e97da60b
   155       val _ = legacy_feature "old goal command";
   155       val _ = legacy_feature "old goal command";
   156       val {thy, t=horn,...} = rep_cterm chorn;
   156       val {thy, t=horn,...} = rep_cterm chorn;
   157       val _ = Term.no_dummy_patterns horn handle TERM (msg, _) => error msg;
   157       val _ = Term.no_dummy_patterns horn handle TERM (msg, _) => error msg;
   158       val (As, B) = Logic.strip_horn horn;
   158       val (As, B) = Logic.strip_horn horn;
   159       val atoms = atomic andalso
   159       val atoms = atomic andalso
   160             forall (fn t => not (can Logic.dest_implies t orelse Logic.is_all t)) As;
   160             forall (fn t => not (can Logic.dest_implies t orelse can Logic.dest_all t)) As;
   161       val (As,B) = if atoms then ([],horn) else (As,B);
   161       val (As,B) = if atoms then ([],horn) else (As,B);
   162       val cAs = map (cterm_of thy) As;
   162       val cAs = map (cterm_of thy) As;
   163       val prems = map (rewrite_rule rths o forall_elim_vars 0 o Thm.assume) cAs;
   163       val prems = map (rewrite_rule rths o forall_elim_vars 0 o Thm.assume) cAs;
   164       val cB = cterm_of thy B;
   164       val cB = cterm_of thy B;
   165       val st0 = let val st = Goal.init cB |> fold Thm.weaken cAs
   165       val st0 = let val st = Goal.init cB |> fold Thm.weaken cAs