intros.
simpl in |- *.
red in |- *.
split; intros.
simpl in H.
inversion_clear H.
destruct x0.
simpl in H0.
generalize dependent subtype_elt; intro b; intros.
apply in_part_comp_l with (subtype_elt b); auto with algebra.
simpl in |- *.
red in H.
set (b := Build_subtype H:B) in *.
assert (in_part b (full B)); simpl in |- *; auto.
red in H0.
exists (Build_subtype H0).
simpl in |- *.
auto with algebra.
Qed.
Hint Resolve inject_subsets_full_inv: algebra.
(** - Once we have [inject_subsets], we may need to view an element of [C] as an element of the injected subset: so, if [x:C] then [(inject_subsetsify x):(inject_subsets C)]  %\label{injectsubsetsify}% *)
Definition inject_subsetsify :
forall (A : Setoid) (B : part_set A) (C : part_set B),
C -> inject_subsets C.
intros A B C c.
set (c' := B (C c)) in *.
assert (exists c : C, Equal c' (subtype_elt (subtype_elt c))).
exists c.
unfold c' in |- *; simpl in |- *.
auto with algebra.
exists c'.
auto.
Defined.

(* Specifications: *)
Lemma inject_subsetsify_comp :
forall (A : Setoid) (B : part_set A) (C : part_set B) (c c' : C),
Equal c c' -> Equal (inject_subsetsify c) (inject_subsetsify c').