reserve T, T1, T2 for TopSpace,
  A, B for Subset of T,
  F, G for Subset-Family of T,
  A1 for Subset of T1,
  A2 for Subset of T2,
  TM, TM1, TM2 for metrizable TopSpace,
  Am, Bm for Subset of TM,
  Fm, Gm for Subset-Family of TM,
  C for Cardinal,
  iC for infinite Cardinal;

theorem Th23:
  for B be Basis of TM st for Fm st Fm is open & Fm is Cover of TM
  ex Gm st Gm c=Fm & Gm is Cover of TM & card Gm c= iC ex underB be Basis of TM
  st underB c= B & card underB c= iC
proof
  let B be Basis of TM such that
A1: for F being Subset-Family of TM st F is open & F is Cover of TM ex G
  be Subset-Family of TM st G c=F & G is Cover of TM & card G c=iC;
  per cases;
  suppose
    TM is empty;
    then weight TM=0;
    then consider underB be Basis of TM such that
A2: card underB=0 by WAYBEL23:74;
    take underB;
    underB={} by A2;
    hence thesis;
  end;
  suppose
A3: TM is non empty;
    set TOP=the topology of TM,cT=the carrier of TM;
    consider metr be Function of[:cT,cT:],REAL such that
A4: metr is_metric_of cT and
A5: Family_open_set(SpaceMetr(cT,metr))=TOP by PCOMPS_1:def 8;
    reconsider Tm=SpaceMetr(cT,metr) as non empty MetrSpace by A3,A4,
PCOMPS_1:36;
    defpred P[object,object] means
     for n be Nat st $1=n ex G be open Subset-Family
of TM st G c={U where U is Subset of TM: U in B & ex p be Point of Tm st U c=
    Ball(p,1/(2|^n))} & G is Cover of TM & card G c= iC & $2 = G;
A6: B c= TOP by TOPS_2:64;
A7: for x be object st x in NAT ex y be object st P[x,y]
    proof
      let x be object;
      assume x in NAT;
      then reconsider n=x as Nat;
      set F={U where U is Subset of TM:U in B & ex p be Element of Tm st U c=
      Ball (p,1/(2|^n))};
A8:   F c=TOP
      proof
        let f be object;
        assume f in F;
        then ex U be Subset of TM st f=U & U in B & ex p be Point of Tm st U
        c= Ball(p,1/(2|^n));
        hence thesis by A6;
      end;
      then reconsider F as Subset-Family of TM by XBOOLE_1:1;
      reconsider F as open Subset-Family of TM by A8,TOPS_2:11;
      cT c=union F
      proof
        let y be object;
        assume
A9:     y in cT;
        then reconsider p=y as Point of TM;
        reconsider q=y as Element of Tm by A3,A4,A9,PCOMPS_2:4;
        2|^n>0 & dist(q,q)=0 by METRIC_1:1,NEWTON:83;
        then
A10:    q in Ball(q,1/(2|^n)) by METRIC_1:11;
        reconsider BALL=Ball(q,1/(2|^n)) as Subset of TM by A3,A4,PCOMPS_2:4;
        BALL in Family_open_set(Tm) by PCOMPS_1:29;
        then BALL is open by A5;
        then consider U be Subset of TM such that
A11:    U in B and
A12:    p in U and
A13:    U c=BALL by A10,YELLOW_9:31;
        U in F by A11,A13;
        hence thesis by A12,TARSKI:def 4;
      end;
      then F is Cover of TM by SETFAM_1:def 11;
      then consider G be Subset-Family of TM such that
A14:  G c=F and
A15:  G is Cover of TM & card G c=iC by A1;
      take G;
      let m be Nat;
      assume
A16:  x=m;
      G is open by A14,TOPS_2:11;
      hence thesis by A14,A15,A16;
    end;
    consider f be Function such that
A17: dom f=NAT & for e be object st e in NAT holds P[e,f.e] from CLASSES1
    :sch 1(A7);
A18: union rng f c=B
    proof
      let b be object;
      assume b in union rng f;
      then consider y be set such that
A19:  b in y and
A20:  y in rng f by TARSKI:def 4;
      consider x be object such that
A21:  x in dom f and
A22:  f.x=y by A20,FUNCT_1:def 3;
      reconsider n=x as Nat by A17,A21;
      ex G be open Subset-Family of TM st G c={U where U is Subset of TM:
U in B & ex p be Point of Tm st U c=Ball(p,1/(2|^n))} & G is Cover of TM & card
      G c=iC & f.n=G by A17,A21;
      then b in {U where U is Subset of TM:U in B & ex p be Point of Tm st U
      c= Ball(p,1/(2|^n))} by A19,A22;
      then ex U be Subset of TM st U=b & U in B & ex p be Point of Tm st U c=
      Ball(p,1/(2|^n));
      hence thesis;
    end;
    then reconsider Urngf=union rng f as Subset-Family of TM by XBOOLE_1:1;
    for A be Subset of TM st A is open for p be Point of TM st p in A ex
    a be Subset of TM st a in Urngf & p in a & a c=A
    proof
      let A be Subset of TM;
      assume A is open;
      then
A23:  A in Family_open_set(Tm) by A5;
      let p be Point of TM such that
A24:  p in A;
      reconsider p9=p as Element of Tm by A3,A4,PCOMPS_2:4;
      consider r be Real such that
A25:  r>0 and
A26:  Ball(p9,r)c=A by A23,A24,PCOMPS_1:def 4;
      consider n be Nat such that
A27:  1/(2|^n)<=r/2 by A25,PREPOWER:92;
A28:       n in NAT by ORDINAL1:def 12;
      consider G be open Subset-Family of TM such that
A29:  G c={U where U is Subset of TM:U in B & ex p be Point of Tm st
      U c= Ball(p,1/(2|^n))} and
A30:  G is Cover of TM and
      card G c=iC and
A31:  f.n=G by A17,A28;
      [#]TM=union G by A30,SETFAM_1:45;
      then consider a be set such that
A32:  p in a and
A33:  a in G by A3,TARSKI:def 4;
      a in {U where U is Subset of TM:U in B & ex p be Point of Tm st U
      c=Ball(p,1/(2|^n))} by A29,A33;
      then consider U be Subset of TM such that
A34:  a=U and
      U in B and
A35:  ex p be Point of Tm st U c=Ball(p,1/(2|^n));
      take U;
      f.n in rng f by A17,FUNCT_1:def 3,A28;
      hence U in Urngf & p in U by A31,A32,A33,A34,TARSKI:def 4;
      thus U c=A
      proof
        let u9 be object;
        consider pp be Element of Tm such that
A36:    U c=Ball(pp,1/(2|^n)) by A35;
        assume
A37:    u9 in U;
        then reconsider u=u9 as Element of Tm by A3,A4,PCOMPS_2:4;
        dist(pp,u)<1/(2|^n) by A36,A37,METRIC_1:11;
        then
A38:    dist(pp,u) < r/2 by A27,XXREAL_0:2;
        dist(pp,p9)<1/(2|^n) by A32,A34,A36,METRIC_1:11;
        then dist(p9,pp)<r/2 by A27,XXREAL_0:2;
        then
        dist(p9,u)<=dist(p9,pp)+dist(pp,u) & dist(p9,pp)+dist(pp,u)<r/2+r
        /2 by A38,METRIC_1:4,XREAL_1:8;
        then dist(p9,u)<r/2+r/2 by XXREAL_0:2;
        then u in Ball(p9,r) by METRIC_1:11;
        hence thesis by A26;
      end;
    end;
    then reconsider Urngf as Basis of TM by A6,A18,XBOOLE_1:1,YELLOW_9:32;
    take Urngf;
    for x be object st x in dom f holds card(f.x)c=iC
    proof
      let x be object;
      assume x in dom f;
      then reconsider n=x as Element of NAT by A17;
      ex G be open Subset-Family of TM st G c={U where U is Subset of TM:
U in B & ex p be Point of Tm st U c=Ball(p,1/(2|^n))} & G is Cover of TM & card
      G c=iC & f.n=G by A17;
      hence thesis;
    end;
    then card Union f c=(omega)*`iC by A17,CARD_1:47,CARD_2:86;
    hence thesis by A18,Lm5;
  end;
end;
