theory SimplRewrite

lemma exec_statefn_simulates_Catch:
  "\<lbrakk> exec_statefn_simulates f S UNIV a b; exec_statefn_simulates f UNIV T c d \<rbrakk>
        \<Longrightarrow> exec_statefn_simulates f S T (Catch a c) (Catch b d)" apply (rule exec_statefn_simulatesI) apply (erule exec.cases, simp_all) apply clarsimp apply (drule(2) exec_statefn_simulatesD) apply (elim disjE exE) apply (drule(1) exec_statefn_simulatesD, simp) apply (auto intro: exec.intros)[1] apply (fastforce intro: exec.intros) apply (fastforce intro: exec.intros) apply (drule(2) exec_statefn_simulatesD) apply (fastforce intro: exec.intros) done

(* Proof state trace *)
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>exec_statefn_simulates f S UNIV a b; exec_statefn_simulates f UNIV T c d\<rbrakk> \<Longrightarrow> exec_statefn_simulates f S T (TRY
  a
CATCH c
END) (TRY
  b
CATCH d
END) proof (prove)
goal (1 subgoal):
 1. \<And>s \<Gamma> t. \<lbrakk>exec_statefn_simulates f S UNIV a b; exec_statefn_simulates f UNIV T c d; s \<in> S; \<Gamma>\<turnstile> \<langle>TRY
  a
CATCH c
END,Normal s\<rangle> \<Rightarrow> t\<rbrakk> \<Longrightarrow> (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f s)\<rangle> \<Rightarrow> add_statefn_xstate f t \<or> (\<exists>ft. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f s)\<rangle> \<Rightarrow> Fault ft) \<or> (\<exists>t'\<in>- T. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f s)\<rangle> \<Rightarrow> Normal (f t')) proof (prove)
goal (2 subgoals):
 1. \<And>s \<Gamma> t c\<^sub>1 sa s' ta. \<lbrakk>exec_statefn_simulates f S UNIV c\<^sub>1 b; exec_statefn_simulates f UNIV T c d; sa \<in> S; a = c\<^sub>1; s = sa; t = ta; \<Gamma>\<turnstile> \<langle>c\<^sub>1,Normal sa\<rangle> \<Rightarrow> Abrupt s'; \<Gamma>\<turnstile> \<langle>c,Normal s'\<rangle> \<Rightarrow> ta\<rbrakk> \<Longrightarrow> (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> add_statefn_xstate f ta \<or> (\<exists>ft. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Fault ft) \<or> (\<exists>t'\<in>- T. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Normal (f t'))
 2. \<And>s \<Gamma> t c\<^sub>1 sa ta. \<lbrakk>exec_statefn_simulates f S UNIV c\<^sub>1 b; exec_statefn_simulates f UNIV T c d; sa \<in> S; a = c\<^sub>1; s = sa; t = ta; \<Gamma>\<turnstile> \<langle>c\<^sub>1,Normal sa\<rangle> \<Rightarrow> ta; \<not> isAbr ta\<rbrakk> \<Longrightarrow> (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> add_statefn_xstate f ta \<or> (\<exists>ft. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Fault ft) \<or> (\<exists>t'\<in>- T. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Normal (f t')) proof (prove)
goal (2 subgoals):
 1. \<And>\<Gamma> sa s' ta. \<lbrakk>exec_statefn_simulates f S UNIV a b; exec_statefn_simulates f UNIV T c d; sa \<in> S; \<Gamma>\<turnstile> \<langle>a,Normal sa\<rangle> \<Rightarrow> Abrupt s'; \<Gamma>\<turnstile> \<langle>c,Normal s'\<rangle> \<Rightarrow> ta; \<not> (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> add_statefn_xstate f ta; \<forall>t'\<in>- T. \<not> (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Normal (f t')\<rbrakk> \<Longrightarrow> \<exists>ft. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Fault ft
 2. \<And>s \<Gamma> t c\<^sub>1 sa ta. \<lbrakk>exec_statefn_simulates f S UNIV c\<^sub>1 b; exec_statefn_simulates f UNIV T c d; sa \<in> S; a = c\<^sub>1; s = sa; t = ta; \<Gamma>\<turnstile> \<langle>c\<^sub>1,Normal sa\<rangle> \<Rightarrow> ta; \<not> isAbr ta\<rbrakk> \<Longrightarrow> (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> add_statefn_xstate f ta \<or> (\<exists>ft. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Fault ft) \<or> (\<exists>t'\<in>- T. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Normal (f t')) proof (prove)
goal (2 subgoals):
 1. \<And>\<Gamma> sa s' ta. \<lbrakk>exec_statefn_simulates f S UNIV a b; exec_statefn_simulates f UNIV T c d; sa \<in> S; \<Gamma>\<turnstile> \<langle>c,Normal s'\<rangle> \<Rightarrow> ta; \<not> (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> add_statefn_xstate f ta; \<forall>t'\<in>- T. \<not> (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Normal (f t'); (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>b,Normal (f sa)\<rangle> \<Rightarrow> add_statefn_xstate f (Abrupt s') \<or> (\<exists>ft. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>b,Normal (f sa)\<rangle> \<Rightarrow> Fault ft) \<or> (\<exists>t'\<in>- UNIV. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>b,Normal (f sa)\<rangle> \<Rightarrow> Normal (f t'))\<rbrakk> \<Longrightarrow> \<exists>ft. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Fault ft
 2. \<And>s \<Gamma> t c\<^sub>1 sa ta. \<lbrakk>exec_statefn_simulates f S UNIV c\<^sub>1 b; exec_statefn_simulates f UNIV T c d; sa \<in> S; a = c\<^sub>1; s = sa; t = ta; \<Gamma>\<turnstile> \<langle>c\<^sub>1,Normal sa\<rangle> \<Rightarrow> ta; \<not> isAbr ta\<rbrakk> \<Longrightarrow> (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> add_statefn_xstate f ta \<or> (\<exists>ft. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Fault ft) \<or> (\<exists>t'\<in>- T. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Normal (f t')) proof (prove)
goal (4 subgoals):
 1. \<And>\<Gamma> sa s' ta. \<lbrakk>exec_statefn_simulates f S UNIV a b; exec_statefn_simulates f UNIV T c d; sa \<in> S; \<Gamma>\<turnstile> \<langle>c,Normal s'\<rangle> \<Rightarrow> ta; \<not> (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> add_statefn_xstate f ta; \<forall>t'\<in>- T. \<not> (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Normal (f t'); (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>b,Normal (f sa)\<rangle> \<Rightarrow> add_statefn_xstate f (Abrupt s')\<rbrakk> \<Longrightarrow> \<exists>ft. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Fault ft
 2. \<And>\<Gamma> sa s' ta ft. \<lbrakk>exec_statefn_simulates f S UNIV a b; exec_statefn_simulates f UNIV T c d; sa \<in> S; \<Gamma>\<turnstile> \<langle>c,Normal s'\<rangle> \<Rightarrow> ta; \<not> (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> add_statefn_xstate f ta; \<forall>t'\<in>- T. \<not> (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Normal (f t'); (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>b,Normal (f sa)\<rangle> \<Rightarrow> Fault ft\<rbrakk> \<Longrightarrow> \<exists>ft. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Fault ft
 3. \<And>\<Gamma> sa s' ta. \<lbrakk>exec_statefn_simulates f S UNIV a b; exec_statefn_simulates f UNIV T c d; sa \<in> S; \<Gamma>\<turnstile> \<langle>c,Normal s'\<rangle> \<Rightarrow> ta; \<not> (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> add_statefn_xstate f ta; \<forall>t'\<in>- T. \<not> (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Normal (f t'); \<exists>t'\<in>- UNIV. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>b,Normal (f sa)\<rangle> \<Rightarrow> Normal (f t')\<rbrakk> \<Longrightarrow> \<exists>ft. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Fault ft
 4. \<And>s \<Gamma> t c\<^sub>1 sa ta. \<lbrakk>exec_statefn_simulates f S UNIV c\<^sub>1 b; exec_statefn_simulates f UNIV T c d; sa \<in> S; a = c\<^sub>1; s = sa; t = ta; \<Gamma>\<turnstile> \<langle>c\<^sub>1,Normal sa\<rangle> \<Rightarrow> ta; \<not> isAbr ta\<rbrakk> \<Longrightarrow> (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> add_statefn_xstate f ta \<or> (\<exists>ft. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Fault ft) \<or> (\<exists>t'\<in>- T. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Normal (f t')) proof (prove)
goal (4 subgoals):
 1. \<And>\<Gamma> sa s' ta. \<lbrakk>exec_statefn_simulates f S UNIV a b; exec_statefn_simulates f UNIV T c d; sa \<in> S; \<not> (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> add_statefn_xstate f ta; \<forall>t'\<in>- T. \<not> (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Normal (f t'); (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>b,Normal (f sa)\<rangle> \<Rightarrow> add_statefn_xstate f (Abrupt s'); (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>d,Normal (f s')\<rangle> \<Rightarrow> add_statefn_xstate f ta \<or> (\<exists>ft. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>d,Normal (f s')\<rangle> \<Rightarrow> Fault ft) \<or> (\<exists>t'\<in>- T. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>d,Normal (f s')\<rangle> \<Rightarrow> Normal (f t'))\<rbrakk> \<Longrightarrow> \<exists>ft. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Fault ft
 2. \<And>\<Gamma> sa s' ta ft. \<lbrakk>exec_statefn_simulates f S UNIV a b; exec_statefn_simulates f UNIV T c d; sa \<in> S; \<Gamma>\<turnstile> \<langle>c,Normal s'\<rangle> \<Rightarrow> ta; \<not> (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> add_statefn_xstate f ta; \<forall>t'\<in>- T. \<not> (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Normal (f t'); (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>b,Normal (f sa)\<rangle> \<Rightarrow> Fault ft\<rbrakk> \<Longrightarrow> \<exists>ft. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Fault ft
 3. \<And>\<Gamma> sa s' ta. \<lbrakk>exec_statefn_simulates f S UNIV a b; exec_statefn_simulates f UNIV T c d; sa \<in> S; \<Gamma>\<turnstile> \<langle>c,Normal s'\<rangle> \<Rightarrow> ta; \<not> (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> add_statefn_xstate f ta; \<forall>t'\<in>- T. \<not> (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Normal (f t'); \<exists>t'\<in>- UNIV. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>b,Normal (f sa)\<rangle> \<Rightarrow> Normal (f t')\<rbrakk> \<Longrightarrow> \<exists>ft. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Fault ft
 4. \<And>s \<Gamma> t c\<^sub>1 sa ta. \<lbrakk>exec_statefn_simulates f S UNIV c\<^sub>1 b; exec_statefn_simulates f UNIV T c d; sa \<in> S; a = c\<^sub>1; s = sa; t = ta; \<Gamma>\<turnstile> \<langle>c\<^sub>1,Normal sa\<rangle> \<Rightarrow> ta; \<not> isAbr ta\<rbrakk> \<Longrightarrow> (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> add_statefn_xstate f ta \<or> (\<exists>ft. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Fault ft) \<or> (\<exists>t'\<in>- T. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Normal (f t')) proof (prove)
goal (3 subgoals):
 1. \<And>\<Gamma> sa s' ta ft. \<lbrakk>exec_statefn_simulates f S UNIV a b; exec_statefn_simulates f UNIV T c d; sa \<in> S; \<Gamma>\<turnstile> \<langle>c,Normal s'\<rangle> \<Rightarrow> ta; \<not> (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> add_statefn_xstate f ta; \<forall>t'\<in>- T. \<not> (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Normal (f t'); (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>b,Normal (f sa)\<rangle> \<Rightarrow> Fault ft\<rbrakk> \<Longrightarrow> \<exists>ft. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Fault ft
 2. \<And>\<Gamma> sa s' ta. \<lbrakk>exec_statefn_simulates f S UNIV a b; exec_statefn_simulates f UNIV T c d; sa \<in> S; \<Gamma>\<turnstile> \<langle>c,Normal s'\<rangle> \<Rightarrow> ta; \<not> (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> add_statefn_xstate f ta; \<forall>t'\<in>- T. \<not> (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Normal (f t'); \<exists>t'\<in>- UNIV. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>b,Normal (f sa)\<rangle> \<Rightarrow> Normal (f t')\<rbrakk> \<Longrightarrow> \<exists>ft. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Fault ft
 3. \<And>s \<Gamma> t c\<^sub>1 sa ta. \<lbrakk>exec_statefn_simulates f S UNIV c\<^sub>1 b; exec_statefn_simulates f UNIV T c d; sa \<in> S; a = c\<^sub>1; s = sa; t = ta; \<Gamma>\<turnstile> \<langle>c\<^sub>1,Normal sa\<rangle> \<Rightarrow> ta; \<not> isAbr ta\<rbrakk> \<Longrightarrow> (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> add_statefn_xstate f ta \<or> (\<exists>ft. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Fault ft) \<or> (\<exists>t'\<in>- T. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Normal (f t')) proof (prove)
goal (2 subgoals):
 1. \<And>\<Gamma> sa s' ta. \<lbrakk>exec_statefn_simulates f S UNIV a b; exec_statefn_simulates f UNIV T c d; sa \<in> S; \<Gamma>\<turnstile> \<langle>c,Normal s'\<rangle> \<Rightarrow> ta; \<not> (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> add_statefn_xstate f ta; \<forall>t'\<in>- T. \<not> (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Normal (f t'); \<exists>t'\<in>- UNIV. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>b,Normal (f sa)\<rangle> \<Rightarrow> Normal (f t')\<rbrakk> \<Longrightarrow> \<exists>ft. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Fault ft
 2. \<And>s \<Gamma> t c\<^sub>1 sa ta. \<lbrakk>exec_statefn_simulates f S UNIV c\<^sub>1 b; exec_statefn_simulates f UNIV T c d; sa \<in> S; a = c\<^sub>1; s = sa; t = ta; \<Gamma>\<turnstile> \<langle>c\<^sub>1,Normal sa\<rangle> \<Rightarrow> ta; \<not> isAbr ta\<rbrakk> \<Longrightarrow> (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> add_statefn_xstate f ta \<or> (\<exists>ft. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Fault ft) \<or> (\<exists>t'\<in>- T. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Normal (f t')) proof (prove)
goal (1 subgoal):
 1. \<And>s \<Gamma> t c\<^sub>1 sa ta. \<lbrakk>exec_statefn_simulates f S UNIV c\<^sub>1 b; exec_statefn_simulates f UNIV T c d; sa \<in> S; a = c\<^sub>1; s = sa; t = ta; \<Gamma>\<turnstile> \<langle>c\<^sub>1,Normal sa\<rangle> \<Rightarrow> ta; \<not> isAbr ta\<rbrakk> \<Longrightarrow> (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> add_statefn_xstate f ta \<or> (\<exists>ft. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Fault ft) \<or> (\<exists>t'\<in>- T. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Normal (f t')) proof (prove)
goal (1 subgoal):
 1. \<And>s \<Gamma> t c\<^sub>1 sa ta. \<lbrakk>exec_statefn_simulates f S UNIV c\<^sub>1 b; exec_statefn_simulates f UNIV T c d; sa \<in> S; a = c\<^sub>1; s = sa; t = ta; \<not> isAbr ta; (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>b,Normal (f sa)\<rangle> \<Rightarrow> add_statefn_xstate f ta \<or> (\<exists>ft. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>b,Normal (f sa)\<rangle> \<Rightarrow> Fault ft) \<or> (\<exists>t'\<in>- UNIV. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>b,Normal (f sa)\<rangle> \<Rightarrow> Normal (f t'))\<rbrakk> \<Longrightarrow> (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> add_statefn_xstate f ta \<or> (\<exists>ft. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Fault ft) \<or> (\<exists>t'\<in>- T. (map_option (add_statefn (inv f)) \<circ> \<Gamma>)\<turnstile> \<langle>TRY
  b
CATCH d
END,Normal (f sa)\<rangle> \<Rightarrow> Normal (f t')) proof (prove)
goal:
No subgoals!