reserve X for non empty set,
  S for SigmaField of X,
  M for sigma_Measure of S,
  E for Element of S,
  F,G for Functional_Sequence of X,ExtREAL,
  I for ExtREAL_sequence,
  f,g for PartFunc of X,ExtREAL,
  seq, seq1, seq2 for ExtREAL_sequence,
  p for ExtReal,
  n,m for Nat,
  x for Element of X,
  z,D for set;

theorem Th49:
  E = dom(F.0) & F is with_the_same_dom & (for n be Nat holds F.n
  is nonnegative & F.n is E-measurable) implies ex FF be sequence of
Funcs(NAT,PFuncs(X,ExtREAL)) st for n be Nat holds (for m be Nat holds (FF.n).m
is_simple_func_in S & dom((FF.n).m) = dom(F.n)) & (for m be Nat holds (FF.n).m
is nonnegative) & (for j,k be Nat st j <= k holds for x be Element of X st x in
  dom(F.n) holds ((FF.n).j).x <= ((FF.n).k).x) & for x be Element of X st x in
  dom(F.n) holds (FF.n)#x is convergent & lim((FF.n)#x) = (F.n).x
proof
  assume that
A1: E = dom(F.0) and
A2: F is with_the_same_dom and
A3: for n be Nat holds F.n is nonnegative & F.n is E-measurable;
  defpred Q[Element of NAT,set] means for G be Functional_Sequence of X,
ExtREAL st $2 = G holds (for m be Nat holds G.m is_simple_func_in S & dom(G.m)
  = dom(F.$1)) & (for m be Nat holds G.m is nonnegative) & (for j,k be Nat st j
<= k holds for x be Element of X st x in dom(F.$1) holds (G.j).x <= (G.k).x) &
(for x be Element of X st x in dom(F.$1) holds G#x is convergent & lim(G#x) = (
  F.$1).x);
A4: for n be Element of NAT holds ex G be Functional_Sequence of X,ExtREAL st
(for m be Nat holds G.m is_simple_func_in S & dom(G.m) = dom(F.n)) & (for m be
  Nat holds G.m is nonnegative) & (for j,k be Nat st j <= k holds for x be
Element of X st x in dom(F.n) holds (G.j).x <= (G.k).x ) & for x be Element of
  X st x in dom(F.n) holds (G#x) is convergent & lim(G#x) = (F.n).x
  proof
    let n be Element of NAT;
A5: F.n is E-measurable by A3;
A6: F.n is nonnegative by A3;
    E = dom(F.n) by A1,A2;
    hence thesis by A5,A6,MESFUNC5:64;
  end;
A7: for n be Element of NAT ex G be Element of Funcs(NAT,PFuncs(X,ExtREAL))
  st Q[n,G]
  proof
    let n be Element of NAT;
    consider G be Functional_Sequence of X,ExtREAL such that
A8: for m be Nat holds G.m is_simple_func_in S & dom(G.m) = dom(F.n) and
A9: for m be Nat holds G.m is nonnegative and
A10: for j,k be Nat st j <= k holds for x be Element of X st x in dom(
    F. n) holds (G.j).x <= (G.k).x and
A11: for x be Element of X st x in dom(F.n) holds (G#x) is convergent
    & lim(G#x) = (F.n).x by A4;
    reconsider G as Element of Funcs(NAT,PFuncs(X,ExtREAL)) by FUNCT_2:8;
    take G;
    thus thesis by A8,A9,A10,A11;
  end;
  consider FF be sequence of Funcs(NAT,PFuncs(X,ExtREAL)) such that
A12: for n be Element of NAT holds Q[n,FF.n] from FUNCT_2:sch 3(A7);
  take FF;
  thus for n be Nat holds (for m be Nat holds (FF.n).m is_simple_func_in S &
dom((FF.n).m) = dom(F.n)) & (for m be Nat holds (FF.n).m is nonnegative) & (for
j,k be Nat st j <= k holds for x be Element of X st x in dom(F.n) holds ((FF.n)
.j).x <= ((FF.n).k).x) & for x be Element of X st x in dom(F.n) holds (FF.n)#x
  is convergent & lim((FF.n)#x) = (F.n).x
  proof
    let n be Nat;
    reconsider n1 = n as Element of NAT by ORDINAL1:def 12;
    for G be Functional_Sequence of X,ExtREAL st FF.n1 = G holds (for m
be Nat holds G.m is_simple_func_in S & dom(G.m) = dom(F.n1)) & (for m be Nat
holds G.m is nonnegative) & (for j,k be Nat st j <= k holds for x be Element of
X st x in dom(F.n1) holds (G.j).x <= (G.k).x) & for x be Element of X st x in
    dom(F.n1) holds G#x is convergent & lim(G#x) = (F.n1).x by A12;
    hence thesis;
  end;
end;
