let b be Nat; :: thesis: for a, m being non zero Nat st a,b are_coprime holds
(rng (ArProg (b,a))) /\ (Coprimes m) is infinite

let a, m be non zero Nat; :: thesis: ( a,b are_coprime implies (rng (ArProg (b,a))) /\ (Coprimes m) is infinite )
assume A1: a,b are_coprime ; :: thesis: (rng (ArProg (b,a))) /\ (Coprimes m) is infinite
set P1 = { p where p is Prime : ( p divides m & p divides a ) } ;
set Q1 = { q where q is Prime : ( q divides m & q divides b ) } ;
set R1 = { r where r is Prime : ( r divides m & not r divides a & not r divides b ) } ;
A2: { p where p is Prime : ( p divides m & p divides a ) } is with_non-empty_elements by Lm15;
A3: { p where p is Prime : ( p divides m & p divides a ) } is finite by Lm17;
A4: { p where p is Prime : ( p divides m & p divides a ) } is natural-membered by Lm19;
A5: { q where q is Prime : ( q divides m & q divides b ) } is with_non-empty_elements by Lm15;
A6: { q where q is Prime : ( q divides m & q divides b ) } is finite by Lm17;
A7: { q where q is Prime : ( q divides m & q divides b ) } is natural-membered by Lm19;
A8: { r where r is Prime : ( r divides m & not r divides a & not r divides b ) } is with_non-empty_elements by Lm16;
A9: { r where r is Prime : ( r divides m & not r divides a & not r divides b ) } is finite by Lm18;
A10: { r where r is Prime : ( r divides m & not r divides a & not r divides b ) } is natural-membered by Lm20;
set P = Product (Sgm { p where p is Prime : ( p divides m & p divides a ) } );
set Q = Product (Sgm { q where q is Prime : ( q divides m & q divides b ) } );
set R = Product (Sgm { r where r is Prime : ( r divides m & not r divides a & not r divides b ) } );
A11: ((a * (Product (Sgm { p where p is Prime : ( p divides m & p divides a ) } ))) * (Product (Sgm { r where r is Prime : ( r divides m & not r divides a & not r divides b ) } ))) + b,m are_coprime
proof
assume not ((a * (Product (Sgm { p where p is Prime : ( p divides m & p divides a ) } ))) * (Product (Sgm { r where r is Prime : ( r divides m & not r divides a & not r divides b ) } ))) + b,m are_coprime ; :: thesis: contradiction
then consider p being Prime such that
A12: p divides ((a * (Product (Sgm { p where p is Prime : ( p divides m & p divides a ) } ))) * (Product (Sgm { r where r is Prime : ( r divides m & not r divides a & not r divides b ) } ))) + b and
A13: p divides m by PYTHTRIP:def 2;
A14: not p divides Product (Sgm { p where p is Prime : ( p divides m & p divides a ) } )
proof
assume A15: p divides Product (Sgm { p where p is Prime : ( p divides m & p divides a ) } ) ; :: thesis: contradiction
then p divides (a * (Product (Sgm { r where r is Prime : ( r divides m & not r divides a & not r divides b ) } ))) * (Product (Sgm { p where p is Prime : ( p divides m & p divides a ) } )) by INT_2:2;
then p divides (((a * (Product (Sgm { p where p is Prime : ( p divides m & p divides a ) } ))) * (Product (Sgm { r where r is Prime : ( r divides m & not r divides a & not r divides b ) } ))) + b) - ((a * (Product (Sgm { p where p is Prime : ( p divides m & p divides a ) } ))) * (Product (Sgm { r where r is Prime : ( r divides m & not r divides a & not r divides b ) } ))) by A12, INT_5:1;
then p in { q where q is Prime : ( q divides m & q divides b ) } by A13;
then p divides Product (Sgm { q where q is Prime : ( q divides m & q divides b ) } ) by A5, A6, A7, Th16;
hence contradiction by A1, A15, Th13, PYTHTRIP:def 2; :: thesis: verum
end;
A16: not p divides Product (Sgm { q where q is Prime : ( q divides m & q divides b ) } )
proof
assume A17: p divides Product (Sgm { q where q is Prime : ( q divides m & q divides b ) } ) ; :: thesis: contradiction
{ q where q is Prime : ( q divides m & q divides b ) } c= SetPrimes by Lm23;
then p in { q where q is Prime : ( q divides m & q divides b ) } by A5, A6, A17, Th12;
then A18: ex q being Prime st
( p = q & q divides m & q divides b ) ;
then p divides (((a * (Product (Sgm { p where p is Prime : ( p divides m & p divides a ) } ))) * (Product (Sgm { r where r is Prime : ( r divides m & not r divides a & not r divides b ) } ))) + b) - b by A12, INT_5:1;
then ( p divides a * (Product (Sgm { p where p is Prime : ( p divides m & p divides a ) } )) or p divides Product (Sgm { r where r is Prime : ( r divides m & not r divides a & not r divides b ) } ) ) by INT_5:7;
then ( p divides a or p divides Product (Sgm { p where p is Prime : ( p divides m & p divides a ) } ) or p divides Product (Sgm { r where r is Prime : ( r divides m & not r divides a & not r divides b ) } ) ) by INT_5:7;
hence contradiction by A1, A17, A18, Th13, Th15, PYTHTRIP:def 2; :: thesis: verum
end;
A19: not p divides Product (Sgm { r where r is Prime : ( r divides m & not r divides a & not r divides b ) } )
proof
assume A20: p divides Product (Sgm { r where r is Prime : ( r divides m & not r divides a & not r divides b ) } ) ; :: thesis: contradiction
then p divides (a * (Product (Sgm { p where p is Prime : ( p divides m & p divides a ) } ))) * (Product (Sgm { r where r is Prime : ( r divides m & not r divides a & not r divides b ) } )) by INT_2:2;
then p divides (((a * (Product (Sgm { p where p is Prime : ( p divides m & p divides a ) } ))) * (Product (Sgm { r where r is Prime : ( r divides m & not r divides a & not r divides b ) } ))) + b) - ((a * (Product (Sgm { p where p is Prime : ( p divides m & p divides a ) } ))) * (Product (Sgm { r where r is Prime : ( r divides m & not r divides a & not r divides b ) } ))) by A12, INT_5:1;
then p in { q where q is Prime : ( q divides m & q divides b ) } by A13;
then p divides Product (Sgm { q where q is Prime : ( q divides m & q divides b ) } ) by A5, A6, A7, Th16;
hence contradiction by A1, A20, Th15, PYTHTRIP:def 2; :: thesis: verum
end;
( ( p divides a or not p divides a ) & ( p divides b or not p divides b ) ) ;
then ( p in { p where p is Prime : ( p divides m & p divides a ) } or p in { q where q is Prime : ( q divides m & q divides b ) } or p in { r where r is Prime : ( r divides m & not r divides a & not r divides b ) } ) by A13;
hence contradiction by A2, A3, A4, A5, A6, A7, A8, A9, A10, A14, A16, A19, Th16; :: thesis: verum
end;
set g = ArProg (b,a);
set X = (rng (ArProg (b,a))) /\ (Coprimes m);
A21: dom (ArProg (b,a)) = NAT by FUNCT_2:def 1;
A22: (ArProg (b,a)) . ((Product (Sgm { p where p is Prime : ( p divides m & p divides a ) } )) * (Product (Sgm { r where r is Prime : ( r divides m & not r divides a & not r divides b ) } ))) in rng (ArProg (b,a)) by A21, FUNCT_1:def 3;
(ArProg (b,a)) . ((Product (Sgm { p where p is Prime : ( p divides m & p divides a ) } )) * (Product (Sgm { r where r is Prime : ( r divides m & not r divides a & not r divides b ) } ))) = (a * ((Product (Sgm { p where p is Prime : ( p divides m & p divides a ) } )) * (Product (Sgm { r where r is Prime : ( r divides m & not r divides a & not r divides b ) } )))) + b by NUMBER06:7;
then (ArProg (b,a)) . ((Product (Sgm { p where p is Prime : ( p divides m & p divides a ) } )) * (Product (Sgm { r where r is Prime : ( r divides m & not r divides a & not r divides b ) } ))) in Coprimes m by A11;
then A23: not (rng (ArProg (b,a))) /\ (Coprimes m) is empty by A22, XBOOLE_0:def 4;
for x being Nat st x in (rng (ArProg (b,a))) /\ (Coprimes m) holds
ex y being Nat st
( y > x & y in (rng (ArProg (b,a))) /\ (Coprimes m) )
proof
let x be Nat; :: thesis: ( x in (rng (ArProg (b,a))) /\ (Coprimes m) implies ex y being Nat st
( y > x & y in (rng (ArProg (b,a))) /\ (Coprimes m) ) )

assume A24: x in (rng (ArProg (b,a))) /\ (Coprimes m) ; :: thesis: ex y being Nat st
( y > x & y in (rng (ArProg (b,a))) /\ (Coprimes m) )

then x in rng (ArProg (b,a)) by XBOOLE_0:def 4;
then consider w being object such that
A25: w in dom (ArProg (b,a)) and
A26: (ArProg (b,a)) . w = x by FUNCT_1:def 3;
reconsider w = w as Element of NAT by A25, FUNCT_2:def 1;
take b + ((m + w) * a) ; :: thesis: ( b + ((m + w) * a) > x & b + ((m + w) * a) in (rng (ArProg (b,a))) /\ (Coprimes m) )
A27: (ArProg (b,a)) . w = b + (w * a) by NUMBER06:7;
m + w > 0 + w by XREAL_1:8;
then (m + w) * a > w * a by XREAL_1:68;
hence b + ((m + w) * a) > x by A26, A27, XREAL_1:8; :: thesis: b + ((m + w) * a) in (rng (ArProg (b,a))) /\ (Coprimes m)
x in Coprimes m by A24, XBOOLE_0:def 4;
then ex j being Integer st
( x = j & j,m are_coprime ) ;
then (a * m) + (b + (w * a)),m are_coprime by A26, A27, NUMBER04:64;
then A28: b + ((m + w) * a) in Coprimes m ;
b + ((m + w) * a) = (ArProg (b,a)) . (m + w) by NUMBER06:7;
then b + ((m + w) * a) in rng (ArProg (b,a)) by A21, FUNCT_1:def 3;
hence b + ((m + w) * a) in (rng (ArProg (b,a))) /\ (Coprimes m) by A28, XBOOLE_0:def 4; :: thesis: verum
end;
hence (rng (ArProg (b,a))) /\ (Coprimes m) is infinite by A23, NUMBER04:1; :: thesis: verum