Local Open Scope nat_scope.
(** * Results related to machine predicates *)
(* Instantiation of modules *)
Section Machine.
Context (ge : genv).

(* Specifications: *)
Lemma fst_snd0: forall loc: address,
(fst loc, (snd loc + 0)%Z) = loc.
Lemma same_locks_juicyLocks_in_lockSet phi phi' lset :
same_locks phi phi' ->
juicyLocks_in_lockSet lset phi ->
juicyLocks_in_lockSet lset phi'.
Lemma lockSet_Writable_lockSet_block_bound m lset  :
lockSet_Writable lset m ->
lockSet_block_bound lset (Mem.nextblock m).
Lemma join_all_age_updThread_level (tp : jstate ge) i (cnti : ThreadPool.containsThread tp i) c phi Phi :
join_all (age_tp_to (level phi) (ThreadPool.updThread cnti c phi)) Phi ->
level Phi = level phi.
Lemma join_all_level_lset (tp : jstate ge) Phi l phi :
join_all tp Phi ->
AMap.find l (lset tp) = Some (Some phi) ->
level phi = level Phi.
Lemma lset_range_perm m (tp : jstate ge) b ofs
(compat : mem_compatible tp m)
(Efind : AMap.find (elt:=option rmap) (b, ofs) (lset tp) <> None) :
Mem.range_perm
(restrPermMap (mem_compatible_locks_ltwritable compat))
b ofs (ofs + LKSIZE) Cur Writable.
Lemma age_to_updThread i (tp : jstate ge) n c phi cnti cnti' :
age_tp_to n (@updThread _ _ _ i tp cnti c phi) =
@updThread _ _ _ i (age_tp_to n tp) cnti' c (age_to n phi).
Lemma lset_age_tp_to n (tp : jstate ge) :
lset (age_tp_to n tp) = AMap.map (option_map (age_to n)) (lset tp).
Lemma getThreadC_fun i (tp : jstate ge) cnti cnti' x y :
@getThreadC _ _ _ i tp cnti = x ->
@getThreadC _ _ _ i tp cnti' = y ->
x = y.
Lemma getThreadR_fun i (tp : jstate ge) cnti cnti' x y :
@getThreadR _ _ _ i tp cnti = x ->
@getThreadR _ _ _ i tp cnti' = y ->
x = y.
Lemma lockSet_Writable_age n (tp : jstate ge) m :
lockSet_Writable (lset tp) m ->
lockSet_Writable (lset (age_tp_to n tp)) m.
Lemma lockSet_age_to n (tp : jstate ge) :
lockSet (age_tp_to n tp) = lockSet tp.
Lemma juicyLocks_in_lockSet_age n (tp : jstate ge) phi :
juicyLocks_in_lockSet (lset tp) phi ->
juicyLocks_in_lockSet (lset (age_tp_to n tp)) (age_to n phi).
Lemma lockSet_in_juicyLocks_age n (tp : jstate ge) phi :
lockSet_in_juicyLocks (lset tp) phi ->
lockSet_in_juicyLocks (lset (age_tp_to n tp)) (age_to n phi).