
theorem Th8: :: PROPOSITION 4.6 (ii) (b)
  for T be T_0 non empty TopSpace st T is finite holds weight T =
  card the carrier of T
proof
  let T be T_0 non empty TopSpace;
  deffunc F(object) =
    meet { A where A is Element of the topology of T : $1 in A };
A1: for x be object st x in the carrier of T holds F(x) in the carrier of
  BoolePoset the carrier of T
  proof
    let x be object;
    assume
A2: x in the carrier of T;
    the carrier of T in the topology of T by PRE_TOPC:def 1;
    then
    the carrier of T in { A where A is Element of the topology of T : x in
    A } by A2;
    then meet { A where A is Element of the topology of T : x in A } c= the
    carrier of T by SETFAM_1:3;
    then meet { A where A is Element of the topology of T : x in A } in bool
    the carrier of T;
    hence thesis by WAYBEL_7:2;
  end;
  consider f be Function of the carrier of T, the carrier of BoolePoset the
  carrier of T such that
A3: for x be object st x in the carrier of T holds f.x = F(x) from FUNCT_2:
  sch 2 (A1);
  reconsider rf = rng f as Subset-Family of T by WAYBEL_7:2;
A4: for A be Subset of T st A is open for p be Point of T st p in A ex a be
  Subset of T st a in rf & p in a & a c= A
  proof
    let A be Subset of T;
    assume A is open;
    then
A5: A in the topology of T by PRE_TOPC:def 2;
    let p be Point of T;
    assume p in A;
    then
A6: A in { C where C is Element of the topology of T : p in C } by A5;
    meet { C where C is Element of the topology of T : p in C } c= the
    carrier of T
    proof
      let z be object;
      assume z in meet { C where C is Element of the topology of T : p in C };
      then z in A by A6,SETFAM_1:def 1;
      hence thesis;
    end;
    then reconsider
    a = meet { C where C is Element of the topology of T : p in C }
    as Subset of T;
    take a;
    p in the carrier of T;
    then
A7: p in dom f by FUNCT_2:def 1;
    a = f.p by A3;
    hence a in rf by A7,FUNCT_1:def 3;
    now
      let Y be set;
      assume Y in { C where C is Element of the topology of T : p in C };
      then ex C be Element of the topology of T st Y = C & p in C;
      hence p in Y;
    end;
    hence p in a by A6,SETFAM_1:def 1;
    thus a c= A
    by A6,SETFAM_1:def 1;
  end;
  assume
A8: T is finite;
  rf c= the topology of T
  proof
    reconsider tT = the topology of T as finite non empty set by A8;
    let z be object;
    deffunc F(set) = $1;
    assume z in rf;
    then consider y be object such that
A9: y in dom f & z = f.y by FUNCT_1:def 3;
    { A where A is Element of the topology of T : y in A } c= bool the
    carrier of T
    proof
      let z be object;
      assume z in { A where A is Element of the topology of T : y in A };
      then ex A be Element of the topology of T st z = A & y in A;
      hence thesis;
    end;
    then reconsider
    sfA = { A where A is Element of the topology of T : y in A } as
    Subset-Family of T;
    defpred P[set] means y in $1;
    reconsider sfA as Subset-Family of T;
    now
      let P be Subset of T;
      assume P in sfA;
      then ex A be Element of the topology of T st P = A & y in A;
      hence P is open by PRE_TOPC:def 2;
    end;
    then
A10: sfA is open by TOPS_2:def 1;
    {F(A) where A is Element of tT: P[A]} is finite from PRE_CIRC:sch 1;
    then
A11: meet sfA is open by A10,TOPS_2:20;
    z = meet { A where A is Element of the topology of T : y in A } by A3,A9;
    hence thesis by A11,PRE_TOPC:def 2;
  end;
  then rng f is Basis of T by A4,YELLOW_9:32;
  then
A12: card rng f in the set of all card B1 where B1 is Basis of T ;
  then
A13: meet the set of all  card B1 where B1 is Basis of T  c= card rng
  f by SETFAM_1:3;
  now
    let x1,x2 be object;
    assume that
A14: x1 in dom f & x2 in dom f and
A15: f.x1 = f.x2;
    reconsider x3 = x1, x4 = x2 as Point of T by A14;
    assume x1 <> x2;
    then consider V be Subset of T such that
A16: V is open and
A17: x3 in V & not x4 in V or x4 in V & not x3 in V by T_0TOPSP:def 7;
A18: f.x3 = meet { A where A is Element of the topology of T : x3 in A } &
    f.x4 = meet { A where A is Element of the topology of T : x4 in A } by A3;
    now
      per cases by A17;
      suppose
A19:    x3 in V & not x4 in V;
        V in the topology of T by A16,PRE_TOPC:def 2;
        then
A20:    V in { A where A is Element of the topology of T : x3 in A } by A19;
A21:    meet { A where A is Element of the topology of T : x3 in A } c= V
        by A20,SETFAM_1:def 1;
A22:    now
          let Y be set;
          assume Y in { A where A is Element of the topology of T : x4 in A };
          then ex A be Element of the topology of T st Y = A & x4 in A;
          hence x4 in Y;
        end;
        the carrier of T in the topology of T by PRE_TOPC:def 1;
        then
        the carrier of T in { A where A is Element of the topology of T :
        x4 in A };
        then x4 in meet { A where A is Element of the topology of T : x3 in A
        } by A15,A18,A22,SETFAM_1:def 1;
        hence contradiction by A19,A21;
      end;
      suppose
A23:    x4 in V & not x3 in V;
        V in the topology of T by A16,PRE_TOPC:def 2;
        then
A24:    V in { A where A is Element of the topology of T : x4 in A } by A23;
A25:    meet { A where A is Element of the topology of T : x4 in A } c= V
        by A24,SETFAM_1:def 1;
A26:    now
          let Y be set;
          assume Y in { A where A is Element of the topology of T : x3 in A };
          then ex A be Element of the topology of T st Y = A & x3 in A;
          hence x3 in Y;
        end;
        the carrier of T in the topology of T by PRE_TOPC:def 1;
        then
        the carrier of T in { A where A is Element of the topology of T :
        x3 in A };
        then x3 in meet { A where A is Element of the topology of T : x4 in A
        } by A15,A18,A26,SETFAM_1:def 1;
        hence contradiction by A23,A25;
      end;
    end;
    hence contradiction;
  end;
  then dom f = the carrier of T & f is one-to-one by FUNCT_1:def 4
,FUNCT_2:def 1;
  then
A27: the carrier of T,rng f are_equipotent by WELLORD2:def 4;
  for X be set st X in the set of all  card B1 where B1 is Basis of T
 holds card rng f c= X
  proof
    let X be set;
    assume X in the set of all  card B1 where B1 is Basis of T ;
    then consider B2 be Basis of T such that
A28: X = card B2;
    rng f c= B2
    proof
      let y be object;
      assume y in rng f;
      then consider x be object such that
A29:  x in dom f and
A30:  y = f.x by FUNCT_1:def 3;
      reconsider x1 = x as Element of T by A29;
      y = meet{ A where A is Element of the topology of T : x1 in A } by A3,A30
;
      hence thesis by A8,YELLOW15:31;
    end;
    hence thesis by A28,CARD_1:11;
  end;
  then
  card rng f c= meet the set of all  card B1 where B1 is Basis of T
 by A12,SETFAM_1:5;
  then card rng f = meet the set of all  card B1 where B1 is Basis of T
 by A13,XBOOLE_0:def 10
    .= weight T by WAYBEL23:def 5;
  hence thesis by A27,CARD_1:5;
end;
