 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 Th1:
for R be Function of REAL,S
  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 |.z.|"* ||. R/.z .|| < r
proof
   let R be Function of REAL,S;
A1:dom R = REAL by PARTFUN1:def 2;
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 |. z .|"* ||. R/.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 |. z .|"* ||. R/.z .|| < r;
    defpred P[Nat,Real] means
      $2 <> 0 & |. $2 .| < (1/($1+1)) & not |. $2 .|"* ||. R/.$2 .|| < r;
A6: for n be Element of NAT ex z be Element of REAL st P[n,z]
    proof
     let n be Element of NAT;
      set d = 1/(n + 1);
      consider z be Real such that
A7:    z <> 0 & |. z .| < d
       & not |. z .|"* ||. R/.z .|| < r by A5;
      reconsider z as Element of REAL by XREAL_0:def 1;
     take z;
     thus thesis 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;
     reconsider q0=0, q1=1 as Real;
     p" + q0 < n + q1 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 A10,A9,SEQ_1:5,SEQ_2:def 6,FDIFF_1:def 1;
    (s")(#)(R/*s) is convergent & lim( (s")(#)(R/*s) ) = 0.S
        by A3,NDIFF_3:def 1; then
    consider n0 be Nat such that
A16:  for m be Nat st n0 <=m
       holds ||. ((s")(#)(R/*s)).m - 0.S .|| < r by A4,NORMSP_1:def 7;
A17:   n0 in NAT by ORDINAL1:def 12;
A19: ||.(s.n0)"*(R/.(s.n0)).||
         = |.(s.n0)".| * ||. R/.(s.n0) .|| by NORMSP_1:def 1
        .=|. s.n0 .|" * ||. R/.(s.n0) .|| by COMPLEX1:66;
A20:rng s c= dom R by A1;
    ||. ((s")(#)(R/*s)).n0 - 0.S .||
      = ||. ((s")(#)(R/*s)).n0 .|| by RLVECT_1:13
     .= ||. (s".n0)*((R/*s).n0) .|| by NDIFF_1:def 2
     .= ||. (s.n0)"*((R/*s).n0) .|| by VALUED_1:10
     .= ||. (s.n0)"*(R/.(s.n0)) .|| 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 |. z .|"* ||. R/.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 |. z .|"* ||. R/.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 |.z.|"* ||. R/.z .|| < r by A21;
      consider n0 be Nat such that
A26:   for m be Nat st n0 <=m
             holds |. s.m-0 .| < d by A22,A24,SEQ_2:def 7;
      take n0;
      thus for m be Nat st n0 <=m
           holds ||. ((s")(#)(R/*s)).m- 0.S .|| < r
      proof
A27:   rng s c= dom R by A1;
       let m be Nat;
       assume n0 <=m; then
A28:   |. s.m-0 .| < d by A26;
A30:   m in NAT by ORDINAL1:def 12;
       |. s.m .|" * ||. R/.(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,A30
        .= ||. (s".m)*((R/*s).m) .|| by VALUED_1:10
        .= ||. ((s")(#)(R/*s)).m .|| by NDIFF_1:def 2
        .= ||. ((s")(#)(R/*s)).m- 0.S .|| by RLVECT_1:13;
       hence thesis by A25,A28,SEQ_1:5;
      end;
     end;
     hence (s")(#)(R/*s) is convergent by NORMSP_1:def 6;
     hence lim ((s")(#)(R/*s)) = 0.S by A23,NORMSP_1:def 7;
    end;
    hence R is RestFunc-like by NDIFF_3:def 1;
   end;
   hence thesis by A2;
end;
