equal
deleted
inserted
replaced
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 () => Display.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 = TRACE ctxt rl (if upd then eresolve_tac [rl] else ematch_tac ctxt [rl]); |
491 fun emtac ctxt upd rl = |
492 fun rmtac ctxt upd rl = TRACE ctxt rl (if upd then resolve_tac [rl] else match_tac ctxt [rl]); |
492 TRACE ctxt rl (if upd then eresolve_tac ctxt [rl] else ematch_tac ctxt [rl]); |
|
493 |
|
494 fun rmtac ctxt upd rl = |
|
495 TRACE ctxt rl (if upd then resolve_tac ctxt [rl] else match_tac ctxt [rl]); |
493 |
496 |
494 (*Tableau rule from elimination rule. |
497 (*Tableau rule from elimination rule. |
495 Flag "upd" says that the inference updated the branch. |
498 Flag "upd" says that the inference updated the branch. |
496 Flag "dup" requests duplication of the affected formula.*) |
499 Flag "dup" requests duplication of the affected formula.*) |
497 fun fromRule (state as State {ctxt, ...}) vars rl = |
500 fun fromRule (state as State {ctxt, ...}) vars rl = |
622 There can be at most one--this function could be made more efficient.*) |
625 There can be at most one--this function could be made more efficient.*) |
623 fun negOfGoals pairs = map (fn (Gs,haz) => (map negOfGoal2 Gs, haz)) pairs; |
626 fun negOfGoals pairs = map (fn (Gs,haz) => (map negOfGoal2 Gs, haz)) pairs; |
624 |
627 |
625 (*Tactic. Convert *Goal* to negated assumption in FIRST position*) |
628 (*Tactic. Convert *Goal* to negated assumption in FIRST position*) |
626 fun negOfGoal_tac ctxt i = |
629 fun negOfGoal_tac ctxt i = |
627 TRACE ctxt Data.ccontr (resolve_tac [Data.ccontr]) i THEN rotate_tac ~1 i; |
630 TRACE ctxt Data.ccontr (resolve_tac ctxt [Data.ccontr]) i THEN rotate_tac ~1 i; |
628 |
631 |
629 fun traceTerm ctxt t = |
632 fun traceTerm ctxt t = |
630 let val thy = Proof_Context.theory_of ctxt |
633 let val thy = Proof_Context.theory_of ctxt |
631 val t' = norm (negOfGoal t) |
634 val t' = norm (negOfGoal t) |
632 val stm = string_of ctxt 8 t' |
635 val stm = string_of ctxt 8 t' |