Definition only_blocks {S: block -> Prop} (S_dec: forall b, {S b}+{~S b}) (w: rmap) : rmap.
refine (proj1_sig (make_rmap (fun loc => if S_dec (fst loc) then w @ loc else core (w @ loc))
_ (level w) _ (ghost_of_approx w))).
Definition upto_block (b: block) (w: rmap) : rmap :=  only_blocks (fun b' => plt b' b) w.
Definition beyond_block (b: block) (w: rmap) : rmap := only_blocks (not_dec (fun b' => plt b' b)) w.

Lemma split_range:
forall phi base n,
(forall loc, adr_range base n loc ->
match phi @ loc with YES _ _ k _ => isVAL k | _ => True end) ->
noghost phi ->
exists phi1, exists phi2,
join phi1 phi2 phi /\
forall loc, if adr_range_dec base n loc then identity (phi2 @ loc)
else identity (phi1 @ loc).