
theorem Th11:
  for P being Subset of R^1 holds P is compact implies [#](P) is real-bounded
proof
  let P be Subset of R^1;
  assume
A1: P is compact;
  thus [#](P) is real-bounded
  proof
    now
      per cases;
      case
        [#](P) <> {};
        set r0 = 1;
        defpred P[Subset of R^1] means ex x being Point of RealSpace st x in
        [#](P) & $1 = Ball(x,r0);
        consider R being Subset-Family of R^1 such that
A2:     for A being Subset of R^1 holds A in R iff P[A] from SUBSET_1:
        sch 3;
        for x being object holds x in [#](P) implies x in union R
        proof
          let x be object;
          assume
A3:       x in [#](P);
          then reconsider x as Point of RealSpace by METRIC_1:def 13;
          consider A being Subset of RealSpace such that
A4:       A = Ball(x,r0);
          R^1 = TopStruct (#the carrier of RealSpace, Family_open_set(
            RealSpace)#) by PCOMPS_1:def 5,TOPMETR:def 6;
          then reconsider A as Subset of R^1;
          ex A being set st x in A & A in R
          proof
            take A;
            dist(x,x) = 0 by METRIC_1:1;
            hence thesis by A2,A3,A4,METRIC_1:11;
          end;
          hence thesis by TARSKI:def 4;
        end;
        then [#](P) c= union R;
        then
A5:     R is Cover of P by SETFAM_1:def 11;
        for A being Subset of R^1 holds A in R implies A is open
        proof
          let A be Subset of R^1;
          assume A in R;
          then
          ex x being Point of RealSpace st x in [#](P) & A = Ball(x,r0) by A2;
          hence thesis by TOPMETR:14,def 6;
        end;
        then R is open by TOPS_2:def 1;
        then consider R0 being Subset-Family of R^1 such that
A6:     R0 c= R and
A7:     R0 is Cover of P and
A8:     R0 is finite by A1,A5,COMPTS_1:def 4;
A9:     P c= union R0 by A7,SETFAM_1:def 11;
A10:    for A being set holds A in R0 implies ex x being Point of
        RealSpace,r being Real st A = Ball(x,r)
        proof
          let A be set;
          assume
A11:      A in R0;
          then reconsider A as Subset of R^1;
          consider x being Point of RealSpace such that
          x in [#](P) and
A12:      A = Ball(x,r0) by A2,A6,A11;
          take x;
          take r0;
          thus thesis by A12;
        end;
        R^1 = TopStruct (#the carrier of RealSpace, Family_open_set(
          RealSpace)#) by PCOMPS_1:def 5,TOPMETR:def 6;
        then reconsider R0 as Subset-Family of RealSpace;
        R0 is being_ball-family by A10,TOPMETR:def 4;
        then consider x1 being Point of RealSpace such that
A13:    ex r1 being Real st union R0 c= Ball(x1,r1) by A8,Th3;
        consider r1 being Real such that
A14:    union R0 c= Ball(x1,r1) by A13;
A15:    [#](P) c= Ball(x1,r1) by A9,A14;
        reconsider x1 as Element of REAL by METRIC_1:def 13;
A16:    for p being Element of REAL
         holds p in [#](P) implies x1 - r1 <= p & p <= x1 + r1
        proof
          let p be Element of REAL;
          reconsider a=x1,b=p as Element of RealSpace by METRIC_1:def 13;
          assume p in [#](P);
          then dist(a,b) < r1 by A15,METRIC_1:11;
          then
A17:      |.x1-p.| < r1 by TOPMETR:11;
          then -r1 <= x1 - p by ABSVALUE:5;
          then -r1 + p <= x1 by XREAL_1:19;
          then
A18:      p <= x1 -(-r1) by XREAL_1:19;
          x1 - p <= r1 by A17,ABSVALUE:5;
          then x1 <= p + r1 by XREAL_1:20;
          hence thesis by A18,XREAL_1:20;
        end;
        x1 - r1 is LowerBound of [#]P
        proof
          let r be ExtReal;
          thus thesis by A16;
        end;
        then
A19:    [#](P) is bounded_below;
       x1 + r1 is UpperBound of [#]P
        proof
          let r be ExtReal;
          thus thesis by A16;
        end;
        then [#](P) is bounded_above;
        hence thesis by A19;
      end;
      case
A20:    [#](P) = {};
        0 is LowerBound of [#]P
        proof
         let r be ExtReal;
          thus thesis by A20;
        end;
        then
A21:    [#](P) is bounded_below;
        0 is UpperBound of [#]P
        proof
         let r be ExtReal;
          thus thesis by A20;
        end;
        then [#](P) is bounded_above;
        hence thesis by A21;
      end;
    end;
    hence thesis;
  end;
end;
