reserve Z for RealNormSpace;
reserve a,b,c,d,e,r for Real;
reserve A,B for non empty closed_interval Subset of REAL;
reserve X,Y for RealBanachSpace;
reserve E for Point of Y;

theorem
  for f,g be continuous PartFunc of REAL,the carrier of Y
     st a <= b & ['a,b'] c= dom f & ['a,b'] c= dom g
    & c in ['a,b'] & d in ['a,b']
  holds integral(f-g,c,d) = integral(f,c,d) - integral(g,c,d)
proof
   let f,g be continuous PartFunc of REAL,the carrier of Y;
   assume A1: a <= b & ['a,b'] c= dom f & ['a,b'] c= dom g
      & c in ['a,b'] & d in ['a,b'];
   per cases;
   suppose A2: not c <= d; then
    d = min(c,d) & c = max(c,d) by XXREAL_0:def 9,def 10; then
    ['d,c'] c= ['a,b'] by A1,Lm2; then
A7: ['d,c'] c= dom f & ['d,c'] c= dom g by A1; then
    ['d,c'] c= dom f /\ dom g by XBOOLE_1:19; then
    ['d,c'] c= dom(f-g) by VFUNCT_1:def 2; then
A11:integral(f-g,c,d) = -integral(f-g,d,c)
  & integral(f,c,d) = -integral(f,d,c)
  & integral(g,c,d) = -integral(g,d,c) by A2,A7,Th1947;
    integral(f-g,d,c) = integral(f,d,c) - integral(g,d,c)
      by A1,A2,Th1928; then
    integral(f-g,c,d) = integral(g,d,c) + integral(f,c,d) by A11,RLVECT_1:33;
    hence thesis by A11;
   end;
   suppose c <= d;
    hence thesis by A1,Th1928;
   end;
end;
