reserve X for non empty set;

theorem Th11:
  for ET being FMT_TopSpace, A being non empty Subset of ET holds
  for V being Subset of ET holds V is a_neighborhood of A iff
  ex O being open Subset of ET st A c= O & O c= V
  proof
    let ET be FMT_TopSpace,
    A be non empty Subset of ET;
    let V be Subset of ET;
    thus V is a_neighborhood of A implies
    ex O be open Subset of ET st A c= O & O c= V
    proof
      assume
A1:   V is a_neighborhood of A;
A2:   now
        let a be Element of ET;
        assume a in A;
        then V in U_FMT a by A1,Def6;
        then V is a_neighborhood of a by Def5;
        hence ex O be open Subset of ET st a in O & O c= V by Th10;
      end;
      defpred P[object,object] means
      ex x be Element of ET,y be open Subset of ET
      st x=$1 & y=$2 &
      x in y & y c= V;
A3:   for x being object st x in A ex y being object st
      y in bool the carrier of ET & P[x,y]
      proof
        let x being object such that
A4:     x in A;
        reconsider x as Element of A by A4;
        consider O be open Subset of ET such that
A5:     x in O and
A6:     O c= V by A2;
        thus thesis by A5,A6;
      end;
      ex f being Function of A,bool the carrier of ET st
      for x being object st x in A holds P[x,f.x] from FUNCT_2:sch 1(A3);
      then consider f being Function of A,bool the carrier of ET such that
A7:   for x being object st x in A holds P[x,f.x];
      set OO=union rng f;
      OO is open Subset of ET & A c= OO & OO c= V
      proof
        reconsider OO as Subset of ET;
A8:     OO is open Subset of ET & OO c= V
        proof
A9:       for a be Element of ET st a in A holds
          f.a is open Subset of ET & f.a c= V
          proof
            let a be Element of ET;
            assume a in A;
            then P[a,f.a] by A7;
            then consider x1 be set,y1 be open Subset of ET such that
            a=x1 and
A10:        f.a=y1 and
            x1 in y1 and
A11:        y1 c= V;
            thus thesis by A11,A10;
          end;
A12:      OO c= V
          proof
            let t be object;
            assume t in OO;
            then consider T be set such that
A13:        t in T and
A14:        T in rng f by TARSKI:def 4;
            consider x be object such that
A15:        x in dom f and
A16:        T=f.x by A14,FUNCT_1:def 3;
            x in A by A15;
            then f.x c= V by A9;
            hence thesis by A13,A16;
          end;
          rng f c= Family_open_set(ET)
          proof
            let t be object;
            assume t in rng f;
            then consider x be object such that
A17:        x in dom f and
A18:        t=f.x by FUNCT_1:def 3;
A19:        x in A by A17;
            f.x is open Subset of ET by A19,A9;
            hence thesis by A18;
          end;
          then union rng f in the set of all O where
          O is open Subset of ET by Th9;
          then consider O1 be open Subset of ET such that
A20:      union rng f=O1;
          thus thesis by A20,A12;
        end;
          A c= OO
          proof
            let t be object;
            assume
A21:        t in A;
            then P[t,f.t] by A7;
            then consider x1,y1 be set such that
A22:        t=x1 and
A23:        f.t=y1 and
A24:        x1 in y1 and
            y1 c= V;
            y1 in rng f by A23,A21,FUNCT_2:4;
            hence thesis by A22,A24,TARSKI:def 4;
          end;
          hence thesis by A8;
        end;
        hence thesis;
      end;
    thus (ex O be open Subset of ET st A c= O & O c= V) implies
    V is a_neighborhood of A
    proof
      given O be open Subset of ET such that
A25:  A c= O and
A26:  O c= V;
      for x be Element of ET st x in A holds O in U_FMT x by A25,Def1;
      then O is a_neighborhood of A by Def6;
      hence thesis by A26,Th7;
    end;
  end;
