Section AtVal.
Variable A : Type.
Implicit Type h : natmap (A * A).
Definition atval v t h := oapp snd v (find t h).
Definition last_val v h := atval v (last_key h) h.

Lemma lastval_freshUn v x h1 h2 :
valid h1 -> [pcm h2 <= h1] ->
last_val v (fresh h1 \-> x \+ h2) = x.2.