
theorem Th2:
  for S be non empty TopSpace,
      T be non empty MetrSpace,
      f be Function of S,TopSpaceMetr(T),
      x be Point of S holds
  (  f is_continuous_at x
    iff
   for e be Real
     st 0 < e
       holds ex H being Subset of S st
  ( H is open & x in H &
  for y be Point of S
     st y in H holds dist(In(f.x,T),In(f.y,T)) < e ) )
proof
  let S be non empty TopSpace, T be non empty MetrSpace,
      f be Function of S,TopSpaceMetr(T),
      x be Point of S;
  hereby assume
A1: f is_continuous_at x;
    let e be Real;
    assume A2: 0 < e;
    reconsider V = Ball (In(f.x,T),e) as Subset of TopSpaceMetr(T);
    dist(In(f.x,T),In(f.x,T)) = 0 by METRIC_1:1; then
    In(f.x,T) in V by METRIC_1:11,A2; then
    consider H being Subset of S such that
A3: H is open & x in H & f .: H c= V by A1,TMAP_1:43,TOPMETR:14;
    take H;
    thus H is open by A3;
    thus x in H by A3;
    let y be Point of S;
    assume y in H; then
    f.y in f.:H by FUNCT_2:35;
    hence dist(In(f.x,T),In(f.y,T)) < e by A3,METRIC_1:11;
  end;
  assume
A4: for e be Real st 0 < e
    holds ex H being Subset of S st
      ( H is open & x in H & for y be Point of S
         st y in H holds dist(In(f.x,T),In(f.y,T)) < e );
    for G being Subset of TopSpaceMetr(T)
      st G is open & f.x in G holds
    ex H being Subset of S st
      H is open & x in H & f .: H c= G
    proof
      let G be Subset of TopSpaceMetr(T);
      assume G is open & f.x in G; then
      consider r being Real such that
A5:   r > 0 & Ball(In(f.x,T),r) c= G by TOPMETR:15;
      consider H being Subset of S such that
   A6: H is open & x in H &
      for y be Point of S
      st y in H holds dist(In(f.x,T),In(f.y,T)) < r
          by A4,A5;
      take H;
      thus H is open by A6;
      thus x in H by A6;
      now let z be object;
        assume z in f .: H; then
        consider t being object such that
A7:     t in dom f & t in H & z = f.t by FUNCT_1:def 6;
        reconsider t as Point of S by A7;
        dist(In(f.x,T),In(f.t,T)) < r by A7,A6;
        hence z in G by A5,A7,METRIC_1:11;
      end;
      hence f .: H c= G;
    end;
    hence f is_continuous_at x by TMAP_1:43;
  end;
