reserve F for RealNormSpace;
reserve G for RealNormSpace;
reserve X for set;
reserve x,x0,g,r,s,p for Real;
reserve n,m,k for Element of NAT;
reserve Y for Subset of REAL;
reserve Z for open Subset of REAL;
reserve s1,s3 for Real_Sequence;
reserve seq for sequence of G;
reserve f,f1,f2 for PartFunc of REAL,the carrier of F;
reserve h for 0-convergent non-zero Real_Sequence;
reserve c for constant Real_Sequence;
reserve R,R1,R2 for RestFunc of F;
reserve L,L1,L2 for LinearFunc of F;

theorem Th22:
  for x0 being Real st f is_differentiable_in x0 holds
  f is_continuous_in x0
  proof
    let x0 be Real;
    assume
    A1: f is_differentiable_in x0;
    then consider N being Neighbourhood of x0 such that
    A2: N c= dom f and
    ex L,R st for x st x in N
      holds f/.x - f/.x0 = L/.(x-x0) + R/.(x-x0);
    A3:x0 in N by RCOMP_1:16;
  now
      consider g be Real such that
      A4: 0<g and
      A5: N=].x0-g,x0+g.[ by RCOMP_1:def 6;
      reconsider xx=x0 as Element of REAL by XREAL_0:def 1;
      set s2 = seq_const x0;
      let s1 such that
      A6: rng s1 c= dom f and
      A7: s1 is convergent and
      A8: lim s1 = x0 and
      A9: for n being Nat holds s1.n<>x0;
      consider l be Nat such that
      A10: for m being Nat st l<=m holds |.s1.m-x0.|<g by A7,A8,A4,SEQ_2:def 7;
      reconsider c =s2^\l as constant Real_Sequence;
      deffunc G(Real) = s1.$1-s2.$1;
      consider s3 such that
      A11: for n being Nat holds s3.n=G(n) from SEQ_1:sch 1;
      A12: s3=s1-s2 by A11,RFUNCT_2:1;
      then
      A13: s3 is convergent by A7;
      A14: rng c = {x0}
      proof
        thus rng c c= {x0}
        proof let y be object;
          assume y in rng c;
          then consider n such that
          A15: y=(s2^\l).n by FUNCT_2:113;
          y=s2.(n+l) by A15,NAT_1:def 3;
          then y=x0 by SEQ_1:57;
          hence y in {x0} by TARSKI:def 1;
        end;
        let y be object;
        assume y in {x0}; then
   A16: y=x0 by TARSKI:def 1;
        reconsider z0 = 0 as Element of NAT;
        c.z0 = s2.(z0 + l) by NAT_1:def 3
          .= y by A16,SEQ_1:57;
        hence y in rng c by VALUED_0:28;
      end;
A17: now
      let p be Real such that
      A18: 0<p;
       reconsider n=0 as Nat;
      take n;
      let m be Nat such that n<=m;
A19:   m in NAT by ORDINAL1:def 12;
   x0 in N by RCOMP_1:16;
      then rng c c= dom f by A2,A14,ZFMISC_1:31;
      then ||.(f/*c).m-f/.x0 .||=||.f/.(c.m)-f/.x0 .|| by FUNCT_2:109,A19
      .=||.f/.(s2.(m+l))-f/.x0 .|| by NAT_1:def 3
      .=||.f/.x0-f/.x0 .|| by SEQ_1:57
      .=||. 0.F .|| by RLVECT_1:15
      .=0;
      hence ||.(f/*c).m-f/.x0 .||<p by A18;
    end; then
    A20: f/*c is convergent by NORMSP_1:def 6;
    lim s2 = s2.0 by SEQ_4:26
    .=x0 by SEQ_1:57;
    then lim s3 =x0-x0 by A7,A8,A12,SEQ_2:12
    .=0; then
    A21: lim(s3^\l)=0 by A13,SEQ_4:20;
A22:
  now
    given n such that
    A23: s3.n=0;
    s1.n-s2.n=0 by A11,A23;
    hence contradiction by A9,SEQ_1:57;
  end;
A24:
 now
  given n being Nat such that
  A25: (s3^\l).n=0;
A26: n+l in NAT by ORDINAL1:def 12;
  s3.(n+l)=0 by A25,NAT_1:def 3;
  hence contradiction by A22,A26;
 end;
then s3^\l is non-zero by SEQ_1:5;
then reconsider h=s3^\l as 0-convergent non-zero Real_Sequence
by A13,A21,FDIFF_1:def 1;
 now
  let n;
  thus (f/*(h+c)-f/*c+f/*c).n
  =(f/*(h+c)-f/*c).n+(f/*c).n by NORMSP_1:def 2
  .=(f/*(h+c)).n-(f/*c).n+(f/*c).n by NORMSP_1:def 3
  .=(f/*(h+c)).n-((f/*c).n-(f/*c).n) by RLVECT_1:29
  .=(f/*(h+c)).n-0.F by RLVECT_1:15
  .=(f/*(h+c)).n by RLVECT_1:13;
 end; then
A27: f/*(h+c)-f/*c+(f/*c)=f/*(h+c) by FUNCT_2:63;
 now
  let n;
  thus (h+c).n=((s1-s2+s2)^\l).n by A12,SEQM_3:15
  .=(s1-s2+s2).(n+l) by NAT_1:def 3
  .=(s1-s2).(n+l)+s2.(n+l) by SEQ_1:7
  .=s1.(n+l)-s2.(n+l)+s2.(n+l) by RFUNCT_2:1
  .=(s1^\l).n by NAT_1:def 3;
 end; then
A28: f/*(h+c)-f/*c+(f/*c)=f/*(s1^\l) by A27,FUNCT_2:63
.=(f/*s1)^\l by A6,VALUED_0:27;
 now let y be object;
  assume y in rng(h+c);
  then consider n such that
  A29: y=(h+c).n by FUNCT_2:113;
  (h+c).n=((s1-s2+s2)^\l).n by A12,SEQM_3:15
  .=(s1-s2+s2).(n+l) by NAT_1:def 3
  .=(s1-s2).(n+l)+s2.(n+l) by SEQ_1:7
  .=s1.(n+l)-s2.(n+l)+s2.(n+l) by RFUNCT_2:1
  .=s1.(l+n);
  then |.(h+c).n-x0.|<g by A10,NAT_1:12;
  hence y in N by A5,A29,RCOMP_1:1;
 end; then
A30:rng(h+c) c= N;
A31: lim (h(#)(h"(#)(f/*(h+c) - f/*c)))
= 0 * lim(h"(#) (f/*(h+c) - f/*c)) by A21,A1,A2,A14,Th13,A30,NDIFF_1:14
.=0.F by RLVECT_1:10;
 now
  let n;
  A32: h.n<>0 by A24;
  thus (h(#)(h"(#)(f/*(h+c) - f/*c))).n = h.n *(h"(#)(f/*(h+c) - f/*c)).n
  by NDIFF_1:def 2
  .=h.n*((h").n*(f/*(h+c) - f/*c).n) by NDIFF_1:def 2
  .=h.n*(((h.n)")*(f/*(h+c) - f/*c).n) by VALUED_1:10
  .=h.n*((h.n)")*(f/*(h+c) - f/*c).n by RLVECT_1:def 7
  .=1*(f/*(h+c) - f/*c).n by A32,XCMPLX_0:def 7
  .=(f/*(h+c) - f/*c).n by RLVECT_1:def 8;
 end; then
A33: h(#)(h"(#)(f/*(h+c) - f/*c))=f/*(h+c)-f/*c by FUNCT_2:63; then
A34: f/*(h+c)-f/*c is convergent by A30,A1,A2,A14,Th13,NDIFF_1:13; then
f/*(h+c)-f/*c+f/*c is convergent by A20,NORMSP_1:19;
hence f/*s1 is convergent by A28,LOPBAN_3:10;
lim(f/*c)=f/.x0 by A17,A20,NORMSP_1:def 7;
then lim(f/*(h+c)-f/*c+f/*c)=0.F+f/.x0 by A31,A33,A34,A20,NORMSP_1:25
.=f/.x0 by RLVECT_1:4;
hence f/.x0=lim(f/*s1) by A34,A28,A20,LOPBAN_3:11,NORMSP_1:19;
end;
hence thesis by A3,A2,NFCONT_3:7;
end;
