(* 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                                                     *)
Set Implicit Arguments.
Unset Strict Implicit.
Require Export Sets.
(** Title "Parts of a set" *)
Comments
"We define here the set of parts of a set, inclusion, union of a part,".
Comments
"and we prove that there is no surjection from a set in its part set".
Section Subtype.
Comments "In Coq type theory, there is no primitive notion of subtype".
Comments "Then we have to define such a notion".
Variable E : Setoid.
Variable F : Type.
Variable i : F -> E.
Comments "We have implicitely defined a subset of" E "which is the image of"
i ".".
Comments "As a setoid, this subset has" F
" as carrier, and we identify two elements of" F
"which have the same image by" i ":".
Definition subtype_image_equal (x y : F) : Prop := Equal (i x) (i y).

(* Specifications: *)
Lemma subtype_image_equiv : equivalence subtype_image_equal.
red in |- *.