reserve i,n,m for Nat,
        r,s for Real,
        A for non empty closed_interval Subset of REAL;

theorem Th7:
  A=[.0,r.] & r >=0 implies
    |.integral( #Z (2*n) / ( #Z 0 + #Z 2),A).| <= 1/(2*n+1)*( r |^ (2*n+1))
proof
  set Z0= #Z 0,Z2= #Z 2,N=2*n,Zn = #Z N,f = Zn / ( Z0 + Z2);
  assume
A1: A=[.0,r.] & r >=0;
A2:f is continuous & dom f=REAL by Th4;
  then dom (f|A)=A by RELAT_1:62;
  then f|A is total by PARTFUN1:def 2;
  then reconsider fA=f||A as Function of A,REAL;
A3: f|A is continuous by A2;
  then
A4: f|A is bounded & f is_integrable_on A &fA|A=f|A by INTEGRA5:11,10,A2;
A5: fA is integrable by A3, INTEGRA5:def 1,INTEGRA5:11,A2;
A6:Zn is continuous & dom Zn=REAL by FUNCT_2:def 1;
  then dom (Zn|A)=A by RELAT_1:62;
  then Zn|A is total by PARTFUN1:def 2;
  then reconsider ZnA=Zn||A as Function of A,REAL;
A7: Zn|A is continuous;
  then
A8: Zn|A is bounded & Zn is_integrable_on A &ZnA|A=Zn|A
    by INTEGRA5:11,10,A6;
A9: ZnA is integrable by A7,INTEGRA5:def 1,INTEGRA5:11,A6;
  for r st r in A holds fA.r <= ZnA.r
  proof
    let r;
    assume r in A;
    then
A10: fA.r = f.r & ZnA.r = Zn.r by FUNCT_1:49;
A11: Zn.r = r #Z N by TAYLOR_1:def 1
         .= r|^ N by PREPOWER:36;
A12: r|^N >= 0 by POWER:3;
    r^2 +1 >= 1+0 by XREAL_1:6;
    then 1 / (1+r^2) <= 1 by XREAL_1:183;
    then (r|^N) * 1 / (1+r^2) <= (r|^N)*1 by A12,XREAL_1:64;
    hence thesis by A11,Th4,A10;
  end;
  then
A13:integral(fA) <= integral(ZnA) by A4,A5,A8,A9,INTEGRA2:34;
A14: integral(f,A) = integral(fA) by INTEGRA5:def 2;
A15:lower_bound A=0 & upper_bound A = r by A1,JORDAN5A:19;
A16:N in NAT by ORDINAL1:def 12;
  0|^(N+1) =0 by NEWTON:84;
  then
A17:((1/(N+1))*(0 |^ (N+1)))=0;
A18:integral(ZnA) = integral(Zn,A) by INTEGRA5:def 2
                 .= ((1/(N+1))*(r |^ (N+1)))-0 by A16,A15,A17,INTEGRA9:19;
A19: dom abs f= dom f by VALUED_1:def 11;
  for x be object st x in REAL holds f.x=(abs f).x
  proof
    let x be object;assume x in REAL;
    then reconsider r=x as Element of REAL;
    N=n+n;
    then
A20: r|^N = (r|^n)*(r|^n) by NEWTON:8;
A21: f.r = (r|^N)/(1+r^2) by Th4;
    thus (abs f).x = |. f.r .| by A2,A19,VALUED_1:def 11
                  .= f.x by A20,A21,ABSVALUE:def 1;
  end;
  then
A22:abs f =f by A19,A2;
  |.integral(f,A).| <= integral(abs f, A) by A2,INTEGRA6:7,A4;
  hence thesis by A13,A14,A18,XXREAL_0:2,A22;
end;
