(** * Coq codes *)
(** ** Dependencies *)
Require Export RegExp.Utility.
Require Export RegExp.Definitions.
Require Export RegExp.Boolean.
Require Export RegExp.Concat.
Unset Standard Proposition Elimination Names.
(** ** Lemmas for Star *)

(* Specifications: *)
Lemma matches_Star_EmptyString : forall r, (Star r) ~== EmptyString.
Lemma matches_Star_r : forall s r, r ~== s -> (Star r) ~== s.
(** ** $ 1 + x x^{\ast} = x $ #1 + x x* = x# *)
Lemma matches_Star_right_s : forall s r,
(Star r) ~= s = (Eps || (r ++ Star r)) ~= s.
Lemma matches_Star_right : forall r, Star r =R= Eps || (r ++ Star r).
Lemma divide_Star_right : forall s r, (Star r) ~== s -> s <> ""%string ->
{s':string & {s'':string | s = (s' ++ s'')%string /\ s' <> ""%string /\
r ~== s' /\ (Star r) ~== s''}}.