(* 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        *)
(*****************************************************************************)
(*		                                 			     *)
(*	     The Special Adjoint Functor Theorem (Freyd's Theorem)	     *)
(*                  ( The suficient condition : First Proof )                *)
(*									     *)
(*****************************************************************************)
(*									     *)
(*                     A. SAIBI	  May 95                  		     *)
(*									     *)
(*****************************************************************************)
Require Export FSC_inc.
Require Export Comma_proj.
Require Export FAFT_SSC2.
Require Export Th_Adjoint.
Require Export Pres_Limits.
Require Export Pullbacks1.
Set Implicit Arguments.
Unset Strict Implicit.
(****************************************)
(*  CONDITION SUFFISANTE                *)
(*  1ere METHODE                        *)
(****************************************)
Section freyd_th_2.
Variables (A X : Category) (G : Functor A X) (A_c : Complete A)
(G_c : Continuous G) (s : forall x : X, SSC2 G x).
Section uaxG.
Variable x : X.
(* construction de la cate'gorie (x|G)I *)
Definition FT_I := SSC2_I (s x).
Definition FT_f (i : FT_I) := SSC2_f i.
Definition FT_a (i : FT_I) := SSC2_a i.
Canonical Structure FamI (i : FT_I) := Build_Com_ob (FT_f i).
Definition CommaI := FullSubCat FamI.
(* inclusion E : (x|G)I -> (x|G) *)
Definition FT_E := FSC_inc FamI.
(* projection Q : (x|G) -> A *)
Definition FT_Q := Comma_proj G x.
(* Soit une limite <lim EoQ, eps> de E o Q *)
Definition L_A := A_c (FT_E o_F FT_Q).
Definition Lim_EoQ := Lim L_A.
Definition FT_eps := Limiting_cone L_A.
(* G preserve cette Limite *)
Definition L_X := G_c L_A.
(* construisons tau : Diag(x) -> (FT_E o FT_Q) o G *)
Definition FT_tau_i (i : FT_I) := FT_f i.

(* Specifications: *)
Lemma FT_tau_cone_law : Cone_law (F:=(FT_E o_F FT_Q) o_F G) FT_tau_i.
Definition FT_tau := Build_Cone FT_tau_cone_law.