reserve x, y for set,
  T for TopStruct,
  GX for TopSpace,
  P, Q, M, N for Subset of T,
  F, G for Subset-Family of T,
  W, Z for Subset-Family of GX,
  A for SubSpace of T;

theorem
  ex f being Function st dom f = F & rng f = F|P & for x st x in F for Q
  st Q = x holds f.x = Q /\ P
proof
  defpred X[object,object] means for Q st Q=$1 holds $2=Q /\ P;
A1: for x being object st x in F ex y being object st X[x,y]
  proof
    let x be object;
    assume x in F;
    then reconsider Q=x as Subset of T;
    reconsider y=Q /\ P as set;
    take y;
    thus thesis;
  end;
  consider f being Function such that
A2: dom f = F and
A3: for x being object st x in F holds X[x,f.x] from CLASSES1:sch 1(A1);
  take f;
  thus dom f = F by A2;
  for x being object holds x in rng f iff x in F|P
  proof let x be object;
    hereby
      assume x in rng f;
      then consider y being object such that
A4:   y in dom f and
A5:   f.y=x by FUNCT_1:def 3;
      reconsider Y=y as Subset of T by A2,A4;
      Y /\ P c= P by XBOOLE_1:17;
      then Y /\ P c= [#](T|P) by PRE_TOPC:def 5;
      then reconsider X=x as Subset of T|P by A2,A3,A4,A5;
      X = Y /\ P by A2,A3,A4,A5;
      hence x in F|P by A2,A4,Def3;
    end;
    assume
A6: x in F|P;
    then reconsider X=x as Subset of T|P;
    consider Q be Subset of T such that
A7: Q in F and
A8: Q /\ P = X by A6,Def3;
    reconsider p=Q as set;
    f.p = x by A3,A7,A8;
    hence thesis by A2,A7,FUNCT_1:def 3;
  end;
  hence rng f = F|P by TARSKI:2;
  thus thesis by A3;
end;
