reserve A for non empty closed_interval Subset of REAL;
reserve rho for Function of A,REAL;
reserve u for PartFunc of REAL,REAL;
reserve T for DivSequence of A;
reserve S for middle_volume_Sequence of rho,u,T;
reserve k for Nat;

theorem Lm4A:
  for A,B be non empty closed_interval Subset of REAL,
      r be Real, rho,rho1 be Function of A,REAL
    st B c= A & rho = r(#)rho1
   holds vol(B,rho) = r * vol(B,rho1)
proof
  let A,B be non empty closed_interval Subset of REAL,
      r be Real, rho,rho1 be Function of A,REAL;
  assume AS: B c= A & rho = r(#)rho1;
A2: dom(r(#)rho1) = A by FUNCT_2:def 1;
  set x1=upper_bound B;
  set x2=lower_bound B;
A3: B = [. x2, x1 .] by INTEGRA1:4;
A5: x1 - x2 >= 0 by XREAL_1:48,SEQ_4:11;
  |. x2 - x1 .| = x1 - x2
  proof
    per cases by SEQ_4:11,XREAL_1:47;
    suppose x2 - x1 < 0;
      hence |. x2 - x1 .| = -(x2 - x1) by ABSVALUE:def 1
                   .= x1 - x2;
    end;
    suppose x2 - x1 = 0;
     hence |. x2 - x1 .| = x1 - x2 by COMPLEX1:44;
    end;
  end; then
  |. x1 + x2 - 2*x1 .| = x1 - x2; then
A8: x1 in B by A3,RCOMP_1:2;
  |. x1 + x2 - 2*x2 .| = x1 - x2 by A5,ABSVALUE:def 1; then
C9: x2 in B by A3,RCOMP_1:2;
  thus vol(B,rho) = (r(#)rho1).x1 - (r(#)rho1).x2 by AS,Defvol
            .= (r * rho1.x1) - (r(#)rho1).x2 by A2,AS,A8,VALUED_1:def 5
            .= (r * rho1.x1) - (r * rho1.x2) by A2,AS,C9,VALUED_1:def 5
            .= r * (rho1.x1 - rho1.x2)
            .= r * vol(B,rho1) by Defvol;
end;
