| Metamath Proof Explorer |
< Previous
Next >
Nearby theorems |
||
| Mirrors > Home > MPE Home > Th. List > gcdcom | Structured version Visualization version GIF version | ||
| Description: The gcd operator is commutative. Theorem 1.4(a) in [ApostolNT] p. 16. (Contributed by Paul Chapman, 21-Mar-2011.) |
| Ref | Expression |
|---|---|
| gcdcom | ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 gcd 𝑁) = (𝑁 gcd 𝑀)) |
| Step | Hyp | Ref | Expression |
|---|---|---|---|
| 1 | ancom 463 | . . 3 ⊢ ((𝑀 = 0 ∧ 𝑁 = 0) ↔ (𝑁 = 0 ∧ 𝑀 = 0)) | |
| 2 | ancom 463 | . . . . 5 ⊢ ((𝑛 ∥ 𝑀 ∧ 𝑛 ∥ 𝑁) ↔ (𝑛 ∥ 𝑁 ∧ 𝑛 ∥ 𝑀)) | |
| 3 | 2 | rabbii 3413 | . . . 4 ⊢ {𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑀 ∧ 𝑛 ∥ 𝑁)} = {𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑁 ∧ 𝑛 ∥ 𝑀)} |
| 4 | 3 | supeq1i 9383 | . . 3 ⊢ sup({𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑀 ∧ 𝑛 ∥ 𝑁)}, ℝ, < ) = sup({𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑁 ∧ 𝑛 ∥ 𝑀)}, ℝ, < ) |
| 5 | 1, 4 | ifbieq2i 4500 | . 2 ⊢ if((𝑀 = 0 ∧ 𝑁 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑀 ∧ 𝑛 ∥ 𝑁)}, ℝ, < )) = if((𝑁 = 0 ∧ 𝑀 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑁 ∧ 𝑛 ∥ 𝑀)}, ℝ, < )) |
| 6 | gcdval 16506 | . 2 ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 gcd 𝑁) = if((𝑀 = 0 ∧ 𝑁 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑀 ∧ 𝑛 ∥ 𝑁)}, ℝ, < ))) | |
| 7 | gcdval 16506 | . . 3 ⊢ ((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (𝑁 gcd 𝑀) = if((𝑁 = 0 ∧ 𝑀 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑁 ∧ 𝑛 ∥ 𝑀)}, ℝ, < ))) | |
| 8 | 7 | ancoms 461 | . 2 ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑁 gcd 𝑀) = if((𝑁 = 0 ∧ 𝑀 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑁 ∧ 𝑛 ∥ 𝑀)}, ℝ, < ))) |
| 9 | 5, 6, 8 | 3eqtr4a 2817 | 1 ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 gcd 𝑁) = (𝑁 gcd 𝑀)) |
| Colors of variables: wff setvar class |
| Syntax hints: → wi 4 ∧ wa 398 = wceq 1554 ∈ wcel 2136 {crab 3408 ifcif 4474 class class class wbr 5094 (class class class)co 7385 supcsup 9376 ℝcr 11062 0cc0 11063 < clt 11206 ℤcz 12558 ∥ cdvds 16262 gcd cgcd 16504 |
| This theorem was proved from axioms: ax-mp 5 ax-1 6 ax-2 7 ax-3 8 ax-gen 1809 ax-4 1823 ax-5 1924 ax-6 1981 ax-7 2022 ax-8 2138 ax-9 2146 ax-10 2169 ax-11 2185 ax-12 2206 ax-ext 2728 ax-sep 5240 ax-nul 5250 ax-pow 5316 ax-pr 5384 ax-un 7707 ax-resscn 11120 ax-1cn 11121 ax-icn 11122 ax-addcl 11123 ax-mulcl 11125 ax-i2m1 11131 ax-pre-lttri 11137 ax-pre-lttrn 11138 |
| This theorem depends on definitions: df-bi 209 df-an 399 df-or 857 df-3or 1096 df-3an 1097 df-tru 1557 df-fal 1567 df-ex 1794 df-nf 1798 df-sb 2085 df-mo 2560 df-eu 2590 df-clab 2735 df-cleq 2748 df-clel 2831 df-nfc 2905 df-ne 2952 df-nel 3056 df-ral 3071 df-rex 3081 df-rmo 3361 df-rab 3409 df-v 3450 df-sbc 3740 df-csb 3848 df-dif 3902 df-un 3904 df-in 3906 df-ss 3916 df-nul 4281 df-if 4475 df-pw 4551 df-sn 4577 df-pr 4579 df-op 4583 df-uni 4860 df-br 5095 df-opab 5157 df-mpt 5176 df-id 5535 df-po 5548 df-so 5549 df-xp 5646 df-rel 5647 df-cnv 5648 df-co 5649 df-dm 5650 df-rn 5651 df-res 5652 df-ima 5653 df-iota 6466 df-fun 6512 df-fn 6513 df-f 6514 df-f1 6515 df-fo 6516 df-f1o 6517 df-fv 6518 df-ov 7388 df-oprab 7389 df-mpo 7390 df-er 8666 df-en 8917 df-dom 8918 df-sdom 8919 df-sup 9378 df-pnf 11208 df-mnf 11209 df-ltxr 11211 df-gcd 16505 |
| This theorem is referenced by: gcdcomd 16524 divgcdnnr 16526 gcdid0 16530 neggcd 16533 gcdabs2 16540 1gcd 16543 6gcd4e2 16548 rprpwr 16569 eucalginv 16594 3lcm2e6woprm 16625 coprmdvds 16663 qredeq 16667 divgcdcoprmex 16676 cncongr1 16677 cncongrprm 16740 fermltl 16795 vfermltl 16813 coprimeprodsq2 16821 pythagtrip 16846 pcgcd 16890 pockthlem 16917 gcdi 17085 gcdmodi 17086 1259lem5 17147 2503lem3 17151 4001lem4 17156 odinv 19577 lgsprme0 27373 lgsdirnn0 27378 lgsquad2lem2 27419 lgsquad3 27421 ex-gcd 30598 gcd32 36047 gcdcomnni 42553 aks6d1c1 42681 aks6d1c4 42689 goldbachthlem2 48103 goldbachth 48104 gcd2odd1 48238 fpprwpprb 48310 |
| Copyright terms: Public domain | W3C validator |