let A be closed-interval Subset of REAL ; :: thesis: for Z being open Subset of REAL st A c= Z holds
integral ((- (id Z)) (#) cos ),A = (((- cos ) - ((id Z) (#) sin )) . (upper_bound A)) - (((- cos ) - ((id Z) (#) sin )) . (lower_bound A))

let Z be open Subset of REAL ; :: thesis: ( A c= Z implies integral ((- (id Z)) (#) cos ),A = (((- cos ) - ((id Z) (#) sin )) . (upper_bound A)) - (((- cos ) - ((id Z) (#) sin )) . (lower_bound A)) )
assume A1: A c= Z ; :: thesis: integral ((- (id Z)) (#) cos ),A = (((- cos ) - ((id Z) (#) sin )) . (upper_bound A)) - (((- cos ) - ((id Z) (#) sin )) . (lower_bound A))
A2: Z = dom ((- (id Z)) (#) cos )
proof
dom ((- (id Z)) (#) cos ) = (dom (- (id Z))) /\ REAL by SIN_COS:27, VALUED_1:def 4
.= dom (- (id Z)) by XBOOLE_1:28
.= dom (id Z) by VALUED_1:8 ;
hence Z = dom ((- (id Z)) (#) cos ) by RELAT_1:71; :: thesis: verum
end;
Z = (dom (- (id Z))) /\ (dom cos ) by A2, VALUED_1:def 4;
then AA: ( Z c= dom (- (id Z)) & Z c= dom cos ) by XBOOLE_1:18;
A3: for x being Real st x in Z holds
(- (id Z)) . x = ((- 1) * x) + 0
proof
let x be Real; :: thesis: ( x in Z implies (- (id Z)) . x = ((- 1) * x) + 0 )
assume C1: x in Z ; :: thesis: (- (id Z)) . x = ((- 1) * x) + 0
(- (id Z)) . x = - ((id Z) . x) by VALUED_1:8
.= - x by C1, FUNCT_1:35
.= ((- 1) * x) + 0 ;
hence (- (id Z)) . x = ((- 1) * x) + 0 ; :: thesis: verum
end;
B: for x being Real st x in Z holds
((- (id Z)) (#) cos ) . x = - (x * (cos . x))
proof
let x be Real; :: thesis: ( x in Z implies ((- (id Z)) (#) cos ) . x = - (x * (cos . x)) )
assume C: x in Z ; :: thesis: ((- (id Z)) (#) cos ) . x = - (x * (cos . x))
((- (id Z)) (#) cos ) . x = ((- (id Z)) . x) * (cos . x) by VALUED_1:5
.= (((- 1) * x) + 0 ) * (cos . x) by A3, C
.= - (x * (cos . x)) ;
hence ((- (id Z)) (#) cos ) . x = - (x * (cos . x)) ; :: thesis: verum
end;
C: - (id Z) is_differentiable_on Z by AA, A3, FDIFF_1:31;
cos is_differentiable_on Z by FDIFF_1:34, SIN_COS:72;
then ((- (id Z)) (#) cos ) | Z is continuous by A2, C, FDIFF_1:29, FDIFF_1:33;
then ((- (id Z)) (#) cos ) | A is continuous by A1, FCONT_1:17;
then A4: ( (- (id Z)) (#) cos is_integrable_on A & ((- (id Z)) (#) cos ) | A is bounded ) by A1, A2, INTEGRA5:10, INTEGRA5:11;
A5: (- cos ) - ((id Z) (#) sin ) is_differentiable_on Z by Th19;
A6: for x being Real st x in dom (((- cos ) - ((id Z) (#) sin )) `| Z) holds
(((- cos ) - ((id Z) (#) sin )) `| Z) . x = ((- (id Z)) (#) cos ) . x
proof
let x be Real; :: thesis: ( x in dom (((- cos ) - ((id Z) (#) sin )) `| Z) implies (((- cos ) - ((id Z) (#) sin )) `| Z) . x = ((- (id Z)) (#) cos ) . x )
assume x in dom (((- cos ) - ((id Z) (#) sin )) `| Z) ; :: thesis: (((- cos ) - ((id Z) (#) sin )) `| Z) . x = ((- (id Z)) (#) cos ) . x
then A7: x in Z by A5, FDIFF_1:def 8;
then (((- cos ) - ((id Z) (#) sin )) `| Z) . x = - (x * (cos . x)) by Th19
.= ((- (id Z)) (#) cos ) . x by B, A7 ;
hence (((- cos ) - ((id Z) (#) sin )) `| Z) . x = ((- (id Z)) (#) cos ) . x ; :: thesis: verum
end;
dom (((- cos ) - ((id Z) (#) sin )) `| Z) = dom ((- (id Z)) (#) cos ) by A2, A5, FDIFF_1:def 8;
then ((- cos ) - ((id Z) (#) sin )) `| Z = (- (id Z)) (#) cos by A6, PARTFUN1:34;
hence integral ((- (id Z)) (#) cos ),A = (((- cos ) - ((id Z) (#) sin )) . (upper_bound A)) - (((- cos ) - ((id Z) (#) sin )) . (lower_bound A)) by A1, A4, Th19, INTEGRA5:13; :: thesis: verum