(* 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.
Require Export Abelian_group_facts.
Section Free_abelian_group_def.
Variable V : SET.
Inductive FaG : Type :=
| Var : V -> FaG
| Law : FaG -> FaG -> FaG
| Unit : FaG
| Inv : FaG -> FaG.
Inductive eqFaG : FaG -> FaG -> Prop :=
| eqFaG_Var : forall x y : V, Equal x y -> (eqFaG (Var x) (Var y):Prop)
| eqFaG_law :
forall x x' y y' : FaG,
eqFaG x x' -> eqFaG y y' -> (eqFaG (Law x y) (Law x' y'):Prop)
| eqFaG_law_assoc :
forall x y z : FaG, eqFaG (Law (Law x y) z) (Law x (Law y z)):Prop
| eqFaG_law0r : forall x : FaG, eqFaG (Law x Unit) x:Prop
| eqFaG_inv : forall x y : FaG, eqFaG x y -> eqFaG (Inv x) (Inv y)
| eqFaG_invr : forall x : FaG, eqFaG (Law x (Inv x)) Unit
| eqFaG_refl : forall x : FaG, eqFaG x x:Prop
| eqFaG_sym : forall x y : FaG, eqFaG x y -> (eqFaG y x:Prop)
| eqFaG_trans :
forall x y z : FaG, eqFaG x y -> eqFaG y z -> (eqFaG x z:Prop)
| eqFaG_com : forall x y : FaG, eqFaG (Law x y) (Law y x).
Hint Resolve eqFaG_Var eqFaG_law eqFaG_law_assoc eqFaG_law0r eqFaG_invr
eqFaG_refl eqFaG_com: algebra.
Hint Immediate eqFaG_sym: algebra.

(* Specifications: *)
Lemma eqFaG_Equiv : equivalence eqFaG.
red in |- *.