ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  dfgcd3 Unicode version

Theorem dfgcd3 10881
Description: Alternate definition of the  gcd operator. (Contributed by Jim Kingdon, 31-Dec-2021.)
Assertion
Ref Expression
dfgcd3  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  N
)  =  ( iota_ d  e.  NN0  A. z  e.  ZZ  ( z  ||  d 
<->  ( z  ||  M  /\  z  ||  N ) ) ) )
Distinct variable groups:    M, d, z    N, d, z

Proof of Theorem dfgcd3
Dummy variables  a  b  r  w are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 gcd0val 10834 . . 3  |-  ( 0  gcd  0 )  =  0
2 simprl 498 . . . 4  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =  0  /\  N  =  0 ) )  ->  M  =  0 )
3 simprr 499 . . . 4  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =  0  /\  N  =  0 ) )  ->  N  =  0 )
42, 3oveq12d 5631 . . 3  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =  0  /\  N  =  0 ) )  -> 
( M  gcd  N
)  =  ( 0  gcd  0 ) )
5 0nn0 8621 . . . . 5  |-  0  e.  NN0
65a1i 9 . . . 4  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =  0  /\  N  =  0 ) )  -> 
0  e.  NN0 )
7 0dvds 10698 . . . . . . . . . . 11  |-  ( M  e.  ZZ  ->  (
0  ||  M  <->  M  = 
0 ) )
87ad2antrr 472 . . . . . . . . . 10  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =  0  /\  N  =  0 ) )  -> 
( 0  ||  M  <->  M  =  0 ) )
92, 8mpbird 165 . . . . . . . . 9  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =  0  /\  N  =  0 ) )  -> 
0  ||  M )
10 0dvds 10698 . . . . . . . . . . 11  |-  ( N  e.  ZZ  ->  (
0  ||  N  <->  N  = 
0 ) )
1110ad2antlr 473 . . . . . . . . . 10  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =  0  /\  N  =  0 ) )  -> 
( 0  ||  N  <->  N  =  0 ) )
123, 11mpbird 165 . . . . . . . . 9  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =  0  /\  N  =  0 ) )  -> 
0  ||  N )
139, 12jca 300 . . . . . . . 8  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =  0  /\  N  =  0 ) )  -> 
( 0  ||  M  /\  0  ||  N ) )
1413ad2antrr 472 . . . . . . 7  |-  ( ( ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =  0  /\  N  =  0 ) )  /\  d  e. 
NN0 )  /\  A. z  e.  ZZ  (
z  ||  d  <->  ( z  ||  M  /\  z  ||  N ) ) )  ->  ( 0  ||  M  /\  0  ||  N
) )
15 0z 8694 . . . . . . . . 9  |-  0  e.  ZZ
16 breq1 3823 . . . . . . . . . . 11  |-  ( z  =  0  ->  (
z  ||  d  <->  0  ||  d ) )
17 breq1 3823 . . . . . . . . . . . 12  |-  ( z  =  0  ->  (
z  ||  M  <->  0  ||  M ) )
18 breq1 3823 . . . . . . . . . . . 12  |-  ( z  =  0  ->  (
z  ||  N  <->  0  ||  N ) )
1917, 18anbi12d 457 . . . . . . . . . . 11  |-  ( z  =  0  ->  (
( z  ||  M  /\  z  ||  N )  <-> 
( 0  ||  M  /\  0  ||  N ) ) )
2016, 19bibi12d 233 . . . . . . . . . 10  |-  ( z  =  0  ->  (
( z  ||  d  <->  ( z  ||  M  /\  z  ||  N ) )  <-> 
( 0  ||  d  <->  ( 0  ||  M  /\  0  ||  N ) ) ) )
2120rspcv 2711 . . . . . . . . 9  |-  ( 0  e.  ZZ  ->  ( A. z  e.  ZZ  ( z  ||  d  <->  ( z  ||  M  /\  z  ||  N ) )  ->  ( 0  ||  d 
<->  ( 0  ||  M  /\  0  ||  N ) ) ) )
2215, 21ax-mp 7 . . . . . . . 8  |-  ( A. z  e.  ZZ  (
z  ||  d  <->  ( z  ||  M  /\  z  ||  N ) )  -> 
( 0  ||  d  <->  ( 0  ||  M  /\  0  ||  N ) ) )
2322adantl 271 . . . . . . 7  |-  ( ( ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =  0  /\  N  =  0 ) )  /\  d  e. 
NN0 )  /\  A. z  e.  ZZ  (
z  ||  d  <->  ( z  ||  M  /\  z  ||  N ) ) )  ->  ( 0  ||  d 
<->  ( 0  ||  M  /\  0  ||  N ) ) )
2414, 23mpbird 165 . . . . . 6  |-  ( ( ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =  0  /\  N  =  0 ) )  /\  d  e. 
NN0 )  /\  A. z  e.  ZZ  (
z  ||  d  <->  ( z  ||  M  /\  z  ||  N ) ) )  ->  0  ||  d
)
25 simplr 497 . . . . . . . 8  |-  ( ( ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =  0  /\  N  =  0 ) )  /\  d  e. 
NN0 )  /\  A. z  e.  ZZ  (
z  ||  d  <->  ( z  ||  M  /\  z  ||  N ) ) )  ->  d  e.  NN0 )
2625nn0zd 8799 . . . . . . 7  |-  ( ( ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =  0  /\  N  =  0 ) )  /\  d  e. 
NN0 )  /\  A. z  e.  ZZ  (
z  ||  d  <->  ( z  ||  M  /\  z  ||  N ) ) )  ->  d  e.  ZZ )
27 0dvds 10698 . . . . . . 7  |-  ( d  e.  ZZ  ->  (
0  ||  d  <->  d  = 
0 ) )
2826, 27syl 14 . . . . . 6  |-  ( ( ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =  0  /\  N  =  0 ) )  /\  d  e. 
NN0 )  /\  A. z  e.  ZZ  (
z  ||  d  <->  ( z  ||  M  /\  z  ||  N ) ) )  ->  ( 0  ||  d 
<->  d  =  0 ) )
2924, 28mpbid 145 . . . . 5  |-  ( ( ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =  0  /\  N  =  0 ) )  /\  d  e. 
NN0 )  /\  A. z  e.  ZZ  (
z  ||  d  <->  ( z  ||  M  /\  z  ||  N ) ) )  ->  d  =  0 )
30 dvds0 10693 . . . . . . . . 9  |-  ( z  e.  ZZ  ->  z  ||  0 )
3130adantl 271 . . . . . . . 8  |-  ( ( ( ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =  0  /\  N  =  0 ) )  /\  d  e.  NN0 )  /\  d  =  0 )  /\  z  e.  ZZ )  ->  z  ||  0 )
32 breq2 3824 . . . . . . . . 9  |-  ( d  =  0  ->  (
z  ||  d  <->  z  ||  0 ) )
3332ad2antlr 473 . . . . . . . 8  |-  ( ( ( ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =  0  /\  N  =  0 ) )  /\  d  e.  NN0 )  /\  d  =  0 )  /\  z  e.  ZZ )  ->  ( z  ||  d  <->  z 
||  0 ) )
3431, 33mpbird 165 . . . . . . 7  |-  ( ( ( ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =  0  /\  N  =  0 ) )  /\  d  e.  NN0 )  /\  d  =  0 )  /\  z  e.  ZZ )  ->  z  ||  d )
352ad3antrrr 476 . . . . . . . . 9  |-  ( ( ( ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =  0  /\  N  =  0 ) )  /\  d  e.  NN0 )  /\  d  =  0 )  /\  z  e.  ZZ )  ->  M  =  0 )
3631, 35breqtrrd 3846 . . . . . . . 8  |-  ( ( ( ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =  0  /\  N  =  0 ) )  /\  d  e.  NN0 )  /\  d  =  0 )  /\  z  e.  ZZ )  ->  z  ||  M )
373ad3antrrr 476 . . . . . . . . 9  |-  ( ( ( ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =  0  /\  N  =  0 ) )  /\  d  e.  NN0 )  /\  d  =  0 )  /\  z  e.  ZZ )  ->  N  =  0 )
3831, 37breqtrrd 3846 . . . . . . . 8  |-  ( ( ( ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =  0  /\  N  =  0 ) )  /\  d  e.  NN0 )  /\  d  =  0 )  /\  z  e.  ZZ )  ->  z  ||  N )
3936, 38jca 300 . . . . . . 7  |-  ( ( ( ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =  0  /\  N  =  0 ) )  /\  d  e.  NN0 )  /\  d  =  0 )  /\  z  e.  ZZ )  ->  ( z  ||  M  /\  z  ||  N ) )
4034, 392thd 173 . . . . . 6  |-  ( ( ( ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =  0  /\  N  =  0 ) )  /\  d  e.  NN0 )  /\  d  =  0 )  /\  z  e.  ZZ )  ->  ( z  ||  d  <->  ( z  ||  M  /\  z  ||  N ) ) )
4140ralrimiva 2442 . . . . 5  |-  ( ( ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =  0  /\  N  =  0 ) )  /\  d  e. 
NN0 )  /\  d  =  0 )  ->  A. z  e.  ZZ  ( z  ||  d  <->  ( z  ||  M  /\  z  ||  N ) ) )
4229, 41impbida 561 . . . 4  |-  ( ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =  0  /\  N  =  0 ) )  /\  d  e. 
NN0 )  ->  ( A. z  e.  ZZ  ( z  ||  d  <->  ( z  ||  M  /\  z  ||  N ) )  <-> 
d  =  0 ) )
436, 42riota5 5594 . . 3  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =  0  /\  N  =  0 ) )  -> 
( iota_ d  e.  NN0  A. z  e.  ZZ  (
z  ||  d  <->  ( z  ||  M  /\  z  ||  N ) ) )  =  0 )
441, 4, 433eqtr4a 2143 . 2  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =  0  /\  N  =  0 ) )  -> 
( M  gcd  N
)  =  ( iota_ d  e.  NN0  A. z  e.  ZZ  ( z  ||  d 
<->  ( z  ||  M  /\  z  ||  N ) ) ) )
45 bezoutlembi 10876 . . . . 5  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  E. r  e.  NN0  ( A. w  e.  ZZ  ( w  ||  r  <->  ( w  ||  M  /\  w  ||  N ) )  /\  E. a  e.  ZZ  E. b  e.  ZZ  r  =  ( ( M  x.  a )  +  ( N  x.  b
) ) ) )
46 simpl 107 . . . . . 6  |-  ( ( A. w  e.  ZZ  ( w  ||  r  <->  ( w  ||  M  /\  w  ||  N ) )  /\  E. a  e.  ZZ  E. b  e.  ZZ  r  =  ( ( M  x.  a )  +  ( N  x.  b
) ) )  ->  A. w  e.  ZZ  ( w  ||  r  <->  ( w  ||  M  /\  w  ||  N ) ) )
4746reximi 2466 . . . . 5  |-  ( E. r  e.  NN0  ( A. w  e.  ZZ  ( w  ||  r  <->  ( w  ||  M  /\  w  ||  N ) )  /\  E. a  e.  ZZ  E. b  e.  ZZ  r  =  ( ( M  x.  a )  +  ( N  x.  b
) ) )  ->  E. r  e.  NN0  A. w  e.  ZZ  (
w  ||  r  <->  ( w  ||  M  /\  w  ||  N ) ) )
4845, 47syl 14 . . . 4  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  E. r  e.  NN0  A. w  e.  ZZ  (
w  ||  r  <->  ( w  ||  M  /\  w  ||  N ) ) )
4948adantr 270 . . 3  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0 ) )  ->  E. r  e.  NN0  A. w  e.  ZZ  (
w  ||  r  <->  ( w  ||  M  /\  w  ||  N ) ) )
50 simplll 500 . . . . 5  |-  ( ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0
) )  /\  (
r  e.  NN0  /\  A. w  e.  ZZ  (
w  ||  r  <->  ( w  ||  M  /\  w  ||  N ) ) ) )  ->  M  e.  ZZ )
51 simpllr 501 . . . . 5  |-  ( ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0
) )  /\  (
r  e.  NN0  /\  A. w  e.  ZZ  (
w  ||  r  <->  ( w  ||  M  /\  w  ||  N ) ) ) )  ->  N  e.  ZZ )
52 simprl 498 . . . . 5  |-  ( ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0
) )  /\  (
r  e.  NN0  /\  A. w  e.  ZZ  (
w  ||  r  <->  ( w  ||  M  /\  w  ||  N ) ) ) )  ->  r  e.  NN0 )
53 breq1 3823 . . . . . . . . 9  |-  ( w  =  z  ->  (
w  ||  r  <->  z  ||  r ) )
54 breq1 3823 . . . . . . . . . 10  |-  ( w  =  z  ->  (
w  ||  M  <->  z  ||  M ) )
55 breq1 3823 . . . . . . . . . 10  |-  ( w  =  z  ->  (
w  ||  N  <->  z  ||  N ) )
5654, 55anbi12d 457 . . . . . . . . 9  |-  ( w  =  z  ->  (
( w  ||  M  /\  w  ||  N )  <-> 
( z  ||  M  /\  z  ||  N ) ) )
5753, 56bibi12d 233 . . . . . . . 8  |-  ( w  =  z  ->  (
( w  ||  r  <->  ( w  ||  M  /\  w  ||  N ) )  <-> 
( z  ||  r  <->  ( z  ||  M  /\  z  ||  N ) ) ) )
5857cbvralv 2586 . . . . . . 7  |-  ( A. w  e.  ZZ  (
w  ||  r  <->  ( w  ||  M  /\  w  ||  N ) )  <->  A. z  e.  ZZ  ( z  ||  r 
<->  ( z  ||  M  /\  z  ||  N ) ) )
5958biimpi 118 . . . . . 6  |-  ( A. w  e.  ZZ  (
w  ||  r  <->  ( w  ||  M  /\  w  ||  N ) )  ->  A. z  e.  ZZ  ( z  ||  r  <->  ( z  ||  M  /\  z  ||  N ) ) )
6059ad2antll 475 . . . . 5  |-  ( ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0
) )  /\  (
r  e.  NN0  /\  A. w  e.  ZZ  (
w  ||  r  <->  ( w  ||  M  /\  w  ||  N ) ) ) )  ->  A. z  e.  ZZ  ( z  ||  r 
<->  ( z  ||  M  /\  z  ||  N ) ) )
61 simplr 497 . . . . 5  |-  ( ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0
) )  /\  (
r  e.  NN0  /\  A. w  e.  ZZ  (
w  ||  r  <->  ( w  ||  M  /\  w  ||  N ) ) ) )  ->  -.  ( M  =  0  /\  N  =  0 ) )
6250, 51, 52, 60, 61bezoutlemsup 10880 . . . 4  |-  ( ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0
) )  /\  (
r  e.  NN0  /\  A. w  e.  ZZ  (
w  ||  r  <->  ( w  ||  M  /\  w  ||  N ) ) ) )  ->  r  =  sup ( { z  e.  ZZ  |  ( z 
||  M  /\  z  ||  N ) } ,  RR ,  <  ) )
63 breq1 3823 . . . . . . . . 9  |-  ( w  =  z  ->  (
w  ||  d  <->  z  ||  d ) )
6463, 56bibi12d 233 . . . . . . . 8  |-  ( w  =  z  ->  (
( w  ||  d  <->  ( w  ||  M  /\  w  ||  N ) )  <-> 
( z  ||  d  <->  ( z  ||  M  /\  z  ||  N ) ) ) )
6564cbvralv 2586 . . . . . . 7  |-  ( A. w  e.  ZZ  (
w  ||  d  <->  ( w  ||  M  /\  w  ||  N ) )  <->  A. z  e.  ZZ  ( z  ||  d 
<->  ( z  ||  M  /\  z  ||  N ) ) )
6665a1i 9 . . . . . 6  |-  ( d  e.  NN0  ->  ( A. w  e.  ZZ  (
w  ||  d  <->  ( w  ||  M  /\  w  ||  N ) )  <->  A. z  e.  ZZ  ( z  ||  d 
<->  ( z  ||  M  /\  z  ||  N ) ) ) )
6766riotabiia 5586 . . . . 5  |-  ( iota_ d  e.  NN0  A. w  e.  ZZ  ( w  ||  d 
<->  ( w  ||  M  /\  w  ||  N ) ) )  =  (
iota_ d  e.  NN0  A. z  e.  ZZ  (
z  ||  d  <->  ( z  ||  M  /\  z  ||  N ) ) )
68 simprr 499 . . . . . 6  |-  ( ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0
) )  /\  (
r  e.  NN0  /\  A. w  e.  ZZ  (
w  ||  r  <->  ( w  ||  M  /\  w  ||  N ) ) ) )  ->  A. w  e.  ZZ  ( w  ||  r 
<->  ( w  ||  M  /\  w  ||  N ) ) )
6950, 51, 52, 68bezoutlemeu 10878 . . . . . . 7  |-  ( ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0
) )  /\  (
r  e.  NN0  /\  A. w  e.  ZZ  (
w  ||  r  <->  ( w  ||  M  /\  w  ||  N ) ) ) )  ->  E! d  e.  NN0  A. w  e.  ZZ  ( w  ||  d 
<->  ( w  ||  M  /\  w  ||  N ) ) )
70 breq2 3824 . . . . . . . . . 10  |-  ( d  =  r  ->  (
w  ||  d  <->  w  ||  r
) )
7170bibi1d 231 . . . . . . . . 9  |-  ( d  =  r  ->  (
( w  ||  d  <->  ( w  ||  M  /\  w  ||  N ) )  <-> 
( w  ||  r  <->  ( w  ||  M  /\  w  ||  N ) ) ) )
7271ralbidv 2376 . . . . . . . 8  |-  ( d  =  r  ->  ( A. w  e.  ZZ  ( w  ||  d  <->  ( w  ||  M  /\  w  ||  N ) )  <->  A. w  e.  ZZ  ( w  ||  r 
<->  ( w  ||  M  /\  w  ||  N ) ) ) )
7372riota2 5591 . . . . . . 7  |-  ( ( r  e.  NN0  /\  E! d  e.  NN0  A. w  e.  ZZ  (
w  ||  d  <->  ( w  ||  M  /\  w  ||  N ) ) )  ->  ( A. w  e.  ZZ  ( w  ||  r 
<->  ( w  ||  M  /\  w  ||  N ) )  <->  ( iota_ d  e. 
NN0  A. w  e.  ZZ  ( w  ||  d  <->  ( w  ||  M  /\  w  ||  N ) ) )  =  r ) )
7452, 69, 73syl2anc 403 . . . . . 6  |-  ( ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0
) )  /\  (
r  e.  NN0  /\  A. w  e.  ZZ  (
w  ||  r  <->  ( w  ||  M  /\  w  ||  N ) ) ) )  ->  ( A. w  e.  ZZ  (
w  ||  r  <->  ( w  ||  M  /\  w  ||  N ) )  <->  ( iota_ d  e.  NN0  A. w  e.  ZZ  ( w  ||  d 
<->  ( w  ||  M  /\  w  ||  N ) ) )  =  r ) )
7568, 74mpbid 145 . . . . 5  |-  ( ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0
) )  /\  (
r  e.  NN0  /\  A. w  e.  ZZ  (
w  ||  r  <->  ( w  ||  M  /\  w  ||  N ) ) ) )  ->  ( iota_ d  e.  NN0  A. w  e.  ZZ  ( w  ||  d 
<->  ( w  ||  M  /\  w  ||  N ) ) )  =  r )
7667, 75syl5eqr 2131 . . . 4  |-  ( ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0
) )  /\  (
r  e.  NN0  /\  A. w  e.  ZZ  (
w  ||  r  <->  ( w  ||  M  /\  w  ||  N ) ) ) )  ->  ( iota_ d  e.  NN0  A. z  e.  ZZ  ( z  ||  d 
<->  ( z  ||  M  /\  z  ||  N ) ) )  =  r )
77 gcdn0val 10835 . . . . 5  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0 ) )  ->  ( M  gcd  N )  =  sup ( { z  e.  ZZ  |  ( z  ||  M  /\  z  ||  N
) } ,  RR ,  <  ) )
7877adantr 270 . . . 4  |-  ( ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0
) )  /\  (
r  e.  NN0  /\  A. w  e.  ZZ  (
w  ||  r  <->  ( w  ||  M  /\  w  ||  N ) ) ) )  ->  ( M  gcd  N )  =  sup ( { z  e.  ZZ  |  ( z  ||  M  /\  z  ||  N
) } ,  RR ,  <  ) )
7962, 76, 783eqtr4rd 2128 . . 3  |-  ( ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0
) )  /\  (
r  e.  NN0  /\  A. w  e.  ZZ  (
w  ||  r  <->  ( w  ||  M  /\  w  ||  N ) ) ) )  ->  ( M  gcd  N )  =  (
iota_ d  e.  NN0  A. z  e.  ZZ  (
z  ||  d  <->  ( z  ||  M  /\  z  ||  N ) ) ) )
8049, 79rexlimddv 2489 . 2  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  /\  N  =  0 ) )  ->  ( M  gcd  N )  =  ( iota_ d  e.  NN0  A. z  e.  ZZ  ( z  ||  d 
<->  ( z  ||  M  /\  z  ||  N ) ) ) )
81 gcdmndc 10822 . . 3  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  -> DECID  ( M  =  0  /\  N  =  0 ) )
82 exmiddc 780 . . 3  |-  (DECID  ( M  =  0  /\  N  =  0 )  -> 
( ( M  =  0  /\  N  =  0 )  \/  -.  ( M  =  0  /\  N  =  0
) ) )
8381, 82syl 14 . 2  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( M  =  0  /\  N  =  0 )  \/  -.  ( M  =  0  /\  N  =  0
) ) )
8444, 80, 83mpjaodan 745 1  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  N
)  =  ( iota_ d  e.  NN0  A. z  e.  ZZ  ( z  ||  d 
<->  ( z  ||  M  /\  z  ||  N ) ) ) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    /\ wa 102    <-> wb 103    \/ wo 662  DECID wdc 778    = wceq 1287    e. wcel 1436   A.wral 2355   E.wrex 2356   E!wreu 2357   {crab 2359   class class class wbr 3820   iota_crio 5568  (class class class)co 5613   supcsup 6621   RRcr 7293   0cc0 7294    + caddc 7297    x. cmul 7299    < clt 7466   NN0cn0 8606   ZZcz 8683    || cdvds 10678    gcd cgcd 10820
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-mp 7  ax-ia1 104  ax-ia2 105  ax-ia3 106  ax-in1 577  ax-in2 578  ax-io 663  ax-5 1379  ax-7 1380  ax-gen 1381  ax-ie1 1425  ax-ie2 1426  ax-8 1438  ax-10 1439  ax-11 1440  ax-i12 1441  ax-bndl 1442  ax-4 1443  ax-13 1447  ax-14 1448  ax-17 1462  ax-i9 1466  ax-ial 1470  ax-i5r 1471  ax-ext 2067  ax-coll 3929  ax-sep 3932  ax-nul 3940  ax-pow 3984  ax-pr 4010  ax-un 4234  ax-setind 4326  ax-iinf 4376  ax-cnex 7380  ax-resscn 7381  ax-1cn 7382  ax-1re 7383  ax-icn 7384  ax-addcl 7385  ax-addrcl 7386  ax-mulcl 7387  ax-mulrcl 7388  ax-addcom 7389  ax-mulcom 7390  ax-addass 7391  ax-mulass 7392  ax-distr 7393  ax-i2m1 7394  ax-0lt1 7395  ax-1rid 7396  ax-0id 7397  ax-rnegex 7398  ax-precex 7399  ax-cnre 7400  ax-pre-ltirr 7401  ax-pre-ltwlin 7402  ax-pre-lttrn 7403  ax-pre-apti 7404  ax-pre-ltadd 7405  ax-pre-mulgt0 7406  ax-pre-mulext 7407  ax-arch 7408  ax-caucvg 7409
This theorem depends on definitions:  df-bi 115  df-dc 779  df-3or 923  df-3an 924  df-tru 1290  df-fal 1293  df-nf 1393  df-sb 1690  df-eu 1948  df-mo 1949  df-clab 2072  df-cleq 2078  df-clel 2081  df-nfc 2214  df-ne 2252  df-nel 2347  df-ral 2360  df-rex 2361  df-reu 2362  df-rmo 2363  df-rab 2364  df-v 2617  df-sbc 2830  df-csb 2923  df-dif 2990  df-un 2992  df-in 2994  df-ss 3001  df-nul 3276  df-if 3380  df-pw 3417  df-sn 3437  df-pr 3438  df-op 3440  df-uni 3637  df-int 3672  df-iun 3715  df-br 3821  df-opab 3875  df-mpt 3876  df-tr 3912  df-id 4094  df-po 4097  df-iso 4098  df-iord 4167  df-on 4169  df-ilim 4170  df-suc 4172  df-iom 4379  df-xp 4417  df-rel 4418  df-cnv 4419  df-co 4420  df-dm 4421  df-rn 4422  df-res 4423  df-ima 4424  df-iota 4946  df-fun 4983  df-fn 4984  df-f 4985  df-f1 4986  df-fo 4987  df-f1o 4988  df-fv 4989  df-riota 5569  df-ov 5616  df-oprab 5617  df-mpt2 5618  df-1st 5868  df-2nd 5869  df-recs 6024  df-frec 6110  df-sup 6623  df-pnf 7468  df-mnf 7469  df-xr 7470  df-ltxr 7471  df-le 7472  df-sub 7599  df-neg 7600  df-reap 7993  df-ap 8000  df-div 8079  df-inn 8358  df-2 8416  df-3 8417  df-4 8418  df-n0 8607  df-z 8684  df-uz 8952  df-q 9037  df-rp 9067  df-fz 9357  df-fzo 9482  df-fl 9605  df-mod 9658  df-iseq 9780  df-iexp 9854  df-cj 10172  df-re 10173  df-im 10174  df-rsqrt 10327  df-abs 10328  df-dvds 10679  df-gcd 10821
This theorem is referenced by:  bezout  10882
  Copyright terms: Public domain W3C validator