(* 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           *)
(*****************************************************************************)
(*                                                                           *)
(*          Category Theory : Functors                                       *)
(*                                                                           *)
(*          Amokrane Saibi May 1994                                          *)
(*                                                                           *)
(*****************************************************************************)
Require Export Setoid_dup1.
Require Export Hom_Equality.
Set Implicit Arguments.
Unset Strict Implicit.
(* Functors *)
Section funct_def.
Variable C D : Category.
Section funct_laws.
Variables (FOb : C -> D)
(FMap : forall a b : C, Map (a --> b) (FOb a --> FOb b)).
Definition Fcomp_law :=
forall (a b c : C) (f : a --> b) (g : b --> c),
FMap a c (f o g) =_S FMap a b f o FMap b c g.
Definition Fid_law := forall a : C, FMap a a (Id a) =_S Id (FOb a).
End funct_laws.
Structure Functor : Type :=
{FOb :> C -> D;
FMap : forall a b : C, Map (a --> b) (FOb a --> FOb b);
Prf_Fcomp_law : Fcomp_law FMap;
Prf_Fid_law : Fid_law FMap}.
Definition FMor (F : Functor) (a b : C) (f : a --> b) := FMap F a b f.
(*** rewrite rules ***)

Lemma FPres :
forall (F : Functor) (a b : C) (f g : a --> b),
f =_S g -> FMor F f =_S FMor F g.