reserve a,b,c for set;

theorem Th29:
  for X, x0 being set holds ex B0 being Basis of DiscrWithInfin(X,
  x0) st B0 = ((SmallestPartition X) \ {{x0}}) \/ {F` where F is Subset of X: F
  is finite}
proof
  let X, x0 be set;
  set T = DiscrWithInfin(X,x0);
  set B1 = (SmallestPartition X) \ {{x0}};
  set B2 = {F` where F is Subset of X: F is finite};
A1: B1 c= the topology of T
  proof
    let a be object;
     reconsider aa=a as set by TARSKI:1;
    assume
A2: a in B1;
    then
A3: a in SmallestPartition X by ZFMISC_1:56;
    then reconsider X as non empty set;
    SmallestPartition X = the set of all {x} where x is Element of X
    by EQREL_1:37;
    then
A4: ex x being Element of X st a = {x} by A3;
    a <> {x0} by A2,ZFMISC_1:56;
    then not x0 in aa by A4,TARSKI:def 1;
    then a is open Subset of T by A2,Def5,Th19;
    hence thesis by PRE_TOPC:def 2;
  end;
A5: the carrier of T = X by Def5;
  B2 c= bool the carrier of T
  proof
    let a be object;
    assume a in B2;
    then ex F being Subset of X st a = F` & F is finite;
    hence thesis by A5;
  end;
  then reconsider B0 = B1 \/ B2 as Subset-Family of T by A5,XBOOLE_1:8;
A6: now
    let A be Subset of T;
    assume A is open;
    then
A7: not x0 in A or A` is finite by Th19;
    let p be Point of T such that
A8: p in A;
    reconsider X9 = X as non empty set by A8,Def5;
    reconsider p9 = p as Element of X9 by Def5;
    SmallestPartition X = the set of all {x} where x is Element of X9
 by EQREL_1:37;
    then
A9: {p9} in SmallestPartition X;
    {p} <> {x0} or A`` in B2 by A5,A8,A7,ZFMISC_1:3;
    then not {p} in {{x0}} or A in B2 by TARSKI:def 1;
    then {p} in B1 or A in B2 by A9,XBOOLE_0:def 5;
    then {p} in B0 & p in {p} & {p} c= A or A in B0 & A c= A by A8,
XBOOLE_0:def 3,ZFMISC_1:31;
    hence ex a being Subset of T st a in B0 & p in a & a c= A by A8;
  end;
  B2 c= the topology of T
  proof
    let a be object;
    assume a in B2;
    then consider F being Subset of X such that
A10: a = F` and
A11: F is finite;
    F`` is finite by A11;
    then a is open Subset of T by A5,A10,Th19;
    hence thesis by PRE_TOPC:def 2;
  end;
  then reconsider B0 as Basis of DiscrWithInfin(X,x0) by A1,A6,XBOOLE_1:8
,YELLOW_9:32;
  take B0;
  thus thesis;
end;
