(** Semantic preservation *)
Definition regset_inject (f: meminj) (rs rs': regset): Prop :=
forall r, Val.inject f rs#r rs'#r.

Lemma set_res_inject:
forall f rs rs' res v v',
regset_inject f rs rs' -> Val.inject f v v' ->
regset_inject f (regmap_setres res v rs) (regmap_setres res v' rs').