(* some/none lemmas *)

(* Specifications: *)
Lemma umpleq_some x1 x2 t s :
valid x2 -> [pcm x1 <= x2] -> find t x1 = Some s -> find t x2 = Some s.
(* a weaker version of gen_domPtK, but legacy *)
Lemma domPt k v : dom (pts k v : U) =i [pred x | cond U k & k == x].
Lemma validPt k v : valid (pts k v : U) = cond U k.
Lemma findPt_inv k1 k2 v w :
find k1 (pts k2 v : U) = Some w -> [/\ k1 = k2, v = w & cond U k2].
Lemma freePt2 k1 k2 v :
cond U k2 ->
free k1 (pts k2 v : U) = if k1 == k2 then Unit else pts k2 v.
Lemma updPt k v1 v2 : upd k v1 (pts k v2) = pts k v1 :> U.
Lemma validUnPt k v f :
valid (f \+ pts k v) = [&& cond U k, valid f & k \notin dom f].
Lemma domUnPt k v f :
dom (f \+ pts k v) =i
[pred x | valid (f \+ pts k v) & (k == x) || (x \in dom f)].
Lemma findUnPt k v f :
valid (f \+ pts k v) -> find k (f \+ pts k v) = Some v.
Lemma findUnPt2 k1 k2 v f :
valid (f \+ pts k2 v) ->
find k1 (f \+ pts k2 v) =
if k1 == k2 then Some v else find k1 f.
Lemma freeUnPt2 k1 k2 v f :
valid (f \+ pts k2 v) ->
free k1 (f \+ pts k2 v) =
if k1 == k2 then f else free k1 f \+ pts k2 v.
Lemma updUnPt k v1 v2 f : upd k v1 (f \+ pts k v2) = f \+ pts k v1.
(* um_filter *)
Lemma umfiltPt p k v :
um_filter p (pts k v : U) =
if p k then pts k v else if cond U k then Unit else um_undef.