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

Theorem gcd0id 12021
Description: The gcd of 0 and an integer is the integer's absolute value. (Contributed by Paul Chapman, 21-Mar-2011.)
Assertion
Ref Expression
gcd0id  |-  ( N  e.  ZZ  ->  (
0  gcd  N )  =  ( abs `  N
) )

Proof of Theorem gcd0id
StepHypRef Expression
1 gcd0val 12002 . . . 4  |-  ( 0  gcd  0 )  =  0
2 oveq2 5908 . . . 4  |-  ( N  =  0  ->  (
0  gcd  N )  =  ( 0  gcd  0 ) )
3 fveq2 5537 . . . . 5  |-  ( N  =  0  ->  ( abs `  N )  =  ( abs `  0
) )
4 abs0 11108 . . . . 5  |-  ( abs `  0 )  =  0
53, 4eqtrdi 2238 . . . 4  |-  ( N  =  0  ->  ( abs `  N )  =  0 )
61, 2, 53eqtr4a 2248 . . 3  |-  ( N  =  0  ->  (
0  gcd  N )  =  ( abs `  N
) )
76adantl 277 . 2  |-  ( ( N  e.  ZZ  /\  N  =  0 )  ->  ( 0  gcd 
N )  =  ( abs `  N ) )
8 df-ne 2361 . . 3  |-  ( N  =/=  0  <->  -.  N  =  0 )
9 0z 9299 . . . . . . . 8  |-  0  e.  ZZ
10 gcddvds 12005 . . . . . . . 8  |-  ( ( 0  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( 0  gcd 
N )  ||  0  /\  ( 0  gcd  N
)  ||  N )
)
119, 10mpan 424 . . . . . . 7  |-  ( N  e.  ZZ  ->  (
( 0  gcd  N
)  ||  0  /\  ( 0  gcd  N
)  ||  N )
)
1211simprd 114 . . . . . 6  |-  ( N  e.  ZZ  ->  (
0  gcd  N )  ||  N )
1312adantr 276 . . . . 5  |-  ( ( N  e.  ZZ  /\  N  =/=  0 )  -> 
( 0  gcd  N
)  ||  N )
14 gcdcl 12008 . . . . . . . . 9  |-  ( ( 0  e.  ZZ  /\  N  e.  ZZ )  ->  ( 0  gcd  N
)  e.  NN0 )
159, 14mpan 424 . . . . . . . 8  |-  ( N  e.  ZZ  ->  (
0  gcd  N )  e.  NN0 )
1615nn0zd 9408 . . . . . . 7  |-  ( N  e.  ZZ  ->  (
0  gcd  N )  e.  ZZ )
17 dvdsleabs 11892 . . . . . . 7  |-  ( ( ( 0  gcd  N
)  e.  ZZ  /\  N  e.  ZZ  /\  N  =/=  0 )  ->  (
( 0  gcd  N
)  ||  N  ->  ( 0  gcd  N )  <_  ( abs `  N
) ) )
1816, 17syl3an1 1282 . . . . . 6  |-  ( ( N  e.  ZZ  /\  N  e.  ZZ  /\  N  =/=  0 )  ->  (
( 0  gcd  N
)  ||  N  ->  ( 0  gcd  N )  <_  ( abs `  N
) ) )
19183anidm12 1306 . . . . 5  |-  ( ( N  e.  ZZ  /\  N  =/=  0 )  -> 
( ( 0  gcd 
N )  ||  N  ->  ( 0  gcd  N
)  <_  ( abs `  N ) ) )
2013, 19mpd 13 . . . 4  |-  ( ( N  e.  ZZ  /\  N  =/=  0 )  -> 
( 0  gcd  N
)  <_  ( abs `  N ) )
21 zabscl 11136 . . . . . . . 8  |-  ( N  e.  ZZ  ->  ( abs `  N )  e.  ZZ )
22 dvds0 11854 . . . . . . . 8  |-  ( ( abs `  N )  e.  ZZ  ->  ( abs `  N )  ||  0 )
2321, 22syl 14 . . . . . . 7  |-  ( N  e.  ZZ  ->  ( abs `  N )  ||  0 )
24 iddvds 11852 . . . . . . . 8  |-  ( N  e.  ZZ  ->  N  ||  N )
25 absdvdsb 11857 . . . . . . . . 9  |-  ( ( N  e.  ZZ  /\  N  e.  ZZ )  ->  ( N  ||  N  <->  ( abs `  N ) 
||  N ) )
2625anidms 397 . . . . . . . 8  |-  ( N  e.  ZZ  ->  ( N  ||  N  <->  ( abs `  N )  ||  N
) )
2724, 26mpbid 147 . . . . . . 7  |-  ( N  e.  ZZ  ->  ( abs `  N )  ||  N )
2823, 27jca 306 . . . . . 6  |-  ( N  e.  ZZ  ->  (
( abs `  N
)  ||  0  /\  ( abs `  N ) 
||  N ) )
2928adantr 276 . . . . 5  |-  ( ( N  e.  ZZ  /\  N  =/=  0 )  -> 
( ( abs `  N
)  ||  0  /\  ( abs `  N ) 
||  N ) )
30 eqid 2189 . . . . . . . . 9  |-  0  =  0
3130biantrur 303 . . . . . . . 8  |-  ( N  =  0  <->  ( 0  =  0  /\  N  =  0 ) )
3231necon3abii 2396 . . . . . . 7  |-  ( N  =/=  0  <->  -.  (
0  =  0  /\  N  =  0 ) )
33 dvdslegcd 12006 . . . . . . . . . 10  |-  ( ( ( ( abs `  N
)  e.  ZZ  /\  0  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( 0  =  0  /\  N  =  0 ) )  ->  (
( ( abs `  N
)  ||  0  /\  ( abs `  N ) 
||  N )  -> 
( abs `  N
)  <_  ( 0  gcd  N ) ) )
3433ex 115 . . . . . . . . 9  |-  ( ( ( abs `  N
)  e.  ZZ  /\  0  e.  ZZ  /\  N  e.  ZZ )  ->  ( -.  ( 0  =  0  /\  N  =  0 )  ->  ( (
( abs `  N
)  ||  0  /\  ( abs `  N ) 
||  N )  -> 
( abs `  N
)  <_  ( 0  gcd  N ) ) ) )
359, 34mp3an2 1336 . . . . . . . 8  |-  ( ( ( abs `  N
)  e.  ZZ  /\  N  e.  ZZ )  ->  ( -.  ( 0  =  0  /\  N  =  0 )  -> 
( ( ( abs `  N )  ||  0  /\  ( abs `  N
)  ||  N )  ->  ( abs `  N
)  <_  ( 0  gcd  N ) ) ) )
3621, 35mpancom 422 . . . . . . 7  |-  ( N  e.  ZZ  ->  ( -.  ( 0  =  0  /\  N  =  0 )  ->  ( (
( abs `  N
)  ||  0  /\  ( abs `  N ) 
||  N )  -> 
( abs `  N
)  <_  ( 0  gcd  N ) ) ) )
3732, 36biimtrid 152 . . . . . 6  |-  ( N  e.  ZZ  ->  ( N  =/=  0  ->  (
( ( abs `  N
)  ||  0  /\  ( abs `  N ) 
||  N )  -> 
( abs `  N
)  <_  ( 0  gcd  N ) ) ) )
3837imp 124 . . . . 5  |-  ( ( N  e.  ZZ  /\  N  =/=  0 )  -> 
( ( ( abs `  N )  ||  0  /\  ( abs `  N
)  ||  N )  ->  ( abs `  N
)  <_  ( 0  gcd  N ) ) )
3929, 38mpd 13 . . . 4  |-  ( ( N  e.  ZZ  /\  N  =/=  0 )  -> 
( abs `  N
)  <_  ( 0  gcd  N ) )
4016zred 9410 . . . . . 6  |-  ( N  e.  ZZ  ->  (
0  gcd  N )  e.  RR )
4121zred 9410 . . . . . 6  |-  ( N  e.  ZZ  ->  ( abs `  N )  e.  RR )
4240, 41letri3d 8108 . . . . 5  |-  ( N  e.  ZZ  ->  (
( 0  gcd  N
)  =  ( abs `  N )  <->  ( (
0  gcd  N )  <_  ( abs `  N
)  /\  ( abs `  N )  <_  (
0  gcd  N )
) ) )
4342adantr 276 . . . 4  |-  ( ( N  e.  ZZ  /\  N  =/=  0 )  -> 
( ( 0  gcd 
N )  =  ( abs `  N )  <-> 
( ( 0  gcd 
N )  <_  ( abs `  N )  /\  ( abs `  N )  <_  ( 0  gcd 
N ) ) ) )
4420, 39, 43mpbir2and 946 . . 3  |-  ( ( N  e.  ZZ  /\  N  =/=  0 )  -> 
( 0  gcd  N
)  =  ( abs `  N ) )
458, 44sylan2br 288 . 2  |-  ( ( N  e.  ZZ  /\  -.  N  =  0
)  ->  ( 0  gcd  N )  =  ( abs `  N
) )
46 zdceq 9363 . . . 4  |-  ( ( N  e.  ZZ  /\  0  e.  ZZ )  -> DECID  N  =  0 )
479, 46mpan2 425 . . 3  |-  ( N  e.  ZZ  -> DECID  N  =  0
)
48 exmiddc 837 . . 3  |-  (DECID  N  =  0  ->  ( N  =  0  \/  -.  N  =  0 ) )
4947, 48syl 14 . 2  |-  ( N  e.  ZZ  ->  ( N  =  0  \/  -.  N  =  0
) )
507, 45, 49mpjaodan 799 1  |-  ( N  e.  ZZ  ->  (
0  gcd  N )  =  ( abs `  N
) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    /\ wa 104    <-> wb 105    \/ wo 709  DECID wdc 835    /\ w3a 980    = wceq 1364    e. wcel 2160    =/= wne 2360   class class class wbr 4021   ` cfv 5238  (class class class)co 5900   0cc0 7846    <_ cle 8028   NN0cn0 9211   ZZcz 9288   abscabs 11047    || cdvds 11835    gcd cgcd 11984
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 106  ax-ia2 107  ax-ia3 108  ax-in1 615  ax-in2 616  ax-io 710  ax-5 1458  ax-7 1459  ax-gen 1460  ax-ie1 1504  ax-ie2 1505  ax-8 1515  ax-10 1516  ax-11 1517  ax-i12 1518  ax-bndl 1520  ax-4 1521  ax-17 1537  ax-i9 1541  ax-ial 1545  ax-i5r 1546  ax-13 2162  ax-14 2163  ax-ext 2171  ax-coll 4136  ax-sep 4139  ax-nul 4147  ax-pow 4195  ax-pr 4230  ax-un 4454  ax-setind 4557  ax-iinf 4608  ax-cnex 7937  ax-resscn 7938  ax-1cn 7939  ax-1re 7940  ax-icn 7941  ax-addcl 7942  ax-addrcl 7943  ax-mulcl 7944  ax-mulrcl 7945  ax-addcom 7946  ax-mulcom 7947  ax-addass 7948  ax-mulass 7949  ax-distr 7950  ax-i2m1 7951  ax-0lt1 7952  ax-1rid 7953  ax-0id 7954  ax-rnegex 7955  ax-precex 7956  ax-cnre 7957  ax-pre-ltirr 7958  ax-pre-ltwlin 7959  ax-pre-lttrn 7960  ax-pre-apti 7961  ax-pre-ltadd 7962  ax-pre-mulgt0 7963  ax-pre-mulext 7964  ax-arch 7965  ax-caucvg 7966
This theorem depends on definitions:  df-bi 117  df-dc 836  df-3or 981  df-3an 982  df-tru 1367  df-fal 1370  df-nf 1472  df-sb 1774  df-eu 2041  df-mo 2042  df-clab 2176  df-cleq 2182  df-clel 2185  df-nfc 2321  df-ne 2361  df-nel 2456  df-ral 2473  df-rex 2474  df-reu 2475  df-rmo 2476  df-rab 2477  df-v 2754  df-sbc 2978  df-csb 3073  df-dif 3146  df-un 3148  df-in 3150  df-ss 3157  df-nul 3438  df-if 3550  df-pw 3595  df-sn 3616  df-pr 3617  df-op 3619  df-uni 3828  df-int 3863  df-iun 3906  df-br 4022  df-opab 4083  df-mpt 4084  df-tr 4120  df-id 4314  df-po 4317  df-iso 4318  df-iord 4387  df-on 4389  df-ilim 4390  df-suc 4392  df-iom 4611  df-xp 4653  df-rel 4654  df-cnv 4655  df-co 4656  df-dm 4657  df-rn 4658  df-res 4659  df-ima 4660  df-iota 5199  df-fun 5240  df-fn 5241  df-f 5242  df-f1 5243  df-fo 5244  df-f1o 5245  df-fv 5246  df-riota 5855  df-ov 5903  df-oprab 5904  df-mpo 5905  df-1st 6169  df-2nd 6170  df-recs 6334  df-frec 6420  df-sup 7017  df-pnf 8029  df-mnf 8030  df-xr 8031  df-ltxr 8032  df-le 8033  df-sub 8165  df-neg 8166  df-reap 8567  df-ap 8574  df-div 8665  df-inn 8955  df-2 9013  df-3 9014  df-4 9015  df-n0 9212  df-z 9289  df-uz 9564  df-q 9656  df-rp 9690  df-fz 10045  df-fzo 10179  df-fl 10307  df-mod 10360  df-seqfrec 10485  df-exp 10560  df-cj 10892  df-re 10893  df-im 10894  df-rsqrt 11048  df-abs 11049  df-dvds 11836  df-gcd 11985
This theorem is referenced by:  gcdid0  12022  nn0gcdsq  12243  dfphi2  12263
  Copyright terms: Public domain W3C validator