Section Part_set_greater.
Comments "A nice theorem:".
Variable E : Setoid.
Variable f : MAP E (part_set E).
Hypothesis fsurj : surjective f.
Let X_def (x : E) : Prop := ~ in_part x (f x).
Let X : part_set E.
apply (Build_Predicate (E:=E) (Pred_fun:=X_def)).
unfold X_def in |- *.
red in |- *.
unfold not in |- *.
intros x y H' H'0 H'1; try assumption.
apply H'.
apply in_part_comp_l with y; auto with algebra.
apply in_part_comp_r with (Ap f y); auto with algebra.
Defined.
Let invX : exists x : E, Equal X (f x).
exact (fsurj X).
Qed.

Lemma not_inpart_comp_r :
forall (E : Setoid) (x : E) (A B : part_set E),
~ in_part x A -> Equal A B -> ~ in_part x B.