
theorem Th10:
  for S be non empty TopSpace,
      T be non empty MetrSpace holds
  ex F be Function of [:ContinuousFunctions (S,T),ContinuousFunctions (S,T):],
    REAL st
  for f,g be Function of S,TopSpaceMetr(T)
    st f in ContinuousFunctions (S,T)
      & g in ContinuousFunctions (S,T) holds
  ex Dist be RealMap of S
     st ( for x be Point of S
        holds Dist.x = dist (In(f.x,T),In(g.x,T)) )
      & F.(f,g) = upper_bound rng Dist
  proof
    let S be non empty TopSpace,
        T be non empty MetrSpace;
    set F1 = ContinuousFunctions (S,T);
    defpred P[object, object, object] means
      ex f,g be Function of S,TopSpaceMetr(T),
         Dist be RealMap of S st
      $1 = f & $2 = g &
     ( for t be Point of S
        holds Dist.t=dist (In(f.t,T),In(g.t,T)) )
      & $3 = upper_bound rng Dist;
A1: for x, y being object st x in F1 & y in F1 holds
    ex z being object st z in REAL & P[x,y,z]
    proof
      let x, y be object;
      assume A2: x in F1 & y in F1; then
      consider f be Function of S,TopSpaceMetr(T) such that
  A3: x=f & f is continuous;
      consider g be Function of S,TopSpaceMetr(T) such that
  A4: y=g & g is continuous by A2;
      deffunc F3(object) = dist (In(f.$1,T),In(g.$1,T));
  A5: for t being object st t in the carrier of S holds
        F3(t) in REAL by XREAL_0:def 1;
      consider Dist being Function of the carrier of S,REAL such that
  A6: for t being object st t in the carrier of S holds
         Dist.t = F3(t) from FUNCT_2:sch 2(A5);
      reconsider Dist as RealMap of S;
  A7: for t be Point of S
        holds Dist.t=dist (In(f.t,T),In(g.t,T)) by A6;
      take z = upper_bound rng Dist;
      thus z in REAL by XREAL_0:def 1;
      thus P[x,y,z] by A3,A4,A7;
    end;
    consider F being Function of [:F1,F1:],REAL such that
A8: for x, y being object st x in F1 & y in F1 holds
      P[x,y,F.(x,y)] from BINOP_1:sch 1(A1);
    take F;
    let f1,g1 be Function of S,TopSpaceMetr(T);
    assume f1 in ContinuousFunctions (S,T)
      & g1 in ContinuousFunctions (S,T); then
    ex f,g be Function of S,TopSpaceMetr(T),
      Dist be RealMap of S st f1 = f & g1 = g
     & ( for x be Point of S
        holds Dist.x=dist (In(f.x,T),In(g.x,T)) )
      & F.(f1,g1) = upper_bound rng Dist by A8;
    hence thesis;
  end;
