reserve n,m,k for Nat;
reserve x,X,X1 for set;
reserve r,p for Real;
reserve s,g,x0,x1,x2 for Real;
reserve S,T for RealNormSpace;
reserve f,f1,f2 for PartFunc of REAL,the carrier of S;
reserve s1,s2 for Real_Sequence;
reserve Y for Subset of REAL;

theorem Th8:
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,Real] means
      $2 in dom f & |.$2-x0.| < 1/($1+1) & not ||. f/.$2 - f/.x0 .||<r;
A4: for n being Element of NAT ex p being Element of REAL st P[n,p]
    proof
     let n be Element of NAT;
     0 < (n+1)"; then
     0 < 1/(n+1) by XCMPLX_1:215; then
     consider x1 such that
A5:   x1 in dom f & |.x1-x0.| < 1/(n+1) & not ||. f/.x1 - f/.x0 .|| < r
         by A3;
     take x1;
     thus thesis by A5;
    end;
    consider s1 such that
A6:  for n being Element of NAT holds P[n,s1.n] from FUNCT_2:sch 3(A4);
    now 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 x in dom f by A6;
    end; then
A7: rng s1 c= dom f by TARSKI:def 3;
A8: now let s be Real;
     assume A9: 0<s;
     consider n such that
A10:  s"<n by SEQ_4:3;
     s"+(0 qua Nat) <n+1 by A10,XREAL_1:8; then
     1/(n+1) < 1/s" by A9,XREAL_1:76; then
A11: 1/(n+1) < s by XCMPLX_1:216;
     take k=n;
     let m;
A12:   m in NAT by ORDINAL1:def 12;
     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 A11,XXREAL_0:2;
     hence |.s1.m-x0.| < s by A6,XXREAL_0:2,A12;
    end; then
A13:s1 is convergent by SEQ_2:def 6; then
    lim s1=x0 by A8,SEQ_2:def 7; then
    f/*s1 is convergent & f/.x0=lim(f/*s1) by A1,A7,A13; then
    consider n such that
A14: for m st n<=m holds ||.(f/*s1).m-f/.x0 .||<r by A2,NORMSP_1:def 7;
A15:   n in NAT by ORDINAL1:def 12;
    ||. (f/*s1).n - f/.x0 .||<r by A14; then
    ||. f/.(s1.n) - f/.x0 .|| < r by A7,FUNCT_2:109,A15;
    hence contradiction by A6,A15;
   end;
   assume
A16: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;
   now let s1 such that
A17: rng s1 c= dom f and
A18: s1 is convergent & lim s1 = x0;
A19:now let p be Real;
     assume 0 < p; then
     consider s such that
A20:  0 < s and
A21:  for x1 st x1 in dom f & |.x1-x0.|<s holds ||. f/.x1 - f/.x0 .||<p by A16;
     consider n such that
A22:  for m st n<=m holds |.s1.m-x0.|<s by A18,A20,SEQ_2:def 7;
     take k=n;
     let m;
A23:   m in NAT by ORDINAL1:def 12;
     assume k<=m; then
     s1.m in rng s1 & |.s1.m-x0.|<s by A22,VALUED_0:28; then
     ||.f/.(s1.m)-f/.x0 .||<p by A17,A21;
     hence ||.(f/*s1).m - f/.x0 .||<p by A17,FUNCT_2:109,A23;
    end; then
    f/*s1 is convergent by NORMSP_1:def 6;
    hence f/*s1 is convergent & f/.x0 = lim (f/*s1) by A19,NORMSP_1:def 7;
   end;
   hence thesis by A16;
end;
