Local Arguments getThreadR {_} {_} {_} _ _ _.
Local Arguments getThreadC {_} {_} {_} _ _ _.
Local Arguments personal_mem : clear implicits.
Local Arguments updThread {_} {_} {_} _ _ _ _ _.
Local Arguments updThreadR {_} {_} {_} _ _ _ _.
Local Arguments updThreadC {_} {_} {_} _ _ _ _.
Local Arguments juicyRestrict : clear implicits.
Set Bullet Behavior "Strict Subproofs".

(* Specifications: *)
Lemma rmap_bound_join {b phi1 phi2 phi3} :
join phi1 phi2 phi3 ->
rmap_bound b phi3 ->
rmap_bound b phi2.
Lemma resource_fmap_YES_inv f g r sh rsh k pp :
resource_fmap f g r = YES sh rsh k pp ->
exists pp', r = YES sh rsh k pp' /\ pp = preds_fmap f g pp'.
Lemma resource_fmap_PURE_inv f g r k pp :
resource_fmap f g r = PURE k pp ->
exists pp', r = PURE k pp' /\ pp = preds_fmap f g pp'.
Lemma resource_fmap_NO_inv f g r sh nsh :
resource_fmap f g r = NO sh nsh ->
r = NO sh nsh.
Lemma isSome_option_map {A B} (f : A -> B) o : ssrbool.isSome (option_map f o) = ssrbool.isSome o.
Lemma cl_step_mem_step ge c m c' m' : cl_step ge c m c' m' -> mem_step m m'.
Lemma mem_step_contents_at_None m m' loc :
Mem.valid_block m (fst loc) ->
mem_step m m' ->
access_at m loc Cur = None ->
contents_at m' loc = contents_at m loc.
Lemma mem_step_contents_at_Nonempty m m' loc :
Mem.valid_block m (fst loc) ->
mem_step m m' ->
access_at m loc Cur = Some Nonempty ->
contents_at m' loc = contents_at m loc.
Lemma perm_of_res_resource_fmap f g r :
perm_of_res (resource_fmap f g r) = perm_of_res r.
Lemma resource_fmap_join f g r1 r2 r3 :
join r1 r2 r3 ->
join (resource_fmap f g r1) (resource_fmap f g r2) (resource_fmap f g r3).
Lemma juicy_mem_perm_of_res_Max jm loc :
perm_order'' (max_access_at (m_dry jm) loc) (perm_of_res (m_phi jm @ loc)).
Lemma decay_rewrite m m' :
decay m m' <->
forall loc,
(~valid_block m (fst loc) ->
valid_block m' (fst loc) ->
(forall k, access_at m' loc k = Some Freeable) \/
(forall k, access_at m' loc k = None))
/\ (valid_block m (fst loc) ->
(forall k, (access_at m loc k = Some Freeable /\ access_at m' loc k = None)) \/
(forall k, access_at m loc k = access_at m' loc k)).
Lemma valid_block0 m b : ~valid_block m b <-> (b >= nextblock m)%positive.
Lemma valid_block1 m b : valid_block m b <-> (b < nextblock m)%positive.
Lemma not_Pge_Plt a b : ~ Pge a b -> Plt a b.
(*Lemma mem_cohere_age_to_inv n m phi : mem_cohere' m (age_to n phi) -> mem_cohere' m phi.  Lemma mem_cohere_step c c' jm jm' Phi (X : rmap) ge : mem_cohere' (m_dry jm) Phi -> sepalg.join (m_phi jm) X Phi -> corestep (juicy_core_sem (cl_core_sem ge)) c jm c' jm' -> exists Phi', sepalg.join (m_phi jm') (age_to (level (m_phi jm')) X) Phi' /\ mem_cohere' (m_dry jm') Phi'.  (** About lock_coherence *)
Lemma lock_coherence_age_to lset Phi m n :
lock_coherence lset Phi m ->
lock_coherence (AMap.map (option_map (age_to n)) lset) Phi m.