let n be Nat; :: thesis: for a, b, c being Integer
for i1, i2 being Element of n holds { p where p is n -element XFinSequence of NAT : a * (p . i1) = (b * (p . i2)) + c } is diophantine Subset of (n -xtuples_of NAT)

let c, a, b be Integer; :: thesis: for i1, i2 being Element of n holds { p where p is n -element XFinSequence of NAT : c * (p . i1) = (a * (p . i2)) + b } is diophantine Subset of (n -xtuples_of NAT)
let i1, i2 be Element of n; :: thesis: { p where p is n -element XFinSequence of NAT : c * (p . i1) = (a * (p . i2)) + b } is diophantine Subset of (n -xtuples_of NAT)
set F = F_Real ;
reconsider ar = a, br = b, cr = c as integer Element of F_Real by XREAL_0:def 1;
set D = { p where p is n -element XFinSequence of NAT : c * (p . i1) = (a * (p . i2)) + b } ;
{ p where p is n -element XFinSequence of NAT : c * (p . i1) = (a * (p . i2)) + b } c= n -xtuples_of NAT
proof
let y be object ; :: according to TARSKI:def 3 :: thesis: ( not y in { p where p is n -element XFinSequence of NAT : c * (p . i1) = (a * (p . i2)) + b } or y in n -xtuples_of NAT )
assume y in { p where p is n -element XFinSequence of NAT : c * (p . i1) = (a * (p . i2)) + b } ; :: thesis: y in n -xtuples_of NAT
then ex p being n -element XFinSequence of NAT st
( y = p & c * (p . i1) = (a * (p . i2)) + b ) ;
hence y in n -xtuples_of NAT by HILB10_2:def 5; :: thesis: verum
end;
then reconsider D = { p where p is n -element XFinSequence of NAT : c * (p . i1) = (a * (p . i2)) + b } as Subset of (n -xtuples_of NAT) ;
per cases ( n = 0 or n <> 0 ) ;
suppose n = 0 ; :: thesis: { p where p is n -element XFinSequence of NAT : c * (p . i1) = (a * (p . i2)) + b } is diophantine Subset of (n -xtuples_of NAT)
end;
suppose A1: n <> 0 ; :: thesis: { p where p is n -element XFinSequence of NAT : c * (p . i1) = (a * (p . i2)) + b } is diophantine Subset of (n -xtuples_of NAT)
set Q = ((cr * (1_1 (i1,F_Real))) - (ar * (1_1 (i2,F_Real)))) - (br * (1_ (n,F_Real)));
reconsider Q = ((cr * (1_1 (i1,F_Real))) - (ar * (1_1 (i2,F_Real)))) - (br * (1_ (n,F_Real))) as INT -valued Polynomial of (n + 0),F_Real ;
for s being object holds
( s in D iff ex x being n -element XFinSequence of NAT ex y being 0 -element XFinSequence of NAT st
( s = x & eval (Q,(@ (x ^ y))) = 0 ) )
proof
let s be object ; :: thesis: ( s in D iff ex x being n -element XFinSequence of NAT ex y being 0 -element XFinSequence of NAT st
( s = x & eval (Q,(@ (x ^ y))) = 0 ) )

thus ( s in D implies ex x being n -element XFinSequence of NAT ex y being 0 -element XFinSequence of NAT st
( s = x & eval (Q,(@ (x ^ y))) = 0 ) ) :: thesis: ( ex x being n -element XFinSequence of NAT ex y being 0 -element XFinSequence of NAT st
( s = x & eval (Q,(@ (x ^ y))) = 0 ) implies s in D )
proof
assume s in D ; :: thesis: ex x being n -element XFinSequence of NAT ex y being 0 -element XFinSequence of NAT st
( s = x & eval (Q,(@ (x ^ y))) = 0 )

then consider p being n -element XFinSequence of NAT such that
A2: ( s = p & c * (p . i1) = (a * (p . i2)) + b ) ;
reconsider Z = <%> NAT as 0 -element XFinSequence of NAT ;
take pZ = p; :: thesis: ex y being 0 -element XFinSequence of NAT st
( s = pZ & eval (Q,(@ (pZ ^ y))) = 0 )

take Z ; :: thesis: ( s = pZ & eval (Q,(@ (pZ ^ Z))) = 0 )
A3: eval ((br * (1_ (n,F_Real))),(@ p)) = br * (eval ((1_ (n,F_Real)),(@ p))) by POLYNOM7:29
.= br * (1. F_Real) by POLYNOM2:21
.= b ;
A4: eval ((ar * (1_1 (i2,F_Real))),(@ p)) = ar * (eval ((1_1 (i2,F_Real)),(@ p))) by POLYNOM7:29
.= a * (p . i2) by A1, Th1 ;
A5: eval ((cr * (1_1 (i1,F_Real))),(@ p)) = cr * (eval ((1_1 (i1,F_Real)),(@ p))) by POLYNOM7:29
.= c * (p . i1) by A1, Th1 ;
eval (Q,(@ (p ^ Z))) = (eval (((cr * (1_1 (i1,F_Real))) - (ar * (1_1 (i2,F_Real)))),(@ p))) - (eval ((br * (1_ (n,F_Real))),(@ p))) by POLYNOM2:24
.= ((eval ((cr * (1_1 (i1,F_Real))),(@ p))) - (eval ((ar * (1_1 (i2,F_Real))),(@ p)))) - (eval ((br * (1_ (n,F_Real))),(@ p))) by POLYNOM2:24
.= 0 by A2, A3, A4, A5 ;
hence ( s = pZ & eval (Q,(@ (pZ ^ Z))) = 0 ) by A2; :: thesis: verum
end;
given p being n -element XFinSequence of NAT , Z being 0 -element XFinSequence of NAT such that A6: ( s = p & eval (Q,(@ (p ^ Z))) = 0 ) ; :: thesis: s in D
A7: eval ((br * (1_ (n,F_Real))),(@ p)) = br * (eval ((1_ (n,F_Real)),(@ p))) by POLYNOM7:29
.= br * (1. F_Real) by POLYNOM2:21
.= b ;
A8: eval ((ar * (1_1 (i2,F_Real))),(@ p)) = ar * (eval ((1_1 (i2,F_Real)),(@ p))) by POLYNOM7:29
.= a * (p . i2) by A1, Th1 ;
A9: eval ((cr * (1_1 (i1,F_Real))),(@ p)) = cr * (eval ((1_1 (i1,F_Real)),(@ p))) by POLYNOM7:29
.= c * (p . i1) by A1, Th1 ;
eval (Q,(@ (p ^ Z))) = (eval (((cr * (1_1 (i1,F_Real))) - (ar * (1_1 (i2,F_Real)))),(@ p))) - (eval ((br * (1_ (n,F_Real))),(@ p))) by POLYNOM2:24
.= ((eval ((cr * (1_1 (i1,F_Real))),(@ p))) - (eval ((ar * (1_1 (i2,F_Real))),(@ p)))) - (eval ((br * (1_ (n,F_Real))),(@ p))) by POLYNOM2:24
.= ((c * (p . i1)) - (a * (p . i2))) - b by A7, A8, A9 ;
then c * (p . i1) = (a * (p . i2)) + b by A6;
hence s in D by A6; :: thesis: verum
end;
then D is diophantine ;
hence { p where p is n -element XFinSequence of NAT : c * (p . i1) = (a * (p . i2)) + b } is diophantine Subset of (n -xtuples_of NAT) ; :: thesis: verum
end;
end;