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

theorem
  for f being Function of T,R^1 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= ].f.p-r,f.p+r.[
  proof
    let f be Function of T,R^1;
    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= ].f.p-r,f.p+r.[
    proof
      assume
A1:   f is continuous;
      let p be Point of T;
      let r be positive Real;
A2:   f.p in ].f.p-r,f.p+r.[ by TOPREAL6:15;
      R^1(].f.p-r,f.p+r.[) is open;
      then ex W being Subset of T st p in W & W is open &
      f.:W c= ].f.p-r,f.p+r.[ by A1,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= ].f.p-r,f.p+r.[;
    for p being Point of T, V being Subset of R^1 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 R^1 such that
A4:   f.p in V;
      assume V is open;
      then consider r being Real such that
A5:   r > 0 and
A6:   ].f.p-r,f.p+r.[ c= V by A4,FRECHET:8;
      ex W being open Subset of T st p in W & f.:W c= ].f.p-r,f.p+r.[ by A3,A5;
      hence thesis by A6,XBOOLE_1:1;
    end;
    hence thesis by JGRAPH_2:10;
  end;
