[STATEMENT]
lemma weak_sharing_consistent_preserves_distinct_share_all_until_volatile_write:
  "\<And>\<S> i. \<lbrakk>ownership_distinct ts; read_only_unowned \<S> ts;weak_sharing_consis ts;
 i < length ts; ts!i = (p,is,\<theta>,sb,\<D>,\<O>,\<R>)\<rbrakk>
 \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter>
  read_only (share_all_until_volatile_write ts \<S>) = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>\<S> i. \<lbrakk>ownership_distinct ts; read_only_unowned \<S> ts; weak_sharing_consis ts; i < length ts; ts ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write ts \<S>) = {}
[PROOF STEP]
proof (induct ts)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>\<S> i. \<lbrakk>ownership_distinct []; read_only_unowned \<S> []; weak_sharing_consis []; i < length []; [] ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write [] \<S>) = {}
 2. \<And>a ts \<S> i. \<lbrakk>\<And>\<S> i. \<lbrakk>ownership_distinct ts; read_only_unowned \<S> ts; weak_sharing_consis ts; i < length ts; ts ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write ts \<S>) = {}; ownership_distinct (a # ts); read_only_unowned \<S> (a # ts); weak_sharing_consis (a # ts); i < length (a # ts); (a # ts) ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (a # ts) \<S>) = {}
[PROOF STEP]
case Nil
[PROOF STATE]
proof (state)
this:
ownership_distinct []
read_only_unowned \<S> []
weak_sharing_consis []
i < length []
[] ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)

goal (2 subgoals):
 1. \<And>\<S> i. \<lbrakk>ownership_distinct []; read_only_unowned \<S> []; weak_sharing_consis []; i < length []; [] ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write [] \<S>) = {}
 2. \<And>a ts \<S> i. \<lbrakk>\<And>\<S> i. \<lbrakk>ownership_distinct ts; read_only_unowned \<S> ts; weak_sharing_consis ts; i < length ts; ts ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write ts \<S>) = {}; ownership_distinct (a # ts); read_only_unowned \<S> (a # ts); weak_sharing_consis (a # ts); i < length (a # ts); (a # ts) ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (a # ts) \<S>) = {}
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
ownership_distinct []
read_only_unowned \<S> []
weak_sharing_consis []
i < length []
[] ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)

goal (1 subgoal):
 1. acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write [] \<S>) = {}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write [] \<S>) = {}

goal (1 subgoal):
 1. \<And>a ts \<S> i. \<lbrakk>\<And>\<S> i. \<lbrakk>ownership_distinct ts; read_only_unowned \<S> ts; weak_sharing_consis ts; i < length ts; ts ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write ts \<S>) = {}; ownership_distinct (a # ts); read_only_unowned \<S> (a # ts); weak_sharing_consis (a # ts); i < length (a # ts); (a # ts) ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (a # ts) \<S>) = {}
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a ts \<S> i. \<lbrakk>\<And>\<S> i. \<lbrakk>ownership_distinct ts; read_only_unowned \<S> ts; weak_sharing_consis ts; i < length ts; ts ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write ts \<S>) = {}; ownership_distinct (a # ts); read_only_unowned \<S> (a # ts); weak_sharing_consis (a # ts); i < length (a # ts); (a # ts) ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (a # ts) \<S>) = {}
[PROOF STEP]
case (Cons t ts)
[PROOF STATE]
proof (state)
this:
\<lbrakk>ownership_distinct ts; read_only_unowned ?\<S> ts; weak_sharing_consis ts; ?i < length ts; ts ! ?i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write ts ?\<S>) = {}
ownership_distinct (t # ts)
read_only_unowned \<S> (t # ts)
weak_sharing_consis (t # ts)
i < length (t # ts)
(t # ts) ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)

goal (1 subgoal):
 1. \<And>a ts \<S> i. \<lbrakk>\<And>\<S> i. \<lbrakk>ownership_distinct ts; read_only_unowned \<S> ts; weak_sharing_consis ts; i < length ts; ts ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write ts \<S>) = {}; ownership_distinct (a # ts); read_only_unowned \<S> (a # ts); weak_sharing_consis (a # ts); i < length (a # ts); (a # ts) ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (a # ts) \<S>) = {}
[PROOF STEP]
note \<open>read_only_unowned \<S> (t#ts)\<close>
[PROOF STATE]
proof (state)
this:
read_only_unowned \<S> (t # ts)

goal (1 subgoal):
 1. \<And>a ts \<S> i. \<lbrakk>\<And>\<S> i. \<lbrakk>ownership_distinct ts; read_only_unowned \<S> ts; weak_sharing_consis ts; i < length ts; ts ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write ts \<S>) = {}; ownership_distinct (a # ts); read_only_unowned \<S> (a # ts); weak_sharing_consis (a # ts); i < length (a # ts); (a # ts) ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (a # ts) \<S>) = {}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
read_only_unowned \<S> (t # ts)
[PROOF STEP]
interpret read_only_unowned \<S> "t#ts"
[PROOF STATE]
proof (prove)
using this:
read_only_unowned \<S> (t # ts)

goal (1 subgoal):
 1. read_only_unowned \<S> (t # ts)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a ts \<S> i. \<lbrakk>\<And>\<S> i. \<lbrakk>ownership_distinct ts; read_only_unowned \<S> ts; weak_sharing_consis ts; i < length ts; ts ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write ts \<S>) = {}; ownership_distinct (a # ts); read_only_unowned \<S> (a # ts); weak_sharing_consis (a # ts); i < length (a # ts); (a # ts) ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (a # ts) \<S>) = {}
[PROOF STEP]
note i_bound = \<open>i < length (t # ts)\<close>
[PROOF STATE]
proof (state)
this:
i < length (t # ts)

goal (1 subgoal):
 1. \<And>a ts \<S> i. \<lbrakk>\<And>\<S> i. \<lbrakk>ownership_distinct ts; read_only_unowned \<S> ts; weak_sharing_consis ts; i < length ts; ts ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write ts \<S>) = {}; ownership_distinct (a # ts); read_only_unowned \<S> (a # ts); weak_sharing_consis (a # ts); i < length (a # ts); (a # ts) ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (a # ts) \<S>) = {}
[PROOF STEP]
note ith = \<open>(t # ts) ! i = (p,is,\<theta>, sb, \<D>, \<O>,\<R>)\<close>
[PROOF STATE]
proof (state)
this:
(t # ts) ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)

goal (1 subgoal):
 1. \<And>a ts \<S> i. \<lbrakk>\<And>\<S> i. \<lbrakk>ownership_distinct ts; read_only_unowned \<S> ts; weak_sharing_consis ts; i < length ts; ts ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write ts \<S>) = {}; ownership_distinct (a # ts); read_only_unowned \<S> (a # ts); weak_sharing_consis (a # ts); i < length (a # ts); (a # ts) ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (a # ts) \<S>) = {}
[PROOF STEP]
have dist: "ownership_distinct (t#ts)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ownership_distinct (t # ts)
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
ownership_distinct (t # ts)

goal (1 subgoal):
 1. \<And>a ts \<S> i. \<lbrakk>\<And>\<S> i. \<lbrakk>ownership_distinct ts; read_only_unowned \<S> ts; weak_sharing_consis ts; i < length ts; ts ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write ts \<S>) = {}; ownership_distinct (a # ts); read_only_unowned \<S> (a # ts); weak_sharing_consis (a # ts); i < length (a # ts); (a # ts) ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (a # ts) \<S>) = {}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
ownership_distinct (t # ts)
[PROOF STEP]
interpret ownership_distinct "t#ts"
[PROOF STATE]
proof (prove)
using this:
ownership_distinct (t # ts)

goal (1 subgoal):
 1. ownership_distinct (t # ts)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a ts \<S> i. \<lbrakk>\<And>\<S> i. \<lbrakk>ownership_distinct ts; read_only_unowned \<S> ts; weak_sharing_consis ts; i < length ts; ts ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write ts \<S>) = {}; ownership_distinct (a # ts); read_only_unowned \<S> (a # ts); weak_sharing_consis (a # ts); i < length (a # ts); (a # ts) ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (a # ts) \<S>) = {}
[PROOF STEP]
from ownership_distinct_tl [OF dist]
[PROOF STATE]
proof (chain)
picking this:
ownership_distinct ts
[PROOF STEP]
have dist': "ownership_distinct ts"
[PROOF STATE]
proof (prove)
using this:
ownership_distinct ts

goal (1 subgoal):
 1. ownership_distinct ts
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
ownership_distinct ts

goal (1 subgoal):
 1. \<And>a ts \<S> i. \<lbrakk>\<And>\<S> i. \<lbrakk>ownership_distinct ts; read_only_unowned \<S> ts; weak_sharing_consis ts; i < length ts; ts ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write ts \<S>) = {}; ownership_distinct (a # ts); read_only_unowned \<S> (a # ts); weak_sharing_consis (a # ts); i < length (a # ts); (a # ts) ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (a # ts) \<S>) = {}
[PROOF STEP]
have consis: "weak_sharing_consis (t#ts)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. weak_sharing_consis (t # ts)
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
weak_sharing_consis (t # ts)

goal (1 subgoal):
 1. \<And>a ts \<S> i. \<lbrakk>\<And>\<S> i. \<lbrakk>ownership_distinct ts; read_only_unowned \<S> ts; weak_sharing_consis ts; i < length ts; ts ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write ts \<S>) = {}; ownership_distinct (a # ts); read_only_unowned \<S> (a # ts); weak_sharing_consis (a # ts); i < length (a # ts); (a # ts) ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (a # ts) \<S>) = {}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
weak_sharing_consis (t # ts)
[PROOF STEP]
interpret weak_sharing_consis "t#ts"
[PROOF STATE]
proof (prove)
using this:
weak_sharing_consis (t # ts)

goal (1 subgoal):
 1. weak_sharing_consis (t # ts)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a ts \<S> i. \<lbrakk>\<And>\<S> i. \<lbrakk>ownership_distinct ts; read_only_unowned \<S> ts; weak_sharing_consis ts; i < length ts; ts ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write ts \<S>) = {}; ownership_distinct (a # ts); read_only_unowned \<S> (a # ts); weak_sharing_consis (a # ts); i < length (a # ts); (a # ts) ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (a # ts) \<S>) = {}
[PROOF STEP]
note consis' = weak_sharing_consis_tl [OF consis]
[PROOF STATE]
proof (state)
this:
weak_sharing_consis ts

goal (1 subgoal):
 1. \<And>a ts \<S> i. \<lbrakk>\<And>\<S> i. \<lbrakk>ownership_distinct ts; read_only_unowned \<S> ts; weak_sharing_consis ts; i < length ts; ts ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write ts \<S>) = {}; ownership_distinct (a # ts); read_only_unowned \<S> (a # ts); weak_sharing_consis (a # ts); i < length (a # ts); (a # ts) ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (a # ts) \<S>) = {}
[PROOF STEP]
let ?take_sb = "(takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a ts \<S> i. \<lbrakk>\<And>\<S> i. \<lbrakk>ownership_distinct ts; read_only_unowned \<S> ts; weak_sharing_consis ts; i < length ts; ts ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write ts \<S>) = {}; ownership_distinct (a # ts); read_only_unowned \<S> (a # ts); weak_sharing_consis (a # ts); i < length (a # ts); (a # ts) ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (a # ts) \<S>) = {}
[PROOF STEP]
let ?drop_sb = "(dropWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a ts \<S> i. \<lbrakk>\<And>\<S> i. \<lbrakk>ownership_distinct ts; read_only_unowned \<S> ts; weak_sharing_consis ts; i < length ts; ts ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write ts \<S>) = {}; ownership_distinct (a # ts); read_only_unowned \<S> (a # ts); weak_sharing_consis (a # ts); i < length (a # ts); (a # ts) ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (a # ts) \<S>) = {}
[PROOF STEP]
have aargh: "(Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) = (\<lambda>a. \<not> is_volatile_Write\<^sub>s\<^sub>b a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Not \<circ> is_volatile_Write\<^sub>s\<^sub>b = (\<lambda>a. \<not> is_volatile_Write\<^sub>s\<^sub>b a)
[PROOF STEP]
by (rule ext) auto
[PROOF STATE]
proof (state)
this:
Not \<circ> is_volatile_Write\<^sub>s\<^sub>b = (\<lambda>a. \<not> is_volatile_Write\<^sub>s\<^sub>b a)

goal (1 subgoal):
 1. \<And>a ts \<S> i. \<lbrakk>\<And>\<S> i. \<lbrakk>ownership_distinct ts; read_only_unowned \<S> ts; weak_sharing_consis ts; i < length ts; ts ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write ts \<S>) = {}; ownership_distinct (a # ts); read_only_unowned \<S> (a # ts); weak_sharing_consis (a # ts); i < length (a # ts); (a # ts) ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (a # ts) \<S>) = {}
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
[PROOF STEP]
proof (cases i)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. i = 0 \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
 2. \<And>nat. i = Suc nat \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:
i = 0

goal (2 subgoals):
 1. i = 0 \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
 2. \<And>nat. i = Suc nat \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
[PROOF STEP]
from read_only_unowned [of 0] ith 0
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>0 < length (t # ts); (t # ts) ! 0 = (?p, ?is, ?\<theta>, ?sb, ?\<D>, ?\<O>, ?\<R>)\<rbrakk> \<Longrightarrow> ?\<O> \<inter> read_only \<S> = {}
(t # ts) ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)
i = 0
[PROOF STEP]
have owns_ro: "\<O> \<inter> read_only \<S> = {}"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 < length (t # ts); (t # ts) ! 0 = (?p, ?is, ?\<theta>, ?sb, ?\<D>, ?\<O>, ?\<R>)\<rbrakk> \<Longrightarrow> ?\<O> \<inter> read_only \<S> = {}
(t # ts) ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)
i = 0

goal (1 subgoal):
 1. \<O> \<inter> read_only \<S> = {}
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
\<O> \<inter> read_only \<S> = {}

goal (2 subgoals):
 1. i = 0 \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
 2. \<And>nat. i = Suc nat \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
[PROOF STEP]
from weak_sharing_consis [of 0] ith 0
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>0 < length (t # ts); (t # ts) ! 0 = (?p, ?is, ?\<theta>, ?sb, ?\<D>, ?\<O>, ?\<R>)\<rbrakk> \<Longrightarrow> weak_sharing_consistent ?\<O> ?sb
(t # ts) ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)
i = 0
[PROOF STEP]
have "weak_sharing_consistent \<O> sb"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 < length (t # ts); (t # ts) ! 0 = (?p, ?is, ?\<theta>, ?sb, ?\<D>, ?\<O>, ?\<R>)\<rbrakk> \<Longrightarrow> weak_sharing_consistent ?\<O> ?sb
(t # ts) ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)
i = 0

goal (1 subgoal):
 1. weak_sharing_consistent \<O> sb
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
weak_sharing_consistent \<O> sb

goal (2 subgoals):
 1. i = 0 \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
 2. \<And>nat. i = Suc nat \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
[PROOF STEP]
with weak_sharing_consistent_append [of \<O> ?take_sb ?drop_sb]
[PROOF STATE]
proof (chain)
picking this:
weak_sharing_consistent \<O> (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb @ dropWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) = (weak_sharing_consistent \<O> (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<and> weak_sharing_consistent (acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O>) (dropWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb))
weak_sharing_consistent \<O> sb
[PROOF STEP]
have consis_take: "weak_sharing_consistent \<O> ?take_sb"
[PROOF STATE]
proof (prove)
using this:
weak_sharing_consistent \<O> (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb @ dropWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) = (weak_sharing_consistent \<O> (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<and> weak_sharing_consistent (acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O>) (dropWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb))
weak_sharing_consistent \<O> sb

goal (1 subgoal):
 1. weak_sharing_consistent \<O> (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
weak_sharing_consistent \<O> (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb)

goal (2 subgoals):
 1. i = 0 \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
 2. \<And>nat. i = Suc nat \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
[PROOF STEP]
from weak_sharing_consistent_preserves_distinct [OF this owns_ro]
[PROOF STATE]
proof (chain)
picking this:
acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<S>) = {}
[PROOF STEP]
have dist_t: "acquired True ?take_sb \<O> \<inter> read_only (share ?take_sb \<S>) = {}"
[PROOF STATE]
proof (prove)
using this:
acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<S>) = {}

goal (1 subgoal):
 1. acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<S>) = {}
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<S>) = {}

goal (2 subgoals):
 1. i = 0 \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
 2. \<And>nat. i = Suc nat \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
[PROOF STEP]
from read_only_shared_all_until_volatile_write_subset [OF dist' consis', of "(share ?take_sb \<S>)"]
[PROOF STATE]
proof (chain)
picking this:
read_only (share_all_until_volatile_write ts (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<S>)) \<subseteq> read_only (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<S>) \<union> (\<Union>(uu_, uu_, uu_, sb, uu_, \<O>, uu_)\<in>set ts. \<O> \<union> all_acquired (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb))
[PROOF STEP]
have ro_rest: "read_only (share_all_until_volatile_write ts (share ?take_sb \<S>)) \<subseteq>
            read_only (share ?take_sb \<S>) \<union>
            (\<Union>((\<lambda>(_, _, _, sb, _, \<O>,_). \<O> \<union> all_acquired (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb)) ` set ts))"
[PROOF STATE]
proof (prove)
using this:
read_only (share_all_until_volatile_write ts (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<S>)) \<subseteq> read_only (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<S>) \<union> (\<Union>(uu_, uu_, uu_, sb, uu_, \<O>, uu_)\<in>set ts. \<O> \<union> all_acquired (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb))

goal (1 subgoal):
 1. read_only (share_all_until_volatile_write ts (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<S>)) \<subseteq> read_only (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<S>) \<union> (\<Union>(uu_, uu_, uu_, sb, uu_, \<O>, uu_)\<in>set ts. \<O> \<union> all_acquired (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
read_only (share_all_until_volatile_write ts (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<S>)) \<subseteq> read_only (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<S>) \<union> (\<Union>(uu_, uu_, uu_, sb, uu_, \<O>, uu_)\<in>set ts. \<O> \<union> all_acquired (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb))

goal (2 subgoals):
 1. i = 0 \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
 2. \<And>nat. i = Suc nat \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
read_only (share_all_until_volatile_write ts (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<S>)) \<subseteq> read_only (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<S>) \<union> (\<Union>(uu_, uu_, uu_, sb, uu_, \<O>, uu_)\<in>set ts. \<O> \<union> all_acquired (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb))

goal (2 subgoals):
 1. i = 0 \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
 2. \<And>nat. i = Suc nat \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
[PROOF STEP]
fix a
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. i = 0 \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
 2. \<And>nat. i = Suc nat \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
[PROOF STEP]
assume a_in_sb: "a \<in> acquired True ?take_sb \<O>"
[PROOF STATE]
proof (state)
this:
a \<in> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O>

goal (2 subgoals):
 1. i = 0 \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
 2. \<And>nat. i = Suc nat \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
[PROOF STEP]
assume a_in_ro: "a \<in> read_only (share_all_until_volatile_write ts (share ?take_sb \<S>))"
[PROOF STATE]
proof (state)
this:
a \<in> read_only (share_all_until_volatile_write ts (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<S>))

goal (2 subgoals):
 1. i = 0 \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
 2. \<And>nat. i = Suc nat \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
[PROOF STEP]
have False
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. False
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. False
[PROOF STEP]
from Set.in_mono [rule_format, OF ro_rest a_in_ro] dist_t a_in_sb
[PROOF STATE]
proof (chain)
picking this:
a \<in> read_only (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<S>) \<union> (\<Union>(uu_, uu_, uu_, sb, uu_, \<O>, uu_)\<in>set ts. \<O> \<union> all_acquired (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb))
acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<S>) = {}
a \<in> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O>
[PROOF STEP]
have "a \<in> (\<Union>((\<lambda>(_, _, _, sb, _, \<O>,_). \<O> \<union> all_acquired (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb)) ` set ts))"
[PROOF STATE]
proof (prove)
using this:
a \<in> read_only (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<S>) \<union> (\<Union>(uu_, uu_, uu_, sb, uu_, \<O>, uu_)\<in>set ts. \<O> \<union> all_acquired (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb))
acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<S>) = {}
a \<in> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O>

goal (1 subgoal):
 1. a \<in> (\<Union>(uu_, uu_, uu_, sb, uu_, \<O>, uu_)\<in>set ts. \<O> \<union> all_acquired (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a \<in> (\<Union>(uu_, uu_, uu_, sb, uu_, \<O>, uu_)\<in>set ts. \<O> \<union> all_acquired (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb))

goal (1 subgoal):
 1. False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a \<in> (\<Union>(uu_, uu_, uu_, sb, uu_, \<O>, uu_)\<in>set ts. \<O> \<union> all_acquired (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb))
[PROOF STEP]
obtain j p\<^sub>j "is\<^sub>j" \<theta>\<^sub>j sb\<^sub>j \<D>\<^sub>j \<O>\<^sub>j \<R>\<^sub>j
            where j_bound: "j < length ts" and ts_j: "ts!j = (p\<^sub>j,is\<^sub>j,\<theta>\<^sub>j,sb\<^sub>j,\<D>\<^sub>j,\<O>\<^sub>j,\<R>\<^sub>j)"
            and a_in_j: "a \<in> \<O>\<^sub>j \<union> all_acquired (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>j)"
[PROOF STATE]
proof (prove)
using this:
a \<in> (\<Union>(uu_, uu_, uu_, sb, uu_, \<O>, uu_)\<in>set ts. \<O> \<union> all_acquired (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb))

goal (1 subgoal):
 1. (\<And>j p\<^sub>j is\<^sub>j \<theta>\<^sub>j sb\<^sub>j \<D>\<^sub>j \<O>\<^sub>j \<R>\<^sub>j. \<lbrakk>j < length ts; ts ! j = (p\<^sub>j, is\<^sub>j, \<theta>\<^sub>j, sb\<^sub>j, \<D>\<^sub>j, \<O>\<^sub>j, \<R>\<^sub>j); a \<in> \<O>\<^sub>j \<union> all_acquired (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>j)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (fastforce simp add: in_set_conv_nth)
[PROOF STATE]
proof (state)
this:
j < length ts
ts ! j = (p\<^sub>j, is\<^sub>j, \<theta>\<^sub>j, sb\<^sub>j, \<D>\<^sub>j, \<O>\<^sub>j, \<R>\<^sub>j)
a \<in> \<O>\<^sub>j \<union> all_acquired (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>j)

goal (1 subgoal):
 1. False
[PROOF STEP]
from ownership_distinct [of 0 "Suc j"] ith ts_j j_bound 0
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>0 < length (t # ts); Suc j < length (t # ts); 0 \<noteq> Suc j; (t # ts) ! 0 = (?p\<^sub>i, ?is\<^sub>i, ?\<theta>\<^sub>i, ?sb\<^sub>i, ?\<D>\<^sub>i, ?\<O>\<^sub>i, ?\<R>\<^sub>i); (t # ts) ! Suc j = (?p\<^sub>j, ?is\<^sub>j, ?\<theta>\<^sub>j, ?sb\<^sub>j, ?\<D>\<^sub>j, ?\<O>\<^sub>j, ?\<R>\<^sub>j)\<rbrakk> \<Longrightarrow> (?\<O>\<^sub>i \<union> all_acquired ?sb\<^sub>i) \<inter> (?\<O>\<^sub>j \<union> all_acquired ?sb\<^sub>j) = {}
(t # ts) ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)
ts ! j = (p\<^sub>j, is\<^sub>j, \<theta>\<^sub>j, sb\<^sub>j, \<D>\<^sub>j, \<O>\<^sub>j, \<R>\<^sub>j)
j < length ts
i = 0
[PROOF STEP]
have dist: "(\<O> \<union> all_acquired sb) \<inter> (\<O>\<^sub>j \<union> all_acquired sb\<^sub>j) = {}"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 < length (t # ts); Suc j < length (t # ts); 0 \<noteq> Suc j; (t # ts) ! 0 = (?p\<^sub>i, ?is\<^sub>i, ?\<theta>\<^sub>i, ?sb\<^sub>i, ?\<D>\<^sub>i, ?\<O>\<^sub>i, ?\<R>\<^sub>i); (t # ts) ! Suc j = (?p\<^sub>j, ?is\<^sub>j, ?\<theta>\<^sub>j, ?sb\<^sub>j, ?\<D>\<^sub>j, ?\<O>\<^sub>j, ?\<R>\<^sub>j)\<rbrakk> \<Longrightarrow> (?\<O>\<^sub>i \<union> all_acquired ?sb\<^sub>i) \<inter> (?\<O>\<^sub>j \<union> all_acquired ?sb\<^sub>j) = {}
(t # ts) ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)
ts ! j = (p\<^sub>j, is\<^sub>j, \<theta>\<^sub>j, sb\<^sub>j, \<D>\<^sub>j, \<O>\<^sub>j, \<R>\<^sub>j)
j < length ts
i = 0

goal (1 subgoal):
 1. (\<O> \<union> all_acquired sb) \<inter> (\<O>\<^sub>j \<union> all_acquired sb\<^sub>j) = {}
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
(\<O> \<union> all_acquired sb) \<inter> (\<O>\<^sub>j \<union> all_acquired sb\<^sub>j) = {}

goal (1 subgoal):
 1. False
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(\<O> \<union> all_acquired sb) \<inter> (\<O>\<^sub>j \<union> all_acquired sb\<^sub>j) = {}

goal (1 subgoal):
 1. False
[PROOF STEP]
from acquired_all_acquired [of True ?take_sb \<O>] a_in_sb all_acquired_append [of ?take_sb ?drop_sb]
[PROOF STATE]
proof (chain)
picking this:
acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<subseteq> \<O> \<union> all_acquired (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb)
a \<in> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O>
all_acquired (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb @ dropWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) = all_acquired (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<union> all_acquired (dropWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb)
[PROOF STEP]
have "a \<in> \<O> \<union> all_acquired sb"
[PROOF STATE]
proof (prove)
using this:
acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<subseteq> \<O> \<union> all_acquired (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb)
a \<in> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O>
all_acquired (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb @ dropWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) = all_acquired (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<union> all_acquired (dropWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb)

goal (1 subgoal):
 1. a \<in> \<O> \<union> all_acquired sb
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a \<in> \<O> \<union> all_acquired sb

goal (1 subgoal):
 1. False
[PROOF STEP]
with a_in_j all_acquired_append [of "(takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>j)" "(dropWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>j)"]
          dist
[PROOF STATE]
proof (chain)
picking this:
a \<in> \<O>\<^sub>j \<union> all_acquired (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>j)
all_acquired (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>j @ dropWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>j) = all_acquired (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>j) \<union> all_acquired (dropWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>j)
(\<O> \<union> all_acquired sb) \<inter> (\<O>\<^sub>j \<union> all_acquired sb\<^sub>j) = {}
a \<in> \<O> \<union> all_acquired sb
[PROOF STEP]
have False
[PROOF STATE]
proof (prove)
using this:
a \<in> \<O>\<^sub>j \<union> all_acquired (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>j)
all_acquired (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>j @ dropWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>j) = all_acquired (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>j) \<union> all_acquired (dropWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>j)
(\<O> \<union> all_acquired sb) \<inter> (\<O>\<^sub>j \<union> all_acquired sb\<^sub>j) = {}
a \<in> \<O> \<union> all_acquired sb

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

goal (1 subgoal):
 1. False
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
False

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
False

goal (2 subgoals):
 1. i = 0 \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
 2. \<And>nat. i = Suc nat \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
\<lbrakk>?a3 \<in> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O>; ?a3 \<in> read_only (share_all_until_volatile_write ts (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<S>))\<rbrakk> \<Longrightarrow> False

goal (2 subgoals):
 1. i = 0 \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
 2. \<And>nat. i = Suc nat \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>?a3 \<in> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O>; ?a3 \<in> read_only (share_all_until_volatile_write ts (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<S>))\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?a3 \<in> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O>; ?a3 \<in> read_only (share_all_until_volatile_write ts (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<S>))\<rbrakk> \<Longrightarrow> False

goal (1 subgoal):
 1. acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
[PROOF STEP]
using 0 ith
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?a3 \<in> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O>; ?a3 \<in> read_only (share_all_until_volatile_write ts (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<S>))\<rbrakk> \<Longrightarrow> False
i = 0
(t # ts) ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)

goal (1 subgoal):
 1. acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
[PROOF STEP]
by (auto simp add: aargh)
[PROOF STATE]
proof (state)
this:
acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}

goal (1 subgoal):
 1. \<And>nat. i = Suc nat \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>nat. i = Suc nat \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
[PROOF STEP]
case (Suc k)
[PROOF STATE]
proof (state)
this:
i = Suc k

goal (1 subgoal):
 1. \<And>nat. i = Suc nat \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
[PROOF STEP]
from i_bound Suc
[PROOF STATE]
proof (chain)
picking this:
i < length (t # ts)
i = Suc k
[PROOF STEP]
have k_bound: "k < length ts"
[PROOF STATE]
proof (prove)
using this:
i < length (t # ts)
i = Suc k

goal (1 subgoal):
 1. k < length ts
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
k < length ts

goal (1 subgoal):
 1. \<And>nat. i = Suc nat \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
[PROOF STEP]
from ith Suc
[PROOF STATE]
proof (chain)
picking this:
(t # ts) ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)
i = Suc k
[PROOF STEP]
have kth: "ts!k = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)"
[PROOF STATE]
proof (prove)
using this:
(t # ts) ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)
i = Suc k

goal (1 subgoal):
 1. ts ! k = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
ts ! k = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)

goal (1 subgoal):
 1. \<And>nat. i = Suc nat \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
[PROOF STEP]
obtain p\<^sub>t "is\<^sub>t" \<O>\<^sub>t \<R>\<^sub>t \<D>\<^sub>t \<theta>\<^sub>t sb\<^sub>t
      where t: "t=(p\<^sub>t,is\<^sub>t,\<theta>\<^sub>t,sb\<^sub>t,\<D>\<^sub>t,\<O>\<^sub>t,\<R>\<^sub>t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>p\<^sub>t is\<^sub>t \<theta>\<^sub>t sb\<^sub>t \<D>\<^sub>t \<O>\<^sub>t \<R>\<^sub>t. t = (p\<^sub>t, is\<^sub>t, \<theta>\<^sub>t, sb\<^sub>t, \<D>\<^sub>t, \<O>\<^sub>t, \<R>\<^sub>t) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (cases t)
[PROOF STATE]
proof (state)
this:
t = (p\<^sub>t, is\<^sub>t, \<theta>\<^sub>t, sb\<^sub>t, \<D>\<^sub>t, \<O>\<^sub>t, \<R>\<^sub>t)

goal (1 subgoal):
 1. \<And>nat. i = Suc nat \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
[PROOF STEP]
let ?take_sb\<^sub>t = "(takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>nat. i = Suc nat \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
[PROOF STEP]
let ?drop_sb\<^sub>t = "(dropWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>nat. i = Suc nat \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
[PROOF STEP]
have ro_unowned': "read_only_unowned (share ?take_sb\<^sub>t \<S>) ts"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. read_only_unowned (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) \<S>) ts
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i p is \<O> \<R> \<D> \<theta> sb. \<lbrakk>i < length ts; ts ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> \<O> \<inter> read_only (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) \<S>) = {}
[PROOF STEP]
fix j
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i p is \<O> \<R> \<D> \<theta> sb. \<lbrakk>i < length ts; ts ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> \<O> \<inter> read_only (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) \<S>) = {}
[PROOF STEP]
fix p\<^sub>j is\<^sub>j \<O>\<^sub>j \<R>\<^sub>j \<D>\<^sub>j \<theta>\<^sub>j sb\<^sub>j
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i p is \<O> \<R> \<D> \<theta> sb. \<lbrakk>i < length ts; ts ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> \<O> \<inter> read_only (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) \<S>) = {}
[PROOF STEP]
assume j_bound: "j < length ts"
[PROOF STATE]
proof (state)
this:
j < length ts

goal (1 subgoal):
 1. \<And>i p is \<O> \<R> \<D> \<theta> sb. \<lbrakk>i < length ts; ts ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> \<O> \<inter> read_only (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) \<S>) = {}
[PROOF STEP]
assume jth: "ts!j = (p\<^sub>j,is\<^sub>j,\<theta>\<^sub>j,sb\<^sub>j,\<D>\<^sub>j,\<O>\<^sub>j,\<R>\<^sub>j)"
[PROOF STATE]
proof (state)
this:
ts ! j = (p\<^sub>j, is\<^sub>j, \<theta>\<^sub>j, sb\<^sub>j, \<D>\<^sub>j, \<O>\<^sub>j, \<R>\<^sub>j)

goal (1 subgoal):
 1. \<And>i p is \<O> \<R> \<D> \<theta> sb. \<lbrakk>i < length ts; ts ! i = (p, is, \<theta>, sb, \<D>, \<O>, \<R>)\<rbrakk> \<Longrightarrow> \<O> \<inter> read_only (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) \<S>) = {}
[PROOF STEP]
show "\<O>\<^sub>j \<inter> read_only (share ?take_sb\<^sub>t \<S>) = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<O>\<^sub>j \<inter> read_only (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) \<S>) = {}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<O>\<^sub>j \<inter> read_only (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) \<S>) = {}
[PROOF STEP]
from read_only_unowned [of "Suc j"] j_bound jth
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>Suc j < length (t # ts); (t # ts) ! Suc j = (?p, ?is, ?\<theta>, ?sb, ?\<D>, ?\<O>, ?\<R>)\<rbrakk> \<Longrightarrow> ?\<O> \<inter> read_only \<S> = {}
j < length ts
ts ! j = (p\<^sub>j, is\<^sub>j, \<theta>\<^sub>j, sb\<^sub>j, \<D>\<^sub>j, \<O>\<^sub>j, \<R>\<^sub>j)
[PROOF STEP]
have dist: "\<O>\<^sub>j \<inter> read_only \<S> = {}"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>Suc j < length (t # ts); (t # ts) ! Suc j = (?p, ?is, ?\<theta>, ?sb, ?\<D>, ?\<O>, ?\<R>)\<rbrakk> \<Longrightarrow> ?\<O> \<inter> read_only \<S> = {}
j < length ts
ts ! j = (p\<^sub>j, is\<^sub>j, \<theta>\<^sub>j, sb\<^sub>j, \<D>\<^sub>j, \<O>\<^sub>j, \<R>\<^sub>j)

goal (1 subgoal):
 1. \<O>\<^sub>j \<inter> read_only \<S> = {}
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
\<O>\<^sub>j \<inter> read_only \<S> = {}

goal (1 subgoal):
 1. \<O>\<^sub>j \<inter> read_only (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) \<S>) = {}
[PROOF STEP]
from weak_sharing_consis [of 0] t
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>0 < length (t # ts); (t # ts) ! 0 = (?p, ?is, ?\<theta>, ?sb, ?\<D>, ?\<O>, ?\<R>)\<rbrakk> \<Longrightarrow> weak_sharing_consistent ?\<O> ?sb
t = (p\<^sub>t, is\<^sub>t, \<theta>\<^sub>t, sb\<^sub>t, \<D>\<^sub>t, \<O>\<^sub>t, \<R>\<^sub>t)
[PROOF STEP]
have "weak_sharing_consistent \<O>\<^sub>t sb\<^sub>t"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 < length (t # ts); (t # ts) ! 0 = (?p, ?is, ?\<theta>, ?sb, ?\<D>, ?\<O>, ?\<R>)\<rbrakk> \<Longrightarrow> weak_sharing_consistent ?\<O> ?sb
t = (p\<^sub>t, is\<^sub>t, \<theta>\<^sub>t, sb\<^sub>t, \<D>\<^sub>t, \<O>\<^sub>t, \<R>\<^sub>t)

goal (1 subgoal):
 1. weak_sharing_consistent \<O>\<^sub>t sb\<^sub>t
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
weak_sharing_consistent \<O>\<^sub>t sb\<^sub>t

goal (1 subgoal):
 1. \<O>\<^sub>j \<inter> read_only (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) \<S>) = {}
[PROOF STEP]
with weak_sharing_consistent_append [of \<O>\<^sub>t ?take_sb\<^sub>t ?drop_sb\<^sub>t]
[PROOF STATE]
proof (chain)
picking this:
weak_sharing_consistent \<O>\<^sub>t (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t @ dropWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) = (weak_sharing_consistent \<O>\<^sub>t (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) \<and> weak_sharing_consistent (acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) \<O>\<^sub>t) (dropWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t))
weak_sharing_consistent \<O>\<^sub>t sb\<^sub>t
[PROOF STEP]
have consis_t: "weak_sharing_consistent \<O>\<^sub>t ?take_sb\<^sub>t"
[PROOF STATE]
proof (prove)
using this:
weak_sharing_consistent \<O>\<^sub>t (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t @ dropWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) = (weak_sharing_consistent \<O>\<^sub>t (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) \<and> weak_sharing_consistent (acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) \<O>\<^sub>t) (dropWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t))
weak_sharing_consistent \<O>\<^sub>t sb\<^sub>t

goal (1 subgoal):
 1. weak_sharing_consistent \<O>\<^sub>t (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
weak_sharing_consistent \<O>\<^sub>t (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t)

goal (1 subgoal):
 1. \<O>\<^sub>j \<inter> read_only (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) \<S>) = {}
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
weak_sharing_consistent \<O>\<^sub>t (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t)

goal (1 subgoal):
 1. \<O>\<^sub>j \<inter> read_only (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) \<S>) = {}
[PROOF STEP]
fix a
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<O>\<^sub>j \<inter> read_only (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) \<S>) = {}
[PROOF STEP]
assume a_in_j: "a \<in> \<O>\<^sub>j"
[PROOF STATE]
proof (state)
this:
a \<in> \<O>\<^sub>j

goal (1 subgoal):
 1. \<O>\<^sub>j \<inter> read_only (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) \<S>) = {}
[PROOF STEP]
assume a_ro: "a \<in> read_only (share ?take_sb\<^sub>t \<S>)"
[PROOF STATE]
proof (state)
this:
a \<in> read_only (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) \<S>)

goal (1 subgoal):
 1. \<O>\<^sub>j \<inter> read_only (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) \<S>) = {}
[PROOF STEP]
have False
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. False
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. False
[PROOF STEP]
from a_in_j ownership_distinct [of 0 "Suc j"] j_bound t jth
[PROOF STATE]
proof (chain)
picking this:
a \<in> \<O>\<^sub>j
\<lbrakk>0 < length (t # ts); Suc j < length (t # ts); 0 \<noteq> Suc j; (t # ts) ! 0 = (?p\<^sub>i, ?is\<^sub>i, ?\<theta>\<^sub>i, ?sb\<^sub>i, ?\<D>\<^sub>i, ?\<O>\<^sub>i, ?\<R>\<^sub>i); (t # ts) ! Suc j = (?p\<^sub>j, ?is\<^sub>j, ?\<theta>\<^sub>j, ?sb\<^sub>j, ?\<D>\<^sub>j, ?\<O>\<^sub>j, ?\<R>\<^sub>j)\<rbrakk> \<Longrightarrow> (?\<O>\<^sub>i \<union> all_acquired ?sb\<^sub>i) \<inter> (?\<O>\<^sub>j \<union> all_acquired ?sb\<^sub>j) = {}
j < length ts
t = (p\<^sub>t, is\<^sub>t, \<theta>\<^sub>t, sb\<^sub>t, \<D>\<^sub>t, \<O>\<^sub>t, \<R>\<^sub>t)
ts ! j = (p\<^sub>j, is\<^sub>j, \<theta>\<^sub>j, sb\<^sub>j, \<D>\<^sub>j, \<O>\<^sub>j, \<R>\<^sub>j)
[PROOF STEP]
have "(\<O>\<^sub>t \<union> all_acquired sb\<^sub>t) \<inter> (\<O>\<^sub>j \<union> all_acquired sb\<^sub>j) = {}"
[PROOF STATE]
proof (prove)
using this:
a \<in> \<O>\<^sub>j
\<lbrakk>0 < length (t # ts); Suc j < length (t # ts); 0 \<noteq> Suc j; (t # ts) ! 0 = (?p\<^sub>i, ?is\<^sub>i, ?\<theta>\<^sub>i, ?sb\<^sub>i, ?\<D>\<^sub>i, ?\<O>\<^sub>i, ?\<R>\<^sub>i); (t # ts) ! Suc j = (?p\<^sub>j, ?is\<^sub>j, ?\<theta>\<^sub>j, ?sb\<^sub>j, ?\<D>\<^sub>j, ?\<O>\<^sub>j, ?\<R>\<^sub>j)\<rbrakk> \<Longrightarrow> (?\<O>\<^sub>i \<union> all_acquired ?sb\<^sub>i) \<inter> (?\<O>\<^sub>j \<union> all_acquired ?sb\<^sub>j) = {}
j < length ts
t = (p\<^sub>t, is\<^sub>t, \<theta>\<^sub>t, sb\<^sub>t, \<D>\<^sub>t, \<O>\<^sub>t, \<R>\<^sub>t)
ts ! j = (p\<^sub>j, is\<^sub>j, \<theta>\<^sub>j, sb\<^sub>j, \<D>\<^sub>j, \<O>\<^sub>j, \<R>\<^sub>j)

goal (1 subgoal):
 1. (\<O>\<^sub>t \<union> all_acquired sb\<^sub>t) \<inter> (\<O>\<^sub>j \<union> all_acquired sb\<^sub>j) = {}
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
(\<O>\<^sub>t \<union> all_acquired sb\<^sub>t) \<inter> (\<O>\<^sub>j \<union> all_acquired sb\<^sub>j) = {}

goal (1 subgoal):
 1. False
[PROOF STEP]
with a_in_j all_acquired_append [of ?take_sb\<^sub>t ?drop_sb\<^sub>t]
[PROOF STATE]
proof (chain)
picking this:
a \<in> \<O>\<^sub>j
all_acquired (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t @ dropWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) = all_acquired (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) \<union> all_acquired (dropWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t)
(\<O>\<^sub>t \<union> all_acquired sb\<^sub>t) \<inter> (\<O>\<^sub>j \<union> all_acquired sb\<^sub>j) = {}
[PROOF STEP]
have "a \<notin> (\<O>\<^sub>t \<union> all_acquired ?take_sb\<^sub>t)"
[PROOF STATE]
proof (prove)
using this:
a \<in> \<O>\<^sub>j
all_acquired (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t @ dropWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) = all_acquired (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) \<union> all_acquired (dropWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t)
(\<O>\<^sub>t \<union> all_acquired sb\<^sub>t) \<inter> (\<O>\<^sub>j \<union> all_acquired sb\<^sub>j) = {}

goal (1 subgoal):
 1. a \<notin> \<O>\<^sub>t \<union> all_acquired (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t)
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
a \<notin> \<O>\<^sub>t \<union> all_acquired (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t)

goal (1 subgoal):
 1. False
[PROOF STEP]
from  read_only_share_unowned [OF consis_t this a_ro]
[PROOF STATE]
proof (chain)
picking this:
a \<in> read_only \<S>
[PROOF STEP]
have "a \<in> read_only \<S>"
[PROOF STATE]
proof (prove)
using this:
a \<in> read_only \<S>

goal (1 subgoal):
 1. a \<in> read_only \<S>
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
a \<in> read_only \<S>

goal (1 subgoal):
 1. False
[PROOF STEP]
with a_in_j dist
[PROOF STATE]
proof (chain)
picking this:
a \<in> \<O>\<^sub>j
\<O>\<^sub>j \<inter> read_only \<S> = {}
a \<in> read_only \<S>
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
a \<in> \<O>\<^sub>j
\<O>\<^sub>j \<inter> read_only \<S> = {}
a \<in> read_only \<S>

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
False

goal (1 subgoal):
 1. \<O>\<^sub>j \<inter> read_only (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) \<S>) = {}
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
\<lbrakk>?a3 \<in> \<O>\<^sub>j; ?a3 \<in> read_only (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) \<S>)\<rbrakk> \<Longrightarrow> False

goal (1 subgoal):
 1. \<O>\<^sub>j \<inter> read_only (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) \<S>) = {}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>?a3 \<in> \<O>\<^sub>j; ?a3 \<in> read_only (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) \<S>)\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?a3 \<in> \<O>\<^sub>j; ?a3 \<in> read_only (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) \<S>)\<rbrakk> \<Longrightarrow> False

goal (1 subgoal):
 1. \<O>\<^sub>j \<inter> read_only (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) \<S>) = {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<O>\<^sub>j \<inter> read_only (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) \<S>) = {}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<O>\<^sub>j \<inter> read_only (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) \<S>) = {}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
read_only_unowned (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) \<S>) ts

goal (1 subgoal):
 1. \<And>nat. i = Suc nat \<Longrightarrow> acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
[PROOF STEP]
from Cons.hyps [OF dist' ro_unowned' consis' k_bound kth]
[PROOF STATE]
proof (chain)
picking this:
acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write ts (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) \<S>)) = {}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write ts (share (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb\<^sub>t) \<S>)) = {}

goal (1 subgoal):
 1. acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}
[PROOF STEP]
by (simp add: t)
[PROOF STATE]
proof (state)
this:
acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
acquired True (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) \<O> \<inter> read_only (share_all_until_volatile_write (t # ts) \<S>) = {}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma "P x y \<longrightarrow> P y x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P x y \<longrightarrow> P y x
[PROOF STEP]
refute [expect = genuine]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P x y \<longrightarrow> P y x
[PROOF STEP]
oops


[STATEMENT]
lemma silent_move_\<tau>exec_1_d:
  "\<tau>trsys.silent_move (mexecd P t) (\<tau>MOVE2 P) ((xcp, frs), h) ((xcp', frs'), h')
  \<Longrightarrow> \<tau>exec_1_d P t (xcp, h, frs) (xcp', h', frs')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. execd_mthr.silent_move P t ((xcp, frs), h) ((xcp', frs'), h') \<Longrightarrow> \<tau>exec_1_d P t (xcp, h, frs) (xcp', h', frs')
[PROOF STEP]
apply(erule \<tau>trsys.silent_move.cases)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>s s' tl. \<lbrakk>((xcp, frs), h) = s; ((xcp', frs'), h') = s'; mexecd P t s tl s'; (case s of (x, xa) \<Rightarrow> (case x of (xcp, frs) \<Rightarrow> \<lambda>h ta s. \<tau>Move2 P (xcp, h, frs) \<and> ta = \<lbrace>\<rbrace>) xa) tl s'\<rbrakk> \<Longrightarrow> \<tau>exec_1_d P t (xcp, h, frs) (xcp', h', frs')
[PROOF STEP]
apply clarsimp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>P,t \<turnstile> Normal (xcp, h, frs) -\<lbrace>\<rbrace>-jvmd\<rightarrow> Normal (xcp', h', frs'); \<tau>Move2 P (xcp, h, frs)\<rbrakk> \<Longrightarrow> \<tau>exec_1_d P t (xcp, h, frs) (xcp', h', frs')
[PROOF STEP]
apply(erule jvmd_NormalE)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>xcpa ha f frsa. \<lbrakk>\<tau>Move2 P (xcp, h, frs); check P (xcp, h, frs); (\<lbrace>\<rbrace>, xcp', h', frs') \<in> exec P t (xcp, h, frs); (xcp, h, frs) = (xcpa, ha, f # frsa)\<rbrakk> \<Longrightarrow> \<tau>exec_1_d P t (xcp, h, frs) (xcp', h', frs')
[PROOF STEP]
apply(auto simp add: exec_1_iff)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma path_split2:"s0\<^bsub>SES\<^esub> (\<beta> @ \<alpha>)\<Longrightarrow>\<^bsub>SES\<^esub> s
  \<Longrightarrow> \<exists>s' \<in> S\<^bsub>SES\<^esub>. ( s0\<^bsub>SES\<^esub> \<beta>\<Longrightarrow>\<^bsub>SES\<^esub> s' \<and> s' \<alpha>\<Longrightarrow>\<^bsub>SES\<^esub> s \<and> reachable SES s' )"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. s0\<^bsub>SES\<^esub> (\<beta> @ \<alpha>)\<Longrightarrow>\<^bsub>SES\<^esub> s \<Longrightarrow> \<exists>s'\<in>S\<^bsub>SES\<^esub>. s0\<^bsub>SES\<^esub> \<beta>\<Longrightarrow>\<^bsub>SES\<^esub> s' \<and> s' \<alpha>\<Longrightarrow>\<^bsub>SES\<^esub> s \<and> reachable SES s'
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. s0\<^bsub>SES\<^esub> (\<beta> @ \<alpha>)\<Longrightarrow>\<^bsub>SES\<^esub> s \<Longrightarrow> \<exists>s'\<in>S\<^bsub>SES\<^esub>. s0\<^bsub>SES\<^esub> \<beta>\<Longrightarrow>\<^bsub>SES\<^esub> s' \<and> s' \<alpha>\<Longrightarrow>\<^bsub>SES\<^esub> s \<and> reachable SES s'
[PROOF STEP]
assume s0_\<beta>\<alpha>_s: "s0\<^bsub>SES\<^esub> (\<beta> @ \<alpha>)\<Longrightarrow>\<^bsub>SES\<^esub> s"
[PROOF STATE]
proof (state)
this:
s0\<^bsub>SES\<^esub> (\<beta> @ \<alpha>)\<Longrightarrow>\<^bsub>SES\<^esub> s

goal (1 subgoal):
 1. s0\<^bsub>SES\<^esub> (\<beta> @ \<alpha>)\<Longrightarrow>\<^bsub>SES\<^esub> s \<Longrightarrow> \<exists>s'\<in>S\<^bsub>SES\<^esub>. s0\<^bsub>SES\<^esub> \<beta>\<Longrightarrow>\<^bsub>SES\<^esub> s' \<and> s' \<alpha>\<Longrightarrow>\<^bsub>SES\<^esub> s \<and> reachable SES s'
[PROOF STEP]
from path_split[OF s0_\<beta>\<alpha>_s]
[PROOF STATE]
proof (chain)
picking this:
\<exists>s2. s0\<^bsub>SES\<^esub> \<beta>\<Longrightarrow>\<^bsub>SES\<^esub> s2 \<and> s2 \<alpha>\<Longrightarrow>\<^bsub>SES\<^esub> s
[PROOF STEP]
obtain s'
    where s0_\<beta>_s': "s0\<^bsub>SES\<^esub> \<beta>\<Longrightarrow>\<^bsub>SES\<^esub> s'"
    and s'_\<alpha>_s: "s' \<alpha>\<Longrightarrow>\<^bsub>SES\<^esub> s"
[PROOF STATE]
proof (prove)
using this:
\<exists>s2. s0\<^bsub>SES\<^esub> \<beta>\<Longrightarrow>\<^bsub>SES\<^esub> s2 \<and> s2 \<alpha>\<Longrightarrow>\<^bsub>SES\<^esub> s

goal (1 subgoal):
 1. (\<And>s'. \<lbrakk>s0\<^bsub>SES\<^esub> \<beta>\<Longrightarrow>\<^bsub>SES\<^esub> s'; s' \<alpha>\<Longrightarrow>\<^bsub>SES\<^esub> s\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
s0\<^bsub>SES\<^esub> \<beta>\<Longrightarrow>\<^bsub>SES\<^esub> s'
s' \<alpha>\<Longrightarrow>\<^bsub>SES\<^esub> s

goal (1 subgoal):
 1. s0\<^bsub>SES\<^esub> (\<beta> @ \<alpha>)\<Longrightarrow>\<^bsub>SES\<^esub> s \<Longrightarrow> \<exists>s'\<in>S\<^bsub>SES\<^esub>. s0\<^bsub>SES\<^esub> \<beta>\<Longrightarrow>\<^bsub>SES\<^esub> s' \<and> s' \<alpha>\<Longrightarrow>\<^bsub>SES\<^esub> s \<and> reachable SES s'
[PROOF STEP]
hence "reachable SES s'"
[PROOF STATE]
proof (prove)
using this:
s0\<^bsub>SES\<^esub> \<beta>\<Longrightarrow>\<^bsub>SES\<^esub> s'
s' \<alpha>\<Longrightarrow>\<^bsub>SES\<^esub> s

goal (1 subgoal):
 1. reachable SES s'
[PROOF STEP]
by(simp add: reachable_def, auto)
[PROOF STATE]
proof (state)
this:
reachable SES s'

goal (1 subgoal):
 1. s0\<^bsub>SES\<^esub> (\<beta> @ \<alpha>)\<Longrightarrow>\<^bsub>SES\<^esub> s \<Longrightarrow> \<exists>s'\<in>S\<^bsub>SES\<^esub>. s0\<^bsub>SES\<^esub> \<beta>\<Longrightarrow>\<^bsub>SES\<^esub> s' \<and> s' \<alpha>\<Longrightarrow>\<^bsub>SES\<^esub> s \<and> reachable SES s'
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
reachable SES s'

goal (1 subgoal):
 1. s0\<^bsub>SES\<^esub> (\<beta> @ \<alpha>)\<Longrightarrow>\<^bsub>SES\<^esub> s \<Longrightarrow> \<exists>s'\<in>S\<^bsub>SES\<^esub>. s0\<^bsub>SES\<^esub> \<beta>\<Longrightarrow>\<^bsub>SES\<^esub> s' \<and> s' \<alpha>\<Longrightarrow>\<^bsub>SES\<^esub> s \<and> reachable SES s'
[PROOF STEP]
have "s' \<in> S\<^bsub>SES\<^esub>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. s' \<in> S\<^bsub>SES\<^esub>
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. s' \<in> S\<^bsub>SES\<^esub>
[PROOF STEP]
from s0_\<beta>_s' validSES path_state_closure
[PROOF STATE]
proof (chain)
picking this:
s0\<^bsub>SES\<^esub> \<beta>\<Longrightarrow>\<^bsub>SES\<^esub> s'
SES_valid SES
\<lbrakk>?s ?\<tau>\<Longrightarrow>\<^bsub>SES\<^esub> ?s'; ?s \<in> S\<^bsub>SES\<^esub>\<rbrakk> \<Longrightarrow> ?s' \<in> S\<^bsub>SES\<^esub>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
s0\<^bsub>SES\<^esub> \<beta>\<Longrightarrow>\<^bsub>SES\<^esub> s'
SES_valid SES
\<lbrakk>?s ?\<tau>\<Longrightarrow>\<^bsub>SES\<^esub> ?s'; ?s \<in> S\<^bsub>SES\<^esub>\<rbrakk> \<Longrightarrow> ?s' \<in> S\<^bsub>SES\<^esub>

goal (1 subgoal):
 1. s' \<in> S\<^bsub>SES\<^esub>
[PROOF STEP]
by (auto simp add: SES_valid_def s0_is_state_def)
[PROOF STATE]
proof (state)
this:
s' \<in> S\<^bsub>SES\<^esub>

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
s' \<in> S\<^bsub>SES\<^esub>

goal (1 subgoal):
 1. s0\<^bsub>SES\<^esub> (\<beta> @ \<alpha>)\<Longrightarrow>\<^bsub>SES\<^esub> s \<Longrightarrow> \<exists>s'\<in>S\<^bsub>SES\<^esub>. s0\<^bsub>SES\<^esub> \<beta>\<Longrightarrow>\<^bsub>SES\<^esub> s' \<and> s' \<alpha>\<Longrightarrow>\<^bsub>SES\<^esub> s \<and> reachable SES s'
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
reachable SES s'
s' \<in> S\<^bsub>SES\<^esub>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
reachable SES s'
s' \<in> S\<^bsub>SES\<^esub>

goal (1 subgoal):
 1. \<exists>s'\<in>S\<^bsub>SES\<^esub>. s0\<^bsub>SES\<^esub> \<beta>\<Longrightarrow>\<^bsub>SES\<^esub> s' \<and> s' \<alpha>\<Longrightarrow>\<^bsub>SES\<^esub> s \<and> reachable SES s'
[PROOF STEP]
using s'_\<alpha>_s s0_\<beta>_s'
[PROOF STATE]
proof (prove)
using this:
reachable SES s'
s' \<in> S\<^bsub>SES\<^esub>
s' \<alpha>\<Longrightarrow>\<^bsub>SES\<^esub> s
s0\<^bsub>SES\<^esub> \<beta>\<Longrightarrow>\<^bsub>SES\<^esub> s'

goal (1 subgoal):
 1. \<exists>s'\<in>S\<^bsub>SES\<^esub>. s0\<^bsub>SES\<^esub> \<beta>\<Longrightarrow>\<^bsub>SES\<^esub> s' \<and> s' \<alpha>\<Longrightarrow>\<^bsub>SES\<^esub> s \<and> reachable SES s'
[PROOF STEP]
by(auto)
[PROOF STATE]
proof (state)
this:
\<exists>s'\<in>S\<^bsub>SES\<^esub>. s0\<^bsub>SES\<^esub> \<beta>\<Longrightarrow>\<^bsub>SES\<^esub> s' \<and> s' \<alpha>\<Longrightarrow>\<^bsub>SES\<^esub> s \<and> reachable SES s'

goal:
No subgoals!
[PROOF STEP]
qed