reserve n,n1,m,k for Nat;
reserve x,y for set;
reserve s,g,g1,g2,r,p,p2,q,t for Real;
reserve s1,s2,s3 for Real_Sequence;
reserve Nseq for increasing sequence of NAT;
reserve X for Subset of REAL;

theorem Th4:
  for s1 st rng s1 c= [.s,g.] holds s1 is bounded
proof
  let s1 such that
A1: rng s1 c= [.s,g.];
  thus s1 is bounded_above
  proof
    take r = g + 1;
A2: for t st t in rng s1 holds t < r
    proof
      let t;
      assume t in rng s1;
      then t in [.s,g.] by A1;
      then
A3:   ex p st t = p & s <= p & p<=g;
      g < r by XREAL_1:29;
      hence thesis by A3,XXREAL_0:2;
    end;
      let n;
      n in NAT by ORDINAL1:def 12;
      then n in dom s1 by FUNCT_2:def 1;
      then s1.n in rng s1 by FUNCT_1:def 3;
      hence thesis by A2;
  end;
    take r = s - 1;
A4: r + 1 = s - (1-1);
A5: for t st t in rng s1 holds r < t
    proof
      let t;
      assume t in rng s1;
      then t in [.s,g.] by A1;
      then
A6:   ex p st t = p & s <= p & p<=g;
      r < s by A4,XREAL_1:29;
      hence thesis by A6,XXREAL_0:2;
    end;
      let n;
      n in NAT by ORDINAL1:def 12;
      then n in dom s1 by FUNCT_2:def 1;
      then s1.n in rng s1 by FUNCT_1:def 3;
      hence thesis by A5;
end;
