(** ** [RegExp] as Setoid. *)
(** [re_eq] is an equivalence relation between [RegExp]. *)
Definition re_eq (re re':RegExp) : Prop := forall s, re ~= s = re' ~= s.
Notation "a =R= b" := (re_eq a b) (at level 70).

(* Specifications: *)
Lemma re_eq_refl : reflexive RegExp re_eq.
Lemma re_eq_sym : symmetric RegExp re_eq.
Lemma re_eq_trans : transitive RegExp re_eq.
Add Parametric Relation : RegExp re_eq
reflexivity proved by re_eq_refl
symmetry proved by re_eq_sym
transitivity proved by re_eq_trans
as RegExp_setoid.