reserve n,m,i,k for Element of NAT;
reserve x,X,X1 for set;
reserve r,p for Real;
reserve s,x0,x1,x2 for Real;
reserve f,f1,f2 for PartFunc of REAL,REAL n;
reserve h for PartFunc of REAL,REAL-NS n;
reserve W for non empty set;

theorem
  f is_continuous_in x0 iff
  x0 in dom f & for N1 be Subset of REAL n st ex r be Real st 0 < r &
  {y where y is Element of REAL  n: |.y-f/.x0.| < r} = N1
  ex N being Neighbourhood of x0 st
  for x1 st x1 in dom f & x1 in N holds f/.x1 in N1
proof
  thus f is_continuous_in x0 implies x0 in dom f &
    for N1 be Subset of REAL n st ex r be Real st 0 < r &
    {y where y is Element of REAL n: |.y-f/.x0.| < r} = N1
    ex N being Neighbourhood of x0
    st for x1 st x1 in dom f & x1 in N holds f/.x1 in N1
  proof
    assume f is_continuous_in x0;
    then consider g be PartFunc of REAL,REAL-NS n such that
A1:  f=g & g is_continuous_in x0;
     thus x0 in dom f by A1;
     let N01 be Subset of REAL n such that
A2:  ex r be Real st 0 < r &
     {y where y is Element of REAL n: |.y-f/.x0.| < r} = N01;
     consider r such that
A3:  0<r and
A4:  { p where p is Element of REAL n : |. p - f/.x0 .| < r } = N01 by A2;
     f/.x0 = g/.x0 by A1,REAL_NS1:def 4; then
A5:  { p where p is Point of REAL-NS n : ||. p - g/.x0 .|| < r } = N01
       by A4,Th4;
     { p where p is Point of REAL-NS n : ||. p - g/.x0 .|| < r }
     is Neighbourhood of g/.x0 by A3,NFCONT_1:3;
     then consider N being Neighbourhood of x0 such that
A6:  for x1 st x1 in dom g & x1 in N holds g/.x1 in N01 by A5,A1,NFCONT_3:9;
     take N;
     let x1;
     assume x1 in dom f & x1 in N;
     then g/.x1 in N01 by A1,A6;
     hence f/.x1 in N01 by A1,REAL_NS1:def 4;
   end;
   assume
A7: x0 in dom f & for N1 be Subset of REAL n
    st ex r be Real st 0 < r &
    {y where y is Element of REAL n: |.y-f/.x0.| < r} = N1
    ex N being Neighbourhood of x0
    st for x1 st x1 in dom f & x1 in N holds f/.x1 in N1;
    reconsider g= f as PartFunc of REAL,REAL-NS n
    by REAL_NS1:def 4;
    now let N1 being Neighbourhood of g/.x0;
      consider r be Real such that
A8:  0<r and
A9: { p where p is Point of REAL-NS n : ||. p - g/.x0 .|| < r } c= N1
       by NFCONT_1:def 1;
     reconsider rr=r as Real;
A10:  0 < rr by A8;
     set N01 = { p where p is Element of REAL n : |. p - f/.x0 .| < r };
     f/.x0 = g/.x0 by REAL_NS1:def 4; then
A11: { p where p is Element of REAL n : |. p - f/.x0 .| < r }
     = { p where p is Point of REAL-NS n : ||. p - g/.x0 .|| < r } by Th4;
     now let x be object;
       assume x in N01;
       then ex p be Element of REAL n
       st p=x & |. p - f/.x0 .| < r;
       hence x in REAL n;
     end;
     then N01 is Subset of REAL n by TARSKI:def 3;
     then consider N being Neighbourhood of x0 such that
A12: for x1 st x1 in dom f & x1 in N holds f/.x1 in N01 by A7,A10;
     take N;
     let x1;
     assume x1 in dom g & x1 in N;
     then f/.x1 in N01 by A12;
     then g/.x1 in N01 by REAL_NS1:def 4;
     hence g/.x1 in N1 by A9,A11;
   end;
   then g is_continuous_in x0 by A7,NFCONT_3:9;
   hence thesis;
end;
