reserve X for non empty set,
  F for with_the_same_dom Functional_Sequence of X, ExtREAL,
  seq,seq1,seq2 for ExtREAL_sequence,
  x for Element of X,
  a,r for R_eal,
  n,m,k for Nat;
reserve S for SigmaField of X,
  M for sigma_Measure of S,
  E for Element of S;
reserve F1,F2 for Functional_Sequence of X,ExtREAL,
  f,g,P for PartFunc of X, ExtREAL;

theorem
  M.E < +infty & E = dom(F.0) & (for n be Nat holds F.n is E-measurable
  ) & F is uniformly_bounded & (for x be Element of X st x in E holds F#x is
  convergent) implies (for n be Nat holds F.n is_integrable_on M) & lim F
  is_integrable_on M & ex I be ExtREAL_sequence st (for n be Nat holds I.n =
  Integral(M,F.n)) & I is convergent & lim I = Integral(M,lim F)
proof
  assume that
A1: M.E < +infty and
A2: E = dom(F.0) and
A3: for n be Nat holds F.n is E-measurable and
A4: F is uniformly_bounded and
A5: for x be Element of X st x in E holds F#x is convergent;
  consider K1 be Real such that
A6: for n be Nat, x be set st x in dom(F.0) holds |. (F.n).x .| <= K1 by A4;
  set K = max(K1,1);
  K in REAL by XREAL_0:def 1;
  then consider h be PartFunc of X,ExtREAL such that
A7: h is_simple_func_in S and
A8: dom h = E and
A9: for x be object st x in E holds h.x = K by MESFUNC5:41,NUMBERS:31;
A10: dom h = dom |.h.| by MESFUNC1:def 10;
A11: K > 0 by XXREAL_0:30;
  then
A12: K * +infty = +infty by XXREAL_3:def 5;
  for x be object st x in E holds h.x >= 0. by A11,A9;
  then
A13: h is nonnegative by A8,SUPINF_2:52;
  then
A14: Integral(M,h) = integral'(M,h) by A7,MESFUNC5:89;
A15: integral'(M,h) = K * M.(dom h) by A11,A8,A9,MESFUNC5:104;
A16: for x be Element of X st x in dom h holds h.x = |.h.|.x
  proof
    let x be Element of X;
    assume x in dom h;
    then
A17: x in dom |.h.| by MESFUNC1:def 10;
    0 <= h.x by A13,SUPINF_2:51;
    then |. h.x .| = h.x by EXTREAL1:def 1;
    hence thesis by A17,MESFUNC1:def 10;
  end;
  Integral(M,h) = integral+(M,h) by A7,A13,MESFUNC5:89;
  then integral+(M,h) < +infty by A1,A11,A8,A15,A12,A14,XXREAL_3:72;
  then
A18: integral+(M,|.h.|) < +infty by A10,A16,PARTFUN1:5;
A19: dom max+h = dom h by MESFUNC2:def 2;
  then
A20: max+h|E = max+h by A8,RELAT_1:68;
A21: max+h is E-measurable by A7,MESFUNC2:25,34;
  for x be object st x in dom max-h holds 0. <= (max-h).x by MESFUNC2:13;
  then
A22: max-h is nonnegative by SUPINF_2:52;
A23: K >= K1 by XXREAL_0:25;
A24: for n be Nat, x be set st x in dom(F.0) holds |. (F.n).x .| <= K
  proof
    let n be Nat, x be set;
    assume x in dom(F.0);
    then |. (F.n).x .| <= K1 by A6;
    hence thesis by A23,XXREAL_0:2;
  end;
A25: for x be Element of X, n be Nat st x in E holds (|. F.n .|).x <= h.x
  proof
    let x be Element of X, n be Nat;
    assume
A26: x in E;
    dom(F.n) = dom(|.(F.n).|) by MESFUNC1:def 10;
    then x in dom(|.(F.n).|) by A2,A26,MESFUNC8:def 2;
    then
A27: |. F.n .|.x = |. (F.n).x .| by MESFUNC1:def 10;
    |. (F.n).x .| <= K by A2,A24,A26;
    hence thesis by A9,A26,A27;
  end;
  for x be object st x in dom max+h holds 0. <= (max+h).x by MESFUNC2:12;
  then
A28: max+h is nonnegative by SUPINF_2:52;
  then
A29: dom(max+h + max-h) = dom max+h /\ dom max-h by A22,MESFUNC5:22;
A30: dom max-h = dom h by MESFUNC2:def 3;
  then
A31: max-h|E = max-h by A8,RELAT_1:68;
  max-h is E-measurable by A7,A8,MESFUNC2:26,34;
  then ex C be Element of S st C = dom(max+h + max-h) & integral+(M,max+h +
  max-h) = integral+(M,max+h|C) + integral+(M,max-h|C) by A8,A19,A30,A21,A28
,A22,MESFUNC5:78;
  then
A32: integral+(M,max+h) + integral+(M,max-h) < +infty by A8,A19,A30,A29,A20,A31
,A18,MESFUNC2:24;
A33: for x be Element of X st x in dom(lim F) holds (lim F).x = (lim_inf F). x
  proof
    let x be Element of X;
    assume
A34: x in dom(lim F);
    then x in E by A2,MESFUNC8:def 9;
    then F#x is convergent by A5;
    hence thesis by A34,MESFUNC8:14;
  end;
A35: dom(lim_inf F) = dom (F.0) by MESFUNC8:def 7;
A36: h is E-measurable by A7,MESFUNC2:34;
  then 0 <= integral+(M,max-h) by A8,A30,A22,MESFUNC2:26,MESFUNC5:79;
  then integral+(M,max+h) <> +infty by A32,XXREAL_3:def 2;
  then
A37: integral+(M,max+h) < +infty by XXREAL_0:4;
  0 <= integral+(M,max+h) by A8,A36,A19,A28,MESFUNC2:25,MESFUNC5:79;
  then integral+(M,max-h) <> +infty by A32,XXREAL_3:def 2;
  then integral+(M,max-h) < +infty by XXREAL_0:4;
  then
A38: h is_integrable_on M by A8,A36,A37;
  then
A39: ex I be ExtREAL_sequence st (for n be Nat holds I.n = Integral(M,F.n))
& lim_inf I >= Integral(M,lim_inf F) & lim_sup I <= Integral(M,lim_sup F) & ( (
  for x be Element of X st x in E holds F#x is convergent) implies I is
  convergent & lim I = Integral(M,lim F) ) by A2,A3,A8,A13,A25,Th17;
A40: now
    let n be Nat;
A41: E = dom(F.n) by A2,MESFUNC8:def 2;
A42: F.n is E-measurable by A3;
    |. F.n .| is_integrable_on M by A2,A3,A8,A38,A25,Th16;
    hence F.n is_integrable_on M by A41,A42,MESFUNC5:100;
  end;
A43: |. lim_inf F .| is_integrable_on M by A2,A3,A8,A38,A25,Th16;
  dom(lim F) = dom (F.0) by MESFUNC8:def 9;
  then
A44: lim F = lim_inf F by A35,A33,PARTFUN1:5;
  then lim F is E-measurable by A2,A3,MESFUNC8:24;
  hence thesis by A2,A5,A43,A40,A35,A44,A39,MESFUNC5:100;
end;
