let X be set ; :: thesis: for B being non-empty ManySortedSet of st rng B c= bool (bool X) & ( for x, U being set st x in X & U in B . x holds
x in U ) & ( for x, y, U being set st x in U & U in B . y & y in X holds
ex V being set st
( V in B . x & V c= U ) ) & ( for x, U1, U2 being set st x in X & U1 in B . x & U2 in B . x holds
ex U being set st
( U in B . x & U c= U1 /\ U2 ) ) holds
ex P being Subset-Family of X st
( P = Union B & ( for T being TopStruct st the carrier of T = X & the topology of T = UniCl P holds
( T is TopSpace & ( for T' being non empty TopSpace st T' = T holds
B is Neighborhood_System of T' ) ) ) )

let B be non-empty ManySortedSet of ; :: thesis: ( rng B c= bool (bool X) & ( for x, U being set st x in X & U in B . x holds
x in U ) & ( for x, y, U being set st x in U & U in B . y & y in X holds
ex V being set st
( V in B . x & V c= U ) ) & ( for x, U1, U2 being set st x in X & U1 in B . x & U2 in B . x holds
ex U being set st
( U in B . x & U c= U1 /\ U2 ) ) implies ex P being Subset-Family of X st
( P = Union B & ( for T being TopStruct st the carrier of T = X & the topology of T = UniCl P holds
( T is TopSpace & ( for T' being non empty TopSpace st T' = T holds
B is Neighborhood_System of T' ) ) ) ) )

assume A1: rng B c= bool (bool X) ; :: thesis: ( ex x, U being set st
( x in X & U in B . x & not x in U ) or ex x, y, U being set st
( x in U & U in B . y & y in X & ( for V being set holds
( not V in B . x or not V c= U ) ) ) or ex x, U1, U2 being set st
( x in X & U1 in B . x & U2 in B . x & ( for U being set holds
( not U in B . x or not U c= U1 /\ U2 ) ) ) or ex P being Subset-Family of X st
( P = Union B & ( for T being TopStruct st the carrier of T = X & the topology of T = UniCl P holds
( T is TopSpace & ( for T' being non empty TopSpace st T' = T holds
B is Neighborhood_System of T' ) ) ) ) )

A2: ( dom B = X & union (rng B) = Union B ) by PARTFUN1:def 4;
Union B c= union (bool (bool X)) by A1, ZFMISC_1:95;
then reconsider P = Union B as Subset-Family of X by ZFMISC_1:99;
assume A3: for x, U being set st x in X & U in B . x holds
x in U ; :: thesis: ( ex x, y, U being set st
( x in U & U in B . y & y in X & ( for V being set holds
( not V in B . x or not V c= U ) ) ) or ex x, U1, U2 being set st
( x in X & U1 in B . x & U2 in B . x & ( for U being set holds
( not U in B . x or not U c= U1 /\ U2 ) ) ) or ex P being Subset-Family of X st
( P = Union B & ( for T being TopStruct st the carrier of T = X & the topology of T = UniCl P holds
( T is TopSpace & ( for T' being non empty TopSpace st T' = T holds
B is Neighborhood_System of T' ) ) ) ) )

assume A4: for x, y, U being set st x in U & U in B . y & y in X holds
ex V being set st
( V in B . x & V c= U ) ; :: thesis: ( ex x, U1, U2 being set st
( x in X & U1 in B . x & U2 in B . x & ( for U being set holds
( not U in B . x or not U c= U1 /\ U2 ) ) ) or ex P being Subset-Family of X st
( P = Union B & ( for T being TopStruct st the carrier of T = X & the topology of T = UniCl P holds
( T is TopSpace & ( for T' being non empty TopSpace st T' = T holds
B is Neighborhood_System of T' ) ) ) ) )

assume A5: for x, U1, U2 being set st x in X & U1 in B . x & U2 in B . x holds
ex U being set st
( U in B . x & U c= U1 /\ U2 ) ; :: thesis: ex P being Subset-Family of X st
( P = Union B & ( for T being TopStruct st the carrier of T = X & the topology of T = UniCl P holds
( T is TopSpace & ( for T' being non empty TopSpace st T' = T holds
B is Neighborhood_System of T' ) ) ) )

take P ; :: thesis: ( P = Union B & ( for T being TopStruct st the carrier of T = X & the topology of T = UniCl P holds
( T is TopSpace & ( for T' being non empty TopSpace st T' = T holds
B is Neighborhood_System of T' ) ) ) )

thus P = Union B ; :: thesis: for T being TopStruct st the carrier of T = X & the topology of T = UniCl P holds
( T is TopSpace & ( for T' being non empty TopSpace st T' = T holds
B is Neighborhood_System of T' ) )

let T be TopStruct ; :: thesis: ( the carrier of T = X & the topology of T = UniCl P implies ( T is TopSpace & ( for T' being non empty TopSpace st T' = T holds
B is Neighborhood_System of T' ) ) )

assume A6: ( the carrier of T = X & the topology of T = UniCl P ) ; :: thesis: ( T is TopSpace & ( for T' being non empty TopSpace st T' = T holds
B is Neighborhood_System of T' ) )

A7: P is point-filtered
proof
let x, U1, U2 be set ; :: according to TOPGEN_3:def 1 :: thesis: ( U1 in P & U2 in P & x in U1 /\ U2 implies ex U being Subset of X st
( U in P & x in U & U c= U1 /\ U2 ) )

assume A8: ( U1 in P & U2 in P & x in U1 /\ U2 ) ; :: thesis: ex U being Subset of X st
( U in P & x in U & U c= U1 /\ U2 )

then consider y1 being set such that
A9: ( y1 in X & U1 in B . y1 ) by A2, CARD_5:10;
consider y2 being set such that
A10: ( y2 in X & U2 in B . y2 ) by A2, A8, CARD_5:10;
x in U1 by A8, XBOOLE_0:def 4;
then consider V1 being set such that
A11: ( V1 in B . x & V1 c= U1 ) by A4, A9;
x in U2 by A8, XBOOLE_0:def 4;
then consider V2 being set such that
A12: ( V2 in B . x & V2 c= U2 ) by A4, A10;
A13: x in X by A2, A11, FUNCT_1:def 4;
then consider U being set such that
A14: ( U in B . x & U c= V1 /\ V2 ) by A5, A11, A12;
U in P by A2, A13, A14, CARD_5:10;
then reconsider U = U as Subset of X ;
take U ; :: thesis: ( U in P & x in U & U c= U1 /\ U2 )
thus U in P by A2, A13, A14, CARD_5:10; :: thesis: ( x in U & U c= U1 /\ U2 )
thus x in U by A3, A13, A14; :: thesis: U c= U1 /\ U2
V1 /\ V2 c= U1 /\ U2 by A11, A12, XBOOLE_1:27;
hence U c= U1 /\ U2 by A14, XBOOLE_1:1; :: thesis: verum
end;
now
let x be set ; :: thesis: ( x in X implies ex U being Subset of X st
( U in P & x in U ) )

consider U being Element of B . x;
assume A15: x in X ; :: thesis: ex U being Subset of X st
( U in P & x in U )

( x in U & U in P ) by A2, A3, A15, CARD_5:10;
hence ex U being Subset of X st
( U in P & x in U ) ; :: thesis: verum
end;
then P is covering by Th1;
hence T is TopSpace by A6, A7, Th2; :: thesis: for T' being non empty TopSpace st T' = T holds
B is Neighborhood_System of T'

let T' be non empty TopSpace; :: thesis: ( T' = T implies B is Neighborhood_System of T' )
assume A16: T' = T ; :: thesis: B is Neighborhood_System of T'
then reconsider B' = B as ManySortedSet of by A6;
B' is Neighborhood_System of T'
proof
let x be Point of T'; :: according to TOPGEN_2:def 3 :: thesis: B' . x is Basis of x
A17: B' . x in rng B by A2, A6, A16, FUNCT_1:def 5;
then reconsider Bx = B' . x as Subset-Family of T' by A1, A6, A16;
Bx is Basis of x
proof
( Bx c= P & P c= UniCl P ) by A17, CANTOR_1:1, ZFMISC_1:92;
hence Bx c= the topology of T' by A6, A16, XBOOLE_1:1; :: according to YELLOW_8:def 2 :: thesis: ( x in Intersect Bx & ( for b1 being Element of bool the carrier of T' holds
( not b1 is open or not x in b1 or ex b2 being Element of bool the carrier of T' st
( b2 in Bx & b2 c= b1 ) ) ) )

for a being set st a in Bx holds
x in a by A3, A6, A16;
hence x in Intersect Bx by SETFAM_1:58; :: thesis: for b1 being Element of bool the carrier of T' holds
( not b1 is open or not x in b1 or ex b2 being Element of bool the carrier of T' st
( b2 in Bx & b2 c= b1 ) )

let A be Subset of T'; :: thesis: ( not A is open or not x in A or ex b1 being Element of bool the carrier of T' st
( b1 in Bx & b1 c= A ) )

assume A in the topology of T' ; :: according to PRE_TOPC:def 5 :: thesis: ( not x in A or ex b1 being Element of bool the carrier of T' st
( b1 in Bx & b1 c= A ) )

then consider Y being Subset-Family of T' such that
A18: ( Y c= P & A = union Y ) by A6, A16, CANTOR_1:def 1;
assume x in A ; :: thesis: ex b1 being Element of bool the carrier of T' st
( b1 in Bx & b1 c= A )

then consider a being set such that
A19: ( x in a & a in Y ) by A18, TARSKI:def 4;
ex b being set st
( b in dom B & a in B . b ) by A18, A19, CARD_5:10;
then consider V being set such that
A20: ( V in B . x & V c= a ) by A2, A4, A19;
( a c= A & P c= UniCl P & V in P ) by A2, A6, A16, A18, A19, A20, CANTOR_1:1, CARD_5:10, ZFMISC_1:92;
hence ex b1 being Element of bool the carrier of T' st
( b1 in Bx & b1 c= A ) by A20, XBOOLE_1:1; :: thesis: verum
end;
hence B' . x is Basis of x ; :: thesis: verum
end;
hence B is Neighborhood_System of T' ; :: thesis: verum