(** Injections on registers *)

  Definition reg_ren f (r:PregEq.t) (rs rs' : regset) : Prop :=
    val_obs f (Pregmap.get r rs) (Pregmap.get r rs').Definition regset_ren f rs rs' : Prop :=
    forall r, reg_ren f r rs rs'.Definition core_inj f c c' :=
    match c, c' with State rs _, State rs' _ => regset_ren f rs rs' end.

Lemma after_external_wd : forall the_ge m (c c' : state) (f : memren) (ef : external_function) (args : seq val) (ov : option val) (Hat_external: semantics.at_external (Asm_core_sem the_ge) c m = Some (ef, args)) (Hcore_wd: core_wd f c) (Hvalid_list: valid_val_list f args) (Hafter_external: semantics.after_external (Asm_core_sem the_ge) ov c m = Some c') (Hov: match ov with | Some v => valid_val f v | None => True end), core_wd f c'.