reserve a,b,r,x,y for Real,
  i,j,k,n for Nat,
  x1 for set;
reserve A, B for non empty closed_interval Subset of REAL;
reserve f, g for Function of A,REAL;
reserve D, D1, D2 for Division of A;

theorem Th24:
  i in dom D & f|A is bounded_above & r <= 0 implies lower_volume(
  r(#)f,D).i = r*upper_volume(f,D).i
proof
  assume that
A1: i in dom D and
A2: f|A is bounded_above and
A3: r <= 0;
  dom(f|divset(D,i)) = dom f /\ divset(D,i) by RELAT_1:61
    .= A /\ divset(D,i) by FUNCT_2:def 1
    .= divset(D,i) by A1,INTEGRA1:8,XBOOLE_1:28;
  then
A4: rng(f|divset(D,i)) is non empty by RELAT_1:42;
  rng f is bounded_above by A2,INTEGRA1:13;
  then
A5: rng(f|divset(D,i)) is bounded_above by RELAT_1:70,XXREAL_2:43;
  lower_volume(r(#)f,D).i =(lower_bound(rng((r(#)f)|divset(D,i))))*vol(
  divset(D,i)) by A1,INTEGRA1:def 7
    .=(lower_bound(rng(r(#)f|divset(D,i))))*vol(divset(D,i)) by RFUNCT_1:49
    .=(lower_bound(r**rng(f|divset(D,i))))*vol(divset(D,i)) by Th18
    .=(r*upper_bound(rng(f|divset(D,i))))*vol(divset(D,i)) by A3,A4,A5,Th14
    .=r*(upper_bound(rng(f|divset(D,i)))*vol(divset(D,i)))
    .=r*upper_volume(f,D).i by A1,INTEGRA1:def 6;
  hence thesis;
end;
