reserve k for Element of NAT;
reserve r,r1 for Real;
reserve i for Integer;
reserve q for Rational;
reserve X for set;
reserve f for PartFunc of X,ExtREAL;
reserve S for SigmaField of X;
reserve F for sequence of S;
reserve A for set;
reserve a for ExtReal;
reserve r,s for Real;
reserve n,m for Element of NAT;

theorem Th24:
  for X, S, F, f, A st for n holds F.n = A /\ less_dom(f,n)
  holds A /\ less_dom(f,+infty) = union rng F
proof
  let X,S,F,f,A;
  assume
A1: for n holds F.n = A /\ less_dom(f,n);
   for x being object st x in A /\ less_dom(f,+infty) holds x in union rng F
  proof
    let x be object;
    assume
A2: x in A /\ less_dom(f,+infty);
then A3: x in A by XBOOLE_0:def 4;
A4: x in less_dom(f,+infty) by A2,XBOOLE_0:def 4;
then A5: x in dom f by Def11;
A6: f.x < +infty by A4,Def11;
 ex n being Element of NAT st f.x < n
    proof
      per cases;
      suppose
A7:     f.x = -infty;
        take 0;
        thus thesis by A7;
      end;
      suppose
    not f.x = -infty;
then     not f.x <= -infty by XXREAL_0:6;
        then reconsider y1=f.x as Element of REAL by A6,XXREAL_0:48;
        consider n1 being Element of NAT such that
A8:    y1 <= n1 by Th8;
A9:    n1 < n1+1 by NAT_1:13;
        reconsider m=n1+1 as Element of NAT;
        take m;
        thus thesis by A8,A9,XXREAL_0:2;
      end;
    end;
    then consider n being Element of NAT such that
A10: f.x < n;
    reconsider x as Element of X by A2;
 x in less_dom(f,n) by A5,A10,Def11;
then  x in A /\ less_dom(f,n) by A3,XBOOLE_0:def 4;
then A11: x in F.n by A1;
 n in NAT;
then  n in dom F by FUNCT_2:def 1;
then  F.n in rng F by FUNCT_1:def 3;
    hence thesis by A11,TARSKI:def 4;
  end;
then A12: A /\ less_dom(f,+infty) c= union rng F;
   for x being object st x in union rng F holds x in A /\ less_dom(f,+infty)
  proof
    let x being object;
    assume x in union rng F;
    then consider Y being set such that
A13: x in Y and
A14: Y in rng F by TARSKI:def 4;
    consider m such that
    m in dom F and
A15: F.m = Y by A14,PARTFUN1:3;
A16: x in A /\ less_dom(f,m) by A1,A13,A15;
then A17: x in A by XBOOLE_0:def 4;
A18: x in less_dom(f,m) by A16,XBOOLE_0:def 4;
then A19: x in dom f by Def11;
A20: f.x < m by A18,Def11;
    reconsider x as Element of X by A13,A14;
    m in REAL by XREAL_0:def 1;
 then f.x < +infty by A20,XXREAL_0:2,9;
then  x in less_dom(f,+infty) by A19,Def11;
    hence thesis by A17,XBOOLE_0:def 4;
  end;
then  union rng F c= A /\ less_dom(f,+infty);
  hence thesis by A12,XBOOLE_0:def 10;
end;
