Definition nil_or_loc (v: val) := v=nil_val \/ exists l, val2loc v = Some l.

(* Specifications: *)
Lemma mk_heap_rawnext (h: heap) (x0: val) (x:loc) (y: val) : val2loc (x0) = Some x -> nil_or_loc y -> exists h', rawnext x y h' /\ comparable h h'.
Lemma rawnext_out : forall {x: loc} {x0: val} {x': loc} {y: val} {h: heap}, rawnext x y h -> val2loc x0 = Some x' -> x'<>x -> emp_at x' h.