 reserve j for set;
 reserve p,r for Real;
 reserve S,T,F for RealNormSpace;
 reserve x0 for Point of S;
 reserve g for PartFunc of S,T;
 reserve c for constant sequence of S;
 reserve R for RestFunc of S,T;
 reserve G for RealNormSpace-Sequence;
 reserve i for Element of dom G;
 reserve f for PartFunc of product G,F;
 reserve x for Element of product G;

theorem Th17:
  for T be RealNormSpace, R be PartFunc of REAL,T
   st R is total holds
     R is RestFunc-like
  iff for r be Real st r > 0
      ex d be Real st d > 0 & for z be Real
        st z <> 0 & |.z.| < d holds ( ||. R/.z .||/ |.z.| ) < r
proof
   let T be RealNormSpace, R be PartFunc of REAL,T;
   assume A1: R is total;
A2:now assume A3: R is RestFunc-like;
    assume not
    (for r be Real st r > 0
      ex d be Real st d > 0 & for z be Real
    st z <> 0 & |.z.| < d holds ( ||. R/.z .||/ |.z.|) < r ); then
    consider r be Real such that
A4:  r > 0 and
A5:  for d be Real st d > 0 holds
    ex z be Real st z <> 0 & |.z.| < d
      & not (  ||. R/.z .||/ |.z.| ) < r;
    defpred P[Nat,Element of REAL]
      means $2 <> 0 & |.$2.| < (1/($1+1))
     & not ( (||. R/.$2 .||/|.$2.| ) < r );
A6: now let n be Element of NAT;
     consider z be Real such that
A7:    z <> 0 & |.z.| < 1/(n + 1)
      & not (  ||. R/.z .||/ |.z.| ) < r by A5;
      reconsider z as Element of REAL by XREAL_0:def 1;
     take z;
     thus P[n,z] by A7;
    end;
    consider s be Real_Sequence such that
A8:   for n being Element of NAT holds P[n,s.n] from FUNCT_2:sch 3(A6);
A9:   for n being Nat holds P[n,s.n]
     proof let n be Nat;
       n in NAT by ORDINAL1:def 12;
      hence thesis by A8;
     end;
A10: now let p be Real;
     assume A11: 0<p;
     consider n be Nat such that
A12:  p"<n by SEQ_4:3;
     p" + (0 qua Real) < n + 1 by A12,XREAL_1:8; then
A13: 1/(n+1) < 1/p" by A11,XREAL_1:76;
     take n;
     let m be Nat;
     assume n<=m; then
     n + 1 <= m + 1 by XREAL_1:6; then
     1/(m+1) <= 1/(n+1) by XREAL_1:118; then
     |.s.m-0 .| < 1/(n+1) by A9,XXREAL_0:2;
     hence |.s.m-0 .| <p by A13,XXREAL_0:2;
    end; then
    s is convergent by SEQ_2:def 6; then
    lim s = 0 by A10,SEQ_2:def 7; then
    reconsider s as 0-convergent non-zero Real_Sequence
    by A9,A10,SEQ_1:5,SEQ_2:def 6,FDIFF_1:def 1;
    (s")(#)(R/*s) is convergent & lim ((s")(#)(R/*s)) = 0.T
      by A3,NDIFF_3:def 1; then
    consider n be Nat such that
A16: for m be Nat st n <=m
       holds ||. ((s")(#)(R/*s)).m - 0.T .|| < r by A4,NORMSP_1:def 7;
A17: n in NAT by ORDINAL1:def 12;
A19: ||.(s.n)"*(R/.(s.n)).||
       = |.(s.n)".| * ||. R/.(s.n) .|| by NORMSP_1:def 1
      .= ||. R/.(s.n) .||/|.s.n.| by COMPLEX1:66;
    dom R = REAL by A1,PARTFUN1:def 2; then
A20:rng s c= dom R;
    ||. ((s")(#)(R/*s)).n- 0.T.||
       = ||. ((s")(#)(R/*s)).n .|| by RLVECT_1:13
      .= ||. (s".n)*((R/*s).n) .|| by NDIFF_1:def 2
      .= ||. (s.n)"*((R/*s).n) .|| by VALUED_1:10
      .= ||. (s.n)"*(R/.(s.n)) .|| by A20,FUNCT_2:109,A17;
    hence
      for r be Real st r > 0
      ex d be Real st d > 0 & for z be Real st
         z <> 0 & |.z.| < d holds ( ||. R/.z .||/|.z.| ) < r by A9,A16,A19;
   end;

   now assume
A21: for r be Real st r > 0
   ex d be Real st d > 0 & for z be Real
    st z <> 0 & |.z.| < d holds ( ||. R/.z .||/|.z.|) < r;
    now let s be 0-convergent non-zero Real_Sequence;
A22: s is convergent & lim s = 0;
A23: now let r be Real;
      assume r > 0; then
      consider d be Real such that
A24:   d > 0 and
A25:   for z be Real st z <> 0 & |.z.| < d holds
          ( ||. R/.z .||/|.z.|) < r by A21;
      consider n be Nat such that
A26:   for m be Nat st n <=m holds |.s.m-0 .| < d
         by A22,A24,SEQ_2:def 7;
      take n;
      thus for m be Nat st n <=m
        holds ||. ((s")(#)(R/*s)).m- 0.T.|| < r
      proof
       dom R = REAL by A1,PARTFUN1:def 2; then
A27:   rng s c= dom R;
       let m be Nat;
A28: m in NAT by ORDINAL1:def 12;
       assume n <=m; then
A29:   |.s.m-0 .| < d by A26;
       ||.(R/.(s.m)).|| / |.s.m.|
          = |.(s.m)".| * ||.(R/.(s.m)).|| by COMPLEX1:66
         .= ||.(s.m)"*(R/.(s.m)).|| by NORMSP_1:def 1
         .= ||.(s.m)"*((R/*s).m).|| by A27,FUNCT_2:109,A28
         .= ||.(s".m)*((R/*s).m).|| by VALUED_1:10
         .= ||. ((s")(#)(R/*s)).m .|| by NDIFF_1:def 2
         .= ||. ((s")(#)(R/*s)).m- 0.T.|| by RLVECT_1:13;
       hence thesis by A25,A29,SEQ_1:5;
      end;
     end;
     hence (s")(#)(R/*s) is convergent by NORMSP_1:def 6;
     hence lim ((s")(#)(R/*s)) = 0.T by A23,NORMSP_1:def 7;
    end;
    hence R is RestFunc-like by A1,NDIFF_3:def 1;
   end;
   hence thesis by A2;
end;
