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

Theorem lcmgcdeq 16201
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 16187 . . . . . . 7 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 ∥ (𝑀 lcm 𝑁) ∧ 𝑁 ∥ (𝑀 lcm 𝑁)))
21simpld 498 . . . . . 6 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → 𝑀 ∥ (𝑀 lcm 𝑁))
32adantr 484 . . . . 5 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → 𝑀 ∥ (𝑀 lcm 𝑁))
4 gcddvds 16094 . . . . . . . 8 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑀 gcd 𝑁) ∥ 𝑀 ∧ (𝑀 gcd 𝑁) ∥ 𝑁))
54simprd 499 . . . . . . 7 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 gcd 𝑁) ∥ 𝑁)
6 breq1 5072 . . . . . . 7 ((𝑀 lcm 𝑁) = (𝑀 gcd 𝑁) → ((𝑀 lcm 𝑁) ∥ 𝑁 ↔ (𝑀 gcd 𝑁) ∥ 𝑁))
75, 6syl5ibrcom 250 . . . . . 6 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑀 lcm 𝑁) = (𝑀 gcd 𝑁) → (𝑀 lcm 𝑁) ∥ 𝑁))
87imp 410 . . . . 5 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → (𝑀 lcm 𝑁) ∥ 𝑁)
9 lcmcl 16190 . . . . . . . . . . 11 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 lcm 𝑁) ∈ ℕ0)
109nn0zd 12309 . . . . . . . . . 10 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 lcm 𝑁) ∈ ℤ)
11 dvdstr 15887 . . . . . . . . . 10 ((𝑀 ∈ ℤ ∧ (𝑀 lcm 𝑁) ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑀 ∥ (𝑀 lcm 𝑁) ∧ (𝑀 lcm 𝑁) ∥ 𝑁) → 𝑀𝑁))
1210, 11syl3an2 1166 . . . . . . . . 9 ((𝑀 ∈ ℤ ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑁 ∈ ℤ) → ((𝑀 ∥ (𝑀 lcm 𝑁) ∧ (𝑀 lcm 𝑁) ∥ 𝑁) → 𝑀𝑁))
13123com12 1125 . . . . . . . 8 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑀 ∥ (𝑀 lcm 𝑁) ∧ (𝑀 lcm 𝑁) ∥ 𝑁) → 𝑀𝑁))
14133expb 1122 . . . . . . 7 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → ((𝑀 ∥ (𝑀 lcm 𝑁) ∧ (𝑀 lcm 𝑁) ∥ 𝑁) → 𝑀𝑁))
1514anidms 570 . . . . . 6 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑀 ∥ (𝑀 lcm 𝑁) ∧ (𝑀 lcm 𝑁) ∥ 𝑁) → 𝑀𝑁))
1615adantr 484 . . . . 5 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → ((𝑀 ∥ (𝑀 lcm 𝑁) ∧ (𝑀 lcm 𝑁) ∥ 𝑁) → 𝑀𝑁))
173, 8, 16mp2and 699 . . . 4 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → 𝑀𝑁)
18 absdvdsb 15868 . . . . . 6 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀𝑁 ↔ (abs‘𝑀) ∥ 𝑁))
19 zabscl 14909 . . . . . . 7 (𝑀 ∈ ℤ → (abs‘𝑀) ∈ ℤ)
20 dvdsabsb 15869 . . . . . . 7 (((abs‘𝑀) ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((abs‘𝑀) ∥ 𝑁 ↔ (abs‘𝑀) ∥ (abs‘𝑁)))
2119, 20sylan 583 . . . . . 6 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((abs‘𝑀) ∥ 𝑁 ↔ (abs‘𝑀) ∥ (abs‘𝑁)))
2218, 21bitrd 282 . . . . 5 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀𝑁 ↔ (abs‘𝑀) ∥ (abs‘𝑁)))
2322adantr 484 . . . 4 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → (𝑀𝑁 ↔ (abs‘𝑀) ∥ (abs‘𝑁)))
2417, 23mpbid 235 . . 3 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → (abs‘𝑀) ∥ (abs‘𝑁))
251simprd 499 . . . . . 6 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → 𝑁 ∥ (𝑀 lcm 𝑁))
2625adantr 484 . . . . 5 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → 𝑁 ∥ (𝑀 lcm 𝑁))
274simpld 498 . . . . . . 7 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 gcd 𝑁) ∥ 𝑀)
28 breq1 5072 . . . . . . 7 ((𝑀 lcm 𝑁) = (𝑀 gcd 𝑁) → ((𝑀 lcm 𝑁) ∥ 𝑀 ↔ (𝑀 gcd 𝑁) ∥ 𝑀))
2927, 28syl5ibrcom 250 . . . . . 6 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑀 lcm 𝑁) = (𝑀 gcd 𝑁) → (𝑀 lcm 𝑁) ∥ 𝑀))
3029imp 410 . . . . 5 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → (𝑀 lcm 𝑁) ∥ 𝑀)
31 dvdstr 15887 . . . . . . . . . 10 ((𝑁 ∈ ℤ ∧ (𝑀 lcm 𝑁) ∈ ℤ ∧ 𝑀 ∈ ℤ) → ((𝑁 ∥ (𝑀 lcm 𝑁) ∧ (𝑀 lcm 𝑁) ∥ 𝑀) → 𝑁𝑀))
3210, 31syl3an2 1166 . . . . . . . . 9 ((𝑁 ∈ ℤ ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑀 ∈ ℤ) → ((𝑁 ∥ (𝑀 lcm 𝑁) ∧ (𝑀 lcm 𝑁) ∥ 𝑀) → 𝑁𝑀))
33323coml 1129 . . . . . . . 8 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ 𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑁 ∥ (𝑀 lcm 𝑁) ∧ (𝑀 lcm 𝑁) ∥ 𝑀) → 𝑁𝑀))
34333expb 1122 . . . . . . 7 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ)) → ((𝑁 ∥ (𝑀 lcm 𝑁) ∧ (𝑀 lcm 𝑁) ∥ 𝑀) → 𝑁𝑀))
3534anidms 570 . . . . . 6 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑁 ∥ (𝑀 lcm 𝑁) ∧ (𝑀 lcm 𝑁) ∥ 𝑀) → 𝑁𝑀))
3635adantr 484 . . . . 5 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → ((𝑁 ∥ (𝑀 lcm 𝑁) ∧ (𝑀 lcm 𝑁) ∥ 𝑀) → 𝑁𝑀))
3726, 30, 36mp2and 699 . . . 4 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → 𝑁𝑀)
38 absdvdsb 15868 . . . . . . 7 ((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (𝑁𝑀 ↔ (abs‘𝑁) ∥ 𝑀))
39 zabscl 14909 . . . . . . . 8 (𝑁 ∈ ℤ → (abs‘𝑁) ∈ ℤ)
40 dvdsabsb 15869 . . . . . . . 8 (((abs‘𝑁) ∈ ℤ ∧ 𝑀 ∈ ℤ) → ((abs‘𝑁) ∥ 𝑀 ↔ (abs‘𝑁) ∥ (abs‘𝑀)))
4139, 40sylan 583 . . . . . . 7 ((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℤ) → ((abs‘𝑁) ∥ 𝑀 ↔ (abs‘𝑁) ∥ (abs‘𝑀)))
4238, 41bitrd 282 . . . . . 6 ((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (𝑁𝑀 ↔ (abs‘𝑁) ∥ (abs‘𝑀)))
4342ancoms 462 . . . . 5 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑁𝑀 ↔ (abs‘𝑁) ∥ (abs‘𝑀)))
4443adantr 484 . . . 4 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → (𝑁𝑀 ↔ (abs‘𝑁) ∥ (abs‘𝑀)))
4537, 44mpbid 235 . . 3 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → (abs‘𝑁) ∥ (abs‘𝑀))
46 nn0abscl 14908 . . . . . . 7 (𝑀 ∈ ℤ → (abs‘𝑀) ∈ ℕ0)
47 nn0abscl 14908 . . . . . . 7 (𝑁 ∈ ℤ → (abs‘𝑁) ∈ ℕ0)
4846, 47anim12i 616 . . . . . 6 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((abs‘𝑀) ∈ ℕ0 ∧ (abs‘𝑁) ∈ ℕ0))
49 dvdseq 15907 . . . . . 6 ((((abs‘𝑀) ∈ ℕ0 ∧ (abs‘𝑁) ∈ ℕ0) ∧ ((abs‘𝑀) ∥ (abs‘𝑁) ∧ (abs‘𝑁) ∥ (abs‘𝑀))) → (abs‘𝑀) = (abs‘𝑁))
5048, 49sylan 583 . . . . 5 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ ((abs‘𝑀) ∥ (abs‘𝑁) ∧ (abs‘𝑁) ∥ (abs‘𝑀))) → (abs‘𝑀) = (abs‘𝑁))
5150ex 416 . . . 4 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (((abs‘𝑀) ∥ (abs‘𝑁) ∧ (abs‘𝑁) ∥ (abs‘𝑀)) → (abs‘𝑀) = (abs‘𝑁)))
5251adantr 484 . . 3 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → (((abs‘𝑀) ∥ (abs‘𝑁) ∧ (abs‘𝑁) ∥ (abs‘𝑀)) → (abs‘𝑀) = (abs‘𝑁)))
5324, 45, 52mp2and 699 . 2 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)) → (abs‘𝑀) = (abs‘𝑁))
54 lcmid 16198 . . . . . . . 8 ((abs‘𝑀) ∈ ℤ → ((abs‘𝑀) lcm (abs‘𝑀)) = (abs‘(abs‘𝑀)))
5519, 54syl 17 . . . . . . 7 (𝑀 ∈ ℤ → ((abs‘𝑀) lcm (abs‘𝑀)) = (abs‘(abs‘𝑀)))
56 gcdid 16118 . . . . . . . 8 ((abs‘𝑀) ∈ ℤ → ((abs‘𝑀) gcd (abs‘𝑀)) = (abs‘(abs‘𝑀)))
5719, 56syl 17 . . . . . . 7 (𝑀 ∈ ℤ → ((abs‘𝑀) gcd (abs‘𝑀)) = (abs‘(abs‘𝑀)))
5855, 57eqtr4d 2782 . . . . . 6 (𝑀 ∈ ℤ → ((abs‘𝑀) lcm (abs‘𝑀)) = ((abs‘𝑀) gcd (abs‘𝑀)))
59 oveq2 7242 . . . . . . 7 ((abs‘𝑀) = (abs‘𝑁) → ((abs‘𝑀) lcm (abs‘𝑀)) = ((abs‘𝑀) lcm (abs‘𝑁)))
60 oveq2 7242 . . . . . . 7 ((abs‘𝑀) = (abs‘𝑁) → ((abs‘𝑀) gcd (abs‘𝑀)) = ((abs‘𝑀) gcd (abs‘𝑁)))
6159, 60eqeq12d 2755 . . . . . 6 ((abs‘𝑀) = (abs‘𝑁) → (((abs‘𝑀) lcm (abs‘𝑀)) = ((abs‘𝑀) gcd (abs‘𝑀)) ↔ ((abs‘𝑀) lcm (abs‘𝑁)) = ((abs‘𝑀) gcd (abs‘𝑁))))
6258, 61syl5ibcom 248 . . . . 5 (𝑀 ∈ ℤ → ((abs‘𝑀) = (abs‘𝑁) → ((abs‘𝑀) lcm (abs‘𝑁)) = ((abs‘𝑀) gcd (abs‘𝑁))))
6362imp 410 . . . 4 ((𝑀 ∈ ℤ ∧ (abs‘𝑀) = (abs‘𝑁)) → ((abs‘𝑀) lcm (abs‘𝑁)) = ((abs‘𝑀) gcd (abs‘𝑁)))
6463adantlr 715 . . 3 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (abs‘𝑀) = (abs‘𝑁)) → ((abs‘𝑀) lcm (abs‘𝑁)) = ((abs‘𝑀) gcd (abs‘𝑁)))
65 lcmabs 16194 . . . . 5 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((abs‘𝑀) lcm (abs‘𝑁)) = (𝑀 lcm 𝑁))
66 gcdabs 16122 . . . . 5 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((abs‘𝑀) gcd (abs‘𝑁)) = (𝑀 gcd 𝑁))
6765, 66eqeq12d 2755 . . . 4 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (((abs‘𝑀) lcm (abs‘𝑁)) = ((abs‘𝑀) gcd (abs‘𝑁)) ↔ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)))
6867adantr 484 . . 3 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (abs‘𝑀) = (abs‘𝑁)) → (((abs‘𝑀) lcm (abs‘𝑁)) = ((abs‘𝑀) gcd (abs‘𝑁)) ↔ (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁)))
6964, 68mpbid 235 . 2 (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ (abs‘𝑀) = (abs‘𝑁)) → (𝑀 lcm 𝑁) = (𝑀 gcd 𝑁))
7053, 69impbida 801 1 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑀 lcm 𝑁) = (𝑀 gcd 𝑁) ↔ (abs‘𝑀) = (abs‘𝑁)))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 209  wa 399   = wceq 1543  wcel 2112   class class class wbr 5069  cfv 6400  (class class class)co 7234  0cn0 12119  cz 12205  abscabs 14829  cdvds 15847   gcd cgcd 16085   lcm clcm 16177
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1803  ax-4 1817  ax-5 1918  ax-6 1976  ax-7 2016  ax-8 2114  ax-9 2122  ax-10 2143  ax-11 2160  ax-12 2177  ax-ext 2710  ax-sep 5208  ax-nul 5215  ax-pow 5274  ax-pr 5338  ax-un 7544  ax-cnex 10814  ax-resscn 10815  ax-1cn 10816  ax-icn 10817  ax-addcl 10818  ax-addrcl 10819  ax-mulcl 10820  ax-mulrcl 10821  ax-mulcom 10822  ax-addass 10823  ax-mulass 10824  ax-distr 10825  ax-i2m1 10826  ax-1ne0 10827  ax-1rid 10828  ax-rnegex 10829  ax-rrecex 10830  ax-cnre 10831  ax-pre-lttri 10832  ax-pre-lttrn 10833  ax-pre-ltadd 10834  ax-pre-mulgt0 10835  ax-pre-sup 10836
This theorem depends on definitions:  df-bi 210  df-an 400  df-or 848  df-3or 1090  df-3an 1091  df-tru 1546  df-fal 1556  df-ex 1788  df-nf 1792  df-sb 2073  df-mo 2541  df-eu 2570  df-clab 2717  df-cleq 2731  df-clel 2818  df-nfc 2889  df-ne 2944  df-nel 3050  df-ral 3069  df-rex 3070  df-reu 3071  df-rmo 3072  df-rab 3073  df-v 3425  df-sbc 3712  df-csb 3829  df-dif 3886  df-un 3888  df-in 3890  df-ss 3900  df-pss 3902  df-nul 4254  df-if 4456  df-pw 4531  df-sn 4558  df-pr 4560  df-tp 4562  df-op 4564  df-uni 4836  df-iun 4922  df-br 5070  df-opab 5132  df-mpt 5152  df-tr 5178  df-id 5471  df-eprel 5477  df-po 5485  df-so 5486  df-fr 5526  df-we 5528  df-xp 5574  df-rel 5575  df-cnv 5576  df-co 5577  df-dm 5578  df-rn 5579  df-res 5580  df-ima 5581  df-pred 6178  df-ord 6236  df-on 6237  df-lim 6238  df-suc 6239  df-iota 6358  df-fun 6402  df-fn 6403  df-f 6404  df-f1 6405  df-fo 6406  df-f1o 6407  df-fv 6408  df-riota 7191  df-ov 7237  df-oprab 7238  df-mpo 7239  df-om 7666  df-2nd 7783  df-wrecs 8070  df-recs 8131  df-rdg 8169  df-er 8414  df-en 8650  df-dom 8651  df-sdom 8652  df-sup 9087  df-inf 9088  df-pnf 10898  df-mnf 10899  df-xr 10900  df-ltxr 10901  df-le 10902  df-sub 11093  df-neg 11094  df-div 11519  df-nn 11860  df-2 11922  df-3 11923  df-n0 12120  df-z 12206  df-uz 12468  df-rp 12616  df-fl 13396  df-mod 13474  df-seq 13606  df-exp 13667  df-cj 14694  df-re 14695  df-im 14696  df-sqrt 14830  df-abs 14831  df-dvds 15848  df-gcd 16086  df-lcm 16179
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator