let T be non empty TopSpace; :: thesis: ( T is first-countable implies for x being Point of T ex B being Basis of x ex S being Function st
( dom S = NAT & rng S = B & ( for n, m being Element of NAT st m >= n holds
S . m c= S . n ) ) )

assume A1: T is first-countable ; :: thesis: for x being Point of T ex B being Basis of x ex S being Function st
( dom S = NAT & rng S = B & ( for n, m being Element of NAT st m >= n holds
S . m c= S . n ) )

let x be Point of T; :: thesis: ex B being Basis of x ex S being Function st
( dom S = NAT & rng S = B & ( for n, m being Element of NAT st m >= n holds
S . m c= S . n ) )

consider B1 being Basis of x such that
A2: B1 is countable by A1;
consider f being sequence of B1 such that
A3: rng f = B1 by A2, CARD_3:96;
defpred S1[ object , object ] means ex D1 being set st
( D1 = $1 & $2 = meet (f .: (succ D1)) );
A4: for n being object st n in NAT holds
ex A being object st S1[n,A]
proof
let n be object ; :: thesis: ( n in NAT implies ex A being object st S1[n,A] )
reconsider D1 = n as set by TARSKI:1;
assume n in NAT ; :: thesis: ex A being object st S1[n,A]
take A = meet (f .: (succ D1)); :: thesis: S1[n,A]
thus S1[n,A] ; :: thesis: verum
end;
consider S being Function such that
A5: dom S = NAT and
A6: for n being object st n in NAT holds
S1[n,S . n] from CLASSES1:sch 1(A4);
A7: rng S c= bool the carrier of T
proof
let A be object ; :: according to TARSKI:def 3 :: thesis: ( not A in rng S or A in bool the carrier of T )
assume A in rng S ; :: thesis: A in bool the carrier of T
then consider n being object such that
A8: ( n in dom S & A = S . n ) by FUNCT_1:def 3;
reconsider n = n as set by TARSKI:1;
reconsider fsuccn = f .: (succ n) as Subset-Family of T by XBOOLE_1:1;
S1[n,S . n] by A5, A6, A8;
then consider D1 being set such that
A9: ( D1 = n & S . n = meet fsuccn ) ;
thus A in bool the carrier of T by A8, A9; :: thesis: verum
end;
then reconsider B = rng S as Subset-Family of T ;
reconsider B = B as Subset-Family of T ;
A10: ex A being set st A in B
proof
take A = meet (f .: (succ 0)); :: thesis: A in B
S1[ 0 ,S . 0] by A6;
then A = S . 0 ;
hence A in B by A5, FUNCT_1:def 3; :: thesis: verum
end;
then A11: Intersect B = meet B by SETFAM_1:def 9;
for A being set st A in B holds
x in A
proof
let A be set ; :: thesis: ( A in B implies x in A )
assume A in B ; :: thesis: x in A
then consider n being object such that
A12: n in dom S and
A13: A = S . n by FUNCT_1:def 3;
reconsider n = n as set by TARSKI:1;
( dom f = NAT & n in succ n ) by FUNCT_2:def 1, ORDINAL1:6;
then A14: f . n in f .: (succ n) by A5, A12, FUNCT_1:def 6;
A15: for A1 being set st A1 in f .: (succ n) holds
x in A1
proof
let A1 be set ; :: thesis: ( A1 in f .: (succ n) implies x in A1 )
assume A1 in f .: (succ n) ; :: thesis: x in A1
then consider m being object such that
A16: m in dom f and
m in succ n and
A17: A1 = f . m by FUNCT_1:def 6;
f . m in rng f by A16, FUNCT_1:def 3;
then reconsider A2 = A1 as Subset of T by A3, A17;
reconsider A2 = A2 as Subset of T ;
A2 in B1 by A3, A16, A17, FUNCT_1:def 3;
hence x in A1 by YELLOW_8:12; :: thesis: verum
end;
S1[n,S . n] by A5, A6, A12;
then A = meet (f .: (succ n)) by A13;
hence x in A by A15, A14, SETFAM_1:def 1; :: thesis: verum
end;
then A18: x in meet B by A10, SETFAM_1:def 1;
A19: B c= the topology of T
proof
let A be object ; :: according to TARSKI:def 3 :: thesis: ( not A in B or A in the topology of T )
assume A in B ; :: thesis: A in the topology of T
then consider n being object such that
A20: n in dom S and
A21: A = S . n by FUNCT_1:def 3;
reconsider n9 = n as Element of NAT by A5, A20;
reconsider n = n as set by TARSKI:1;
reconsider C = f .: (succ n) as Subset-Family of T by XBOOLE_1:1;
A22: C is open by YELLOW_8:12;
succ n9 is finite ;
then f .: (succ n) is finite ;
then A23: meet C is open by A22, TOPS_2:20;
S1[n,S . n] by A5, A6, A20;
then A = meet (f .: (succ n)) by A21;
hence A in the topology of T by A23; :: thesis: verum
end;
for O being Subset of T st O is open & x in O holds
ex A being Subset of T st
( A in B & A c= O )
proof
let O be Subset of T; :: thesis: ( O is open & x in O implies ex A being Subset of T st
( A in B & A c= O ) )

assume ( O is open & x in O ) ; :: thesis: ex A being Subset of T st
( A in B & A c= O )

then consider A1 being Subset of T such that
A24: A1 in B1 and
A25: A1 c= O by YELLOW_8:def 1;
consider n being object such that
A26: n in dom f and
A27: A1 = f . n by A3, A24, FUNCT_1:def 3;
reconsider n = n as set by TARSKI:1;
S . n in rng S by A5, A26, FUNCT_1:def 3;
then reconsider A = S . n as Subset of T by A7;
reconsider A = A as Subset of T ;
take A ; :: thesis: ( A in B & A c= O )
thus A in B by A5, A26, FUNCT_1:def 3; :: thesis: A c= O
n in succ n by ORDINAL1:6;
then f . n in f .: (succ n) by A26, FUNCT_1:def 6;
then A28: meet (f .: (succ n)) c= A1 by A27, SETFAM_1:3;
S1[n,S . n] by A26, A6;
then S . n c= A1 by A28;
hence A c= O by A25; :: thesis: verum
end;
then reconsider B = B as Basis of x by A19, A11, A18, TOPS_2:64, YELLOW_8:def 1;
take B ; :: thesis: ex S being Function st
( dom S = NAT & rng S = B & ( for n, m being Element of NAT st m >= n holds
S . m c= S . n ) )

take S ; :: thesis: ( dom S = NAT & rng S = B & ( for n, m being Element of NAT st m >= n holds
S . m c= S . n ) )

thus dom S = NAT by A5; :: thesis: ( rng S = B & ( for n, m being Element of NAT st m >= n holds
S . m c= S . n ) )

thus rng S = B ; :: thesis: for n, m being Element of NAT st m >= n holds
S . m c= S . n

for n, m being Element of NAT st m >= n holds
S . m c= S . n
proof
let n, m be Element of NAT ; :: thesis: ( m >= n implies S . m c= S . n )
assume m >= n ; :: thesis: S . m c= S . n
then n + 1 <= m + 1 by XREAL_1:6;
then Segm (n + 1) c= Segm (m + 1) by NAT_1:39;
then succ (Segm n) c= Segm (m + 1) by NAT_1:38;
then succ (Segm n) c= succ (Segm m) by NAT_1:38;
then A29: f .: (succ n) c= f .: (succ m) by RELAT_1:123;
( n in succ n & dom f = NAT ) by FUNCT_2:def 1, ORDINAL1:6;
then f . n in f .: (succ n) by FUNCT_1:def 6;
then A30: meet (f .: (succ m)) c= meet (f .: (succ n)) by A29, SETFAM_1:6;
A31: S1[m,S . m] by A6;
S1[n,S . n] by A6;
hence S . m c= S . n by A30, A31; :: thesis: verum
end;
hence for n, m being Element of NAT st m >= n holds
S . m c= S . n ; :: thesis: verum