let Z be open Subset of REAL; :: thesis: ( not 0 in Z & Z c= dom (((id Z) ^) (#) sin) implies ( ((id Z) ^) (#) sin is_differentiable_on Z & ( for x being Real st x in Z holds
((((id Z) ^) (#) sin) `| Z) . x = ((1 / x) * (cos . x)) - ((1 / (x ^2)) * (sin . x)) ) ) )

set f = id Z;
assume that
A1: not 0 in Z and
A2: Z c= dom (((id Z) ^) (#) sin) ; :: thesis: ( ((id Z) ^) (#) sin is_differentiable_on Z & ( for x being Real st x in Z holds
((((id Z) ^) (#) sin) `| Z) . x = ((1 / x) * (cos . x)) - ((1 / (x ^2)) * (sin . x)) ) )

A3: (id Z) ^ is_differentiable_on Z by A1, Th4;
A4: sin is_differentiable_on Z by FDIFF_1:26, SIN_COS:68;
Z c= (dom ((id Z) ^)) /\ (dom sin) by A2, VALUED_1:def 4;
then A5: Z c= dom ((id Z) ^) by XBOOLE_1:18;
now :: thesis: for x being Real st x in Z holds
((((id Z) ^) (#) sin) `| Z) . x = ((1 / x) * (cos . x)) - ((1 / (x ^2)) * (sin . x))
let x be Real; :: thesis: ( x in Z implies ((((id Z) ^) (#) sin) `| Z) . x = ((1 / x) * (cos . x)) - ((1 / (x ^2)) * (sin . x)) )
assume A6: x in Z ; :: thesis: ((((id Z) ^) (#) sin) `| Z) . x = ((1 / x) * (cos . x)) - ((1 / (x ^2)) * (sin . x))
hence ((((id Z) ^) (#) sin) `| Z) . x = ((sin . x) * (diff (((id Z) ^),x))) + ((((id Z) ^) . x) * (diff (sin,x))) by A2, A3, A4, FDIFF_1:21
.= ((sin . x) * ((((id Z) ^) `| Z) . x)) + ((((id Z) ^) . x) * (diff (sin,x))) by A3, A6, FDIFF_1:def 7
.= ((sin . x) * (- (1 / (x ^2)))) + ((((id Z) ^) . x) * (diff (sin,x))) by A1, A6, Th4
.= ((sin . x) * (- (1 / (x ^2)))) + ((((id Z) ^) . x) * (cos . x)) by SIN_COS:64
.= ((sin . x) * (- (1 / (x ^2)))) + ((((id Z) . x) ") * (cos . x)) by A5, A6, RFUNCT_1:def 2
.= ((sin . x) * (- (1 / (x ^2)))) + ((1 * (x ")) * (cos . x)) by A6, FUNCT_1:18
.= (- ((1 / (x ^2)) * (sin . x))) + ((1 / x) * (cos . x)) by XCMPLX_0:def 9
.= ((1 / x) * (cos . x)) - ((1 / (x ^2)) * (sin . x)) ;
:: thesis: verum
end;
hence ( ((id Z) ^) (#) sin is_differentiable_on Z & ( for x being Real st x in Z holds
((((id Z) ^) (#) sin) `| Z) . x = ((1 / x) * (cos . x)) - ((1 / (x ^2)) * (sin . x)) ) ) by A2, A3, A4, FDIFF_1:21; :: thesis: verum