let a, b be Element of INT ; :: thesis: for A, B being sequence of NAT st A . 0 = abs a & B . 0 = abs b & ( for i being Element of NAT holds
( A . (i + 1) = B . i & B . (i + 1) = (A . i) mod (B . i) ) ) holds
{ i where i is Element of NAT : B . i = 0 } is non empty Subset of NAT

let A, B be sequence of NAT; :: thesis: ( A . 0 = abs a & B . 0 = abs b & ( for i being Element of NAT holds
( A . (i + 1) = B . i & B . (i + 1) = (A . i) mod (B . i) ) ) implies { i where i is Element of NAT : B . i = 0 } is non empty Subset of NAT )

assume AS1: ( A . 0 = abs a & B . 0 = abs b & ( for i being Element of NAT holds
( A . (i + 1) = B . i & B . (i + 1) = (A . i) mod (B . i) ) ) ) ; :: thesis: { i where i is Element of NAT : B . i = 0 } is non empty Subset of NAT
P1: for x being set st x in { i where i is Element of NAT : B . i = 0 } holds
x in NAT
proof
let x be set ; :: thesis: ( x in { i where i is Element of NAT : B . i = 0 } implies x in NAT )
assume x in { i where i is Element of NAT : B . i = 0 } ; :: thesis: x in NAT
then ex i being Element of NAT st
( x = i & B . i = 0 ) ;
hence x in NAT ; :: thesis: verum
end;
ex m0 being Element of NAT st B . m0 = 0
proof
assume A2: for m0 being Element of NAT holds not B . m0 = 0 ; :: thesis: contradiction
A3: for i being Element of NAT holds B . (i + 1) <= (B . i) - 1
proof
let i be Element of NAT ; :: thesis: B . (i + 1) <= (B . i) - 1
A31: B . i <> 0 by A2;
B . (i + 1) = (A . i) mod (B . i) by AS1;
then B . (i + 1) < B . i by A31, INT_1:58;
then (B . (i + 1)) + 1 <= B . i by NAT_1:13;
then ((B . (i + 1)) + 1) - 1 <= (B . i) - 1 by XREAL_1:9;
hence B . (i + 1) <= (B . i) - 1 ; :: thesis: verum
end;
defpred S1[ Nat] means B . $1 <= (B . 0) - $1;
P0: S1[ 0 ] ;
P1: for i being Element of NAT st S1[i] holds
S1[i + 1]
proof
let i be Element of NAT ; :: thesis: ( S1[i] implies S1[i + 1] )
assume P11: S1[i] ; :: thesis: S1[i + 1]
P12: B . (i + 1) <= (B . i) - 1 by A3;
(B . i) - 1 <= ((B . 0) - i) - 1 by P11, XREAL_1:9;
hence S1[i + 1] by XXREAL_0:2, P12; :: thesis: verum
end;
A4: for i being Element of NAT holds S1[i] from NAT_1:sch 1(P0, P1);
B . (B . 0) <= (B . 0) - (B . 0) by A4;
hence contradiction by A2, NAT_1:14; :: thesis: verum
end;
then consider m0 being Element of NAT such that
X1: B . m0 = 0 ;
m0 in { i where i is Element of NAT : B . i = 0 } by X1;
hence { i where i is Element of NAT : B . i = 0 } is non empty Subset of NAT by P1, TARSKI:def 3; :: thesis: verum