
theorem Th9:
  for S be non empty compact TopSpace,
      T be non empty MetrSpace,
      f,g be Function of S,TopSpaceMetr(T)
   st f is continuous & g is continuous holds
   for Dist be RealMap of S
     st for x be Point of S
        holds Dist.x = dist (In(f.x,T),In(g.x,T))
   holds
     rng Dist <> {} &
     rng Dist is bounded_above bounded_below
  proof
    let S be non empty compact TopSpace,
        T be non empty MetrSpace,
        f,g be Function of S,TopSpaceMetr(T);
    assume that
A1: f is continuous and
A2: g is continuous;
    let Dist be RealMap of S;
    assume
A3: for x be Point of S
       holds Dist.x = dist (In(f.x,T),In(g.x,T));
    S is pseudocompact; then
    Dist is bounded by A1,A2,A3,Th8; then
A5: Dist is bounded_above & Dist is bounded_below;
    thus rng Dist <> {} by FUNCT_2:112;
    consider K being Real such that
A6: for t being object st t in dom Dist holds
      Dist.t < K by A5;
    now let r be ExtReal;
      assume r in rng Dist; then
      consider t being Element of S such that
  A7: r = Dist.t by FUNCT_2:113;
      dom Dist = the carrier of S by FUNCT_2:def 1;
      hence r <= K by A6,A7;
    end; then
    K is UpperBound of rng Dist by XXREAL_2:def 1;
    hence rng Dist is bounded_above;
    consider K being Real such that
A8: for t being object st t in dom Dist holds
      K < Dist.t by A5;
    now let r be ExtReal;
      assume r in rng Dist; then
      consider t being Element of S such that
  A9: r = Dist.t by FUNCT_2:113;
      dom Dist = the carrier of S by FUNCT_2:def 1;
      hence K <= r by A8,A9;
    end; then
    K is LowerBound of rng Dist by XXREAL_2:def 2;
    hence rng Dist is bounded_below;
  end;
