reserve x for set;
reserve a, b, c for Real;
reserve m, n, m1, m2 for Nat;
reserve k, l for Integer;
reserve p, q for Rational;
reserve s1, s2 for Real_Sequence;

theorem Th89:
  s1 is convergent & s2 is convergent & lim s1 > 0 & (for n holds
  s1.n>0 & s2.n = (s1.n) #Q p) implies lim s2 = (lim s1) #Q p
proof
  assume that
A1: s1 is convergent and
A2: s2 is convergent and
A3: lim s1 > 0 and
A4: for n holds s1.n>0 & s2.n = (s1.n) #Q p;
  per cases;
  suppose
    p>=0;
    hence thesis by A1,A2,A3,A4,Lm10;
  end;
  suppose
A5: p<=0;
    s1 is bounded by A1;
    then consider d be Real such that
A6: d>0 and
A7: for n holds |.s1.n.|<d by SEQ_2:3;
    reconsider d as Real;
A8: d #Q p > 0 by A6,Th52;
A9: now
      assume lim s2 = 0;
      then consider n such that
A10:  for m st m>=n holds |.s2.m - 0.|<d #Q p by A2,A8,SEQ_2:def 7;
      now
        let m;
A11:    s1.m>0 by A4;
A12:    s1.m<>0 by A4;
A13:    (s1.m) #Q p > 0 by A4,Th52;
        |.s1.m.|<d by A7;
        then s1.m<d by A11,ABSVALUE:def 1;
        then s1.m/s1.m<d/s1.m by A11,XREAL_1:74;
        then 1<=d/s1.m by A12,XCMPLX_1:60;
        then (d/s1.m) #Q p <= 1 by A5,Th61;
        then d #Q p/(s1.m) #Q p <= 1 by A6,A11,Th58;
        then
A14:    d #Q p/(s1.m) #Q p * (s1.m) #Q p<= 1*(s1.m) #Q p by A13,XREAL_1:64;
A15:    (s1.m) #Q p <> 0 by A4,Th52;
        assume m>=n;
        then |.s2.m - 0.|<d #Q p by A10;
        then |.(s1.m) #Q p.|<d #Q p by A4;
        then (s1.m) #Q p<d #Q p by A13,ABSVALUE:def 1;
        hence contradiction by A15,A14,XCMPLX_1:87;
      end;
      hence contradiction;
    end;
    now
      let n;
      (s1.n) #Q p <> 0 by A4,Th52;
      hence s2.n <> 0 by A4;
    end;
    then
A16: s2 is non-zero by SEQ_1:5;
    then
A17: lim s2" = (lim s2)" by A2,A9,SEQ_2:22;
    deffunc O(Nat) = (s2.$1)";
    consider s being Real_Sequence such that
A18: for n holds s.n = O(n) from SEQ_1:sch 1;
A19: now
      let n;
      s.n = (s2.n)" by A18
        .= ((s1.n) #Q p)" by A4
        .= 1 / (s1.n) #Q p
        .= (s1.n) #Q (-p) by A4,Th54;
      hence s1.n>0 & s.n = (s1.n) #Q (-p) by A4;
    end;
A20: dom s2 = NAT by FUNCT_2:def 1;
A21: dom s = NAT by FUNCT_2:def 1;
    for n being object st n in dom s holds s.n = (s2.n)" by A18;
    then
A22: s = s2" by A21,A20,VALUED_1:def 7;
    s2" is convergent by A2,A16,A9,SEQ_2:21;
    then (lim s2)" = (lim s1) #Q (-p) by A1,A3,A5,A17,A22,A19,Lm10;
    then 1/lim s2 = 1/(lim s1) #Q p by A3,Th54;
    hence thesis by XCMPLX_1:59;
  end;
end;
