Program Definition set_ghost (m : rmap) (g : ghost) (Hg : _) :=
proj1_sig (make_rmap (resource_at m) g (level m) _ Hg).
Next Obligation.
Fixpoint prog_vars' {F V} (l: list (ident * globdef F V)) : list (ident * globvar V) :=
match l with nil => nil | (i,Gvar v)::r => (i,v):: prog_vars' r | _::r => prog_vars' r
end.
Definition prog_vars {F} (p: program F) := prog_vars' (prog_defs p).
Definition no_locks phi :=
forall addr sh sh' z z' P,
phi @ addr <> YES sh sh' (LK z z') P.

(* Specifications: *)
Lemma make_tycontext_s_find_id i G : (make_tycontext_s G) ! i = find_id i G.
Definition cond_approx_eq n A P1 P2 :=
(forall ts,
fmap (dependent_type_functor_rec ts (AssertTT A)) (approx n) (approx n) (P1 ts) =
fmap (dependent_type_functor_rec ts (AssertTT A)) (approx n) (approx n) (P2 ts)).