reserve i,k,n,m for Element of NAT;
reserve a,b,r,r1,r2,s,x,x1,x2 for Real;
reserve A for non empty closed_interval Subset of REAL;
reserve X for set;

theorem
  for f being PartFunc of REAL,REAL,
   A being non empty closed_interval Subset of
  REAL, a,b st A=[.b,a.] holds -integral(f,A)=integral(f,a,b)
proof
  let f be PartFunc of REAL,REAL;
  let A be non empty closed_interval Subset of REAL;
  let a,b;
  consider a1,b1 being Real such that
A1: a1 <= b1 and
A2: A = [.a1,b1.] by MEASURE5:14;
  assume
A3: A = [.b,a.];
  then
A4: a1 = b & b1 = a by A2,INTEGRA1:5;
  now
    per cases by A1,A4,XXREAL_0:1;
    suppose
A5:   b < a;
      then integral(f,a,b)=-integral(f,[' b,a ']) by Def4;
      hence thesis by A3,A5,Def3;
    end;
    suppose
A6:   b = a;
      A=[.lower_bound A,upper_bound A.] by INTEGRA1:4;
      then lower_bound A = b & upper_bound A = a by A3,INTEGRA1:5;
      then vol(A)=upper_bound A-upper_bound A by A6,INTEGRA1:def 5
        .=0;
      then
A7:   integral(f,A)=0 by INTEGRA4:6;
      integral(f,a,b)=integral(f,[' a,b ']) by A6,Def4;
      hence thesis by A3,A6,A7,Def3;
    end;
  end;
  hence thesis;
end;
