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

theorem Th5:
  integral( #Z 0 / ( #Z 0 + #Z 2),A) =
    arctan.(upper_bound A) - arctan.(lower_bound A)
proof
  set Z0=#Z 0,Z2=#Z 2,f=Z0/(Z0+Z2);
A1:dom f = REAL by Th4;
  f is continuous by Th4;
  then
A2: f |A is continuous;
A3:r in REAL implies f.r=1/(1+r^2)
  proof
    r|^0=1 by NEWTON:4;
    hence thesis by Th4;
  end;
A4:[#]REAL is open;
A5:dom arctan = REAL by FUNCT_2:def 1;
A6: arctan is_differentiable_on REAL by A5,FDIFF_1:def 8;
A7: for x being Element of REAL st x in dom ((arctan)`|REAL)
     holds ((arctan)`|REAL).x = f.x
  proof
    let x be Element of REAL;
    assume x in dom ((arctan)`|REAL);
    ((arctan)`|REAL).x = 1/(1+x^2) by Th3,A4
                      .= f.x by A3;
    hence thesis;
  end;
A8: ((arctan)`|REAL) = f by A6,A1,FDIFF_1:def 7, A7;
  f is_integrable_on A & f|A is bounded by A1,A2,INTEGRA5:10,11;
  hence thesis by A4,A8,INTEGRA5:13,Th3;
end;
