let Z be open Subset of REAL ; :: thesis: ( Z c= dom (((id Z) - tan ) + sec ) & ( for x being Real st x in Z holds
( 1 + (sin . x) <> 0 & 1 - (sin . x) <> 0 ) ) implies ( ((id Z) - tan ) + sec is_differentiable_on Z & ( for x being Real st x in Z holds
((((id Z) - tan ) + sec ) `| Z) . x = (sin . x) / ((sin . x) + 1) ) ) )

assume that
A1: Z c= dom (((id Z) - tan ) + sec ) and
A2: for x being Real st x in Z holds
( 1 + (sin . x) <> 0 & 1 - (sin . x) <> 0 ) ; :: thesis: ( ((id Z) - tan ) + sec is_differentiable_on Z & ( for x being Real st x in Z holds
((((id Z) - tan ) + sec ) `| Z) . x = (sin . x) / ((sin . x) + 1) ) )

A3: Z c= (dom ((id Z) - tan )) /\ (dom sec ) by A1, VALUED_1:def 1;
then A4: Z c= dom ((id Z) - tan ) by XBOOLE_1:18;
then A5: Z c= (dom (id Z)) /\ (dom tan ) by VALUED_1:12;
then A6: Z c= dom (id Z) by XBOOLE_1:18;
A7: for x being Real st x in Z holds
(id Z) . x = (1 * x) + 0 by FUNCT_1:35;
then A8: id Z is_differentiable_on Z by A6, FDIFF_1:31;
A9: Z c= dom tan by A5, XBOOLE_1:18;
for x being Real st x in Z holds
tan is_differentiable_in x
proof end;
then A10: tan is_differentiable_on Z by A9, FDIFF_1:16;
then A11: (id Z) - tan is_differentiable_on Z by A4, A8, FDIFF_1:27;
A12: Z c= dom sec by A3, XBOOLE_1:18;
then A13: sec is_differentiable_on Z by FDIFF_9:4;
A14: for x being Real st x in Z holds
(((id Z) - tan ) `| Z) . x = - (((sin . x) ^2 ) / ((cos . x) ^2 ))
proof
let x be Real; :: thesis: ( x in Z implies (((id Z) - tan ) `| Z) . x = - (((sin . x) ^2 ) / ((cos . x) ^2 )) )
assume A15: x in Z ; :: thesis: (((id Z) - tan ) `| Z) . x = - (((sin . x) ^2 ) / ((cos . x) ^2 ))
then A16: cos . x <> 0 by A9, FDIFF_8:1;
then A17: (cos . x) ^2 > 0 by SQUARE_1:74;
(((id Z) - tan ) `| Z) . x = (diff (id Z),x) - (diff tan ,x) by A4, A10, A8, A15, FDIFF_1:27
.= (((id Z) `| Z) . x) - (diff tan ,x) by A8, A15, FDIFF_1:def 8
.= 1 - (diff tan ,x) by A6, A7, A15, FDIFF_1:31
.= 1 - (1 / ((cos . x) ^2 )) by A16, FDIFF_7:46
.= 1 - ((((cos . x) ^2 ) + ((sin . x) ^2 )) / ((cos . x) ^2 )) by SIN_COS:31
.= 1 - ((((cos . x) ^2 ) / ((cos . x) ^2 )) + (((sin . x) ^2 ) / ((cos . x) ^2 ))) by XCMPLX_1:63
.= 1 - (1 + (((sin . x) ^2 ) / ((cos . x) ^2 ))) by A17, XCMPLX_1:60
.= - (((sin . x) ^2 ) / ((cos . x) ^2 )) ;
hence (((id Z) - tan ) `| Z) . x = - (((sin . x) ^2 ) / ((cos . x) ^2 )) ; :: thesis: verum
end;
for x being Real st x in Z holds
((((id Z) - tan ) + sec ) `| Z) . x = (sin . x) / ((sin . x) + 1)
proof
let x be Real; :: thesis: ( x in Z implies ((((id Z) - tan ) + sec ) `| Z) . x = (sin . x) / ((sin . x) + 1) )
assume A18: x in Z ; :: thesis: ((((id Z) - tan ) + sec ) `| Z) . x = (sin . x) / ((sin . x) + 1)
then A19: 1 - (sin . x) <> 0 by A2;
((((id Z) - tan ) + sec ) `| Z) . x = (diff ((id Z) - tan ),x) + (diff sec ,x) by A1, A13, A11, A18, FDIFF_1:26
.= ((((id Z) - tan ) `| Z) . x) + (diff sec ,x) by A11, A18, FDIFF_1:def 8
.= (- (((sin . x) ^2 ) / ((cos . x) ^2 ))) + (diff sec ,x) by A14, A18
.= (- (((sin . x) ^2 ) / ((cos . x) ^2 ))) + ((sec `| Z) . x) by A13, A18, FDIFF_1:def 8
.= (- (((sin . x) ^2 ) / ((cos . x) ^2 ))) + ((sin . x) / ((cos . x) ^2 )) by A12, A18, FDIFF_9:4
.= ((sin . x) / ((cos . x) ^2 )) - (((sin . x) ^2 ) / ((cos . x) ^2 ))
.= ((sin . x) - ((sin . x) * (sin . x))) / ((cos . x) ^2 ) by XCMPLX_1:121
.= ((sin . x) * (1 - (sin . x))) / ((((cos . x) ^2 ) + ((sin . x) ^2 )) - ((sin . x) ^2 ))
.= ((sin . x) * (1 - (sin . x))) / (1 - ((sin . x) ^2 )) by SIN_COS:31
.= ((sin . x) * (1 - (sin . x))) / ((1 - (sin . x)) * (1 + (sin . x)))
.= (((sin . x) * (1 - (sin . x))) / (1 - (sin . x))) / (1 + (sin . x)) by XCMPLX_1:79
.= ((sin . x) * ((1 - (sin . x)) / (1 - (sin . x)))) / (1 + (sin . x)) by XCMPLX_1:75
.= ((sin . x) * 1) / (1 + (sin . x)) by A19, XCMPLX_1:60
.= (sin . x) / (1 + (sin . x)) ;
hence ((((id Z) - tan ) + sec ) `| Z) . x = (sin . x) / ((sin . x) + 1) ; :: thesis: verum
end;
hence ( ((id Z) - tan ) + sec is_differentiable_on Z & ( for x being Real st x in Z holds
((((id Z) - tan ) + sec ) `| Z) . x = (sin . x) / ((sin . x) + 1) ) ) by A1, A13, A11, FDIFF_1:26; :: thesis: verum