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

(* Specifications: *)
Lemma regs_inject:
forall f rs rs', regset_inject f rs rs' -> forall l, Val.inject_list f rs##l rs'##l.
Lemma set_reg_inject:
forall f rs rs' r v v',
regset_inject f rs rs' -> Val.inject f v v' ->
regset_inject f (rs#r <- v) (rs'#r <- v').
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').
Lemma regset_inject_incr:
forall f f' rs rs', regset_inject f rs rs' -> inject_incr f f' -> regset_inject f' rs rs'.
Lemma regset_undef_inject:
forall f, regset_inject f (Regmap.init Vundef) (Regmap.init Vundef).
Lemma init_regs_inject:
forall f args args', Val.inject_list f args args' ->
forall params,
regset_inject f (init_regs args params) (init_regs args' params).