src/Provers/blast.ML
changeset 61268 abe08fb15a12
parent 61056 e9d08b88d2cc
child 61413 6d892287d0e9
equal deleted inserted replaced
61267:0b6217fda81b 61268:abe08fb15a12
   482 
   482 
   483 fun cond_tracing true msg = tracing (msg ())
   483 fun cond_tracing true msg = tracing (msg ())
   484   | cond_tracing false _ = ();
   484   | cond_tracing false _ = ();
   485 
   485 
   486 fun TRACE ctxt rl tac i st =
   486 fun TRACE ctxt rl tac i st =
   487   (cond_tracing (Config.get ctxt trace) (fn () => Display.string_of_thm ctxt rl); tac i st);
   487   (cond_tracing (Config.get ctxt trace) (fn () => Thm.string_of_thm ctxt rl); tac i st);
   488 
   488 
   489 (*Resolution/matching tactics: if upd then the proof state may be updated.
   489 (*Resolution/matching tactics: if upd then the proof state may be updated.
   490   Matching makes the tactics more deterministic in the presence of Vars.*)
   490   Matching makes the tactics more deterministic in the presence of Vars.*)
   491 fun emtac ctxt upd rl =
   491 fun emtac ctxt upd rl =
   492   TRACE ctxt rl (if upd then eresolve_tac ctxt [rl] else ematch_tac ctxt [rl]);
   492   TRACE ctxt rl (if upd then eresolve_tac ctxt [rl] else ematch_tac ctxt [rl]);
   507       rot_subgoals_tac (rot, #2 trl) i
   507       rot_subgoals_tac (rot, #2 trl) i
   508   in SOME (trl, tac) end
   508   in SOME (trl, tac) end
   509   handle
   509   handle
   510     ElimBadPrem => (*reject: prems don't preserve conclusion*)
   510     ElimBadPrem => (*reject: prems don't preserve conclusion*)
   511       (if Context_Position.is_visible ctxt then
   511       (if Context_Position.is_visible ctxt then
   512         warning ("Ignoring weak elimination rule\n" ^ Display.string_of_thm ctxt rl0)
   512         warning ("Ignoring weak elimination rule\n" ^ Thm.string_of_thm ctxt rl0)
   513        else ();
   513        else ();
   514        Option.NONE)
   514        Option.NONE)
   515   | ElimBadConcl => (*ignore: conclusion is not just a variable*)
   515   | ElimBadConcl => (*ignore: conclusion is not just a variable*)
   516       (cond_tracing (Config.get ctxt trace)
   516       (cond_tracing (Config.get ctxt trace)
   517         (fn () => "Ignoring ill-formed elimination rule:\n" ^
   517         (fn () => "Ignoring ill-formed elimination rule:\n" ^
   518           "conclusion should be a variable\n" ^ Display.string_of_thm ctxt rl0);
   518           "conclusion should be a variable\n" ^ Thm.string_of_thm ctxt rl0);
   519        Option.NONE);
   519        Option.NONE);
   520 
   520 
   521 
   521 
   522 (*** Conversion of Introduction Rules ***)
   522 (*** Conversion of Introduction Rules ***)
   523 
   523