Section split_Epic_Monic_Factorization.
Context {A B : Type} (f : A → B).
Definition Image_of : Type := {x : B | ∃ a, f a = x}.
Definition From_Image_forward : Image_of → B := fun x => proj1_sig x.
Program Definition Epic_Monic_Factor_Monic : @Monic Type_Cat Image_of B :=
{|
mono_morphism := From_Image_forward;
mono_morphism_monomorphic := fun T g h => _
|}
.
Next Obligation.
Definition To_Image : A → Image_of :=
fun a => exist _ (f a) (ex_intro _ a eq_refl).
Definition From_Image_back : Image_of → A :=
fun x => proj1_sig (ConstructiveIndefiniteDescription_Type _ _ (proj2_sig x)).
Program Definition Epic_Monic_Factor_split_Epic :
@is_split_Epic Type_Cat _ _ To_Image :=
{|
is_split_monic_left_inverse := From_Image_back
|}.
Next Obligation.

Theorem split_Epic_Monic_Factorization :
f = fun x =>  From_Image_forward (To_Image x).