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

Theorem lcmgcd 11605
Description: The product of two numbers' least common multiple and greatest common divisor is the absolute value of the product of the two numbers. In particular, that absolute value is the least common multiple of two coprime numbers, for which  ( M  gcd  N
)  =  1.

Multiple methods exist for proving this, and it is often proven either as a consequence of the fundamental theorem of arithmetic or of Bézout's identity bezout 11545; see e.g. https://proofwiki.org/wiki/Product_of_GCD_and_LCM 11545 and https://math.stackexchange.com/a/470827 11545. This proof uses the latter to first confirm it for positive integers  M and 
N (the "Second Proof" in the above Stack Exchange page), then shows that implies it for all nonzero integer inputs, then finally uses lcm0val 11592 to show it applies when either or both inputs are zero. (Contributed by Steve Rodriguez, 20-Jan-2020.)

Assertion
Ref Expression
lcmgcd  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( M lcm  N
)  x.  ( M  gcd  N ) )  =  ( abs `  ( M  x.  N )
) )

Proof of Theorem lcmgcd
StepHypRef Expression
1 gcdcl 11503 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  N
)  e.  NN0 )
21nn0cnd 8936 . . . . . . 7  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  N
)  e.  CC )
32mul02d 8073 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( 0  x.  ( M  gcd  N ) )  =  0 )
4 0z 8969 . . . . . . . . . 10  |-  0  e.  ZZ
5 lcmcom 11591 . . . . . . . . . 10  |-  ( ( N  e.  ZZ  /\  0  e.  ZZ )  ->  ( N lcm  0 )  =  ( 0 lcm  N
) )
64, 5mpan2 419 . . . . . . . . 9  |-  ( N  e.  ZZ  ->  ( N lcm  0 )  =  ( 0 lcm  N ) )
7 lcm0val 11592 . . . . . . . . 9  |-  ( N  e.  ZZ  ->  ( N lcm  0 )  =  0 )
86, 7eqtr3d 2149 . . . . . . . 8  |-  ( N  e.  ZZ  ->  (
0 lcm  N )  =  0 )
98adantl 273 . . . . . . 7  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( 0 lcm  N )  =  0 )
109oveq1d 5743 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( 0 lcm  N
)  x.  ( M  gcd  N ) )  =  ( 0  x.  ( M  gcd  N
) ) )
11 zcn 8963 . . . . . . . . 9  |-  ( N  e.  ZZ  ->  N  e.  CC )
1211adantl 273 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  N  e.  CC )
1312mul02d 8073 . . . . . . 7  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( 0  x.  N
)  =  0 )
1413abs00bd 10730 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( abs `  (
0  x.  N ) )  =  0 )
153, 10, 143eqtr4d 2157 . . . . 5  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( 0 lcm  N
)  x.  ( M  gcd  N ) )  =  ( abs `  (
0  x.  N ) ) )
1615adantr 272 . . . 4  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  M  =  0 )  ->  ( (
0 lcm  N )  x.  ( M  gcd  N
) )  =  ( abs `  ( 0  x.  N ) ) )
17 simpr 109 . . . . . 6  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  M  =  0 )  ->  M  = 
0 )
1817oveq1d 5743 . . . . 5  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  M  =  0 )  ->  ( M lcm  N )  =  ( 0 lcm 
N ) )
1918oveq1d 5743 . . . 4  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  M  =  0 )  ->  ( ( M lcm  N )  x.  ( M  gcd  N ) )  =  ( ( 0 lcm 
N )  x.  ( M  gcd  N ) ) )
2017oveq1d 5743 . . . . 5  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  M  =  0 )  ->  ( M  x.  N )  =  ( 0  x.  N ) )
2120fveq2d 5379 . . . 4  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  M  =  0 )  ->  ( abs `  ( M  x.  N
) )  =  ( abs `  ( 0  x.  N ) ) )
2216, 19, 213eqtr4d 2157 . . 3  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  M  =  0 )  ->  ( ( M lcm  N )  x.  ( M  gcd  N ) )  =  ( abs `  ( M  x.  N )
) )
23 lcm0val 11592 . . . . . . . 8  |-  ( M  e.  ZZ  ->  ( M lcm  0 )  =  0 )
2423adantr 272 . . . . . . 7  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M lcm  0 )  =  0 )
2524oveq1d 5743 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( M lcm  0
)  x.  ( M  gcd  N ) )  =  ( 0  x.  ( M  gcd  N
) ) )
26 zcn 8963 . . . . . . . . 9  |-  ( M  e.  ZZ  ->  M  e.  CC )
2726adantr 272 . . . . . . . 8  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  M  e.  CC )
2827mul01d 8074 . . . . . . 7  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  x.  0 )  =  0 )
2928abs00bd 10730 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( abs `  ( M  x.  0 ) )  =  0 )
303, 25, 293eqtr4d 2157 . . . . 5  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( M lcm  0
)  x.  ( M  gcd  N ) )  =  ( abs `  ( M  x.  0 ) ) )
3130adantr 272 . . . 4  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  N  =  0 )  ->  ( ( M lcm  0 )  x.  ( M  gcd  N ) )  =  ( abs `  ( M  x.  0 ) ) )
32 simpr 109 . . . . . 6  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  N  =  0 )  ->  N  = 
0 )
3332oveq2d 5744 . . . . 5  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  N  =  0 )  ->  ( M lcm  N )  =  ( M lcm  0 ) )
3433oveq1d 5743 . . . 4  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  N  =  0 )  ->  ( ( M lcm  N )  x.  ( M  gcd  N ) )  =  ( ( M lcm  0 )  x.  ( M  gcd  N ) ) )
3532oveq2d 5744 . . . . 5  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  N  =  0 )  ->  ( M  x.  N )  =  ( M  x.  0 ) )
3635fveq2d 5379 . . . 4  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  N  =  0 )  ->  ( abs `  ( M  x.  N
) )  =  ( abs `  ( M  x.  0 ) ) )
3731, 34, 363eqtr4d 2157 . . 3  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  N  =  0 )  ->  ( ( M lcm  N )  x.  ( M  gcd  N ) )  =  ( abs `  ( M  x.  N )
) )
3822, 37jaodan 769 . 2  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =  0  \/  N  =  0 ) )  -> 
( ( M lcm  N
)  x.  ( M  gcd  N ) )  =  ( abs `  ( M  x.  N )
) )
39 neanior 2369 . . . . 5  |-  ( ( M  =/=  0  /\  N  =/=  0 )  <->  -.  ( M  =  0  \/  N  =  0 ) )
40 nnabscl 10764 . . . . . . 7  |-  ( ( M  e.  ZZ  /\  M  =/=  0 )  -> 
( abs `  M
)  e.  NN )
41 nnabscl 10764 . . . . . . 7  |-  ( ( N  e.  ZZ  /\  N  =/=  0 )  -> 
( abs `  N
)  e.  NN )
4240, 41anim12i 334 . . . . . 6  |-  ( ( ( M  e.  ZZ  /\  M  =/=  0 )  /\  ( N  e.  ZZ  /\  N  =/=  0 ) )  -> 
( ( abs `  M
)  e.  NN  /\  ( abs `  N )  e.  NN ) )
4342an4s 560 . . . . 5  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  ( M  =/=  0  /\  N  =/=  0 ) )  -> 
( ( abs `  M
)  e.  NN  /\  ( abs `  N )  e.  NN ) )
4439, 43sylan2br 284 . . . 4  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  \/  N  =  0 ) )  ->  ( ( abs `  M )  e.  NN  /\  ( abs `  N
)  e.  NN ) )
45 lcmgcdlem 11604 . . . . 5  |-  ( ( ( abs `  M
)  e.  NN  /\  ( abs `  N )  e.  NN )  -> 
( ( ( ( abs `  M ) lcm  ( abs `  N
) )  x.  (
( abs `  M
)  gcd  ( abs `  N ) ) )  =  ( abs `  (
( abs `  M
)  x.  ( abs `  N ) ) )  /\  ( ( 0  e.  NN  /\  (
( abs `  M
)  ||  0  /\  ( abs `  N ) 
||  0 ) )  ->  ( ( abs `  M ) lcm  ( abs `  N ) )  ||  0 ) ) )
4645simpld 111 . . . 4  |-  ( ( ( abs `  M
)  e.  NN  /\  ( abs `  N )  e.  NN )  -> 
( ( ( abs `  M ) lcm  ( abs `  N ) )  x.  ( ( abs `  M
)  gcd  ( abs `  N ) ) )  =  ( abs `  (
( abs `  M
)  x.  ( abs `  N ) ) ) )
4744, 46syl 14 . . 3  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  \/  N  =  0 ) )  ->  ( ( ( abs `  M ) lcm  ( abs `  N
) )  x.  (
( abs `  M
)  gcd  ( abs `  N ) ) )  =  ( abs `  (
( abs `  M
)  x.  ( abs `  N ) ) ) )
48 lcmabs 11603 . . . . 5  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( abs `  M
) lcm  ( abs `  N
) )  =  ( M lcm  N ) )
49 gcdabs 11524 . . . . 5  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( abs `  M
)  gcd  ( abs `  N ) )  =  ( M  gcd  N
) )
5048, 49oveq12d 5746 . . . 4  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( ( abs `  M ) lcm  ( abs `  N ) )  x.  ( ( abs `  M
)  gcd  ( abs `  N ) ) )  =  ( ( M lcm 
N )  x.  ( M  gcd  N ) ) )
5150adantr 272 . . 3  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  \/  N  =  0 ) )  ->  ( ( ( abs `  M ) lcm  ( abs `  N
) )  x.  (
( abs `  M
)  gcd  ( abs `  N ) ) )  =  ( ( M lcm 
N )  x.  ( M  gcd  N ) ) )
52 absidm 10762 . . . . . . 7  |-  ( M  e.  CC  ->  ( abs `  ( abs `  M
) )  =  ( abs `  M ) )
53 absidm 10762 . . . . . . 7  |-  ( N  e.  CC  ->  ( abs `  ( abs `  N
) )  =  ( abs `  N ) )
5452, 53oveqan12d 5747 . . . . . 6  |-  ( ( M  e.  CC  /\  N  e.  CC )  ->  ( ( abs `  ( abs `  M ) )  x.  ( abs `  ( abs `  N ) ) )  =  ( ( abs `  M )  x.  ( abs `  N
) ) )
5526, 11, 54syl2an 285 . . . . 5  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( abs `  ( abs `  M ) )  x.  ( abs `  ( abs `  N ) ) )  =  ( ( abs `  M )  x.  ( abs `  N
) ) )
56 nn0abscl 10749 . . . . . . . 8  |-  ( M  e.  ZZ  ->  ( abs `  M )  e. 
NN0 )
5756nn0cnd 8936 . . . . . . 7  |-  ( M  e.  ZZ  ->  ( abs `  M )  e.  CC )
5857adantr 272 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( abs `  M
)  e.  CC )
59 nn0abscl 10749 . . . . . . . 8  |-  ( N  e.  ZZ  ->  ( abs `  N )  e. 
NN0 )
6059nn0cnd 8936 . . . . . . 7  |-  ( N  e.  ZZ  ->  ( abs `  N )  e.  CC )
6160adantl 273 . . . . . 6  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( abs `  N
)  e.  CC )
6258, 61absmuld 10858 . . . . 5  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( abs `  (
( abs `  M
)  x.  ( abs `  N ) ) )  =  ( ( abs `  ( abs `  M
) )  x.  ( abs `  ( abs `  N
) ) ) )
6327, 12absmuld 10858 . . . . 5  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( abs `  ( M  x.  N )
)  =  ( ( abs `  M )  x.  ( abs `  N
) ) )
6455, 62, 633eqtr4d 2157 . . . 4  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( abs `  (
( abs `  M
)  x.  ( abs `  N ) ) )  =  ( abs `  ( M  x.  N )
) )
6564adantr 272 . . 3  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  \/  N  =  0 ) )  ->  ( abs `  (
( abs `  M
)  x.  ( abs `  N ) ) )  =  ( abs `  ( M  x.  N )
) )
6647, 51, 653eqtr3d 2155 . 2  |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  \/  N  =  0 ) )  ->  ( ( M lcm 
N )  x.  ( M  gcd  N ) )  =  ( abs `  ( M  x.  N )
) )
67 lcmmndc 11589 . . 3  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  -> DECID  ( M  =  0  \/  N  =  0 ) )
68 exmiddc 804 . . 3  |-  (DECID  ( M  =  0  \/  N  =  0 )  -> 
( ( M  =  0  \/  N  =  0 )  \/  -.  ( M  =  0  \/  N  =  0
) ) )
6967, 68syl 14 . 2  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( M  =  0  \/  N  =  0 )  \/  -.  ( M  =  0  \/  N  =  0
) ) )
7038, 66, 69mpjaodan 770 1  |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( M lcm  N
)  x.  ( M  gcd  N ) )  =  ( abs `  ( M  x.  N )
) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    /\ wa 103    \/ wo 680  DECID wdc 802    = wceq 1314    e. wcel 1463    =/= wne 2282   class class class wbr 3895   ` cfv 5081  (class class class)co 5728   CCcc 7545   0cc0 7547    x. cmul 7552   NNcn 8630   ZZcz 8958   abscabs 10661    || cdvds 11341    gcd cgcd 11483   lcm clcm 11587
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-mp 7  ax-ia1 105  ax-ia2 106  ax-ia3 107  ax-in1 586  ax-in2 587  ax-io 681  ax-5 1406  ax-7 1407  ax-gen 1408  ax-ie1 1452  ax-ie2 1453  ax-8 1465  ax-10 1466  ax-11 1467  ax-i12 1468  ax-bndl 1469  ax-4 1470  ax-13 1474  ax-14 1475  ax-17 1489  ax-i9 1493  ax-ial 1497  ax-i5r 1498  ax-ext 2097  ax-coll 4003  ax-sep 4006  ax-nul 4014  ax-pow 4058  ax-pr 4091  ax-un 4315  ax-setind 4412  ax-iinf 4462  ax-cnex 7636  ax-resscn 7637  ax-1cn 7638  ax-1re 7639  ax-icn 7640  ax-addcl 7641  ax-addrcl 7642  ax-mulcl 7643  ax-mulrcl 7644  ax-addcom 7645  ax-mulcom 7646  ax-addass 7647  ax-mulass 7648  ax-distr 7649  ax-i2m1 7650  ax-0lt1 7651  ax-1rid 7652  ax-0id 7653  ax-rnegex 7654  ax-precex 7655  ax-cnre 7656  ax-pre-ltirr 7657  ax-pre-ltwlin 7658  ax-pre-lttrn 7659  ax-pre-apti 7660  ax-pre-ltadd 7661  ax-pre-mulgt0 7662  ax-pre-mulext 7663  ax-arch 7664  ax-caucvg 7665
This theorem depends on definitions:  df-bi 116  df-dc 803  df-3or 946  df-3an 947  df-tru 1317  df-fal 1320  df-nf 1420  df-sb 1719  df-eu 1978  df-mo 1979  df-clab 2102  df-cleq 2108  df-clel 2111  df-nfc 2244  df-ne 2283  df-nel 2378  df-ral 2395  df-rex 2396  df-reu 2397  df-rmo 2398  df-rab 2399  df-v 2659  df-sbc 2879  df-csb 2972  df-dif 3039  df-un 3041  df-in 3043  df-ss 3050  df-nul 3330  df-if 3441  df-pw 3478  df-sn 3499  df-pr 3500  df-op 3502  df-uni 3703  df-int 3738  df-iun 3781  df-br 3896  df-opab 3950  df-mpt 3951  df-tr 3987  df-id 4175  df-po 4178  df-iso 4179  df-iord 4248  df-on 4250  df-ilim 4251  df-suc 4253  df-iom 4465  df-xp 4505  df-rel 4506  df-cnv 4507  df-co 4508  df-dm 4509  df-rn 4510  df-res 4511  df-ima 4512  df-iota 5046  df-fun 5083  df-fn 5084  df-f 5085  df-f1 5086  df-fo 5087  df-f1o 5088  df-fv 5089  df-isom 5090  df-riota 5684  df-ov 5731  df-oprab 5732  df-mpo 5733  df-1st 5992  df-2nd 5993  df-recs 6156  df-frec 6242  df-sup 6823  df-inf 6824  df-pnf 7726  df-mnf 7727  df-xr 7728  df-ltxr 7729  df-le 7730  df-sub 7858  df-neg 7859  df-reap 8255  df-ap 8262  df-div 8346  df-inn 8631  df-2 8689  df-3 8690  df-4 8691  df-n0 8882  df-z 8959  df-uz 9229  df-q 9314  df-rp 9344  df-fz 9684  df-fzo 9813  df-fl 9936  df-mod 9989  df-seqfrec 10112  df-exp 10186  df-cj 10507  df-re 10508  df-im 10509  df-rsqrt 10662  df-abs 10663  df-dvds 11342  df-gcd 11484  df-lcm 11588
This theorem is referenced by:  lcmid  11607  lcm1  11608  lcmgcdnn  11609
  Copyright terms: Public domain W3C validator