 reserve a,x for Real;
 reserve n for Element of NAT;
 reserve A for non empty closed_interval Subset of REAL;
 reserve f,h,f1,f2 for PartFunc of REAL,REAL;
 reserve Z for open Subset of REAL;

theorem
 A c= Z & Z = dom (cos+sin) & (cos+sin)|A is continuous implies
 integral(cos+sin,A)=(sin-cos).(upper_bound A)-(sin-cos).(lower_bound A)
proof
  assume
A1:A c= Z & Z = dom (cos+sin) & (cos+sin)|A is continuous;then
A2:cos+sin is_integrable_on A & (cos+sin)|A is bounded by INTEGRA5:10,11;
   Z = dom cos /\ dom sin by A1,VALUED_1:def 1;then
A3:Z c= dom (sin-cos) by VALUED_1:12;
then A4:sin-cos is_differentiable_on Z by FDIFF_7:39;
A5:for x being Element of REAL
    st x in dom ((sin-cos)`|Z) holds ((sin-cos)`|Z).x=(cos+sin).x
   proof
   let x be Element of REAL;
   assume x in dom((sin-cos)`|Z);then
A6:x in Z by A4,FDIFF_1:def 7;
  then ((sin-cos)`|Z).x=cos.x+sin.x by A3,FDIFF_7:39
                 .=(cos+sin).x by A1,A6,VALUED_1:def 1;
   hence thesis;
   end;
  dom((sin-cos)`|Z)=dom (cos+sin) by A1,A4,FDIFF_1:def 7;
  then((sin-cos)`|Z)= (cos+sin) by A5,PARTFUN1:5;
  hence thesis by A1,A2,A3,FDIFF_7:39,INTEGRA5:13;
end;
