let a, b be Real; :: thesis: for Z being open Subset of REAL
for f being PartFunc of REAL ,REAL st Z c= dom (cot * f) & ( for x being Real st x in Z holds
f . x = (a * x) + b ) holds
( cot * f is_differentiable_on Z & ( for x being Real st x in Z holds
((cot * f) `| Z) . x = - (a / ((sin . ((a * x) + b)) ^2 )) ) )

let Z be open Subset of REAL ; :: thesis: for f being PartFunc of REAL ,REAL st Z c= dom (cot * f) & ( for x being Real st x in Z holds
f . x = (a * x) + b ) holds
( cot * f is_differentiable_on Z & ( for x being Real st x in Z holds
((cot * f) `| Z) . x = - (a / ((sin . ((a * x) + b)) ^2 )) ) )

let f be PartFunc of REAL ,REAL ; :: thesis: ( Z c= dom (cot * f) & ( for x being Real st x in Z holds
f . x = (a * x) + b ) implies ( cot * f is_differentiable_on Z & ( for x being Real st x in Z holds
((cot * f) `| Z) . x = - (a / ((sin . ((a * x) + b)) ^2 )) ) ) )

assume that
A1: Z c= dom (cot * f) and
A2: for x being Real st x in Z holds
f . x = (a * x) + b ; :: thesis: ( cot * f is_differentiable_on Z & ( for x being Real st x in Z holds
((cot * f) `| Z) . x = - (a / ((sin . ((a * x) + b)) ^2 )) ) )

A3: for x being Real st x in Z holds
sin . (f . x) <> 0
proof
let x be Real; :: thesis: ( x in Z implies sin . (f . x) <> 0 )
assume x in Z ; :: thesis: sin . (f . x) <> 0
then f . x in dom (cos / sin ) by A1, FUNCT_1:21;
hence sin . (f . x) <> 0 by Th2; :: thesis: verum
end;
dom (cot * f) c= dom f by RELAT_1:44;
then A4: Z c= dom f by A1, XBOOLE_1:1;
then A5: ( f is_differentiable_on Z & ( for x being Real st x in Z holds
(f `| Z) . x = a ) ) by A2, FDIFF_1:31;
A6: for x being Real st x in Z holds
cot * f is_differentiable_in x
proof end;
then A9: cot * f is_differentiable_on Z by A1, FDIFF_1:16;
for x being Real st x in Z holds
((cot * f) `| Z) . x = - (a / ((sin . ((a * x) + b)) ^2 ))
proof
let x be Real; :: thesis: ( x in Z implies ((cot * f) `| Z) . x = - (a / ((sin . ((a * x) + b)) ^2 )) )
assume A10: x in Z ; :: thesis: ((cot * f) `| Z) . x = - (a / ((sin . ((a * x) + b)) ^2 ))
then A11: f is_differentiable_in x by A5, FDIFF_1:16;
A12: sin . (f . x) <> 0 by A3, A10;
then cot is_differentiable_in f . x by FDIFF_7:47;
then diff (cot * f),x = (diff cot ,(f . x)) * (diff f,x) by A11, FDIFF_2:13
.= (- (1 / ((sin . (f . x)) ^2 ))) * (diff f,x) by A12, FDIFF_7:47
.= - ((diff f,x) / ((sin . (f . x)) ^2 ))
.= - ((diff f,x) / ((sin . ((a * x) + b)) ^2 )) by A2, A10
.= - (((f `| Z) . x) / ((sin . ((a * x) + b)) ^2 )) by A5, A10, FDIFF_1:def 8
.= - (a / ((sin . ((a * x) + b)) ^2 )) by A2, A4, A10, FDIFF_1:31 ;
hence ((cot * f) `| Z) . x = - (a / ((sin . ((a * x) + b)) ^2 )) by A9, A10, FDIFF_1:def 8; :: thesis: verum
end;
hence ( cot * f is_differentiable_on Z & ( for x being Real st x in Z holds
((cot * f) `| Z) . x = - (a / ((sin . ((a * x) + b)) ^2 )) ) ) by A1, A6, FDIFF_1:16; :: thesis: verum