[STATEMENT]
lemma "Cl_3 \<C>'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Fr_3 \<C>'
[PROOF STEP]
nitpick
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Fr_3 \<C>'
[PROOF STEP]
oops


[STATEMENT]
lemma (in encoding_wrt_barbs) enc_and_TRel_impl_indRelRTPO_weakly_respects_barbs:
  fixes TRel :: "('procT \<times> 'procT) set"
  assumes encRS:  "enc_weakly_respects_barbs"
      and trelPS: "rel_weakly_preserves_barbs TRel TWB"
      and trelRS: "rel_weakly_reflects_barbs TRel TWB"
  shows "rel_weakly_respects_barbs (indRelRTPO TRel) (STCalWB SWB TWB)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rel_weakly_respects_barbs (indRelRTPO TRel) (STCalWB SWB TWB)
[PROOF STEP]
proof auto
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>a b x P'. a \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> b \<and> a \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> b\<Down><STCalWB SWB TWB>x
 2. \<And>a b x P'. a \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> b \<and> b \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> a\<Down><STCalWB SWB TWB>x
[PROOF STEP]
fix P Q x P'
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>a b x P'. a \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> b \<and> a \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> b\<Down><STCalWB SWB TWB>x
 2. \<And>a b x P'. a \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> b \<and> b \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> a\<Down><STCalWB SWB TWB>x
[PROOF STEP]
assume "P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q" and "P \<longmapsto>(Calculus (STCalWB SWB TWB))* P'"
     and "P'\<down><STCalWB SWB TWB>x"
[PROOF STATE]
proof (state)
this:
P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q
P \<longmapsto>Calculus (STCalWB SWB TWB)* P'
P'\<down><STCalWB SWB TWB>x

goal (2 subgoals):
 1. \<And>a b x P'. a \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> b \<and> a \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> b\<Down><STCalWB SWB TWB>x
 2. \<And>a b x P'. a \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> b \<and> b \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> a\<Down><STCalWB SWB TWB>x
[PROOF STEP]
thus "Q\<Down><STCalWB SWB TWB>x"
[PROOF STATE]
proof (prove)
using this:
P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q
P \<longmapsto>Calculus (STCalWB SWB TWB)* P'
P'\<down><STCalWB SWB TWB>x

goal (1 subgoal):
 1. Q\<Down><STCalWB SWB TWB>x
[PROOF STEP]
proof (induct arbitrary: P')
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<And>S P'. SourceTerm S \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm (\<lbrakk>S\<rbrakk>)\<Down><STCalWB SWB TWB>x
 2. \<And>S P'. SourceTerm S \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> SourceTerm S\<Down><STCalWB SWB TWB>x
 3. \<And>T1 T2 P'. (T1, T2) \<in> TRel \<and> TargetTerm T1 \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm T2\<Down><STCalWB SWB TWB>x
 4. \<And>P Q R P'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>P'. P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>P'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> R\<Down><STCalWB SWB TWB>x; P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> R\<Down><STCalWB SWB TWB>x
[PROOF STEP]
case (encR S)
[PROOF STATE]
proof (state)
this:
SourceTerm S \<longmapsto>Calculus (STCalWB SWB TWB)* P'
P'\<down><STCalWB SWB TWB>x

goal (4 subgoals):
 1. \<And>S P'. SourceTerm S \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm (\<lbrakk>S\<rbrakk>)\<Down><STCalWB SWB TWB>x
 2. \<And>S P'. SourceTerm S \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> SourceTerm S\<Down><STCalWB SWB TWB>x
 3. \<And>T1 T2 P'. (T1, T2) \<in> TRel \<and> TargetTerm T1 \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm T2\<Down><STCalWB SWB TWB>x
 4. \<And>P Q R P'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>P'. P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>P'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> R\<Down><STCalWB SWB TWB>x; P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> R\<Down><STCalWB SWB TWB>x
[PROOF STEP]
assume "SourceTerm S \<longmapsto>(Calculus (STCalWB SWB TWB))* P'" and "P'\<down><STCalWB SWB TWB>x"
[PROOF STATE]
proof (state)
this:
SourceTerm S \<longmapsto>Calculus (STCalWB SWB TWB)* P'
P'\<down><STCalWB SWB TWB>x

goal (4 subgoals):
 1. \<And>S P'. SourceTerm S \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm (\<lbrakk>S\<rbrakk>)\<Down><STCalWB SWB TWB>x
 2. \<And>S P'. SourceTerm S \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> SourceTerm S\<Down><STCalWB SWB TWB>x
 3. \<And>T1 T2 P'. (T1, T2) \<in> TRel \<and> TargetTerm T1 \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm T2\<Down><STCalWB SWB TWB>x
 4. \<And>P Q R P'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>P'. P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>P'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> R\<Down><STCalWB SWB TWB>x; P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> R\<Down><STCalWB SWB TWB>x
[PROOF STEP]
hence "S\<Down><SWB>x"
[PROOF STATE]
proof (prove)
using this:
SourceTerm S \<longmapsto>Calculus (STCalWB SWB TWB)* P'
P'\<down><STCalWB SWB TWB>x

goal (1 subgoal):
 1. S\<Down><SWB>x
[PROOF STEP]
using STCalWB_reachesBarbST
[PROOF STATE]
proof (prove)
using this:
SourceTerm S \<longmapsto>Calculus (STCalWB SWB TWB)* P'
P'\<down><STCalWB SWB TWB>x
?P\<Down><STCalWB SWB TWB>?a = ((\<exists>S. S \<in>S ?P \<and> S\<Down><SWB>?a) \<or> (\<exists>T. T \<in>T ?P \<and> T\<Down><TWB>?a))

goal (1 subgoal):
 1. S\<Down><SWB>x
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
S\<Down><SWB>x

goal (4 subgoals):
 1. \<And>S P'. SourceTerm S \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm (\<lbrakk>S\<rbrakk>)\<Down><STCalWB SWB TWB>x
 2. \<And>S P'. SourceTerm S \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> SourceTerm S\<Down><STCalWB SWB TWB>x
 3. \<And>T1 T2 P'. (T1, T2) \<in> TRel \<and> TargetTerm T1 \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm T2\<Down><STCalWB SWB TWB>x
 4. \<And>P Q R P'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>P'. P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>P'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> R\<Down><STCalWB SWB TWB>x; P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> R\<Down><STCalWB SWB TWB>x
[PROOF STEP]
with encRS
[PROOF STATE]
proof (chain)
picking this:
(\<forall>S x. (\<exists>Sa. Sa \<in>S SourceTerm S \<and> Sa\<Down><SWB>x) \<or> (\<exists>T. T \<in>T SourceTerm S \<and> T\<Down><TWB>x) \<longrightarrow> (\<exists>Sa. Sa \<in>S TargetTerm (\<lbrakk>S\<rbrakk>) \<and> Sa\<Down><SWB>x) \<or> (\<exists>T. T \<in>T TargetTerm (\<lbrakk>S\<rbrakk>) \<and> T\<Down><TWB>x)) \<and> (\<forall>S x. (\<exists>Sa. Sa \<in>S TargetTerm (\<lbrakk>S\<rbrakk>) \<and> Sa\<Down><SWB>x) \<or> (\<exists>T. T \<in>T TargetTerm (\<lbrakk>S\<rbrakk>) \<and> T\<Down><TWB>x) \<longrightarrow> (\<exists>Sa. Sa \<in>S SourceTerm S \<and> Sa\<Down><SWB>x) \<or> (\<exists>T. T \<in>T SourceTerm S \<and> T\<Down><TWB>x))
S\<Down><SWB>x
[PROOF STEP]
have "\<lbrakk>S\<rbrakk>\<Down><TWB>x"
[PROOF STATE]
proof (prove)
using this:
(\<forall>S x. (\<exists>Sa. Sa \<in>S SourceTerm S \<and> Sa\<Down><SWB>x) \<or> (\<exists>T. T \<in>T SourceTerm S \<and> T\<Down><TWB>x) \<longrightarrow> (\<exists>Sa. Sa \<in>S TargetTerm (\<lbrakk>S\<rbrakk>) \<and> Sa\<Down><SWB>x) \<or> (\<exists>T. T \<in>T TargetTerm (\<lbrakk>S\<rbrakk>) \<and> T\<Down><TWB>x)) \<and> (\<forall>S x. (\<exists>Sa. Sa \<in>S TargetTerm (\<lbrakk>S\<rbrakk>) \<and> Sa\<Down><SWB>x) \<or> (\<exists>T. T \<in>T TargetTerm (\<lbrakk>S\<rbrakk>) \<and> T\<Down><TWB>x) \<longrightarrow> (\<exists>Sa. Sa \<in>S SourceTerm S \<and> Sa\<Down><SWB>x) \<or> (\<exists>T. T \<in>T SourceTerm S \<and> T\<Down><TWB>x))
S\<Down><SWB>x

goal (1 subgoal):
 1. \<lbrakk>S\<rbrakk>\<Down><TWB>x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<lbrakk>S\<rbrakk>\<Down><TWB>x

goal (4 subgoals):
 1. \<And>S P'. SourceTerm S \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm (\<lbrakk>S\<rbrakk>)\<Down><STCalWB SWB TWB>x
 2. \<And>S P'. SourceTerm S \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> SourceTerm S\<Down><STCalWB SWB TWB>x
 3. \<And>T1 T2 P'. (T1, T2) \<in> TRel \<and> TargetTerm T1 \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm T2\<Down><STCalWB SWB TWB>x
 4. \<And>P Q R P'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>P'. P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>P'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> R\<Down><STCalWB SWB TWB>x; P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> R\<Down><STCalWB SWB TWB>x
[PROOF STEP]
thus "TargetTerm (\<lbrakk>S\<rbrakk>)\<Down><STCalWB SWB TWB>x"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>S\<rbrakk>\<Down><TWB>x

goal (1 subgoal):
 1. TargetTerm (\<lbrakk>S\<rbrakk>)\<Down><STCalWB SWB TWB>x
[PROOF STEP]
using STCalWB_reachesBarbST
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>S\<rbrakk>\<Down><TWB>x
?P\<Down><STCalWB SWB TWB>?a = ((\<exists>S. S \<in>S ?P \<and> S\<Down><SWB>?a) \<or> (\<exists>T. T \<in>T ?P \<and> T\<Down><TWB>?a))

goal (1 subgoal):
 1. TargetTerm (\<lbrakk>S\<rbrakk>)\<Down><STCalWB SWB TWB>x
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
TargetTerm (\<lbrakk>S\<rbrakk>)\<Down><STCalWB SWB TWB>x

goal (3 subgoals):
 1. \<And>S P'. SourceTerm S \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> SourceTerm S\<Down><STCalWB SWB TWB>x
 2. \<And>T1 T2 P'. (T1, T2) \<in> TRel \<and> TargetTerm T1 \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm T2\<Down><STCalWB SWB TWB>x
 3. \<And>P Q R P'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>P'. P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>P'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> R\<Down><STCalWB SWB TWB>x; P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> R\<Down><STCalWB SWB TWB>x
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>S P'. SourceTerm S \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> SourceTerm S\<Down><STCalWB SWB TWB>x
 2. \<And>T1 T2 P'. (T1, T2) \<in> TRel \<and> TargetTerm T1 \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm T2\<Down><STCalWB SWB TWB>x
 3. \<And>P Q R P'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>P'. P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>P'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> R\<Down><STCalWB SWB TWB>x; P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> R\<Down><STCalWB SWB TWB>x
[PROOF STEP]
case (source S)
[PROOF STATE]
proof (state)
this:
SourceTerm S \<longmapsto>Calculus (STCalWB SWB TWB)* P'
P'\<down><STCalWB SWB TWB>x

goal (3 subgoals):
 1. \<And>S P'. SourceTerm S \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> SourceTerm S\<Down><STCalWB SWB TWB>x
 2. \<And>T1 T2 P'. (T1, T2) \<in> TRel \<and> TargetTerm T1 \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm T2\<Down><STCalWB SWB TWB>x
 3. \<And>P Q R P'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>P'. P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>P'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> R\<Down><STCalWB SWB TWB>x; P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> R\<Down><STCalWB SWB TWB>x
[PROOF STEP]
assume "SourceTerm S \<longmapsto>(Calculus (STCalWB SWB TWB))* P'" and "P'\<down><STCalWB SWB TWB>x"
[PROOF STATE]
proof (state)
this:
SourceTerm S \<longmapsto>Calculus (STCalWB SWB TWB)* P'
P'\<down><STCalWB SWB TWB>x

goal (3 subgoals):
 1. \<And>S P'. SourceTerm S \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> SourceTerm S\<Down><STCalWB SWB TWB>x
 2. \<And>T1 T2 P'. (T1, T2) \<in> TRel \<and> TargetTerm T1 \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm T2\<Down><STCalWB SWB TWB>x
 3. \<And>P Q R P'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>P'. P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>P'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> R\<Down><STCalWB SWB TWB>x; P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> R\<Down><STCalWB SWB TWB>x
[PROOF STEP]
thus "SourceTerm S\<Down><STCalWB SWB TWB>x"
[PROOF STATE]
proof (prove)
using this:
SourceTerm S \<longmapsto>Calculus (STCalWB SWB TWB)* P'
P'\<down><STCalWB SWB TWB>x

goal (1 subgoal):
 1. SourceTerm S\<Down><STCalWB SWB TWB>x
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
SourceTerm S\<Down><STCalWB SWB TWB>x

goal (2 subgoals):
 1. \<And>T1 T2 P'. (T1, T2) \<in> TRel \<and> TargetTerm T1 \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm T2\<Down><STCalWB SWB TWB>x
 2. \<And>P Q R P'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>P'. P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>P'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> R\<Down><STCalWB SWB TWB>x; P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> R\<Down><STCalWB SWB TWB>x
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>T1 T2 P'. (T1, T2) \<in> TRel \<and> TargetTerm T1 \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm T2\<Down><STCalWB SWB TWB>x
 2. \<And>P Q R P'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>P'. P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>P'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> R\<Down><STCalWB SWB TWB>x; P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> R\<Down><STCalWB SWB TWB>x
[PROOF STEP]
case (target T1 T2)
[PROOF STATE]
proof (state)
this:
(T1, T2) \<in> TRel
TargetTerm T1 \<longmapsto>Calculus (STCalWB SWB TWB)* P'
P'\<down><STCalWB SWB TWB>x

goal (2 subgoals):
 1. \<And>T1 T2 P'. (T1, T2) \<in> TRel \<and> TargetTerm T1 \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm T2\<Down><STCalWB SWB TWB>x
 2. \<And>P Q R P'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>P'. P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>P'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> R\<Down><STCalWB SWB TWB>x; P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> R\<Down><STCalWB SWB TWB>x
[PROOF STEP]
assume "(T1, T2) \<in> TRel"
[PROOF STATE]
proof (state)
this:
(T1, T2) \<in> TRel

goal (2 subgoals):
 1. \<And>T1 T2 P'. (T1, T2) \<in> TRel \<and> TargetTerm T1 \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm T2\<Down><STCalWB SWB TWB>x
 2. \<And>P Q R P'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>P'. P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>P'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> R\<Down><STCalWB SWB TWB>x; P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> R\<Down><STCalWB SWB TWB>x
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(T1, T2) \<in> TRel

goal (2 subgoals):
 1. \<And>T1 T2 P'. (T1, T2) \<in> TRel \<and> TargetTerm T1 \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm T2\<Down><STCalWB SWB TWB>x
 2. \<And>P Q R P'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>P'. P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>P'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> R\<Down><STCalWB SWB TWB>x; P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> R\<Down><STCalWB SWB TWB>x
[PROOF STEP]
assume "TargetTerm T1 \<longmapsto>(Calculus (STCalWB SWB TWB))* P'"
                and "P'\<down><STCalWB SWB TWB>x"
[PROOF STATE]
proof (state)
this:
TargetTerm T1 \<longmapsto>Calculus (STCalWB SWB TWB)* P'
P'\<down><STCalWB SWB TWB>x

goal (2 subgoals):
 1. \<And>T1 T2 P'. (T1, T2) \<in> TRel \<and> TargetTerm T1 \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm T2\<Down><STCalWB SWB TWB>x
 2. \<And>P Q R P'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>P'. P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>P'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> R\<Down><STCalWB SWB TWB>x; P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> R\<Down><STCalWB SWB TWB>x
[PROOF STEP]
hence "T1\<Down><TWB>x"
[PROOF STATE]
proof (prove)
using this:
TargetTerm T1 \<longmapsto>Calculus (STCalWB SWB TWB)* P'
P'\<down><STCalWB SWB TWB>x

goal (1 subgoal):
 1. T1\<Down><TWB>x
[PROOF STEP]
using STCalWB_reachesBarbST
[PROOF STATE]
proof (prove)
using this:
TargetTerm T1 \<longmapsto>Calculus (STCalWB SWB TWB)* P'
P'\<down><STCalWB SWB TWB>x
?P\<Down><STCalWB SWB TWB>?a = ((\<exists>S. S \<in>S ?P \<and> S\<Down><SWB>?a) \<or> (\<exists>T. T \<in>T ?P \<and> T\<Down><TWB>?a))

goal (1 subgoal):
 1. T1\<Down><TWB>x
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
T1\<Down><TWB>x

goal (2 subgoals):
 1. \<And>T1 T2 P'. (T1, T2) \<in> TRel \<and> TargetTerm T1 \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm T2\<Down><STCalWB SWB TWB>x
 2. \<And>P Q R P'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>P'. P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>P'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> R\<Down><STCalWB SWB TWB>x; P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> R\<Down><STCalWB SWB TWB>x
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(T1, T2) \<in> TRel
T1\<Down><TWB>x
[PROOF STEP]
have "T2\<Down><TWB>x"
[PROOF STATE]
proof (prove)
using this:
(T1, T2) \<in> TRel
T1\<Down><TWB>x

goal (1 subgoal):
 1. T2\<Down><TWB>x
[PROOF STEP]
using trelPS
[PROOF STATE]
proof (prove)
using this:
(T1, T2) \<in> TRel
T1\<Down><TWB>x
rel_weakly_preserves_barbs TRel TWB

goal (1 subgoal):
 1. T2\<Down><TWB>x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
T2\<Down><TWB>x

goal (2 subgoals):
 1. \<And>T1 T2 P'. (T1, T2) \<in> TRel \<and> TargetTerm T1 \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm T2\<Down><STCalWB SWB TWB>x
 2. \<And>P Q R P'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>P'. P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>P'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> R\<Down><STCalWB SWB TWB>x; P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> R\<Down><STCalWB SWB TWB>x
[PROOF STEP]
thus "TargetTerm T2\<Down><STCalWB SWB TWB>x"
[PROOF STATE]
proof (prove)
using this:
T2\<Down><TWB>x

goal (1 subgoal):
 1. TargetTerm T2\<Down><STCalWB SWB TWB>x
[PROOF STEP]
using STCalWB_reachesBarbST
[PROOF STATE]
proof (prove)
using this:
T2\<Down><TWB>x
?P\<Down><STCalWB SWB TWB>?a = ((\<exists>S. S \<in>S ?P \<and> S\<Down><SWB>?a) \<or> (\<exists>T. T \<in>T ?P \<and> T\<Down><TWB>?a))

goal (1 subgoal):
 1. TargetTerm T2\<Down><STCalWB SWB TWB>x
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
TargetTerm T2\<Down><STCalWB SWB TWB>x

goal (1 subgoal):
 1. \<And>P Q R P'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>P'. P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>P'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> R\<Down><STCalWB SWB TWB>x; P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> R\<Down><STCalWB SWB TWB>x
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>P Q R P'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>P'. P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>P'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> R\<Down><STCalWB SWB TWB>x; P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> R\<Down><STCalWB SWB TWB>x
[PROOF STEP]
case (trans P Q R)
[PROOF STATE]
proof (state)
this:
P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q
P \<longmapsto>Calculus (STCalWB SWB TWB)* ?P'3 \<and> ?P'3\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x
Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R
Q \<longmapsto>Calculus (STCalWB SWB TWB)* ?P'3 \<and> ?P'3\<down><STCalWB SWB TWB>x \<Longrightarrow> R\<Down><STCalWB SWB TWB>x
P \<longmapsto>Calculus (STCalWB SWB TWB)* P'
P'\<down><STCalWB SWB TWB>x

goal (1 subgoal):
 1. \<And>P Q R P'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>P'. P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>P'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> R\<Down><STCalWB SWB TWB>x; P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> R\<Down><STCalWB SWB TWB>x
[PROOF STEP]
assume "P \<longmapsto>(Calculus (STCalWB SWB TWB))* P'" and "P'\<down><STCalWB SWB TWB>x"
       and "\<And>P'. P \<longmapsto>(Calculus (STCalWB SWB TWB))* P' \<Longrightarrow> P'\<down><STCalWB SWB TWB>x
            \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x"
[PROOF STATE]
proof (state)
this:
P \<longmapsto>Calculus (STCalWB SWB TWB)* P'
P'\<down><STCalWB SWB TWB>x
P \<longmapsto>Calculus (STCalWB SWB TWB)* ?P'3 \<and> ?P'3\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x

goal (1 subgoal):
 1. \<And>P Q R P'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>P'. P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>P'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> R\<Down><STCalWB SWB TWB>x; P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> R\<Down><STCalWB SWB TWB>x
[PROOF STEP]
hence "Q\<Down><STCalWB SWB TWB>x"
[PROOF STATE]
proof (prove)
using this:
P \<longmapsto>Calculus (STCalWB SWB TWB)* P'
P'\<down><STCalWB SWB TWB>x
P \<longmapsto>Calculus (STCalWB SWB TWB)* ?P'3 \<and> ?P'3\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x

goal (1 subgoal):
 1. Q\<Down><STCalWB SWB TWB>x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Q\<Down><STCalWB SWB TWB>x

goal (1 subgoal):
 1. \<And>P Q R P'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>P'. P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>P'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> R\<Down><STCalWB SWB TWB>x; P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> R\<Down><STCalWB SWB TWB>x
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
Q\<Down><STCalWB SWB TWB>x

goal (1 subgoal):
 1. \<And>P Q R P'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>P'. P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>P'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> R\<Down><STCalWB SWB TWB>x; P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> R\<Down><STCalWB SWB TWB>x
[PROOF STEP]
assume "\<And>Q'. Q \<longmapsto>(Calculus (STCalWB SWB TWB))* Q' \<Longrightarrow> Q'\<down><STCalWB SWB TWB>x
                     \<Longrightarrow> R\<Down><STCalWB SWB TWB>x"
[PROOF STATE]
proof (state)
this:
Q \<longmapsto>Calculus (STCalWB SWB TWB)* ?Q'3 \<and> ?Q'3\<down><STCalWB SWB TWB>x \<Longrightarrow> R\<Down><STCalWB SWB TWB>x

goal (1 subgoal):
 1. \<And>P Q R P'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>P'. P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>P'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> R\<Down><STCalWB SWB TWB>x; P \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> R\<Down><STCalWB SWB TWB>x
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
Q\<Down><STCalWB SWB TWB>x
Q \<longmapsto>Calculus (STCalWB SWB TWB)* ?Q'3 \<and> ?Q'3\<down><STCalWB SWB TWB>x \<Longrightarrow> R\<Down><STCalWB SWB TWB>x
[PROOF STEP]
show "R\<Down><STCalWB SWB TWB>x"
[PROOF STATE]
proof (prove)
using this:
Q\<Down><STCalWB SWB TWB>x
Q \<longmapsto>Calculus (STCalWB SWB TWB)* ?Q'3 \<and> ?Q'3\<down><STCalWB SWB TWB>x \<Longrightarrow> R\<Down><STCalWB SWB TWB>x

goal (1 subgoal):
 1. R\<Down><STCalWB SWB TWB>x
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
R\<Down><STCalWB SWB TWB>x

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
Q\<Down><STCalWB SWB TWB>x

goal (1 subgoal):
 1. \<And>a b x P'. a \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> b \<and> b \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> a\<Down><STCalWB SWB TWB>x
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a b x P'. a \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> b \<and> b \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> a\<Down><STCalWB SWB TWB>x
[PROOF STEP]
fix P Q x Q'
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a b x P'. a \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> b \<and> b \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> a\<Down><STCalWB SWB TWB>x
[PROOF STEP]
assume "P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q" and "Q \<longmapsto>(Calculus (STCalWB SWB TWB))* Q'"
     and "Q'\<down><STCalWB SWB TWB>x"
[PROOF STATE]
proof (state)
this:
P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q
Q \<longmapsto>Calculus (STCalWB SWB TWB)* Q'
Q'\<down><STCalWB SWB TWB>x

goal (1 subgoal):
 1. \<And>a b x P'. a \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> b \<and> b \<longmapsto>Calculus (STCalWB SWB TWB)* P' \<and> P'\<down><STCalWB SWB TWB>x \<Longrightarrow> a\<Down><STCalWB SWB TWB>x
[PROOF STEP]
thus "P\<Down><STCalWB SWB TWB>x"
[PROOF STATE]
proof (prove)
using this:
P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q
Q \<longmapsto>Calculus (STCalWB SWB TWB)* Q'
Q'\<down><STCalWB SWB TWB>x

goal (1 subgoal):
 1. P\<Down><STCalWB SWB TWB>x
[PROOF STEP]
proof (induct arbitrary: Q')
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<And>S Q'. TargetTerm (\<lbrakk>S\<rbrakk>) \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> SourceTerm S\<Down><STCalWB SWB TWB>x
 2. \<And>S Q'. SourceTerm S \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> SourceTerm S\<Down><STCalWB SWB TWB>x
 3. \<And>T1 T2 Q'. (T1, T2) \<in> TRel \<and> TargetTerm T2 \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm T1\<Down><STCalWB SWB TWB>x
 4. \<And>P Q R Q'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>Q'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> P\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>Q'. R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> P\<Down><STCalWB SWB TWB>x
[PROOF STEP]
case (encR S)
[PROOF STATE]
proof (state)
this:
TargetTerm (\<lbrakk>S\<rbrakk>) \<longmapsto>Calculus (STCalWB SWB TWB)* Q'
Q'\<down><STCalWB SWB TWB>x

goal (4 subgoals):
 1. \<And>S Q'. TargetTerm (\<lbrakk>S\<rbrakk>) \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> SourceTerm S\<Down><STCalWB SWB TWB>x
 2. \<And>S Q'. SourceTerm S \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> SourceTerm S\<Down><STCalWB SWB TWB>x
 3. \<And>T1 T2 Q'. (T1, T2) \<in> TRel \<and> TargetTerm T2 \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm T1\<Down><STCalWB SWB TWB>x
 4. \<And>P Q R Q'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>Q'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> P\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>Q'. R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> P\<Down><STCalWB SWB TWB>x
[PROOF STEP]
assume "TargetTerm (\<lbrakk>S\<rbrakk>) \<longmapsto>(Calculus (STCalWB SWB TWB))* Q'"
       and "Q'\<down><STCalWB SWB TWB>x"
[PROOF STATE]
proof (state)
this:
TargetTerm (\<lbrakk>S\<rbrakk>) \<longmapsto>Calculus (STCalWB SWB TWB)* Q'
Q'\<down><STCalWB SWB TWB>x

goal (4 subgoals):
 1. \<And>S Q'. TargetTerm (\<lbrakk>S\<rbrakk>) \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> SourceTerm S\<Down><STCalWB SWB TWB>x
 2. \<And>S Q'. SourceTerm S \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> SourceTerm S\<Down><STCalWB SWB TWB>x
 3. \<And>T1 T2 Q'. (T1, T2) \<in> TRel \<and> TargetTerm T2 \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm T1\<Down><STCalWB SWB TWB>x
 4. \<And>P Q R Q'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>Q'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> P\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>Q'. R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> P\<Down><STCalWB SWB TWB>x
[PROOF STEP]
hence "\<lbrakk>S\<rbrakk>\<Down><TWB>x"
[PROOF STATE]
proof (prove)
using this:
TargetTerm (\<lbrakk>S\<rbrakk>) \<longmapsto>Calculus (STCalWB SWB TWB)* Q'
Q'\<down><STCalWB SWB TWB>x

goal (1 subgoal):
 1. \<lbrakk>S\<rbrakk>\<Down><TWB>x
[PROOF STEP]
using STCalWB_reachesBarbST
[PROOF STATE]
proof (prove)
using this:
TargetTerm (\<lbrakk>S\<rbrakk>) \<longmapsto>Calculus (STCalWB SWB TWB)* Q'
Q'\<down><STCalWB SWB TWB>x
?P\<Down><STCalWB SWB TWB>?a = ((\<exists>S. S \<in>S ?P \<and> S\<Down><SWB>?a) \<or> (\<exists>T. T \<in>T ?P \<and> T\<Down><TWB>?a))

goal (1 subgoal):
 1. \<lbrakk>S\<rbrakk>\<Down><TWB>x
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<lbrakk>S\<rbrakk>\<Down><TWB>x

goal (4 subgoals):
 1. \<And>S Q'. TargetTerm (\<lbrakk>S\<rbrakk>) \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> SourceTerm S\<Down><STCalWB SWB TWB>x
 2. \<And>S Q'. SourceTerm S \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> SourceTerm S\<Down><STCalWB SWB TWB>x
 3. \<And>T1 T2 Q'. (T1, T2) \<in> TRel \<and> TargetTerm T2 \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm T1\<Down><STCalWB SWB TWB>x
 4. \<And>P Q R Q'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>Q'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> P\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>Q'. R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> P\<Down><STCalWB SWB TWB>x
[PROOF STEP]
with encRS
[PROOF STATE]
proof (chain)
picking this:
(\<forall>S x. (\<exists>Sa. Sa \<in>S SourceTerm S \<and> Sa\<Down><SWB>x) \<or> (\<exists>T. T \<in>T SourceTerm S \<and> T\<Down><TWB>x) \<longrightarrow> (\<exists>Sa. Sa \<in>S TargetTerm (\<lbrakk>S\<rbrakk>) \<and> Sa\<Down><SWB>x) \<or> (\<exists>T. T \<in>T TargetTerm (\<lbrakk>S\<rbrakk>) \<and> T\<Down><TWB>x)) \<and> (\<forall>S x. (\<exists>Sa. Sa \<in>S TargetTerm (\<lbrakk>S\<rbrakk>) \<and> Sa\<Down><SWB>x) \<or> (\<exists>T. T \<in>T TargetTerm (\<lbrakk>S\<rbrakk>) \<and> T\<Down><TWB>x) \<longrightarrow> (\<exists>Sa. Sa \<in>S SourceTerm S \<and> Sa\<Down><SWB>x) \<or> (\<exists>T. T \<in>T SourceTerm S \<and> T\<Down><TWB>x))
\<lbrakk>S\<rbrakk>\<Down><TWB>x
[PROOF STEP]
have "S\<Down><SWB>x"
[PROOF STATE]
proof (prove)
using this:
(\<forall>S x. (\<exists>Sa. Sa \<in>S SourceTerm S \<and> Sa\<Down><SWB>x) \<or> (\<exists>T. T \<in>T SourceTerm S \<and> T\<Down><TWB>x) \<longrightarrow> (\<exists>Sa. Sa \<in>S TargetTerm (\<lbrakk>S\<rbrakk>) \<and> Sa\<Down><SWB>x) \<or> (\<exists>T. T \<in>T TargetTerm (\<lbrakk>S\<rbrakk>) \<and> T\<Down><TWB>x)) \<and> (\<forall>S x. (\<exists>Sa. Sa \<in>S TargetTerm (\<lbrakk>S\<rbrakk>) \<and> Sa\<Down><SWB>x) \<or> (\<exists>T. T \<in>T TargetTerm (\<lbrakk>S\<rbrakk>) \<and> T\<Down><TWB>x) \<longrightarrow> (\<exists>Sa. Sa \<in>S SourceTerm S \<and> Sa\<Down><SWB>x) \<or> (\<exists>T. T \<in>T SourceTerm S \<and> T\<Down><TWB>x))
\<lbrakk>S\<rbrakk>\<Down><TWB>x

goal (1 subgoal):
 1. S\<Down><SWB>x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
S\<Down><SWB>x

goal (4 subgoals):
 1. \<And>S Q'. TargetTerm (\<lbrakk>S\<rbrakk>) \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> SourceTerm S\<Down><STCalWB SWB TWB>x
 2. \<And>S Q'. SourceTerm S \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> SourceTerm S\<Down><STCalWB SWB TWB>x
 3. \<And>T1 T2 Q'. (T1, T2) \<in> TRel \<and> TargetTerm T2 \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm T1\<Down><STCalWB SWB TWB>x
 4. \<And>P Q R Q'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>Q'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> P\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>Q'. R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> P\<Down><STCalWB SWB TWB>x
[PROOF STEP]
thus "SourceTerm S\<Down><STCalWB SWB TWB>x"
[PROOF STATE]
proof (prove)
using this:
S\<Down><SWB>x

goal (1 subgoal):
 1. SourceTerm S\<Down><STCalWB SWB TWB>x
[PROOF STEP]
using STCalWB_reachesBarbST
[PROOF STATE]
proof (prove)
using this:
S\<Down><SWB>x
?P\<Down><STCalWB SWB TWB>?a = ((\<exists>S. S \<in>S ?P \<and> S\<Down><SWB>?a) \<or> (\<exists>T. T \<in>T ?P \<and> T\<Down><TWB>?a))

goal (1 subgoal):
 1. SourceTerm S\<Down><STCalWB SWB TWB>x
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
SourceTerm S\<Down><STCalWB SWB TWB>x

goal (3 subgoals):
 1. \<And>S Q'. SourceTerm S \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> SourceTerm S\<Down><STCalWB SWB TWB>x
 2. \<And>T1 T2 Q'. (T1, T2) \<in> TRel \<and> TargetTerm T2 \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm T1\<Down><STCalWB SWB TWB>x
 3. \<And>P Q R Q'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>Q'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> P\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>Q'. R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> P\<Down><STCalWB SWB TWB>x
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>S Q'. SourceTerm S \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> SourceTerm S\<Down><STCalWB SWB TWB>x
 2. \<And>T1 T2 Q'. (T1, T2) \<in> TRel \<and> TargetTerm T2 \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm T1\<Down><STCalWB SWB TWB>x
 3. \<And>P Q R Q'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>Q'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> P\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>Q'. R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> P\<Down><STCalWB SWB TWB>x
[PROOF STEP]
case (source S)
[PROOF STATE]
proof (state)
this:
SourceTerm S \<longmapsto>Calculus (STCalWB SWB TWB)* Q'
Q'\<down><STCalWB SWB TWB>x

goal (3 subgoals):
 1. \<And>S Q'. SourceTerm S \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> SourceTerm S\<Down><STCalWB SWB TWB>x
 2. \<And>T1 T2 Q'. (T1, T2) \<in> TRel \<and> TargetTerm T2 \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm T1\<Down><STCalWB SWB TWB>x
 3. \<And>P Q R Q'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>Q'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> P\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>Q'. R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> P\<Down><STCalWB SWB TWB>x
[PROOF STEP]
assume "SourceTerm S \<longmapsto>(Calculus (STCalWB SWB TWB))* Q'" and "Q'\<down><STCalWB SWB TWB>x"
[PROOF STATE]
proof (state)
this:
SourceTerm S \<longmapsto>Calculus (STCalWB SWB TWB)* Q'
Q'\<down><STCalWB SWB TWB>x

goal (3 subgoals):
 1. \<And>S Q'. SourceTerm S \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> SourceTerm S\<Down><STCalWB SWB TWB>x
 2. \<And>T1 T2 Q'. (T1, T2) \<in> TRel \<and> TargetTerm T2 \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm T1\<Down><STCalWB SWB TWB>x
 3. \<And>P Q R Q'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>Q'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> P\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>Q'. R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> P\<Down><STCalWB SWB TWB>x
[PROOF STEP]
thus "SourceTerm S\<Down><STCalWB SWB TWB>x"
[PROOF STATE]
proof (prove)
using this:
SourceTerm S \<longmapsto>Calculus (STCalWB SWB TWB)* Q'
Q'\<down><STCalWB SWB TWB>x

goal (1 subgoal):
 1. SourceTerm S\<Down><STCalWB SWB TWB>x
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
SourceTerm S\<Down><STCalWB SWB TWB>x

goal (2 subgoals):
 1. \<And>T1 T2 Q'. (T1, T2) \<in> TRel \<and> TargetTerm T2 \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm T1\<Down><STCalWB SWB TWB>x
 2. \<And>P Q R Q'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>Q'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> P\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>Q'. R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> P\<Down><STCalWB SWB TWB>x
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>T1 T2 Q'. (T1, T2) \<in> TRel \<and> TargetTerm T2 \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm T1\<Down><STCalWB SWB TWB>x
 2. \<And>P Q R Q'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>Q'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> P\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>Q'. R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> P\<Down><STCalWB SWB TWB>x
[PROOF STEP]
case (target T1 T2)
[PROOF STATE]
proof (state)
this:
(T1, T2) \<in> TRel
TargetTerm T2 \<longmapsto>Calculus (STCalWB SWB TWB)* Q'
Q'\<down><STCalWB SWB TWB>x

goal (2 subgoals):
 1. \<And>T1 T2 Q'. (T1, T2) \<in> TRel \<and> TargetTerm T2 \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm T1\<Down><STCalWB SWB TWB>x
 2. \<And>P Q R Q'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>Q'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> P\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>Q'. R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> P\<Down><STCalWB SWB TWB>x
[PROOF STEP]
assume "(T1, T2) \<in> TRel"
[PROOF STATE]
proof (state)
this:
(T1, T2) \<in> TRel

goal (2 subgoals):
 1. \<And>T1 T2 Q'. (T1, T2) \<in> TRel \<and> TargetTerm T2 \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm T1\<Down><STCalWB SWB TWB>x
 2. \<And>P Q R Q'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>Q'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> P\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>Q'. R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> P\<Down><STCalWB SWB TWB>x
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(T1, T2) \<in> TRel

goal (2 subgoals):
 1. \<And>T1 T2 Q'. (T1, T2) \<in> TRel \<and> TargetTerm T2 \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm T1\<Down><STCalWB SWB TWB>x
 2. \<And>P Q R Q'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>Q'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> P\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>Q'. R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> P\<Down><STCalWB SWB TWB>x
[PROOF STEP]
assume "TargetTerm T2 \<longmapsto>(Calculus (STCalWB SWB TWB))* Q'"
                and "Q'\<down><STCalWB SWB TWB>x"
[PROOF STATE]
proof (state)
this:
TargetTerm T2 \<longmapsto>Calculus (STCalWB SWB TWB)* Q'
Q'\<down><STCalWB SWB TWB>x

goal (2 subgoals):
 1. \<And>T1 T2 Q'. (T1, T2) \<in> TRel \<and> TargetTerm T2 \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm T1\<Down><STCalWB SWB TWB>x
 2. \<And>P Q R Q'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>Q'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> P\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>Q'. R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> P\<Down><STCalWB SWB TWB>x
[PROOF STEP]
hence "T2\<Down><TWB>x"
[PROOF STATE]
proof (prove)
using this:
TargetTerm T2 \<longmapsto>Calculus (STCalWB SWB TWB)* Q'
Q'\<down><STCalWB SWB TWB>x

goal (1 subgoal):
 1. T2\<Down><TWB>x
[PROOF STEP]
using STCalWB_reachesBarbST
[PROOF STATE]
proof (prove)
using this:
TargetTerm T2 \<longmapsto>Calculus (STCalWB SWB TWB)* Q'
Q'\<down><STCalWB SWB TWB>x
?P\<Down><STCalWB SWB TWB>?a = ((\<exists>S. S \<in>S ?P \<and> S\<Down><SWB>?a) \<or> (\<exists>T. T \<in>T ?P \<and> T\<Down><TWB>?a))

goal (1 subgoal):
 1. T2\<Down><TWB>x
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
T2\<Down><TWB>x

goal (2 subgoals):
 1. \<And>T1 T2 Q'. (T1, T2) \<in> TRel \<and> TargetTerm T2 \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm T1\<Down><STCalWB SWB TWB>x
 2. \<And>P Q R Q'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>Q'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> P\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>Q'. R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> P\<Down><STCalWB SWB TWB>x
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(T1, T2) \<in> TRel
T2\<Down><TWB>x
[PROOF STEP]
have "T1\<Down><TWB>x"
[PROOF STATE]
proof (prove)
using this:
(T1, T2) \<in> TRel
T2\<Down><TWB>x

goal (1 subgoal):
 1. T1\<Down><TWB>x
[PROOF STEP]
using trelRS
[PROOF STATE]
proof (prove)
using this:
(T1, T2) \<in> TRel
T2\<Down><TWB>x
rel_weakly_reflects_barbs TRel TWB

goal (1 subgoal):
 1. T1\<Down><TWB>x
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
T1\<Down><TWB>x

goal (2 subgoals):
 1. \<And>T1 T2 Q'. (T1, T2) \<in> TRel \<and> TargetTerm T2 \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> TargetTerm T1\<Down><STCalWB SWB TWB>x
 2. \<And>P Q R Q'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>Q'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> P\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>Q'. R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> P\<Down><STCalWB SWB TWB>x
[PROOF STEP]
thus "TargetTerm T1\<Down><STCalWB SWB TWB>x"
[PROOF STATE]
proof (prove)
using this:
T1\<Down><TWB>x

goal (1 subgoal):
 1. TargetTerm T1\<Down><STCalWB SWB TWB>x
[PROOF STEP]
using STCalWB_reachesBarbST
[PROOF STATE]
proof (prove)
using this:
T1\<Down><TWB>x
?P\<Down><STCalWB SWB TWB>?a = ((\<exists>S. S \<in>S ?P \<and> S\<Down><SWB>?a) \<or> (\<exists>T. T \<in>T ?P \<and> T\<Down><TWB>?a))

goal (1 subgoal):
 1. TargetTerm T1\<Down><STCalWB SWB TWB>x
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
TargetTerm T1\<Down><STCalWB SWB TWB>x

goal (1 subgoal):
 1. \<And>P Q R Q'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>Q'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> P\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>Q'. R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> P\<Down><STCalWB SWB TWB>x
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>P Q R Q'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>Q'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> P\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>Q'. R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> P\<Down><STCalWB SWB TWB>x
[PROOF STEP]
case (trans P Q R R')
[PROOF STATE]
proof (state)
this:
P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q
Q \<longmapsto>Calculus (STCalWB SWB TWB)* ?Q'3 \<and> ?Q'3\<down><STCalWB SWB TWB>x \<Longrightarrow> P\<Down><STCalWB SWB TWB>x
Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R
R \<longmapsto>Calculus (STCalWB SWB TWB)* ?Q'3 \<and> ?Q'3\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x
R \<longmapsto>Calculus (STCalWB SWB TWB)* R'
R'\<down><STCalWB SWB TWB>x

goal (1 subgoal):
 1. \<And>P Q R Q'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>Q'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> P\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>Q'. R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> P\<Down><STCalWB SWB TWB>x
[PROOF STEP]
assume "R \<longmapsto>(Calculus (STCalWB SWB TWB))* R'" and "R'\<down><STCalWB SWB TWB>x"
       and "\<And>R'. R \<longmapsto>(Calculus (STCalWB SWB TWB))* R' \<Longrightarrow> R'\<down><STCalWB SWB TWB>x
            \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x"
[PROOF STATE]
proof (state)
this:
R \<longmapsto>Calculus (STCalWB SWB TWB)* R'
R'\<down><STCalWB SWB TWB>x
R \<longmapsto>Calculus (STCalWB SWB TWB)* ?R'3 \<and> ?R'3\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x

goal (1 subgoal):
 1. \<And>P Q R Q'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>Q'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> P\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>Q'. R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> P\<Down><STCalWB SWB TWB>x
[PROOF STEP]
hence "Q\<Down><STCalWB SWB TWB>x"
[PROOF STATE]
proof (prove)
using this:
R \<longmapsto>Calculus (STCalWB SWB TWB)* R'
R'\<down><STCalWB SWB TWB>x
R \<longmapsto>Calculus (STCalWB SWB TWB)* ?R'3 \<and> ?R'3\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x

goal (1 subgoal):
 1. Q\<Down><STCalWB SWB TWB>x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Q\<Down><STCalWB SWB TWB>x

goal (1 subgoal):
 1. \<And>P Q R Q'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>Q'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> P\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>Q'. R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> P\<Down><STCalWB SWB TWB>x
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
Q\<Down><STCalWB SWB TWB>x

goal (1 subgoal):
 1. \<And>P Q R Q'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>Q'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> P\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>Q'. R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> P\<Down><STCalWB SWB TWB>x
[PROOF STEP]
assume "\<And>Q'. Q \<longmapsto>(Calculus (STCalWB SWB TWB))* Q' \<Longrightarrow> Q'\<down><STCalWB SWB TWB>x
                     \<Longrightarrow> P\<Down><STCalWB SWB TWB>x"
[PROOF STATE]
proof (state)
this:
Q \<longmapsto>Calculus (STCalWB SWB TWB)* ?Q'3 \<and> ?Q'3\<down><STCalWB SWB TWB>x \<Longrightarrow> P\<Down><STCalWB SWB TWB>x

goal (1 subgoal):
 1. \<And>P Q R Q'. \<lbrakk>P \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> Q; \<And>Q'. Q \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> P\<Down><STCalWB SWB TWB>x; Q \<lesssim>\<lbrakk>\<cdot>\<rbrakk>RT<TRel> R; \<And>Q'. R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x \<Longrightarrow> Q\<Down><STCalWB SWB TWB>x; R \<longmapsto>Calculus (STCalWB SWB TWB)* Q' \<and> Q'\<down><STCalWB SWB TWB>x\<rbrakk> \<Longrightarrow> P\<Down><STCalWB SWB TWB>x
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
Q\<Down><STCalWB SWB TWB>x
Q \<longmapsto>Calculus (STCalWB SWB TWB)* ?Q'3 \<and> ?Q'3\<down><STCalWB SWB TWB>x \<Longrightarrow> P\<Down><STCalWB SWB TWB>x
[PROOF STEP]
show "P\<Down><STCalWB SWB TWB>x"
[PROOF STATE]
proof (prove)
using this:
Q\<Down><STCalWB SWB TWB>x
Q \<longmapsto>Calculus (STCalWB SWB TWB)* ?Q'3 \<and> ?Q'3\<down><STCalWB SWB TWB>x \<Longrightarrow> P\<Down><STCalWB SWB TWB>x

goal (1 subgoal):
 1. P\<Down><STCalWB SWB TWB>x
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
P\<Down><STCalWB SWB TWB>x

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
P\<Down><STCalWB SWB TWB>x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem bisimJ2JVM_weak_bisim:
  assumes wf: "wf_J_prog P"
  shows "delay_bisimulation_diverge_final (mredT P) (execd_mthr.redT (J2JVM P)) bisimJ2JVM tlsimJ2JVM
            (red_mthr.m\<tau>move P) (execd_mthr.m\<tau>move (J2JVM P)) red_mthr.mfinal exec_mthr.mfinal"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. delay_bisimulation_diverge_final (mredT P) (mexecdT (J2JVM P)) bisimJ2JVM tlsimJ2JVM (red_red0.m\<tau>move1 P) (execd_mthr.m\<tau>move (J2JVM P)) red_mthr.mfinal exec_mthr.mfinal
[PROOF STEP]
unfolding bisimJ2JVM_def tlsimJ2JVM_def J2JVM_def o_apply
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. delay_bisimulation_diverge_final (mredT P) (mexecdT (compP2 (compP1 P))) (red_red0.mbisim \<circ>\<^sub>B red0_Red1'.mbisim \<circ>\<^sub>B mbisim_Red1'_Red1 \<circ>\<^sub>B Red1_execd.mbisim) (red_red0.mta_bisim \<circ>\<^sub>B red0_Red1'.mta_bisim \<circ>\<^sub>B (=) \<circ>\<^sub>B Red1_execd.mta_bisim) (red_red0.m\<tau>move1 P) Red1_execd.m\<tau>move2 red_mthr.mfinal exec_mthr.mfinal
[PROOF STEP]
apply(rule delay_bisimulation_diverge_final_compose)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. delay_bisimulation_diverge_final (mredT P) ?trsys2.0 red_red0.mbisim red_red0.mta_bisim (red_red0.m\<tau>move1 P) ?\<tau>move2.0 red_mthr.mfinal ?final2.0
 2. delay_bisimulation_diverge_final ?trsys2.0 (mexecdT (compP2 (compP1 P))) (red0_Red1'.mbisim \<circ>\<^sub>B mbisim_Red1'_Red1 \<circ>\<^sub>B Red1_execd.mbisim) (red0_Red1'.mta_bisim \<circ>\<^sub>B (=) \<circ>\<^sub>B Red1_execd.mta_bisim) ?\<tau>move2.0 Red1_execd.m\<tau>move2 ?final2.0 exec_mthr.mfinal
[PROOF STEP]
apply(rule FWdelay_bisimulation_diverge.mthr_delay_bisimulation_diverge_final)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. FWdelay_bisimulation_diverge final_expr (\<lambda>t ((e, l), h) ta ((e', l'), h'). extTA2J P,P,t \<turnstile> \<langle>e,(h, l)\<rangle> -ta\<rightarrow> \<langle>e',(h', l')\<rangle>) ?final2.3 ?r2.3 (\<lambda>t. bisim_red_red0) (\<lambda>exs (e0, es0). \<not> final e0) (\<lambda>((e, x), h) ta s'. \<tau>move0 P h e \<and> ta = \<lbrace>\<rbrace>) ?\<tau>move2.3
 2. delay_bisimulation_diverge_final (multithreaded_base.redT ?final2.3 ?r2.3 convert_RA) (mexecdT (compP2 (compP1 P))) (red0_Red1'.mbisim \<circ>\<^sub>B mbisim_Red1'_Red1 \<circ>\<^sub>B Red1_execd.mbisim) (red0_Red1'.mta_bisim \<circ>\<^sub>B (=) \<circ>\<^sub>B Red1_execd.mta_bisim) (\<tau>multithreaded.m\<tau>move ?\<tau>move2.3) Red1_execd.m\<tau>move2 (final_thread.mfinal ?final2.3) exec_mthr.mfinal
[PROOF STEP]
apply(rule red_red0_FWbisim[OF wf_prog_wwf_prog[OF wf]])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. delay_bisimulation_diverge_final (red0_mthr.redT P) (mexecdT (compP2 (compP1 P))) (red0_Red1'.mbisim \<circ>\<^sub>B mbisim_Red1'_Red1 \<circ>\<^sub>B Red1_execd.mbisim) (red0_Red1'.mta_bisim \<circ>\<^sub>B (=) \<circ>\<^sub>B Red1_execd.mta_bisim) (red0_Red1'.m\<tau>move1 P) Red1_execd.m\<tau>move2 red0_mthr.mfinal exec_mthr.mfinal
[PROOF STEP]
apply(rule delay_bisimulation_diverge_final_compose)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. delay_bisimulation_diverge_final (red0_mthr.redT P) ?trsys2.7 red0_Red1'.mbisim red0_Red1'.mta_bisim (red0_Red1'.m\<tau>move1 P) ?\<tau>move2.7 red0_mthr.mfinal ?final2.7
 2. delay_bisimulation_diverge_final ?trsys2.7 (mexecdT (compP2 (compP1 P))) (mbisim_Red1'_Red1 \<circ>\<^sub>B Red1_execd.mbisim) ((=) \<circ>\<^sub>B Red1_execd.mta_bisim) ?\<tau>move2.7 Red1_execd.m\<tau>move2 ?final2.7 exec_mthr.mfinal
[PROOF STEP]
apply(rule FWdelay_bisimulation_diverge.mthr_delay_bisimulation_diverge_final)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. FWdelay_bisimulation_diverge final_expr0 (mred0 P) ?final2.10 ?r2.10 (\<lambda>t. bisim_red0_Red1) bisim_wait01 (\<lambda>(es, h) ta s. \<tau>Move0 P h es \<and> ta = \<lbrace>\<rbrace>) ?\<tau>move2.10
 2. delay_bisimulation_diverge_final (multithreaded_base.redT ?final2.10 ?r2.10 convert_RA) (mexecdT (compP2 (compP1 P))) (mbisim_Red1'_Red1 \<circ>\<^sub>B Red1_execd.mbisim) ((=) \<circ>\<^sub>B Red1_execd.mta_bisim) (\<tau>multithreaded.m\<tau>move ?\<tau>move2.10) Red1_execd.m\<tau>move2 (final_thread.mfinal ?final2.10) exec_mthr.mfinal
[PROOF STEP]
apply(rule red0_Red1'_FWweak_bisim[OF wf])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. delay_bisimulation_diverge_final (Red1_mthr.redT False (compP1 P)) (mexecdT (compP2 (compP1 P))) (mbisim_Red1'_Red1 \<circ>\<^sub>B Red1_execd.mbisim) ((=) \<circ>\<^sub>B Red1_execd.mta_bisim) (red0_Red1'.m\<tau>move2 P) Red1_execd.m\<tau>move2 Red1_mthr.mfinal exec_mthr.mfinal
[PROOF STEP]
apply(rule delay_bisimulation_diverge_final_compose)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. delay_bisimulation_diverge_final (Red1_mthr.redT False (compP1 P)) ?trsys2.13 mbisim_Red1'_Red1 (=) (red0_Red1'.m\<tau>move2 P) ?\<tau>move2.13 Red1_mthr.mfinal ?final2.13
 2. delay_bisimulation_diverge_final ?trsys2.13 (mexecdT (compP2 (compP1 P))) Red1_execd.mbisim Red1_execd.mta_bisim ?\<tau>move2.13 Red1_execd.m\<tau>move2 ?final2.13 exec_mthr.mfinal
[PROOF STEP]
apply(rule delay_bisimulation_diverge_final.intro)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. delay_bisimulation_diverge (Red1_mthr.redT False (compP1 P)) ?trsys2.13 mbisim_Red1'_Red1 (=) (red0_Red1'.m\<tau>move2 P) ?\<tau>move2.13
 2. delay_bisimulation_final_base (Red1_mthr.redT False (compP1 P)) ?trsys2.13 mbisim_Red1'_Red1 (red0_Red1'.m\<tau>move2 P) ?\<tau>move2.13 Red1_mthr.mfinal ?final2.13
 3. delay_bisimulation_diverge_final ?trsys2.13 (mexecdT (compP2 (compP1 P))) Red1_execd.mbisim Red1_execd.mta_bisim ?\<tau>move2.13 Red1_execd.m\<tau>move2 ?final2.13 exec_mthr.mfinal
[PROOF STEP]
apply(rule bisimulation_into_delay.delay_bisimulation)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. bisimulation_into_delay (Red1_mthr.redT False (compP1 P)) ?trsys2.13 mbisim_Red1'_Red1 (=) (red0_Red1'.m\<tau>move2 P) ?\<tau>move2.13
 2. delay_bisimulation_final_base (Red1_mthr.redT False (compP1 P)) ?trsys2.13 mbisim_Red1'_Red1 (red0_Red1'.m\<tau>move2 P) ?\<tau>move2.13 Red1_mthr.mfinal ?final2.13
 3. delay_bisimulation_diverge_final ?trsys2.13 (mexecdT (compP2 (compP1 P))) Red1_execd.mbisim Red1_execd.mta_bisim ?\<tau>move2.13 Red1_execd.m\<tau>move2 ?final2.13 exec_mthr.mfinal
[PROOF STEP]
apply(rule Red1'_Red1_bisim_into_weak[OF compP1_pres_wf[OF wf]])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. delay_bisimulation_final_base (Red1_mthr.redT False (compP1 P)) (Red1_mthr.redT True (compP1 P)) mbisim_Red1'_Red1 (red0_Red1'.m\<tau>move2 P) (red0_Red1'.m\<tau>move2 P) Red1_mthr.mfinal ?final2.13
 2. delay_bisimulation_diverge_final (Red1_mthr.redT True (compP1 P)) (mexecdT (compP2 (compP1 P))) Red1_execd.mbisim Red1_execd.mta_bisim (red0_Red1'.m\<tau>move2 P) Red1_execd.m\<tau>move2 ?final2.13 exec_mthr.mfinal
[PROOF STEP]
apply(rule bisimulation_final.delay_bisimulation_final_base)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. bisimulation_final (Red1_mthr.redT False (compP1 P)) (Red1_mthr.redT True (compP1 P)) mbisim_Red1'_Red1 ?tlsim23 Red1_mthr.mfinal ?final2.13
 2. delay_bisimulation_diverge_final (Red1_mthr.redT True (compP1 P)) (mexecdT (compP2 (compP1 P))) Red1_execd.mbisim Red1_execd.mta_bisim (red0_Red1'.m\<tau>move2 P) Red1_execd.m\<tau>move2 ?final2.13 exec_mthr.mfinal
[PROOF STEP]
apply(rule Red1'_Red1_bisimulation_final[OF compP1_pres_wf[OF wf]])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. delay_bisimulation_diverge_final (Red1_mthr.redT True (compP1 P)) (mexecdT (compP2 (compP1 P))) Red1_execd.mbisim Red1_execd.mta_bisim (red0_Red1'.m\<tau>move2 P) Red1_execd.m\<tau>move2 Red1_mthr.mfinal exec_mthr.mfinal
[PROOF STEP]
apply(rule FWdelay_bisimulation_diverge.mthr_delay_bisimulation_diverge_final)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. FWdelay_bisimulation_diverge final_expr1 (mred1 (compP1 P)) JVM_final (mexecd (compP2 (compP1 P))) wbisim1 (bisim_wait1JVM (compP2 (compP1 P))) (\<lambda>(exexs, h) ta s. \<tau>Move1 (compP1 P) h exexs \<and> ta = \<lbrace>\<rbrace>) (\<lambda>((xcp, frs), h) ta s. \<tau>Move2 (compP2 (compP1 P)) (xcp, h, frs) \<and> ta = \<lbrace>\<rbrace>)
[PROOF STEP]
apply(rule Red1_exec1_FWwbisim[OF compP1_pres_wf[OF wf]])
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done