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

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

dom (tan * ((id Z) ^ )) c= dom ((id Z) ^ ) by RELAT_1:44;
then A2: Z c= dom ((id Z) ^ ) by XBOOLE_1:1, A1;
A3: not 0 in Z
proof
assume K: 0 in Z ; :: thesis: contradiction
dom ((id Z) ^ ) = (dom (id Z)) \ ((id Z) " {0 }) by RFUNCT_1:def 8
.= (dom (id Z)) \ {0 } by Lm0, K ;
then not 0 in {0 } by XBOOLE_0:def 5, K, A2;
hence contradiction by TARSKI:def 1; :: thesis: verum
end;
A4: Z c= dom (- (tan * ((id Z) ^ ))) by A1, VALUED_1:8;
B1: tan * ((id Z) ^ ) is_differentiable_on Z by A1, A3, FDIFF_8:8;
then B2: (- 1) (#) (tan * ((id Z) ^ )) is_differentiable_on Z by A4, FDIFF_1:28, A;
A5: ( (id Z) ^ is_differentiable_on Z & ( for x being Real st x in Z holds
(((id Z) ^ ) `| Z) . x = - (1 / (x ^2 )) ) ) by A3, FDIFF_5:4;
A6: for x being Real st x in Z holds
cos . (((id Z) ^ ) . x) <> 0
proof
let x be Real; :: thesis: ( x in Z implies cos . (((id Z) ^ ) . x) <> 0 )
assume x in Z ; :: thesis: cos . (((id Z) ^ ) . x) <> 0
then ((id Z) ^ ) . x in dom (sin / cos ) by A1, FUNCT_1:21;
hence cos . (((id Z) ^ ) . x) <> 0 by FDIFF_8:1; :: thesis: verum
end;
for x being Real st x in Z holds
((- (tan * ((id Z) ^ ))) `| Z) . x = 1 / ((x ^2 ) * ((cos . (1 / x)) ^2 ))
proof
let x be Real; :: thesis: ( x in Z implies ((- (tan * ((id Z) ^ ))) `| Z) . x = 1 / ((x ^2 ) * ((cos . (1 / x)) ^2 )) )
assume A7: x in Z ; :: thesis: ((- (tan * ((id Z) ^ ))) `| Z) . x = 1 / ((x ^2 ) * ((cos . (1 / x)) ^2 ))
then A8: (id Z) ^ is_differentiable_in x by A5, FDIFF_1:16;
A9: cos . (((id Z) ^ ) . x) <> 0 by A6, A7;
then A10: tan is_differentiable_in ((id Z) ^ ) . x by FDIFF_7:46;
A11: tan * ((id Z) ^ ) is_differentiable_in x by B1, A7, FDIFF_1:16;
((- (tan * ((id Z) ^ ))) `| Z) . x = diff (- (tan * ((id Z) ^ ))),x by B2, A7, FDIFF_1:def 8
.= (- 1) * (diff (tan * ((id Z) ^ )),x) by A11, FDIFF_1:23, A
.= (- 1) * ((diff tan ,(((id Z) ^ ) . x)) * (diff ((id Z) ^ ),x)) by A8, A10, FDIFF_2:13
.= (- 1) * ((1 / ((cos . (((id Z) ^ ) . x)) ^2 )) * (diff ((id Z) ^ ),x)) by A9, FDIFF_7:46
.= (- 1) * ((diff ((id Z) ^ ),x) / ((cos . (((id Z) . x) " )) ^2 )) by A2, A7, RFUNCT_1:def 8
.= (- 1) * ((diff ((id Z) ^ ),x) / ((cos . (1 * (x " ))) ^2 )) by FUNCT_1:35, A7
.= (- 1) * (((((id Z) ^ ) `| Z) . x) / ((cos . (1 * (x " ))) ^2 )) by A5, A7, FDIFF_1:def 8
.= (- 1) * ((- (1 / (x ^2 ))) / ((cos . (1 * (x " ))) ^2 )) by A7, A3, FDIFF_5:4
.= (- 1) * (((- 1) / (x ^2 )) / ((cos . (1 / x)) ^2 ))
.= (- 1) * ((- 1) / ((x ^2 ) * ((cos . (1 / x)) ^2 ))) by XCMPLX_1:79
.= 1 / ((x ^2 ) * ((cos . (1 / x)) ^2 )) ;
hence ((- (tan * ((id Z) ^ ))) `| Z) . x = 1 / ((x ^2 ) * ((cos . (1 / x)) ^2 )) ; :: thesis: verum
end;
hence ( - (tan * ((id Z) ^ )) is_differentiable_on Z & ( for x being Real st x in Z holds
((- (tan * ((id Z) ^ ))) `| Z) . x = 1 / ((x ^2 ) * ((cos . (1 / x)) ^2 )) ) ) by B2; :: thesis: verum