reserve a,b,c for set;

theorem Th11:
  for T being non empty TopSpace for S being open Subset-Family of
T ex G being open Subset-Family of T st G c= S & union G = union S & card G c=
  weight T
proof
  defpred P[object,object] means
   ex A,B being set st A = $1 & B = $2 & A c= B;
  let T be non empty TopSpace;
  let S be open Subset-Family of T;
  consider B being Basis of T such that
A1: card B = weight T by WAYBEL23:74;
  set B1 = {W where W is Subset of T: W in B & ex U being set st U in S & W c=
  U};
  B1 c= B
  proof
    let a be object;
    assume a in B1;
    then
    ex W being Subset of T st a = W & W in B & ex U being set st U in S &
    W c= U;
    hence thesis;
  end;
  then
A2: card B1 c= card B by CARD_1:11;
A3: now
    let a be object;
    assume a in B1;
    then
    ex W being Subset of T st a = W & W in B & ex U being set st U in S &
    W c= U;
    hence ex b being object st b in S & P[a,b];
  end;
  consider f being Function such that
A4: dom f = B1 & rng f c= S and
A5: for a being object st a in B1 holds P[a,f.a] from FUNCT_1:sch 6(A3);
  set G = rng f;
  reconsider G as open Subset-Family of T by A4,TOPS_2:11,XBOOLE_1:1;
  take G;
  thus G c= S & union G c= union S by A4,ZFMISC_1:77;
  thus union S c= union G
  proof
    let a be object;
    assume a in union S;
    then consider b such that
A6: a in b and
A7: b in S by TARSKI:def 4;
    reconsider b as open Subset of T by A7,TOPS_2:def 1;
    reconsider a as Point of T by A6,A7;
    consider W0 being Subset of T such that
A8: W0 in B and
A9: a in W0 and
A10: W0 c= b by A6,YELLOW_9:31;
A11: W0 in B1 by A7,A8,A10;
    then f.W0 in G by A4,FUNCT_1:def 3;
    then
A12: f.W0 c= union G by ZFMISC_1:74;
    P[W0,f.W0] by A5,A11;
    then W0 c= f.W0;
    then a in f.W0 by A9;
    hence thesis by A12;
  end;
  card G c= card B1 by A4,CARD_1:12;
  hence thesis by A1,A2;
end;
