MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  gcdmultiple Structured version   Unicode version

Theorem gcdmultiple 14395
Description: The GCD of a multiple of a number is the number itself. (Contributed by Scott Fenton, 12-Apr-2014.) (Revised by Mario Carneiro, 19-Apr-2014.)
Assertion
Ref Expression
gcdmultiple  |-  ( ( M  e.  NN  /\  N  e.  NN )  ->  ( M  gcd  ( M  x.  N )
)  =  M )

Proof of Theorem gcdmultiple
Dummy variables  k  n are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 oveq2 6285 . . . . . 6  |-  ( k  =  1  ->  ( M  x.  k )  =  ( M  x.  1 ) )
21oveq2d 6293 . . . . 5  |-  ( k  =  1  ->  ( M  gcd  ( M  x.  k ) )  =  ( M  gcd  ( M  x.  1 ) ) )
32eqeq1d 2404 . . . 4  |-  ( k  =  1  ->  (
( M  gcd  ( M  x.  k )
)  =  M  <->  ( M  gcd  ( M  x.  1 ) )  =  M ) )
43imbi2d 314 . . 3  |-  ( k  =  1  ->  (
( M  e.  NN  ->  ( M  gcd  ( M  x.  k )
)  =  M )  <-> 
( M  e.  NN  ->  ( M  gcd  ( M  x.  1 ) )  =  M ) ) )
5 oveq2 6285 . . . . . 6  |-  ( k  =  n  ->  ( M  x.  k )  =  ( M  x.  n ) )
65oveq2d 6293 . . . . 5  |-  ( k  =  n  ->  ( M  gcd  ( M  x.  k ) )  =  ( M  gcd  ( M  x.  n )
) )
76eqeq1d 2404 . . . 4  |-  ( k  =  n  ->  (
( M  gcd  ( M  x.  k )
)  =  M  <->  ( M  gcd  ( M  x.  n
) )  =  M ) )
87imbi2d 314 . . 3  |-  ( k  =  n  ->  (
( M  e.  NN  ->  ( M  gcd  ( M  x.  k )
)  =  M )  <-> 
( M  e.  NN  ->  ( M  gcd  ( M  x.  n )
)  =  M ) ) )
9 oveq2 6285 . . . . . 6  |-  ( k  =  ( n  + 
1 )  ->  ( M  x.  k )  =  ( M  x.  ( n  +  1
) ) )
109oveq2d 6293 . . . . 5  |-  ( k  =  ( n  + 
1 )  ->  ( M  gcd  ( M  x.  k ) )  =  ( M  gcd  ( M  x.  ( n  +  1 ) ) ) )
1110eqeq1d 2404 . . . 4  |-  ( k  =  ( n  + 
1 )  ->  (
( M  gcd  ( M  x.  k )
)  =  M  <->  ( M  gcd  ( M  x.  (
n  +  1 ) ) )  =  M ) )
1211imbi2d 314 . . 3  |-  ( k  =  ( n  + 
1 )  ->  (
( M  e.  NN  ->  ( M  gcd  ( M  x.  k )
)  =  M )  <-> 
( M  e.  NN  ->  ( M  gcd  ( M  x.  ( n  +  1 ) ) )  =  M ) ) )
13 oveq2 6285 . . . . . 6  |-  ( k  =  N  ->  ( M  x.  k )  =  ( M  x.  N ) )
1413oveq2d 6293 . . . . 5  |-  ( k  =  N  ->  ( M  gcd  ( M  x.  k ) )  =  ( M  gcd  ( M  x.  N )
) )
1514eqeq1d 2404 . . . 4  |-  ( k  =  N  ->  (
( M  gcd  ( M  x.  k )
)  =  M  <->  ( M  gcd  ( M  x.  N
) )  =  M ) )
1615imbi2d 314 . . 3  |-  ( k  =  N  ->  (
( M  e.  NN  ->  ( M  gcd  ( M  x.  k )
)  =  M )  <-> 
( M  e.  NN  ->  ( M  gcd  ( M  x.  N )
)  =  M ) ) )
17 nncn 10583 . . . . . 6  |-  ( M  e.  NN  ->  M  e.  CC )
1817mulid1d 9642 . . . . 5  |-  ( M  e.  NN  ->  ( M  x.  1 )  =  M )
1918oveq2d 6293 . . . 4  |-  ( M  e.  NN  ->  ( M  gcd  ( M  x.  1 ) )  =  ( M  gcd  M
) )
20 nnz 10926 . . . . . 6  |-  ( M  e.  NN  ->  M  e.  ZZ )
21 gcdid 14376 . . . . . 6  |-  ( M  e.  ZZ  ->  ( M  gcd  M )  =  ( abs `  M
) )
2220, 21syl 17 . . . . 5  |-  ( M  e.  NN  ->  ( M  gcd  M )  =  ( abs `  M
) )
23 nnre 10582 . . . . . 6  |-  ( M  e.  NN  ->  M  e.  RR )
24 nnnn0 10842 . . . . . . 7  |-  ( M  e.  NN  ->  M  e.  NN0 )
2524nn0ge0d 10895 . . . . . 6  |-  ( M  e.  NN  ->  0  <_  M )
2623, 25absidd 13401 . . . . 5  |-  ( M  e.  NN  ->  ( abs `  M )  =  M )
2722, 26eqtrd 2443 . . . 4  |-  ( M  e.  NN  ->  ( M  gcd  M )  =  M )
2819, 27eqtrd 2443 . . 3  |-  ( M  e.  NN  ->  ( M  gcd  ( M  x.  1 ) )  =  M )
2920adantr 463 . . . . . . . . 9  |-  ( ( M  e.  NN  /\  n  e.  NN )  ->  M  e.  ZZ )
30 nnz 10926 . . . . . . . . . 10  |-  ( n  e.  NN  ->  n  e.  ZZ )
31 zmulcl 10952 . . . . . . . . . 10  |-  ( ( M  e.  ZZ  /\  n  e.  ZZ )  ->  ( M  x.  n
)  e.  ZZ )
3220, 30, 31syl2an 475 . . . . . . . . 9  |-  ( ( M  e.  NN  /\  n  e.  NN )  ->  ( M  x.  n
)  e.  ZZ )
33 1z 10934 . . . . . . . . . 10  |-  1  e.  ZZ
34 gcdaddm 14374 . . . . . . . . . 10  |-  ( ( 1  e.  ZZ  /\  M  e.  ZZ  /\  ( M  x.  n )  e.  ZZ )  ->  ( M  gcd  ( M  x.  n ) )  =  ( M  gcd  (
( M  x.  n
)  +  ( 1  x.  M ) ) ) )
3533, 34mp3an1 1313 . . . . . . . . 9  |-  ( ( M  e.  ZZ  /\  ( M  x.  n
)  e.  ZZ )  ->  ( M  gcd  ( M  x.  n
) )  =  ( M  gcd  ( ( M  x.  n )  +  ( 1  x.  M ) ) ) )
3629, 32, 35syl2anc 659 . . . . . . . 8  |-  ( ( M  e.  NN  /\  n  e.  NN )  ->  ( M  gcd  ( M  x.  n )
)  =  ( M  gcd  ( ( M  x.  n )  +  ( 1  x.  M
) ) ) )
37 nncn 10583 . . . . . . . . . 10  |-  ( n  e.  NN  ->  n  e.  CC )
38 ax-1cn 9579 . . . . . . . . . . . 12  |-  1  e.  CC
39 adddi 9610 . . . . . . . . . . . 12  |-  ( ( M  e.  CC  /\  n  e.  CC  /\  1  e.  CC )  ->  ( M  x.  ( n  +  1 ) )  =  ( ( M  x.  n )  +  ( M  x.  1 ) ) )
4038, 39mp3an3 1315 . . . . . . . . . . 11  |-  ( ( M  e.  CC  /\  n  e.  CC )  ->  ( M  x.  (
n  +  1 ) )  =  ( ( M  x.  n )  +  ( M  x.  1 ) ) )
41 mulcom 9607 . . . . . . . . . . . . . 14  |-  ( ( M  e.  CC  /\  1  e.  CC )  ->  ( M  x.  1 )  =  ( 1  x.  M ) )
4238, 41mpan2 669 . . . . . . . . . . . . 13  |-  ( M  e.  CC  ->  ( M  x.  1 )  =  ( 1  x.  M ) )
4342adantr 463 . . . . . . . . . . . 12  |-  ( ( M  e.  CC  /\  n  e.  CC )  ->  ( M  x.  1 )  =  ( 1  x.  M ) )
4443oveq2d 6293 . . . . . . . . . . 11  |-  ( ( M  e.  CC  /\  n  e.  CC )  ->  ( ( M  x.  n )  +  ( M  x.  1 ) )  =  ( ( M  x.  n )  +  ( 1  x.  M ) ) )
4540, 44eqtrd 2443 . . . . . . . . . 10  |-  ( ( M  e.  CC  /\  n  e.  CC )  ->  ( M  x.  (
n  +  1 ) )  =  ( ( M  x.  n )  +  ( 1  x.  M ) ) )
4617, 37, 45syl2an 475 . . . . . . . . 9  |-  ( ( M  e.  NN  /\  n  e.  NN )  ->  ( M  x.  (
n  +  1 ) )  =  ( ( M  x.  n )  +  ( 1  x.  M ) ) )
4746oveq2d 6293 . . . . . . . 8  |-  ( ( M  e.  NN  /\  n  e.  NN )  ->  ( M  gcd  ( M  x.  ( n  +  1 ) ) )  =  ( M  gcd  ( ( M  x.  n )  +  ( 1  x.  M
) ) ) )
4836, 47eqtr4d 2446 . . . . . . 7  |-  ( ( M  e.  NN  /\  n  e.  NN )  ->  ( M  gcd  ( M  x.  n )
)  =  ( M  gcd  ( M  x.  ( n  +  1
) ) ) )
4948eqeq1d 2404 . . . . . 6  |-  ( ( M  e.  NN  /\  n  e.  NN )  ->  ( ( M  gcd  ( M  x.  n
) )  =  M  <-> 
( M  gcd  ( M  x.  ( n  +  1 ) ) )  =  M ) )
5049biimpd 207 . . . . 5  |-  ( ( M  e.  NN  /\  n  e.  NN )  ->  ( ( M  gcd  ( M  x.  n
) )  =  M  ->  ( M  gcd  ( M  x.  (
n  +  1 ) ) )  =  M ) )
5150expcom 433 . . . 4  |-  ( n  e.  NN  ->  ( M  e.  NN  ->  ( ( M  gcd  ( M  x.  n )
)  =  M  -> 
( M  gcd  ( M  x.  ( n  +  1 ) ) )  =  M ) ) )
5251a2d 26 . . 3  |-  ( n  e.  NN  ->  (
( M  e.  NN  ->  ( M  gcd  ( M  x.  n )
)  =  M )  ->  ( M  e.  NN  ->  ( M  gcd  ( M  x.  (
n  +  1 ) ) )  =  M ) ) )
534, 8, 12, 16, 28, 52nnind 10593 . 2  |-  ( N  e.  NN  ->  ( M  e.  NN  ->  ( M  gcd  ( M  x.  N ) )  =  M ) )
5453impcom 428 1  |-  ( ( M  e.  NN  /\  N  e.  NN )  ->  ( M  gcd  ( M  x.  N )
)  =  M )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    /\ wa 367    = wceq 1405    e. wcel 1842   ` cfv 5568  (class class class)co 6277   CCcc 9519   1c1 9522    + caddc 9524    x. cmul 9526   NNcn 10575   ZZcz 10904   abscabs 13214    gcd cgcd 14351
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1639  ax-4 1652  ax-5 1725  ax-6 1771  ax-7 1814  ax-8 1844  ax-9 1846  ax-10 1861  ax-11 1866  ax-12 1878  ax-13 2026  ax-ext 2380  ax-sep 4516  ax-nul 4524  ax-pow 4571  ax-pr 4629  ax-un 6573  ax-cnex 9577  ax-resscn 9578  ax-1cn 9579  ax-icn 9580  ax-addcl 9581  ax-addrcl 9582  ax-mulcl 9583  ax-mulrcl 9584  ax-mulcom 9585  ax-addass 9586  ax-mulass 9587  ax-distr 9588  ax-i2m1 9589  ax-1ne0 9590  ax-1rid 9591  ax-rnegex 9592  ax-rrecex 9593  ax-cnre 9594  ax-pre-lttri 9595  ax-pre-lttrn 9596  ax-pre-ltadd 9597  ax-pre-mulgt0 9598  ax-pre-sup 9599
This theorem depends on definitions:  df-bi 185  df-or 368  df-an 369  df-3or 975  df-3an 976  df-tru 1408  df-ex 1634  df-nf 1638  df-sb 1764  df-eu 2242  df-mo 2243  df-clab 2388  df-cleq 2394  df-clel 2397  df-nfc 2552  df-ne 2600  df-nel 2601  df-ral 2758  df-rex 2759  df-reu 2760  df-rmo 2761  df-rab 2762  df-v 3060  df-sbc 3277  df-csb 3373  df-dif 3416  df-un 3418  df-in 3420  df-ss 3427  df-pss 3429  df-nul 3738  df-if 3885  df-pw 3956  df-sn 3972  df-pr 3974  df-tp 3976  df-op 3978  df-uni 4191  df-iun 4272  df-br 4395  df-opab 4453  df-mpt 4454  df-tr 4489  df-eprel 4733  df-id 4737  df-po 4743  df-so 4744  df-fr 4781  df-we 4783  df-xp 4828  df-rel 4829  df-cnv 4830  df-co 4831  df-dm 4832  df-rn 4833  df-res 4834  df-ima 4835  df-pred 5366  df-ord 5412  df-on 5413  df-lim 5414  df-suc 5415  df-iota 5532  df-fun 5570  df-fn 5571  df-f 5572  df-f1 5573  df-fo 5574  df-f1o 5575  df-fv 5576  df-riota 6239  df-ov 6280  df-oprab 6281  df-mpt2 6282  df-om 6683  df-2nd 6784  df-wrecs 7012  df-recs 7074  df-rdg 7112  df-er 7347  df-en 7554  df-dom 7555  df-sdom 7556  df-sup 7934  df-pnf 9659  df-mnf 9660  df-xr 9661  df-ltxr 9662  df-le 9663  df-sub 9842  df-neg 9843  df-div 10247  df-nn 10576  df-2 10634  df-3 10635  df-n0 10836  df-z 10905  df-uz 11127  df-rp 11265  df-seq 12150  df-exp 12209  df-cj 13079  df-re 13080  df-im 13081  df-sqrt 13215  df-abs 13216  df-dvds 14194  df-gcd 14352
This theorem is referenced by:  gcdmultiplez  14396  rpmulgcd  14400
  Copyright terms: Public domain W3C validator