(** * Coq codes *)
(** ** Dependencies *)
Require Export RegExp.Utility.
Require Export RegExp.Definitions.
Require Export RegExp.Boolean.
(** ** [Cat] is morphism *)
Add Parametric Morphism : Cat with
signature re_eq ==> re_eq ==> re_eq as Cat_mor.
(** ** [Empty] *)
(** [Empty] corresponds to 0 in Kleene algebra. *)
(** ** [Cat] matches concatination of strings. *)
(** If [Cat] matches a string, the string can be divided into two strings which match the two [RegExp] respectively. *)
(** ** [Eps] *)
(** [Eps] corresponds to 1 in Kleene algebra. *)
(** ** [Cat] is associative. *)
(** ** [Cat] distributes to [Or]. *)

Lemma Cat_left_distr_s : forall s r r' r'',
(r ++ (r' || r'')) ~= s = ((r ++ r') || (r ++ r'')) ~= s.