reserve n,m,k,k1,k2 for Nat;
reserve X for non empty Subset of ExtREAL;
reserve Y for non empty Subset of REAL;
reserve seq for ExtREAL_sequence;
reserve e1,e2 for ExtReal;
reserve rseq for Real_Sequence;

theorem Th36:
  for seq be ExtREAL_sequence st seq is non-increasing holds seq
  is convergent & lim seq = inf seq
proof
  let seq be ExtREAL_sequence;
  assume
A1: seq is non-increasing;
  per cases;
  suppose
A2: for n be Element of NAT holds +infty <= seq.n;
    now
      let y be object;
      assume y in {+infty};
      then
A3:   y=+infty by TARSKI:def 1;
      now
        assume
A4:     not y in rng seq;
        now
          let n be Element of NAT;
          n in NAT;
          then n in dom seq by FUNCT_2:def 1;
          then seq.n<>+infty by A3,A4,FUNCT_1:def 3;
          hence contradiction by A2,XXREAL_0:4;
        end;
        hence contradiction;
      end;
      hence y in rng seq;
    end;
    then
A5: {+infty} c= rng seq;
A6: seq is convergent_to_+infty by A2,Th32;
    hence
A7: seq is convergent by MESFUNC5:def 11;
    now
      let y be object;
      assume y in rng seq;
      then ex x be object st x in dom seq & seq.x=y by FUNCT_1:def 3;
      then y = +infty by A2,XXREAL_0:4;
      hence y in {+infty} by TARSKI:def 1;
    end;
    then rng seq c={+infty};
    then rng seq = {+infty} by A5,XBOOLE_0:def 10;
    then inf seq = +infty by XXREAL_2:13;
    hence thesis by A6,A7,MESFUNC5:def 12;
  end;
  suppose
    not (for n be Element of NAT holds +infty <= seq.n);
    then consider k be Element of NAT such that
A8: seq.k < +infty;
    per cases;
    suppose
A9:   -infty <> inf seq;
      set seq0=seq^\k;
A10:  inf seq = inf seq0 by A1,Th25;
A11:  now
        assume rng seq0 ={-infty};
        then
A12:    -infty in rng seq0 by TARSKI:def 1;
        -infty is LowerBound of rng seq0 by XXREAL_2:42;
        hence contradiction by A9,A10,A12,XXREAL_2:56;
      end;
A13:  inf seq0 <= sup seq0 by Th24;
A14:  inf rng seq0 is LowerBound of rng seq0 by XXREAL_2:def 4;
      inf seq <= seq.k by Th23;
      then -infty < seq.k by A9,XXREAL_0:2,6;
      then
A15:  seq0 is bounded_above by A1,A8,Th30;
      then rng seq0 is bounded_above;
      then sup rng seq0 < +infty by A11,XXREAL_0:9,XXREAL_2:57;
      then inf rng seq0 in REAL by A9,A10,A13,XXREAL_0:14;
      then rng seq0 is bounded_below by A14,XXREAL_2:def 9;
      then seq0 is bounded_below;
      then
A16:  seq0 is bounded by A15;
A17:  seq0 is non-increasing by A1,Th25;
      then
A18:  lim seq0 = inf seq0 by A16,Lm3;
      seq0 is convergent by A17,A16,Lm3;
      hence thesis by A10,A18,Th17;
    end;
    suppose
A19:  -infty = inf seq;
      then seq is convergent_to_-infty by A1,Th34;
      hence seq is convergent by MESFUNC5:def 11;
      thus thesis by A1,A19,Th34;
    end;
  end;
end;
