(*+ Resource maps *)
(** Here, we avoid solving the indirection equation by abstracting over the desired properties, not worrying about step indexing to add predicates in the "memory" (i.e. the resource maps).  Note that it is also possible to instantiate the variable [lock] with a deep embedding of the desired resource invariants without cheating. *)
Variable lock : Set.
Definition val := (nat + lock)%type.
Definition map := nat -> option val.
Variable interp_lock : lock -> (map -> Prop).
Definition emptymap : map := fun _ => None.
Definition eqmap (m m' : map) := forall x, m x = m' x.

(* Specifications: *)
Lemma eqmap_eq m m' : eqmap m m' -> m = m'.
Instance eqmap_equiv : Equivalence eqmap.