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 Lm6A:
  for A,B be non empty closed_interval Subset of REAL,
      rho,rho1,rho2 be Function of A,REAL
    st B c= A & rho = rho1 + rho2
   holds vol(B,rho) = vol(B,rho1) + vol(B,rho2)
proof
  let A,B be non empty closed_interval Subset of REAL,
      rho,rho1,rho2 be Function of A,REAL;
  assume AS: B c= A & rho = rho1 + rho2;
A1: dom rho1 = A & dom rho2 = A by FUNCT_2:def 1;
A2: dom(rho1+rho2) = dom rho1 /\ dom rho2 by VALUED_1:def 1
                  .= A by A1;
  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
B9: x2 in B by A3,RCOMP_1:2;
  thus vol(B,rho) = (rho1+rho2).x1 - (rho1+rho2).x2 by AS,Defvol
   .= (rho1.x1 + rho2.x1) - (rho1+rho2).x2 by A2,AS,A8,VALUED_1:def 1
   .= (rho1.x1 + rho2.x1) - (rho1.x2 + rho2.x2) by B9,A2,AS,VALUED_1:def 1
   .= (rho1.x1 - rho1.x2) + (rho2.x1 - rho2.x2)
   .= vol(B,rho1) + (rho2.x1 - rho2.x2) by Defvol
   .= vol(B,rho1) + vol(B,rho2) by Defvol;
end;
