Definition lock_inv : share -> val -> mpred -> mpred :=
fun sh v R =>
(EX b : block, EX ofs : _,
!!(v = Vptr b ofs) &&
LKspec LKSIZE
R sh (b, Ptrofs.unsigned ofs))%logic.
Definition rec_inv sh v (Q R: mpred): Prop :=
(R = Q * |>lock_inv sh v R)%logic.
Definition weak_rec_inv sh v (Q R: mpred): mpred :=
(! (R <=> Q * |>lock_inv sh v R))%pred.

Lemma lockinv_isptr sh v R : lock_inv sh v R = (!! isptr v && lock_inv sh v R)%logic.