
theorem Th21:
  for X be compact non empty TopSpace
  for Y be Subset of R_Normed_Algebra_of_BoundedFunctions the carrier of X st
  Y = ContinuousFunctions(X) holds Y is closed
proof
  let X be compact non empty TopSpace;
  let Y be Subset of R_Normed_Algebra_of_BoundedFunctions the carrier of X;
  assume
A1: Y = ContinuousFunctions(X);
  now let seq be sequence of
    R_Normed_Algebra_of_BoundedFunctions the carrier of X;
    assume
A2:   rng seq c= Y & seq is convergent;
    lim seq in BoundedFunctions the carrier of X;
    then
    consider f be Function of (the carrier of X),REAL such that
A3:   f=lim seq & f|(the carrier of X) is bounded;
    now let z be object;
      assume z in BoundedFunctions (the carrier of X); then
      ex f be RealMap of X st f=z & f|(the carrier of X) is bounded;
      hence z in PFuncs(the carrier of X,REAL) by PARTFUN1:45;
    end; then
    BoundedFunctions (the carrier of X) c= PFuncs(the carrier of X,REAL); then
    reconsider H = seq as Functional_Sequence of (the carrier of X),REAL
                                        by FUNCT_2:7;
A4: for p be Real st p>0 ex k be Element of NAT st
      for n be Element of NAT, x be set st
        n>=k & x in the carrier of X holds |.(H.n).x - f.x.| < p
      proof
        let p be Real;
        assume p>0; then
        consider k be Nat such that
A5:       for n be Nat st n >= k holds
            ||.seq.n - lim seq.|| < p by A2,NORMSP_1:def 7;
         reconsider k as Element of NAT by ORDINAL1:def 12;
        take k;
        hereby let n be Element of NAT, x be set;
        assume
A6:       n>=k & x in the carrier of X; then
A7:     ||.seq.n - lim seq.|| < p by A5;
        seq.n - lim seq in BoundedFunctions the carrier of X; then
        consider g be RealMap of X such that
A8:     g=seq.n - lim seq & g|(the carrier of X) is bounded;
        seq.n in BoundedFunctions the carrier of X; then
        consider s be RealMap of X such that
A9:     s=seq.n & s|(the carrier of X) is bounded;
        reconsider x0 = x as Element of the carrier of X by A6;
A10:    g.x0= s.x0-f.x0 by A8,A9,A3,C0SP1:34;
        |.g.x0.| <= ||.seq.n - lim seq.|| by A8,C0SP1:26;
        hence |.(H.n).x - f.x.| < p by A10,A9,A7,XXREAL_0:2;
      end;
    end;
    f is continuous
    proof
      for x being Point of X,V being Subset of REAL st
        f.x in V & V is open holds
      ex W being Subset of X st x in W & W is open & f.:W c= V
      proof
        let x be Point of X,V be Subset of REAL;
        set r=f.x;
        assume f.x in V & V is open;
        then
        consider r0 being Real such that
A11:      0<r0 & ].r-r0,r+r0.[ c= V by RCOMP_1:19;
        consider k being Element of NAT such that
A12:      for n be Element of NAT,x be set st n>=k & x in the carrier of X
            holds |.(H.n).x - f.x.| < r0/3 by A4,A11,XREAL_1:222;
A13:    |.(H.k).x - f.x.| < r0/3 by A12;
        k in NAT; then
        k in dom seq by NORMSP_1:12; then
        H.k in rng seq by FUNCT_1:def 3; then
        H.k in Y by A2; then
        consider h be continuous RealMap of X such that
A14:      H.k=h by A1;
        set r1 = h.x;
        set G1 = ]. r1-r0/3,r1+r0/3 .[;
A15:    r1<r1+r0/3 by A11,XREAL_1:29,222; then
        r1-r0/3<r1 by XREAL_1:19; then
        h.x in G1 by A15; then
        consider W1 being Subset of X such that
A16:      x in W1 & W1 is open & h.:W1 c= G1 by Th1;
        now let x0 be object;
          assume x0 in f.:W1; then
          consider z0 being object such that
A17:      z0 in dom f & z0 in W1 & f.z0=x0 by FUNCT_1:def 6;
          h.z0 in h.:W1 by A17,FUNCT_2:35;
          then h.x - r0/3 < h.z0 & h.z0 < h.x + r0/3 by A16,XXREAL_1:4;
          then h.x-r0/3 -h.x < h.z0-h.x & h.z0 - h.x < h.x + r0/3 -h.x
                                        by XREAL_1:9;
         then
A18:     |.h.z0 - h.x.| <= r0/3 by ABSVALUE:5;
A19:     |.-(h.x - f.x).| < r0/3 by A13,A14,COMPLEX1:52;
         |.h.z0 - f.z0.| < r0/3 by A17,A12,A14; then
         |.-(h.z0 - f.z0).| < r0/3 by COMPLEX1:52; then
         |.f.z0 - h.z0.|+|.f.x - h.x.| < r0/3 + r0/3 by A19,XREAL_1:8;
         then
A20:     |.f.z0 - h.z0.|+|.f.x - h.x.|+|.h.z0 - h.x.|
              < r0/3 + r0/3 + r0/3 by A18,XREAL_1:8;
         |. f.z0 -f.x .| = |.(f.z0 - h.z0)- (f.x - h.x) +(h.z0-h.x).|;
         then
A21:     |. f.z0 -f.x .| <= |.(f.z0 - h.z0)- (f.x - h.x).|
                                 +|.h.z0-h.x.| by COMPLEX1:56;
         |.(f.z0 - h.z0)- (f.x - h.x).|
           <= |.f.z0 - h.z0.| + |.f.x - h.x.| by COMPLEX1:57;
         then
         |.(f.z0 - h.z0)- (f.x - h.x).|+|.h.z0-h.x.|
           <= |.f.z0 - h.z0.| + |.f.x - h.x.| +|.h.z0-h.x.| by XREAL_1:6;
         then
         |. f.z0 -f.x .| <= |.f.z0 - h.z0.|+|.f.x - h.x.|
                                 +|.h.z0-h.x.| by A21,XXREAL_0:2; then
         |. f.z0 -f.x .| <r0 by A20,XXREAL_0:2; then
         -r0<f.z0 -f.x & f.z0 -f.x <r0 by SEQ_2:1; then
         -r0 + r < f.z0 -r + r & f.z0 - r + r <r0 + r by XREAL_1:6;
         hence x0 in ].r-r0,r+r0.[ by A17;
       end; then
       f.:W1 c= ].r-r0,r+r0.[;
       hence ex W being Subset of X st x in W & W is open & f.:W c= V
                                        by A16,A11,XBOOLE_1:1;
     end;
     hence thesis by Th1;
   end;
   hence lim seq in Y by A3,A1;
 end;
 hence thesis by NFCONT_1:def 3;
end;
