let X be non empty set ; :: thesis: for S being SigmaField of X
for f being PartFunc of X,ExtREAL st ex A being Element of S st
( A = dom f & f is A -measurable ) & f is nonpositive holds
ex F being Functional_Sequence of X,ExtREAL st
( ( for n being Nat holds
( F . n is_simple_func_in S & dom (F . n) = dom f ) ) & ( for n being Nat holds F . n is nonpositive ) & ( for n, m being Nat st n <= m holds
for x being Element of X st x in dom f holds
(F . n) . x >= (F . m) . x ) & ( for x being Element of X st x in dom f holds
( F # x is convergent & lim (F # x) = f . x ) ) )

let S be SigmaField of X; :: thesis: for f being PartFunc of X,ExtREAL st ex A being Element of S st
( A = dom f & f is A -measurable ) & f is nonpositive holds
ex F being Functional_Sequence of X,ExtREAL st
( ( for n being Nat holds
( F . n is_simple_func_in S & dom (F . n) = dom f ) ) & ( for n being Nat holds F . n is nonpositive ) & ( for n, m being Nat st n <= m holds
for x being Element of X st x in dom f holds
(F . n) . x >= (F . m) . x ) & ( for x being Element of X st x in dom f holds
( F # x is convergent & lim (F # x) = f . x ) ) )

let f be PartFunc of X,ExtREAL; :: thesis: ( ex A being Element of S st
( A = dom f & f is A -measurable ) & f is nonpositive implies ex F being Functional_Sequence of X,ExtREAL st
( ( for n being Nat holds
( F . n is_simple_func_in S & dom (F . n) = dom f ) ) & ( for n being Nat holds F . n is nonpositive ) & ( for n, m being Nat st n <= m holds
for x being Element of X st x in dom f holds
(F . n) . x >= (F . m) . x ) & ( for x being Element of X st x in dom f holds
( F # x is convergent & lim (F # x) = f . x ) ) ) )

assume that
A1: ex A being Element of S st
( A = dom f & f is A -measurable ) and
A2: f is nonpositive ; :: thesis: ex F being Functional_Sequence of X,ExtREAL st
( ( for n being Nat holds
( F . n is_simple_func_in S & dom (F . n) = dom f ) ) & ( for n being Nat holds F . n is nonpositive ) & ( for n, m being Nat st n <= m holds
for x being Element of X st x in dom f holds
(F . n) . x >= (F . m) . x ) & ( for x being Element of X st x in dom f holds
( F # x is convergent & lim (F # x) = f . x ) ) )

set g = - f;
consider A being Element of S such that
A3: ( A = dom f & f is A -measurable ) by A1;
A4: A = dom (- f) by ;
then consider G being Functional_Sequence of X,ExtREAL such that
A6: ( ( for n being Nat holds
( G . n is_simple_func_in S & dom (G . n) = dom (- f) ) ) & ( for n being Nat holds G . n is nonnegative ) & ( for n, m being Nat st n <= m holds
for x being Element of X st x in dom (- f) holds
(G . n) . x <= (G . m) . x ) & ( for x being Element of X st x in dom (- f) holds
( G # x is convergent & lim (G # x) = (- f) . x ) ) ) by ;
take F = - G; :: thesis: ( ( for n being Nat holds
( F . n is_simple_func_in S & dom (F . n) = dom f ) ) & ( for n being Nat holds F . n is nonpositive ) & ( for n, m being Nat st n <= m holds
for x being Element of X st x in dom f holds
(F . n) . x >= (F . m) . x ) & ( for x being Element of X st x in dom f holds
( F # x is convergent & lim (F # x) = f . x ) ) )

thus A8: for n being Nat holds
( F . n is_simple_func_in S & dom (F . n) = dom f ) :: thesis: ( ( for n being Nat holds F . n is nonpositive ) & ( for n, m being Nat st n <= m holds
for x being Element of X st x in dom f holds
(F . n) . x >= (F . m) . x ) & ( for x being Element of X st x in dom f holds
( F # x is convergent & lim (F # x) = f . x ) ) )
proof
let n be Nat; :: thesis: ( F . n is_simple_func_in S & dom (F . n) = dom f )
A9: dom (G . n) = dom (- f) by A6;
A10: F . n = - (G . n) by Th37;
hence F . n is_simple_func_in S by ; :: thesis: dom (F . n) = dom f
thus dom (F . n) = dom f by ; :: thesis: verum
end;
thus for n being Nat holds F . n is nonpositive :: thesis: ( ( for n, m being Nat st n <= m holds
for x being Element of X st x in dom f holds
(F . n) . x >= (F . m) . x ) & ( for x being Element of X st x in dom f holds
( F # x is convergent & lim (F # x) = f . x ) ) )
proof
let n be Nat; :: thesis: F . n is nonpositive
A12: G . n is nonnegative by A6;
F . n = - (G . n) by Th37;
hence F . n is nonpositive by A12; :: thesis: verum
end;
thus for n, m being Nat st n <= m holds
for x being Element of X st x in dom f holds
(F . n) . x >= (F . m) . x :: thesis: for x being Element of X st x in dom f holds
( F # x is convergent & lim (F # x) = f . x )
proof
let n, m be Nat; :: thesis: ( n <= m implies for x being Element of X st x in dom f holds
(F . n) . x >= (F . m) . x )

assume A14: n <= m ; :: thesis: for x being Element of X st x in dom f holds
(F . n) . x >= (F . m) . x

let x be Element of X; :: thesis: ( x in dom f implies (F . n) . x >= (F . m) . x )
assume A15: x in dom f ; :: thesis: (F . n) . x >= (F . m) . x
( dom (F . n) = dom f & F . n = - (G . n) & dom (F . m) = dom f & F . m = - (G . m) ) by ;
then ( (F . n) . x = - ((G . n) . x) & (F . m) . x = - ((G . m) . x) ) by ;
hence (F . n) . x >= (F . m) . x by ; :: thesis: verum
end;
thus for x being Element of X st x in dom f holds
( F # x is convergent & lim (F # x) = f . x ) :: thesis: verum
proof
let x be Element of X; :: thesis: ( x in dom f implies ( F # x is convergent & lim (F # x) = f . x ) )
assume A17: x in dom f ; :: thesis: ( F # x is convergent & lim (F # x) = f . x )
then A18: ( G # x is convergent & lim (G # x) = (- f) . x ) by A3, A4, A6;
hence F # x is convergent by Th39; :: thesis: lim (F # x) = f . x
lim (F # x) = - ((- f) . x) by ;
then lim (F # x) = - (- (f . x)) by ;
hence lim (F # x) = f . x ; :: thesis: verum
end;