Definition inject_memval (j:meminj) (v:memval): memval :=
match v with
Pointer b ofs n =>
match j b with
None => Undef
| Some(b',delta) => Pointer b' (Int.add ofs (Int.repr delta)) n
end
| _ => v
end.

Lemma inject_memval_memval_inject: forall j v v'
(IM: inject_memval j v = v') (U: v' <> Undef), memval_inject j v v'.