[STATEMENT]
lemma split_all_acquired_in:
"a \<in> all_acquired xs \<Longrightarrow>
(\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W# zs \<and> a \<in> A) \<or>
 (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W# zs \<and> a \<in> A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<in> all_acquired xs \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
proof (induct xs)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. a \<in> all_acquired [] \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. [] = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. [] = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<And>aa xs. \<lbrakk>a \<in> all_acquired xs \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A); a \<in> all_acquired (aa # xs)\<rbrakk> \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. aa # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. aa # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
case Nil
[PROOF STATE]
proof (state)
this:
a \<in> all_acquired []

goal (2 subgoals):
 1. a \<in> all_acquired [] \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. [] = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. [] = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<And>aa xs. \<lbrakk>a \<in> all_acquired xs \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A); a \<in> all_acquired (aa # xs)\<rbrakk> \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. aa # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. aa # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
a \<in> all_acquired []

goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. [] = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. [] = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<exists>sop a' v ys zs A L R W. [] = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. [] = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal (1 subgoal):
 1. \<And>aa xs. \<lbrakk>a \<in> all_acquired xs \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A); a \<in> all_acquired (aa # xs)\<rbrakk> \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. aa # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. aa # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>aa xs. \<lbrakk>a \<in> all_acquired xs \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A); a \<in> all_acquired (aa # xs)\<rbrakk> \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. aa # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. aa # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
case (Cons x xs)
[PROOF STATE]
proof (state)
this:
a \<in> all_acquired xs \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
a \<in> all_acquired (x # xs)

goal (1 subgoal):
 1. \<And>aa xs. \<lbrakk>a \<in> all_acquired xs \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A); a \<in> all_acquired (aa # xs)\<rbrakk> \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. aa # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. aa # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
have a_in: "a \<in> all_acquired (x # xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<in> all_acquired (x # xs)
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
a \<in> all_acquired (x # xs)

goal (1 subgoal):
 1. \<And>aa xs. \<lbrakk>a \<in> all_acquired xs \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A); a \<in> all_acquired (aa # xs)\<rbrakk> \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. aa # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. aa # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
proof (cases x)
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<And>x11 x12 x13 x14 x15 x16 x17 x18. x = Write\<^sub>s\<^sub>b x11 x12 x13 x14 x15 x16 x17 x18 \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<And>x21 x22 x23 x24. x = Read\<^sub>s\<^sub>b x21 x22 x23 x24 \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 3. \<And>x31 x32 x33. x = Prog\<^sub>s\<^sub>b x31 x32 x33 \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 4. \<And>x41 x42 x43 x44. x = Ghost\<^sub>s\<^sub>b x41 x42 x43 x44 \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
case (Write\<^sub>s\<^sub>b volatile a' sop v A L R W)
[PROOF STATE]
proof (state)
this:
x = Write\<^sub>s\<^sub>b volatile a' sop v A L R W

goal (4 subgoals):
 1. \<And>x11 x12 x13 x14 x15 x16 x17 x18. x = Write\<^sub>s\<^sub>b x11 x12 x13 x14 x15 x16 x17 x18 \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<And>x21 x22 x23 x24. x = Read\<^sub>s\<^sub>b x21 x22 x23 x24 \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 3. \<And>x31 x32 x33. x = Prog\<^sub>s\<^sub>b x31 x32 x33 \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 4. \<And>x41 x42 x43 x44. x = Ghost\<^sub>s\<^sub>b x41 x42 x43 x44 \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
proof (cases volatile)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. volatile \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<not> volatile \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> volatile

goal (2 subgoals):
 1. volatile \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<not> volatile \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
from a_in
[PROOF STATE]
proof (chain)
picking this:
a \<in> all_acquired (x # xs)
[PROOF STEP]
have "a \<in> all_acquired xs"
[PROOF STATE]
proof (prove)
using this:
a \<in> all_acquired (x # xs)

goal (1 subgoal):
 1. a \<in> all_acquired xs
[PROOF STEP]
by (auto simp add: False Write\<^sub>s\<^sub>b)
[PROOF STATE]
proof (state)
this:
a \<in> all_acquired xs

goal (2 subgoals):
 1. volatile \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<not> volatile \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
from Cons.hyps [OF this]
[PROOF STATE]
proof (chain)
picking this:
(\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
have "(\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W# zs \<and> a \<in> A) \<or>
            (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)" (is "?write \<or> ?ghst")
[PROOF STATE]
proof (prove)
using this:
(\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal (2 subgoals):
 1. volatile \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<not> volatile \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
assume ?write
[PROOF STATE]
proof (state)
this:
\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A

goal (2 subgoals):
 1. \<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A
[PROOF STEP]
obtain sop'' a'' v'' A'' L'' R'' W'' ys zs
	  where "xs=ys@Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W''#zs" and a_in: "a \<in> A''"
[PROOF STATE]
proof (prove)
using this:
\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A

goal (1 subgoal):
 1. (\<And>ys a'' sop'' v'' A'' L'' R'' W'' zs. \<lbrakk>xs = ys @ Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W'' # zs; a \<in> A''\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
xs = ys @ Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W'' # zs
a \<in> A''

goal (2 subgoals):
 1. \<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
hence "x#xs = (x#ys)@Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W''#zs"
[PROOF STATE]
proof (prove)
using this:
xs = ys @ Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W'' # zs
a \<in> A''

goal (1 subgoal):
 1. x # xs = (x # ys) @ Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W'' # zs
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x # xs = (x # ys) @ Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W'' # zs

goal (2 subgoals):
 1. \<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
x # xs = (x # ys) @ Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W'' # zs

goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
using a_in
[PROOF STATE]
proof (prove)
using this:
x # xs = (x # ys) @ Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W'' # zs
a \<in> A''

goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal (1 subgoal):
 1. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
assume ?ghst
[PROOF STATE]
proof (state)
this:
\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A

goal (1 subgoal):
 1. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A
[PROOF STEP]
obtain A'' L'' R'' W'' ys zs where
	  "xs=ys@Ghost\<^sub>s\<^sub>b A'' L'' R'' W''#zs" and a_in: "a \<in> A''"
[PROOF STATE]
proof (prove)
using this:
\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A

goal (1 subgoal):
 1. (\<And>ys A'' L'' R'' W'' zs. \<lbrakk>xs = ys @ Ghost\<^sub>s\<^sub>b A'' L'' R'' W'' # zs; a \<in> A''\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
xs = ys @ Ghost\<^sub>s\<^sub>b A'' L'' R'' W'' # zs
a \<in> A''

goal (1 subgoal):
 1. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
hence "x#xs = (x#ys)@Ghost\<^sub>s\<^sub>b A'' L'' R'' W''#zs"
[PROOF STATE]
proof (prove)
using this:
xs = ys @ Ghost\<^sub>s\<^sub>b A'' L'' R'' W'' # zs
a \<in> A''

goal (1 subgoal):
 1. x # xs = (x # ys) @ Ghost\<^sub>s\<^sub>b A'' L'' R'' W'' # zs
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x # xs = (x # ys) @ Ghost\<^sub>s\<^sub>b A'' L'' R'' W'' # zs

goal (1 subgoal):
 1. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
x # xs = (x # ys) @ Ghost\<^sub>s\<^sub>b A'' L'' R'' W'' # zs

goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
using a_in
[PROOF STATE]
proof (prove)
using this:
x # xs = (x # ys) @ Ghost\<^sub>s\<^sub>b A'' L'' R'' W'' # zs
a \<in> A''

goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal (1 subgoal):
 1. volatile \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. volatile \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
volatile

goal (1 subgoal):
 1. volatile \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
note volatile = this
[PROOF STATE]
proof (state)
this:
volatile

goal (1 subgoal):
 1. volatile \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
proof (cases "a \<in> A")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. a \<notin> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
a \<notin> A

goal (2 subgoals):
 1. a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. a \<notin> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
with a_in
[PROOF STATE]
proof (chain)
picking this:
a \<in> all_acquired (x # xs)
a \<notin> A
[PROOF STEP]
have "a \<in> all_acquired xs"
[PROOF STATE]
proof (prove)
using this:
a \<in> all_acquired (x # xs)
a \<notin> A

goal (1 subgoal):
 1. a \<in> all_acquired xs
[PROOF STEP]
by (auto simp add: volatile Write\<^sub>s\<^sub>b)
[PROOF STATE]
proof (state)
this:
a \<in> all_acquired xs

goal (2 subgoals):
 1. a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. a \<notin> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
from Cons.hyps [OF this]
[PROOF STATE]
proof (chain)
picking this:
(\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
have "(\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or>
              (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W# zs \<and> a \<in> A)" (is "?write \<or> ?ghst")
[PROOF STATE]
proof (prove)
using this:
(\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal (2 subgoals):
 1. a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. a \<notin> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
assume ?write
[PROOF STATE]
proof (state)
this:
\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A

goal (2 subgoals):
 1. \<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A
[PROOF STEP]
obtain sop'' a'' v'' A'' L'' R'' W'' ys zs
	    where "xs=ys@Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W'' #zs" and a_in: "a \<in> A''"
[PROOF STATE]
proof (prove)
using this:
\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A

goal (1 subgoal):
 1. (\<And>ys a'' sop'' v'' A'' L'' R'' W'' zs. \<lbrakk>xs = ys @ Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W'' # zs; a \<in> A''\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
xs = ys @ Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W'' # zs
a \<in> A''

goal (2 subgoals):
 1. \<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
hence "x#xs = (x#ys)@Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W''#zs"
[PROOF STATE]
proof (prove)
using this:
xs = ys @ Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W'' # zs
a \<in> A''

goal (1 subgoal):
 1. x # xs = (x # ys) @ Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W'' # zs
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x # xs = (x # ys) @ Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W'' # zs

goal (2 subgoals):
 1. \<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
x # xs = (x # ys) @ Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W'' # zs

goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
using a_in
[PROOF STATE]
proof (prove)
using this:
x # xs = (x # ys) @ Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W'' # zs
a \<in> A''

goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal (1 subgoal):
 1. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
assume ?ghst
[PROOF STATE]
proof (state)
this:
\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A

goal (1 subgoal):
 1. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A
[PROOF STEP]
obtain A'' L'' R'' W'' ys zs where
	    "xs=ys @Ghost\<^sub>s\<^sub>b A'' L'' R'' W''#zs" and a_in: "a \<in> A''"
[PROOF STATE]
proof (prove)
using this:
\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A

goal (1 subgoal):
 1. (\<And>ys A'' L'' R'' W'' zs. \<lbrakk>xs = ys @ Ghost\<^sub>s\<^sub>b A'' L'' R'' W'' # zs; a \<in> A''\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
xs = ys @ Ghost\<^sub>s\<^sub>b A'' L'' R'' W'' # zs
a \<in> A''

goal (1 subgoal):
 1. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
hence "x#xs  = (x#ys)@Ghost\<^sub>s\<^sub>b A'' L'' R'' W''#zs"
[PROOF STATE]
proof (prove)
using this:
xs = ys @ Ghost\<^sub>s\<^sub>b A'' L'' R'' W'' # zs
a \<in> A''

goal (1 subgoal):
 1. x # xs = (x # ys) @ Ghost\<^sub>s\<^sub>b A'' L'' R'' W'' # zs
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x # xs = (x # ys) @ Ghost\<^sub>s\<^sub>b A'' L'' R'' W'' # zs

goal (1 subgoal):
 1. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
x # xs = (x # ys) @ Ghost\<^sub>s\<^sub>b A'' L'' R'' W'' # zs

goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
using a_in
[PROOF STATE]
proof (prove)
using this:
x # xs = (x # ys) @ Ghost\<^sub>s\<^sub>b A'' L'' R'' W'' # zs
a \<in> A''

goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal (1 subgoal):
 1. a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
a \<in> A

goal (1 subgoal):
 1. a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a \<in> A
[PROOF STEP]
have "x#xs=[]@(Write\<^sub>s\<^sub>b True a' sop v A L R W#xs)"
[PROOF STATE]
proof (prove)
using this:
a \<in> A

goal (1 subgoal):
 1. x # xs = [] @ Write\<^sub>s\<^sub>b True a' sop v A L R W # xs
[PROOF STEP]
by (simp add: Write\<^sub>s\<^sub>b volatile True)
[PROOF STATE]
proof (state)
this:
x # xs = [] @ Write\<^sub>s\<^sub>b True a' sop v A L R W # xs

goal (1 subgoal):
 1. a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
x # xs = [] @ Write\<^sub>s\<^sub>b True a' sop v A L R W # xs

goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
using True
[PROOF STATE]
proof (prove)
using this:
x # xs = [] @ Write\<^sub>s\<^sub>b True a' sop v A L R W # xs
a \<in> A

goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal (3 subgoals):
 1. \<And>x21 x22 x23 x24. x = Read\<^sub>s\<^sub>b x21 x22 x23 x24 \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<And>x31 x32 x33. x = Prog\<^sub>s\<^sub>b x31 x32 x33 \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 3. \<And>x41 x42 x43 x44. x = Ghost\<^sub>s\<^sub>b x41 x42 x43 x44 \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>x21 x22 x23 x24. x = Read\<^sub>s\<^sub>b x21 x22 x23 x24 \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<And>x31 x32 x33. x = Prog\<^sub>s\<^sub>b x31 x32 x33 \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 3. \<And>x41 x42 x43 x44. x = Ghost\<^sub>s\<^sub>b x41 x42 x43 x44 \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
case Read\<^sub>s\<^sub>b
[PROOF STATE]
proof (state)
this:
x = Read\<^sub>s\<^sub>b x21_ x22_ x23_ x24_

goal (3 subgoals):
 1. \<And>x21 x22 x23 x24. x = Read\<^sub>s\<^sub>b x21 x22 x23 x24 \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<And>x31 x32 x33. x = Prog\<^sub>s\<^sub>b x31 x32 x33 \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 3. \<And>x41 x42 x43 x44. x = Ghost\<^sub>s\<^sub>b x41 x42 x43 x44 \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
from a_in
[PROOF STATE]
proof (chain)
picking this:
a \<in> all_acquired (x # xs)
[PROOF STEP]
have "a \<in> all_acquired xs"
[PROOF STATE]
proof (prove)
using this:
a \<in> all_acquired (x # xs)

goal (1 subgoal):
 1. a \<in> all_acquired xs
[PROOF STEP]
by (auto simp add: Read\<^sub>s\<^sub>b)
[PROOF STATE]
proof (state)
this:
a \<in> all_acquired xs

goal (3 subgoals):
 1. \<And>x21 x22 x23 x24. x = Read\<^sub>s\<^sub>b x21 x22 x23 x24 \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<And>x31 x32 x33. x = Prog\<^sub>s\<^sub>b x31 x32 x33 \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 3. \<And>x41 x42 x43 x44. x = Ghost\<^sub>s\<^sub>b x41 x42 x43 x44 \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
from Cons.hyps [OF this]
[PROOF STATE]
proof (chain)
picking this:
(\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
have "(\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W# zs \<and> a \<in> A) \<or>
            (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W# zs \<and> a \<in> A)" (is "?write \<or> ?ghst")
[PROOF STATE]
proof (prove)
using this:
(\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal (3 subgoals):
 1. \<And>x21 x22 x23 x24. x = Read\<^sub>s\<^sub>b x21 x22 x23 x24 \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<And>x31 x32 x33. x = Prog\<^sub>s\<^sub>b x31 x32 x33 \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 3. \<And>x41 x42 x43 x44. x = Ghost\<^sub>s\<^sub>b x41 x42 x43 x44 \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
assume ?write
[PROOF STATE]
proof (state)
this:
\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A

goal (2 subgoals):
 1. \<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A
[PROOF STEP]
obtain sop'' a'' v'' A'' L'' R'' W'' ys zs
	where "xs=ys@Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W''#zs" and a_in: "a \<in> A''"
[PROOF STATE]
proof (prove)
using this:
\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A

goal (1 subgoal):
 1. (\<And>ys a'' sop'' v'' A'' L'' R'' W'' zs. \<lbrakk>xs = ys @ Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W'' # zs; a \<in> A''\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
xs = ys @ Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W'' # zs
a \<in> A''

goal (2 subgoals):
 1. \<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
hence "x#xs = (x#ys)@Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W''#zs"
[PROOF STATE]
proof (prove)
using this:
xs = ys @ Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W'' # zs
a \<in> A''

goal (1 subgoal):
 1. x # xs = (x # ys) @ Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W'' # zs
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x # xs = (x # ys) @ Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W'' # zs

goal (2 subgoals):
 1. \<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
x # xs = (x # ys) @ Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W'' # zs

goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
using a_in
[PROOF STATE]
proof (prove)
using this:
x # xs = (x # ys) @ Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W'' # zs
a \<in> A''

goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal (1 subgoal):
 1. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
assume ?ghst
[PROOF STATE]
proof (state)
this:
\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A

goal (1 subgoal):
 1. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A
[PROOF STEP]
obtain A'' L'' R'' W'' ys zs where
	"xs=ys@Ghost\<^sub>s\<^sub>b A'' L'' R'' W''#zs" and a_in: "a \<in> A''"
[PROOF STATE]
proof (prove)
using this:
\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A

goal (1 subgoal):
 1. (\<And>ys A'' L'' R'' W'' zs. \<lbrakk>xs = ys @ Ghost\<^sub>s\<^sub>b A'' L'' R'' W'' # zs; a \<in> A''\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
xs = ys @ Ghost\<^sub>s\<^sub>b A'' L'' R'' W'' # zs
a \<in> A''

goal (1 subgoal):
 1. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
hence "x#xs = (x#ys)@Ghost\<^sub>s\<^sub>b A'' L'' R'' W''#zs"
[PROOF STATE]
proof (prove)
using this:
xs = ys @ Ghost\<^sub>s\<^sub>b A'' L'' R'' W'' # zs
a \<in> A''

goal (1 subgoal):
 1. x # xs = (x # ys) @ Ghost\<^sub>s\<^sub>b A'' L'' R'' W'' # zs
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x # xs = (x # ys) @ Ghost\<^sub>s\<^sub>b A'' L'' R'' W'' # zs

goal (1 subgoal):
 1. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
x # xs = (x # ys) @ Ghost\<^sub>s\<^sub>b A'' L'' R'' W'' # zs

goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
using a_in
[PROOF STATE]
proof (prove)
using this:
x # xs = (x # ys) @ Ghost\<^sub>s\<^sub>b A'' L'' R'' W'' # zs
a \<in> A''

goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal (2 subgoals):
 1. \<And>x31 x32 x33. x = Prog\<^sub>s\<^sub>b x31 x32 x33 \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<And>x41 x42 x43 x44. x = Ghost\<^sub>s\<^sub>b x41 x42 x43 x44 \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>x31 x32 x33. x = Prog\<^sub>s\<^sub>b x31 x32 x33 \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<And>x41 x42 x43 x44. x = Ghost\<^sub>s\<^sub>b x41 x42 x43 x44 \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
case Prog\<^sub>s\<^sub>b
[PROOF STATE]
proof (state)
this:
x = Prog\<^sub>s\<^sub>b x31_ x32_ x33_

goal (2 subgoals):
 1. \<And>x31 x32 x33. x = Prog\<^sub>s\<^sub>b x31 x32 x33 \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<And>x41 x42 x43 x44. x = Ghost\<^sub>s\<^sub>b x41 x42 x43 x44 \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
from a_in
[PROOF STATE]
proof (chain)
picking this:
a \<in> all_acquired (x # xs)
[PROOF STEP]
have "a \<in> all_acquired xs"
[PROOF STATE]
proof (prove)
using this:
a \<in> all_acquired (x # xs)

goal (1 subgoal):
 1. a \<in> all_acquired xs
[PROOF STEP]
by (auto simp add: Prog\<^sub>s\<^sub>b)
[PROOF STATE]
proof (state)
this:
a \<in> all_acquired xs

goal (2 subgoals):
 1. \<And>x31 x32 x33. x = Prog\<^sub>s\<^sub>b x31 x32 x33 \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<And>x41 x42 x43 x44. x = Ghost\<^sub>s\<^sub>b x41 x42 x43 x44 \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
from Cons.hyps [OF this]
[PROOF STATE]
proof (chain)
picking this:
(\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
have "(\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W# zs \<and> a \<in> A) \<or>
            (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W# zs \<and> a \<in> A)" (is "?write \<or> ?ghst")
[PROOF STATE]
proof (prove)
using this:
(\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal (2 subgoals):
 1. \<And>x31 x32 x33. x = Prog\<^sub>s\<^sub>b x31 x32 x33 \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<And>x41 x42 x43 x44. x = Ghost\<^sub>s\<^sub>b x41 x42 x43 x44 \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
assume ?write
[PROOF STATE]
proof (state)
this:
\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A

goal (2 subgoals):
 1. \<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A
[PROOF STEP]
obtain sop'' a'' v'' A'' L'' R'' W'' ys zs
	where "xs=ys@Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W''#zs" and a_in: "a \<in> A''"
[PROOF STATE]
proof (prove)
using this:
\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A

goal (1 subgoal):
 1. (\<And>ys a'' sop'' v'' A'' L'' R'' W'' zs. \<lbrakk>xs = ys @ Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W'' # zs; a \<in> A''\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
xs = ys @ Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W'' # zs
a \<in> A''

goal (2 subgoals):
 1. \<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
hence "x#xs = (x#ys)@Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W''#zs"
[PROOF STATE]
proof (prove)
using this:
xs = ys @ Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W'' # zs
a \<in> A''

goal (1 subgoal):
 1. x # xs = (x # ys) @ Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W'' # zs
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x # xs = (x # ys) @ Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W'' # zs

goal (2 subgoals):
 1. \<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
x # xs = (x # ys) @ Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W'' # zs

goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
using a_in
[PROOF STATE]
proof (prove)
using this:
x # xs = (x # ys) @ Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W'' # zs
a \<in> A''

goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal (1 subgoal):
 1. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
assume ?ghst
[PROOF STATE]
proof (state)
this:
\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A

goal (1 subgoal):
 1. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A
[PROOF STEP]
obtain A'' L'' R'' W'' ys zs where
	"xs=ys@Ghost\<^sub>s\<^sub>b A'' L'' R'' W''#zs" and a_in: "a \<in> A''"
[PROOF STATE]
proof (prove)
using this:
\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A

goal (1 subgoal):
 1. (\<And>ys A'' L'' R'' W'' zs. \<lbrakk>xs = ys @ Ghost\<^sub>s\<^sub>b A'' L'' R'' W'' # zs; a \<in> A''\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
xs = ys @ Ghost\<^sub>s\<^sub>b A'' L'' R'' W'' # zs
a \<in> A''

goal (1 subgoal):
 1. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
hence "x#xs = (x#ys)@Ghost\<^sub>s\<^sub>b A'' L'' R'' W''#zs"
[PROOF STATE]
proof (prove)
using this:
xs = ys @ Ghost\<^sub>s\<^sub>b A'' L'' R'' W'' # zs
a \<in> A''

goal (1 subgoal):
 1. x # xs = (x # ys) @ Ghost\<^sub>s\<^sub>b A'' L'' R'' W'' # zs
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x # xs = (x # ys) @ Ghost\<^sub>s\<^sub>b A'' L'' R'' W'' # zs

goal (1 subgoal):
 1. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
x # xs = (x # ys) @ Ghost\<^sub>s\<^sub>b A'' L'' R'' W'' # zs

goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
using a_in
[PROOF STATE]
proof (prove)
using this:
x # xs = (x # ys) @ Ghost\<^sub>s\<^sub>b A'' L'' R'' W'' # zs
a \<in> A''

goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal (1 subgoal):
 1. \<And>x41 x42 x43 x44. x = Ghost\<^sub>s\<^sub>b x41 x42 x43 x44 \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x41 x42 x43 x44. x = Ghost\<^sub>s\<^sub>b x41 x42 x43 x44 \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
case (Ghost\<^sub>s\<^sub>b A L R W)
[PROOF STATE]
proof (state)
this:
x = Ghost\<^sub>s\<^sub>b A L R W

goal (1 subgoal):
 1. \<And>x41 x42 x43 x44. x = Ghost\<^sub>s\<^sub>b x41 x42 x43 x44 \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
proof (cases "a \<in> A")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. a \<notin> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
a \<notin> A

goal (2 subgoals):
 1. a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. a \<notin> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
with a_in
[PROOF STATE]
proof (chain)
picking this:
a \<in> all_acquired (x # xs)
a \<notin> A
[PROOF STEP]
have "a \<in> all_acquired xs"
[PROOF STATE]
proof (prove)
using this:
a \<in> all_acquired (x # xs)
a \<notin> A

goal (1 subgoal):
 1. a \<in> all_acquired xs
[PROOF STEP]
by (auto simp add: Ghost\<^sub>s\<^sub>b)
[PROOF STATE]
proof (state)
this:
a \<in> all_acquired xs

goal (2 subgoals):
 1. a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. a \<notin> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
from Cons.hyps [OF this]
[PROOF STATE]
proof (chain)
picking this:
(\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
have "(\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or>
            (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W# zs \<and> a \<in> A)" (is "?write \<or> ?ghst")
[PROOF STATE]
proof (prove)
using this:
(\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal (2 subgoals):
 1. a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. a \<notin> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
assume ?write
[PROOF STATE]
proof (state)
this:
\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A

goal (2 subgoals):
 1. \<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A
[PROOF STEP]
obtain sop'' a'' v'' A'' L'' R'' W'' ys zs
	  where "xs=ys@Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W''#zs" and a_in: "a \<in> A''"
[PROOF STATE]
proof (prove)
using this:
\<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A

goal (1 subgoal):
 1. (\<And>ys a'' sop'' v'' A'' L'' R'' W'' zs. \<lbrakk>xs = ys @ Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W'' # zs; a \<in> A''\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
xs = ys @ Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W'' # zs
a \<in> A''

goal (2 subgoals):
 1. \<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
hence "x#xs = (x#ys)@Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W''#zs"
[PROOF STATE]
proof (prove)
using this:
xs = ys @ Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W'' # zs
a \<in> A''

goal (1 subgoal):
 1. x # xs = (x # ys) @ Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W'' # zs
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x # xs = (x # ys) @ Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W'' # zs

goal (2 subgoals):
 1. \<exists>sop a' v ys zs A L R W. xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
 2. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
x # xs = (x # ys) @ Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W'' # zs

goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
using a_in
[PROOF STATE]
proof (prove)
using this:
x # xs = (x # ys) @ Write\<^sub>s\<^sub>b True a'' sop'' v'' A'' L'' R'' W'' # zs
a \<in> A''

goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal (1 subgoal):
 1. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
assume ?ghst
[PROOF STATE]
proof (state)
this:
\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A

goal (1 subgoal):
 1. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A
[PROOF STEP]
obtain A'' L'' R'' W'' ys zs where
	  "xs=ys@Ghost\<^sub>s\<^sub>b A'' L'' R'' W''#zs" and a_in: "a \<in> A''"
[PROOF STATE]
proof (prove)
using this:
\<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A

goal (1 subgoal):
 1. (\<And>ys A'' L'' R'' W'' zs. \<lbrakk>xs = ys @ Ghost\<^sub>s\<^sub>b A'' L'' R'' W'' # zs; a \<in> A''\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
xs = ys @ Ghost\<^sub>s\<^sub>b A'' L'' R'' W'' # zs
a \<in> A''

goal (1 subgoal):
 1. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
hence "x#xs = (x#ys)@Ghost\<^sub>s\<^sub>b A'' L'' R'' W''#zs"
[PROOF STATE]
proof (prove)
using this:
xs = ys @ Ghost\<^sub>s\<^sub>b A'' L'' R'' W'' # zs
a \<in> A''

goal (1 subgoal):
 1. x # xs = (x # ys) @ Ghost\<^sub>s\<^sub>b A'' L'' R'' W'' # zs
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x # xs = (x # ys) @ Ghost\<^sub>s\<^sub>b A'' L'' R'' W'' # zs

goal (1 subgoal):
 1. \<exists>A L R W ys zs. xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
x # xs = (x # ys) @ Ghost\<^sub>s\<^sub>b A'' L'' R'' W'' # zs

goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
using a_in
[PROOF STATE]
proof (prove)
using this:
x # xs = (x # ys) @ Ghost\<^sub>s\<^sub>b A'' L'' R'' W'' # zs
a \<in> A''

goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal (1 subgoal):
 1. a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
a \<in> A

goal (1 subgoal):
 1. a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a \<in> A
[PROOF STEP]
have "x#xs=[]@(Ghost\<^sub>s\<^sub>b A L R W#xs)"
[PROOF STATE]
proof (prove)
using this:
a \<in> A

goal (1 subgoal):
 1. x # xs = [] @ Ghost\<^sub>s\<^sub>b A L R W # xs
[PROOF STEP]
by (simp add: Ghost\<^sub>s\<^sub>b True)
[PROOF STATE]
proof (state)
this:
x # xs = [] @ Ghost\<^sub>s\<^sub>b A L R W # xs

goal (1 subgoal):
 1. a \<in> A \<Longrightarrow> (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
x # xs = [] @ Ghost\<^sub>s\<^sub>b A L R W # xs

goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
using True
[PROOF STATE]
proof (prove)
using this:
x # xs = [] @ Ghost\<^sub>s\<^sub>b A L R W # xs
a \<in> A

goal (1 subgoal):
 1. (\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<exists>sop a' v ys zs A L R W. x # xs = ys @ Write\<^sub>s\<^sub>b True a' sop v A L R W # zs \<and> a \<in> A) \<or> (\<exists>A L R W ys zs. x # xs = ys @ Ghost\<^sub>s\<^sub>b A L R W # zs \<and> a \<in> A)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma "\<exists>x y. (x::'a::classC) \<noteq> y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>x y. x \<noteq> y
[PROOF STEP]
nitpick [expect = none]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>x y. x \<noteq> y
[PROOF STEP]
sorry