(* This program is free software; you can redistribute it and/or      *)
(* modify it under the terms of the GNU Lesser General Public License *)
(* as published by the Free Software Foundation; either version 2.1   *)
(* of the License, or (at your option) any later version.             *)
(*                                                                    *)
(* This program is distributed in the hope that it will be useful,    *)
(* but WITHOUT ANY WARRANTY; without even the implied warranty of     *)
(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      *)
(* GNU General Public License for more details.                       *)
(*                                                                    *)
(* You should have received a copy of the GNU Lesser General Public   *)
(* License along with this program; if not, write to the Free         *)
(* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *)
(* 02110-1301 USA                                                     *)
Set Implicit Arguments.
Unset Strict Implicit.
Require Export Monoid_cat.
Require Export Sgroup_facts.
Require Export Monoid_facts.
Require Export Monoid_util.
Section Free_monoid_def.
Variable V : SET.
Inductive FM : Type :=
| Var : V -> FM
| Law : FM -> FM -> FM
| Unit : FM.
Inductive eqFM : FM -> FM -> Prop :=
| eqFM_Var : forall x y : V, Equal x y -> (eqFM (Var x) (Var y):Prop)
| eqFM_law :
forall x x' y y' : FM,
eqFM x x' -> eqFM y y' -> (eqFM (Law x y) (Law x' y'):Prop)
| eqFM_law_assoc :
forall x y z : FM, eqFM (Law (Law x y) z) (Law x (Law y z)):Prop
| eqFM_law0r : forall x : FM, eqFM (Law x Unit) x:Prop
| eqFM_law0l : forall x : FM, eqFM (Law Unit x) x:Prop
| eqFM_refl : forall x : FM, eqFM x x:Prop
| eqFM_sym : forall x y : FM, eqFM x y -> (eqFM y x:Prop)
| eqFM_trans : forall x y z : FM, eqFM x y -> eqFM y z -> (eqFM x z:Prop).
Hint Resolve eqFM_Var eqFM_law eqFM_law_assoc eqFM_law0r eqFM_law0l
eqFM_refl: algebra.
Hint Immediate eqFM_sym: algebra.

(* Specifications: *)
Lemma eqFM_Equiv : equivalence eqFM.
red in |- *.