reserve r,r1,g for Real,
  n,m,k for Nat,
  seq,seq1, seq2 for Real_Sequence,
  f,f1,f2 for PartFunc of REAL,REAL,
  x for set;
reserve r,r1,r2,g,g1,g2 for Real;

theorem Th102:
  f1 is convergent_in-infty & f2 is convergent_in-infty &
lim_in-infty f1=lim_in-infty f2 & (for r ex g st g<r & g in dom f) & (ex r st (
(dom f1 /\ left_open_halfline(r) c= dom f2 /\ left_open_halfline(r) & dom f /\
  left_open_halfline(r) c= dom f1 /\ left_open_halfline(r)) or (dom f2 /\
  left_open_halfline(r) c= dom f1 /\ left_open_halfline(r) & dom f /\
left_open_halfline(r) c= dom f2 /\ left_open_halfline(r))) & for g st g in dom
  f /\ left_open_halfline(r) holds f1.g<=f.g & f.g<=f2.g) implies f is
  convergent_in-infty & lim_in-infty f=lim_in-infty f1
proof
  assume that
A1: f1 is convergent_in-infty and
A2: f2 is convergent_in-infty and
A3: lim_in-infty f1=lim_in-infty f2 and
A4: for r ex g st g<r & g in dom f;
  given r1 such that
A5: dom f1/\left_open_halfline(r1)c=dom f2/\left_open_halfline(r1) & dom
  f/\left_open_halfline(r1)c=dom f1/\left_open_halfline(r1) or dom f2/\
  left_open_halfline(r1)c=dom f1/\left_open_halfline(r1) & dom f/\
  left_open_halfline(r1)c=dom f2/\left_open_halfline(r1) and
A6: for g st g in dom f/\left_open_halfline(r1) holds f1.g<=f.g & f.g<= f2.g;
  now
    per cases by A5;
    suppose
A7:   dom f1/\left_open_halfline(r1)c=dom f2/\left_open_halfline(r1) &
      dom f/\left_open_halfline(r1)c=dom f1/\left_open_halfline(r1);
A8:   now
        let seq;
        assume that
A9:     seq is divergent_to-infty and
A10:    rng seq c=dom f;
        consider k such that
A11:    for n st k<=n holds seq.n<r1 by A9;
A12:    seq^\k is divergent_to-infty by A9,Th27;
        now
          let x be object;
          assume x in rng(seq^\k);
          then consider n being Element of NAT such that
A13:      x=(seq^\k).n by FUNCT_2:113;
          seq.(n+k)<r1 by A11,NAT_1:12;
          then (seq^\k).n<r1 by NAT_1:def 3;
          then x in {g: g<r1} by A13;
          hence x in left_open_halfline(r1) by XXREAL_1:229;
        end;
        then
A14:    rng(seq^\k)c=left_open_halfline(r1);
A15:    rng(seq^\k)c=rng seq by VALUED_0:21;
        then rng(seq^\k)c=dom f by A10;
        then
A16:    rng(seq^\k)c=dom f/\left_open_halfline(r1) by A14,XBOOLE_1:19;
        then
A17:    rng(seq^\k)c=dom f1/\left_open_halfline(r1) by A7;
        then
A18:    rng(seq^\k)c=dom f2/\left_open_halfline(r1) by A7;
A19:    dom f2/\left_open_halfline(r1)c=dom f2 by XBOOLE_1:17;
        then rng(seq^\k)c=dom f2 by A18;
        then
A20:    f2/*(seq^\k) is convergent & lim(f2/*(seq^\k))=lim_in-infty f1 by A2,A3
,A12,Def13;
A21:    dom f1/\left_open_halfline(r1)c=dom f1 by XBOOLE_1:17;
        then rng(seq^\k)c=dom f1 by A17;
        then
A22:    f1/*(seq^\k) is convergent & lim(f1/*(seq^\k))=lim_in-infty f1 by A1,
A12,Def13;
A23:    now
          let n;
A24: n in NAT by ORDINAL1:def 12;
A25:      (seq^\k).n in rng(seq^\k) by VALUED_0:28;
          then f.((seq^\k).n)<=f2.((seq^\k).n) by A6,A16;
          then
A26:      (f/*(seq^\k)).n<=f2.((seq^\k).n)
by A10,A15,FUNCT_2:108,XBOOLE_1:1,A24;
          f1.((seq^\k).n)<=f.((seq^\k).n) by A6,A16,A25;
          then f1.((seq^\k).n)<=(f/*(seq^\k)).n by A10,A15,FUNCT_2:108,A24
,XBOOLE_1:1;
          hence (f1/*(seq^\k)).n<=(f/*(seq^\k)).n & (f/*(seq^\k)).n<=(f2/*(seq
          ^\k)).n by A17,A21,A18,A19,A26,FUNCT_2:108,XBOOLE_1:1,A24;
        end;
A27:    f/*(seq^\k)=(f/*seq)^\k by A10,VALUED_0:27;
        then
A28:    (f/*seq)^\k is convergent by A22,A20,A23,SEQ_2:19;
        hence f/*seq is convergent by SEQ_4:21;
        lim((f/*seq)^\k)=lim_in-infty f1 by A22,A20,A23,A27,SEQ_2:20;
        hence lim(f/*seq)=lim_in-infty f1 by A28,SEQ_4:20,21;
      end;
      hence f is convergent_in-infty by A4;
      hence thesis by A8,Def13;
    end;
    suppose
A29:  dom f2/\left_open_halfline(r1)c=dom f1/\left_open_halfline(r1)
      & dom f/\left_open_halfline(r1)c=dom f2/\left_open_halfline(r1);
A30:  now
        let seq;
        assume that
A31:    seq is divergent_to-infty and
A32:    rng seq c=dom f;
        consider k such that
A33:    for n st k<=n holds seq.n<r1 by A31;
A34:    seq^\k is divergent_to-infty by A31,Th27;
        now
          let x be object;
          assume x in rng(seq^\k);
          then consider n being Element of NAT such that
A35:      x=(seq^\k).n by FUNCT_2:113;
          seq.(n+k)<r1 by A33,NAT_1:12;
          then (seq^\k).n<r1 by NAT_1:def 3;
          then x in {g: g<r1} by A35;
          hence x in left_open_halfline(r1) by XXREAL_1:229;
        end;
        then
A36:    rng(seq^\k)c=left_open_halfline(r1);
A37:    rng(seq^\k)c=rng seq by VALUED_0:21;
        then rng(seq^\k)c=dom f by A32;
        then
A38:    rng(seq^\k)c=dom f/\left_open_halfline(r1) by A36,XBOOLE_1:19;
        then
A39:    rng(seq^\k)c=dom f2/\left_open_halfline(r1) by A29;
        then
A40:    rng(seq^\k)c=dom f1/\left_open_halfline(r1) by A29;
A41:    dom f1/\left_open_halfline(r1)c=dom f1 by XBOOLE_1:17;
        then rng(seq^\k)c=dom f1 by A40;
        then
A42:    f1/*(seq^\k) is convergent & lim(f1/*(seq^\k))=lim_in-infty f1 by A1,
A34,Def13;
A43:    dom f2/\left_open_halfline(r1)c=dom f2 by XBOOLE_1:17;
        then rng(seq^\k)c=dom f2 by A39;
        then
A44:    f2/*(seq^\k) is convergent & lim(f2/*(seq^\k))=lim_in-infty f1 by A2,A3
,A34,Def13;
A45:    now
          let n;
A46: n in NAT by ORDINAL1:def 12;
A47:      (seq^\k).n in rng(seq^\k) by VALUED_0:28;
          then f.((seq^\k).n)<=f2.((seq^\k).n) by A6,A38;
          then
A48:      (f/*(seq^\k)).n<=f2.((seq^\k).n)
              by A32,A37,FUNCT_2:108,XBOOLE_1:1,A46;
          f1.((seq^\k).n)<=f.((seq^\k).n) by A6,A38,A47;
          then f1.((seq^\k).n)<=(f/*(seq^\k)).n by A32,A37,FUNCT_2:108,A46
,XBOOLE_1:1;
          hence (f1/*(seq^\k)).n<=(f/*(seq^\k)).n & (f/*(seq^\k)).n<=(f2/*(seq
          ^\k)).n by A39,A43,A40,A41,A48,FUNCT_2:108,XBOOLE_1:1,A46;
        end;
A49:    f/*(seq^\k)=(f/*seq)^\k by A32,VALUED_0:27;
        then
A50:    (f/*seq)^\k is convergent by A44,A42,A45,SEQ_2:19;
        hence f/*seq is convergent by SEQ_4:21;
        lim((f/*seq)^\k)=lim_in-infty f1 by A44,A42,A45,A49,SEQ_2:20;
        hence lim(f/*seq)=lim_in-infty f1 by A50,SEQ_4:20,21;
      end;
      hence f is convergent_in-infty by A4;
      hence thesis by A30,Def13;
    end;
  end;
  hence thesis;
end;
