reserve PM for MetrStruct;
reserve x,y for Element of PM;
reserve r,p,q,s,t for Real;
reserve T for TopSpace;
reserve A for Subset of T;
reserve T for non empty TopSpace;
reserve x for Point of T;
reserve Z,X,V,W,Y,Q for Subset of T;
reserve FX for Subset-Family of T;
reserve a for set;
reserve x,y for Point of T;
reserve A,B for Subset of T;
reserve FX,GX for Subset-Family of T;

theorem
  FX is locally_finite implies clf FX is locally_finite
proof
  set GX = (clf FX);
  assume
A1: FX is locally_finite;
  for x ex W being Subset of T st x in W & W is open & { V : V in GX & V
  meets W } is finite
  proof
    let x;
    thus thesis
    proof
      deffunc G(Subset of T) = Cl $1;
      consider W being Subset of T such that
A2:   x in W and
A3:   W is open and
A4:   { V : V in FX & V meets W } is finite by A1;
      take W;
      thus x in W by A2;
      thus W is open by A3;
      set CGX = { V : V in GX & V meets W }, CFX = { V : V in FX & V meets W };
A5:   for Y st Y in FX holds G(Y) in GX by Def2;
      consider f be Function of FX,GX such that
A6:   for X st X in FX holds f.X = G(X) from Lambda1top(A5);
A7:   GX = {} implies FX = {} by Th17,SETFAM_1:16;
      then
A8:   dom f = FX by FUNCT_2:def 1;
      for Z be object holds Z in f.:CFX iff Z in CGX
      proof
        let Z be object;
A9:     Z in CGX implies Z in f.:CFX
        proof
          assume
A10:      Z in CGX;
          ex Y be set st Y in dom f & Y in CFX & Z = f.Y
          proof
            consider V such that
A11:        Z = V and
A12:        V in GX and
A13:        V meets W by A10;
            consider X such that
A14:        V = Cl X and
A15:        X in FX by A12,Def2;
            take X;
A16:        V /\ W <> {} by A13,XBOOLE_0:def 7;
            ex Q st X = Q & Q in FX & Q meets W
            proof
              take Q = X;
              thus X = Q;
              thus Q in FX by A15;
              Cl(W /\ (Cl Q)) <> {} by A16,A14,Th2;
              then Cl(W /\ Q) <> {} by A3,TOPS_1:14;
              then Q /\ W <> {} by Th2;
              hence thesis by XBOOLE_0:def 7;
            end;
            hence thesis by A6,A7,A11,A14,FUNCT_2:def 1;
          end;
          hence thesis by FUNCT_1:def 6;
        end;
        Z in f.:CFX implies Z in CGX
        proof
          assume Z in f.:CFX;
          then consider Y be object such that
A17:      Y in dom f and
A18:      Y in CFX and
A19:      Z = f.Y by FUNCT_1:def 6;
          reconsider Y as Subset of T by A8,A17;
A20:      f.Y = Cl Y by A6,A8,A17;
          then reconsider Z as Subset of T by A19;
          ex V st Y = V & V in FX & V meets W by A18;
          then
A21:      Z meets W by A19,A20,PRE_TOPC:18,XBOOLE_1:63;
          Z in GX by A8,A17,A19,A20,Def2;
          hence thesis by A21;
        end;
        hence thesis by A9;
      end;
      hence thesis by A4,TARSKI:2;
    end;
  end;
  hence thesis;
end;
