(** ** Transitions preserve semantics *)

(** We define the semantics of states as follows.
  For a triple [mu, sigma, tau], we perform the moves [tau] in
  reverse sequential order, then the moves [mu ++ sigma] in parallel. *)

Definition statemove (st: state) (e: env) :=
  match st with
  | State mu sigma tau => exec_par (mu ++ sigma) (exec_seq_rev tau e)
  end.

Lemma exec_par_combine: forall e sl dl, List.length sl = List.length dl -> list_norepet dl -> let e' := exec_par (combine sl dl) e in List.map e' dl = List.map e sl /\ (forall l, ~In l dl -> e' l = e l).