summaryrefslogtreecommitdiff
path: root/theories/Classes/Functions.v
blob: 49fc4f892db3fc3fd7cd408abce66cea9c005155 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
(* -*- coq-prog-args: ("-emacs-U" "-nois") -*- *)
(************************************************************************)
(*  v      *   The Coq Proof Assistant  /  The Coq Development Team     *)
(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
(*   \VV/  **************************************************************)
(*    //   *      This file is distributed under the terms of the       *)
(*         *       GNU Lesser General Public License Version 2.1        *)
(************************************************************************)

(* Functional morphisms.
 
   Author: Matthieu Sozeau
   Institution: LRI, CNRS UMR 8623 - UniversitÃcopyright Paris Sud
   91405 Orsay, France *)

(* $Id: Functions.v 10739 2008-04-01 14:45:20Z herbelin $ *)

Require Import Coq.Classes.RelationClasses.
Require Import Coq.Classes.Morphisms.

Set Implicit Arguments.
Unset Strict Implicit.

Class [ m : Morphism (A -> B) (RA ++> RB) f ] => Injective : Prop :=
  injective : forall x y : A, RB (f x) (f y) -> RA x y.

Class [ m : Morphism (A -> B) (RA ++> RB) f ] => Surjective : Prop :=
  surjective : forall y, exists x : A, RB y (f x).

Definition Bijective [ m : Morphism (A -> B) (RA ++> RB) (f : A -> B) ] :=
  Injective m /\ Surjective m.

Class [ m : Morphism (A -> B) (eqA ++> eqB) ] => MonoMorphism :=
  monic :> Injective m.

Class [ m : Morphism (A -> B) (eqA ++> eqB) ] => EpiMorphism :=
  epic :> Surjective m.

Class [ m : Morphism (A -> B) (eqA ++> eqB) ] => IsoMorphism :=
  monomorphism :> MonoMorphism m ; epimorphism :> EpiMorphism m.

Class [ m : Morphism (A -> A) (eqA ++> eqA), ! IsoMorphism m ] => AutoMorphism.