reserve a,b,c for set;

theorem Th2:
  for T being non empty TopSpace for B being ManySortedSet of T st
  for x being Element of T holds B.x is Basis of x holds Union B is Basis of T
proof
  let T be non empty TopSpace;
  let B be ManySortedSet of T;
  assume
A1: for x being Element of T holds B.x is Basis of x;
  Union B c= bool the carrier of T
  proof
    let a be object;
    assume a in Union B;
    then consider b being object such that
A2: b in dom B and
A3: a in B.b by CARD_5:2;
    reconsider b as Point of T by A2;
    B.b is Basis of b by A1;
    hence thesis by A3;
  end;
  then reconsider W = Union B as Subset-Family of T;
A4: dom B = the carrier of T by PARTFUN1:def 2;
A5: now
    let A be Subset of T such that
A6: A is open;
    let p be Point of T such that
A7: p in A;
A8: B.p is Basis of p by A1;
    then consider a being Subset of T such that
A9: a in B.p and
A10: a c= A by A6,A7,YELLOW_8:def 1;
    take a;
    thus a in W by A4,A9,CARD_5:2;
    thus p in a by A8,A9,YELLOW_8:12;
    thus a c= A by A10;
  end;
  W c= the topology of T
  proof
    let a be object;
    assume a in W;
    then consider b being object such that
A11: b in dom B and
A12: a in B.b by CARD_5:2;
    reconsider b as Point of T by A11;
    B.b is Basis of b by A1;
    then B.b c= the topology of T by TOPS_2:64;
    hence thesis by A12;
  end;
  hence thesis by A5,YELLOW_9:32;
end;
