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 Th22:
  f|A is bounded & r <= 0 implies (lower_sum_set(r(#)f)).D <= r*(
  lower_bound rng f)*vol(A)
proof
  assume that
A1: f|A is bounded and
A2: r <= 0;
A3: rng f is bounded_below by A1,INTEGRA1:11;
A4: (r(#)f)|A is bounded by A1,RFUNCT_1:80;
  then
A5: upper_sum(r(#)f,D) <= (upper_bound rng(r(#)f))*vol(A) by INTEGRA1:27;
  (lower_sum_set(r(#)f)).D = lower_sum(r(#)f,D) by INTEGRA1:def 11;
  then
A6: (lower_sum_set(r(#)f)).D <= upper_sum(r(#)f,D) by A4,INTEGRA1:28;
  (upper_bound rng(r(#)f))=upper_bound (r**(rng f)) by Th17
    .=r*(lower_bound rng f) by A2,A3,Th16;
  hence thesis by A6,A5,XXREAL_0:2;
end;
