Section Inclusion.
Variable E : Setoid.
Comments "The relation of belonging is compatible with equality:".
intros A; try assumption.
exact (Pred_compatible_prf (E:=E) (p:=A)).
Qed.
simpl in |- *; unfold eq_part in |- *.
intros x A B H' H'0; try assumption.
elim (H'0 x).
intuition.
Qed.
unfold not in |- *; auto with algebra.
Qed.
Hint Resolve empty_prop: algebra.
unfold full in |- *; simpl in |- *; auto with algebra.
Qed.
Hint Resolve full_prop: algebra.
Definition full_to_set : MAP (full E) E.
apply (Build_Map (Ap:=fun x : full E => full E x)).
red in |- *.
intros x y; try assumption.
elim x.
elim y.
simpl in |- *.
unfold subtype_image_equal in |- *.
simpl in |- *; auto with algebra.
Defined.
Definition set_to_full : MAP E (full E).
apply
(Build_Map (A:=E) (B:=full E)
(Ap:=fun x : E =>
Build_subtype (E:=E) (P:=full E) (subtype_elt:=x) (full_prop x))).
red in |- *.
simpl in |- *; auto with algebra.
Defined.
simpl in |- *; auto with algebra.
red in |- *.
simpl in |- *; auto with algebra.
Qed.
simpl in |- *; auto with algebra.
red in |- *.
simpl in |- *; auto with algebra.
intros x; try assumption.
elim x.
simpl in |- *; auto with algebra.
intros subtype_elt' subtype_prf'; red in |- *.
simpl in |- *; auto with algebra.
Qed.
Comments "The inclusion of parts:".
Definition included (A B : part_set E) : Prop :=
forall x : E, in_part x A -> in_part x B.
Comments "The relation of inclusion is an order relation:".
simpl in |- *; unfold included in |- *; auto with algebra.
Qed.
Hint Resolve included_refl: algebra.
simpl in |- *; unfold eq_part, included in |- *; auto with algebra.
Qed.

Lemma included_trans :
forall A B C : part_set E, included A B -> included B C -> included A C.