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 Th20:
  for a,b,c,i1,i2,i3 holds
    {p: a* p.i1 = b*p.i2-' c} is diophantine Subset of n -xtuples_of NAT
proof
  let a,b,c;
  defpred P[Nat,Nat,Integer] means a* $1 = b*$2-' $3;
  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 Th19;
  deffunc F(Nat,Nat,Nat) = c;
  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 Th13;
  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);
  hence thesis;
end;
