equal
deleted
inserted
replaced
275 - Resolve with enabledI and do some rewriting. |
275 - Resolve with enabledI and do some rewriting. |
276 - Solve for the unknowns using standard HOL reasoning. |
276 - Solve for the unknowns using standard HOL reasoning. |
277 The following tactic combines these steps except the final one. |
277 The following tactic combines these steps except the final one. |
278 *) |
278 *) |
279 |
279 |
280 fun enabled_tac (cs, ss) base_vars = |
280 fun enabled_tac ctxt base_vars = |
281 clarsimp_tac (cs addSIs [base_vars RS @{thm base_enabled}], ss); |
281 clarsimp_tac (claset_of ctxt addSIs [base_vars RS @{thm base_enabled}], simpset_of ctxt); |
282 *} |
282 *} |
|
283 |
|
284 method_setup enabled = {* |
|
285 Attrib.thm >> (fn th => fn ctxt => SIMPLE_METHOD' (enabled_tac ctxt th)) |
|
286 *} "" |
283 |
287 |
284 (* Example *) |
288 (* Example *) |
285 |
289 |
286 lemma |
290 lemma |
287 assumes "basevars (x,y,z)" |
291 assumes "basevars (x,y,z)" |
288 shows "|- x --> Enabled ($x & (y$ = #False))" |
292 shows "|- x --> Enabled ($x & (y$ = #False))" |
289 apply (tactic {* enabled_tac @{clasimpset} @{thm assms} 1 *}) |
293 apply (enabled assms) |
290 apply auto |
294 apply auto |
291 done |
295 done |
292 |
296 |
293 end |
297 end |