reserve r,p,x for Real;
reserve n for Element of NAT;
reserve A for non empty closed_interval Subset of REAL;
reserve Z for open Subset of REAL;
reserve a,b,x for Real;
reserve n for Element of NAT;
reserve A for non empty closed_interval Subset of REAL;
reserve f,f1,f2 for PartFunc of REAL,REAL;
reserve Z for open Subset of REAL;

theorem
  A c= Z & dom ln = Z & Z = dom ((id Z)^) & (id Z)^|A is continuous
  implies integral((id Z)^,A) = ln.(upper_bound A)-ln.(lower_bound A)
proof
  set f2 = (id Z)^;
  assume that
A1: A c= Z and
A2: dom ln = Z and
A3: Z = dom ((id Z)^) and
A4: ((id Z)^)|A is continuous;
A5: f2 is_integrable_on A by A1,A3,A4,INTEGRA5:11;
A6: ln is_differentiable_on Z by A2,FDIFF_5:19;
A7: for x being Element of REAL st x in dom (ln`|Z) holds (ln`|Z).x = f2.x
  proof
    let x be Element of REAL;
    assume x in dom (ln`|Z);
    then
A8: x in Z by A6,FDIFF_1:def 7;
    then (ln`|Z).x = 1/x by A2,FDIFF_5:19
      .= x" by XCMPLX_1:215
      .= ((id Z).x)" by A8,FUNCT_1:18
      .= f2.x by A3,A8,RFUNCT_1:def 2;
    hence thesis;
  end;
  dom (ln`|Z) = dom f2 by A3,A6,FDIFF_1:def 7;
  then (ln`|Z) = f2 by A7,PARTFUN1:5;
  hence thesis by A1,A3,A4,A5,A6,INTEGRA5:10,13;
end;
