
theorem Th60:
  for L be ExtREAL_sequence,c be ExtReal st (for n be Nat
  holds L.n=c) holds L is convergent & lim L = c & lim L = sup rng L
proof
  let L be ExtREAL_sequence;
  let c be ExtReal;
   reconsider cc = c as R_eal by XXREAL_0:def 1;
A1: dom L = NAT by FUNCT_2:def 1;
  c in ExtREAL by XXREAL_0:def 1;
  then
A2: c in REAL or c in {-infty,+infty} by XBOOLE_0:def 3,XXREAL_0:def 4;
  assume
A3: for n be Nat holds L.n = c;
  then
A4: L.1 = c;
  now
    let v be ExtReal;
    assume v in rng L;
    then ex n be object st n in dom L & v = L.n by FUNCT_1:def 3;
    hence v <= c by A3;
  end;
  then
A5: c is UpperBound of rng L by XXREAL_2:def 1;
  per cases by A2,TARSKI:def 2;
  suppose
    c in REAL;
    then reconsider rc = c as Real;
A6: now
      reconsider n=0 as Nat;
      let p be Real;
      assume
A7:   0 < p;
      take n;
      let m be Nat such that
      n <= m;
      L.m - rc = L.m - L.m by A3;
      then L.m - rc = 0 by XXREAL_3:7;
      hence |. L.m - rc .| < p by A7,EXTREAL1:16;
    end;
    then
A8: L is convergent_to_finite_number;
    hence L is convergent;
     then lim L = cc by A6,A8,Def12;
    hence lim L = c;
    hence thesis by A5,A1,A4,FUNCT_1:3,XXREAL_2:55;
  end;
  suppose
A9: c = -infty;
    for p be Real st p < 0 ex n be Nat st for m be Nat st n<=m
    holds L.m <= p
    proof
      let p be Real such that
      p < 0;
      take 0;
A10:  p in REAL by XREAL_0:def 1;
      now
        let m be Nat such that
        0 <= m;
        L.m = -infty by A3,A9;
        hence L.m < p by A10,XXREAL_0:12;
      end;
      hence thesis;
    end;
    then
A11: L is convergent_to_-infty;
    hence L is convergent;
    hence lim(L) = c by A9,A11,Def12;
    hence thesis by A5,A1,A4,FUNCT_1:3,XXREAL_2:55;
  end;
  suppose
A12: c = +infty;
    for p be Real st 0 < p ex n be Nat st for m be Nat st n <= m
    holds p <= L.m
    proof
      let p be Real such that
      0 < p;
      take 0;
A13:  p in REAL by XREAL_0:def 1;
      now
        let m be Nat such that
        0 <= m;
        L.m = +infty by A3,A12;
        hence p < L.m by A13,XXREAL_0:9;
      end;
      hence thesis;
    end;
    then
A14: L is convergent_to_+infty;
    hence L is convergent;
    hence lim L = c by A12,A14,Def12;
    hence thesis by A5,A1,A4,FUNCT_1:3,XXREAL_2:55;
  end;
end;
