(* the inheritance from PCMs *)

Definition heapUMCMix := 
  UMCMixin ftE tfE defE undefE emptyE updE domE dom_eqE freeE
           findE unionE umfiltE empbE undefbE ptsE.Canonical heapUMC := Eval hnf in UMC heap heapUMCMix.Definition heapPCMMix := union_map_classPCMMix heapUMC.Canonical heapPCM := Eval hnf in PCM heap heapPCMMix.Definition heapCPCMMix := union_map_classCPCMMix heapUMC.Canonical heapCPCM := Eval hnf in CPCM heap heapCPCMMix.Definition heapTPCMMix := union_map_classTPCMMix heapUMC.Canonical heapTPCM := Eval hnf in TPCM heap heapTPCMMix.Notation heap := Heap.heap.Definition heap_pts A (x : ptr) (v : A) := 
  @UMC.pts _ _ heapUMC x (idyn v).Notation "x :-> v" := (@heap_pts _ x v) (at level 30).Implicit Types (x : ptr) (h : heap).Definition pick (h : heap) := 
  if h is Heap.Def hs _ then head null (supp hs) else null.

(* Specifications: *)
Lemma path_filter (A : ordType) (s : seq A) (p : pred A) x : path ord x s -> path ord x (filter p s).
Lemma pickP h : valid h && ~~ empb h = (pick h \in dom h).
Lemma updi_inv x xs1 xs2 : valid (updi x xs1) -> updi x xs1 = updi x xs2 -> xs1 = xs2.
Lemma domeqUP A1 A2 x (xs1 : seq A1) (xs2 : seq A2) : size xs1 = size xs2 -> dom_eq (updi x xs1) (updi x xs2).