reserve i,j,k,n,n1,n2,m for Nat;
reserve a,r,x,y for Real;
reserve A for non empty closed_interval Subset of REAL;
reserve C for non empty set;
reserve X for set;

theorem Th4:
  for f being Function of A,REAL, r st rng f = {r} holds f is
  integrable & integral(f)=r*vol(A)
proof
  let f be Function of A,REAL;
  let r;
A1: chi(A,A) is Function of A, REAL by FUNCT_2:68,RFUNCT_1:62;
A2: integral(chi(A,A))=vol(A) by Th2;
  assume rng f={r};
  then
A3: f=r(#)chi(A,A) by Th3;
A4: rng chi(A,A) is real-bounded by INTEGRA1:17;
  then
A5: chi(A,A)|A is bounded_above by INTEGRA1:14;
A6: chi(A,A)|A is bounded_below by A4,INTEGRA1:12;
  chi(A,A) is integrable by Th2;
  hence thesis by A3,A2,A1,A5,A6,INTEGRA2:31;
end;
