reserve n,m,k for Nat,
        p,q for n-element XFinSequence of NAT,
        i1,i2,i3,i4,i5,i6 for Element of n,
        a,b,c,d,e for Integer;

theorem Th18:
  for a,b,c,i1,i2,i3 holds
    {p: a*p.i1 < b*p.i2 + c*p.i3} is diophantine Subset of n -xtuples_of NAT
proof
  let a,b,c,i1,i2,i3;
  defpred P[Nat,Nat,Integer] means a*$1 +0 < $3;
  deffunc F(Nat,Nat,Nat)= b*$2+c*$3+0;
  defpred P1[XFinSequence of NAT] means a*$1.i1+0 < b*$1.i2+c* $1.i3+0;
  defpred P2[XFinSequence of NAT] means a*$1.i1 < b*$1.i2+c*$1.i3;
  A1: for n for i1,i2,i3,d holds {p: P[p.i1,p.i2,d*(p.i3)]}
  is diophantine Subset of n -xtuples_of NAT by Th7;
  A2:  for n for i1,i2,i3,i4,d holds {p: F(p.i1,p.i2,p.i3) = d*(p.i4)}
  is diophantine Subset of n -xtuples_of NAT  by Th11;
  A3:for n for i1,i2,i3,i4,i5 holds {p: P[p.i1,p.i2,F(p.i3,p.i4,p.i5)]}
  is diophantine Subset of n -xtuples_of NAT from  SubstitutionInt(A1,A2);
  A4: for p holds P1[p] iff P2[p];
  {p: P1[p]} ={q: P2[q]} from Eq(A4);
  hence thesis by A3;
end;
