(** ** [Eps] *)
(** [Eps] corresponds to 1 in Kleene algebra. *)

(* Specifications: *)
Lemma Cat_left_id_s : forall s r, (Eps ++ r) ~= s = r ~= s.
Theorem Cat_left_id : forall r, Eps ++ r =R= r.
Lemma Cat_right_id_s : forall s r, (r ++ Eps) ~= s = r ~= s.
Theorem Cat_right_id : forall r, r ++ Eps =R= r.
(** ** [Cat] is associative. *)
Lemma matches_Cat_Cat_left : forall s s' s'' r r' r'',
r ~== s -> r' ~== s' -> r'' ~== s'' ->
((r ++ r') ++ r'') ~== ((s ++ s') ++ s'').
Lemma matches_Cat_Cat_right : forall s s' s'' r r' r'',
r ~== s -> r' ~== s' -> r'' ~== s'' ->
(r ++ (r' ++ r'')) ~== (s ++ (s' ++ s'')).
Lemma Cat_assoc_s : forall s r r' r'',
((r ++ r') ++ r'') ~= s = (r ++ (r' ++ r'')) ~= s.
Theorem Cat_assoc : forall r r' r'', (r ++ r') ++ r'' =R= r ++ (r' ++ r'').
(** ** [Cat] distributes to [Or]. *)
Lemma Cat_left_distr_s : forall s r r' r'',
(r ++ (r' || r'')) ~= s = ((r ++ r') || (r ++ r'')) ~= s.
Lemma Cat_left_distr : forall r r' r'',
(r ++ (r' || r'')) =R= ((r ++ r') || (r ++ r'')).
Lemma Cat_right_distr_s : forall s r r' r'',
((r || r') ++ r'') ~= s = ((r ++ r'') || (r' ++ r'')) ~= s.
Lemma Cat_right_distr : forall r r' r'',
((r || r') ++ r'') =R= ((r ++ r'') || (r' ++ r'')).