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 Th17:
  for T st T is T_1 for s, FS2 st (for n ex pmet st FS2.n=pmet &
  pmet is_a_pseudometric_of the carrier of T & (for pq holds pmet.pq<=s) & for
  pmet9 st pmet=pmet9 holds pmet9 is continuous) & for p,A9 st not p in A9 & A9
is closed ex n st for pmet st FS2.n=pmet holds lower_bound(pmet,A9).p>0
holds (ex pmet
st pmet is_metric_of the carrier of T & for pq holds pmet.pq=Sum((1/2)GeoSeq(#)
  (FS2#pq))) & T is metrizable
proof
  let T such that
A1: T is T_1;
  set cT=the carrier of T,Geo=(1/2)GeoSeq;
  let s,FS2 such that
A2: for n ex pmet st FS2.n=pmet & pmet is_a_pseudometric_of the carrier
  of T & (for pq holds pmet.pq<=s) & for pmet9 st pmet=pmet9 holds pmet9 is
  continuous and
A3: for p,A9 st not p in A9 & A9 is closed ex n st for pmet st FS2.n=
  pmet holds lower_bound(pmet,A9).p>0;
  deffunc pm(Element of cT,Element of cT)=In(Sum(Geo(#)(FS2#[$1,$2])),REAL);
  consider pmet such that
A4: for p,q holds pmet.(p,q)=pm(p,q) from BINOP_1:sch 4;
A5: for pq holds pmet.pq=Sum(Geo(#)(FS2#pq))
  proof
    let pq;
    consider p,q be object such that
A6: p in cT & q in cT and
A7: pq=[p,q] by ZFMISC_1:def 2;
    reconsider p,q as Element of cT by A6;
    pmet.pq = pmet.(p,q) by A7
       .= pm(p,q) by A4;
    hence thesis by A7;
  end;
A8: for pq,n holds 0<=(Geo(#)(FS2#pq)).n & (Geo(#)(FS2#pq)).n<=(s(#)Geo).n
  proof
    let pq,n;
    consider x,y being object such that
A9: x in cT & y in cT and
A10: [x,y]=pq by ZFMISC_1:def 2;
    reconsider x,y as Point of T by A9;
A11: (Geo.n)*s=(s(#)Geo).n by SEQ_1:9;
    (1/2)|^n>0 by NEWTON:83;
    then
A12: Geo.n>0 by PREPOWER:def 1;
    consider pmet1 such that
A13: FS2.n=pmet1 and
A14: pmet1 is_a_pseudometric_of cT and
A15: for pq holds pmet1.pq<=s and
    for pmet19 st pmet1=pmet19 holds pmet19 is continuous by A2;
A16: 0<=pmet1.(x,y) by A14,NAGATA_1:29;
A17: pmet1.pq=(FS2#pq).n by A13,SEQFUNC:def 10;
    then (Geo.n)*(FS2#pq).n<=(Geo.n)*s by A15,A12,XREAL_1:64;
    hence thesis by A10,A16,A12,A17,A11,SEQ_1:8;
  end;
A18: for p,q holds pmet.(p,q)=0 implies p=q
  proof
    let p,q;
    assume that
A19: pmet.(p,q)=0 and
A20: p<>q;
    set Q={q};
A21: not p in Q by A20,TARSKI:def 1;
    set pq=[p,q];
A22: Sum(Geo(#)(FS2#pq))=0 by A5,A19;
A23: for n holds 0<=(Geo(#)(FS2#pq)).n & (Geo(#)(FS2#pq)).n<=(s(#)Geo).n by A8;
    Q is closed by A1,URYSOHN1:19;
    then consider n such that
A24: for pmet1 st FS2.n=pmet1 holds lower_bound(pmet1,Q).p>0 by A3,A21;
    consider pmet1 such that
A25: FS2.n=pmet1 and
A26: pmet1 is_a_pseudometric_of cT and
    for pq holds pmet1.pq<=s and
    for pmet19 st pmet1=pmet19 holds pmet19 is continuous by A2;
    lower_bound(pmet1,Q).p> 0 by A24,A25;
    then
A27: lower_bound(dist(pmet1,p).:Q)>0 by Def3;
    (1/2)<1;
    then |.1/2.|<1 by ABSVALUE:def 1;
    then Geo is summable by SERIES_1:24;
    then s(#)Geo is summable by SERIES_1:10;
    then Geo(#)(FS2#pq) is summable by A23,SERIES_1:20;
    then (Geo(#)(FS2#pq)).n=0 by A23,A22,RSSPACE:17;
    then
A28: Geo.n *(FS2#pq).n=0 by SEQ_1:8;
    (1/2)|^n>0 by NEWTON:83;
    then Geo.n<>0 by PREPOWER:def 1;
    then
A29: (FS2#pq).n=0 by A28,XCMPLX_1:6;
A30: pmet1.(p,q)=dist(pmet1,p).q by Def2;
    dom dist(pmet1,p)=cT & q in Q by FUNCT_2:def 1,TARSKI:def 1;
    then
A31: dist(pmet1,p).q in dist(pmet1,p).:Q by FUNCT_1:def 6;
    dist(pmet1,p).:Q is non empty bounded_below by A26,Lm1;
    then dist(pmet1,p).q>0 by A31,A27,SEQ_4:def 2;
    hence thesis by A25,A29,A30,SEQFUNC:def 10;
  end;
  pmet is_a_pseudometric_of cT by A2,A5,Th15;
  then pmet is Reflexive discerning symmetric triangle by A18,METRIC_1:def 3
,NAGATA_1:def 10;
  then
A32: pmet is_metric_of cT by METRIC_6:3;
  hence ex pmet st pmet is_metric_of the carrier of T & for pq holds pmet.pq=
  Sum((1/2)GeoSeq(#)(FS2#pq)) by A5;
  for A be non empty Subset of T holds Cl A
  ={p where p is Point of T:lower_bound(
  pmet,A).p=0}
  proof
    let A be non empty Subset of T;
    set INF={p where p is Point of T:lower_bound(pmet,A).p=0};
A33: INF c= Cl A
    proof
      let x be object;
      assume x in INF;
      then consider p be Point of T such that
A34:  x=p and
A35:  lower_bound(pmet,A).p=0;
A36:  lower_bound(dist(pmet,p).:A)=0 by A35,Def3;
      pmet is_a_pseudometric_of cT by A2,A5,Th15;
      then
A37:  dist(pmet,p).:A is non empty bounded_below by Lm1;
A38:  A c= Cl A & ex y being object st y in A by PRE_TOPC:18,XBOOLE_0:def 1;
A39:  A c= Cl A by PRE_TOPC:18;
      assume not x in Cl A;
      then consider n such that
A40:  for pmet1 st FS2.n=pmet1 holds lower_bound(pmet1,Cl A).p>0 by A3,A34,A38;
      (1/2)|^n>0 by NEWTON:83;
      then
A41:  Geo.n>0 by PREPOWER:def 1;
      (1/2)|^n>0 by NEWTON:83;
      then
A42:  Geo.n>0 by PREPOWER:def 1;
      consider pmet1 such that
A43:  FS2.n=pmet1 and
A44:  pmet1 is_a_pseudometric_of cT and
      for pq holds pmet1.pq<=s and
      for pmet19 st pmet1=pmet19 holds pmet19 is continuous by A2;
      set r=Geo.n*lower_bound(pmet1,Cl A).p;
A45:  lower_bound(dist(pmet1,p).:(Cl A))= lower_bound(pmet1,Cl A).p by Def3;
A46:  lower_bound(pmet1,Cl A).p>0 by A40,A43;
      then r>0 by A41,XREAL_1:129;
      then r/2>0 by XREAL_1:215;
      then consider rn such that
A47:  rn in dist(pmet,p).:A and
A48:  rn<lower_bound(dist(pmet,p).:A)+r/2 by A37,SEQ_4:def 2;
      consider a be object such that
A49:  a in dom dist(pmet,p) and
A50:  a in A and
A51:  rn=dist(pmet,p).a by A47,FUNCT_1:def 6;
      reconsider a as Point of T by A49;
      reconsider pa=[p,a] as Element of [:cT,cT:];
A52:  dist(pmet1,p).a=pmet1.(p,a) by Def2;
      dom dist(pmet1,p)=cT by FUNCT_2:def 1;
      then
A53:  dist(pmet1,p).a in dist(pmet1,p).:(Cl A) by A50,A39,FUNCT_1:def 6;
      dist(pmet1,p).:(Cl A) is non empty bounded_below by A44,A50,A39,Lm1;
      then lower_bound(pmet1,Cl A).p<=dist(pmet1,p).a by A53,A45,SEQ_4:def 2;
      then lower_bound(pmet1,Cl A).p<=(FS2#pa).n by A43,A52,SEQFUNC:def 10;
      then r<=Geo.n *(FS2#pa).n by A42,XREAL_1:64;
      then
A54:  r<=(Geo(#)(FS2#pa)).n by SEQ_1:8;
A55:  for k holds 0<=(Geo(#)(FS2#pa)).k & (Geo(#)(FS2#pa)).k<=(s(#)Geo).k
      by A8;
      pmet.pa=pmet.(p,a);
      then
A56:  rn=pmet.pa by A51,Def2;
      1/2<1;
      then |.1/2.|<1 by ABSVALUE:def 1;
      then Geo is summable by SERIES_1:24;
      then s(#)Geo is summable by SERIES_1:10;
      then Geo(#)(FS2#pa) is summable by A55,SERIES_1:20;
      then (Geo(#)(FS2#pa)).n <=Sum(Geo(#)(FS2#pa)) by A55,RSSPACE2:3;
      then rn>=(Geo(#)(FS2#pa)).n by A5,A56;
      then (Geo(#)(FS2#pa)).n <r/2 by A48,A36,XXREAL_0:2;
      then r<r/2 by A54,XXREAL_0:2;
      hence thesis by A41,A46,XREAL_1:129,216;
    end;
    Cl A c= INF
    proof
      let x be object;
      assume
A57:  x in Cl A;
      then reconsider p=x as Point of T;
      pmet is_a_pseudometric_of cT & for pmet9 st pmet=pmet9 holds pmet9
      is continuous by A2,A5,Th15;
      then lower_bound(pmet,A).p=0 by A57,Th16;
      hence thesis;
    end;
    hence thesis by A33;
  end;
  hence thesis by A32,Th10;
end;
