reserve
  n, m for Nat,
  T for non empty TopSpace,
  M, M1, M2 for non empty MetrSpace;

theorem
  for f being Function of T,TOP-REAL m holds f is continuous iff
  for p being Point of T, r being positive Real
  ex W being open Subset of T st p in W & f.:W c= Ball(f.p,r)
  proof
    let f be Function of T,TOP-REAL m;
A1: m in NAT by ORDINAL1:def 12;
    thus f is continuous implies
    for p being Point of T, r being positive Real
    ex W being open Subset of T st p in W & f.:W c= Ball(f.p,r)
    proof
      assume
A2:   f is continuous;
      let p be Point of T;
      let r be positive Real;
      f.p in Ball(f.p,r) by A1,TOPGEN_5:13;
      then ex W being Subset of T st p in W & W is open & f.:W c= Ball(f.p,r)
      by A2,JGRAPH_2:10;
      hence thesis;
    end;
    assume
A3: for p being Point of T, r being positive Real
    ex W being open Subset of T st p in W & f.:W c= Ball(f.p,r);
    for p being Point of T, V being Subset of TOP-REAL m
    st f.p in V & V is open holds
    ex W being Subset of T st p in W & W is open & f.:W c= V
    proof
      let p be Point of T, V be Subset of TOP-REAL m such that
A4:   f.p in V;
      reconsider u = f.p as Point of Euclid m by EUCLID:67;
      assume V is open;
      then Int V = V by TOPS_1:23;
      then consider e being Real such that
A5:   e > 0 and
A6:   Ball(u,e) c= V by A4,GOBOARD6:5;
A7:   Ball(u,e) = Ball(f.p,e) by TOPREAL9:13;
      ex W being open Subset of T st p in W & f.:W c= Ball(f.p,e) by A3,A5;
      hence thesis by A6,A7,XBOOLE_1:1;
    end;
    hence thesis by JGRAPH_2:10;
  end;
