reserve n,n1,m,m1,k for Nat;
reserve x,X,X1 for set;
reserve g,g1,g2,t,x0,x1,x2 for Complex;
reserve s1,s2,q1,seq,seq1,seq2,seq3 for Complex_Sequence;
reserve Y for Subset of COMPLEX;
reserve f,f1,f2,h,h1,h2 for PartFunc of COMPLEX,COMPLEX;
reserve p,r,s for Real;
reserve Ns,Nseq for increasing sequence of NAT;

theorem Th27:
  (seq is constant & g in rng seq or seq is constant & ex n st seq
  .n=g ) implies lim seq=g
proof
A1: now
    assume that
A2: seq is constant and
A3: g in rng seq;
    consider g1 being Element of COMPLEX such that
A4: rng seq={g1} by A2,FUNCT_2:111;
    consider g2 being Element of COMPLEX such that
A5: for n being Nat holds seq.n=g2 by A2,VALUED_0:def 18;
A6: g=g1 by A3,A4,TARSKI:def 1;
A7: now
      let p such that
A8:   0<p;
       reconsider n=0 as Nat;
      take n;
      let m such that
      n<=m;
      m in NAT by ORDINAL1:def 12;
      then m in dom seq by COMSEQ_1:2;
      then seq.m in rng seq by FUNCT_1:def 3;
      then g2 in rng seq by A5;
      then g2=g by A4,A6,TARSKI:def 1;
      then seq.m=g by A5;
      hence |.(seq.m)-g.|<p by A8,COMPLEX1:44;
    end;
    seq is convergent by A2,Th26;
    hence thesis by A7,COMSEQ_2:def 6;
  end;
A9: now
    assume that
 seq is constant and
A10: ex n st seq.n=g;
    consider n such that
A11: seq.n=g by A10;
    n in NAT by ORDINAL1:def 12;
    then n in dom seq by COMSEQ_1:2;
    hence thesis by A1,A11,FUNCT_1:def 3;
  end;
  assume seq is constant & g in rng seq or seq is constant &
   ex n being Nat st seq.n=g;
  hence thesis by A1,A9;
end;
