reserve X for non empty set,
  S for SigmaField of X,
  M for sigma_Measure of S,
  E for Element of S,
  F,G for Functional_Sequence of X,ExtREAL,
  I for ExtREAL_sequence,
  f,g for PartFunc of X,ExtREAL,
  seq, seq1, seq2 for ExtREAL_sequence,
  p for ExtReal,
  n,m for Nat,
  x for Element of X,
  z,D for set;

theorem Th9:
  seq is convergent & (for k be Nat holds seq.k <= p) implies lim seq <= p
proof
  assume that
A1: seq is convergent and
A2: for k be Nat holds seq.k <= p;
  for y be ExtReal holds y in rng seq implies y <= p
  proof
    let y be ExtReal;
    assume y in rng seq;
    then consider x be object such that
A3: x in dom seq and
A4: y = seq.x by FUNCT_1:def 3;
    reconsider x as Nat by A3;
    seq.x <= p by A2;
    hence thesis by A4;
  end;
  then
A5: p is UpperBound of rng seq by XXREAL_2:def 1;
  reconsider SUPSEQ = superior_realsequence seq as sequence of ExtREAL;
  consider Y be non empty Subset of ExtREAL such that
A6: Y = {seq.k where k is Nat: 0 <= k} and
A7: SUPSEQ.0 = sup Y by RINFSUP2:def 7;
  now
    let x be object;
    assume x in rng seq;
    then consider k be object such that
A8: k in dom seq and
A9: x = seq.k by FUNCT_1:def 3;
    thus x in Y by A6,A8,A9;
  end;
  then
A10: rng seq c= Y;
  for n be Element of NAT holds inf SUPSEQ <= SUPSEQ.n
  proof
    let n be Element of NAT;
    NAT = dom SUPSEQ by FUNCT_2:def 1;
    then SUPSEQ.n in rng SUPSEQ by FUNCT_1:def 3;
    hence thesis by XXREAL_2:3;
  end;
  then
A11: inf SUPSEQ <= SUPSEQ.0;
  now
    let x be object;
    assume x in Y;
    then consider k be Nat such that
A12:   x = seq.k & 0 <= k by A6;
A13: k in NAT by ORDINAL1:def 12;
    dom seq = NAT by FUNCT_2:def 1;
    hence x in rng seq by A12,FUNCT_1:3,A13;
  end;
  then Y c= rng seq;
  then Y = rng seq by A10,XBOOLE_0:def 10;
  then (superior_realsequence seq).0 <= p by A5,A7,XXREAL_2:def 3;
  then lim_sup seq <= p by A11,XXREAL_0:2;
  hence thesis by A1,RINFSUP2:41;
end;
