
theorem
for X be non empty set, S be SigmaField of X, M be sigma_Measure of S,
 F be Functional_Sequence of X,ExtREAL, E be Element of S,
 f be PartFunc of X,ExtREAL
 st E c= dom f & f is nonpositive & f is E-measurable &
 (for n be Nat holds
    F.n is_simple_func_in S & F.n is nonpositive & E c= dom(F.n)) &
 (for x be Element of X st x in E holds F#x is summable & f.x = Sum(F#x))
 holds ex I be ExtREAL_sequence st
   (for n be Nat holds I.n = Integral(M,(F.n)|E)) & I is summable &
   Integral(M,f|E) = Sum I
proof
    let X be non empty set, S be SigmaField of X, M be sigma_Measure of S,
    F be Functional_Sequence of X,ExtREAL, E be Element of S,
    f be PartFunc of X,ExtREAL;
    assume that
A1:  E c= dom f and
A2:  f is nonpositive and
A3:  f is E-measurable and
A4:  for n be Nat holds
       F.n is_simple_func_in S & F.n is nonpositive & E c= dom(F.n) and
A5:  for x be Element of X st x in E holds F#x is summable & f.x = Sum(F#x);
    set g = -f, G = -F;
A6: E c= dom g by A1,MESFUNC1:def 7;
    now let n be Nat;
     F.n is nonpositive by A4; then
     -(F.n) is without-infty;
     hence G.n is without-infty by Th37;
    end; then
A7: G is additive by Th47;
A8: for n be Nat holds
       G.n is_simple_func_in S & G.n is nonnegative & E c= dom(G.n)
    proof
     let n be Nat;
     (-1)(#)(F.n) is_simple_func_in S by A4,MESFUNC5:39; then
     -(F.n) is_simple_func_in S by MESFUNC2:9;
     hence G.n is_simple_func_in S by Th37;
     F.n is nonpositive by A4; then
     -(F.n) is nonnegative;
     hence G.n is nonnegative by Th37;
     E c= dom(F.n) by A4; then
     E c= dom(-(F.n)) by MESFUNC1:def 7;
     hence E c= dom(G.n) by Th37;
    end;
A9: for x be Element of X st x in E holds G#x is summable & g.x = Sum(G#x)
    proof
     let x be Element of X;
     assume A10: x in E; then
A11: F#x is summable & f.x = Sum(F#x) by A5;
     hence G#x is summable by Th48;
     g.x = -(f.x) by A6,A10,MESFUNC1:def 7;
     hence g.x = Sum(G#x) by A11,Th48;
    end;
    consider J be ExtREAL_sequence such that
A12: (for n be Nat holds J.n = Integral(M,(G.n)|E)) & J is summable
   & Integral(M,g|E) = Sum J by A2,A1,A3,A6,A7,A8,A9,MESFUNC9:47,MEASUR11:63;
    take I = -J;
    thus for n be Nat holds I.n = Integral(M,(F.n)|E)
    proof
     let n be Nat;
     dom I = NAT by FUNCT_2:def 1; then
     n in dom I by ORDINAL1:def 12; then
     I.n = -(J.n) by MESFUNC1:def 7; then
A13: I.n = - Integral(M,(G.n)|E) by A12;
A14: E c= dom(G.n) by A8;
A15: G.n is E-measurable by A8,MESFUNC2:34;
     G.n = -(F.n) by Th37; then
     F.n = -(G.n) by Th36;
     hence I.n = Integral(M,(F.n)|E) by A13,A14,A15,Th55;
    end;
    thus I is summable by A12,Th45;
A16:Integral(M,g|E) = - Integral(M,f|E) by A1,A3,Th55;
    Partial_Sums J is convergent by A12,MESFUNC9:def 2; then
    lim -(Partial_Sums J) = - lim (Partial_Sums J) by DBLSEQ_3:17
     .= - Integral(M,g|E) by A12,MESFUNC9:def 3; then
    lim Partial_Sums I = - Integral(M,g|E) by Th44;
    hence Integral(M,f|E) = Sum I by A16,MESFUNC9:def 3;
end;
