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 be PartFunc of REAL,the carrier of Y
    st a <= b & c in ['a,b'] & d in ['a,b'] & ['a,b'] c= dom f
     & for x be Real st x in ['a,b'] holds f/.x = E
  holds integral(f,c,d) = (d-c)*E
proof
   let f be PartFunc of REAL,the carrier of Y;
   assume that
A1: a <= b & c in ['a,b'] & d in ['a,b'] and
A3: ['a,b'] c= dom f & for x be Real st x in ['a,b'] holds f/.x = E;
   per cases;
   suppose A5: c <= d; then
    c = min(c,d) & d = max(c,d) by XXREAL_0:def 9,def 10; then
    ['c,d'] c= ['a,b'] by A1,Lm2; then
    ['c,d'] c= dom f & for x be Real st x in ['c,d'] holds f/.x = E by A3;
    hence integral(f,c,d) = (d-c)*E by A5,Th1929;
   end;
   suppose A8: 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
A10:['d,c'] c= dom f & for x be Real st x in ['d,c'] holds f/.x = E by A3; then
    integral(f,c,d) = -integral(f,d,c) by A8,Th1947; then
    integral(f,c,d) = -(c-d)*E by A8,A10,Th1929; then
    integral(f,c,d) = (-(c-d))*E by RLVECT_1:79;
    hence integral(f,c,d) = (d-c)*E;
   end;
end;
