mark_object_invL_def: fixes m :: "'h" shows "mut_m.mark_object_invL m = (\<lambda>s. (atS (mutator m) mut_m.hs_get_roots_loop_locs s \<longrightarrow> refs (s\<down> (mutator m)) \<subseteq> roots (s\<down> (mutator m)) \<and> (\<forall>x. x \<in> roots (s\<down> (mutator m)) - refs (s\<down> (mutator m)) \<longrightarrow> marked x s\<down>)) \<and> (atS (mutator m) mut_m.hs_get_roots_loop_mo_locs s \<longrightarrow> ref (s\<down> (mutator m)) \<noteq> None \<and> (the \<circ> (\<lambda>s. ref (s (mutator m)))) s\<down> \<in> roots (s\<down> (mutator m))) \<and> (at (mutator m) mut_m.hs_get_roots_loop_done s \<longrightarrow> marked ((the \<circ> (\<lambda>s. ref (s (mutator m)))) s\<down>) s\<down>) \<and> (at (mutator m) mut_m.hs_get_roots_loop_mo_ptest s \<longrightarrow> phase (s\<down> (mutator m)) \<noteq> ph_Idle) \<and> (at (mutator m) mut_m.hs_get_roots_done s \<longrightarrow> (\<forall>x. x \<in> roots (s\<down> (mutator m)) \<longrightarrow> marked x s\<down>)) \<and> (atS (mutator m) mut_m.mo_valid_ref_locs s \<longrightarrow> (new_ref (s\<down> (mutator m)) \<noteq> None \<longrightarrow> (the \<circ> (\<lambda>s. new_ref (s (mutator m)))) s\<down> \<in> roots (s\<down> (mutator m))) \<and> tmp_ref (s\<down> (mutator m)) \<in> roots (s\<down> (mutator m))) \<and> (at (mutator m) mut_m.store_del_mo_null s \<longrightarrow> ref (s\<down> (mutator m)) \<noteq> None \<longrightarrow> (the \<circ> (\<lambda>s. ref (s (mutator m)))) s\<down> \<in> ghost_honorary_root (s\<down> (mutator m))) \<and> (atS (mutator m) mut_m.ghost_honorary_root_nonempty_locs s \<longrightarrow> (the \<circ> (\<lambda>s. ref (s (mutator m)))) s\<down> \<in> ghost_honorary_root (s\<down> (mutator m))) \<and> (atS (mutator m) mut_m.not_idle_locs s \<longrightarrow> phase (s\<down> (mutator m)) \<noteq> ph_Idle \<longrightarrow> ghost_hs_phase (s\<down> (mutator m)) \<noteq> hp_Idle) \<and> (atS (mutator m) mut_m.hs_not_hp_Idle_locs s \<longrightarrow> ghost_hs_phase (s\<down> (mutator m)) \<noteq> hp_Idle) \<and> (atS (mutator m) mut_m.mo_ptest_locs s \<longrightarrow> phase (s\<down> (mutator m)) = ph_Idle \<longrightarrow> ghost_hs_phase (s\<down> (mutator m)) \<in> {hp_Idle, hp_IdleInit} \<or> ghost_hs_phase (s\<down> (mutator m)) = hp_IdleMarkSweep \<and> sys_phase s\<down> = ph_Idle) \<and> (atS (mutator m) mut_m.ghost_honorary_grey_empty_locs s \<longrightarrow> ghost_honorary_grey (s\<down> (mutator m)) = {}) \<and> (at (mutator m) mut_m.store_ins s \<longrightarrow> (ghost_hs_phase (s\<down> (mutator m)) \<in> {hp_InitMark, hp_Mark} \<or> ghost_hs_phase (s\<down> (mutator m)) = hp_IdleMarkSweep \<and> sys_phase s\<down> \<noteq> ph_Idle) \<and> new_ref (s\<down> (mutator m)) \<noteq> None \<longrightarrow> marked ((the \<circ> (\<lambda>s. new_ref (s (mutator m)))) s\<down>) s\<down>) \<and> (atS (mutator m) mut_m.ins_barrier_locs s \<longrightarrow> ((ghost_hs_phase (s\<down> (mutator m)) = hp_Mark \<or> ghost_hs_phase (s\<down> (mutator m)) = hp_IdleMarkSweep \<and> sys_phase s\<down> \<noteq> ph_Idle) \<and> (\<forall>opt_r'. mw_Mutate (tmp_ref (s\<down> (mutator m))) (field (s\<down> (mutator m))) opt_r' \<notin> set (sys_mem_store_buffers (mutator m) s\<down>)) \<longrightarrow> obj_at_field_on_heap (\<lambda>r'. marked r' s\<down>) (tmp_ref (s\<down> (mutator m))) (field (s\<down> (mutator m))) s\<down>) \<and> ref (s\<down> (mutator m)) = new_ref (s\<down> (mutator m))) \<and> (atS (mutator m) mut_m.del_barrier1_locs s \<longrightarrow> (ghost_hs_phase (s\<down> (mutator m)) = hp_Mark \<or> ghost_hs_phase (s\<down> (mutator m)) = hp_IdleMarkSweep \<and> sys_phase s\<down> \<noteq> ph_Idle) \<and> (\<forall>opt_r'. mw_Mutate (tmp_ref (s\<down> (mutator m))) (field (s\<down> (mutator m))) opt_r' \<notin> set (sys_mem_store_buffers (mutator m) s\<down>)) \<longrightarrow> obj_at_field_on_heap (\<lambda>r. ref (s\<down> (mutator m)) = Some r \<or> marked r s\<down>) (tmp_ref (s\<down> (mutator m))) (field (s\<down> (mutator m))) s\<down>) \<and> (at (mutator m) mut_m.lop_store_ins s \<longrightarrow> (ghost_hs_phase (s\<down> (mutator m)) = hp_Mark \<or> ghost_hs_phase (s\<down> (mutator m)) = hp_IdleMarkSweep \<and> sys_phase s\<down> \<noteq> ph_Idle) \<and> ref (s\<down> (mutator m)) \<noteq> None \<longrightarrow> marked ((the \<circ> (\<lambda>s. ref (s (mutator m)))) s\<down>) s\<down>) \<and> (at (mutator m) mut_m.mut_load s \<longrightarrow> tmp_ref (s\<down> (mutator m)) \<in> roots (s\<down> (mutator m))) \<and> (atS (mutator m) mut_m.ghost_honorary_root_empty_locs s \<longrightarrow> ghost_honorary_root (s\<down> (mutator m)) = {}))"