reserve n for non zero Element of NAT;
reserve a,b,r,t for Real;

theorem Th35:
  for R be PartFunc of REAL, REAL
    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 |.z.|"* |. R/.z .| < r
proof
  let R be PartFunc of REAL,REAL such that
A1: R is total;
  thus R is RestFunc-like implies
  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
    assume
A2: R is RestFunc-like;
    given r be Real such that
A3: r > 0 and
A4: 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 );
A5: for n be Element of NAT ex z be Element of REAL st P[n,z]
    proof
      let n be Element of NAT;
      reconsider d = 1/(n + 1) as Element of REAL by XREAL_0:def 1;
      d <> 0 by XCMPLX_1:50; then
      consider z be Real such that A6: z <> 0 & |. z .| < d
      & not ( |. z .|"* |. R/.z .|) < r by A4;
      reconsider z as Element of REAL by XREAL_0:def 1;
      take z;
      thus thesis by A6;
    end;
    consider s be Real_Sequence such that
A7: for n being Element of NAT holds P[n,s.n] from FUNCT_2:sch 3(A5);
A8: for n being Nat holds P[n,s.n]
    proof
      let n be Nat; n in NAT by ORDINAL1:def 12;
      hence thesis by A7;
    end;
A9: now
      let p be Real;
      assume
  A10: 0<p;
      consider n be Nat such that
    A11: p"<n by SEQ_4:3;
      reconsider q0=0,q1=1 as Real;
      p" + q0 < n + q1 by A11,XREAL_1:8; then
    A12: 1/(n+1) < 1/p" by A10,XREAL_1:76;
      take n;
      let m be Nat;
A13:    m in NAT by ORDINAL1:def 12;
      assume n<=m; then
    A14: n + 1 <= m + 1 by XREAL_1:6;
      1/(m+1) <= 1/(n+1) by A14,XREAL_1:118; then
 A15: |. s.m - 0 .| < 1/(n+1) by A7,XXREAL_0:2,A13;
      1/p" = p by XCMPLX_1:216;
      hence |. s.m - 0 .| <p by A12,A15,XXREAL_0:2;
    end;
A16: s is convergent by A9,SEQ_2:def 6;
    then lim s = 0 by A9,SEQ_2:def 7;
    then reconsider s as non-zero 0-convergent Real_Sequence
      by A16,A8,SEQ_1:5,FDIFF_1:def 1;
    (s")(#)(R/*s) is convergent & lim ((s")(#)(R/*s)) = 0
      by A2;
    then consider n0 be Nat such that
A17: for m be Nat st n0 <=m holds |. ((s")(#)(R/*s)).
    m- 0 .| < r by A3,SEQ_2:def 7;
    reconsider n0 as Element of NAT by ORDINAL1:def 12;
A18: |.(s.n0)"*(R/.(s.n0)).| = |.((s.n0)").| * |.(R/.(s.n0)).| by COMPLEX1:65
      .=|. s.n0 .|" * |.(R/.(s.n0)).| by COMPLEX1:66;
    dom R = REAL by A1,PARTFUN1:def 2; then
A19: rng s c= dom R;
    |. ((s")(#)(R/*s)).n0- 0 .|
     = |.(s".n0)*((R/*s).n0).| by SEQ_1:8
    .= |.(s.n0)"*((R/*s).n0).| by VALUED_1:10
    .= |.(s.n0)"*(R/.(s.n0)).| by A19,FUNCT_2:109;
    hence contradiction by A7,A17,A18;
  end;
  assume
A20: 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;
    thus R is total by A1;
    let s be non-zero 0-convergent Real_Sequence;
A21: s is convergent & lim s = 0;
A22: now
    let r be Real;
    assume r > 0;
    then consider d be Real such that
  A23: d > 0 and
  A24: for z be Real st z <> 0 & |. z .| < d holds
    ( |. z .| "* |. R/.z .|) < r by A20;
    consider n0 be Nat such that
  A25: for m be Nat st n0 <=m holds |. s.m-0 .| < d by A21,A23,SEQ_2:def 7;
    take n0;
    thus for m be Nat st n0 <=m holds |. ((s")(#)(R/*s)).m- 0 .| < r
    proof
      dom R = REAL by A1,PARTFUN1:def 2; then
 A26: rng s c= dom R;
      let m be Nat;
A27:    m in NAT by ORDINAL1:def 12;
      assume n0 <= m; then
 A28: |. s.m-0 .| < d by A25;
      |. s.m .|" * |.(R/.(s.m)).| = |.((s.m)").| * |.(R/.(s.m)).|
        by COMPLEX1:66
         .= |.(s.m)"*(R/.(s.m)).| by COMPLEX1:65
         .= |.(s.m)"*((R/*s).m).| by A26,FUNCT_2:109,A27
         .= |.(s".m)*((R/*s).m).| by VALUED_1:10
         .= |. ((s")(#)(R/*s)).m- 0 .| by SEQ_1:8;
      hence thesis by A24,A28,SEQ_1:5;
    end;
  end;
  hence (s")(#)(R/*s) is convergent by SEQ_2:def 6;
  hence lim ((s")(#)(R/*s)) = 0 by A22,SEQ_2:def 7;
end;
