reserve n,n1,m,m1,k for Nat;
reserve x,X,X1 for set;
reserve g,g1,g2,t,x0,x1,x2 for Complex;
reserve s1,s2,q1,seq,seq1,seq2,seq3 for Complex_Sequence;
reserve Y for Subset of COMPLEX;
reserve f,f1,f2,h,h1,h2 for PartFunc of COMPLEX,COMPLEX;
reserve p,r,s for Real;
reserve Ns,Nseq for increasing sequence of NAT;

theorem Th32:
  f is_continuous_in x0 iff x0 in dom f & for r st 0<r ex s st 0<s
  & for x1 st x1 in dom f & |.x1-x0.|<s holds |.f/.x1-f/.x0.|<r
proof
  thus f is_continuous_in x0 implies x0 in dom f & for r st 0<r ex s st 0<s &
  for x1 st x1 in dom f & |.x1-x0.|<s holds |.f/.x1-f/.x0.|<r
  proof
    assume
A1: f is_continuous_in x0;
    hence x0 in dom f;
    given r such that
A2: 0<r and
A3: for s holds not 0<s or ex x1 st x1 in dom f & |.x1-x0.|<s & not |.
    f /.x1-f/.x0.|<r;
    defpred P[Nat,Complex] means $2 in dom f & |.$2-x0.|
    < 1/($1+1) & not |.f/.$2-f/.x0.|<r;
A4: for n ex g st P[n,g]
    proof
      let n;
      0<1/(n+1);
      then consider g such that
A5:   g in dom f & |.g-x0.| < 1/(n+1) & not |.f/.g-f/.x0.|<r by A3;
      take g;
      thus thesis by A5;
    end;
    consider s1 such that
A6: for n holds P[n,s1.n] from CompSeqChoice(A4);
A7: rng s1 c= dom f
    proof
      let x be object;
      assume x in rng s1;
      then ex n being Element of NAT st x=s1.n by FUNCT_2:113;
      hence thesis by A6;
    end;
A8: now
      let n;
A9:   n in NAT by ORDINAL1:def 12;
      not |.f/.(s1.n)-f/.x0.|<r by A6;
      hence not |.(f/*s1).n-f/.x0.|<r by A7,FUNCT_2:109,A9;
    end;
A10: now
     let s;
      consider n such that
A11:  s"<n by SEQ_4:3;
      assume 0<s;
      then
A12:  0<s";
      s"+0 <n+1 by A11,XREAL_1:8;
      then 1/(n+1)<1/s" by A12,XREAL_1:76;
      then
A13:  1/(n+1)<s by XCMPLX_1:216;
      take k=n;
      let m;
      assume k<=m;
      then k+1<=m+1 by XREAL_1:6;
      then 1/(m+1)<=1/(k+1) by XREAL_1:118;
      then 1/(m+1)<s by A13,XXREAL_0:2;
      hence |.s1.m-x0.|<s by A6,XXREAL_0:2;
    end;
    then
A14: s1 is convergent;
    then lim s1=x0 by A10,COMSEQ_2:def 6;
    then f/*s1 is convergent & f/.x0=lim(f/*s1) by A1,A7,A14;
    then consider n such that
A15: for m st n<=m holds |.(f/*s1).m-f/.x0.|<r by A2,COMSEQ_2:def 6;
    |.(f/*s1).n-f/.x0.|<r by A15;
    hence contradiction by A8;
  end;
  assume that
A16: x0 in dom f and
A17: for r st 0<r ex s st 0<s & for x1 st x1 in dom f & |.x1-x0.|<s
  holds |.f/.x1-f/.x0.|<r;
  now
    let s1 such that
A18: rng s1 c= dom f and
A19: s1 is convergent & lim s1 = x0;
A20: now
      let p;
      assume 0<p;
      then consider s such that
A21:  0<s and
A22:  for x1 st x1 in dom f & |.x1-x0.|<s holds |.f/.x1-f/.x0.|<p by A17;
      consider n such that
A23:  for m st n<=m holds |.s1.m-x0.|<s by A19,A21,COMSEQ_2:def 6;
      take k=n;
      let m;
A24:    m in NAT by ORDINAL1:def 12;
      assume k<=m;
      then s1.m in rng s1 & |.s1.m-x0.|<s by A23,VALUED_0:28;
      then |.f/.(s1.m)-f/.x0.|<p by A18,A22;
      hence |.(f/*s1).m - f/.x0.|<p by A18,FUNCT_2:109,A24;
    end;
    then f/*s1 is convergent;
    hence f/*s1 is convergent & f/.x0 = lim (f/*s1) by A20,COMSEQ_2:def 6;
  end;
  hence thesis by A16;
end;
