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

Theorem lcmgcdeq 15620
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 15606 . . . . . . 7 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 ∥ (𝑀 lcm 𝑁) ∧ 𝑁 ∥ (𝑀 lcm 𝑁)))
21simpld 488 . . . . . 6 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → 𝑀 ∥ (𝑀 lcm 𝑁))
32adantr 472 . . . . 5 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → 𝑀 ∥ (𝑀 lcm 𝑁))
4 gcddvds 15520 . . . . . . . 8 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑀 gcd 𝑁) ∥ 𝑀 ∧ (𝑀 gcd 𝑁) ∥ 𝑁))
54simprd 489 . . . . . . 7 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 gcd 𝑁) ∥ 𝑁)
6 breq1 4814 . . . . . . 7 ((𝑀 lcm 𝑁) = (𝑀 gcd 𝑁) → ((𝑀 lcm 𝑁) ∥ 𝑁 ↔ (𝑀 gcd 𝑁) ∥ 𝑁))
75, 6syl5ibrcom 238 . . . . . 6 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑀 lcm 𝑁) = (𝑀 gcd 𝑁) → (𝑀 lcm 𝑁) ∥ 𝑁))
87imp 395 . . . . 5 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → (𝑀 lcm 𝑁) ∥ 𝑁)
9 lcmcl 15609 . . . . . . . . . . 11 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 lcm 𝑁) ∈ ℕ0)
109nn0zd 11732 . . . . . . . . . 10 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 lcm 𝑁) ∈ ℤ)
11 dvdstr 15317 . . . . . . . . . 10 ((𝑀 ∈ ℤ ∧ (𝑀 lcm 𝑁) ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑀 ∥ (𝑀 lcm 𝑁) ∧ (𝑀 lcm 𝑁) ∥ 𝑁) → 𝑀𝑁))
1210, 11syl3an2 1203 . . . . . . . . 9 ((𝑀 ∈ ℤ ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑁 ∈ ℤ) → ((𝑀 ∥ (𝑀 lcm 𝑁) ∧ (𝑀 lcm 𝑁) ∥ 𝑁) → 𝑀𝑁))
13123com12 1153 . . . . . . . 8 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑀 ∥ (𝑀 lcm 𝑁) ∧ (𝑀 lcm 𝑁) ∥ 𝑁) → 𝑀𝑁))
14133expb 1149 . . . . . . 7 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → ((𝑀 ∥ (𝑀 lcm 𝑁) ∧ (𝑀 lcm 𝑁) ∥ 𝑁) → 𝑀𝑁))
1514anidms 562 . . . . . 6 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑀 ∥ (𝑀 lcm 𝑁) ∧ (𝑀 lcm 𝑁) ∥ 𝑁) → 𝑀𝑁))
1615adantr 472 . . . . 5 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → ((𝑀 ∥ (𝑀 lcm 𝑁) ∧ (𝑀 lcm 𝑁) ∥ 𝑁) → 𝑀𝑁))
173, 8, 16mp2and 690 . . . 4 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → 𝑀𝑁)
18 absdvdsb 15299 . . . . . 6 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀𝑁 ↔ (abs‘𝑀) ∥ 𝑁))
19 zabscl 14352 . . . . . . 7 (𝑀 ∈ ℤ → (abs‘𝑀) ∈ ℤ)
20 dvdsabsb 15300 . . . . . . 7 (((abs‘𝑀) ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((abs‘𝑀) ∥ 𝑁 ↔ (abs‘𝑀) ∥ (abs‘𝑁)))
2119, 20sylan 575 . . . . . 6 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((abs‘𝑀) ∥ 𝑁 ↔ (abs‘𝑀) ∥ (abs‘𝑁)))
2218, 21bitrd 270 . . . . 5 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀𝑁 ↔ (abs‘𝑀) ∥ (abs‘𝑁)))
2322adantr 472 . . . 4 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → (𝑀𝑁 ↔ (abs‘𝑀) ∥ (abs‘𝑁)))
2417, 23mpbid 223 . . 3 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → (abs‘𝑀) ∥ (abs‘𝑁))
251simprd 489 . . . . . 6 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → 𝑁 ∥ (𝑀 lcm 𝑁))
2625adantr 472 . . . . 5 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → 𝑁 ∥ (𝑀 lcm 𝑁))
274simpld 488 . . . . . . 7 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 gcd 𝑁) ∥ 𝑀)
28 breq1 4814 . . . . . . 7 ((𝑀 lcm 𝑁) = (𝑀 gcd 𝑁) → ((𝑀 lcm 𝑁) ∥ 𝑀 ↔ (𝑀 gcd 𝑁) ∥ 𝑀))
2927, 28syl5ibrcom 238 . . . . . 6 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑀 lcm 𝑁) = (𝑀 gcd 𝑁) → (𝑀 lcm 𝑁) ∥ 𝑀))
3029imp 395 . . . . 5 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → (𝑀 lcm 𝑁) ∥ 𝑀)
31 dvdstr 15317 . . . . . . . . . 10 ((𝑁 ∈ ℤ ∧ (𝑀 lcm 𝑁) ∈ ℤ ∧ 𝑀 ∈ ℤ) → ((𝑁 ∥ (𝑀 lcm 𝑁) ∧ (𝑀 lcm 𝑁) ∥ 𝑀) → 𝑁𝑀))
3210, 31syl3an2 1203 . . . . . . . . 9 ((𝑁 ∈ ℤ ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑀 ∈ ℤ) → ((𝑁 ∥ (𝑀 lcm 𝑁) ∧ (𝑀 lcm 𝑁) ∥ 𝑀) → 𝑁𝑀))
33323coml 1157 . . . . . . . 8 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑁 ∥ (𝑀 lcm 𝑁) ∧ (𝑀 lcm 𝑁) ∥ 𝑀) → 𝑁𝑀))
34333expb 1149 . . . . . . 7 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → ((𝑁 ∥ (𝑀 lcm 𝑁) ∧ (𝑀 lcm 𝑁) ∥ 𝑀) → 𝑁𝑀))
3534anidms 562 . . . . . 6 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑁 ∥ (𝑀 lcm 𝑁) ∧ (𝑀 lcm 𝑁) ∥ 𝑀) → 𝑁𝑀))
3635adantr 472 . . . . 5 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → ((𝑁 ∥ (𝑀 lcm 𝑁) ∧ (𝑀 lcm 𝑁) ∥ 𝑀) → 𝑁𝑀))
3726, 30, 36mp2and 690 . . . 4 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → 𝑁𝑀)
38 absdvdsb 15299 . . . . . . 7 ((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (𝑁𝑀 ↔ (abs‘𝑁) ∥ 𝑀))
39 zabscl 14352 . . . . . . . 8 (𝑁 ∈ ℤ → (abs‘𝑁) ∈ ℤ)
40 dvdsabsb 15300 . . . . . . . 8 (((abs‘𝑁) ∈ ℤ ∧ 𝑀 ∈ ℤ) → ((abs‘𝑁) ∥ 𝑀 ↔ (abs‘𝑁) ∥ (abs‘𝑀)))
4139, 40sylan 575 . . . . . . 7 ((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℤ) → ((abs‘𝑁) ∥ 𝑀 ↔ (abs‘𝑁) ∥ (abs‘𝑀)))
4238, 41bitrd 270 . . . . . 6 ((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (𝑁𝑀 ↔ (abs‘𝑁) ∥ (abs‘𝑀)))
4342ancoms 450 . . . . 5 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑁𝑀 ↔ (abs‘𝑁) ∥ (abs‘𝑀)))
4443adantr 472 . . . 4 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → (𝑁𝑀 ↔ (abs‘𝑁) ∥ (abs‘𝑀)))
4537, 44mpbid 223 . . 3 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → (abs‘𝑁) ∥ (abs‘𝑀))
46 nn0abscl 14351 . . . . . . 7 (𝑀 ∈ ℤ → (abs‘𝑀) ∈ ℕ0)
47 nn0abscl 14351 . . . . . . 7 (𝑁 ∈ ℤ → (abs‘𝑁) ∈ ℕ0)
4846, 47anim12i 606 . . . . . 6 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((abs‘𝑀) ∈ ℕ0 ∧ (abs‘𝑁) ∈ ℕ0))
49 dvdseq 15335 . . . . . 6 ((((abs‘𝑀) ∈ ℕ0 ∧ (abs‘𝑁) ∈ ℕ0) ∧ ((abs‘𝑀) ∥ (abs‘𝑁) ∧ (abs‘𝑁) ∥ (abs‘𝑀))) → (abs‘𝑀) = (abs‘𝑁))
5048, 49sylan 575 . . . . 5 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ ((abs‘𝑀) ∥ (abs‘𝑁) ∧ (abs‘𝑁) ∥ (abs‘𝑀))) → (abs‘𝑀) = (abs‘𝑁))
5150ex 401 . . . 4 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (((abs‘𝑀) ∥ (abs‘𝑁) ∧ (abs‘𝑁) ∥ (abs‘𝑀)) → (abs‘𝑀) = (abs‘𝑁)))
5251adantr 472 . . 3 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → (((abs‘𝑀) ∥ (abs‘𝑁) ∧ (abs‘𝑁) ∥ (abs‘𝑀)) → (abs‘𝑀) = (abs‘𝑁)))
5324, 45, 52mp2and 690 . 2 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → (abs‘𝑀) = (abs‘𝑁))
54 lcmid 15617 . . . . . . . 8 ((abs‘𝑀) ∈ ℤ → ((abs‘𝑀) lcm (abs‘𝑀)) = (abs‘(abs‘𝑀)))
5519, 54syl 17 . . . . . . 7 (𝑀 ∈ ℤ → ((abs‘𝑀) lcm (abs‘𝑀)) = (abs‘(abs‘𝑀)))
56 gcdid 15543 . . . . . . . 8 ((abs‘𝑀) ∈ ℤ → ((abs‘𝑀) gcd (abs‘𝑀)) = (abs‘(abs‘𝑀)))
5719, 56syl 17 . . . . . . 7 (𝑀 ∈ ℤ → ((abs‘𝑀) gcd (abs‘𝑀)) = (abs‘(abs‘𝑀)))
5855, 57eqtr4d 2802 . . . . . 6 (𝑀 ∈ ℤ → ((abs‘𝑀) lcm (abs‘𝑀)) = ((abs‘𝑀) gcd (abs‘𝑀)))
59 oveq2 6854 . . . . . . 7 ((abs‘𝑀) = (abs‘𝑁) → ((abs‘𝑀) lcm (abs‘𝑀)) = ((abs‘𝑀) lcm (abs‘𝑁)))
60 oveq2 6854 . . . . . . 7 ((abs‘𝑀) = (abs‘𝑁) → ((abs‘𝑀) gcd (abs‘𝑀)) = ((abs‘𝑀) gcd (abs‘𝑁)))
6159, 60eqeq12d 2780 . . . . . 6 ((abs‘𝑀) = (abs‘𝑁) → (((abs‘𝑀) lcm (abs‘𝑀)) = ((abs‘𝑀) gcd (abs‘𝑀)) ↔ ((abs‘𝑀) lcm (abs‘𝑁)) = ((abs‘𝑀) gcd (abs‘𝑁))))
6258, 61syl5ibcom 236 . . . . 5 (𝑀 ∈ ℤ → ((abs‘𝑀) = (abs‘𝑁) → ((abs‘𝑀) lcm (abs‘𝑁)) = ((abs‘𝑀) gcd (abs‘𝑁))))
6362imp 395 . . . 4 ((𝑀 ∈ ℤ ∧ (abs‘𝑀) = (abs‘𝑁)) → ((abs‘𝑀) lcm (abs‘𝑁)) = ((abs‘𝑀) gcd (abs‘𝑁)))
6463adantlr 706 . . 3 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (abs‘𝑀) = (abs‘𝑁)) → ((abs‘𝑀) lcm (abs‘𝑁)) = ((abs‘𝑀) gcd (abs‘𝑁)))
65 lcmabs 15613 . . . . 5 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((abs‘𝑀) lcm (abs‘𝑁)) = (𝑀 lcm 𝑁))
66 gcdabs 15545 . . . . 5 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((abs‘𝑀) gcd (abs‘𝑁)) = (𝑀 gcd 𝑁))
6765, 66eqeq12d 2780 . . . 4 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (((abs‘𝑀) lcm (abs‘𝑁)) = ((abs‘𝑀) gcd (abs‘𝑁)) ↔ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)))
6867adantr 472 . . 3 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (abs‘𝑀) = (abs‘𝑁)) → (((abs‘𝑀) lcm (abs‘𝑁)) = ((abs‘𝑀) gcd (abs‘𝑁)) ↔ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)))
6964, 68mpbid 223 . 2 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (abs‘𝑀) = (abs‘𝑁)) → (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁))
7053, 69impbida 835 1 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑀 lcm 𝑁) = (𝑀 gcd 𝑁) ↔ (abs‘𝑀) = (abs‘𝑁)))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 197  wa 384   = wceq 1652  wcel 2155   class class class wbr 4811  cfv 6070  (class class class)co 6846  0cn0 11542  cz 11628  abscabs 14273  cdvds 15279   gcd cgcd 15511   lcm clcm 15596
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1890  ax-4 1904  ax-5 2005  ax-6 2070  ax-7 2105  ax-8 2157  ax-9 2164  ax-10 2183  ax-11 2198  ax-12 2211  ax-13 2352  ax-ext 2743  ax-sep 4943  ax-nul 4951  ax-pow 5003  ax-pr 5064  ax-un 7151  ax-cnex 10249  ax-resscn 10250  ax-1cn 10251  ax-icn 10252  ax-addcl 10253  ax-addrcl 10254  ax-mulcl 10255  ax-mulrcl 10256  ax-mulcom 10257  ax-addass 10258  ax-mulass 10259  ax-distr 10260  ax-i2m1 10261  ax-1ne0 10262  ax-1rid 10263  ax-rnegex 10264  ax-rrecex 10265  ax-cnre 10266  ax-pre-lttri 10267  ax-pre-lttrn 10268  ax-pre-ltadd 10269  ax-pre-mulgt0 10270  ax-pre-sup 10271
This theorem depends on definitions:  df-bi 198  df-an 385  df-or 874  df-3or 1108  df-3an 1109  df-tru 1656  df-ex 1875  df-nf 1879  df-sb 2063  df-mo 2565  df-eu 2582  df-clab 2752  df-cleq 2758  df-clel 2761  df-nfc 2896  df-ne 2938  df-nel 3041  df-ral 3060  df-rex 3061  df-reu 3062  df-rmo 3063  df-rab 3064  df-v 3352  df-sbc 3599  df-csb 3694  df-dif 3737  df-un 3739  df-in 3741  df-ss 3748  df-pss 3750  df-nul 4082  df-if 4246  df-pw 4319  df-sn 4337  df-pr 4339  df-tp 4341  df-op 4343  df-uni 4597  df-iun 4680  df-br 4812  df-opab 4874  df-mpt 4891  df-tr 4914  df-id 5187  df-eprel 5192  df-po 5200  df-so 5201  df-fr 5238  df-we 5240  df-xp 5285  df-rel 5286  df-cnv 5287  df-co 5288  df-dm 5289  df-rn 5290  df-res 5291  df-ima 5292  df-pred 5867  df-ord 5913  df-on 5914  df-lim 5915  df-suc 5916  df-iota 6033  df-fun 6072  df-fn 6073  df-f 6074  df-f1 6075  df-fo 6076  df-f1o 6077  df-fv 6078  df-riota 6807  df-ov 6849  df-oprab 6850  df-mpt2 6851  df-om 7268  df-2nd 7371  df-wrecs 7614  df-recs 7676  df-rdg 7714  df-er 7951  df-en 8165  df-dom 8166  df-sdom 8167  df-sup 8559  df-inf 8560  df-pnf 10334  df-mnf 10335  df-xr 10336  df-ltxr 10337  df-le 10338  df-sub 10526  df-neg 10527  df-div 10943  df-nn 11279  df-2 11339  df-3 11340  df-n0 11543  df-z 11629  df-uz 11892  df-rp 12034  df-fl 12806  df-mod 12882  df-seq 13014  df-exp 13073  df-cj 14138  df-re 14139  df-im 14140  df-sqrt 14274  df-abs 14275  df-dvds 15280  df-gcd 15512  df-lcm 15598
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator