(** A compilation environment (mapping) is valid in a given state if
  the registers associated with Cminor local variables and let-bound variables
  are valid in the state. *)

Definition map_valid (m: mapping) (s: state) : Prop :=
  forall r, reg_in_map m r -> reg_valid r s.

Lemma new_reg_not_in_map: forall s1 s2 m r i, new_reg s1 = OK r s2 i -> map_valid m s1 -> ~(reg_in_map m r).