summaryrefslogtreecommitdiff
path: root/theories/Classes/Functions.v
blob: 4c8449111f04126b54545a945d5e92f49bc7777f (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 11282 2008-07-28 11:51:53Z msozeau $ *)

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

Set Implicit Arguments.
Unset Strict Implicit.

Class Injective ((m : Morphism (A -> B) (RA ++> RB) f)) : 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 MonoMorphism (( m : Morphism (A -> B) (eqA ++> eqB) )) :=
  monic :> Injective m.

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

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

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