reserve f,f1,f2,g for PartFunc of REAL,REAL;
reserve A for non empty closed_interval Subset of REAL;
reserve p,r,x,x0 for Real;
reserve n for Element of NAT;
reserve Z for open Subset of REAL;

theorem Th39:
  integral(cos,A) = sin.(upper_bound A)-sin.(lower_bound A)
proof
A1: for x being Element of REAL st x in dom (sin`|REAL) holds (sin`|REAL).x
  = cos.x
  proof
    let x be Element of REAL;
    assume x in dom (sin`|REAL);
    (sin`|REAL).x = diff(sin,x) by FDIFF_1:def 7,SIN_COS:68;
    hence thesis by SIN_COS:64;
  end;
A2: cos is_integrable_on A & cos|A is bounded by Lm11;
  dom (sin`|REAL) = dom cos by FDIFF_1:def 7,SIN_COS:24,68;
  then sin`|REAL = cos by A1,PARTFUN1:5;
  hence thesis by A2,INTEGRA5:13,SIN_COS:68;
end;
