reserve i, k, m, n for Nat,
  r, s for Real,
  rn for Real,
  x, y , z, X for set,
  T, T1, T2 for non empty TopSpace,
  p, q for Point of T,
  A, B, C for Subset of T,
  A9 for non empty Subset of T,
  pq for Element of [:the carrier of T,the carrier of T:],
  pq9 for Point of [:T,T:],
  pmet,pmet1 for Function of [:the carrier of T,the carrier of T:],REAL,
  pmet9,pmet19 for RealMap of [:T,T:] ,
  f,f1 for RealMap of T,
  FS2 for Functional_Sequence of [:the carrier of T,the carrier of T:],REAL,
  seq for Real_Sequence;

theorem Th4:
  for pmet st for pmet9 st pmet=pmet9 holds pmet9 is continuous for
  x be Point of T holds dist(pmet,x) is continuous
proof
  set cT=the carrier of T;
  let pmet such that
A1: for pmet9 st pmet=pmet9 holds pmet9 is continuous;
  [:cT,cT:]= the carrier of [:T,T:] by BORSUK_1:def 2;
  then reconsider pmet9=pmet as RealMap of [:T,T:];
  reconsider pmetR=pmet9 as Function of [:T,T:],R^1 by TOPMETR:17;
  let x be Point of T;
  reconsider distx=dist(pmet,x) as Function of T,R^1 by TOPMETR:17;
  pmet9 is continuous by A1;
  then
A2: pmetR is continuous by JORDAN5A:27;
  now
    let t be Point of T;
    for R being Subset of R^1 st R is open & distx.t in R ex U being
    Subset of T st U is open & t in U & distx.:U c= R
    proof
      reconsider xt=[x,t] as Point of [:T,T:] by BORSUK_1:def 2;
A3:   dom pr2(cT,cT)=[:cT,cT:] by FUNCT_3:def 5;
A4:   pmetR is_continuous_at xt & distx.t=pmet.(x,t) by A2,Def2,TMAP_1:50;
      let R be Subset of R^1;
      assume R is open & distx.t in R;
      then consider XU be Subset of [:T,T:] such that
A5:   XU is open and
A6:   xt in XU and
A7:   pmetR.:XU c= R by A4,TMAP_1:43;
      set U=pr2(cT,cT).:(XU/\[:{x},cT:]);
      [x,t] in [:{x},cT:] by ZFMISC_1:105;
      then [x,t] in XU/\[:{x},cT:] by A6,XBOOLE_0:def 4;
      then pr2(cT,cT).(x,t) in pr2(cT,cT).:(XU/\[:{x},cT:]) by A3,FUNCT_1:def 6
;
      then
A8:   t in U by FUNCT_3:def 5;
A9:   distx.:U c= R
      proof
        let du be object;
        assume du in distx.:U;
        then consider u be object such that
A10:    u in dom distx and
A11:    u in U and
A12:    distx.u=du by FUNCT_1:def 6;
        reconsider u as Point of T by A10;
        consider xu be object such that
A13:    xu in dom pr2(cT,cT) and
A14:    xu in (XU/\[:{x},cT:]) and
A15:    pr2(cT,cT).xu=u by A11,FUNCT_1:def 6;
        consider x9,u9 be object such that
A16:    x9 in cT & u9 in cT and
A17:    xu=[x9,u9] by A13,ZFMISC_1:def 2;
        reconsider x9,u9 as Point of T by A16;
        [x9,u9] in [:{x},cT:] by A14,A17,XBOOLE_0:def 4;
        then pr2(cT,cT).(x9,u9) = u9 & x9=x by FUNCT_3:def 5,ZFMISC_1:105;
        then
A18:    pmet.(x9,u9)=du by A12,A15,A17,Def2;
A19:    dom pmetR=the carrier of [:T,T:] by FUNCT_2:def 1;
        [x9,u9] in XU by A14,A17,XBOOLE_0:def 4;
        then du in pmetR.:XU by A18,A19,FUNCT_1:def 6;
        hence thesis by A7;
      end;
      U is open by A5,Th3;
      hence thesis by A8,A9;
    end;
    hence distx is_continuous_at t by TMAP_1:43;
  end;
  then distx is continuous by TMAP_1:50;
  hence thesis by JORDAN5A:27;
end;
