(* Contribution to the Coq Library   V6.3 (July 1999)                       *)
(****************************************************************************)
(*                 The Calculus of Inductive Constructions                  *)
(*                                                                          *)
(*                                Projet Coq                                *)
(*                                                                          *)
(*                     INRIA                        ENS-CNRS                *)
(*              Rocquencourt                        Lyon                    *)
(*                                                                          *)
(*                                Coq V5.11                                 *)
(*                              Feb 2nd 1996                                *)
(*                                                                          *)
(*                (notations and layout updated March 2009)                 *)
(****************************************************************************)
(*                               Functions.v                                *)
(****************************************************************************)
(* This file is distributed under the terms of the                          *)
(* GNU Lesser General Public License Version 2.1                            *)
(****************************************************************************)
(****************************************************************************)
(** In contrast with the definition of functions in Relations_1, we         *)
(** consider, here, functions as binary relations                           *)
Section Functions.
Variable U : Type.
(****************************************************************************)
(** Characterization of a relation over two sets                            *)
Inductive Rel (U : Type) (A B : Ensemble U) (R : Relation U) : Prop :=
Rel_intro :
(forall x y : U, R x y -> In U A x) ->
(forall x y : U, R x y -> In U B y) -> Rel U A B R.
(****************************************************************************)
(**              Image of a set through a relation                          *)
Section Image.
Inductive Im (R : Relation U) (A : Ensemble U) (y : U) : Prop :=
Im_intro : forall x : U, R x y -> In U A x -> Im R A y.

Lemma Im_stable_par_incl :
forall (R : Relation U) (A1 A2 : Ensemble U),
Included U A1 A2 -> Included U (Im R A1) (Im R A2).