(* ================ Functions to "unlift" action theorems into HOL rules ================ *)
ML \<open> (* The following functions are specialized versions of the corresponding functions defined in Intensional.ML in that they introduce a "world" parameter of the form (s,t) and apply additional rewrites.
*)
lemma idle_squareI: "(s,t) \ unchanged v \ (s,t) \ [A]_v" by (simp add: square_def)
lemma busy_squareI: "(s,t) \ A \ (s,t) \ [A]_v" by (simp add: square_def)
lemma squareE [elim]: "\ (s,t) \ [A]_v; A (s,t) \ B (s,t); v t = v s \ B (s,t) \ \ B (s,t)" apply (unfold square_def action_rews) apply (erule disjE) apply simp_all done
lemma squareCI [intro]: "\ v t \ v s \ A (s,t) \ \ (s,t) \ [A]_v" apply (unfold square_def action_rews) apply (rule disjCI) apply (erule (1) meta_mp) done
lemma angleI [intro]: "\s t. \ A (s,t); v t \ v s \ \ (s,t) \_v" by (simp add: angle_def)
ML \<open> (* A dumb simplification-based tactic with just a little first-order logic: should plug in only "very safe" rules that can be applied blindly. Note that it applies whatever simplifications are currently active.
*) fun action_simp_tac ctxt intros elims =
asm_full_simp_tac
(ctxt |> Simplifier.set_loop (fn _ => (resolve_tac ctxt ((map (action_use ctxt) intros)
@ [refl,impI,conjI,@{thm actionI},@{thm intI},allI]))
ORELSE' (eresolve_tac ctxt ((map (action_use ctxt) elims)
@ [conjE,disjE,exE])))); \<close>
(* ---------------- enabled_tac: tactic to prove (Enabled A) -------------------- *)
ML \<open> (* "Enabled A" can be proven as follows: - Assume that we know which state variables are "base variables" this should be expressed by a theorem of the form "basevars (x,y,z,...)". - Resolve this theorem with baseE to introduce a constant for the value of the variables in the successor state, and resolve the goal with the result. - Resolve with enabledI and do some rewriting. - Solve for the unknowns using standard HOL reasoning. The following tactic combines these steps except the final one.
*)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.