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;
reserve f, f1, f2, f3 for PartFunc of REAL, REAL;

theorem
  A c= Z & f1=#Z 2 & (for x st x in Z holds f2.x=1 & x<>0 & f.x=2*x/(1+x
^2)^2) & dom (f1/(f2+f1))=Z & Z = dom f & f|A is continuous implies integral(f,
  A) = (f1/(f2+f1)).(upper_bound A)-(f1/(f2+f1)).(lower_bound A)
proof
  assume that
A1: A c= Z and
A2: f1=#Z 2 and
A3: for x st x in Z holds f2.x=1 & x<>0 & f.x=2*x/(1+x^2)^2 and
A4: dom (f1/(f2+f1))=Z and
A5: Z = dom f and
A6: f|A is continuous;
A7: f is_integrable_on A by A1,A5,A6,INTEGRA5:11;
A8: for x st x in Z holds f2.x=1 & x<>0 by A3;
  then
A9: (f1/(f2+f1)) is_differentiable_on Z by A2,A4,FDIFF_6:7;
A10: for x being Element of REAL
st x in dom ((f1/(f2+f1))`|Z) holds ((f1/(f2+f1))`|Z).x = f.x
  proof
    let x be Element of REAL;
    assume x in dom ((f1/(f2+f1))`|Z);
    then
A11: x in Z by A9,FDIFF_1:def 7;
    then ((f1/(f2+f1))`|Z).x = 2*x/(1+x^2)^2 by A2,A4,A8,FDIFF_6:7
      .= f.x by A3,A11;
    hence thesis;
  end;
  dom ((f1/(f2+f1))`|Z) = dom f by A5,A9,FDIFF_1:def 7;
  then ((f1/(f2+f1))`|Z) = f by A10,PARTFUN1:5;
  hence thesis by A1,A5,A6,A7,A9,INTEGRA5:10,13;
end;
