let C be CategoryStr ; :: thesis: ( C is with_identities iff for f being morphism of C st f in Mor C holds
( ex c being morphism of C st
( c |> f & c is identity ) & ex d being morphism of C st
( f |> d & d is identity ) ) )

hereby :: thesis: ( ( for f being morphism of C st f in Mor C holds
( ex c being morphism of C st
( c |> f & c is identity ) & ex d being morphism of C st
( f |> d & d is identity ) ) ) implies C is with_identities )
assume A1: C is with_identities ; :: thesis: for f being morphism of C st f in Mor C holds
( ex c being morphism of C st
( c |> f & c is identity ) & ex d being morphism of C st
( f |> d & d is identity ) )

let f be morphism of C; :: thesis: ( f in Mor C implies ( ex c being morphism of C st
( c |> f & c is identity ) & ex d being morphism of C st
( f |> d & d is identity ) ) )

assume A2: f in Mor C ; :: thesis: ( ex c being morphism of C st
( c |> f & c is identity ) & ex d being morphism of C st
( f |> d & d is identity ) )

thus ex c being morphism of C st
( c |> f & c is identity ) :: thesis: ex d being morphism of C st
( f |> d & d is identity )
proof
consider c being morphism of C such that
A3: ( c |> f & c is left_identity ) by A2, A1, Def6;
take c ; :: thesis: ( c |> f & c is identity )
thus c |> f by A3; :: thesis: c is identity
thus c is identity by A3, Th9, A1; :: thesis: verum
end;
consider d being morphism of C such that
A4: ( f |> d & d is right_identity ) by A2, A1, Def7;
take d = d; :: thesis: ( f |> d & d is identity )
thus f |> d by A4; :: thesis: d is identity
thus d is identity by A4, A1, Th9; :: thesis: verum
end;
assume A5: for f being morphism of C st f in Mor C holds
( ex c being morphism of C st
( c |> f & c is identity ) & ex d being morphism of C st
( f |> d & d is identity ) ) ; :: thesis: C is with_identities
for f1 being morphism of C st f1 in the carrier of C holds
ex f being morphism of C st
( f |> f1 & f is left_identity )
proof
let f1 be morphism of C; :: thesis: ( f1 in the carrier of C implies ex f being morphism of C st
( f |> f1 & f is left_identity ) )

assume f1 in the carrier of C ; :: thesis: ex f being morphism of C st
( f |> f1 & f is left_identity )

then consider f being morphism of C such that
A6: ( f |> f1 & f is identity ) by A5;
take f ; :: thesis: ( f |> f1 & f is left_identity )
thus f |> f1 by A6; :: thesis: f is left_identity
thus f is left_identity by A6; :: thesis: verum
end;
then A7: C is with_left_identities ;
for f1 being morphism of C st f1 in the carrier of C holds
ex f being morphism of C st
( f1 |> f & f is right_identity )
proof
let f1 be morphism of C; :: thesis: ( f1 in the carrier of C implies ex f being morphism of C st
( f1 |> f & f is right_identity ) )

assume f1 in the carrier of C ; :: thesis: ex f being morphism of C st
( f1 |> f & f is right_identity )

then consider f being morphism of C such that
A8: ( f1 |> f & f is identity ) by A5;
take f ; :: thesis: ( f1 |> f & f is right_identity )
thus f1 |> f by A8; :: thesis: f is right_identity
thus f is right_identity by A8; :: thesis: verum
end;
hence C is with_identities by A7, Def7; :: thesis: verum