(** [env_equiv] is an equivalence relation between environments
  capturing the fact that two environments assign the same values to
  non-temporary registers, but can disagree on the values of temporary
  registers. *)

Definition env_equiv (e1 e2: env) : Prop :=
  forall r, is_not_temp r -> e1 r = e2 r.

Lemma transition_preserves_semantics: forall st st' e, transition st st' -> state_wf st -> env_equiv (statemove st' e) (statemove st e).