Library Coqtail.Topology.TFunctions


Require Import Ensembles.
Require Import Topology.

Section Functions.

  Variable U V : Type.

  Inductive Image (X:Ensemble U) (f:UV) : Ensemble V :=
    Image_intro : x:U, In _ X x y:V, y = f xIn _ (Image X f) y.

  Inductive Preimage (Y:Ensemble V) (f:UV) : Ensemble U :=
    Inverse_Image_intro : y, In _ Y y x, y = f xIn _ (Preimage Y f) x.

  Definition function (A:Ensemble U) (B:Ensemble V) : (UV)->Prop :=
    fun f:UV a:U, In U A aIn V B (f a).

  Lemma Image_in_arrival_space : (A:Ensemble U) (B:Ensemble V) (f:UV),
      function A B fIncluded _ (Image A f) B.
  Proof.
  intros A B f funf y.
  intros yIm. induction yIm.
  rewrite H0.
  apply (funf x H).
  Qed.

End Functions.