[STATEMENT]
lemma constructive_security_obsfI_core_rest [locale_witness]:
  assumes "constructive_security_aux_obsf real_resource ideal_resource sim \<I>_real \<I>_ideal (\<I>_common_core \<oplus>\<^sub>\<I> \<I>_common_rest) adv"
    and adv: "\<lbrakk> exception_\<I> (\<I>_real \<oplus>\<^sub>\<I> (\<I>_common_core \<oplus>\<^sub>\<I> \<I>_common_rest)) \<turnstile>g \<A> \<surd> \<rbrakk>
      \<Longrightarrow> advantage \<A> (obsf_resource (sim |\<^sub>= (1\<^sub>C |\<^sub>= 1\<^sub>C) \<rhd> ideal_resource)) (obsf_resource (real_resource)) \<le> adv"
  shows "constructive_security_obsf real_resource ideal_resource sim \<I>_real \<I>_ideal (\<I>_common_core \<oplus>\<^sub>\<I> \<I>_common_rest) \<A> adv"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. constructive_security_obsf real_resource ideal_resource sim \<I>_real \<I>_ideal (\<I>_common_core \<oplus>\<^sub>\<I> \<I>_common_rest) \<A> adv
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. constructive_security_obsf real_resource ideal_resource sim \<I>_real \<I>_ideal (\<I>_common_core \<oplus>\<^sub>\<I> \<I>_common_rest) \<A> adv
[PROOF STEP]
interpret constructive_security_aux_obsf real_resource ideal_resource sim \<I>_real \<I>_ideal "\<I>_common_core \<oplus>\<^sub>\<I> \<I>_common_rest"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. constructive_security_aux_obsf real_resource ideal_resource sim \<I>_real \<I>_ideal (\<I>_common_core \<oplus>\<^sub>\<I> \<I>_common_rest) adv
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. constructive_security_obsf real_resource ideal_resource sim \<I>_real \<I>_ideal (\<I>_common_core \<oplus>\<^sub>\<I> \<I>_common_rest) \<A> adv
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. constructive_security_obsf real_resource ideal_resource sim \<I>_real \<I>_ideal (\<I>_common_core \<oplus>\<^sub>\<I> \<I>_common_rest) \<A> adv
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. exception_\<I> (\<I>_real \<oplus>\<^sub>\<I> (\<I>_common_core \<oplus>\<^sub>\<I> \<I>_common_rest)) \<turnstile>g \<A> \<surd> \<Longrightarrow> advantage \<A> (obsf_resource (sim |\<^sub>= 1\<^sub>C \<rhd> ideal_resource)) (obsf_resource real_resource) \<le> adv
[PROOF STEP]
assume A [WT_intro]: "exception_\<I> (\<I>_real \<oplus>\<^sub>\<I> (\<I>_common_core \<oplus>\<^sub>\<I> \<I>_common_rest)) \<turnstile>g \<A> \<surd>"
[PROOF STATE]
proof (state)
this:
exception_\<I> (\<I>_real \<oplus>\<^sub>\<I> (\<I>_common_core \<oplus>\<^sub>\<I> \<I>_common_rest)) \<turnstile>g \<A> \<surd>

goal (1 subgoal):
 1. exception_\<I> (\<I>_real \<oplus>\<^sub>\<I> (\<I>_common_core \<oplus>\<^sub>\<I> \<I>_common_rest)) \<turnstile>g \<A> \<surd> \<Longrightarrow> advantage \<A> (obsf_resource (sim |\<^sub>= 1\<^sub>C \<rhd> ideal_resource)) (obsf_resource real_resource) \<le> adv
[PROOF STEP]
hence outs: "outs_gpv (exception_\<I> (\<I>_real \<oplus>\<^sub>\<I> (\<I>_common_core \<oplus>\<^sub>\<I> \<I>_common_rest))) \<A> \<subseteq> outs_\<I> (\<I>_real \<oplus>\<^sub>\<I> (\<I>_common_core \<oplus>\<^sub>\<I> \<I>_common_rest))"
[PROOF STATE]
proof (prove)
using this:
exception_\<I> (\<I>_real \<oplus>\<^sub>\<I> (\<I>_common_core \<oplus>\<^sub>\<I> \<I>_common_rest)) \<turnstile>g \<A> \<surd>

goal (1 subgoal):
 1. outs_gpv (exception_\<I> (\<I>_real \<oplus>\<^sub>\<I> (\<I>_common_core \<oplus>\<^sub>\<I> \<I>_common_rest))) \<A> \<subseteq> outs_\<I> (\<I>_real \<oplus>\<^sub>\<I> (\<I>_common_core \<oplus>\<^sub>\<I> \<I>_common_rest))
[PROOF STEP]
unfolding WT_gpv_iff_outs_gpv
[PROOF STATE]
proof (prove)
using this:
outs_gpv (exception_\<I> (\<I>_real \<oplus>\<^sub>\<I> (\<I>_common_core \<oplus>\<^sub>\<I> \<I>_common_rest))) \<A> \<subseteq> outs_\<I> (exception_\<I> (\<I>_real \<oplus>\<^sub>\<I> (\<I>_common_core \<oplus>\<^sub>\<I> \<I>_common_rest)))

goal (1 subgoal):
 1. outs_gpv (exception_\<I> (\<I>_real \<oplus>\<^sub>\<I> (\<I>_common_core \<oplus>\<^sub>\<I> \<I>_common_rest))) \<A> \<subseteq> outs_\<I> (\<I>_real \<oplus>\<^sub>\<I> (\<I>_common_core \<oplus>\<^sub>\<I> \<I>_common_rest))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
outs_gpv (exception_\<I> (\<I>_real \<oplus>\<^sub>\<I> (\<I>_common_core \<oplus>\<^sub>\<I> \<I>_common_rest))) \<A> \<subseteq> outs_\<I> (\<I>_real \<oplus>\<^sub>\<I> (\<I>_common_core \<oplus>\<^sub>\<I> \<I>_common_rest))

goal (1 subgoal):
 1. exception_\<I> (\<I>_real \<oplus>\<^sub>\<I> (\<I>_common_core \<oplus>\<^sub>\<I> \<I>_common_rest)) \<turnstile>g \<A> \<surd> \<Longrightarrow> advantage \<A> (obsf_resource (sim |\<^sub>= 1\<^sub>C \<rhd> ideal_resource)) (obsf_resource real_resource) \<le> adv
[PROOF STEP]
have "connect_obsf \<A> (obsf_resource (sim |\<^sub>= 1\<^sub>C \<rhd> ideal_resource)) = connect_obsf \<A> (obsf_resource (sim |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> ideal_resource))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connect_obsf \<A> (obsf_resource (sim |\<^sub>= 1\<^sub>C \<rhd> ideal_resource)) = connect_obsf \<A> (obsf_resource (sim |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> ideal_resource))
[PROOF STEP]
by(rule connect_cong_trace trace_eq_obsf_resourceI eq_resource_on_imp_trace_eq eq_\<I>_attach_on')+
        (rule WT_intro parallel_converter2_eq_\<I>_cong eq_\<I>_converter_reflI parallel_converter2_id_id[symmetric] order_refl outs)+
[PROOF STATE]
proof (state)
this:
connect_obsf \<A> (obsf_resource (sim |\<^sub>= 1\<^sub>C \<rhd> ideal_resource)) = connect_obsf \<A> (obsf_resource (sim |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> ideal_resource))

goal (1 subgoal):
 1. exception_\<I> (\<I>_real \<oplus>\<^sub>\<I> (\<I>_common_core \<oplus>\<^sub>\<I> \<I>_common_rest)) \<turnstile>g \<A> \<surd> \<Longrightarrow> advantage \<A> (obsf_resource (sim |\<^sub>= 1\<^sub>C \<rhd> ideal_resource)) (obsf_resource real_resource) \<le> adv
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
connect_obsf \<A> (obsf_resource (sim |\<^sub>= 1\<^sub>C \<rhd> ideal_resource)) = connect_obsf \<A> (obsf_resource (sim |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> ideal_resource))
[PROOF STEP]
show "advantage \<A> (obsf_resource (sim |\<^sub>= 1\<^sub>C \<rhd> ideal_resource)) (obsf_resource real_resource) \<le> adv"
[PROOF STATE]
proof (prove)
using this:
connect_obsf \<A> (obsf_resource (sim |\<^sub>= 1\<^sub>C \<rhd> ideal_resource)) = connect_obsf \<A> (obsf_resource (sim |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> ideal_resource))

goal (1 subgoal):
 1. advantage \<A> (obsf_resource (sim |\<^sub>= 1\<^sub>C \<rhd> ideal_resource)) (obsf_resource real_resource) \<le> adv
[PROOF STEP]
using adv[OF A]
[PROOF STATE]
proof (prove)
using this:
connect_obsf \<A> (obsf_resource (sim |\<^sub>= 1\<^sub>C \<rhd> ideal_resource)) = connect_obsf \<A> (obsf_resource (sim |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> ideal_resource))
advantage \<A> (obsf_resource (sim |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> ideal_resource)) (obsf_resource real_resource) \<le> adv

goal (1 subgoal):
 1. advantage \<A> (obsf_resource (sim |\<^sub>= 1\<^sub>C \<rhd> ideal_resource)) (obsf_resource real_resource) \<le> adv
[PROOF STEP]
by(simp add: advantage_def)
[PROOF STATE]
proof (state)
this:
advantage \<A> (obsf_resource (sim |\<^sub>= 1\<^sub>C \<rhd> ideal_resource)) (obsf_resource real_resource) \<le> adv

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
constructive_security_obsf real_resource ideal_resource sim \<I>_real \<I>_ideal (\<I>_common_core \<oplus>\<^sub>\<I> \<I>_common_rest) \<A> adv

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma SN_rel_ext_map: fixes P Pw R Rw P' Pw' R' Rw' :: "'a rel" and M M' :: "'a \<Rightarrow> bool"
  defines Ms: "Ms \<equiv> {(s,t). M' t}"
  defines A: "A \<equiv> (P' \<union> Pw' \<union> R' \<union> Rw') \<inter> Ms"
  assumes SN: "SN_rel_ext P' Pw' R' Rw' M'"
  and P: "\<And> s t. M s \<Longrightarrow> M t \<Longrightarrow> (s,t) \<in> P \<Longrightarrow> (f s, f t) \<in> (A^* O (P' \<inter> Ms) O A^*) \<and> I t"
  and Pw: "\<And> s t. M s \<Longrightarrow> M t \<Longrightarrow> (s,t) \<in> Pw \<Longrightarrow> (f s, f t) \<in> (A^* O ((P' \<union> Pw') \<inter> Ms) O A^*) \<and> I t"
  and R: "\<And> s t. I s \<Longrightarrow> M s \<Longrightarrow> M t \<Longrightarrow> (s,t) \<in> R \<Longrightarrow> (f s, f t) \<in> (A^* O ((P' \<union> R') \<inter> Ms) O A^*) \<and> I t"
  and Rw: "\<And> s t. I s \<Longrightarrow> M s \<Longrightarrow> M t \<Longrightarrow> (s,t) \<in> Rw \<Longrightarrow> (f s, f t) \<in> A^* \<and> I t"
  shows "SN_rel_ext P Pw R Rw M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. SN_rel_ext P Pw R Rw M
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. SN_rel_ext P Pw R Rw M
[PROOF STEP]
note SN = SN_rel_ext_trans[OF SN]
[PROOF STATE]
proof (state)
this:
SN_rel_ext (((P' \<union> Pw' \<union> R' \<union> Rw') \<inter> {(s, t). M' t})\<^sup>* O (P' \<inter> {(s, t). M' t}) O ((P' \<union> Pw' \<union> R' \<union> Rw') \<inter> {(s, t). M' t})\<^sup>*) (((P' \<union> Pw' \<union> R' \<union> Rw') \<inter> {(s, t). M' t})\<^sup>* O ((P' \<union> Pw') \<inter> {(s, t). M' t}) O ((P' \<union> Pw' \<union> R' \<union> Rw') \<inter> {(s, t). M' t})\<^sup>*) (((P' \<union> Pw' \<union> R' \<union> Rw') \<inter> {(s, t). M' t})\<^sup>* O ((P' \<union> R') \<inter> {(s, t). M' t}) O ((P' \<union> Pw' \<union> R' \<union> Rw') \<inter> {(s, t). M' t})\<^sup>*) (((P' \<union> Pw' \<union> R' \<union> Rw') \<inter> {(s, t). M' t})\<^sup>*) M'

goal (1 subgoal):
 1. SN_rel_ext P Pw R Rw M
[PROOF STEP]
let ?P = "(A^* O (P' \<inter> Ms) O A^*)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. SN_rel_ext P Pw R Rw M
[PROOF STEP]
let ?Pw = "(A^* O ((P' \<union> Pw') \<inter> Ms) O A^*)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. SN_rel_ext P Pw R Rw M
[PROOF STEP]
let ?R = "(A^* O ((P' \<union> R') \<inter> Ms) O A^*)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. SN_rel_ext P Pw R Rw M
[PROOF STEP]
let ?Rw = "A^*"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. SN_rel_ext P Pw R Rw M
[PROOF STEP]
let ?relt = "SN_rel_ext_step ?P ?Pw ?R ?Rw"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. SN_rel_ext P Pw R Rw M
[PROOF STEP]
let ?rel = "SN_rel_ext_step P Pw R Rw"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. SN_rel_ext P Pw R Rw M
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. SN_rel_ext P Pw R Rw M
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> SN_rel_ext P Pw R Rw M \<Longrightarrow> False
[PROOF STEP]
assume "\<not> ?thesis"
[PROOF STATE]
proof (state)
this:
\<not> SN_rel_ext P Pw R Rw M

goal (1 subgoal):
 1. \<not> SN_rel_ext P Pw R Rw M \<Longrightarrow> False
[PROOF STEP]
from this[unfolded SN_rel_ext_def]
[PROOF STATE]
proof (chain)
picking this:
\<not> (\<nexists>f t. (\<forall>i. (f i, f (Suc i)) \<in> SN_rel_ext_step P Pw R Rw (t i)) \<and> (\<forall>i. M (f i)) \<and> (\<exists>\<^sub>\<infinity>i. t i \<in> {top_s, top_ns}) \<and> (\<exists>\<^sub>\<infinity>i. t i \<in> {top_s, normal_s}))
[PROOF STEP]
obtain g ty
      where steps: "\<And> i. (g i, g (Suc i)) \<in> ?rel (ty i)"
      and min: "\<And> i. M (g i)"
      and inf1: "INFM i. ty i \<in> {top_s, top_ns}"
      and inf2: "INFM i. ty i \<in> {top_s, normal_s}"
[PROOF STATE]
proof (prove)
using this:
\<not> (\<nexists>f t. (\<forall>i. (f i, f (Suc i)) \<in> SN_rel_ext_step P Pw R Rw (t i)) \<and> (\<forall>i. M (f i)) \<and> (\<exists>\<^sub>\<infinity>i. t i \<in> {top_s, top_ns}) \<and> (\<exists>\<^sub>\<infinity>i. t i \<in> {top_s, normal_s}))

goal (1 subgoal):
 1. (\<And>g ty. \<lbrakk>\<And>i. (g i, g (Suc i)) \<in> SN_rel_ext_step P Pw R Rw (ty i); \<And>i. M (g i); \<exists>\<^sub>\<infinity>i. ty i \<in> {top_s, top_ns}; \<exists>\<^sub>\<infinity>i. ty i \<in> {top_s, normal_s}\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(g ?i, g (Suc ?i)) \<in> SN_rel_ext_step P Pw R Rw (ty ?i)
M (g ?i)
\<exists>\<^sub>\<infinity>i. ty i \<in> {top_s, top_ns}
\<exists>\<^sub>\<infinity>i. ty i \<in> {top_s, normal_s}

goal (1 subgoal):
 1. \<not> SN_rel_ext P Pw R Rw M \<Longrightarrow> False
[PROOF STEP]
from inf1[unfolded INFM_nat]
[PROOF STATE]
proof (chain)
picking this:
\<forall>m. \<exists>n>m. ty n \<in> {top_s, top_ns}
[PROOF STEP]
obtain k where k: "ty k \<in> {top_s, top_ns}"
[PROOF STATE]
proof (prove)
using this:
\<forall>m. \<exists>n>m. ty n \<in> {top_s, top_ns}

goal (1 subgoal):
 1. (\<And>k. ty k \<in> {top_s, top_ns} \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
ty k \<in> {top_s, top_ns}

goal (1 subgoal):
 1. \<not> SN_rel_ext P Pw R Rw M \<Longrightarrow> False
[PROOF STEP]
let ?k = "Suc k"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> SN_rel_ext P Pw R Rw M \<Longrightarrow> False
[PROOF STEP]
let ?i = "shift id ?k"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> SN_rel_ext P Pw R Rw M \<Longrightarrow> False
[PROOF STEP]
let ?f = "\<lambda> i. f (shift g ?k i)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> SN_rel_ext P Pw R Rw M \<Longrightarrow> False
[PROOF STEP]
let ?ty = "shift ty ?k"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> SN_rel_ext P Pw R Rw M \<Longrightarrow> False
[PROOF STEP]
{
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> SN_rel_ext P Pw R Rw M \<Longrightarrow> False
[PROOF STEP]
fix i
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> SN_rel_ext P Pw R Rw M \<Longrightarrow> False
[PROOF STEP]
assume ty: "ty i \<in> {top_s,top_ns}"
[PROOF STATE]
proof (state)
this:
ty i \<in> {top_s, top_ns}

goal (1 subgoal):
 1. \<not> SN_rel_ext P Pw R Rw M \<Longrightarrow> False
[PROOF STEP]
note m = min[of i]
[PROOF STATE]
proof (state)
this:
M (g i)

goal (1 subgoal):
 1. \<not> SN_rel_ext P Pw R Rw M \<Longrightarrow> False
[PROOF STEP]
note ms = min[of "Suc i"]
[PROOF STATE]
proof (state)
this:
M (g (Suc i))

goal (1 subgoal):
 1. \<not> SN_rel_ext P Pw R Rw M \<Longrightarrow> False
[PROOF STEP]
from P[OF m ms]
        Pw[OF m ms]
        steps[of i]
        ty
[PROOF STATE]
proof (chain)
picking this:
(g i, g (Suc i)) \<in> P \<Longrightarrow> (f (g i), f (g (Suc i))) \<in> A\<^sup>* O (P' \<inter> Ms) O A\<^sup>* \<and> I (g (Suc i))
(g i, g (Suc i)) \<in> Pw \<Longrightarrow> (f (g i), f (g (Suc i))) \<in> A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>* \<and> I (g (Suc i))
(g i, g (Suc i)) \<in> SN_rel_ext_step P Pw R Rw (ty i)
ty i \<in> {top_s, top_ns}
[PROOF STEP]
have "(f (g i), f (g (Suc i))) \<in> ?relt (ty i) \<and> I (g (Suc i))"
[PROOF STATE]
proof (prove)
using this:
(g i, g (Suc i)) \<in> P \<Longrightarrow> (f (g i), f (g (Suc i))) \<in> A\<^sup>* O (P' \<inter> Ms) O A\<^sup>* \<and> I (g (Suc i))
(g i, g (Suc i)) \<in> Pw \<Longrightarrow> (f (g i), f (g (Suc i))) \<in> A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>* \<and> I (g (Suc i))
(g i, g (Suc i)) \<in> SN_rel_ext_step P Pw R Rw (ty i)
ty i \<in> {top_s, top_ns}

goal (1 subgoal):
 1. (f (g i), f (g (Suc i))) \<in> SN_rel_ext_step (A\<^sup>* O (P' \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>*) (A\<^sup>*) (ty i) \<and> I (g (Suc i))
[PROOF STEP]
by (cases "ty i", auto)
[PROOF STATE]
proof (state)
this:
(f (g i), f (g (Suc i))) \<in> SN_rel_ext_step (A\<^sup>* O (P' \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>*) (A\<^sup>*) (ty i) \<and> I (g (Suc i))

goal (1 subgoal):
 1. \<not> SN_rel_ext P Pw R Rw M \<Longrightarrow> False
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
ty ?i2 \<in> {top_s, top_ns} \<Longrightarrow> (f (g ?i2), f (g (Suc ?i2))) \<in> SN_rel_ext_step (A\<^sup>* O (P' \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>*) (A\<^sup>*) (ty ?i2) \<and> I (g (Suc ?i2))

goal (1 subgoal):
 1. \<not> SN_rel_ext P Pw R Rw M \<Longrightarrow> False
[PROOF STEP]
note stepsP = this
[PROOF STATE]
proof (state)
this:
ty ?i2 \<in> {top_s, top_ns} \<Longrightarrow> (f (g ?i2), f (g (Suc ?i2))) \<in> SN_rel_ext_step (A\<^sup>* O (P' \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>*) (A\<^sup>*) (ty ?i2) \<and> I (g (Suc ?i2))

goal (1 subgoal):
 1. \<not> SN_rel_ext P Pw R Rw M \<Longrightarrow> False
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
ty ?i2 \<in> {top_s, top_ns} \<Longrightarrow> (f (g ?i2), f (g (Suc ?i2))) \<in> SN_rel_ext_step (A\<^sup>* O (P' \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>*) (A\<^sup>*) (ty ?i2) \<and> I (g (Suc ?i2))

goal (1 subgoal):
 1. \<not> SN_rel_ext P Pw R Rw M \<Longrightarrow> False
[PROOF STEP]
fix i
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> SN_rel_ext P Pw R Rw M \<Longrightarrow> False
[PROOF STEP]
assume I: "I (g i)"
[PROOF STATE]
proof (state)
this:
I (g i)

goal (1 subgoal):
 1. \<not> SN_rel_ext P Pw R Rw M \<Longrightarrow> False
[PROOF STEP]
note m = min[of i]
[PROOF STATE]
proof (state)
this:
M (g i)

goal (1 subgoal):
 1. \<not> SN_rel_ext P Pw R Rw M \<Longrightarrow> False
[PROOF STEP]
note ms = min[of "Suc i"]
[PROOF STATE]
proof (state)
this:
M (g (Suc i))

goal (1 subgoal):
 1. \<not> SN_rel_ext P Pw R Rw M \<Longrightarrow> False
[PROOF STEP]
from P[OF m ms]
        Pw[OF m ms]
        R[OF I m ms]
        Rw[OF I m ms]
        steps[of i]
[PROOF STATE]
proof (chain)
picking this:
(g i, g (Suc i)) \<in> P \<Longrightarrow> (f (g i), f (g (Suc i))) \<in> A\<^sup>* O (P' \<inter> Ms) O A\<^sup>* \<and> I (g (Suc i))
(g i, g (Suc i)) \<in> Pw \<Longrightarrow> (f (g i), f (g (Suc i))) \<in> A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>* \<and> I (g (Suc i))
(g i, g (Suc i)) \<in> R \<Longrightarrow> (f (g i), f (g (Suc i))) \<in> A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>* \<and> I (g (Suc i))
(g i, g (Suc i)) \<in> Rw \<Longrightarrow> (f (g i), f (g (Suc i))) \<in> A\<^sup>* \<and> I (g (Suc i))
(g i, g (Suc i)) \<in> SN_rel_ext_step P Pw R Rw (ty i)
[PROOF STEP]
have "(f (g i), f (g (Suc i))) \<in> ?relt (ty i) \<and> I (g (Suc i))"
[PROOF STATE]
proof (prove)
using this:
(g i, g (Suc i)) \<in> P \<Longrightarrow> (f (g i), f (g (Suc i))) \<in> A\<^sup>* O (P' \<inter> Ms) O A\<^sup>* \<and> I (g (Suc i))
(g i, g (Suc i)) \<in> Pw \<Longrightarrow> (f (g i), f (g (Suc i))) \<in> A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>* \<and> I (g (Suc i))
(g i, g (Suc i)) \<in> R \<Longrightarrow> (f (g i), f (g (Suc i))) \<in> A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>* \<and> I (g (Suc i))
(g i, g (Suc i)) \<in> Rw \<Longrightarrow> (f (g i), f (g (Suc i))) \<in> A\<^sup>* \<and> I (g (Suc i))
(g i, g (Suc i)) \<in> SN_rel_ext_step P Pw R Rw (ty i)

goal (1 subgoal):
 1. (f (g i), f (g (Suc i))) \<in> SN_rel_ext_step (A\<^sup>* O (P' \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>*) (A\<^sup>*) (ty i) \<and> I (g (Suc i))
[PROOF STEP]
by (cases "ty i", auto)
[PROOF STATE]
proof (state)
this:
(f (g i), f (g (Suc i))) \<in> SN_rel_ext_step (A\<^sup>* O (P' \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>*) (A\<^sup>*) (ty i) \<and> I (g (Suc i))

goal (1 subgoal):
 1. \<not> SN_rel_ext P Pw R Rw M \<Longrightarrow> False
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
I (g ?i2) \<Longrightarrow> (f (g ?i2), f (g (Suc ?i2))) \<in> SN_rel_ext_step (A\<^sup>* O (P' \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>*) (A\<^sup>*) (ty ?i2) \<and> I (g (Suc ?i2))

goal (1 subgoal):
 1. \<not> SN_rel_ext P Pw R Rw M \<Longrightarrow> False
[PROOF STEP]
note stepsI = this
[PROOF STATE]
proof (state)
this:
I (g ?i2) \<Longrightarrow> (f (g ?i2), f (g (Suc ?i2))) \<in> SN_rel_ext_step (A\<^sup>* O (P' \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>*) (A\<^sup>*) (ty ?i2) \<and> I (g (Suc ?i2))

goal (1 subgoal):
 1. \<not> SN_rel_ext P Pw R Rw M \<Longrightarrow> False
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
I (g ?i2) \<Longrightarrow> (f (g ?i2), f (g (Suc ?i2))) \<in> SN_rel_ext_step (A\<^sup>* O (P' \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>*) (A\<^sup>*) (ty ?i2) \<and> I (g (Suc ?i2))

goal (1 subgoal):
 1. \<not> SN_rel_ext P Pw R Rw M \<Longrightarrow> False
[PROOF STEP]
fix i
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> SN_rel_ext P Pw R Rw M \<Longrightarrow> False
[PROOF STEP]
have "I (g (?i i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. I (g (shift id (Suc k) i))
[PROOF STEP]
proof (induct i)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. I (g (shift id (Suc k) 0))
 2. \<And>i. I (g (shift id (Suc k) i)) \<Longrightarrow> I (g (shift id (Suc k) (Suc i)))
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. I (g (shift id (Suc k) 0))
 2. \<And>i. I (g (shift id (Suc k) i)) \<Longrightarrow> I (g (shift id (Suc k) (Suc i)))
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. I (g (shift id (Suc k) 0))
[PROOF STEP]
using stepsP[OF k]
[PROOF STATE]
proof (prove)
using this:
(f (g k), f (g (Suc k))) \<in> SN_rel_ext_step (A\<^sup>* O (P' \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>*) (A\<^sup>*) (ty k) \<and> I (g (Suc k))

goal (1 subgoal):
 1. I (g (shift id (Suc k) 0))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
I (g (shift id (Suc k) 0))

goal (1 subgoal):
 1. \<And>i. I (g (shift id (Suc k) i)) \<Longrightarrow> I (g (shift id (Suc k) (Suc i)))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. I (g (shift id (Suc k) i)) \<Longrightarrow> I (g (shift id (Suc k) (Suc i)))
[PROOF STEP]
case (Suc i)
[PROOF STATE]
proof (state)
this:
I (g (shift id (Suc k) i))

goal (1 subgoal):
 1. \<And>i. I (g (shift id (Suc k) i)) \<Longrightarrow> I (g (shift id (Suc k) (Suc i)))
[PROOF STEP]
from stepsI[OF Suc]
[PROOF STATE]
proof (chain)
picking this:
(f (g (shift id (Suc k) i)), f (g (Suc (shift id (Suc k) i)))) \<in> SN_rel_ext_step (A\<^sup>* O (P' \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>*) (A\<^sup>*) (ty (shift id (Suc k) i)) \<and> I (g (Suc (shift id (Suc k) i)))
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
(f (g (shift id (Suc k) i)), f (g (Suc (shift id (Suc k) i)))) \<in> SN_rel_ext_step (A\<^sup>* O (P' \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>*) (A\<^sup>*) (ty (shift id (Suc k) i)) \<and> I (g (Suc (shift id (Suc k) i)))

goal (1 subgoal):
 1. I (g (shift id (Suc k) (Suc i)))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
I (g (shift id (Suc k) (Suc i)))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
I (g (shift id (Suc k) i))

goal (1 subgoal):
 1. \<not> SN_rel_ext P Pw R Rw M \<Longrightarrow> False
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
I (g (shift id (Suc k) ?i2))

goal (1 subgoal):
 1. \<not> SN_rel_ext P Pw R Rw M \<Longrightarrow> False
[PROOF STEP]
note I = this
[PROOF STATE]
proof (state)
this:
I (g (shift id (Suc k) ?i2))

goal (1 subgoal):
 1. \<not> SN_rel_ext P Pw R Rw M \<Longrightarrow> False
[PROOF STEP]
have "\<not> SN_rel_ext ?P ?Pw ?R ?Rw M'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> SN_rel_ext (A\<^sup>* O (P' \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>*) (A\<^sup>*) M'
[PROOF STEP]
unfolding SN_rel_ext_def simp_thms
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>f t. (\<forall>i. (f i, f (Suc i)) \<in> SN_rel_ext_step (A\<^sup>* O (P' \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>*) (A\<^sup>*) (t i)) \<and> (\<forall>i. M' (f i)) \<and> (\<exists>\<^sub>\<infinity>i. t i \<in> {top_s, top_ns}) \<and> (\<exists>\<^sub>\<infinity>i. t i \<in> {top_s, normal_s})
[PROOF STEP]
proof (rule exI[of _ ?f], rule exI[of _ ?ty], intro allI conjI)
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<And>i. (f (shift g (Suc k) i), f (shift g (Suc k) (Suc i))) \<in> SN_rel_ext_step (A\<^sup>* O (P' \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>*) (A\<^sup>*) (shift ty (Suc k) i)
 2. \<And>i. M' (f (shift g (Suc k) i))
 3. \<exists>\<^sub>\<infinity>i. shift ty (Suc k) i \<in> {top_s, top_ns}
 4. \<exists>\<^sub>\<infinity>i. shift ty (Suc k) i \<in> {top_s, normal_s}
[PROOF STEP]
fix i
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<And>i. (f (shift g (Suc k) i), f (shift g (Suc k) (Suc i))) \<in> SN_rel_ext_step (A\<^sup>* O (P' \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>*) (A\<^sup>*) (shift ty (Suc k) i)
 2. \<And>i. M' (f (shift g (Suc k) i))
 3. \<exists>\<^sub>\<infinity>i. shift ty (Suc k) i \<in> {top_s, top_ns}
 4. \<exists>\<^sub>\<infinity>i. shift ty (Suc k) i \<in> {top_s, normal_s}
[PROOF STEP]
show "(?f i, ?f (Suc i)) \<in> ?relt (?ty i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f (shift g (Suc k) i), f (shift g (Suc k) (Suc i))) \<in> SN_rel_ext_step (A\<^sup>* O (P' \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>*) (A\<^sup>*) (shift ty (Suc k) i)
[PROOF STEP]
using stepsI[OF I[of i]]
[PROOF STATE]
proof (prove)
using this:
(f (g (shift id (Suc k) i)), f (g (Suc (shift id (Suc k) i)))) \<in> SN_rel_ext_step (A\<^sup>* O (P' \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>*) (A\<^sup>*) (ty (shift id (Suc k) i)) \<and> I (g (Suc (shift id (Suc k) i)))

goal (1 subgoal):
 1. (f (shift g (Suc k) i), f (shift g (Suc k) (Suc i))) \<in> SN_rel_ext_step (A\<^sup>* O (P' \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>*) (A\<^sup>*) (shift ty (Suc k) i)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(f (shift g (Suc k) i), f (shift g (Suc k) (Suc i))) \<in> SN_rel_ext_step (A\<^sup>* O (P' \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>*) (A\<^sup>*) (shift ty (Suc k) i)

goal (3 subgoals):
 1. \<And>i. M' (f (shift g (Suc k) i))
 2. \<exists>\<^sub>\<infinity>i. shift ty (Suc k) i \<in> {top_s, top_ns}
 3. \<exists>\<^sub>\<infinity>i. shift ty (Suc k) i \<in> {top_s, normal_s}
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>i. M' (f (shift g (Suc k) i))
 2. \<exists>\<^sub>\<infinity>i. shift ty (Suc k) i \<in> {top_s, top_ns}
 3. \<exists>\<^sub>\<infinity>i. shift ty (Suc k) i \<in> {top_s, normal_s}
[PROOF STEP]
show "INFM i. ?ty i \<in> {top_s, top_ns}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>\<^sub>\<infinity>i. shift ty (Suc k) i \<in> {top_s, top_ns}
[PROOF STEP]
unfolding Infm_shift[of "\<lambda>i. i \<in> {top_s,top_ns}" ty ?k]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>\<^sub>\<infinity>i. ty i \<in> {top_s, top_ns}
[PROOF STEP]
by (rule inf1)
[PROOF STATE]
proof (state)
this:
\<exists>\<^sub>\<infinity>i. shift ty (Suc k) i \<in> {top_s, top_ns}

goal (2 subgoals):
 1. \<And>i. M' (f (shift g (Suc k) i))
 2. \<exists>\<^sub>\<infinity>i. shift ty (Suc k) i \<in> {top_s, normal_s}
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>i. M' (f (shift g (Suc k) i))
 2. \<exists>\<^sub>\<infinity>i. shift ty (Suc k) i \<in> {top_s, normal_s}
[PROOF STEP]
show "INFM i. ?ty i \<in> {top_s, normal_s}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>\<^sub>\<infinity>i. shift ty (Suc k) i \<in> {top_s, normal_s}
[PROOF STEP]
unfolding Infm_shift[of "\<lambda>i. i \<in> {top_s,normal_s}" ty ?k]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>\<^sub>\<infinity>i. ty i \<in> {top_s, normal_s}
[PROOF STEP]
by (rule inf2)
[PROOF STATE]
proof (state)
this:
\<exists>\<^sub>\<infinity>i. shift ty (Suc k) i \<in> {top_s, normal_s}

goal (1 subgoal):
 1. \<And>i. M' (f (shift g (Suc k) i))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. M' (f (shift g (Suc k) i))
[PROOF STEP]
fix i
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. M' (f (shift g (Suc k) i))
[PROOF STEP]
have A: "A \<subseteq> Ms"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<subseteq> Ms
[PROOF STEP]
unfolding A
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (P' \<union> Pw' \<union> R' \<union> Rw') \<inter> Ms \<subseteq> Ms
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
A \<subseteq> Ms

goal (1 subgoal):
 1. \<And>i. M' (f (shift g (Suc k) i))
[PROOF STEP]
from rtrancl_mono[OF this]
[PROOF STATE]
proof (chain)
picking this:
A\<^sup>* \<subseteq> Ms\<^sup>*
[PROOF STEP]
have As: "A^* \<subseteq> Ms^*"
[PROOF STATE]
proof (prove)
using this:
A\<^sup>* \<subseteq> Ms\<^sup>*

goal (1 subgoal):
 1. A\<^sup>* \<subseteq> Ms\<^sup>*
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
A\<^sup>* \<subseteq> Ms\<^sup>*

goal (1 subgoal):
 1. \<And>i. M' (f (shift g (Suc k) i))
[PROOF STEP]
have PM: "?P \<subseteq> Ms^* O Ms O Ms^*"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A\<^sup>* O (P' \<inter> Ms) O A\<^sup>* \<subseteq> Ms\<^sup>* O Ms O Ms\<^sup>*
[PROOF STEP]
using As
[PROOF STATE]
proof (prove)
using this:
A\<^sup>* \<subseteq> Ms\<^sup>*

goal (1 subgoal):
 1. A\<^sup>* O (P' \<inter> Ms) O A\<^sup>* \<subseteq> Ms\<^sup>* O Ms O Ms\<^sup>*
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
A\<^sup>* O (P' \<inter> Ms) O A\<^sup>* \<subseteq> Ms\<^sup>* O Ms O Ms\<^sup>*

goal (1 subgoal):
 1. \<And>i. M' (f (shift g (Suc k) i))
[PROOF STEP]
have PwM: "?Pw \<subseteq> Ms^* O Ms O Ms^*"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>* \<subseteq> Ms\<^sup>* O Ms O Ms\<^sup>*
[PROOF STEP]
using As
[PROOF STATE]
proof (prove)
using this:
A\<^sup>* \<subseteq> Ms\<^sup>*

goal (1 subgoal):
 1. A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>* \<subseteq> Ms\<^sup>* O Ms O Ms\<^sup>*
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>* \<subseteq> Ms\<^sup>* O Ms O Ms\<^sup>*

goal (1 subgoal):
 1. \<And>i. M' (f (shift g (Suc k) i))
[PROOF STEP]
have RM: "?R \<subseteq> Ms^* O Ms O Ms^*"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>* \<subseteq> Ms\<^sup>* O Ms O Ms\<^sup>*
[PROOF STEP]
using As
[PROOF STATE]
proof (prove)
using this:
A\<^sup>* \<subseteq> Ms\<^sup>*

goal (1 subgoal):
 1. A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>* \<subseteq> Ms\<^sup>* O Ms O Ms\<^sup>*
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>* \<subseteq> Ms\<^sup>* O Ms O Ms\<^sup>*

goal (1 subgoal):
 1. \<And>i. M' (f (shift g (Suc k) i))
[PROOF STEP]
have RwM: "?Rw \<subseteq> Ms^*"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A\<^sup>* \<subseteq> Ms\<^sup>*
[PROOF STEP]
using As
[PROOF STATE]
proof (prove)
using this:
A\<^sup>* \<subseteq> Ms\<^sup>*

goal (1 subgoal):
 1. A\<^sup>* \<subseteq> Ms\<^sup>*
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
A\<^sup>* \<subseteq> Ms\<^sup>*

goal (1 subgoal):
 1. \<And>i. M' (f (shift g (Suc k) i))
[PROOF STEP]
from PM PwM RM
[PROOF STATE]
proof (chain)
picking this:
A\<^sup>* O (P' \<inter> Ms) O A\<^sup>* \<subseteq> Ms\<^sup>* O Ms O Ms\<^sup>*
A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>* \<subseteq> Ms\<^sup>* O Ms O Ms\<^sup>*
A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>* \<subseteq> Ms\<^sup>* O Ms O Ms\<^sup>*
[PROOF STEP]
have "?P \<union> ?Pw \<union> ?R \<subseteq> Ms^* O Ms O Ms^*" (is "?PPR \<subseteq> _")
[PROOF STATE]
proof (prove)
using this:
A\<^sup>* O (P' \<inter> Ms) O A\<^sup>* \<subseteq> Ms\<^sup>* O Ms O Ms\<^sup>*
A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>* \<subseteq> Ms\<^sup>* O Ms O Ms\<^sup>*
A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>* \<subseteq> Ms\<^sup>* O Ms O Ms\<^sup>*

goal (1 subgoal):
 1. A\<^sup>* O (P' \<inter> Ms) O A\<^sup>* \<union> A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>* \<union> A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>* \<subseteq> Ms\<^sup>* O Ms O Ms\<^sup>*
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
A\<^sup>* O (P' \<inter> Ms) O A\<^sup>* \<union> A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>* \<union> A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>* \<subseteq> Ms\<^sup>* O Ms O Ms\<^sup>*

goal (1 subgoal):
 1. \<And>i. M' (f (shift g (Suc k) i))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
A\<^sup>* O (P' \<inter> Ms) O A\<^sup>* \<union> A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>* \<union> A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>* \<subseteq> Ms\<^sup>* O Ms O Ms\<^sup>*

goal (1 subgoal):
 1. \<And>i. M' (f (shift g (Suc k) i))
[PROOF STEP]
have "... \<subseteq> Ms^+"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Ms\<^sup>* O Ms O Ms\<^sup>* \<subseteq> Ms\<^sup>+
[PROOF STEP]
by regexp
[PROOF STATE]
proof (state)
this:
Ms\<^sup>* O Ms O Ms\<^sup>* \<subseteq> Ms\<^sup>+

goal (1 subgoal):
 1. \<And>i. M' (f (shift g (Suc k) i))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
Ms\<^sup>* O Ms O Ms\<^sup>* \<subseteq> Ms\<^sup>+

goal (1 subgoal):
 1. \<And>i. M' (f (shift g (Suc k) i))
[PROOF STEP]
have "... = Ms"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Ms\<^sup>+ = Ms
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. Ms\<^sup>+ \<subseteq> Ms
 2. Ms \<subseteq> Ms\<^sup>+
[PROOF STEP]
have "Ms^+ \<subseteq> Ms^* O Ms"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Ms\<^sup>+ \<subseteq> Ms\<^sup>* O Ms
[PROOF STEP]
by regexp
[PROOF STATE]
proof (state)
this:
Ms\<^sup>+ \<subseteq> Ms\<^sup>* O Ms

goal (2 subgoals):
 1. Ms\<^sup>+ \<subseteq> Ms
 2. Ms \<subseteq> Ms\<^sup>+
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
Ms\<^sup>+ \<subseteq> Ms\<^sup>* O Ms

goal (2 subgoals):
 1. Ms\<^sup>+ \<subseteq> Ms
 2. Ms \<subseteq> Ms\<^sup>+
[PROOF STEP]
have "... \<subseteq> Ms"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Ms\<^sup>* O Ms \<subseteq> Ms
[PROOF STEP]
unfolding Ms
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {(s, t). M' t}\<^sup>* O {(s, t). M' t} \<subseteq> {(s, t). M' t}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Ms\<^sup>* O Ms \<subseteq> Ms

goal (2 subgoals):
 1. Ms\<^sup>+ \<subseteq> Ms
 2. Ms \<subseteq> Ms\<^sup>+
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
Ms\<^sup>+ \<subseteq> Ms
[PROOF STEP]
show "Ms^+ \<subseteq> Ms"
[PROOF STATE]
proof (prove)
using this:
Ms\<^sup>+ \<subseteq> Ms

goal (1 subgoal):
 1. Ms\<^sup>+ \<subseteq> Ms
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
Ms\<^sup>+ \<subseteq> Ms

goal (1 subgoal):
 1. Ms \<subseteq> Ms\<^sup>+
[PROOF STEP]
qed regexp
[PROOF STATE]
proof (state)
this:
Ms\<^sup>+ = Ms

goal (1 subgoal):
 1. \<And>i. M' (f (shift g (Suc k) i))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
A\<^sup>* O (P' \<inter> Ms) O A\<^sup>* \<union> A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>* \<union> A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>* \<subseteq> Ms
[PROOF STEP]
have PPR: "?PPR \<subseteq> Ms"
[PROOF STATE]
proof (prove)
using this:
A\<^sup>* O (P' \<inter> Ms) O A\<^sup>* \<union> A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>* \<union> A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>* \<subseteq> Ms

goal (1 subgoal):
 1. A\<^sup>* O (P' \<inter> Ms) O A\<^sup>* \<union> A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>* \<union> A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>* \<subseteq> Ms
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
A\<^sup>* O (P' \<inter> Ms) O A\<^sup>* \<union> A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>* \<union> A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>* \<subseteq> Ms

goal (1 subgoal):
 1. \<And>i. M' (f (shift g (Suc k) i))
[PROOF STEP]
show "M' (?f i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. M' (f (shift g (Suc k) i))
[PROOF STEP]
proof (induct i)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. M' (f (shift g (Suc k) 0))
 2. \<And>i. M' (f (shift g (Suc k) i)) \<Longrightarrow> M' (f (shift g (Suc k) (Suc i)))
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. M' (f (shift g (Suc k) 0))
 2. \<And>i. M' (f (shift g (Suc k) i)) \<Longrightarrow> M' (f (shift g (Suc k) (Suc i)))
[PROOF STEP]
from stepsP[OF k] k
[PROOF STATE]
proof (chain)
picking this:
(f (g k), f (g (Suc k))) \<in> SN_rel_ext_step (A\<^sup>* O (P' \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>*) (A\<^sup>*) (ty k) \<and> I (g (Suc k))
ty k \<in> {top_s, top_ns}
[PROOF STEP]
have "(f (g k), f (g (Suc k))) \<in> ?PPR"
[PROOF STATE]
proof (prove)
using this:
(f (g k), f (g (Suc k))) \<in> SN_rel_ext_step (A\<^sup>* O (P' \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>*) (A\<^sup>*) (ty k) \<and> I (g (Suc k))
ty k \<in> {top_s, top_ns}

goal (1 subgoal):
 1. (f (g k), f (g (Suc k))) \<in> A\<^sup>* O (P' \<inter> Ms) O A\<^sup>* \<union> A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>* \<union> A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>*
[PROOF STEP]
by (cases "ty k", auto)
[PROOF STATE]
proof (state)
this:
(f (g k), f (g (Suc k))) \<in> A\<^sup>* O (P' \<inter> Ms) O A\<^sup>* \<union> A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>* \<union> A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>*

goal (2 subgoals):
 1. M' (f (shift g (Suc k) 0))
 2. \<And>i. M' (f (shift g (Suc k) i)) \<Longrightarrow> M' (f (shift g (Suc k) (Suc i)))
[PROOF STEP]
with PPR
[PROOF STATE]
proof (chain)
picking this:
A\<^sup>* O (P' \<inter> Ms) O A\<^sup>* \<union> A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>* \<union> A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>* \<subseteq> Ms
(f (g k), f (g (Suc k))) \<in> A\<^sup>* O (P' \<inter> Ms) O A\<^sup>* \<union> A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>* \<union> A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>*
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
A\<^sup>* O (P' \<inter> Ms) O A\<^sup>* \<union> A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>* \<union> A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>* \<subseteq> Ms
(f (g k), f (g (Suc k))) \<in> A\<^sup>* O (P' \<inter> Ms) O A\<^sup>* \<union> A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>* \<union> A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>*

goal (1 subgoal):
 1. M' (f (shift g (Suc k) 0))
[PROOF STEP]
unfolding Ms
[PROOF STATE]
proof (prove)
using this:
A\<^sup>* O (P' \<inter> {(s, t). M' t}) O A\<^sup>* \<union> A\<^sup>* O ((P' \<union> Pw') \<inter> {(s, t). M' t}) O A\<^sup>* \<union> A\<^sup>* O ((P' \<union> R') \<inter> {(s, t). M' t}) O A\<^sup>* \<subseteq> {(s, t). M' t}
(f (g k), f (g (Suc k))) \<in> A\<^sup>* O (P' \<inter> {(s, t). M' t}) O A\<^sup>* \<union> A\<^sup>* O ((P' \<union> Pw') \<inter> {(s, t). M' t}) O A\<^sup>* \<union> A\<^sup>* O ((P' \<union> R') \<inter> {(s, t). M' t}) O A\<^sup>*

goal (1 subgoal):
 1. M' (f (shift g (Suc k) 0))
[PROOF STEP]
by simp blast
[PROOF STATE]
proof (state)
this:
M' (f (shift g (Suc k) 0))

goal (1 subgoal):
 1. \<And>i. M' (f (shift g (Suc k) i)) \<Longrightarrow> M' (f (shift g (Suc k) (Suc i)))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. M' (f (shift g (Suc k) i)) \<Longrightarrow> M' (f (shift g (Suc k) (Suc i)))
[PROOF STEP]
case (Suc i)
[PROOF STATE]
proof (state)
this:
M' (f (shift g (Suc k) i))

goal (1 subgoal):
 1. \<And>i. M' (f (shift g (Suc k) i)) \<Longrightarrow> M' (f (shift g (Suc k) (Suc i)))
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. M' (f (shift g (Suc k) (Suc i)))
[PROOF STEP]
proof (cases "?ty i = normal_ns")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. shift ty (Suc k) i = normal_ns \<Longrightarrow> M' (f (shift g (Suc k) (Suc i)))
 2. shift ty (Suc k) i \<noteq> normal_ns \<Longrightarrow> M' (f (shift g (Suc k) (Suc i)))
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
shift ty (Suc k) i \<noteq> normal_ns

goal (2 subgoals):
 1. shift ty (Suc k) i = normal_ns \<Longrightarrow> M' (f (shift g (Suc k) (Suc i)))
 2. shift ty (Suc k) i \<noteq> normal_ns \<Longrightarrow> M' (f (shift g (Suc k) (Suc i)))
[PROOF STEP]
hence "?ty i \<in> {top_s,top_ns,normal_s}"
[PROOF STATE]
proof (prove)
using this:
shift ty (Suc k) i \<noteq> normal_ns

goal (1 subgoal):
 1. shift ty (Suc k) i \<in> {top_s, top_ns, normal_s}
[PROOF STEP]
by (cases "?ty i", auto)
[PROOF STATE]
proof (state)
this:
shift ty (Suc k) i \<in> {top_s, top_ns, normal_s}

goal (2 subgoals):
 1. shift ty (Suc k) i = normal_ns \<Longrightarrow> M' (f (shift g (Suc k) (Suc i)))
 2. shift ty (Suc k) i \<noteq> normal_ns \<Longrightarrow> M' (f (shift g (Suc k) (Suc i)))
[PROOF STEP]
with stepsI[OF I[of i]]
[PROOF STATE]
proof (chain)
picking this:
(f (g (shift id (Suc k) i)), f (g (Suc (shift id (Suc k) i)))) \<in> SN_rel_ext_step (A\<^sup>* O (P' \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>*) (A\<^sup>*) (ty (shift id (Suc k) i)) \<and> I (g (Suc (shift id (Suc k) i)))
shift ty (Suc k) i \<in> {top_s, top_ns, normal_s}
[PROOF STEP]
have "(?f i, ?f (Suc i)) \<in> ?PPR"
[PROOF STATE]
proof (prove)
using this:
(f (g (shift id (Suc k) i)), f (g (Suc (shift id (Suc k) i)))) \<in> SN_rel_ext_step (A\<^sup>* O (P' \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>*) (A\<^sup>*) (ty (shift id (Suc k) i)) \<and> I (g (Suc (shift id (Suc k) i)))
shift ty (Suc k) i \<in> {top_s, top_ns, normal_s}

goal (1 subgoal):
 1. (f (shift g (Suc k) i), f (shift g (Suc k) (Suc i))) \<in> A\<^sup>* O (P' \<inter> Ms) O A\<^sup>* \<union> A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>* \<union> A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>*
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(f (shift g (Suc k) i), f (shift g (Suc k) (Suc i))) \<in> A\<^sup>* O (P' \<inter> Ms) O A\<^sup>* \<union> A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>* \<union> A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>*

goal (2 subgoals):
 1. shift ty (Suc k) i = normal_ns \<Longrightarrow> M' (f (shift g (Suc k) (Suc i)))
 2. shift ty (Suc k) i \<noteq> normal_ns \<Longrightarrow> M' (f (shift g (Suc k) (Suc i)))
[PROOF STEP]
from subsetD[OF PPR this]
[PROOF STATE]
proof (chain)
picking this:
(f (shift g (Suc k) i), f (shift g (Suc k) (Suc i))) \<in> Ms
[PROOF STEP]
have "(?f i, ?f (Suc i)) \<in> Ms"
[PROOF STATE]
proof (prove)
using this:
(f (shift g (Suc k) i), f (shift g (Suc k) (Suc i))) \<in> Ms

goal (1 subgoal):
 1. (f (shift g (Suc k) i), f (shift g (Suc k) (Suc i))) \<in> Ms
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(f (shift g (Suc k) i), f (shift g (Suc k) (Suc i))) \<in> Ms

goal (2 subgoals):
 1. shift ty (Suc k) i = normal_ns \<Longrightarrow> M' (f (shift g (Suc k) (Suc i)))
 2. shift ty (Suc k) i \<noteq> normal_ns \<Longrightarrow> M' (f (shift g (Suc k) (Suc i)))
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
(f (shift g (Suc k) i), f (shift g (Suc k) (Suc i))) \<in> Ms

goal (1 subgoal):
 1. M' (f (shift g (Suc k) (Suc i)))
[PROOF STEP]
unfolding Ms
[PROOF STATE]
proof (prove)
using this:
(f (shift g (Suc k) i), f (shift g (Suc k) (Suc i))) \<in> {(s, t). M' t}

goal (1 subgoal):
 1. M' (f (shift g (Suc k) (Suc i)))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
M' (f (shift g (Suc k) (Suc i)))

goal (1 subgoal):
 1. shift ty (Suc k) i = normal_ns \<Longrightarrow> M' (f (shift g (Suc k) (Suc i)))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. shift ty (Suc k) i = normal_ns \<Longrightarrow> M' (f (shift g (Suc k) (Suc i)))
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
shift ty (Suc k) i = normal_ns

goal (1 subgoal):
 1. shift ty (Suc k) i = normal_ns \<Longrightarrow> M' (f (shift g (Suc k) (Suc i)))
[PROOF STEP]
with stepsI[OF I[of i]]
[PROOF STATE]
proof (chain)
picking this:
(f (g (shift id (Suc k) i)), f (g (Suc (shift id (Suc k) i)))) \<in> SN_rel_ext_step (A\<^sup>* O (P' \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>*) (A\<^sup>*) (ty (shift id (Suc k) i)) \<and> I (g (Suc (shift id (Suc k) i)))
shift ty (Suc k) i = normal_ns
[PROOF STEP]
have "(?f i, ?f (Suc i)) \<in> ?Rw"
[PROOF STATE]
proof (prove)
using this:
(f (g (shift id (Suc k) i)), f (g (Suc (shift id (Suc k) i)))) \<in> SN_rel_ext_step (A\<^sup>* O (P' \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>*) (A\<^sup>*) (ty (shift id (Suc k) i)) \<and> I (g (Suc (shift id (Suc k) i)))
shift ty (Suc k) i = normal_ns

goal (1 subgoal):
 1. (f (shift g (Suc k) i), f (shift g (Suc k) (Suc i))) \<in> A\<^sup>*
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(f (shift g (Suc k) i), f (shift g (Suc k) (Suc i))) \<in> A\<^sup>*

goal (1 subgoal):
 1. shift ty (Suc k) i = normal_ns \<Longrightarrow> M' (f (shift g (Suc k) (Suc i)))
[PROOF STEP]
with RwM
[PROOF STATE]
proof (chain)
picking this:
A\<^sup>* \<subseteq> Ms\<^sup>*
(f (shift g (Suc k) i), f (shift g (Suc k) (Suc i))) \<in> A\<^sup>*
[PROOF STEP]
have mem: "(?f i, ?f (Suc i)) \<in> Ms^*"
[PROOF STATE]
proof (prove)
using this:
A\<^sup>* \<subseteq> Ms\<^sup>*
(f (shift g (Suc k) i), f (shift g (Suc k) (Suc i))) \<in> A\<^sup>*

goal (1 subgoal):
 1. (f (shift g (Suc k) i), f (shift g (Suc k) (Suc i))) \<in> Ms\<^sup>*
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(f (shift g (Suc k) i), f (shift g (Suc k) (Suc i))) \<in> Ms\<^sup>*

goal (1 subgoal):
 1. shift ty (Suc k) i = normal_ns \<Longrightarrow> M' (f (shift g (Suc k) (Suc i)))
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
(f (shift g (Suc k) i), f (shift g (Suc k) (Suc i))) \<in> Ms\<^sup>*

goal (1 subgoal):
 1. M' (f (shift g (Suc k) (Suc i)))
[PROOF STEP]
proof (cases)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. f (shift g (Suc k) i) = f (shift g (Suc k) (Suc i)) \<Longrightarrow> M' (f (shift g (Suc k) (Suc i)))
 2. \<And>y. \<lbrakk>(f (shift g (Suc k) i), y) \<in> Ms\<^sup>*; (y, f (shift g (Suc k) (Suc i))) \<in> Ms\<rbrakk> \<Longrightarrow> M' (f (shift g (Suc k) (Suc i)))
[PROOF STEP]
case base
[PROOF STATE]
proof (state)
this:
f (shift g (Suc k) i) = f (shift g (Suc k) (Suc i))

goal (2 subgoals):
 1. f (shift g (Suc k) i) = f (shift g (Suc k) (Suc i)) \<Longrightarrow> M' (f (shift g (Suc k) (Suc i)))
 2. \<And>y. \<lbrakk>(f (shift g (Suc k) i), y) \<in> Ms\<^sup>*; (y, f (shift g (Suc k) (Suc i))) \<in> Ms\<rbrakk> \<Longrightarrow> M' (f (shift g (Suc k) (Suc i)))
[PROOF STEP]
with Suc
[PROOF STATE]
proof (chain)
picking this:
M' (f (shift g (Suc k) i))
f (shift g (Suc k) i) = f (shift g (Suc k) (Suc i))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
M' (f (shift g (Suc k) i))
f (shift g (Suc k) i) = f (shift g (Suc k) (Suc i))

goal (1 subgoal):
 1. M' (f (shift g (Suc k) (Suc i)))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
M' (f (shift g (Suc k) (Suc i)))

goal (1 subgoal):
 1. \<And>y. \<lbrakk>(f (shift g (Suc k) i), y) \<in> Ms\<^sup>*; (y, f (shift g (Suc k) (Suc i))) \<in> Ms\<rbrakk> \<Longrightarrow> M' (f (shift g (Suc k) (Suc i)))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>y. \<lbrakk>(f (shift g (Suc k) i), y) \<in> Ms\<^sup>*; (y, f (shift g (Suc k) (Suc i))) \<in> Ms\<rbrakk> \<Longrightarrow> M' (f (shift g (Suc k) (Suc i)))
[PROOF STEP]
case step
[PROOF STATE]
proof (state)
this:
(f (shift g (Suc k) i), y_) \<in> Ms\<^sup>*
(y_, f (shift g (Suc k) (Suc i))) \<in> Ms

goal (1 subgoal):
 1. \<And>y. \<lbrakk>(f (shift g (Suc k) i), y) \<in> Ms\<^sup>*; (y, f (shift g (Suc k) (Suc i))) \<in> Ms\<rbrakk> \<Longrightarrow> M' (f (shift g (Suc k) (Suc i)))
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
(f (shift g (Suc k) i), y_) \<in> Ms\<^sup>*
(y_, f (shift g (Suc k) (Suc i))) \<in> Ms

goal (1 subgoal):
 1. M' (f (shift g (Suc k) (Suc i)))
[PROOF STEP]
unfolding Ms
[PROOF STATE]
proof (prove)
using this:
(f (shift g (Suc k) i), y_) \<in> {(s, t). M' t}\<^sup>*
(y_, f (shift g (Suc k) (Suc i))) \<in> {(s, t). M' t}

goal (1 subgoal):
 1. M' (f (shift g (Suc k) (Suc i)))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
M' (f (shift g (Suc k) (Suc i)))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
M' (f (shift g (Suc k) (Suc i)))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
M' (f (shift g (Suc k) (Suc i)))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
M' (f (shift g (Suc k) i))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<not> SN_rel_ext (A\<^sup>* O (P' \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>*) (A\<^sup>*) M'

goal (1 subgoal):
 1. \<not> SN_rel_ext P Pw R Rw M \<Longrightarrow> False
[PROOF STEP]
with SN
[PROOF STATE]
proof (chain)
picking this:
SN_rel_ext (((P' \<union> Pw' \<union> R' \<union> Rw') \<inter> {(s, t). M' t})\<^sup>* O (P' \<inter> {(s, t). M' t}) O ((P' \<union> Pw' \<union> R' \<union> Rw') \<inter> {(s, t). M' t})\<^sup>*) (((P' \<union> Pw' \<union> R' \<union> Rw') \<inter> {(s, t). M' t})\<^sup>* O ((P' \<union> Pw') \<inter> {(s, t). M' t}) O ((P' \<union> Pw' \<union> R' \<union> Rw') \<inter> {(s, t). M' t})\<^sup>*) (((P' \<union> Pw' \<union> R' \<union> Rw') \<inter> {(s, t). M' t})\<^sup>* O ((P' \<union> R') \<inter> {(s, t). M' t}) O ((P' \<union> Pw' \<union> R' \<union> Rw') \<inter> {(s, t). M' t})\<^sup>*) (((P' \<union> Pw' \<union> R' \<union> Rw') \<inter> {(s, t). M' t})\<^sup>*) M'
\<not> SN_rel_ext (A\<^sup>* O (P' \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>*) (A\<^sup>*) M'
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
SN_rel_ext (((P' \<union> Pw' \<union> R' \<union> Rw') \<inter> {(s, t). M' t})\<^sup>* O (P' \<inter> {(s, t). M' t}) O ((P' \<union> Pw' \<union> R' \<union> Rw') \<inter> {(s, t). M' t})\<^sup>*) (((P' \<union> Pw' \<union> R' \<union> Rw') \<inter> {(s, t). M' t})\<^sup>* O ((P' \<union> Pw') \<inter> {(s, t). M' t}) O ((P' \<union> Pw' \<union> R' \<union> Rw') \<inter> {(s, t). M' t})\<^sup>*) (((P' \<union> Pw' \<union> R' \<union> Rw') \<inter> {(s, t). M' t})\<^sup>* O ((P' \<union> R') \<inter> {(s, t). M' t}) O ((P' \<union> Pw' \<union> R' \<union> Rw') \<inter> {(s, t). M' t})\<^sup>*) (((P' \<union> Pw' \<union> R' \<union> Rw') \<inter> {(s, t). M' t})\<^sup>*) M'
\<not> SN_rel_ext (A\<^sup>* O (P' \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> Pw') \<inter> Ms) O A\<^sup>*) (A\<^sup>* O ((P' \<union> R') \<inter> Ms) O A\<^sup>*) (A\<^sup>*) M'

goal (1 subgoal):
 1. False
[PROOF STEP]
unfolding A Ms
[PROOF STATE]
proof (prove)
using this:
SN_rel_ext (((P' \<union> Pw' \<union> R' \<union> Rw') \<inter> {(s, t). M' t})\<^sup>* O (P' \<inter> {(s, t). M' t}) O ((P' \<union> Pw' \<union> R' \<union> Rw') \<inter> {(s, t). M' t})\<^sup>*) (((P' \<union> Pw' \<union> R' \<union> Rw') \<inter> {(s, t). M' t})\<^sup>* O ((P' \<union> Pw') \<inter> {(s, t). M' t}) O ((P' \<union> Pw' \<union> R' \<union> Rw') \<inter> {(s, t). M' t})\<^sup>*) (((P' \<union> Pw' \<union> R' \<union> Rw') \<inter> {(s, t). M' t})\<^sup>* O ((P' \<union> R') \<inter> {(s, t). M' t}) O ((P' \<union> Pw' \<union> R' \<union> Rw') \<inter> {(s, t). M' t})\<^sup>*) (((P' \<union> Pw' \<union> R' \<union> Rw') \<inter> {(s, t). M' t})\<^sup>*) M'
\<not> SN_rel_ext (((P' \<union> Pw' \<union> R' \<union> Rw') \<inter> {(s, t). M' t})\<^sup>* O (P' \<inter> {(s, t). M' t}) O ((P' \<union> Pw' \<union> R' \<union> Rw') \<inter> {(s, t). M' t})\<^sup>*) (((P' \<union> Pw' \<union> R' \<union> Rw') \<inter> {(s, t). M' t})\<^sup>* O ((P' \<union> Pw') \<inter> {(s, t). M' t}) O ((P' \<union> Pw' \<union> R' \<union> Rw') \<inter> {(s, t). M' t})\<^sup>*) (((P' \<union> Pw' \<union> R' \<union> Rw') \<inter> {(s, t). M' t})\<^sup>* O ((P' \<union> R') \<inter> {(s, t). M' t}) O ((P' \<union> Pw' \<union> R' \<union> Rw') \<inter> {(s, t). M' t})\<^sup>*) (((P' \<union> Pw' \<union> R' \<union> Rw') \<inter> {(s, t). M' t})\<^sup>*) M'

goal (1 subgoal):
 1. False
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
SN_rel_ext P Pw R Rw M

goal:
No subgoals!
[PROOF STEP]
qed