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

Theorem gcd0id 10577
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 10559 . . . 4  |-  ( 0  gcd  0 )  =  0
2 oveq2 5571 . . . 4  |-  ( N  =  0  ->  (
0  gcd  N )  =  ( 0  gcd  0 ) )
3 fveq2 5229 . . . . 5  |-  ( N  =  0  ->  ( abs `  N )  =  ( abs `  0
) )
4 abs0 10145 . . . . 5  |-  ( abs `  0 )  =  0
53, 4syl6eq 2131 . . . 4  |-  ( N  =  0  ->  ( abs `  N )  =  0 )
61, 2, 53eqtr4a 2141 . . 3  |-  ( N  =  0  ->  (
0  gcd  N )  =  ( abs `  N
) )
76adantl 271 . 2  |-  ( ( N  e.  ZZ  /\  N  =  0 )  ->  ( 0  gcd 
N )  =  ( abs `  N ) )
8 df-ne 2250 . . 3  |-  ( N  =/=  0  <->  -.  N  =  0 )
9 0z 8495 . . . . . . . 8  |-  0  e.  ZZ
10 gcddvds 10562 . . . . . . . 8  |-  ( ( 0  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( 0  gcd 
N )  ||  0  /\  ( 0  gcd  N
)  ||  N )
)
119, 10mpan 415 . . . . . . 7  |-  ( N  e.  ZZ  ->  (
( 0  gcd  N
)  ||  0  /\  ( 0  gcd  N
)  ||  N )
)
1211simprd 112 . . . . . 6  |-  ( N  e.  ZZ  ->  (
0  gcd  N )  ||  N )
1312adantr 270 . . . . 5  |-  ( ( N  e.  ZZ  /\  N  =/=  0 )  -> 
( 0  gcd  N
)  ||  N )
14 gcdcl 10565 . . . . . . . . 9  |-  ( ( 0  e.  ZZ  /\  N  e.  ZZ )  ->  ( 0  gcd  N
)  e.  NN0 )
159, 14mpan 415 . . . . . . . 8  |-  ( N  e.  ZZ  ->  (
0  gcd  N )  e.  NN0 )
1615nn0zd 8600 . . . . . . 7  |-  ( N  e.  ZZ  ->  (
0  gcd  N )  e.  ZZ )
17 dvdsleabs 10453 . . . . . . 7  |-  ( ( ( 0  gcd  N
)  e.  ZZ  /\  N  e.  ZZ  /\  N  =/=  0 )  ->  (
( 0  gcd  N
)  ||  N  ->  ( 0  gcd  N )  <_  ( abs `  N
) ) )
1816, 17syl3an1 1203 . . . . . 6  |-  ( ( N  e.  ZZ  /\  N  e.  ZZ  /\  N  =/=  0 )  ->  (
( 0  gcd  N
)  ||  N  ->  ( 0  gcd  N )  <_  ( abs `  N
) ) )
19183anidm12 1227 . . . . 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 10173 . . . . . . . 8  |-  ( N  e.  ZZ  ->  ( abs `  N )  e.  ZZ )
22 dvds0 10418 . . . . . . . 8  |-  ( ( abs `  N )  e.  ZZ  ->  ( abs `  N )  ||  0 )
2321, 22syl 14 . . . . . . 7  |-  ( N  e.  ZZ  ->  ( abs `  N )  ||  0 )
24 iddvds 10416 . . . . . . . 8  |-  ( N  e.  ZZ  ->  N  ||  N )
25 absdvdsb 10421 . . . . . . . . 9  |-  ( ( N  e.  ZZ  /\  N  e.  ZZ )  ->  ( N  ||  N  <->  ( abs `  N ) 
||  N ) )
2625anidms 389 . . . . . . . 8  |-  ( N  e.  ZZ  ->  ( N  ||  N  <->  ( abs `  N )  ||  N
) )
2724, 26mpbid 145 . . . . . . 7  |-  ( N  e.  ZZ  ->  ( abs `  N )  ||  N )
2823, 27jca 300 . . . . . 6  |-  ( N  e.  ZZ  ->  (
( abs `  N
)  ||  0  /\  ( abs `  N ) 
||  N ) )
2928adantr 270 . . . . 5  |-  ( ( N  e.  ZZ  /\  N  =/=  0 )  -> 
( ( abs `  N
)  ||  0  /\  ( abs `  N ) 
||  N ) )
30 eqid 2083 . . . . . . . . 9  |-  0  =  0
3130biantrur 297 . . . . . . . 8  |-  ( N  =  0  <->  ( 0  =  0  /\  N  =  0 ) )
3231necon3abii 2285 . . . . . . 7  |-  ( N  =/=  0  <->  -.  (
0  =  0  /\  N  =  0 ) )
33 dvdslegcd 10563 . . . . . . . . . 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 113 . . . . . . . . 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 1257 . . . . . . . 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 413 . . . . . . 7  |-  ( N  e.  ZZ  ->  ( -.  ( 0  =  0  /\  N  =  0 )  ->  ( (
( abs `  N
)  ||  0  /\  ( abs `  N ) 
||  N )  -> 
( abs `  N
)  <_  ( 0  gcd  N ) ) ) )
3732, 36syl5bi 150 . . . . . 6  |-  ( N  e.  ZZ  ->  ( N  =/=  0  ->  (
( ( abs `  N
)  ||  0  /\  ( abs `  N ) 
||  N )  -> 
( abs `  N
)  <_  ( 0  gcd  N ) ) ) )
3837imp 122 . . . . 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 8602 . . . . . 6  |-  ( N  e.  ZZ  ->  (
0  gcd  N )  e.  RR )
4121zred 8602 . . . . . 6  |-  ( N  e.  ZZ  ->  ( abs `  N )  e.  RR )
4240, 41letri3d 7345 . . . . 5  |-  ( N  e.  ZZ  ->  (
( 0  gcd  N
)  =  ( abs `  N )  <->  ( (
0  gcd  N )  <_  ( abs `  N
)  /\  ( abs `  N )  <_  (
0  gcd  N )
) ) )
4342adantr 270 . . . 4  |-  ( ( N  e.  ZZ  /\  N  =/=  0 )  -> 
( ( 0  gcd 
N )  =  ( abs `  N )  <-> 
( ( 0  gcd 
N )  <_  ( abs `  N )  /\  ( abs `  N )  <_  ( 0  gcd 
N ) ) ) )
4420, 39, 43mpbir2and 886 . . 3  |-  ( ( N  e.  ZZ  /\  N  =/=  0 )  -> 
( 0  gcd  N
)  =  ( abs `  N ) )
458, 44sylan2br 282 . 2  |-  ( ( N  e.  ZZ  /\  -.  N  =  0
)  ->  ( 0  gcd  N )  =  ( abs `  N
) )
46 zdceq 8556 . . . 4  |-  ( ( N  e.  ZZ  /\  0  e.  ZZ )  -> DECID  N  =  0 )
479, 46mpan2 416 . . 3  |-  ( N  e.  ZZ  -> DECID  N  =  0
)
48 exmiddc 778 . . 3  |-  (DECID  N  =  0  ->  ( N  =  0  \/  -.  N  =  0 ) )
4947, 48syl 14 . 2  |-  ( N  e.  ZZ  ->  ( N  =  0  \/  -.  N  =  0
) )
507, 45, 49mpjaodan 745 1  |-  ( N  e.  ZZ  ->  (
0  gcd  N )  =  ( abs `  N
) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    /\ wa 102    <-> wb 103    \/ wo 662  DECID wdc 776    /\ w3a 920    = wceq 1285    e. wcel 1434    =/= wne 2249   class class class wbr 3805   ` cfv 4952  (class class class)co 5563   0cc0 7095    <_ cle 7268   NN0cn0 8407   ZZcz 8484   abscabs 10084    || cdvds 10403    gcd cgcd 10545
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 1377  ax-7 1378  ax-gen 1379  ax-ie1 1423  ax-ie2 1424  ax-8 1436  ax-10 1437  ax-11 1438  ax-i12 1439  ax-bndl 1440  ax-4 1441  ax-13 1445  ax-14 1446  ax-17 1460  ax-i9 1464  ax-ial 1468  ax-i5r 1469  ax-ext 2065  ax-coll 3913  ax-sep 3916  ax-nul 3924  ax-pow 3968  ax-pr 3992  ax-un 4216  ax-setind 4308  ax-iinf 4357  ax-cnex 7181  ax-resscn 7182  ax-1cn 7183  ax-1re 7184  ax-icn 7185  ax-addcl 7186  ax-addrcl 7187  ax-mulcl 7188  ax-mulrcl 7189  ax-addcom 7190  ax-mulcom 7191  ax-addass 7192  ax-mulass 7193  ax-distr 7194  ax-i2m1 7195  ax-0lt1 7196  ax-1rid 7197  ax-0id 7198  ax-rnegex 7199  ax-precex 7200  ax-cnre 7201  ax-pre-ltirr 7202  ax-pre-ltwlin 7203  ax-pre-lttrn 7204  ax-pre-apti 7205  ax-pre-ltadd 7206  ax-pre-mulgt0 7207  ax-pre-mulext 7208  ax-arch 7209  ax-caucvg 7210
This theorem depends on definitions:  df-bi 115  df-dc 777  df-3or 921  df-3an 922  df-tru 1288  df-fal 1291  df-nf 1391  df-sb 1688  df-eu 1946  df-mo 1947  df-clab 2070  df-cleq 2076  df-clel 2079  df-nfc 2212  df-ne 2250  df-nel 2345  df-ral 2358  df-rex 2359  df-reu 2360  df-rmo 2361  df-rab 2362  df-v 2612  df-sbc 2825  df-csb 2918  df-dif 2984  df-un 2986  df-in 2988  df-ss 2995  df-nul 3268  df-if 3369  df-pw 3402  df-sn 3422  df-pr 3423  df-op 3425  df-uni 3622  df-int 3657  df-iun 3700  df-br 3806  df-opab 3860  df-mpt 3861  df-tr 3896  df-id 4076  df-po 4079  df-iso 4080  df-iord 4149  df-on 4151  df-ilim 4152  df-suc 4154  df-iom 4360  df-xp 4397  df-rel 4398  df-cnv 4399  df-co 4400  df-dm 4401  df-rn 4402  df-res 4403  df-ima 4404  df-iota 4917  df-fun 4954  df-fn 4955  df-f 4956  df-f1 4957  df-fo 4958  df-f1o 4959  df-fv 4960  df-riota 5519  df-ov 5566  df-oprab 5567  df-mpt2 5568  df-1st 5818  df-2nd 5819  df-recs 5974  df-frec 6060  df-sup 6491  df-pnf 7269  df-mnf 7270  df-xr 7271  df-ltxr 7272  df-le 7273  df-sub 7400  df-neg 7401  df-reap 7794  df-ap 7801  df-div 7880  df-inn 8159  df-2 8217  df-3 8218  df-4 8219  df-n0 8408  df-z 8485  df-uz 8753  df-q 8838  df-rp 8868  df-fz 9158  df-fzo 9282  df-fl 9404  df-mod 9457  df-iseq 9574  df-iexp 9625  df-cj 9930  df-re 9931  df-im 9932  df-rsqrt 10085  df-abs 10086  df-dvds 10404  df-gcd 10546
This theorem is referenced by:  gcdid0  10578  nn0gcdsq  10785  dfphi2  10803
  Copyright terms: Public domain W3C validator