reserve Y for TopStruct;
reserve X for non empty TopSpace;
reserve X for almost_discrete non empty TopSpace;
reserve X,Y for non empty TopSpace;
reserve X for discrete non empty TopSpace,
  X0 for non empty SubSpace of X;
reserve X for almost_discrete non empty TopSpace,
  X0 for maximal_discrete non empty SubSpace of X;

theorem Th68:
  ex r being continuous Function of X,X0 st r is being_a_retraction
proof
  reconsider A = the carrier of X0 as Subset of X by TSEP_1:1;
  defpred X[Point of X,Point of X0] means A /\ Cl {$1} = {$2};
A1: A is maximal_discrete by Th45;
  then
A2: A is discrete;
A3: for x being Point of X ex a being Point of X0 st X[x,a]
  proof
    let x be Point of X;
    consider a being Point of X such that
A4: a in A and
A5: A /\ Cl {x} = {a} by A1,Th58;
    reconsider a as Point of X0 by A4;
    take a;
    thus thesis by A5;
  end;
  consider r being Function of X,X0 such that
A6: for x being Point of X holds X[x,r.x] from FUNCT_2:sch 3(A3);
  for F being Subset of X0 holds F is closed implies r" F is closed
  proof
    let F be Subset of X0;
    assume F is closed;
    F c= A;
    then reconsider E = F as Subset of X by XBOOLE_1:1;
    set R = {Cl {a} where a is Point of X : a in E};
    now
      let x be object;
      assume
A7:   x in r" F;
      then reconsider b = x as Point of X;
A8:   r.b in F by A7,FUNCT_2:38;
      E c= the carrier of X;
      then reconsider a = r.b as Point of X by A8;
      Cl {a} in R by A8;
      then
A9:   Cl {a} c= union R by ZFMISC_1:74;
      A /\ Cl {b} = {a} by A6;
      then a in A /\ Cl {b} by ZFMISC_1:31;
      then a in Cl {b} by XBOOLE_0:def 4;
      then
A10:  Cl {a} = Cl {b} by Th49;
A11:  {b} c= Cl {b} by PRE_TOPC:18;
      b in {b} by TARSKI:def 1;
      then b in Cl {a} by A10,A11;
      hence x in union R by A9;
    end;
    then
A12: r" F c= union R by TARSKI:def 3;
    now
      let C be set;
      assume C in R;
      then consider a being Point of X such that
A13:  C = Cl {a} and
A14:  a in E;
      now
        let x be object;
        assume
A15:    x in C;
        then reconsider b = x as Point of X by A13;
A16:    A /\ Cl {b} = {r.b} by A6;
A17:    A /\ Cl {a} = {a} by A2,A14,Th36;
        Cl {a} = Cl {b} by A13,A15,Th49;
        then a = r.x by A17,A16,ZFMISC_1:3;
        hence x in r" F by A13,A14,A15,FUNCT_2:38;
      end;
      hence C c= r" F by TARSKI:def 3;
    end;
    then
A18: union R c= r" F by ZFMISC_1:76;
    Cl E = union R by Th48;
    hence thesis by A18,A12,XBOOLE_0:def 10;
  end;
  then reconsider r as continuous Function of X,X0 by PRE_TOPC:def 6;
  take r;
  for x being Point of X st x in the carrier of X0 holds r.x = x
  proof
    let x be Point of X;
    assume x in the carrier of X0;
    then
A19: A /\ Cl {x} = {x} by A2,Th36;
    A /\ Cl {x} = {r.x} by A6;
    hence thesis by A19,ZFMISC_1:3;
  end;
  hence thesis by BORSUK_1:def 16;
end;
