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

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