(* 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 resource_at_join2:
forall phi1 phi2 phi3,
level phi1 = level phi3 -> level phi2 = level phi3 ->
(forall loc, join (phi1@loc) (phi2@loc) (phi3@loc)) ->
join phi1 phi2 phi3.