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

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

A2: for x being Real st x in Z holds
(id Z) . x = x by FUNCT_1:35;
dom (cosec * ((id Z) ^ )) c= dom ((id Z) ^ ) by RELAT_1:44;
then A3: Z c= dom ((id Z) ^ ) by A1, XBOOLE_1:1;
A6: ( (id Z) ^ is_differentiable_on Z & ( for x being Real st x in Z holds
(((id Z) ^ ) `| Z) . x = - (1 / (x ^2 )) ) ) by A1, FDIFF_5:4;
A7: for x being Real st x in Z holds
sin . (((id Z) ^ ) . x) <> 0
proof
let x be Real; :: thesis: ( x in Z implies sin . (((id Z) ^ ) . x) <> 0 )
assume x in Z ; :: thesis: sin . (((id Z) ^ ) . x) <> 0
then ((id Z) ^ ) . x in dom cosec by A1, FUNCT_1:21;
hence sin . (((id Z) ^ ) . x) <> 0 by RFUNCT_1:13; :: thesis: verum
end;
A8: for x being Real st x in Z holds
cosec * ((id Z) ^ ) is_differentiable_in x
proof end;
then A11: cosec * ((id Z) ^ ) is_differentiable_on Z by A1, FDIFF_1:16;
for x being Real st x in Z holds
((cosec * ((id Z) ^ )) `| Z) . x = (cos . (1 / x)) / ((x ^2 ) * ((sin . (1 / x)) ^2 ))
proof
let x be Real; :: thesis: ( x in Z implies ((cosec * ((id Z) ^ )) `| Z) . x = (cos . (1 / x)) / ((x ^2 ) * ((sin . (1 / x)) ^2 )) )
assume A12: x in Z ; :: thesis: ((cosec * ((id Z) ^ )) `| Z) . x = (cos . (1 / x)) / ((x ^2 ) * ((sin . (1 / x)) ^2 ))
then A13: (id Z) ^ is_differentiable_in x by A6, FDIFF_1:16;
A14: sin . (((id Z) ^ ) . x) <> 0 by A7, A12;
then cosec is_differentiable_in ((id Z) ^ ) . x by Th2;
then diff (cosec * ((id Z) ^ )),x = (diff cosec ,(((id Z) ^ ) . x)) * (diff ((id Z) ^ ),x) by A13, FDIFF_2:13
.= (- ((cos . (((id Z) ^ ) . x)) / ((sin . (((id Z) ^ ) . x)) ^2 ))) * (diff ((id Z) ^ ),x) by A14, Th2
.= (diff ((id Z) ^ ),x) * (- ((cos . (((id Z) ^ ) . x)) / ((sin . (((id Z) . x) " )) ^2 ))) by A3, A12, RFUNCT_1:def 8
.= (diff ((id Z) ^ ),x) * (- ((cos . (((id Z) . x) " )) / ((sin . (((id Z) . x) " )) ^2 ))) by A3, A12, RFUNCT_1:def 8
.= (diff ((id Z) ^ ),x) * (- ((cos . (((id Z) . x) " )) / ((sin . (1 * (x " ))) ^2 ))) by A2, A12
.= (diff ((id Z) ^ ),x) * (- ((cos . (1 * (x " ))) / ((sin . (1 * (x " ))) ^2 ))) by A2, A12
.= ((((id Z) ^ ) `| Z) . x) * (- ((cos . (1 * (x " ))) / ((sin . (1 * (x " ))) ^2 ))) by A6, A12, FDIFF_1:def 8
.= (- (1 / (x ^2 ))) * (- ((cos . (1 * (x " ))) / ((sin . (1 * (x " ))) ^2 ))) by A12, FDIFF_5:4, A1
.= ((- 1) / (x ^2 )) * ((- (cos . (1 / x))) / ((sin . (1 / x)) ^2 ))
.= ((- 1) * (- (cos . (1 / x)))) / ((x ^2 ) * ((sin . (1 / x)) ^2 )) by XCMPLX_1:77
.= (cos . (1 / x)) / ((x ^2 ) * ((sin . (1 / x)) ^2 )) ;
hence ((cosec * ((id Z) ^ )) `| Z) . x = (cos . (1 / x)) / ((x ^2 ) * ((sin . (1 / x)) ^2 )) by A11, A12, FDIFF_1:def 8; :: thesis: verum
end;
hence ( cosec * ((id Z) ^ ) is_differentiable_on Z & ( for x being Real st x in Z holds
((cosec * ((id Z) ^ )) `| Z) . x = (cos . (1 / x)) / ((x ^2 ) * ((sin . (1 / x)) ^2 )) ) ) by A1, A8, FDIFF_1:16; :: thesis: verum