theory GraphRefine

lemma simpl_to_graph_cbreak:
  "eq_impl nn eqs (\<lambda>gst sst. eqs2 gst (exn_upd (\<lambda>_. Break) sst) \<and> exn_upd (\<lambda>_. Break) sst \<in> I) (P \<inter> I)
    \<Longrightarrow> simpl_to_graph SGamma GGamma f nn
        (add_cont com.Throw con) n tS (upd_range exn_upd Break) I eqs2 out_eqs
    \<Longrightarrow> simpl_to_graph SGamma GGamma f nn
        (add_cont (cbreak exn_upd) con) n tS P I eqs out_eqs" apply (simp add: cbreak_def simpl_to_graph_Seq) apply (rule_tac simpl_to_graph_Basic_triv'[rotated]) apply (rule simpl_to_graph_Skip_immediate) apply simp apply (simp add: upd_range_def) done

(* Proof state trace *)
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>eq_impl nn eqs (\<lambda>gst sst. eqs2 gst (exn_upd (\<lambda>_. Break) sst) \<and> exn_upd (\<lambda>_. Break) sst \<in> I) (P \<inter> I); simpl_to_graph SGamma GGamma f nn (add_cont THROW con) n tS (upd_range exn_upd Break) I eqs2 out_eqs\<rbrakk> \<Longrightarrow> simpl_to_graph SGamma GGamma f nn (add_cont (cbreak exn_upd) con) n tS P I eqs out_eqs proof (prove)
goal (1 subgoal):
 1. \<lbrakk>eq_impl nn eqs (\<lambda>gst sst. eqs2 gst (exn_upd (\<lambda>_. Break) sst) \<and> exn_upd (\<lambda>_. Break) sst \<in> I) (P \<inter> I); simpl_to_graph SGamma GGamma f nn (add_cont THROW con) n tS (upd_range exn_upd Break) I eqs2 out_eqs\<rbrakk> \<Longrightarrow> simpl_to_graph SGamma GGamma f nn (add_cont (com.Basic (exn_upd (\<lambda>_. Break))) (Inl THROW # con)) n tS P I eqs out_eqs proof (prove)
goal (2 subgoals):
 1. \<lbrakk>eq_impl nn eqs (\<lambda>gst sst. eqs2 gst (exn_upd (\<lambda>_. Break) sst) \<and> exn_upd (\<lambda>_. Break) sst \<in> I) (P \<inter> I); simpl_to_graph SGamma GGamma f nn (add_cont THROW con) n tS (upd_range exn_upd Break) I eqs2 out_eqs\<rbrakk> \<Longrightarrow> simpl_to_graph SGamma GGamma f nn (add_cont SKIP (Inl THROW # con)) (n + min 0 1) tS ?Q I ?eqs2.0 out_eqs
 2. \<lbrakk>eq_impl nn eqs (\<lambda>gst sst. eqs2 gst (exn_upd (\<lambda>_. Break) sst) \<and> exn_upd (\<lambda>_. Break) sst \<in> I) (P \<inter> I); simpl_to_graph SGamma GGamma f nn (add_cont THROW con) n tS (upd_range exn_upd Break) I eqs2 out_eqs\<rbrakk> \<Longrightarrow> eq_impl nn eqs (\<lambda>gst sst. ?eqs2.0 gst (exn_upd (\<lambda>_. Break) sst) \<and> exn_upd (\<lambda>_. Break) sst \<in> I \<and> exn_upd (\<lambda>_. Break) sst \<in> ?Q) (P \<inter> I) proof (prove)
goal (2 subgoals):
 1. \<lbrakk>eq_impl nn eqs (\<lambda>gst sst. eqs2 gst (exn_upd (\<lambda>_. Break) sst) \<and> exn_upd (\<lambda>_. Break) sst \<in> I) (P \<inter> I); simpl_to_graph SGamma GGamma f nn (add_cont THROW con) n tS (upd_range exn_upd Break) I eqs2 out_eqs\<rbrakk> \<Longrightarrow> simpl_to_graph SGamma GGamma f nn (add_cont THROW con) (n + min 0 1) tS ?Q I ?eqs2.0 out_eqs
 2. \<lbrakk>eq_impl nn eqs (\<lambda>gst sst. eqs2 gst (exn_upd (\<lambda>_. Break) sst) \<and> exn_upd (\<lambda>_. Break) sst \<in> I) (P \<inter> I); simpl_to_graph SGamma GGamma f nn (add_cont THROW con) n tS (upd_range exn_upd Break) I eqs2 out_eqs\<rbrakk> \<Longrightarrow> eq_impl nn eqs (\<lambda>gst sst. ?eqs2.0 gst (exn_upd (\<lambda>_. Break) sst) \<and> exn_upd (\<lambda>_. Break) sst \<in> I \<and> exn_upd (\<lambda>_. Break) sst \<in> ?Q) (P \<inter> I) proof (prove)
goal (1 subgoal):
 1. \<lbrakk>eq_impl nn eqs (\<lambda>gst sst. eqs2 gst (exn_upd (\<lambda>_. Break) sst) \<and> exn_upd (\<lambda>_. Break) sst \<in> I) (P \<inter> I); simpl_to_graph SGamma GGamma f nn (add_cont THROW con) n tS (upd_range exn_upd Break) I eqs2 out_eqs\<rbrakk> \<Longrightarrow> eq_impl nn eqs (\<lambda>gst sst. eqs2 gst (exn_upd (\<lambda>_. Break) sst) \<and> exn_upd (\<lambda>_. Break) sst \<in> I \<and> exn_upd (\<lambda>_. Break) sst \<in> upd_range exn_upd Break) (P \<inter> I) proof (prove)
goal:
No subgoals!