intros.
red in |- *.
apply subtype_prf.
Qed.
Hint Resolve in_part_subtype_elt: algebra.
(** - The setoid mechanism as defined in the algebra contribution makes for a 'layered' structure when dealing with subsets. Suppose $C\subset B\subset A$. This is translated as [A:Setoid; B:(part_set A); C:(part_set B)]. But obviously also $C\subset A$. Now [inject_subsets] injects a subset of B into the subsets of [A]  %\label{injectsubsets}% *)
Definition inject_subsets :
forall (A : Setoid) (B : part_set A), part_set B -> part_set A.
intros A B C.
apply
(Build_Predicate
(Pred_fun:=fun a : A =>
exists c : C, Equal a (subtype_elt (subtype_elt c)))).
red in |- *.
intros.
destruct H.
generalize dependent x0; intro c; intros.
exists c.
apply Trans with x; auto with algebra.
Defined.

(* Specifications: *)
Lemma inject_subsets_comp :
forall (A : Setoid) (B : part_set A) (C C' : part_set B),
Equal C C' -> Equal (inject_subsets C) (inject_subsets C').