reserve a,b,c for set;

theorem
  for X being set, O being Subset-Family of bool X st for o being
  Subset-Family of X st o in O holds TopStruct(#X,o#) is TopSpace ex B being
  Subset-Family of X st B = Intersect O & TopStruct(#X,B#) is TopSpace & (for o
  being Subset-Family of X st o in O holds TopStruct(#X,o#) is TopExtension of
TopStruct(#X,B#)) & for T being TopSpace st the carrier of T = X & for o being
Subset-Family of X st o in O holds TopStruct(#X,o#) is TopExtension of T holds
  TopStruct(#X,B#) is TopExtension of T
proof
  let X be set;
  let O be Subset-Family of bool X such that
A1: for o being Subset-Family of X st o in O holds TopStruct(#X,o#) is
  TopSpace;
  reconsider B = Intersect O as Subset-Family of X;
  set T = TopStruct(#X,B#);
  take B;
  thus B = Intersect O;
A2: T is TopSpace-like
  proof
    now
      thus the carrier of T in bool the carrier of T by ZFMISC_1:def 1;
      let a;
      assume
A3:   a in O;
      then reconsider o = a as Subset-Family of X;
      TopStruct(#X,o#) is TopSpace by A1,A3;
      hence the carrier of T in a by PRE_TOPC:def 1;
    end;
    hence the carrier of T in the topology of T by SETFAM_1:43;
    hereby
      let a be Subset-Family of T such that
A4:   a c= the topology of T;
      now
        let b;
        assume
A5:     b in O;
        then reconsider o = b as Subset-Family of X;
        B c= b by A5,MSSUBFAM:2;
        then
A6:     a c= o by A4;
        TopStruct(#X,o#) is TopSpace by A1,A5;
        hence union a in b by A6,PRE_TOPC:def 1;
      end;
      hence union a in the topology of T by SETFAM_1:43;
    end;
    let a,b be Subset of T such that
A7: a in the topology of T and
A8: b in the topology of T;
    now
      let c;
      assume
A9:   c in O;
      then reconsider o = c as Subset-Family of X;
A10:  b in o by A8,A9,SETFAM_1:43;
A11:  TopStruct(#X,o#) is TopSpace by A1,A9;
      a in o by A7,A9,SETFAM_1:43;
      hence a /\ b in c by A10,A11,PRE_TOPC:def 1;
    end;
    hence thesis by SETFAM_1:43;
  end;
  hence T is TopSpace;
  thus for o being Subset-Family of X st o in O holds TopStruct(#X,o#) is
  TopExtension of T
  proof
    let o be Subset-Family of X such that
A12: o in O;
    reconsider S = TopStruct(#X,o#) as TopSpace by A1,A12;
    Intersect O c= o by A12,MSSUBFAM:2;
    then S is TopExtension of T by YELLOW_9:def 5;
    hence thesis;
  end;
  reconsider TT = T as TopSpace by A2;
  let T9 be TopSpace such that
A13: the carrier of T9 = X and
A14: for o being Subset-Family of X st o in O holds TopStruct(#X,o#) is
  TopExtension of T9;
  now
    let a;
    assume
A15: a in O;
    then reconsider o = a as Subset-Family of X;
    TopStruct(#X,o#) is TopExtension of T9 by A14,A15;
    hence the topology of T9 c= a by YELLOW_9:def 5;
  end;
  then the topology of T9 c= Intersect O by A13,MSSUBFAM:4;
  then TT is TopExtension of T9 by A13,YELLOW_9:def 5;
  hence thesis;
end;
