(* 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 Formel - Calculus of Inductive Constructions V5.10        *)
(*****************************************************************************)
(*									     *)
(*	                      Comma Category (x|G)            		     *)
(*									     *)
(*****************************************************************************)
(*									     *)
(*                     A. SAIBI	  May 95                  		     *)
(*									     *)
(*****************************************************************************)
Require Export Functor.
Set Implicit Arguments.
Unset Strict Implicit.
(* (x|G) *)
Section comma_def.
Variables (A X : Category) (G : Functor A X) (x : X).
Structure Com_ob : Type :=  {Ob_com_ob : A; Mor_com_ob : x --> G Ob_com_ob}.
Section com_arrow_def.
Variable axf bxg : Com_ob.
Definition Com_law (h : Ob_com_ob axf --> Ob_com_ob bxg) :=
Mor_com_ob bxg =_S Mor_com_ob axf o FMor G h.
Structure > Com_arrow : Type :=
{Mor_com_arrow : Ob_com_ob axf --> Ob_com_ob bxg;
Prf_com_law :> Com_law Mor_com_arrow}.
(*** rewrite rules ***)
(* *)
Definition Equal_com_arrow (h h' : Com_arrow) :=
Mor_com_arrow h =_S Mor_com_arrow h'.

(* Specifications: *)
Lemma Equal_com_arrow_equiv : Equivalence Equal_com_arrow.
Canonical Structure Com_arrow_setoid : Setoid := Equal_com_arrow_equiv.