let f be PartFunc of REAL ,REAL ; :: thesis: for Z being open Subset of REAL st Z c= dom cot & ( for x being Real st x in Z holds
( f . x = - (1 / ((sin . x) ^2 )) & sin . x <> 0 ) ) holds
( cot is_differentiable_on Z & ( for x being Real st x in Z holds
(cot `| Z) . x = - (1 / ((sin . x) ^2 )) ) )

let Z be open Subset of REAL ; :: thesis: ( Z c= dom cot & ( for x being Real st x in Z holds
( f . x = - (1 / ((sin . x) ^2 )) & sin . x <> 0 ) ) implies ( cot is_differentiable_on Z & ( for x being Real st x in Z holds
(cot `| Z) . x = - (1 / ((sin . x) ^2 )) ) ) )

assume A1: ( Z c= dom cot & ( for x being Real st x in Z holds
( f . x = - (1 / ((sin . x) ^2 )) & sin . x <> 0 ) ) ) ; :: thesis: ( cot is_differentiable_on Z & ( for x being Real st x in Z holds
(cot `| Z) . x = - (1 / ((sin . x) ^2 )) ) )

A2: for x being Real st x in Z holds
cot is_differentiable_in x
proof end;
then A6: cot is_differentiable_on Z by A1, FDIFF_1:16;
for x being Real st x in Z holds
(cot `| Z) . x = - (1 / ((sin . x) ^2 ))
proof
let x be Real; :: thesis: ( x in Z implies (cot `| Z) . x = - (1 / ((sin . x) ^2 )) )
assume A7: x in Z ; :: thesis: (cot `| Z) . x = - (1 / ((sin . x) ^2 ))
A8: sin is_differentiable_in x by SIN_COS:69;
A9: cos is_differentiable_in x by SIN_COS:68;
sin . x <> 0 by A1, A7;
then diff cot ,x = (((diff cos ,x) * (sin . x)) - ((diff sin ,x) * (cos . x))) / ((sin . x) ^2 ) by A8, A9, FDIFF_2:14
.= (((- (sin . x)) * (sin . x)) - ((diff sin ,x) * (cos . x))) / ((sin . x) ^2 ) by SIN_COS:68
.= ((- ((sin . x) * (sin . x))) - ((cos . x) * (cos . x))) / ((sin . x) ^2 ) by SIN_COS:69
.= (- (((sin . x) * (sin . x)) + ((cos . x) * (cos . x)))) / ((sin . x) ^2 )
.= (- (((sin . x) * (sin . x)) + ((cos . x) ^2 ))) / ((sin . x) ^2 )
.= (- (((sin . x) ^2 ) + ((cos . x) ^2 ))) / ((sin . x) ^2 )
.= - ((((cos . x) ^2 ) + ((sin . x) ^2 )) / ((sin . x) ^2 )) by XCMPLX_1:188
.= - (1 / ((sin . x) ^2 )) by SIN_COS:31 ;
hence (cot `| Z) . x = - (1 / ((sin . x) ^2 )) by A6, A7, FDIFF_1:def 8; :: thesis: verum
end;
hence ( cot is_differentiable_on Z & ( for x being Real st x in Z holds
(cot `| Z) . x = - (1 / ((sin . x) ^2 )) ) ) by A1, A2, FDIFF_1:16; :: thesis: verum