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

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

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

A2: for x being Real st x in Z holds
f . x = ((1 / 2) * x) + 0
proof
let x be Real; :: thesis: ( x in Z implies f . x = ((1 / 2) * x) + 0 )
assume x in Z ; :: thesis: f . x = ((1 / 2) * x) + 0
then f . x = x / 2 by A1;
hence f . x = ((1 / 2) * x) + 0 ; :: thesis: verum
end;
for y being set st y in Z holds
y in dom f by A1, FUNCT_1:21;
then A3: Z c= dom f by TARSKI:def 3;
then A4: ( f is_differentiable_on Z & ( for x being Real st x in Z holds
(f `| Z) . x = 1 / 2 ) ) by A2, FDIFF_1:31;
A5: for x being Real st x in Z holds
(cos / sin ) * f is_differentiable_in x
proof end;
then A8: (cos / sin ) * f is_differentiable_on Z by A1, FDIFF_1:16;
for x being Real st x in Z holds
(((cos / sin ) * f) `| Z) . x = - (1 / (1 - (cos . x)))
proof
let x be Real; :: thesis: ( x in Z implies (((cos / sin ) * f) `| Z) . x = - (1 / (1 - (cos . x))) )
assume A9: x in Z ; :: thesis: (((cos / sin ) * f) `| Z) . x = - (1 / (1 - (cos . x)))
then A10: f is_differentiable_in x by A4, FDIFF_1:16;
A11: sin . (f . x) <> 0 by A1, A9;
then cos / sin is_differentiable_in f . x by Th47;
then diff ((cos / sin ) * f),x = (diff (cos / sin ),(f . x)) * (diff f,x) by A10, FDIFF_2:13
.= (- (1 / ((sin . (f . x)) ^2 ))) * (diff f,x) by A11, Th47
.= - ((1 / ((sin . (f . x)) ^2 )) * (diff f,x))
.= - ((diff f,x) / ((sin . (f . x)) ^2 )) by XCMPLX_1:100
.= - ((diff f,x) / ((sin . (x / 2)) ^2 )) by A1, A9
.= - (((f `| Z) . x) / ((sin . (x / 2)) ^2 )) by A4, A9, FDIFF_1:def 8
.= - ((1 / 2) / ((sin . (x / 2)) ^2 )) by A2, A3, A9, FDIFF_1:31
.= - (1 / (2 * ((sin . (x / 2)) ^2 ))) by XCMPLX_1:79
.= - (1 / (1 - (cos . x))) by Lm2 ;
hence (((cos / sin ) * f) `| Z) . x = - (1 / (1 - (cos . x))) by A8, A9, FDIFF_1:def 8; :: thesis: verum
end;
hence ( (cos / sin ) * f is_differentiable_on Z & ( for x being Real st x in Z holds
(((cos / sin ) * f) `| Z) . x = - (1 / (1 - (cos . x))) ) ) by A1, A5, FDIFF_1:16; :: thesis: verum