fact
stringlengths
1
2.11k
type
stringclasses
27 values
library
stringclasses
888 values
imports
listlengths
0
81
filename
stringlengths
9
106
symbolic_name
stringlengths
1
113
docstring
stringlengths
0
1.34k
last_statewhere "last_state (s,[]) = s" | "last_state (s,ps#p) = snd p"
fun
Abortable_Linearizable_Modules
[ "Main", "Sequences" ]
Abortable_Linearizable_Modules/IOA.thy
last_state
null
last_state_reachable: fixes A e assumes "is_exec_of A e" shows "reachable A (last_state e)" using assms proof - have "is_exec_of A e \<Longrightarrow> reachable A (last_state e)" proof (induction "snd e" arbitrary: e) case Nil from Nil.prems have 1:"fst e \<in> start A" by (simp add:is_exec_of_def) ...
lemma
Abortable_Linearizable_Modules
[ "Main", "Sequences" ]
Abortable_Linearizable_Modules/IOA.thy
last_state_reachable
null
trans_from_last_state: assumes "is_exec_frag_of A e" and "(last_state e)\<midarrow>a\<midarrow>A\<longrightarrow>s'" shows "is_exec_frag_of A (cons_exec e (a,s'))" using assms by (cases "(A, fst e, snd e)" rule:is_exec_frag_of.cases, auto simp add:cons_exec_def)
lemma
Abortable_Linearizable_Modules
[ "Main", "Sequences" ]
Abortable_Linearizable_Modules/IOA.thy
trans_from_last_state
null
exec_frag_prefix: fixes A p ps assumes "is_exec_frag_of A (cons_exec e p)" shows "is_exec_frag_of A e" using assms by (cases "(A, fst e, snd e)" rule:is_exec_frag_of.cases, auto simp add:cons_exec_def)
lemma
Abortable_Linearizable_Modules
[ "Main", "Sequences" ]
Abortable_Linearizable_Modules/IOA.thy
exec_frag_prefix
null
trace_same_ext: fixes A B e assumes "ext A = ext B" shows "trace (ioa.asig A) e = trace (ioa.asig B) e" using assms by (auto simp add:trace_def)
lemma
Abortable_Linearizable_Modules
[ "Main", "Sequences" ]
Abortable_Linearizable_Modules/IOA.thy
trace_same_ext
null
trace_append_is_append_trace: fixes e e' sig shows "trace sig (append_exec e' e) = trace sig e' @ trace sig e" by (simp add:append_exec_def trace_def schedule_def filter_act_def)
lemma
Abortable_Linearizable_Modules
[ "Main", "Sequences" ]
Abortable_Linearizable_Modules/IOA.thy
trace_append_is_append_trace
null
append_exec_frags_is_exec_frag: fixes e e' A as assumes "is_exec_frag_of A e" and "last_state e = fst e'" and "is_exec_frag_of A e'" shows "is_exec_frag_of A (append_exec e e')" proof - from assms show ?thesis proof (induct "(fst e',snd e')" arbitrary:e' rule:is_exec_frag_of.induct) case (3 A) from ...
lemma
Abortable_Linearizable_Modules
[ "Main", "Sequences" ]
Abortable_Linearizable_Modules/IOA.thy
append_exec_frags_is_exec_frag
null
last_state_of_append: fixes e e' assumes "fst e' = last_state e" shows "last_state (append_exec e e') = last_state e'" using assms by (cases e' rule:last_state.cases, auto simp add:append_exec_def)
lemma
Abortable_Linearizable_Modules
[ "Main", "Sequences" ]
Abortable_Linearizable_Modules/IOA.thy
last_state_of_append
null
pre_RDR= Sequences + fixes \<delta>::"'a \<Rightarrow> ('b \<times> 'c) \<Rightarrow> 'a" (infix "\<bullet>" 65) and \<gamma>::"'a \<Rightarrow> ('b \<times> 'c) \<Rightarrow> 'd" and bot::'a ("\<bottom>") begin
locale
Abortable_Linearizable_Modules
[ "Main", "Sequences" ]
Abortable_Linearizable_Modules/RDR.thy
pre_RDR
null
exec::"'a \<Rightarrow> ('b\<times>'c)list \<Rightarrow> 'a" (infix "\<star>" 65) where "exec s Nil = s" | "exec s (rs#r) = (exec s rs) \<bullet> r"
fun
Abortable_Linearizable_Modules
[ "Main", "Sequences" ]
Abortable_Linearizable_Modules/RDR.thy
exec
null
less_eq(infix "\<preceq>" 50) where "less_eq s s' \<equiv> \<exists> rs . s' = (s\<star>rs)"
definition
Abortable_Linearizable_Modules
[ "Main", "Sequences" ]
Abortable_Linearizable_Modules/RDR.thy
less_eq
null
less(infix "\<prec>" 50) where "less s s' \<equiv> less_eq s s' \<and> s \<noteq> s'"
definition
Abortable_Linearizable_Modules
[ "Main", "Sequences" ]
Abortable_Linearizable_Modules/RDR.thy
less
null
is_lbwhere "is_lb s s1 s2 \<equiv> s \<preceq> s2 \<and> s \<preceq> s1"
definition
Abortable_Linearizable_Modules
[ "Main", "Sequences" ]
Abortable_Linearizable_Modules/RDR.thy
is_lb
null
is_glbwhere "is_glb s s1 s2 \<equiv> is_lb s s1 s2 \<and> (\<forall> s' . is_lb s' s1 s2 \<longrightarrow> s' \<preceq> s)"
definition
Abortable_Linearizable_Modules
[ "Main", "Sequences" ]
Abortable_Linearizable_Modules/RDR.thy
is_glb
null
containswhere "contains s r \<equiv> \<exists> rs . r \<in> set rs \<and> s = (\<bottom> \<star> rs)"
definition
Abortable_Linearizable_Modules
[ "Main", "Sequences" ]
Abortable_Linearizable_Modules/RDR.thy
contains
null
inf(infix "\<sqinter>" 65) where "inf s1 s2 \<equiv> THE s . is_glb s s1 s2"
definition
Abortable_Linearizable_Modules
[ "Main", "Sequences" ]
Abortable_Linearizable_Modules/RDR.thy
inf
null
exec_cons: "s \<star> (rs # r)= (s \<star> rs) \<bullet> r" by simp
lemma
Abortable_Linearizable_Modules
[ "Main", "Sequences" ]
Abortable_Linearizable_Modules/RDR.thy
exec_cons
Useful Lemmas in the pre-RDR locale
exec_append: "(s \<star> rs) \<star> rs' = s \<star> (rs@rs')" proof (induct rs') show "(s \<star> rs) \<star> [] = s \<star> (rs@[])" by simp next fix rs' r assume ih:"(s \<star> rs) \<star> rs' = s \<star> (rs@rs')" thus "(s \<star> rs) \<star> (rs'#r) = s \<star> (rs @ (rs'#r))" by (metis append_Co...
lemma
Abortable_Linearizable_Modules
[ "Main", "Sequences" ]
Abortable_Linearizable_Modules/RDR.thy
exec_append
Useful Lemmas in the pre-RDR locale
trans: assumes "s1 \<preceq> s2" and "s2 \<preceq> s3" shows "s1 \<preceq> s3" using assms by (auto simp add:less_eq_def, metis exec_append)
lemma
Abortable_Linearizable_Modules
[ "Main", "Sequences" ]
Abortable_Linearizable_Modules/RDR.thy
trans
null
contains_star: fixes s r rs assumes "contains s r" shows "contains (s \<star> rs) r" proof (induct rs) case Nil show "contains (s \<star> []) r" using assms by auto next case (Cons r' rs) with this obtain rs' where 1:"s \<star> rs = \<bottom> \<star> rs'" and 2:"r \<in> set rs'" by (auto simp add:cont...
lemma
Abortable_Linearizable_Modules
[ "Main", "Sequences" ]
Abortable_Linearizable_Modules/RDR.thy
contains_star
null
preceq_star: "s \<star> (rs#r) \<preceq> s' \<Longrightarrow> s \<star> rs \<preceq> s'" by (metis pre_RDR.exec.simps(1) pre_RDR.exec.simps(2) pre_RDR.less_eq_def trans)
lemma
Abortable_Linearizable_Modules
[ "Main", "Sequences" ]
Abortable_Linearizable_Modules/RDR.thy
preceq_star
null
RDR= pre_RDR + assumes idem1:"contains s r \<Longrightarrow> s \<bullet> r = s" and idem2:"\<And> s r r' . fst r \<noteq> fst r' \<Longrightarrow> \<gamma> s r = \<gamma> ((s \<bullet> r) \<bullet> r') r" and antisym:"\<And> s1 s2 . s1 \<preceq> s2 \<and> s2 \<preceq> s1 \<Longrightarrow> s1 = s2" and glb_exist...
locale
Abortable_Linearizable_Modules
[ "Main", "Sequences" ]
Abortable_Linearizable_Modules/RDR.thy
RDR
The RDR locale
inf_glb:"is_glb (s1 \<sqinter> s2) s1 s2" proof - { fix s s' assume "is_glb s s1 s2" and "is_glb s' s1 s2" hence "s = s'" using antisym by (auto simp add:is_glb_def is_lb_def) } from this and glb_exists show ?thesis by (auto simp add:inf_def, metis (lifting) theI') qed sublocale ordering less_eq les...
lemma
Abortable_Linearizable_Modules
[ "Main", "Sequences" ]
Abortable_Linearizable_Modules/RDR.thy
inf_glb
null
idem_star: fixes r s rs assumes "contains s r" shows "s \<star> rs = s \<star> (filter (\<lambda> x . x \<noteq> r) rs)" proof (induct rs) case Nil show "s \<star> [] = s \<star> (filter (\<lambda> x . x \<noteq> r) [])" using assms by auto next case (Cons r' rs) have 1:"contains (s \<star> rs) r" using ass...
lemma
Abortable_Linearizable_Modules
[ "Main", "Sequences" ]
Abortable_Linearizable_Modules/RDR.thy
idem_star
Some useful lemmas
idem_star2: fixes s rs' shows "\<exists> rs' . s \<star> rs = s \<star> rs' \<and> set rs' \<subseteq> set rs \<and> (\<forall> r \<in> set rs' . \<not> contains s r)" proof (induct rs) case Nil thus "\<exists> rs' . s \<star> [] = s \<star> rs' \<and> set rs' \<subseteq> set [] \<and> (\<forall> r \<in...
lemma
Abortable_Linearizable_Modules
[ "Main", "Sequences" ]
Abortable_Linearizable_Modules/RDR.thy
idem_star2
null
idem2_star: assumes "contains s r" and "\<And> r' . r' \<in> set rs \<Longrightarrow> fst r' \<noteq> fst r" shows "\<gamma> s r = \<gamma> (s \<star> rs) r" using assms proof (induct rs) case Nil show "\<gamma> s r = \<gamma> (s \<star> []) r" by simp next case (Cons r' rs) thus "\<gamma> s r = \<gamma> (s \<s...
lemma
Abortable_Linearizable_Modules
[ "Main", "Sequences" ]
Abortable_Linearizable_Modules/RDR.thy
idem2_star
null
glb_common: fixes s1 s2 s rs1 rs2 assumes "s1 = s \<star> rs1" and "s2 = s \<star> rs2" shows "\<exists> rs . s1 \<sqinter> s2 = s \<star> rs \<and> set rs \<subseteq> set rs1 \<union> set rs2" proof - have 1:"s \<preceq> s1" and 2:"s \<preceq> s2" using assms by (auto simp add:less_eq_def) hence 3:"s \<preceq> s1 ...
lemma
Abortable_Linearizable_Modules
[ "Main", "Sequences" ]
Abortable_Linearizable_Modules/RDR.thy
glb_common
null
glb_common_set: fixes ss s0 rset assumes "finite ss" and "ss \<noteq> {}" and "\<And> s . s \<in> ss \<Longrightarrow> \<exists> rs . s = s0 \<star> rs \<and> set rs \<subseteq> rset" shows "\<exists> rs . \<Sqinter> ss = s0 \<star> rs \<and> set rs \<subseteq> rset" using assms proof (induct ss rule:finite_ne_induct)...
lemma
Abortable_Linearizable_Modules
[ "Main", "Sequences" ]
Abortable_Linearizable_Modules/RDR.thy
glb_common_set
null
Sequencesbegin
locale
Abortable_Linearizable_Modules
[ "Main" ]
Abortable_Linearizable_Modules/Sequences.thy
Sequences
Sequences as Lists
Append(infixl "#" 65) where "Append xs x \<equiv> Cons x xs" no_notation append (infixr "@" 65)
abbreviation
Abortable_Linearizable_Modules
[ "Main" ]
Abortable_Linearizable_Modules/Sequences.thy
Append
null
Concat(infixl "@" 65) where "Concat xs ys \<equiv> append ys xs"
abbreviation
Abortable_Linearizable_Modules
[ "Main" ]
Abortable_Linearizable_Modules/Sequences.thy
Concat
null
refineswhere "refines e s a t A f \<equiv> fst e = f s \<and> last_state e = f t \<and> is_exec_frag_of A e \<and> (let tr = trace (ioa.asig A) e in if a \<in> ext A then tr = [a] else tr = [])"
definition
Abortable_Linearizable_Modules
[ "IOA" ]
Abortable_Linearizable_Modules/Simulations.thy
refines
null
is_ref_map:: "('s1 \<Rightarrow> 's2) \<Rightarrow> ('s1,'a)ioa \<Rightarrow> ('s2,'a)ioa \<Rightarrow> bool" where "is_ref_map f B A \<equiv> (\<forall> s \<in> start B . f s \<in> start A) \<and> (\<forall> s t a. reachable B s \<and> s \<midarrow>a\<midarrow>B\<longrightarrow> t \<longrightarrow> (\<exis...
definition
Abortable_Linearizable_Modules
[ "IOA" ]
Abortable_Linearizable_Modules/Simulations.thy
is_ref_map
null
is_forward_sim:: "('s1 \<Rightarrow> ('s2 set)) \<Rightarrow> ('s1,'a)ioa \<Rightarrow> ('s2,'a)ioa \<Rightarrow> bool" where "is_forward_sim f B A \<equiv> (\<forall> s \<in> start B . f s \<inter> start A \<noteq> {}) \<and> (\<forall> s s' t a. s' \<in> f s \<and> s \<midarrow>a\<midarrow>B\<longrightarrow> ...
definition
Abortable_Linearizable_Modules
[ "IOA" ]
Abortable_Linearizable_Modules/Simulations.thy
is_forward_sim
null
is_backward_sim:: "('s1 \<Rightarrow> ('s2 set)) \<Rightarrow> ('s1,'a)ioa \<Rightarrow> ('s2,'a)ioa \<Rightarrow> bool" where "is_backward_sim f B A \<equiv> (\<forall> s . f s \<noteq> {}) \<comment> \<open>Quantifying over reachable states would suffice\<close> \<and> (\<forall> s \<in> start B . f s \<subse...
definition
Abortable_Linearizable_Modules
[ "IOA" ]
Abortable_Linearizable_Modules/Simulations.thy
is_backward_sim
null
step_eq_traces: fixes e_B' A e e_A' a t defines "e_A \<equiv> append_exec e_A' e" and "e_B \<equiv> cons_exec e_B' (a,t)" and "tr \<equiv> trace (ioa.asig A) e" assumes 1:"trace (ioa.asig A) e_A' = trace (ioa.asig A) e_B'" and 2:"if a \<in> ext A then tr = [a] else tr = []" shows "trace (ioa.asig A) e_A = t...
lemma
Abortable_Linearizable_Modules
[ "IOA" ]
Abortable_Linearizable_Modules/Simulations.thy
step_eq_traces
A series of lemmas that will be useful in the soundness proofs
exec_inc_imp_trace_inc: fixes A B assumes "ext B = ext A" and "\<And> e_B . is_exec_of B e_B \<Longrightarrow> \<exists> e_A . is_exec_of A e_A \<and> trace (ioa.asig A) e_A = trace (ioa.asig A) e_B" shows "traces B \<subseteq> traces A" proof - { fix t assume "t \<in> traces B" with this obtain e...
lemma
Abortable_Linearizable_Modules
[ "IOA" ]
Abortable_Linearizable_Modules/Simulations.thy
exec_inc_imp_trace_inc
null
ref_map_execs: fixes A::"('sA,'a)ioa" and B::"('sB,'a)ioa" and f::"'sB \<Rightarrow> 'sA" and e_B assumes "is_ref_map f B A" and "is_exec_of B e_B" shows "\<exists> e_A . is_exec_of A e_A \<and> trace (ioa.asig A) e_A = trace (ioa.asig A) e_B" proof - note assms(2) hence "\<exists> e_A . is_exec_of A e_...
lemma
Abortable_Linearizable_Modules
[ "IOA" ]
Abortable_Linearizable_Modules/Simulations.thy
ref_map_execs
Soundness of Refinement Mappings
ref_map_soundness: fixes A::"('sA,'a)ioa" and B::"('sB,'a)ioa" and f::"'sB \<Rightarrow> 'sA" assumes "is_ref_map f B A" and "ext A = ext B" shows "traces B \<subseteq> traces A" using assms ref_map_execs exec_inc_imp_trace_inc by metis
theorem
Abortable_Linearizable_Modules
[ "IOA" ]
Abortable_Linearizable_Modules/Simulations.thy
ref_map_soundness
null
forward_sim_execs: fixes A::"('sA,'a)ioa" and B::"('sB,'a)ioa" and f::"'sB \<Rightarrow> 'sA set" and e_B assumes "is_forward_sim f B A" and "is_exec_of B e_B" shows "\<exists> e_A . is_exec_of A e_A \<and> trace (ioa.asig A) e_A = trace (ioa.asig A) e_B" proof - note assms(2) hence "\<exists> e_A . is_...
lemma
Abortable_Linearizable_Modules
[ "IOA" ]
Abortable_Linearizable_Modules/Simulations.thy
forward_sim_execs
Soundness of Forward Simulations
forward_sim_soundness: fixes A::"('sA,'a)ioa" and B::"('sB,'a)ioa" and f::"'sB \<Rightarrow> 'sA set" assumes "is_forward_sim f B A" and "ext A = ext B" shows "traces B \<subseteq> traces A" using assms forward_sim_execs exec_inc_imp_trace_inc by metis
theorem
Abortable_Linearizable_Modules
[ "IOA" ]
Abortable_Linearizable_Modules/Simulations.thy
forward_sim_soundness
null
backward_sim_execs: fixes A::"('sA,'a)ioa" and B::"('sB,'a)ioa" and f::"'sB \<Rightarrow> 'sA set" and e_B assumes "is_backward_sim f B A" and "is_exec_of B e_B" shows "\<exists> e_A . is_exec_of A e_A \<and> trace (ioa.asig A) e_A = trace (ioa.asig A) e_B" proof - note assms(2) hence "\<forall> s \<in> ...
lemma
Abortable_Linearizable_Modules
[ "IOA" ]
Abortable_Linearizable_Modules/Simulations.thy
backward_sim_execs
Soundness of Backward Simulations
backward_sim_soundness: fixes A::"('sA,'a)ioa" and B::"('sB,'a)ioa" and f::"'sB \<Rightarrow> 'sA set" assumes "is_backward_sim f B A" and "ext A = ext B" shows "traces B \<subseteq> traces A" using assms backward_sim_execs exec_inc_imp_trace_inc by metis
theorem
Abortable_Linearizable_Modules
[ "IOA" ]
Abortable_Linearizable_Modules/Simulations.thy
backward_sim_soundness
null
SLin_status= Sleep | Pending | Ready | Aborted
datatype
Abortable_Linearizable_Modules
[ "IOA", "RDR" ]
Abortable_Linearizable_Modules/SLin.thy
SLin_status
null
SLin= RDR + IOA begin
locale
Abortable_Linearizable_Modules
[ "IOA", "RDR" ]
Abortable_Linearizable_Modules/SLin.thy
SLin
null
asig:: "nat \<Rightarrow> nat \<Rightarrow> ('a,'b,'c,'d)SLin_action signature" \<comment> \<open>The first instance has number 0\<close> where "asig i j \<equiv> \<lparr> inputs = {act . \<exists> p c iv i' . (i \<le> i' \<and> i' < j \<and> act = Invoke i' p c) \<or> (i > 0 \<and> act = Switch i p c i...
definition
Abortable_Linearizable_Modules
[ "IOA", "RDR" ]
Abortable_Linearizable_Modules/SLin.thy
asig
null
pendingReqs:: "('a,'b,'c)SLin_state \<Rightarrow> ('b\<times>'c) set" where "pendingReqs s \<equiv> {r . \<exists> p . r = pending s p \<and> status s p \<in> {Pending, Aborted}}"
definition
Abortable_Linearizable_Modules
[ "IOA", "RDR" ]
Abortable_Linearizable_Modules/SLin.thy
pendingReqs
null
Inv:: "'b \<Rightarrow> 'c \<Rightarrow> ('a,'b,'c)SLin_state \<Rightarrow> ('a,'b,'c)SLin_state \<Rightarrow> bool" where "Inv p c s s' \<equiv> status s p = Ready \<and> s' = s\<lparr>pending := (pending s)(p := (p,c)), status := (status s)(p := Pending)\<rparr>"
definition
Abortable_Linearizable_Modules
[ "IOA", "RDR" ]
Abortable_Linearizable_Modules/SLin.thy
Inv
null
pendingSeqswhere "pendingSeqs s \<equiv> {rs . set rs \<subseteq> pendingReqs s}"
definition
Abortable_Linearizable_Modules
[ "IOA", "RDR" ]
Abortable_Linearizable_Modules/SLin.thy
pendingSeqs
null
Lin:: "('a,'b,'c)SLin_state \<Rightarrow> ('a,'b,'c)SLin_state \<Rightarrow> bool" where "Lin s s' \<equiv> \<exists> rs \<in> pendingSeqs s . initialized s \<and> (\<forall> av \<in> abortVals s . (dstate s) \<star> rs \<preceq> av) \<and> s' = s\<lparr>dstate := (dstate s) \<star> rs\<rparr>"
definition
Abortable_Linearizable_Modules
[ "IOA", "RDR" ]
Abortable_Linearizable_Modules/SLin.thy
Lin
null
initSetswhere "initSets s \<equiv> {ivs . ivs \<noteq> {} \<and> ivs \<subseteq> initVals s}"
definition
Abortable_Linearizable_Modules
[ "IOA", "RDR" ]
Abortable_Linearizable_Modules/SLin.thy
initSets
null
safeInitswhere "safeInits s \<equiv> if initVals s = {} then {} else {d . \<exists> ivs \<in> initSets s . \<exists> rs \<in> pendingSeqs s . d = \<Sqinter>ivs \<star> rs \<and> (\<forall> av \<in> abortVals s . d \<preceq> av)}"
definition
Abortable_Linearizable_Modules
[ "IOA", "RDR" ]
Abortable_Linearizable_Modules/SLin.thy
safeInits
null
initAbortswhere "initAborts s \<equiv> { d .dstate s \<preceq> d \<and> ((\<exists> rs \<in> pendingSeqs s . d = dstate s \<star> rs) \<or> (\<exists> ivs \<in> initSets s . dstate s \<preceq> \<Sqinter>ivs \<and> (\<exists> rs \<in> pendingSeqs s . d = \<Sqinter>ivs \<star> rs))) }"
definition
Abortable_Linearizable_Modules
[ "IOA", "RDR" ]
Abortable_Linearizable_Modules/SLin.thy
initAborts
null
uninitAbortswhere "uninitAborts s \<equiv> { d . \<exists> ivs \<in> initSets s . \<exists> rs \<in> pendingSeqs s . d = \<Sqinter>ivs \<star> rs }"
definition
Abortable_Linearizable_Modules
[ "IOA", "RDR" ]
Abortable_Linearizable_Modules/SLin.thy
uninitAborts
null
safeAborts::"('a,'b,'c)SLin_state \<Rightarrow> 'a set" where "safeAborts s \<equiv> if initialized s then initAborts s else uninitAborts s"
definition
Abortable_Linearizable_Modules
[ "IOA", "RDR" ]
Abortable_Linearizable_Modules/SLin.thy
safeAborts
null
Reco:: "('a,'b,'c)SLin_state \<Rightarrow> ('a,'b,'c)SLin_state \<Rightarrow> bool" where "Reco s s' \<equiv> (\<exists> p . status s p \<noteq> Sleep) \<and> \<not> initialized s \<and> (\<exists> d \<in> safeInits s . s' = s\<lparr>dstate := d, initialized := True\<rparr>)"
definition
Abortable_Linearizable_Modules
[ "IOA", "RDR" ]
Abortable_Linearizable_Modules/SLin.thy
Reco
null
Resp:: "'b \<Rightarrow> 'd \<Rightarrow> ('a,'b,'c)SLin_state \<Rightarrow> ('a,'b,'c)SLin_state \<Rightarrow> bool" where "Resp p ou s s' \<equiv> status s p = Pending \<and> initialized s \<and> contains (dstate s) (pending s p) \<and> ou = \<gamma> (dstate s) (pending s p) \<and> s' ...
definition
Abortable_Linearizable_Modules
[ "IOA", "RDR" ]
Abortable_Linearizable_Modules/SLin.thy
Resp
null
Init:: "'b \<Rightarrow> 'c \<Rightarrow> 'a \<Rightarrow> ('a,'b,'c)SLin_state \<Rightarrow> ('a,'b,'c)SLin_state \<Rightarrow> bool" where "Init p c iv s s' \<equiv> status s p = Sleep \<and> s' = s \<lparr>initVals := {iv} \<union> (initVals s), status := (status s)(p := Pending), pending...
definition
Abortable_Linearizable_Modules
[ "IOA", "RDR" ]
Abortable_Linearizable_Modules/SLin.thy
Init
null
Abort:: "'b \<Rightarrow> 'c \<Rightarrow> 'a \<Rightarrow> ('a,'b,'c)SLin_state \<Rightarrow> ('a,'b,'c)SLin_state \<Rightarrow> bool" where "Abort p c av s s' \<equiv> status s p = Pending \<and> pending s p = (p,c) \<and> av \<in> safeAborts s \<and> s' = s\<lparr>status := (status s)(p := Aborted...
definition
Abortable_Linearizable_Modules
[ "IOA", "RDR" ]
Abortable_Linearizable_Modules/SLin.thy
Abort
null
transwhere "trans i j \<equiv> { (s,a,s') . case a of Invoke i' p c \<Rightarrow> i \<le> i' \<and> i < j \<and> Inv p c s s' | Response i' p ou \<Rightarrow> i \<le> i' \<and> i < j \<and> Resp p ou s s' | Switch i' p c v \<Rightarrow> (i > 0 \<and> i' = i \<and> Init p c v s s') \<or> (i' = j \<and> Abort p c v...
definition
Abortable_Linearizable_Modules
[ "IOA", "RDR" ]
Abortable_Linearizable_Modules/SLin.thy
trans
null
startwhere "start i \<equiv> { s . \<forall> p . status s p = (if i > 0 then Sleep else Ready) \<and> dstate s = \<bottom> \<and> (if i > 0 then \<not> initialized s else initialized s) \<and> initVals s = {} \<and> abortVals s = {}}"
definition
Abortable_Linearizable_Modules
[ "IOA", "RDR" ]
Abortable_Linearizable_Modules/SLin.thy
start
null
ioawhere "ioa i j \<equiv> \<lparr>ioa.asig = asig i j , start = start i, trans = trans i j\<rparr>"
definition
Abortable_Linearizable_Modules
[ "IOA", "RDR" ]
Abortable_Linearizable_Modules/SLin.thy
ioa
null
trancl_mono_set: "r \<subseteq> s \<Longrightarrow> r\<^sup>+ \<subseteq> s\<^sup>+" by (blast intro: trancl_mono)
lemma
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
trancl_mono_set
FIXME: move
relpow_mono: fixes r :: "'a rel" assumes "r \<subseteq> r'" shows "r ^^ n \<subseteq> r' ^^ n" using assms by (induct n) auto
lemma
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
relpow_mono
FIXME: move
refl_inv_image: "refl R \<Longrightarrow> refl (inv_image R f)" by (simp add: inv_image_def refl_on_def)
lemma
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
refl_inv_image
null
join:: "'a rel \<Rightarrow> 'a rel" ("(_\<^sup>\<down>)" [1000] 999) where "A\<^sup>\<down> = A\<^sup>* O (A\<inverse>)\<^sup>*"
definition
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
join
Definitions
meet:: "'a rel \<Rightarrow> 'a rel" ("(_\<^sup>\<up>)" [1000] 999) where "A\<^sup>\<up> = (A\<inverse>)\<^sup>* O A\<^sup>*"
definition
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
meet
null
symcl:: "'a rel \<Rightarrow> 'a rel" ("(_\<^sup>\<leftrightarrow>)" [1000] 999) where "A\<^sup>\<leftrightarrow> \<equiv> A \<union> A\<inverse>"
abbreviation
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
symcl
The \emph{symmetric closure} of a relation allows steps in both directions.
conversion:: "'a rel \<Rightarrow> 'a rel" ("(_\<^sup>\<leftrightarrow>\<^sup>*)" [1000] 999) where "A\<^sup>\<leftrightarrow>\<^sup>* = (A\<^sup>\<leftrightarrow>)\<^sup>*"
definition
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
conversion
The \emph{symmetric closure} of a relation allows steps in both directions. A \emph{conversion} is a (possibly empty) sequence of steps in the symmetric closure.
NF:: "'a rel \<Rightarrow> 'a set" where "NF A = {a. A `` {a} = {}}"
definition
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
NF
null
normalizability:: "'a rel \<Rightarrow> 'a rel" ("(_\<^sup>!)" [1000] 999) where "A\<^sup>! = {(a, b). (a, b) \<in> A\<^sup>* \<and> b \<in> NF A}" notation (ASCII) symcl ("(_^<->)" [1000] 999) and conversion ("(_^<->*)" [1000] 999) and normalizability ("(_^!)" [1000] 999)
definition
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
normalizability
null
symcl_converse: "(A\<^sup>\<leftrightarrow>)\<inverse> = A\<^sup>\<leftrightarrow>" by auto
lemma
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
symcl_converse
null
symcl_Un: "(A \<union> B)\<^sup>\<leftrightarrow> = A\<^sup>\<leftrightarrow> \<union> B\<^sup>\<leftrightarrow>" by auto
lemma
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
symcl_Un
null
no_step: assumes "A `` {a} = {}" shows "a \<in> NF A" using assms by (auto simp: NF_def)
lemma
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
no_step
null
joinI: "(a, c) \<in> A\<^sup>* \<Longrightarrow> (b, c) \<in> A\<^sup>* \<Longrightarrow> (a, b) \<in> A\<^sup>\<down>" by (auto simp: join_def rtrancl_converse)
lemma
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
joinI
null
joinI_left: "(a, b) \<in> A\<^sup>* \<Longrightarrow> (a, b) \<in> A\<^sup>\<down>" by (auto simp: join_def)
lemma
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
joinI_left
null
joinI_right: "(b, a) \<in> A\<^sup>* \<Longrightarrow> (a, b) \<in> A\<^sup>\<down>" by (rule joinI) auto
lemma
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
joinI_right
null
joinE: assumes "(a, b) \<in> A\<^sup>\<down>" obtains c where "(a, c) \<in> A\<^sup>*" and "(b, c) \<in> A\<^sup>*" using assms by (auto simp: join_def rtrancl_converse)
lemma
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
joinE
null
joinD: "(a, b) \<in> A\<^sup>\<down> \<Longrightarrow> \<exists>c. (a, c) \<in> A\<^sup>* \<and> (b, c) \<in> A\<^sup>*" by (blast elim: joinE)
lemma
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
joinD
null
meetI: "(a, b) \<in> A\<^sup>* \<Longrightarrow> (a, c) \<in> A\<^sup>* \<Longrightarrow> (b, c) \<in> A\<^sup>\<up>" by (auto simp: meet_def rtrancl_converse)
lemma
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
meetI
null
meetE: assumes "(b, c) \<in> A\<^sup>\<up>" obtains a where "(a, b) \<in> A\<^sup>*" and "(a, c) \<in> A\<^sup>*" using assms by (auto simp: meet_def rtrancl_converse)
lemma
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
meetE
null
meetD: "(b, c) \<in> A\<^sup>\<up> \<Longrightarrow> \<exists>a. (a, b) \<in> A\<^sup>* \<and> (a, c) \<in> A\<^sup>*" by (blast elim: meetE)
lemma
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
meetD
null
conversionI: "(a, b) \<in> (A\<^sup>\<leftrightarrow>)\<^sup>* \<Longrightarrow> (a, b) \<in> A\<^sup>\<leftrightarrow>\<^sup>*" by (simp add: conversion_def)
lemma
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
conversionI
null
conversion_refl[simp]: "(a, a) \<in> A\<^sup>\<leftrightarrow>\<^sup>*" by (simp add: conversion_def)
lemma
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
conversion_refl
null
conversionI': assumes "(a, b) \<in> A\<^sup>*" shows "(a, b) \<in> A\<^sup>\<leftrightarrow>\<^sup>*" using assms proof (induct) case base then show ?case by simp next case (step b c) then have "(b, c) \<in> A\<^sup>\<leftrightarrow>" by simp with \<open>(a, b) \<in> A\<^sup>\<leftrightarrow>\<^sup>*\<close> ...
lemma
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
conversionI'
null
rtrancl_comp_trancl_conv: "r\<^sup>* O r = r\<^sup>+" by regexp
lemma
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
rtrancl_comp_trancl_conv
(a, b) \<in> A\<^sup>\<leftrightarrow>\<^sup>*
trancl_o_refl_is_trancl: "r\<^sup>+ O r\<^sup>= = r\<^sup>+" by regexp
lemma
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
trancl_o_refl_is_trancl
null
conversionE: "(a, b) \<in> A\<^sup>\<leftrightarrow>\<^sup>* \<Longrightarrow> ((a, b) \<in> (A\<^sup>\<leftrightarrow>)\<^sup>* \<Longrightarrow> P) \<Longrightarrow> P" by (simp add: conversion_def)
lemma
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
conversionE
null
conversion_trans: "trans (A\<^sup>\<leftrightarrow>\<^sup>*)" unfolding trans_def proof (intro allI impI) fix a b c assume "(a, b) \<in> A\<^sup>\<leftrightarrow>\<^sup>*" and "(b, c) \<in> A\<^sup>\<leftrightarrow>\<^sup>*" then show "(a, c) \<in> A\<^sup>\<leftrightarrow>\<^sup>*" unfolding conversion_def p...
lemma
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
conversion_trans
null
conversion_sym: "sym (A\<^sup>\<leftrightarrow>\<^sup>*)" unfolding sym_def proof (intro allI impI) fix a b assume "(a, b) \<in> A\<^sup>\<leftrightarrow>\<^sup>*" then show "(b, a) \<in> A\<^sup>\<leftrightarrow>\<^sup>*" unfolding conversion_def proof (induct) case base then show ?case by simp next ...
lemma
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
conversion_sym
null
conversion_inv: "(x, y) \<in> R\<^sup>\<leftrightarrow>\<^sup>* \<longleftrightarrow> (y, x) \<in> R\<^sup>\<leftrightarrow>\<^sup>*" by (auto simp: conversion_def) (metis (full_types) rtrancl_converseD symcl_converse)+
lemma
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
conversion_inv
(c, b) \<in> A\<^sup>\<leftrightarrow>
conversion_converse[simp]: "(A\<^sup>\<leftrightarrow>\<^sup>*)\<inverse> = A\<^sup>\<leftrightarrow>\<^sup>*" by (metis conversion_sym sym_conv_converse_eq)
lemma
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
conversion_converse
null
conversion_rtrancl[simp]: "(A\<^sup>\<leftrightarrow>\<^sup>*)\<^sup>* = A\<^sup>\<leftrightarrow>\<^sup>*" by (metis conversion_def rtrancl_idemp)
lemma
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
conversion_rtrancl
null
rtrancl_join_join: assumes "(a, b) \<in> A\<^sup>*" and "(b, c) \<in> A\<^sup>\<down>" shows "(a, c) \<in> A\<^sup>\<down>" proof - from \<open>(b, c) \<in> A\<^sup>\<down>\<close> obtain b' where "(b, b') \<in> A\<^sup>*" and "(b', c) \<in> (A\<inverse>)\<^sup>*" unfolding join_def by blast with \<open>(a, b...
lemma
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
rtrancl_join_join
null
join_rtrancl_join: assumes "(a, b) \<in> A\<^sup>\<down>" and "(c, b) \<in> A\<^sup>*" shows "(a, c) \<in> A\<^sup>\<down>" proof - from \<open>(c, b) \<in> A\<^sup>*\<close> have "(b, c) \<in> (A\<inverse>)\<^sup>*" unfolding rtrancl_converse by simp from \<open>(a, b) \<in> A\<^sup>\<down>\<close> obtain a' whe...
lemma
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
join_rtrancl_join
(a, b) \<in> A\<^sup>* (b', c) \<in> (A\<inverse>)\<^sup>*
NF_I: "(\<And>b. (a, b) \<notin> A) \<Longrightarrow> a \<in> NF A" by (auto intro: no_step)
lemma
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
NF_I
(b, c) \<in> (A\<inverse>)\<^sup>* (a, a') \<in> A\<^sup>*
NF_E: "a \<in> NF A \<Longrightarrow> ((a, b) \<notin> A \<Longrightarrow> P) \<Longrightarrow> P" by (auto simp: NF_def) declare NF_I [intro] declare NF_E [elim]
lemma
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
NF_E
(a, a') \<in> A\<^sup>*
NF_no_step: "a \<in> NF A \<Longrightarrow> \<forall>b. (a, b) \<notin> A" by auto
lemma
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
NF_no_step
null
NF_anti_mono: assumes "A \<subseteq> B" shows "NF B \<subseteq> NF A" using assms by auto
lemma
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
NF_anti_mono
null
NF_iff_no_step: "a \<in> NF A = (\<forall>b. (a, b) \<notin> A)" by auto
lemma
Abstract-Rewriting
[ "HOL-Library.Infinite_Set", "Regular-Sets.Regexp_Method", "Seq" ]
Abstract-Rewriting/Abstract_Rewriting.thy
NF_iff_no_step
null