| 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 460 | . . 3 ⊢ ((𝑀 = 0 ∧ 𝑁 = 0) ↔ (𝑁 = 0 ∧ 𝑀 = 0)) | |
| 2 | ancom 460 | . . . . 5 ⊢ ((𝑛 ∥ 𝑀 ∧ 𝑛 ∥ 𝑁) ↔ (𝑛 ∥ 𝑁 ∧ 𝑛 ∥ 𝑀)) | |
| 3 | 2 | rabbii 3402 | . . . 4 ⊢ {𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑀 ∧ 𝑛 ∥ 𝑁)} = {𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑁 ∧ 𝑛 ∥ 𝑀)} |
| 4 | 3 | supeq1i 9341 | . . 3 ⊢ sup({𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑀 ∧ 𝑛 ∥ 𝑁)}, ℝ, < ) = sup({𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑁 ∧ 𝑛 ∥ 𝑀)}, ℝ, < ) |
| 5 | 1, 4 | ifbieq2i 4502 | . 2 ⊢ if((𝑀 = 0 ∧ 𝑁 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑀 ∧ 𝑛 ∥ 𝑁)}, ℝ, < )) = if((𝑁 = 0 ∧ 𝑀 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑁 ∧ 𝑛 ∥ 𝑀)}, ℝ, < )) |
| 6 | gcdval 16417 | . 2 ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 gcd 𝑁) = if((𝑀 = 0 ∧ 𝑁 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑀 ∧ 𝑛 ∥ 𝑁)}, ℝ, < ))) | |
| 7 | gcdval 16417 | . . 3 ⊢ ((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (𝑁 gcd 𝑀) = if((𝑁 = 0 ∧ 𝑀 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑁 ∧ 𝑛 ∥ 𝑀)}, ℝ, < ))) | |
| 8 | 7 | ancoms 458 | . 2 ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑁 gcd 𝑀) = if((𝑁 = 0 ∧ 𝑀 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑁 ∧ 𝑛 ∥ 𝑀)}, ℝ, < ))) |
| 9 | 5, 6, 8 | 3eqtr4a 2794 | 1 ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 gcd 𝑁) = (𝑁 gcd 𝑀)) |
| Colors of variables: wff setvar class |
| Syntax hints: → wi 4 ∧ wa 395 = wceq 1541 ∈ wcel 2113 {crab 3397 ifcif 4476 class class class wbr 5095 (class class class)co 7355 supcsup 9334 ℝcr 11015 0cc0 11016 < clt 11156 ℤcz 12478 ∥ cdvds 16173 gcd cgcd 16415 |
| This theorem was proved from axioms: ax-mp 5 ax-1 6 ax-2 7 ax-3 8 ax-gen 1796 ax-4 1810 ax-5 1911 ax-6 1968 ax-7 2009 ax-8 2115 ax-9 2123 ax-10 2146 ax-11 2162 ax-12 2182 ax-ext 2705 ax-sep 5238 ax-nul 5248 ax-pow 5307 ax-pr 5374 ax-un 7677 ax-resscn 11073 ax-1cn 11074 ax-icn 11075 ax-addcl 11076 ax-mulcl 11078 ax-i2m1 11084 ax-pre-lttri 11090 ax-pre-lttrn 11091 |
| This theorem depends on definitions: df-bi 207 df-an 396 df-or 848 df-3or 1087 df-3an 1088 df-tru 1544 df-fal 1554 df-ex 1781 df-nf 1785 df-sb 2068 df-mo 2537 df-eu 2566 df-clab 2712 df-cleq 2725 df-clel 2808 df-nfc 2883 df-ne 2931 df-nel 3035 df-ral 3050 df-rex 3059 df-rmo 3348 df-rab 3398 df-v 3440 df-sbc 3739 df-csb 3848 df-dif 3902 df-un 3904 df-in 3906 df-ss 3916 df-nul 4285 df-if 4477 df-pw 4553 df-sn 4578 df-pr 4580 df-op 4584 df-uni 4861 df-br 5096 df-opab 5158 df-mpt 5177 df-id 5516 df-po 5529 df-so 5530 df-xp 5627 df-rel 5628 df-cnv 5629 df-co 5630 df-dm 5631 df-rn 5632 df-res 5633 df-ima 5634 df-iota 6445 df-fun 6491 df-fn 6492 df-f 6493 df-f1 6494 df-fo 6495 df-f1o 6496 df-fv 6497 df-ov 7358 df-oprab 7359 df-mpo 7360 df-er 8631 df-en 8879 df-dom 8880 df-sdom 8881 df-sup 9336 df-pnf 11158 df-mnf 11159 df-ltxr 11161 df-gcd 16416 |
| This theorem is referenced by: gcdcomd 16435 divgcdnnr 16437 gcdid0 16441 neggcd 16444 gcdabs2 16451 1gcd 16454 6gcd4e2 16459 rprpwr 16480 eucalginv 16505 3lcm2e6woprm 16536 coprmdvds 16574 qredeq 16578 divgcdcoprmex 16587 cncongr1 16588 cncongrprm 16650 fermltl 16705 vfermltl 16723 coprimeprodsq2 16731 pythagtrip 16756 pcgcd 16800 pockthlem 16827 gcdi 16995 gcdmodi 16996 1259lem5 17056 2503lem3 17060 4001lem4 17065 odinv 19483 lgsprme0 27287 lgsdirnn0 27292 lgsquad2lem2 27333 lgsquad3 27335 ex-gcd 30448 gcd32 35804 gcdcomnni 42091 aks6d1c1 42219 aks6d1c4 42227 goldbachthlem2 47660 goldbachth 47661 gcd2odd1 47782 fpprwpprb 47854 |
| Copyright terms: Public domain | W3C validator |