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

Theorem gcd0id 11972
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 11953 . . . 4  |-  ( 0  gcd  0 )  =  0
2 oveq2 5880 . . . 4  |-  ( N  =  0  ->  (
0  gcd  N )  =  ( 0  gcd  0 ) )
3 fveq2 5514 . . . . 5  |-  ( N  =  0  ->  ( abs `  N )  =  ( abs `  0
) )
4 abs0 11060 . . . . 5  |-  ( abs `  0 )  =  0
53, 4eqtrdi 2226 . . . 4  |-  ( N  =  0  ->  ( abs `  N )  =  0 )
61, 2, 53eqtr4a 2236 . . 3  |-  ( N  =  0  ->  (
0  gcd  N )  =  ( abs `  N
) )
76adantl 277 . 2  |-  ( ( N  e.  ZZ  /\  N  =  0 )  ->  ( 0  gcd 
N )  =  ( abs `  N ) )
8 df-ne 2348 . . 3  |-  ( N  =/=  0  <->  -.  N  =  0 )
9 0z 9260 . . . . . . . 8  |-  0  e.  ZZ
10 gcddvds 11956 . . . . . . . 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 11959 . . . . . . . . 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 9369 . . . . . . 7  |-  ( N  e.  ZZ  ->  (
0  gcd  N )  e.  ZZ )
17 dvdsleabs 11843 . . . . . . 7  |-  ( ( ( 0  gcd  N
)  e.  ZZ  /\  N  e.  ZZ  /\  N  =/=  0 )  ->  (
( 0  gcd  N
)  ||  N  ->  ( 0  gcd  N )  <_  ( abs `  N
) ) )
1816, 17syl3an1 1271 . . . . . 6  |-  ( ( N  e.  ZZ  /\  N  e.  ZZ  /\  N  =/=  0 )  ->  (
( 0  gcd  N
)  ||  N  ->  ( 0  gcd  N )  <_  ( abs `  N
) ) )
19183anidm12 1295 . . . . 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 11088 . . . . . . . 8  |-  ( N  e.  ZZ  ->  ( abs `  N )  e.  ZZ )
22 dvds0 11806 . . . . . . . 8  |-  ( ( abs `  N )  e.  ZZ  ->  ( abs `  N )  ||  0 )
2321, 22syl 14 . . . . . . 7  |-  ( N  e.  ZZ  ->  ( abs `  N )  ||  0 )
24 iddvds 11804 . . . . . . . 8  |-  ( N  e.  ZZ  ->  N  ||  N )
25 absdvdsb 11809 . . . . . . . . 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 2177 . . . . . . . . 9  |-  0  =  0
3130biantrur 303 . . . . . . . 8  |-  ( N  =  0  <->  ( 0  =  0  /\  N  =  0 ) )
3231necon3abii 2383 . . . . . . 7  |-  ( N  =/=  0  <->  -.  (
0  =  0  /\  N  =  0 ) )
33 dvdslegcd 11957 . . . . . . . . . 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 1325 . . . . . . . 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 9371 . . . . . 6  |-  ( N  e.  ZZ  ->  (
0  gcd  N )  e.  RR )
4121zred 9371 . . . . . 6  |-  ( N  e.  ZZ  ->  ( abs `  N )  e.  RR )
4240, 41letri3d 8069 . . . . 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 944 . . 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 9324 . . . 4  |-  ( ( N  e.  ZZ  /\  0  e.  ZZ )  -> DECID  N  =  0 )
479, 46mpan2 425 . . 3  |-  ( N  e.  ZZ  -> DECID  N  =  0
)
48 exmiddc 836 . . 3  |-  (DECID  N  =  0  ->  ( N  =  0  \/  -.  N  =  0 ) )
4947, 48syl 14 . 2  |-  ( N  e.  ZZ  ->  ( N  =  0  \/  -.  N  =  0
) )
507, 45, 49mpjaodan 798 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 708  DECID wdc 834    /\ w3a 978    = wceq 1353    e. wcel 2148    =/= wne 2347   class class class wbr 4002   ` cfv 5215  (class class class)co 5872   0cc0 7808    <_ cle 7989   NN0cn0 9172   ZZcz 9249   abscabs 10999    || cdvds 11787    gcd cgcd 11935
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 614  ax-in2 615  ax-io 709  ax-5 1447  ax-7 1448  ax-gen 1449  ax-ie1 1493  ax-ie2 1494  ax-8 1504  ax-10 1505  ax-11 1506  ax-i12 1507  ax-bndl 1509  ax-4 1510  ax-17 1526  ax-i9 1530  ax-ial 1534  ax-i5r 1535  ax-13 2150  ax-14 2151  ax-ext 2159  ax-coll 4117  ax-sep 4120  ax-nul 4128  ax-pow 4173  ax-pr 4208  ax-un 4432  ax-setind 4535  ax-iinf 4586  ax-cnex 7899  ax-resscn 7900  ax-1cn 7901  ax-1re 7902  ax-icn 7903  ax-addcl 7904  ax-addrcl 7905  ax-mulcl 7906  ax-mulrcl 7907  ax-addcom 7908  ax-mulcom 7909  ax-addass 7910  ax-mulass 7911  ax-distr 7912  ax-i2m1 7913  ax-0lt1 7914  ax-1rid 7915  ax-0id 7916  ax-rnegex 7917  ax-precex 7918  ax-cnre 7919  ax-pre-ltirr 7920  ax-pre-ltwlin 7921  ax-pre-lttrn 7922  ax-pre-apti 7923  ax-pre-ltadd 7924  ax-pre-mulgt0 7925  ax-pre-mulext 7926  ax-arch 7927  ax-caucvg 7928
This theorem depends on definitions:  df-bi 117  df-dc 835  df-3or 979  df-3an 980  df-tru 1356  df-fal 1359  df-nf 1461  df-sb 1763  df-eu 2029  df-mo 2030  df-clab 2164  df-cleq 2170  df-clel 2173  df-nfc 2308  df-ne 2348  df-nel 2443  df-ral 2460  df-rex 2461  df-reu 2462  df-rmo 2463  df-rab 2464  df-v 2739  df-sbc 2963  df-csb 3058  df-dif 3131  df-un 3133  df-in 3135  df-ss 3142  df-nul 3423  df-if 3535  df-pw 3577  df-sn 3598  df-pr 3599  df-op 3601  df-uni 3810  df-int 3845  df-iun 3888  df-br 4003  df-opab 4064  df-mpt 4065  df-tr 4101  df-id 4292  df-po 4295  df-iso 4296  df-iord 4365  df-on 4367  df-ilim 4368  df-suc 4370  df-iom 4589  df-xp 4631  df-rel 4632  df-cnv 4633  df-co 4634  df-dm 4635  df-rn 4636  df-res 4637  df-ima 4638  df-iota 5177  df-fun 5217  df-fn 5218  df-f 5219  df-f1 5220  df-fo 5221  df-f1o 5222  df-fv 5223  df-riota 5828  df-ov 5875  df-oprab 5876  df-mpo 5877  df-1st 6138  df-2nd 6139  df-recs 6303  df-frec 6389  df-sup 6980  df-pnf 7990  df-mnf 7991  df-xr 7992  df-ltxr 7993  df-le 7994  df-sub 8126  df-neg 8127  df-reap 8528  df-ap 8535  df-div 8626  df-inn 8916  df-2 8974  df-3 8975  df-4 8976  df-n0 9173  df-z 9250  df-uz 9525  df-q 9616  df-rp 9650  df-fz 10005  df-fzo 10138  df-fl 10265  df-mod 10318  df-seqfrec 10441  df-exp 10515  df-cj 10844  df-re 10845  df-im 10846  df-rsqrt 11000  df-abs 11001  df-dvds 11788  df-gcd 11936
This theorem is referenced by:  gcdid0  11973  nn0gcdsq  12192  dfphi2  12212
  Copyright terms: Public domain W3C validator