(** * Coq codes *)
(** ** Dependencies *)
Require Export RegExp.Utility.
Require Export RegExp.Definitions.
Require Export RegExp.Boolean.
Require Export RegExp.Concat.
Require Export RegExp.Star.
(** ** Define [includes] *)
Definition includes (x y:RegExp) : Prop := (x || y) =R= y.
Notation "x <= y" := (includes x y) (at level 70).
Definition prop_eq (p q:Prop) : Prop := (p <-> q).
Add Parametric Morphism : includes with
signature re_eq ==> re_eq ==> prop_eq as includes_morphism.
(** [x || y] is the least upper bound of [x] and [y] *)
(** ** Monotonicity of [includes] *)
(** ** Axioms for [includes] *)
(** See also lemma [matches_Star_right] which is stronger lemma. *)
(** See also lemma [matches_Star_left] which is stronger lemma. *)

Theorem Star_eq_right : forall a b x, (b || (x ++ a)) <= x -> (b ++ (Star a)) <= x.