
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
 st E c= dom(F.0) & F is additive & F is with_the_same_dom
  & (for n be Nat holds F.n is nonpositive & F.n is E-measurable)
  & (for x be Element of X st x in E holds F#x is summable)
 holds ex I be ExtREAL_sequence st
   (for n be Nat holds I.n = Integral(M,(F.n)|E))
 & I is summable & Integral(M,(lim(Partial_Sums 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;
    assume that
A1:  E c= dom(F.0) and
A2:  F is additive and
A3:  F is with_the_same_dom and
A4:  for n be Nat holds F.n is nonpositive & F.n is E-measurable and
A5:  for x be Element of X st x in E holds F#x is summable;
    set G = -F;
    G.0 = -(F.0) by Th37; then
A6: E c= dom(G.0) by A1,MESFUNC1:def 7;
A7: G is additive by A2,Th41;
A8: G is with_the_same_dom by A3,Th40;
A9: for n be Nat holds G.n is nonnegative & G.n is E-measurable
    proof
     let n be Nat;
     F.n is nonpositive by A4; then
     -(F.n) is nonnegative;
     hence G.n is nonnegative by Th37;
     E c= dom(F.n) by A1,A3,MESFUNC8:def 2; then
     -(F.n) is E-measurable by A4,MEASUR11:63;
     hence G.n is E-measurable by Th37;
    end;
A10:for x be Element of X st x in E holds G#x is summable
    proof
     let x be Element of X;
     assume x in E; then
     F#x is summable by A5;
     hence G#x is summable by Th48;
    end; then
    consider J be ExtREAL_sequence such that
A11: (for n be Nat holds J.n = Integral(M,(G.n)|E))
   & J is summable & Integral(M,(lim(Partial_Sums G))|E) = Sum J
        by A6,A7,A3,Th40,A9,MESFUNC9:51;
    take I = -J;
    thus for n be Nat holds I.n = Integral(M,(F.n)|E)
    proof
     let n be Nat;
     n in NAT by ORDINAL1:def 12; then
A14: n in dom I by FUNCT_2:def 1;
A12: E c= dom(G.n) by A6,A3,Th40,MESFUNC8:def 2;
     G.n = -(F.n) by Th37; then
     F.n = -(G.n) by Th36; then
     Integral(M,(F.n)|E) = - Integral(M,(G.n)|E) by A12,A9,Th55; then
     J.n = - Integral(M,(F.n)|E) by A11; then
     I.n = - - Integral(M,(F.n)|E) by A14,MESFUNC1:def 7;
     hence I.n = Integral(M,(F.n)|E);
    end;
    thus I is summable by A11,Th45;
A15:Partial_Sums J is convergent by A11,MESFUNC9:def 2;
A16:Sum I = lim Partial_Sums I by MESFUNC9:def 3
      .= lim (-(Partial_Sums J)) by Th44
      .= -(lim Partial_Sums J) by A15,DBLSEQ_3:17
      .= - Integral(M,(lim(Partial_Sums G))|E) by A11,MESFUNC9:def 3;
    deffunc F1(Nat) = (F.$1)|E;
    consider F1 be Functional_Sequence of X,ExtREAL such that
A17: for n be Nat holds F1.n = F1(n) from SEQFUNC:sch 1;
    reconsider F1 as additive with_the_same_dom
      Functional_Sequence of X,ExtREAL by A2,A3,A17,MESFUNC9:18,31;
A18:lim(Partial_Sums F1) = (lim(Partial_Sums F))|E
       by A1,A2,A3,A17,Th50;
    deffunc G1(Nat) = (G.$1)|E;
    consider G1 be Functional_Sequence of X,ExtREAL such that
A19: for n be Nat holds G1.n = G1(n) from SEQFUNC:sch 1;
    reconsider G1 as additive with_the_same_dom
      Functional_Sequence of X,ExtREAL by A7,A8,A19,MESFUNC9:18,31;
A20:lim(Partial_Sums G1) = (lim(Partial_Sums G))|E
       by A6,A7,A19,A3,Th40,Th50;
 for n be Element of NAT holds F1.n = (-G1).n
    proof
     let n be Element of NAT;
     G.n = -(F.n) by Th37; then
A21: (-G).n = - -(F.n) by Th37 .= F.n by DBLSEQ_3:2;
A22: F1.n = (F.n)|E by A17;
     (-G1).n = -(G1.n) by Th37; then
     (-G1).n = -(G.n|E) by A19; then
     (-G1).n = (-(G.n))|E by Th3;
     hence F1.n = (-G1).n by A21,A22,Th37;
    end; then
A23:F1 = -G1 by FUNCT_2:def 7;
    G1.0 = (G.0)|E by A19; then
A24:dom (G1.0) = E by A6,RELAT_1:62; then
A25:for x be Element of X st x in dom(G1.0) holds G1#x is summable
      by A6,A10,A19,MESFUNC9:21; then
A26:lim Partial_Sums F1 = -(lim Partial_Sums G1) by A23,Th49;
    for n be Nat holds G1.n is E-measurable & G1.n is without-infty
    proof
     let n be Nat;
     thus G1.n is E-measurable by A6,A9,A19,A3,Th40,MESFUNC9:20;
     (G.n)|E is nonnegative by A9,MESFUNC5:15;
     hence G1.n is without-infty by A19;
    end; then
A27:for n be Nat holds (Partial_Sums G1).n is E-measurable
      by MESFUNC9:41;
    dom(lim(Partial_Sums G1)) = dom((Partial_Sums G1).0) by MESFUNC8:def 9
     .= dom(G1.0) by MESFUNC9:def 4; then
    Integral(M,(-(lim(Partial_Sums G1)))|E)
     = - Integral(M,(lim(Partial_Sums G1))|E)
       by A24,A25,A27,Th55,MESFUNC9:44;
    hence Integral(M,(lim(Partial_Sums F))|E) = Sum I by A16,A18,A20,A26;
end;
