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