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

A1: sin is_differentiable_on Z by FDIFF_1:26, SIN_COS:68;
assume A2: Z c= dom (- cosec) ; :: thesis: ( - cosec is_differentiable_on Z & ( for x being Real st x in Z holds
((- cosec) `| Z) . x = (cos . x) / ((sin . x) ^2) ) )

then A3: Z c= dom cosec by VALUED_1:8;
then for x being Real st x in Z holds
sin . x <> 0 by RFUNCT_1:3;
then A4: cosec is_differentiable_on Z by A1, FDIFF_2:22;
A5: for x being Real st x in Z holds
((- cosec) `| Z) . x = (cos . x) / ((sin . x) ^2)
proof
let x be Real; :: thesis: ( x in Z implies ((- cosec) `| Z) . x = (cos . x) / ((sin . x) ^2) )
assume A6: x in Z ; :: thesis: ((- cosec) `| Z) . x = (cos . x) / ((sin . x) ^2)
then A7: ( sin . x <> 0 & sin is_differentiable_in x ) by A3, A1, FDIFF_1:9, RFUNCT_1:3;
((- cosec) `| Z) . x = (- 1) * (diff ((sin ^),x)) by A2, A4, A6, FDIFF_1:20
.= (- 1) * (- ((diff (sin,x)) / ((sin . x) ^2))) by A7, FDIFF_2:15
.= (cos . x) / ((sin . x) ^2) by SIN_COS:64 ;
hence ((- cosec) `| Z) . x = (cos . x) / ((sin . x) ^2) ; :: thesis: verum
end;
(- 1) (#) cosec is_differentiable_on Z by A2, A4, FDIFF_1:20;
hence ( - cosec is_differentiable_on Z & ( for x being Real st x in Z holds
((- cosec) `| Z) . x = (cos . x) / ((sin . x) ^2) ) ) by A5; :: thesis: verum