reserve Y for TopStruct;
reserve X for non empty TopSpace;

theorem
  for X0 being non empty SubSpace of X holds X0 is maximal_discrete iff
  X0 is discrete & for Y0 being discrete non empty SubSpace of X st X0 is
  SubSpace of Y0 holds the TopStruct of X0 = the TopStruct of Y0
proof
  let X0 be non empty SubSpace of X;
  reconsider A = the carrier of X0 as Subset of X by TSEP_1:1;
  hereby
    assume X0 is maximal_discrete;
    then
A1: A is maximal_discrete;
    then A is discrete;
    hence X0 is discrete by Th20;
    thus for Y0 being discrete non empty SubSpace of X st X0 is SubSpace of Y0
    holds the TopStruct of X0 = the TopStruct of Y0
    proof
      let Y0 be discrete non empty SubSpace of X;
      reconsider D = the carrier of Y0 as Subset of X by TSEP_1:1;
      assume X0 is SubSpace of Y0;
      then
A2:   A c= D by TSEP_1:4;
      D is discrete by Th20;
      then A = D by A1,A2;
      hence thesis by TSEP_1:5;
    end;
  end;
  hereby
    assume X0 is discrete;
    then
A3: A is discrete by Th20;
    assume
A4: for Y0 being discrete non empty SubSpace of X st X0 is SubSpace
    of Y0 holds the TopStruct of X0 = the TopStruct of Y0;
    now
      let D be Subset of X;
      assume
A5:   D is discrete;
      assume
A6:   A c= D;
      then D <> {};
      then consider Y0 being discrete strict non empty SubSpace of X such that
A7:   D = the carrier of Y0 by A5,Th28;
      X0 is SubSpace of Y0 by A6,A7,TSEP_1:4;
      hence A = D by A4,A7;
    end;
    then A is maximal_discrete by A3;
    hence X0 is maximal_discrete;
  end;
end;
