1 |
1 |
2 (* call_sim_tac invokes oracle "Sim" *) |
2 (* call_sim_tac invokes oracle "Sim" *) |
3 fun call_sim_tac thm_list i state = |
3 fun call_sim_tac thm_list i state = |
4 let val sign = #sign (rep_thm state); |
4 let val sign = #sign (rep_thm state); |
5 val (subgoal::_) = drop(i-1,prems_of state); |
5 val (subgoal::_) = Library.drop(i-1,prems_of state); |
6 val OraAss = invoke_oracle MuIOAOracle.thy "Sim" (sign,SimOracleExn (subgoal,thm_list)); |
6 val OraAss = invoke_oracle MuIOAOracle.thy "Sim" (sign,SimOracleExn (subgoal,thm_list)); |
7 in |
7 in |
8 (cut_facts_tac [OraAss] i) state |
8 (cut_facts_tac [OraAss] i) state |
9 end; |
9 end; |
10 |
10 |
11 (* is_sim_tac makes additionally to call_sim_tac some simplifications, |
11 (* is_sim_tac makes additionally to call_sim_tac some simplifications, |
12 which are suitable for implementation realtion formulas *) |
12 which are suitable for implementation realtion formulas *) |
13 fun is_sim_tac thm_list i state = |
13 fun is_sim_tac thm_list i state = |
14 let val sign = #sign (rep_thm state); |
14 let val sign = #sign (rep_thm state); |
15 in |
15 in |
16 case drop(i-1,prems_of state) of |
16 case Library.drop(i-1,prems_of state) of |
17 [] => PureGeneral.Seq.empty | |
17 [] => PureGeneral.Seq.empty | |
18 subgoal::_ => EVERY[REPEAT(etac thin_rl i), |
18 subgoal::_ => EVERY[REPEAT(etac thin_rl i), |
19 simp_tac (simpset() addsimps [ioa_implements_def]) i, |
19 simp_tac (simpset() addsimps [ioa_implements_def]) i, |
20 rtac conjI i, |
20 rtac conjI i, |
21 rtac conjI (i+1), |
21 rtac conjI (i+1), |