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

A1: for x being Real st x in Z holds
cos is_differentiable_in x by SIN_COS:63;
assume A2: Z c= dom (cos (#) ()) ; :: thesis: ( cos (#) () is_differentiable_on Z & ( for x being Real st x in Z holds
((cos (#) ()) `| Z) . x = (((cos . x) ^2) + ((2 * (sin . x)) * (cos . x))) - ((sin . x) ^2) ) )

then A3: Z c= (dom ()) /\ () by VALUED_1:def 4;
then A4: Z c= dom () by XBOOLE_1:18;
then A5: sin - cos is_differentiable_on Z by FDIFF_7:39;
Z c= dom cos by ;
then A6: cos is_differentiable_on Z by ;
for x being Real st x in Z holds
((cos (#) ()) `| Z) . x = (((cos . x) ^2) + ((2 * (sin . x)) * (cos . x))) - ((sin . x) ^2)
proof
let x be Real; :: thesis: ( x in Z implies ((cos (#) ()) `| Z) . x = (((cos . x) ^2) + ((2 * (sin . x)) * (cos . x))) - ((sin . x) ^2) )
assume A7: x in Z ; :: thesis: ((cos (#) ()) `| Z) . x = (((cos . x) ^2) + ((2 * (sin . x)) * (cos . x))) - ((sin . x) ^2)
then ((cos (#) ()) `| Z) . x = ((() . x) * (diff (cos,x))) + ((cos . x) * (diff ((),x))) by
.= (((sin . x) - (cos . x)) * (diff (cos,x))) + ((cos . x) * (diff ((),x))) by
.= (((sin . x) - (cos . x)) * (- (sin . x))) + ((cos . x) * (diff ((),x))) by SIN_COS:63
.= (((sin . x) - (cos . x)) * (- (sin . x))) + ((cos . x) * ((() `| Z) . x)) by
.= (((sin . x) - (cos . x)) * (- (sin . x))) + ((cos . x) * ((cos . x) + (sin . x))) by ;
hence ((cos (#) ()) `| Z) . x = (((cos . x) ^2) + ((2 * (sin . x)) * (cos . x))) - ((sin . x) ^2) ; :: thesis: verum
end;
hence ( cos (#) () is_differentiable_on Z & ( for x being Real st x in Z holds
((cos (#) ()) `| Z) . x = (((cos . x) ^2) + ((2 * (sin . x)) * (cos . x))) - ((sin . x) ^2) ) ) by ; :: thesis: verum