
theorem Th68:
  for X be non empty set, S be SigmaField of X, M be sigma_Measure
  of S, f be PartFunc of X,ExtREAL st f is_simple_func_in S & f is nonnegative
  holds 0 <= integral'(M,f)
proof
  let X be non empty set;
  let S be SigmaField of X;
  let M be sigma_Measure of S;
  let f be PartFunc of X,ExtREAL;
  assume that
A1: f is_simple_func_in S and
A2: f is nonnegative;
  per cases;
  suppose
    dom f = {};
    hence thesis by Def14;
  end;
  suppose
A4: dom f <> {};
    then consider
    F be Finite_Sep_Sequence of S, a,x be FinSequence of ExtREAL such
    that
A5: F,a are_Re-presentation_of f and
A6: dom x = dom F and
A7: for n be Nat st n in dom x holds x.n=a.n*(M*F).n and
A8: integral(M,f)=Sum x by A1,A2,MESFUNC4:4;
A9: for n be Nat st n in dom x holds 0 <= x.n
    proof
      let n be Nat;
      assume
A10:  n in dom x;
      per cases;
      suppose
        F.n = {};
        then M.(F.n) = 0 by VALUED_0:def 19;
        then (M*F).n = 0 by A6,A10,FUNCT_1:13;
        then a.n*(M*F).n = 0;
        hence thesis by A7,A10;
      end;
      suppose
        F.n <> {};
        then consider v be object such that
A11:    v in F.n by XBOOLE_0:def 1;
        F.n in rng F by A6,A10,FUNCT_1:3;
        then reconsider Fn=F.n as Element of S;
        0 <= M.Fn by MEASURE1:def 2;
        then
A12:    0 <= (M*F).n by A6,A10,FUNCT_1:13;
        f.v = a.n by A5,A6,A10,A11,MESFUNC3:def 1;
        then 0 <= a.n by A2,SUPINF_2:51;
        then 0 <= a.n*(M*F).n by A12;
        hence thesis by A7,A10;
      end;
    end;
    integral'(M,f) = integral(M,f) by A4,Def14;
    hence thesis by A8,A9,Th53;
  end;
end;
