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

assume A1: Z c= dom (ln * cosec ) ; :: thesis: ( ln * cosec is_differentiable_on Z & ( for x being Real st x in Z holds
((ln * cosec ) `| Z) . x = - ((cos . x) / (sin . x)) ) )

A2: for x being Real st x in Z holds
sin . x <> 0
proof
let x be Real; :: thesis: ( x in Z implies sin . x <> 0 )
assume x in Z ; :: thesis: sin . x <> 0
then x in dom cosec by A1, FUNCT_1:21;
hence sin . x <> 0 by RFUNCT_1:13; :: thesis: verum
end;
A3: for x being Real st x in Z holds
cosec . x > 0
proof
let x be Real; :: thesis: ( x in Z implies cosec . x > 0 )
assume x in Z ; :: thesis: cosec . x > 0
then cosec . x in right_open_halfline 0 by A1, FUNCT_1:21, TAYLOR_1:18;
then ex g being Real st
( cosec . x = g & 0 < g ) by Lm1;
hence cosec . x > 0 ; :: thesis: verum
end;
dom (ln * cosec ) c= dom cosec by RELAT_1:44;
then A4: Z c= dom cosec by A1, XBOOLE_1:1;
A5: for x being Real st x in Z holds
cosec is_differentiable_in x
proof end;
A6: for x being Real st x in Z holds
ln * cosec is_differentiable_in x
proof end;
then A9: ln * cosec is_differentiable_on Z by A1, FDIFF_1:16;
for x being Real st x in Z holds
((ln * cosec ) `| Z) . x = - ((cos . x) / (sin . x))
proof
let x be Real; :: thesis: ( x in Z implies ((ln * cosec ) `| Z) . x = - ((cos . x) / (sin . x)) )
assume A10: x in Z ; :: thesis: ((ln * cosec ) `| Z) . x = - ((cos . x) / (sin . x))
then A11: cosec is_differentiable_in x by A5;
A12: ( sin . x <> 0 & cosec . x > 0 ) by A2, A3, A10;
then diff (ln * cosec ),x = (diff cosec ,x) / (cosec . x) by A11, TAYLOR_1:20
.= (- ((cos . x) / ((sin . x) ^2 ))) / (cosec . x) by A12, Th2
.= (- ((cos . x) / ((sin . x) ^2 ))) / ((sin . x) " ) by A4, A10, RFUNCT_1:def 8
.= ((- (cos . x)) * (sin . x)) / ((sin . x) * (sin . x))
.= (- (cos . x)) / (sin . x) by A12, XCMPLX_1:92 ;
hence ((ln * cosec ) `| Z) . x = - ((cos . x) / (sin . x)) by A9, A10, FDIFF_1:def 8; :: thesis: verum
end;
hence ( ln * cosec is_differentiable_on Z & ( for x being Real st x in Z holds
((ln * cosec ) `| Z) . x = - ((cos . x) / (sin . x)) ) ) by A1, A6, FDIFF_1:16; :: thesis: verum