equal
deleted
inserted
replaced
38 val dtac : thm -> int ->tactic |
38 val dtac : thm -> int ->tactic |
39 val etac : thm -> int ->tactic |
39 val etac : thm -> int ->tactic |
40 val eq_assume_tac : int -> tactic |
40 val eq_assume_tac : int -> tactic |
41 val ematch_tac : thm list -> int -> tactic |
41 val ematch_tac : thm list -> int -> tactic |
42 val eresolve_tac : thm list -> int -> tactic |
42 val eresolve_tac : thm list -> int -> tactic |
43 val eres_inst_tac : (string*string)list -> thm -> int -> tactic |
43 val eres_inst_tac : (string*string)list -> thm -> int -> tactic |
|
44 val filter_prems_tac : (term -> bool) -> int -> tactic |
44 val filter_thms : (term*term->bool) -> int*term*thm list -> thm list |
45 val filter_thms : (term*term->bool) -> int*term*thm list -> thm list |
45 val filt_resolve_tac : thm list -> int -> int -> tactic |
46 val filt_resolve_tac : thm list -> int -> int -> tactic |
46 val flexflex_tac : tactic |
47 val flexflex_tac : tactic |
47 val fold_goals_tac : thm list -> tactic |
48 val fold_goals_tac : thm list -> tactic |
48 val fold_tac : thm list -> tactic |
49 val fold_tac : thm list -> tactic |
561 (*rotate_tac n i: rotate the assumptions of subgoal i by n positions, from |
562 (*rotate_tac n i: rotate the assumptions of subgoal i by n positions, from |
562 right to left if n is positive, and from left to right if n is negative.*) |
563 right to left if n is positive, and from left to right if n is negative.*) |
563 fun rotate_tac 0 i = all_tac |
564 fun rotate_tac 0 i = all_tac |
564 | rotate_tac k i = PRIMITIVE (rotate_rule k i); |
565 | rotate_tac k i = PRIMITIVE (rotate_rule k i); |
565 |
566 |
|
567 (* remove premises that do not satisfy p; fails if all prems satisfy p *) |
|
568 fun filter_prems_tac p = |
|
569 let fun Then None tac = Some tac |
|
570 | Then (Some tac) tac' = Some(tac THEN' tac'); |
|
571 fun thins ((tac,n),H) = |
|
572 if p H then (tac,n+1) |
|
573 else (Then tac (rotate_tac n THEN' etac thin_rl),0); |
|
574 in SUBGOAL(fn (subg,n) => |
|
575 let val Hs = Logic.strip_assums_hyp subg |
|
576 in case fst(foldl thins ((None,0),Hs)) of |
|
577 None => no_tac | Some tac => tac n |
|
578 end) |
|
579 end; |
|
580 |
566 end; |
581 end; |
567 |
582 |
568 open Tactic; |
583 open Tactic; |