reserve T, T1 for non empty TopSpace;
reserve F,G,H for Subset-Family of T,
  A,B,C,D for Subset of T,
  O,U for open Subset of T,
  p,q for Point of T,
  x,y,X for set;
reserve Un for FamilySequence of T,
  r,r1,r2 for Real,
  n for Element of NAT;

theorem
  for T st T is metrizable holds T is regular & T is T_1
proof
  let T;
  assume T is metrizable;
  then consider
  metr being Function of [:the carrier of T,the carrier of T:],REAL
  such that
A1: metr is_metric_of (the carrier of T) and
A2: Family_open_set( SpaceMetr (the carrier of T,metr)) = the topology
  of T;
  set PM = SpaceMetr(the carrier of T,metr);
  reconsider PM as non empty MetrSpace by A1,PCOMPS_1:36;
  set TPM = TopSpaceMetr PM;
A3: for p being Element of T for D being Subset of T st D <> {} & D is
closed & p in D` ex A,B being Subset of T st A is open & B is open & p in A & D
  c= B & A misses B
  proof
    let p be Element of T;
    let D be Subset of T;
    assume that
    D<>{} and
A4: D is closed and
A5: p in D`;
A6: [#]T\D in the topology of T by A4,A5,PRE_TOPC:def 2;
    reconsider p as Element of PM by A1,PCOMPS_2:4;
A7: D misses D` by XBOOLE_1:79;
    reconsider D as Subset of TPM by A1,PCOMPS_2:4;
    [#]TPM\D in Family_open_set(PM) by A1,A2,A6,PCOMPS_2:4;
    then [#]TPM\D is open by PRE_TOPC:def 2;
    then
A8: D is closed by PRE_TOPC:def 3;
A9: not p in D by A5,A7,XBOOLE_0:3;
    ex r1 st r1>0 & Ball(p,r1) misses D
    proof
      assume
A10:  for r1 st r1>0 holds Ball(p,r1) meets D;
      now
        let A be Subset of TPM;
        assume that
A11:    A is open and
A12:    p in A;
        A in Family_open_set(PM) by A11,PRE_TOPC:def 2;
        then consider r2 such that
A13:    r2>0 and
A14:    Ball(p,r2) c= A by A12,PCOMPS_1:def 4;
        Ball(p,r2) meets D by A10,A13;
        then ex x being object st x in Ball(p,r2) & x in D by XBOOLE_0:3;
        hence A meets D by A14,XBOOLE_0:3;
      end;
      then p in Cl D by PRE_TOPC:def 7;
      hence thesis by A8,A9,PRE_TOPC:22;
    end;
    then consider r1 such that
A15: r1>0 and
A16: Ball(p,r1) misses D;
    set r2=r1/2;
A17: r2<r2+r2 by A15,XREAL_1:29;
A18: D c= [#]PM\cl_Ball(p,r2)
    proof
      assume not D c= [#]PM\cl_Ball(p,r2);
      then consider x being object such that
A19:  x in D and
A20:  not x in [#]PM\cl_Ball(p,r2);
      reconsider x as Element of PM by A19;
      x in cl_Ball(p,r2) by A20,XBOOLE_0:def 5;
      then dist(p,x) <= r2 by METRIC_1:12;
      then dist(p,x) < r1 by A17,XXREAL_0:2;
      then x in Ball(p,r1) by METRIC_1:11;
      hence thesis by A16,A19,XBOOLE_0:3;
    end;
    set r4=r2/2;
A21: r2 > 0 by A15,XREAL_1:139;
    then
A22: r4 < r4+r4 by XREAL_1:29;
A23: Ball(p,r4) misses [#]PM\cl_Ball(p,r2)
    proof
      assume Ball(p,r4) meets [#]PM\cl_Ball(p,r2);
      then consider x being object such that
A24:  x in Ball(p,r4) and
A25:  x in [#]PM\cl_Ball(p,r2) by XBOOLE_0:3;
      reconsider x as Element of PM by A24;
      not x in cl_Ball(p,r2) by A25,XBOOLE_0:def 5;
      then
A26:  dist(p,x)>r2 by METRIC_1:12;
      dist(p,x)<r4 by A24,METRIC_1:11;
      hence thesis by A22,A26,XXREAL_0:2;
    end;
    set A=Ball(p,r4);
    set B = [#]PM\cl_Ball(p,r2);
A27: B in Family_open_set(PM) & A in Family_open_set(PM) by Th14,PCOMPS_1:29;
    then reconsider A,B as Subset of T by A2;
    take A,B;
    r4>0 by A21,XREAL_1:139;
    then dist(p,p)<r4 by METRIC_1:1;
    hence thesis by A2,A18,A23,A27,METRIC_1:11,PRE_TOPC:def 2;
  end;
  for p,q being Point of T st not p = q ex A,B being Subset of T st A is
  open & B is open & p in A & not q in A & q in B & not p in B
  proof
    let p,q be Point of T;
    assume
A28: not p=q;
    reconsider p,q as Element of TPM by A1,PCOMPS_2:4;
    TPM is T_2 by PCOMPS_1:34;
    then consider A,B being Subset of TPM such that
A29: A is open and
A30: B is open and
A31: p in A & q in B and
A32: A misses B by A28,PRE_TOPC:def 10;
    reconsider A,B as Subset of T by A1,PCOMPS_2:4;
    A in the topology of T by A2,A29,PRE_TOPC:def 2;
    then
A33: A is open by PRE_TOPC:def 2;
    B in the topology of T by A2,A30,PRE_TOPC:def 2;
    then
A34: B is open by PRE_TOPC:def 2;
    ( not q in A)& not p in B by A31,A32,XBOOLE_0:3;
    hence thesis by A31,A33,A34;
  end;
  hence thesis by A3,URYSOHN1:def 7;
end;
