
theorem Th36:
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 integral(M,f) = integral(COM M,f)
proof
    let X be non empty set, S be SigmaField of X, M be sigma_Measure of S,
    f be PartFunc of X,ExtREAL;
    assume that
A1:  f is_simple_func_in S and
A2:  f is nonnegative;

    consider F be Finite_Sep_Sequence of S, a,x be FinSequence of ExtREAL
     such that
A3:  F,a are_Re-presentation_of f and
A4:  a.1 = 0. and
A5:  for n be Nat st 2 <= n & n in dom a holds
       0. < a.n & a.n < +infty 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,MESFUNC3:def 2;

A9:f is_simple_func_in COM(S,M) by A1,Th33;

    reconsider F1=F as Finite_Sep_Sequence of COM(S,M) by Th32;
A10: dom f = union rng F1 by A3,MESFUNC3:def 1;
A11: dom F1 = dom a by A3,MESFUNC3:def 1;
    for n be Nat st n in dom F1
     for x be object st x in F1.n holds f.x=a.n by A3,MESFUNC3:def 1; then
A12: F1,a are_Re-presentation_of f by A10,A11,MESFUNC3:def 1;

    for n be Nat st n in dom x holds x.n = a.n*((COM M)*F1).n
    proof
     let n be Nat;
     assume A13: n in dom x; then
     (M*F).n = M.(F.n) by A6,FUNCT_1:13; then
     (M*F).n = (COM M).(F1.n) by Th35; then
     (M*F).n = ((COM M)*F1).n by A13,A6,FUNCT_1:13;
     hence x.n = a.n*((COM M)*F1).n by A7,A13;
    end;
    hence integral(M,f) = integral(COM M,f)
      by A8,A9,A2,A12,A4,A5,A6,MESFUNC3:def 2;
end;
