(* 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        *)
(*****************************************************************************)
(*									     *)
(*	    Limits by Producys and equalizers              		     *)
(*									     *)
(*****************************************************************************)
(*									     *)
(*                        A.SAIBI         May 95			     *)
(*									     *)
(*****************************************************************************)
Require Export Equalizers1.
Require Export Products1.
Set Implicit Arguments.
Unset Strict Implicit.
Section thl.
Variables (C J : Category) (H1 : forall k : J -> C, Product1 k)
(H2 : forall k : Arrs J -> C, Product1 k)
(H3 : forall (a b : C) (f g : a --> b), Equalizer1_fg f g)
(F : Functor J C).
Let Limit2_fg (a b : C) (f g : a --> b) := Build_Equalizer2 (H3 f g) Elt1.
(* IIi Fi *)
Definition Thl_k_Fi (i : J) := F i.
Definition Thl_l_Fi := H1 Thl_k_Fi.
Definition Thl_PI_Fi := Pi1 Thl_l_Fi.
(* ||u F(codomu) *)
Definition Thl_k_Fu (u : Arrs J) := F (Codom u).
Definition Thl_l_Fu := H2 Thl_k_Fu.
Definition Thl_PI_Fu := Pi1 Thl_l_Fu.
(* qq u. fu : IIi Fi -> ku (= F(codomu)) *)
Definition Thl_fu (u : Arrs J) := Proj1 Thl_l_Fi (Codom u).
(* donc E! f : IIi Fi -> ||u F(codomu) tq ... *)
Definition Thl_f : Thl_PI_Fi --> Thl_PI_Fu := Pd1_diese Thl_l_Fu Thl_fu.

Lemma Thl_diag1 : forall u : Arrs J, Thl_fu u =_S Thl_f o Proj1 Thl_l_Fu u.
Definition Thl_gu (u : Arrs J) := Proj1 Thl_l_Fi (Dom u) o FMor F (Arrow u).