469 fun op addsimps2 arg = pair_upd2 (op addsimps) arg; |
469 fun op addsimps2 arg = pair_upd2 (op addsimps) arg; |
470 fun op delsimps2 arg = pair_upd2 (op delsimps) arg; |
470 fun op delsimps2 arg = pair_upd2 (op delsimps) arg; |
471 fun op addcongs2 arg = pair_upd2 (op addcongs) arg; |
471 fun op addcongs2 arg = pair_upd2 (op addcongs) arg; |
472 fun op delcongs2 arg = pair_upd2 (op delcongs) arg; |
472 fun op delcongs2 arg = pair_upd2 (op delcongs) arg; |
473 |
473 |
474 fun auto_tac (cs,ss) = |
474 fun mk_auto_tac (cs, ss) m n = |
475 let val cs' = cs addss ss |
475 let val cs' = cs addss ss |
476 in EVERY [TRY (safe_tac cs'), |
476 val bdt = Blast.depth_tac cs m; |
477 REPEAT (FIRSTGOAL (fast_tac cs')), |
477 fun blast_depth_tac i thm = bdt i thm handle Blast.TRANS s => |
|
478 (warning ("Blast_tac: " ^ s); Seq.empty); |
|
479 val maintac = |
|
480 blast_depth_tac (*fast but can't use addss*) |
|
481 ORELSE' |
|
482 depth_tac cs' n; (*slower but general*) |
|
483 in EVERY [ALLGOALS (asm_full_simp_tac ss), |
|
484 TRY (safe_tac cs'), |
|
485 REPEAT (FIRSTGOAL maintac), |
478 TRY (safe_tac (cs addSss ss)), |
486 TRY (safe_tac (cs addSss ss)), |
479 prune_params_tac] |
487 prune_params_tac] |
480 end; |
488 end; |
481 |
489 |
482 fun Auto_tac () = auto_tac (claset(), simpset()); |
490 fun auto_tac (cs,ss) = mk_auto_tac (cs,ss) 4 2; |
483 |
491 |
484 fun auto () = by (Auto_tac ()); |
492 fun Auto_tac st = auto_tac (claset(), simpset()) st; |
|
493 |
|
494 fun auto () = by Auto_tac; |