Remark in_elements_between_1:
  forall r1 s q,
  EqSet.In q (EqSet.elements_between (select_reg_l r1) (select_reg_h r1) s) <-> EqSet.In q s /\ ereg q = r1.

(* Specifications: *)
Lemma in_subst_reg: forall r1 r2 q (e: eqs), EqSet.In q e -> ereg q = r1 /\ EqSet.In (Eq (ekind q) r2 (eloc q)) (subst_reg r1 r2 e) \/ ereg q <> r1 /\ EqSet.In q (subst_reg r1 r2 e).
Lemma in_subst_reg_kind: forall r1 k1 r2 k2 q (e: eqs), EqSet.In q e -> (ereg q, ekind q) = (r1, k1) /\ EqSet.In (Eq k2 r2 (eloc q)) (subst_reg_kind r1 k1 r2 k2 e) \/ EqSet.In q (subst_reg_kind r1 k1 r2 k2 e).