(* 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        *)
(*****************************************************************************)
(*									     *)
(*	                       Equalizers                		     *)
(*									     *)
(*****************************************************************************)
(*									     *)
(*                     A. SAIBI	  May 95                  		     *)
(*									     *)
(*****************************************************************************)
Require Export Equalizers.
Require Export PA.
Require Export Limit.
Set Implicit Arguments.
Unset Strict Implicit.
(* PA -> C *)
Section equalizer_limit_def.
Variables (C : Category) (a b : C) (I : Type) (k : I -> (a --> b)).
Definition FPA_ob (x : PA k) := match x with
| PA1 => a
| PA2 => b
end.
Definition FPA_mor (x y : PA k) (f : x --> y) :=
match f in (PA_mor _ x' y') return (Carrier (FPA_ob x' --> FPA_ob y')) with
| PA_I1 => Id a
| PA_I2 => Id b
| PA_f i => k i
end.

(* Specifications: *)
Lemma FPA_map_law : forall x y : PA_ob, Map_law (FPA_mor (x:=x) (y:=y)).
Canonical Structure FPA_map (x y : PA k) :=
Build_Map (FPA_map_law (x:=x) (y:=y)).
Lemma FPA_comp_law : Fcomp_law FPA_map.
Lemma FPA_id_law : Fid_law FPA_map.
Canonical Structure FPA := Build_Functor FPA_comp_law FPA_id_law.