(* 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        *)
(*****************************************************************************)
(*									     *)
(*            2nd definition (Equational) of Adjunctions       		     *)
(*									     *)
(*****************************************************************************)
(*									     *)
(*                     A. SAIBI	  May 95                  		     *)
(*									     *)
(*****************************************************************************)
Require Export IdCAT.
Require Export Adj_UA.
Set Implicit Arguments.
Unset Strict Implicit.
(* lois des NT: eta et epsilon *)
Section adj1_def.
Variables (C D : Category) (F : Functor D C) (G : Functor C D).
Section adj1_laws.
Variables (eta : NT (Id_CAT D) (F o_F G)) (eps : NT (G o_F F) (Id_CAT C)).
(* Rmq: on utilise idCAT, qui de'finit Id_CAT sans parler de Functor_Setoid. Evitant ainsi l'inconsistance des univers *)
Definition Adj1_law1 :=
forall c : C, eta (G c) o FMor G (eps c) =_S Id (G c).
Definition Adj1_law2 :=
forall d : D, FMor F (eta d) o eps (F d) =_S Id (F d).
End adj1_laws.
Structure Adj1 : Type :=
{A_eta : NT (Id_CAT D) (F o_F G);
A_eps : NT (G o_F F) (Id_CAT C);
Prf_Adj1_law1 : Adj1_law1 A_eta A_eps;
Prf_Adj1_law2 : Adj1_law2 A_eta A_eps}.
End adj1_def.
Section adj_to_adj1.
Variables (C D : Category) (F : Functor D C) (G : Functor C D) (ad : Adj F G).
(* *)
Definition Unit_tau (d : D) := UA_mor (Unit ad d).

(* Specifications: *)
Lemma Unit_nt_law : NT_law (F:=Id_CAT D) (G:=F o_F G) Unit_tau.
Canonical Structure Unit_NT := Build_NT Unit_nt_law.