reserve a,b,k,m,n,s for Nat;
reserve c,c1,c2,c3 for Complex;
reserve i,j,z for Integer;
reserve p for Prime;
reserve x for object;
reserve f,g for complex-valued FinSequence;
reserve a,b,x,y for Real;

theorem :: Problem 198 d
  for a,n being positive Nat st 2 <= n holds
  { [x,y] where x,y is positive Nat: x|^n - y|^n = a } is finite
  proof
    let a,n be positive Nat such that
A1: 2 <= n;
    set A = { [x,y] where x,y is positive Nat: x|^n - y|^n = a };
    defpred P[object,object] means not contradiction;
    set M = (n-1) -Root a;
    set M1 = [/ M \];
    n-1 >= 2-1 by A1,XREAL_1:6;
    then M >= 0 by PREPOWER:def 2;
    then reconsider M1 as Nat by TARSKI:1;
    set B = { [x,y] where x,y is Nat: x < M1 & y < M1 & P[x,y] };
A2: B is finite from FinitePairs;
    A c= B
    proof
      let z be object;
      assume z in A;
      then consider x,y being positive Nat such that
A3:   z = [x,y] and
A4:   x|^n - y|^n = a;
A5:   x < M & y < M by A1,A4,Th87;
      M <= M1 by INT_1:def 7;
      then x < M1 & y < M1 by A5,XXREAL_0:2;
      hence thesis by A3;
    end;
    hence thesis by A2;
  end;
