(* Lemma isLKCT_rewrite r : (forall sh sh' z P, r <> YES sh sh' (LK z) P /\ r <> YES sh sh' (CT z) P) <-> ~isLK r /\ ~isCT r. *)
(* Lemma isLK_rewrite r : (forall (sh : Share.t) Psh (z : Z) (P : preds), r <> YES sh Psh (LK z) P) <-> ~ isLK r. *)

(* Specifications: *)
Lemma isLK_age_to n phi loc : isLK (age_to n phi @ loc) = isLK (phi @ loc).
(* Lemma isCT_age_to n phi loc : isCT (age_to n phi @ loc) = isCT (phi @ loc). *)
Lemma predat_inj {phi loc R1 R2} :
predat phi loc R1 ->
predat phi loc R2 ->
R1 = R2.
Lemma predat1 {phi loc} {R: mpred} {z sh psh} :
phi @ loc = YES sh psh (LK z 0) (SomeP rmaps.Mpred (fun _ => R)) ->
predat phi loc (approx (level phi) R).
Lemma predat2 {phi loc R sh } :
LKspec_ext R sh loc phi ->
predat phi loc (approx (level phi) R).
Lemma predat3 {phi loc R sh} :
LK_at R sh loc phi ->
predat phi loc (approx (level phi) R).
Lemma predat4 {phi b ofs sh R} :
app_pred (lock_inv sh (Vptr b ofs) R) phi ->
predat phi (b, Ptrofs.unsigned ofs) (approx (level phi) R).
Lemma predat5 {phi loc R} :
islock_pred R (phi @ loc) ->
predat phi loc R.
Lemma predat6 {R loc phi} : lkat R loc phi -> predat phi loc (approx (level phi) R).
Lemma predat_join_sub {phi1 phi2 loc R} :
join_sub phi1 phi2 ->
predat phi1 loc R ->
predat phi2 loc R.
Lemma lock_inv_at sh v R phi :
app_pred (lock_inv sh v R) phi ->
exists b ofs, v = Vptr b ofs /\ exists R, islock_pred R (phi @ (b, Ptrofs.unsigned ofs)).
Lemma lkat_hered R loc : hereditary age (lkat R loc).
End Machine.