reserve r,x,x0,a,b for Real;
reserve n,m for Element of NAT;
reserve A for non empty closed_interval Subset of REAL;
reserve Z for open Subset of REAL;

theorem
  m+n<>0 & m-n<>0 implies integral((sin*AffineMap(m,0))(#)(cos*AffineMap
  (n,0)),A) = ((-(1/(2*(m+n)))(#)(cos*AffineMap(m+n,0)))- (1/(2*(m-n)))(#)(cos*
AffineMap(m-n,0))).(upper_bound A) -((-(1/(2*(m+n)))(#)(cos*AffineMap(m+n,0)))
- (1/(2*(
  m-n)))(#)(cos*AffineMap(m-n,0))).(lower_bound A)
proof
  assume
A1: m+n<>0 & m-n<>0;
A2: for x st x in REAL holds AffineMap(n,0).x=n*x
  proof
    let x;
    assume x in REAL;
    (AffineMap(n,0)).x = n*x + 0 by FCONT_1:def 4
      .=n*x;
    hence thesis;
  end;
A3: dom (cos*AffineMap(n,0)) = [#]REAL by FUNCT_2:def 1;
A4: dom (sin*AffineMap(m,0)) = [#]REAL by FUNCT_2:def 1;
A5: for x st x in REAL holds AffineMap(m,0).x=m*x
  proof
    let x;
    assume x in REAL;
    (AffineMap(m,0)).x = m*x + 0 by FCONT_1:def 4
      .=m*x;
    hence thesis;
  end;
A6: for x being Element of REAL
st x in dom (((-(1/(2*(m+n)))(#)(cos*AffineMap(m+n,0)))- (1/(2*(m
-n)))(#)(cos*AffineMap(m-n,0)))`|REAL) holds (((-(1/(2*(m+n)))(#)(cos*AffineMap
(m+n,0)))- (1/(2*(m-n)))(#)(cos*AffineMap(m-n,0)))`|REAL).x = ((sin*AffineMap(m
  ,0))(#)(cos*AffineMap(n,0))).x
  proof
    let x be Element of REAL;
    assume
    x in dom (((-(1/(2*(m+n)))(#)(cos*AffineMap(m+n,0)))- (1/(2*(m-n)))(#)
    (cos*AffineMap(m-n,0)))`|REAL);
    (((-(1/(2*(m+n)))(#)(cos*AffineMap(m+n,0)))- (1/(2*(m-n)))(#)(cos*
    AffineMap(m-n,0)))`|REAL).x = sin.(m*x)*cos.(n*x) by A1,Th7
      .= sin.(AffineMap(m,0).x)*cos.(n*x) by A5
      .= (sin.(AffineMap(m,0).x))*(cos.(AffineMap(n,0).x)) by A2
      .= ((sin*AffineMap(m,0)).x)*(cos.(AffineMap(n,0).x)) by A4,FUNCT_1:12
      .= ((sin*AffineMap(m,0)).x)*((cos*AffineMap(n,0)).x) by A3,FUNCT_1:12
      .= ((sin*AffineMap(m,0))(#)(cos*AffineMap(n,0))).x by VALUED_1:5;
    hence thesis;
  end;
A7: [#]REAL=dom ((sin*AffineMap(m,0))(#)(cos*AffineMap(n,0))) by FUNCT_2:def 1;
  ((sin*AffineMap(m,0))(#)(cos*AffineMap(n,0)))|A is continuous;
  then
A8: ((sin*AffineMap(m,0))(#)(cos*AffineMap(n,0))) is_integrable_on A by A7,
INTEGRA5:11;
  ((-(1/(2*(m+n)))(#)(cos*AffineMap(m+n,0)))- (1/(2*(m-n)))(#)(cos*
  AffineMap(m-n,0))) is_differentiable_on REAL by A1,Th7;
  then dom (((-(1/(2*(m+n)))(#)(cos*AffineMap(m+n,0)))- (1/(2*(m-n)))(#)(cos*
  AffineMap(m-n,0)))`|REAL) = dom ((sin*AffineMap(m,0))(#)(cos*AffineMap(n,0)))
  by A7,FDIFF_1:def 7;
  then
A9: (((-(1/(2*(m+n)))(#)(cos*AffineMap(m+n,0)))- (1/(2*(m-n)))(#)(cos*
AffineMap(m-n,0)))`|REAL) = (sin*AffineMap(m,0))(#)(cos*AffineMap(n,0)) by A6,
PARTFUN1:5;
  ((sin*AffineMap(m,0))(#)(cos*AffineMap(n,0)))|A is bounded by A7,INTEGRA5:10;
  hence thesis by A1,A8,A9,Th7,INTEGRA5:13;
end;
