(* 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 Group_util.
Section Free_group_def.
Variable V : SET.
Inductive FG : Type :=
| Var : V -> FG
| Law : FG -> FG -> FG
| Unit : FG
| Inv : FG -> FG.
Inductive eqFG : FG -> FG -> Prop :=
| eqFG_Var : forall x y : V, Equal x y -> (eqFG (Var x) (Var y):Prop)
| eqFG_law :
forall x x' y y' : FG,
eqFG x x' -> eqFG y y' -> (eqFG (Law x y) (Law x' y'):Prop)
| eqFG_law_assoc :
forall x y z : FG, eqFG (Law (Law x y) z) (Law x (Law y z)):Prop
| eqFG_law0r : forall x : FG, eqFG (Law x Unit) x:Prop
| eqFG_inv : forall x y : FG, eqFG x y -> eqFG (Inv x) (Inv y)
| eqFG_invr : forall x : FG, eqFG (Law x (Inv x)) Unit
| eqFG_refl : forall x : FG, eqFG x x:Prop
| eqFG_sym : forall x y : FG, eqFG x y -> (eqFG y x:Prop)
| eqFG_trans : forall x y z : FG, eqFG x y -> eqFG y z -> (eqFG x z:Prop).
Hint Resolve eqFG_Var eqFG_law eqFG_law_assoc eqFG_law0r eqFG_invr eqFG_refl:
algebra.
Hint Immediate eqFG_sym: algebra.

(* Specifications: *)
Lemma eqFG_Equiv : equivalence eqFG.
red in |- *.