mut_store_ins_mark_object_invL_def2: fixes m :: "'h" shows "mut_store_ins.mark_object_invL m = (\<lambda>s. (at (mutator m) mut_m.store_ins_mo_mark s \<longrightarrow> (\<exists>y. ref (s\<down> (mutator m)) = Some y) \<and> obj_at (\<lambda>obj. True) (the (ref (s\<down> (mutator m)))) s\<down>) \<and> (at (mutator m) mut_m.store_ins_mo_fM s \<longrightarrow> (\<exists>y. ref (s\<down> (mutator m)) = Some y) \<and> obj_at (\<lambda>obj. True) (the (ref (s\<down> (mutator m)))) s\<down> \<and> (ghost_hs_phase (s\<down> (mutator m)) \<noteq> hp_Idle \<longrightarrow> (\<exists>y. mark (s\<down> (mutator m)) = Some y) \<and> (obj_at (\<lambda>obj. Some (obj_mark obj) = mark (s\<down> (mutator m))) (the (ref (s\<down> (mutator m)))) s\<down> \<or> marked (the (ref (s\<down> (mutator m)))) s\<down>))) \<and> (at (mutator m) mut_m.store_ins_mo_mtest s \<longrightarrow> (\<exists>y. ref (s\<down> (mutator m)) = Some y) \<and> obj_at (\<lambda>obj. True) (the (ref (s\<down> (mutator m)))) s\<down> \<and> (ghost_hs_phase (s\<down> (mutator m)) \<noteq> hp_Idle \<longrightarrow> (\<exists>y. mark (s\<down> (mutator m)) = Some y) \<and> (obj_at (\<lambda>obj. Some (obj_mark obj) = mark (s\<down> (mutator m))) (the (ref (s\<down> (mutator m)))) s\<down> \<or> marked (the (ref (s\<down> (mutator m)))) s\<down>) \<and> fM (s\<down> (mutator m)) = sys_fM s\<down>)) \<and> (at (mutator m) mut_m.store_ins_mo_phase s \<longrightarrow> (\<exists>y. ref (s\<down> (mutator m)) = Some y) \<and> obj_at (\<lambda>obj. True) (the (ref (s\<down> (mutator m)))) s\<down> \<and> mark (s\<down> (mutator m)) \<noteq> Some (fM (s\<down> (mutator m))) \<and> (ghost_hs_phase (s\<down> (mutator m)) \<noteq> hp_Idle \<longrightarrow> (\<exists>y. mark (s\<down> (mutator m)) = Some y) \<and> (obj_at (\<lambda>obj. Some (obj_mark obj) = mark (s\<down> (mutator m))) (the (ref (s\<down> (mutator m)))) s\<down> \<or> marked (the (ref (s\<down> (mutator m)))) s\<down>) \<and> fM (s\<down> (mutator m)) = sys_fM s\<down>)) \<and> (at (mutator m) mut_m.store_ins_mo_ptest s \<longrightarrow> (\<exists>y. ref (s\<down> (mutator m)) = Some y) \<and> obj_at (\<lambda>obj. True) (the (ref (s\<down> (mutator m)))) s\<down> \<and> mark (s\<down> (mutator m)) \<noteq> Some (fM (s\<down> (mutator m))) \<and> (ghost_hs_phase (s\<down> (mutator m)) \<noteq> hp_Idle \<longrightarrow> (\<exists>y. mark (s\<down> (mutator m)) = Some y) \<and> (obj_at (\<lambda>obj. Some (obj_mark obj) = mark (s\<down> (mutator m))) (the (ref (s\<down> (mutator m)))) s\<down> \<or> marked (the (ref (s\<down> (mutator m)))) s\<down>) \<and> fM (s\<down> (mutator m)) = sys_fM s\<down>)) \<and> (at (mutator m) mut_m.store_ins_mo_co_lock s \<longrightarrow> (\<exists>y. ref (s\<down> (mutator m)) = Some y) \<and> obj_at (\<lambda>obj. True) (the (ref (s\<down> (mutator m)))) s\<down> \<and> (\<exists>y. mark (s\<down> (mutator m)) = Some y) \<and> (obj_at (\<lambda>obj. Some (obj_mark obj) = mark (s\<down> (mutator m))) (the (ref (s\<down> (mutator m)))) s\<down> \<or> marked (the (ref (s\<down> (mutator m)))) s\<down>) \<and> fM (s\<down> (mutator m)) = sys_fM s\<down> \<and> mark (s\<down> (mutator m)) \<noteq> Some (fM (s\<down> (mutator m))) \<and> filter is_mw_Mark (sys_mem_store_buffers (mutator m) s\<down>) = []) \<and> (at (mutator m) mut_m.store_ins_mo_co_cmark s \<longrightarrow> (\<exists>y. ref (s\<down> (mutator m)) = Some y) \<and> obj_at (\<lambda>obj. True) (the (ref (s\<down> (mutator m)))) s\<down> \<and> (\<exists>y. mark (s\<down> (mutator m)) = Some y) \<and> (obj_at (\<lambda>obj. Some (obj_mark obj) = mark (s\<down> (mutator m))) (the (ref (s\<down> (mutator m)))) s\<down> \<or> marked (the (ref (s\<down> (mutator m)))) s\<down>) \<and> fM (s\<down> (mutator m)) = sys_fM s\<down> \<and> mark (s\<down> (mutator m)) \<noteq> Some (fM (s\<down> (mutator m))) \<and> filter is_mw_Mark (sys_mem_store_buffers (mutator m) s\<down>) = []) \<and> (at (mutator m) mut_m.store_ins_mo_co_ctest s \<longrightarrow> (\<exists>y. ref (s\<down> (mutator m)) = Some y) \<and> obj_at (\<lambda>obj. True) (the (ref (s\<down> (mutator m)))) s\<down> \<and> (\<exists>y. mark (s\<down> (mutator m)) = Some y) \<and> (obj_at (\<lambda>obj. Some (obj_mark obj) = mark (s\<down> (mutator m))) (the (ref (s\<down> (mutator m)))) s\<down> \<or> marked (the (ref (s\<down> (mutator m)))) s\<down>) \<and> fM (s\<down> (mutator m)) = sys_fM s\<down> \<and> mark (s\<down> (mutator m)) \<noteq> Some (fM (s\<down> (mutator m))) \<and> obj_at (\<lambda>obj. Some (obj_mark obj) = cas_mark (s\<down> (mutator m))) (the (ref (s\<down> (mutator m)))) s\<down> \<and> filter is_mw_Mark (sys_mem_store_buffers (mutator m) s\<down>) = []) \<and> (at (mutator m) mut_m.store_ins_mo_co_mark s \<longrightarrow> cas_mark (s\<down> (mutator m)) = mark (s\<down> (mutator m)) \<and> (\<exists>y. ref (s\<down> (mutator m)) = Some y) \<and> obj_at (\<lambda>obj. True) (the (ref (s\<down> (mutator m)))) s\<down> \<and> fM (s\<down> (mutator m)) = sys_fM s\<down> \<and> white (the (ref (s\<down> (mutator m)))) s\<down> \<and> filter is_mw_Mark (sys_mem_store_buffers (mutator m) s\<down>) = []) \<and> (at (mutator m) mut_m.store_ins_mo_co_unlock s \<longrightarrow> (if cas_mark (s\<down> (mutator m)) = mark (s\<down> (mutator m)) then ghost_honorary_grey (s\<down> (mutator m)) = {(the \<circ> (\<lambda>s. ref (s (mutator m)))) s\<down>} else ghost_honorary_grey (s\<down> (mutator m)) = {}) \<and> (\<exists>y. ref (s\<down> (mutator m)) = Some y) \<and> obj_at (\<lambda>obj. True) (the (ref (s\<down> (mutator m)))) s\<down> \<and> fM (s\<down> (mutator m)) = sys_fM s\<down> \<and> ((cas_mark (s\<down> (mutator m)) = mark (s\<down> (mutator m)) \<longrightarrow> filter is_mw_Mark (sys_mem_store_buffers (mutator m) s\<down>) = []) \<longrightarrow> marked (the (ref (s\<down> (mutator m)))) s\<down>) \<and> (filter is_mw_Mark (sys_mem_store_buffers (mutator m) s\<down>) = [] \<or> filter is_mw_Mark (sys_mem_store_buffers (mutator m) s\<down>) = [mw_Mark (the (ref (s\<down> (mutator m)))) (fM (s\<down> (mutator m)))])) \<and> (at (mutator m) mut_m.store_ins_mo_co_won s \<longrightarrow> (if cas_mark (s\<down> (mutator m)) = mark (s\<down> (mutator m)) then ghost_honorary_grey (s\<down> (mutator m)) = {(the \<circ> (\<lambda>s. ref (s (mutator m)))) s\<down>} else ghost_honorary_grey (s\<down> (mutator m)) = {}) \<and> (\<exists>y. ref (s\<down> (mutator m)) = Some y) \<and> obj_at (\<lambda>obj. True) (the (ref (s\<down> (mutator m)))) s\<down> \<and> fM (s\<down> (mutator m)) = sys_fM s\<down> \<and> marked (the (ref (s\<down> (mutator m)))) s\<down> \<and> filter (\<lambda>s. is_mw_Mutate s \<or> is_mw_Mutate_Payload s) (sys_mem_store_buffers (mutator m) s\<down>) = []) \<and> (at (mutator m) mut_m.store_ins_mo_co_W s \<longrightarrow> ghost_honorary_grey (s\<down> (mutator m)) = {the (ref (s\<down> (mutator m)))} \<and> (\<exists>y. ref (s\<down> (mutator m)) = Some y) \<and> obj_at (\<lambda>obj. True) (the (ref (s\<down> (mutator m)))) s\<down> \<and> fM (s\<down> (mutator m)) = sys_fM s\<down> \<and> marked (the (ref (s\<down> (mutator m)))) s\<down> \<and> filter (\<lambda>s. is_mw_Mutate s \<or> is_mw_Mutate_Payload s) (sys_mem_store_buffers (mutator m) s\<down>) = []))"