(* 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                                                     *)
(*****************************************************************************)
(*          Projet Coq - Calculus of Inductive Constructions V5.10           *)
(*****************************************************************************)
(*                                                                           *)
(*          Basic Category Theory: epic, monic, iso                          *)
(*                                                                           *)
(*          Amokrane Saibi,  May 1994                                        *)
(*                                                                           *)
(*****************************************************************************)
Require Export Dual.
Set Implicit Arguments.
Unset Strict Implicit.
Section epic_monic_def.
Variables (C : Category) (a b : C).
(* epic *)
Definition Epic_law (f : a --> b) :=
forall (c : C) (g h : b --> c), f o g =_S f o h -> g =_S h.
Structure > Epic : Type :=
{Epic_mor : a --> b; Prf_isEpic :> Epic_law Epic_mor}.
(* monic *)
Definition Monic_law (f : b --> a) :=
forall (c : C) (g h : c --> b), g o f =_S h o f -> g =_S h.
Structure > Monic : Type :=
{Monic_mor : b --> a; Prf_isMonic :> Monic_law Monic_mor}.
End epic_monic_def.
(* iso *)
Section iso_def.
Variable C : Category.
Definition RIso_law (a b : C) (f : a --> b) (f1 : b --> a) := f1 o f =_S Id b.
Variable a b : C.
Definition AreIsos (f : a --> b) (f1 : b --> a) :=
RIso_law f f1 /\ RIso_law f1 f.
Structure > Iso : Type :=
{Iso_mor : a --> b; Inv_iso : b --> a; Prf_Iso :> AreIsos Iso_mor Inv_iso}.

Lemma Inv_iso_unique :
forall f g : Iso, Iso_mor f =_S Iso_mor g -> Inv_iso f =_S Inv_iso g.