
theorem Th3: :: LMcont
  for X being non empty TopSpace
  for f be Function of the carrier of X,COMPLEX holds
  (f is continuous iff for x being Point of X
  for V being Subset of COMPLEX st f.x in V & V is open holds
    ex W being Subset of X st (x in W & W is open & f.:W c= V))
proof
  let X be non empty TopSpace;
  let f be Function of the carrier of X,COMPLEX;
  hereby
    assume
A1:   f is continuous;
    now
      let x be Point of X;
      let V be Subset of COMPLEX;
      set z = f.x;
      reconsider z0 = z as Complex;
      assume z in V & V is open; then
      consider N be Neighbourhood of z0 such that
A2:    N c= V by CFDIFF_1:9;
      consider g being Real such that
A3:   0<g & {y where y is Complex:|.(y-z0).| < g } c= N by CFDIFF_1:def 5;
      set S={y where y is Complex:|.(y-z0).| < g };
      S c= COMPLEX
      proof
        let z be object;
        assume z in S;
        then ex y being Complex st z = y & |.(y - z0).| < g;
        hence z in COMPLEX by XCMPLX_0:def 2;
      end;
      then reconsider S1=S as Subset of COMPLEX;
      take W = f"S;
A4:   S1 is open by CFDIFF_1:13;
      S is Neighbourhood of z0 by A3,CFDIFF_1:6;
      then f.x in S by CFDIFF_1:7;
      hence x in W by FUNCT_2:38;
      thus W is open by A1,A4,Th2;
      f.:(f"S) c= S by FUNCT_1:75;
      then f.:W c= N by A3;
      hence f .: W c= V by A2;
    end;
    hence for x being Point of X
    for V being Subset of COMPLEX st f . x in V & V is open holds
      ex W being Subset of X st x in W & W is open & f .: W c= V;
  end;
  assume
A5: for x being Point of X
  for V being Subset of COMPLEX st f . x in V & V is open holds
  ex W being Subset of X st x in W & W is open & f .: W c= V;
  now
    let Y be Subset of COMPLEX;
    assume Y is closed;
    then (Y`)` is closed;
    then
A6:   Y` is open by CFDIFF_1:def 11;
    for x being Point of X st x in (f " Y)` holds
    ex W being Subset of X st W is a_neighborhood of x & W c= (f " Y)`
    proof
      let x be Point of X;
      assume x in (f"Y)`;
      then x in f " (Y`) by FUNCT_2:100;
      then f.x in Y` by FUNCT_2:38;
      then consider V being Subset of COMPLEX such that
A7:   f.x in V & V is open & V c= Y` by A6;
      consider W being Subset of X such that
A8:   x in W & W is open & f .: W c= V by A5,A7;
      take W;
      thus W is a_neighborhood of x by A8,CONNSP_2:3;
      f .: W c= Y` by A7,A8;
      then
A9:     f " (f .: W) c= f"(Y`) by RELAT_1:143;
      W c= f " (f .: W) by FUNCT_2:42;
      then W c= f " (Y`) by A9;
      hence W c= (f"Y)` by FUNCT_2:100;
    end;
    then (f " Y)` is open by CONNSP_2:7;
    then ((f " Y)`)` is closed by TOPS_1:4;
    hence f " Y is closed;
  end;
  hence f is continuous;
end;
