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
  f is total & (for x1,x2 holds f/.(x1+x2) = f/.x1 + f/.x2) & (ex x0 st
  f is_continuous_in x0) implies f is_continuous_on COMPLEX
proof
  assume that
A1: f is total and
A2: for x1,x2 holds f/.(x1+x2) = f/.x1 + f/.x2 and
A3: ex x0 st f is_continuous_in x0;
A4: dom f = COMPLEX by A1,PARTFUN1:def 2;
  consider x0 such that
A5: f is_continuous_in x0 by A3;
A6: f/.x0 + 0c = f/.(x0+0c) .= f/.x0+f/.0c by A2;
A7: now
    let x1;
    0c = f/.(x1+-x1) by A6
      .= f/.x1+f/.(-x1) by A2;
    hence -(f/.x1)=f/.(-x1);
  end;
A8: now
    let x1,x2;
    thus f/.(x1-x2)=f/.(x1+-x2) .= f/.x1 + f/.(-x2) by A2
      .= f/.x1 +- f/.x2 by A7
      .= f/.x1 - f/.x2;
  end;
  now
    let x1,r;
    assume that
    x1 in COMPLEX and
A9: r>0;
    set y=x1-x0;
    consider s such that
A10: 0<s and
A11: for x1 st x1 in dom f & |.x1-x0.|<s holds |.f/.x1-f/.x0.|<r by A5,A9,Th32;
    take s;
    thus s>0 by A10;
    let x2 such that
   x2 in COMPLEX and
A12: |.x2-x1.|<s;
A13: |.x2-y-x0.|=|.x2-x1.|;
A14: x2 - y in dom f by A4,XCMPLX_0:def 2;
    x1-x0+x0=x1;
    then |.f/.x2-f/.x1.| = |.f/.x2-(f/.y+f/.x0).| by A2
      .= |.f/.x2-f/.y-f/.x0.|
      .= |.f/.(x2-y)-f/.x0.| by A8;
    hence |.f/.x2-f/.x1.|<r by A11,A12,A13,A14;
  end;
  hence thesis by A4,Th39;
end;
