(* Lemma make_simple_rmap: forall n (f: AV.address -> resource) , AV.valid (fun l => res_option (f l)) -> (forall l, match f l with YES _ _ (SomeP _ _) => False | _ => True end) -> exists phi:rmap, level phi = n /\ resource_at phi = f. *)

Lemma resources_same_level:
forall f phi,
(forall l : AV.address, join_sub (f l) (phi @ l)) ->
resource_fmap (approx (level phi)) oo f = f.