MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  lcmgcdeq Structured version   Visualization version   GIF version

Theorem lcmgcdeq 15319
Description: Two integers' absolute values are equal iff their least common multiple and greatest common divisor are equal. (Contributed by Steve Rodriguez, 20-Jan-2020.)
Assertion
Ref Expression
lcmgcdeq ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑀 lcm 𝑁) = (𝑀 gcd 𝑁) ↔ (abs‘𝑀) = (abs‘𝑁)))

Proof of Theorem lcmgcdeq
StepHypRef Expression
1 dvdslcm 15305 . . . . . . 7 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 ∥ (𝑀 lcm 𝑁) ∧ 𝑁 ∥ (𝑀 lcm 𝑁)))
21simpld 475 . . . . . 6 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → 𝑀 ∥ (𝑀 lcm 𝑁))
32adantr 481 . . . . 5 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → 𝑀 ∥ (𝑀 lcm 𝑁))
4 gcddvds 15219 . . . . . . . 8 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑀 gcd 𝑁) ∥ 𝑀 ∧ (𝑀 gcd 𝑁) ∥ 𝑁))
54simprd 479 . . . . . . 7 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 gcd 𝑁) ∥ 𝑁)
6 breq1 4654 . . . . . . 7 ((𝑀 lcm 𝑁) = (𝑀 gcd 𝑁) → ((𝑀 lcm 𝑁) ∥ 𝑁 ↔ (𝑀 gcd 𝑁) ∥ 𝑁))
75, 6syl5ibrcom 237 . . . . . 6 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑀 lcm 𝑁) = (𝑀 gcd 𝑁) → (𝑀 lcm 𝑁) ∥ 𝑁))
87imp 445 . . . . 5 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → (𝑀 lcm 𝑁) ∥ 𝑁)
9 lcmcl 15308 . . . . . . . . . . 11 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 lcm 𝑁) ∈ ℕ0)
109nn0zd 11477 . . . . . . . . . 10 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 lcm 𝑁) ∈ ℤ)
11 dvdstr 15012 . . . . . . . . . 10 ((𝑀 ∈ ℤ ∧ (𝑀 lcm 𝑁) ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑀 ∥ (𝑀 lcm 𝑁) ∧ (𝑀 lcm 𝑁) ∥ 𝑁) → 𝑀𝑁))
1210, 11syl3an2 1359 . . . . . . . . 9 ((𝑀 ∈ ℤ ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑁 ∈ ℤ) → ((𝑀 ∥ (𝑀 lcm 𝑁) ∧ (𝑀 lcm 𝑁) ∥ 𝑁) → 𝑀𝑁))
13123com12 1268 . . . . . . . 8 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑀 ∥ (𝑀 lcm 𝑁) ∧ (𝑀 lcm 𝑁) ∥ 𝑁) → 𝑀𝑁))
14133expb 1265 . . . . . . 7 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → ((𝑀 ∥ (𝑀 lcm 𝑁) ∧ (𝑀 lcm 𝑁) ∥ 𝑁) → 𝑀𝑁))
1514anidms 677 . . . . . 6 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑀 ∥ (𝑀 lcm 𝑁) ∧ (𝑀 lcm 𝑁) ∥ 𝑁) → 𝑀𝑁))
1615adantr 481 . . . . 5 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → ((𝑀 ∥ (𝑀 lcm 𝑁) ∧ (𝑀 lcm 𝑁) ∥ 𝑁) → 𝑀𝑁))
173, 8, 16mp2and 715 . . . 4 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → 𝑀𝑁)
18 absdvdsb 14994 . . . . . 6 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀𝑁 ↔ (abs‘𝑀) ∥ 𝑁))
19 zabscl 14047 . . . . . . 7 (𝑀 ∈ ℤ → (abs‘𝑀) ∈ ℤ)
20 dvdsabsb 14995 . . . . . . 7 (((abs‘𝑀) ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((abs‘𝑀) ∥ 𝑁 ↔ (abs‘𝑀) ∥ (abs‘𝑁)))
2119, 20sylan 488 . . . . . 6 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((abs‘𝑀) ∥ 𝑁 ↔ (abs‘𝑀) ∥ (abs‘𝑁)))
2218, 21bitrd 268 . . . . 5 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀𝑁 ↔ (abs‘𝑀) ∥ (abs‘𝑁)))
2322adantr 481 . . . 4 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → (𝑀𝑁 ↔ (abs‘𝑀) ∥ (abs‘𝑁)))
2417, 23mpbid 222 . . 3 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → (abs‘𝑀) ∥ (abs‘𝑁))
251simprd 479 . . . . . 6 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → 𝑁 ∥ (𝑀 lcm 𝑁))
2625adantr 481 . . . . 5 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → 𝑁 ∥ (𝑀 lcm 𝑁))
274simpld 475 . . . . . . 7 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 gcd 𝑁) ∥ 𝑀)
28 breq1 4654 . . . . . . 7 ((𝑀 lcm 𝑁) = (𝑀 gcd 𝑁) → ((𝑀 lcm 𝑁) ∥ 𝑀 ↔ (𝑀 gcd 𝑁) ∥ 𝑀))
2927, 28syl5ibrcom 237 . . . . . 6 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑀 lcm 𝑁) = (𝑀 gcd 𝑁) → (𝑀 lcm 𝑁) ∥ 𝑀))
3029imp 445 . . . . 5 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → (𝑀 lcm 𝑁) ∥ 𝑀)
31 dvdstr 15012 . . . . . . . . . 10 ((𝑁 ∈ ℤ ∧ (𝑀 lcm 𝑁) ∈ ℤ ∧ 𝑀 ∈ ℤ) → ((𝑁 ∥ (𝑀 lcm 𝑁) ∧ (𝑀 lcm 𝑁) ∥ 𝑀) → 𝑁𝑀))
3210, 31syl3an2 1359 . . . . . . . . 9 ((𝑁 ∈ ℤ ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑀 ∈ ℤ) → ((𝑁 ∥ (𝑀 lcm 𝑁) ∧ (𝑀 lcm 𝑁) ∥ 𝑀) → 𝑁𝑀))
33323coml 1271 . . . . . . . 8 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑁 ∥ (𝑀 lcm 𝑁) ∧ (𝑀 lcm 𝑁) ∥ 𝑀) → 𝑁𝑀))
34333expb 1265 . . . . . . 7 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → ((𝑁 ∥ (𝑀 lcm 𝑁) ∧ (𝑀 lcm 𝑁) ∥ 𝑀) → 𝑁𝑀))
3534anidms 677 . . . . . 6 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑁 ∥ (𝑀 lcm 𝑁) ∧ (𝑀 lcm 𝑁) ∥ 𝑀) → 𝑁𝑀))
3635adantr 481 . . . . 5 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → ((𝑁 ∥ (𝑀 lcm 𝑁) ∧ (𝑀 lcm 𝑁) ∥ 𝑀) → 𝑁𝑀))
3726, 30, 36mp2and 715 . . . 4 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → 𝑁𝑀)
38 absdvdsb 14994 . . . . . . 7 ((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (𝑁𝑀 ↔ (abs‘𝑁) ∥ 𝑀))
39 zabscl 14047 . . . . . . . 8 (𝑁 ∈ ℤ → (abs‘𝑁) ∈ ℤ)
40 dvdsabsb 14995 . . . . . . . 8 (((abs‘𝑁) ∈ ℤ ∧ 𝑀 ∈ ℤ) → ((abs‘𝑁) ∥ 𝑀 ↔ (abs‘𝑁) ∥ (abs‘𝑀)))
4139, 40sylan 488 . . . . . . 7 ((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℤ) → ((abs‘𝑁) ∥ 𝑀 ↔ (abs‘𝑁) ∥ (abs‘𝑀)))
4238, 41bitrd 268 . . . . . 6 ((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (𝑁𝑀 ↔ (abs‘𝑁) ∥ (abs‘𝑀)))
4342ancoms 469 . . . . 5 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑁𝑀 ↔ (abs‘𝑁) ∥ (abs‘𝑀)))
4443adantr 481 . . . 4 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → (𝑁𝑀 ↔ (abs‘𝑁) ∥ (abs‘𝑀)))
4537, 44mpbid 222 . . 3 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → (abs‘𝑁) ∥ (abs‘𝑀))
46 nn0abscl 14046 . . . . . . 7 (𝑀 ∈ ℤ → (abs‘𝑀) ∈ ℕ0)
47 nn0abscl 14046 . . . . . . 7 (𝑁 ∈ ℤ → (abs‘𝑁) ∈ ℕ0)
4846, 47anim12i 590 . . . . . 6 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((abs‘𝑀) ∈ ℕ0 ∧ (abs‘𝑁) ∈ ℕ0))
49 dvdseq 15030 . . . . . 6 ((((abs‘𝑀) ∈ ℕ0 ∧ (abs‘𝑁) ∈ ℕ0) ∧ ((abs‘𝑀) ∥ (abs‘𝑁) ∧ (abs‘𝑁) ∥ (abs‘𝑀))) → (abs‘𝑀) = (abs‘𝑁))
5048, 49sylan 488 . . . . 5 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ ((abs‘𝑀) ∥ (abs‘𝑁) ∧ (abs‘𝑁) ∥ (abs‘𝑀))) → (abs‘𝑀) = (abs‘𝑁))
5150ex 450 . . . 4 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (((abs‘𝑀) ∥ (abs‘𝑁) ∧ (abs‘𝑁) ∥ (abs‘𝑀)) → (abs‘𝑀) = (abs‘𝑁)))
5251adantr 481 . . 3 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → (((abs‘𝑀) ∥ (abs‘𝑁) ∧ (abs‘𝑁) ∥ (abs‘𝑀)) → (abs‘𝑀) = (abs‘𝑁)))
5324, 45, 52mp2and 715 . 2 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → (abs‘𝑀) = (abs‘𝑁))
54 lcmid 15316 . . . . . . . 8 ((abs‘𝑀) ∈ ℤ → ((abs‘𝑀) lcm (abs‘𝑀)) = (abs‘(abs‘𝑀)))
5519, 54syl 17 . . . . . . 7 (𝑀 ∈ ℤ → ((abs‘𝑀) lcm (abs‘𝑀)) = (abs‘(abs‘𝑀)))
56 gcdid 15242 . . . . . . . 8 ((abs‘𝑀) ∈ ℤ → ((abs‘𝑀) gcd (abs‘𝑀)) = (abs‘(abs‘𝑀)))
5719, 56syl 17 . . . . . . 7 (𝑀 ∈ ℤ → ((abs‘𝑀) gcd (abs‘𝑀)) = (abs‘(abs‘𝑀)))
5855, 57eqtr4d 2658 . . . . . 6 (𝑀 ∈ ℤ → ((abs‘𝑀) lcm (abs‘𝑀)) = ((abs‘𝑀) gcd (abs‘𝑀)))
59 oveq2 6655 . . . . . . 7 ((abs‘𝑀) = (abs‘𝑁) → ((abs‘𝑀) lcm (abs‘𝑀)) = ((abs‘𝑀) lcm (abs‘𝑁)))
60 oveq2 6655 . . . . . . 7 ((abs‘𝑀) = (abs‘𝑁) → ((abs‘𝑀) gcd (abs‘𝑀)) = ((abs‘𝑀) gcd (abs‘𝑁)))
6159, 60eqeq12d 2636 . . . . . 6 ((abs‘𝑀) = (abs‘𝑁) → (((abs‘𝑀) lcm (abs‘𝑀)) = ((abs‘𝑀) gcd (abs‘𝑀)) ↔ ((abs‘𝑀) lcm (abs‘𝑁)) = ((abs‘𝑀) gcd (abs‘𝑁))))
6258, 61syl5ibcom 235 . . . . 5 (𝑀 ∈ ℤ → ((abs‘𝑀) = (abs‘𝑁) → ((abs‘𝑀) lcm (abs‘𝑁)) = ((abs‘𝑀) gcd (abs‘𝑁))))
6362imp 445 . . . 4 ((𝑀 ∈ ℤ ∧ (abs‘𝑀) = (abs‘𝑁)) → ((abs‘𝑀) lcm (abs‘𝑁)) = ((abs‘𝑀) gcd (abs‘𝑁)))
6463adantlr 751 . . 3 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (abs‘𝑀) = (abs‘𝑁)) → ((abs‘𝑀) lcm (abs‘𝑁)) = ((abs‘𝑀) gcd (abs‘𝑁)))
65 lcmabs 15312 . . . . 5 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((abs‘𝑀) lcm (abs‘𝑁)) = (𝑀 lcm 𝑁))
66 gcdabs 15244 . . . . 5 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((abs‘𝑀) gcd (abs‘𝑁)) = (𝑀 gcd 𝑁))
6765, 66eqeq12d 2636 . . . 4 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (((abs‘𝑀) lcm (abs‘𝑁)) = ((abs‘𝑀) gcd (abs‘𝑁)) ↔ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)))
6867adantr 481 . . 3 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (abs‘𝑀) = (abs‘𝑁)) → (((abs‘𝑀) lcm (abs‘𝑁)) = ((abs‘𝑀) gcd (abs‘𝑁)) ↔ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)))
6964, 68mpbid 222 . 2 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (abs‘𝑀) = (abs‘𝑁)) → (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁))
7053, 69impbida 877 1 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑀 lcm 𝑁) = (𝑀 gcd 𝑁) ↔ (abs‘𝑀) = (abs‘𝑁)))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 196  wa 384   = wceq 1482  wcel 1989   class class class wbr 4651  cfv 5886  (class class class)co 6647  0cn0 11289  cz 11374  abscabs 13968  cdvds 14977   gcd cgcd 15210   lcm clcm 15295
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1721  ax-4 1736  ax-5 1838  ax-6 1887  ax-7 1934  ax-8 1991  ax-9 1998  ax-10 2018  ax-11 2033  ax-12 2046  ax-13 2245  ax-ext 2601  ax-sep 4779  ax-nul 4787  ax-pow 4841  ax-pr 4904  ax-un 6946  ax-cnex 9989  ax-resscn 9990  ax-1cn 9991  ax-icn 9992  ax-addcl 9993  ax-addrcl 9994  ax-mulcl 9995  ax-mulrcl 9996  ax-mulcom 9997  ax-addass 9998  ax-mulass 9999  ax-distr 10000  ax-i2m1 10001  ax-1ne0 10002  ax-1rid 10003  ax-rnegex 10004  ax-rrecex 10005  ax-cnre 10006  ax-pre-lttri 10007  ax-pre-lttrn 10008  ax-pre-ltadd 10009  ax-pre-mulgt0 10010  ax-pre-sup 10011
This theorem depends on definitions:  df-bi 197  df-or 385  df-an 386  df-3or 1038  df-3an 1039  df-tru 1485  df-ex 1704  df-nf 1709  df-sb 1880  df-eu 2473  df-mo 2474  df-clab 2608  df-cleq 2614  df-clel 2617  df-nfc 2752  df-ne 2794  df-nel 2897  df-ral 2916  df-rex 2917  df-reu 2918  df-rmo 2919  df-rab 2920  df-v 3200  df-sbc 3434  df-csb 3532  df-dif 3575  df-un 3577  df-in 3579  df-ss 3586  df-pss 3588  df-nul 3914  df-if 4085  df-pw 4158  df-sn 4176  df-pr 4178  df-tp 4180  df-op 4182  df-uni 4435  df-iun 4520  df-br 4652  df-opab 4711  df-mpt 4728  df-tr 4751  df-id 5022  df-eprel 5027  df-po 5033  df-so 5034  df-fr 5071  df-we 5073  df-xp 5118  df-rel 5119  df-cnv 5120  df-co 5121  df-dm 5122  df-rn 5123  df-res 5124  df-ima 5125  df-pred 5678  df-ord 5724  df-on 5725  df-lim 5726  df-suc 5727  df-iota 5849  df-fun 5888  df-fn 5889  df-f 5890  df-f1 5891  df-fo 5892  df-f1o 5893  df-fv 5894  df-riota 6608  df-ov 6650  df-oprab 6651  df-mpt2 6652  df-om 7063  df-2nd 7166  df-wrecs 7404  df-recs 7465  df-rdg 7503  df-er 7739  df-en 7953  df-dom 7954  df-sdom 7955  df-sup 8345  df-inf 8346  df-pnf 10073  df-mnf 10074  df-xr 10075  df-ltxr 10076  df-le 10077  df-sub 10265  df-neg 10266  df-div 10682  df-nn 11018  df-2 11076  df-3 11077  df-n0 11290  df-z 11375  df-uz 11685  df-rp 11830  df-fl 12588  df-mod 12664  df-seq 12797  df-exp 12856  df-cj 13833  df-re 13834  df-im 13835  df-sqrt 13969  df-abs 13970  df-dvds 14978  df-gcd 15211  df-lcm 15297
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator