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

Theorem gcdmultiple 12745
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 5882 . . . . . 6  |-  ( k  =  1  ->  ( M  x.  k )  =  ( M  x.  1 ) )
21oveq2d 5890 . . . . 5  |-  ( k  =  1  ->  ( M  gcd  ( M  x.  k ) )  =  ( M  gcd  ( M  x.  1 ) ) )
32eqeq1d 2304 . . . 4  |-  ( k  =  1  ->  (
( M  gcd  ( M  x.  k )
)  =  M  <->  ( M  gcd  ( M  x.  1 ) )  =  M ) )
43imbi2d 307 . . 3  |-  ( k  =  1  ->  (
( M  e.  NN  ->  ( M  gcd  ( M  x.  k )
)  =  M )  <-> 
( M  e.  NN  ->  ( M  gcd  ( M  x.  1 ) )  =  M ) ) )
5 oveq2 5882 . . . . . 6  |-  ( k  =  n  ->  ( M  x.  k )  =  ( M  x.  n ) )
65oveq2d 5890 . . . . 5  |-  ( k  =  n  ->  ( M  gcd  ( M  x.  k ) )  =  ( M  gcd  ( M  x.  n )
) )
76eqeq1d 2304 . . . 4  |-  ( k  =  n  ->  (
( M  gcd  ( M  x.  k )
)  =  M  <->  ( M  gcd  ( M  x.  n
) )  =  M ) )
87imbi2d 307 . . 3  |-  ( k  =  n  ->  (
( M  e.  NN  ->  ( M  gcd  ( M  x.  k )
)  =  M )  <-> 
( M  e.  NN  ->  ( M  gcd  ( M  x.  n )
)  =  M ) ) )
9 oveq2 5882 . . . . . 6  |-  ( k  =  ( n  + 
1 )  ->  ( M  x.  k )  =  ( M  x.  ( n  +  1
) ) )
109oveq2d 5890 . . . . 5  |-  ( k  =  ( n  + 
1 )  ->  ( M  gcd  ( M  x.  k ) )  =  ( M  gcd  ( M  x.  ( n  +  1 ) ) ) )
1110eqeq1d 2304 . . . 4  |-  ( k  =  ( n  + 
1 )  ->  (
( M  gcd  ( M  x.  k )
)  =  M  <->  ( M  gcd  ( M  x.  (
n  +  1 ) ) )  =  M ) )
1211imbi2d 307 . . 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 5882 . . . . . 6  |-  ( k  =  N  ->  ( M  x.  k )  =  ( M  x.  N ) )
1413oveq2d 5890 . . . . 5  |-  ( k  =  N  ->  ( M  gcd  ( M  x.  k ) )  =  ( M  gcd  ( M  x.  N )
) )
1514eqeq1d 2304 . . . 4  |-  ( k  =  N  ->  (
( M  gcd  ( M  x.  k )
)  =  M  <->  ( M  gcd  ( M  x.  N
) )  =  M ) )
1615imbi2d 307 . . 3  |-  ( k  =  N  ->  (
( M  e.  NN  ->  ( M  gcd  ( M  x.  k )
)  =  M )  <-> 
( M  e.  NN  ->  ( M  gcd  ( M  x.  N )
)  =  M ) ) )
17 nncn 9770 . . . . . 6  |-  ( M  e.  NN  ->  M  e.  CC )
1817mulid1d 8868 . . . . 5  |-  ( M  e.  NN  ->  ( M  x.  1 )  =  M )
1918oveq2d 5890 . . . 4  |-  ( M  e.  NN  ->  ( M  gcd  ( M  x.  1 ) )  =  ( M  gcd  M
) )
20 nnz 10061 . . . . . 6  |-  ( M  e.  NN  ->  M  e.  ZZ )
21 gcdid 12726 . . . . . 6  |-  ( M  e.  ZZ  ->  ( M  gcd  M )  =  ( abs `  M
) )
2220, 21syl 15 . . . . 5  |-  ( M  e.  NN  ->  ( M  gcd  M )  =  ( abs `  M
) )
23 nnre 9769 . . . . . 6  |-  ( M  e.  NN  ->  M  e.  RR )
24 nnnn0 9988 . . . . . . 7  |-  ( M  e.  NN  ->  M  e.  NN0 )
2524nn0ge0d 10037 . . . . . 6  |-  ( M  e.  NN  ->  0  <_  M )
2623, 25absidd 11921 . . . . 5  |-  ( M  e.  NN  ->  ( abs `  M )  =  M )
2722, 26eqtrd 2328 . . . 4  |-  ( M  e.  NN  ->  ( M  gcd  M )  =  M )
2819, 27eqtrd 2328 . . 3  |-  ( M  e.  NN  ->  ( M  gcd  ( M  x.  1 ) )  =  M )
2920adantr 451 . . . . . . . . 9  |-  ( ( M  e.  NN  /\  n  e.  NN )  ->  M  e.  ZZ )
30 nnz 10061 . . . . . . . . . 10  |-  ( n  e.  NN  ->  n  e.  ZZ )
31 zmulcl 10082 . . . . . . . . . 10  |-  ( ( M  e.  ZZ  /\  n  e.  ZZ )  ->  ( M  x.  n
)  e.  ZZ )
3220, 30, 31syl2an 463 . . . . . . . . 9  |-  ( ( M  e.  NN  /\  n  e.  NN )  ->  ( M  x.  n
)  e.  ZZ )
33 1z 10069 . . . . . . . . . 10  |-  1  e.  ZZ
34 gcdaddm 12724 . . . . . . . . . 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 1264 . . . . . . . . 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 642 . . . . . . . 8  |-  ( ( M  e.  NN  /\  n  e.  NN )  ->  ( M  gcd  ( M  x.  n )
)  =  ( M  gcd  ( ( M  x.  n )  +  ( 1  x.  M
) ) ) )
37 nncn 9770 . . . . . . . . . 10  |-  ( n  e.  NN  ->  n  e.  CC )
38 ax-1cn 8811 . . . . . . . . . . . 12  |-  1  e.  CC
39 adddi 8842 . . . . . . . . . . . 12  |-  ( ( M  e.  CC  /\  n  e.  CC  /\  1  e.  CC )  ->  ( M  x.  ( n  +  1 ) )  =  ( ( M  x.  n )  +  ( M  x.  1 ) ) )
4038, 39mp3an3 1266 . . . . . . . . . . 11  |-  ( ( M  e.  CC  /\  n  e.  CC )  ->  ( M  x.  (
n  +  1 ) )  =  ( ( M  x.  n )  +  ( M  x.  1 ) ) )
41 mulcom 8839 . . . . . . . . . . . . . 14  |-  ( ( M  e.  CC  /\  1  e.  CC )  ->  ( M  x.  1 )  =  ( 1  x.  M ) )
4238, 41mpan2 652 . . . . . . . . . . . . 13  |-  ( M  e.  CC  ->  ( M  x.  1 )  =  ( 1  x.  M ) )
4342adantr 451 . . . . . . . . . . . 12  |-  ( ( M  e.  CC  /\  n  e.  CC )  ->  ( M  x.  1 )  =  ( 1  x.  M ) )
4443oveq2d 5890 . . . . . . . . . . 11  |-  ( ( M  e.  CC  /\  n  e.  CC )  ->  ( ( M  x.  n )  +  ( M  x.  1 ) )  =  ( ( M  x.  n )  +  ( 1  x.  M ) ) )
4540, 44eqtrd 2328 . . . . . . . . . 10  |-  ( ( M  e.  CC  /\  n  e.  CC )  ->  ( M  x.  (
n  +  1 ) )  =  ( ( M  x.  n )  +  ( 1  x.  M ) ) )
4617, 37, 45syl2an 463 . . . . . . . . 9  |-  ( ( M  e.  NN  /\  n  e.  NN )  ->  ( M  x.  (
n  +  1 ) )  =  ( ( M  x.  n )  +  ( 1  x.  M ) ) )
4746oveq2d 5890 . . . . . . . 8  |-  ( ( M  e.  NN  /\  n  e.  NN )  ->  ( M  gcd  ( M  x.  ( n  +  1 ) ) )  =  ( M  gcd  ( ( M  x.  n )  +  ( 1  x.  M
) ) ) )
4836, 47eqtr4d 2331 . . . . . . 7  |-  ( ( M  e.  NN  /\  n  e.  NN )  ->  ( M  gcd  ( M  x.  n )
)  =  ( M  gcd  ( M  x.  ( n  +  1
) ) ) )
4948eqeq1d 2304 . . . . . 6  |-  ( ( M  e.  NN  /\  n  e.  NN )  ->  ( ( M  gcd  ( M  x.  n
) )  =  M  <-> 
( M  gcd  ( M  x.  ( n  +  1 ) ) )  =  M ) )
5049biimpd 198 . . . . 5  |-  ( ( M  e.  NN  /\  n  e.  NN )  ->  ( ( M  gcd  ( M  x.  n
) )  =  M  ->  ( M  gcd  ( M  x.  (
n  +  1 ) ) )  =  M ) )
5150expcom 424 . . . 4  |-  ( n  e.  NN  ->  ( M  e.  NN  ->  ( ( M  gcd  ( M  x.  n )
)  =  M  -> 
( M  gcd  ( M  x.  ( n  +  1 ) ) )  =  M ) ) )
5251a2d 23 . . 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 9780 . 2  |-  ( N  e.  NN  ->  ( M  e.  NN  ->  ( M  gcd  ( M  x.  N ) )  =  M ) )
5453impcom 419 1  |-  ( ( M  e.  NN  /\  N  e.  NN )  ->  ( M  gcd  ( M  x.  N )
)  =  M )
Colors of variables: wff set class
Syntax hints:    -> wi 4    /\ wa 358    = wceq 1632    e. wcel 1696   ` cfv 5271  (class class class)co 5874   CCcc 8751   1c1 8754    + caddc 8756    x. cmul 8758   NNcn 9762   ZZcz 10040   abscabs 11735    gcd cgcd 12701
This theorem is referenced by:  gcdmultiplez  12746  rpmulgcd  12750
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1536  ax-5 1547  ax-17 1606  ax-9 1644  ax-8 1661  ax-13 1698  ax-14 1700  ax-6 1715  ax-7 1720  ax-11 1727  ax-12 1878  ax-ext 2277  ax-sep 4157  ax-nul 4165  ax-pow 4204  ax-pr 4230  ax-un 4528  ax-cnex 8809  ax-resscn 8810  ax-1cn 8811  ax-icn 8812  ax-addcl 8813  ax-addrcl 8814  ax-mulcl 8815  ax-mulrcl 8816  ax-mulcom 8817  ax-addass 8818  ax-mulass 8819  ax-distr 8820  ax-i2m1 8821  ax-1ne0 8822  ax-1rid 8823  ax-rnegex 8824  ax-rrecex 8825  ax-cnre 8826  ax-pre-lttri 8827  ax-pre-lttrn 8828  ax-pre-ltadd 8829  ax-pre-mulgt0 8830  ax-pre-sup 8831
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3or 935  df-3an 936  df-tru 1310  df-ex 1532  df-nf 1535  df-sb 1639  df-eu 2160  df-mo 2161  df-clab 2283  df-cleq 2289  df-clel 2292  df-nfc 2421  df-ne 2461  df-nel 2462  df-ral 2561  df-rex 2562  df-reu 2563  df-rmo 2564  df-rab 2565  df-v 2803  df-sbc 3005  df-csb 3095  df-dif 3168  df-un 3170  df-in 3172  df-ss 3179  df-pss 3181  df-nul 3469  df-if 3579  df-pw 3640  df-sn 3659  df-pr 3660  df-tp 3661  df-op 3662  df-uni 3844  df-iun 3923  df-br 4040  df-opab 4094  df-mpt 4095  df-tr 4130  df-eprel 4321  df-id 4325  df-po 4330  df-so 4331  df-fr 4368  df-we 4370  df-ord 4411  df-on 4412  df-lim 4413  df-suc 4414  df-om 4673  df-xp 4711  df-rel 4712  df-cnv 4713  df-co 4714  df-dm 4715  df-rn 4716  df-res 4717  df-ima 4718  df-iota 5235  df-fun 5273  df-fn 5274  df-f 5275  df-f1 5276  df-fo 5277  df-f1o 5278  df-fv 5279  df-ov 5877  df-oprab 5878  df-mpt2 5879  df-2nd 6139  df-riota 6320  df-recs 6404  df-rdg 6439  df-er 6676  df-en 6880  df-dom 6881  df-sdom 6882  df-sup 7210  df-pnf 8885  df-mnf 8886  df-xr 8887  df-ltxr 8888  df-le 8889  df-sub 9055  df-neg 9056  df-div 9440  df-nn 9763  df-2 9820  df-3 9821  df-n0 9982  df-z 10041  df-uz 10247  df-rp 10371  df-seq 11063  df-exp 11121  df-cj 11600  df-re 11601  df-im 11602  df-sqr 11736  df-abs 11737  df-dvds 12548  df-gcd 12702
  Copyright terms: Public domain W3C validator