End BlockUpdate.
(*********************************************************************)
(* Freshness for even and odd locations -- used in information flow, *)
(* where heaps are split into low (even) and high (odd) parts.       *)
(*********************************************************************)
Definition low : pred ptr := fun x => 0 == nat_ptr x %[mod 2].
Definition high : pred ptr := fun x => 1 == nat_ptr x %[mod 2].
Definition get_lows h :=
if h is Def hs _ then filter low (supp hs) else [::].
Definition get_highs h :=
if h is Def hs _ then filter high (supp hs) else [::].
Definition ldom h : pred ptr := fun x => x \in get_lows h.
Definition hdom h : pred ptr := fun x => x \in get_highs h.

(* Specifications: *)
Lemma ldomP h x : x \in ldom h = (x \in dom h) && low x.
Lemma hdomP h x : x \in hdom h = (x \in dom h) && high x.
Lemma ldomK h1 h2 t1 t2 :
def (h1 :+ t1) -> def (h2 :+ t2) ->
ldom h1 =i ldom h2 ->
ldom (h1 :+ t1) =i ldom (h2 :+ t2) -> ldom t1 =i ldom t2.