Definition same_except_cur (m m' : Mem.mem) :=
  Mem.mem_contents m = Mem.mem_contents m' /\
  max_access_at m = max_access_at m' /\
  Mem.nextblock m = Mem.nextblock m'.

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).