reserve a, b, k, n, m for Nat,
  i for Integer,
  r for Real,
  p for Rational,
  c for Complex,
  x for object,
  f for Function;

theorem Th42:
  r is rational iff ex n st for m st m >= n holds scf(r).m = 0
proof
  defpred A[Nat] means for s being Real st for m st m >= $1 holds scf(s
  ).m = 0 holds s is rational;
A1: for m st A[m] holds A[m+1]
  proof
    let m;
    assume
A2: A[m];
    let s be Real such that
A3: for n st n >= m+1 holds scf(s).n = 0;
    set B = 1 / (s - scf(s).0);
    for n st n >= m holds scf(B).n = 0
    proof
      let n;
      assume n >= m;
      then
A4:   n+1 >= m+1 by XREAL_1:6;
      thus scf(B).n = scf(s).(n+1) by Lm6
        .= 0 by A3,A4;
    end;
    then reconsider B as Rational by A2;
    scf(s).0 + 1 / B is rational;
    hence thesis;
  end;
  thus r is rational implies ex n st for m st m >= n holds scf(r).m = 0
  proof
    assume r is rational;
    then reconsider r as Rational;
    consider m, n being Nat such that
A5: n > 0 and
A6: frac(r) = m/n by Th7,INT_1:43;
    frac(r) < 1 by INT_1:43;
    then
A7: m < n by A5,A6,XREAL_1:181;
    set fm = modSeq(n,m);
    set fd = divSeq(n,m);
    per cases;
    suppose
A8:   m = 0;
      take 1;
      let a;
      assume a >= 1;
      then ex x being Nat st a = x+1 by NAT_1:6;
      hence thesis by A6,A8,Th30;
    end;
    suppose
A9:   m <> 0;
      consider k such that
A10:  fd.k = 0 and
      fm.k = 0 by Th25;
A11:  now
        assume
A12:    k = 0;
        m <= 0 or n div m <> 0 by A7,NAT_2:12;
        hence contradiction by A9,A10,A12,Def2;
      end;
      take k+1;
      let a;
      assume
A13:  a >= k+1;
      1 <= k+1 by NAT_1:11;
      then reconsider a1 = a-1 as Element of NAT by A13,INT_1:5,XXREAL_0:2;
A14:  a = a1+1;
      k+0 < k+1 by XREAL_1:6;
      then k < a by A13,XXREAL_0:2;
      then
A15:  k <= a1 by A14,NAT_1:13;
      scf(r).a = scf(1/frac(r)).a1 by A14,Th37
        .= scf(n/m).a1 by A6,XCMPLX_1:57
        .= fd.a1 by Th41
        .= 0 by A10,A11,A15,Th17;
      hence thesis;
    end;
  end;
  given n such that
A16: for m st m >= n holds scf(r).m = 0;
A17: A[0]
  proof
    let s be Real;
    assume for m st m >= 0 holds scf(s).m = 0;
    then for m holds scf(s).m = 0;
    hence thesis by Th34;
  end;
  for n holds A[n] from NAT_1:sch 2(A17,A1);
  hence thesis by A16;
end;
