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 = (- ((sin . x) * ((tan . x) + (cot . x)))) + ((cos . x) * ((1 / ((cos . x) ^2)) - (1 / ((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 = (- ((sin . x) * ((tan . x) + (cot . x)))) + ((cos . x) * ((1 / ((cos . x) ^2)) - (1 / ((sin . x) ^2)))) ) )

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