| 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 3398 | . . . 4 ⊢ {𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑀 ∧ 𝑛 ∥ 𝑁)} = {𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑁 ∧ 𝑛 ∥ 𝑀)} |
| 4 | 3 | supeq1i 9326 | . . 3 ⊢ sup({𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑀 ∧ 𝑛 ∥ 𝑁)}, ℝ, < ) = sup({𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑁 ∧ 𝑛 ∥ 𝑀)}, ℝ, < ) |
| 5 | 1, 4 | ifbieq2i 4499 | . 2 ⊢ if((𝑀 = 0 ∧ 𝑁 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑀 ∧ 𝑛 ∥ 𝑁)}, ℝ, < )) = if((𝑁 = 0 ∧ 𝑀 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑁 ∧ 𝑛 ∥ 𝑀)}, ℝ, < )) |
| 6 | gcdval 16399 | . 2 ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 gcd 𝑁) = if((𝑀 = 0 ∧ 𝑁 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑀 ∧ 𝑛 ∥ 𝑁)}, ℝ, < ))) | |
| 7 | gcdval 16399 | . . 3 ⊢ ((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (𝑁 gcd 𝑀) = if((𝑁 = 0 ∧ 𝑀 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑁 ∧ 𝑛 ∥ 𝑀)}, ℝ, < ))) | |
| 8 | 7 | ancoms 458 | . 2 ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑁 gcd 𝑀) = if((𝑁 = 0 ∧ 𝑀 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑁 ∧ 𝑛 ∥ 𝑀)}, ℝ, < ))) |
| 9 | 5, 6, 8 | 3eqtr4a 2791 | 1 ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 gcd 𝑁) = (𝑁 gcd 𝑀)) |
| Colors of variables: wff setvar class |
| Syntax hints: → wi 4 ∧ wa 395 = wceq 1541 ∈ wcel 2110 {crab 3393 ifcif 4473 class class class wbr 5089 (class class class)co 7341 supcsup 9319 ℝcr 10997 0cc0 10998 < clt 11138 ℤcz 12460 ∥ cdvds 16155 gcd cgcd 16397 |
| 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 2112 ax-9 2120 ax-10 2143 ax-11 2159 ax-12 2179 ax-ext 2702 ax-sep 5232 ax-nul 5242 ax-pow 5301 ax-pr 5368 ax-un 7663 ax-resscn 11055 ax-1cn 11056 ax-icn 11057 ax-addcl 11058 ax-mulcl 11060 ax-i2m1 11066 ax-pre-lttri 11072 ax-pre-lttrn 11073 |
| 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 2067 df-mo 2534 df-eu 2563 df-clab 2709 df-cleq 2722 df-clel 2804 df-nfc 2879 df-ne 2927 df-nel 3031 df-ral 3046 df-rex 3055 df-rmo 3344 df-rab 3394 df-v 3436 df-sbc 3740 df-csb 3849 df-dif 3903 df-un 3905 df-in 3907 df-ss 3917 df-nul 4282 df-if 4474 df-pw 4550 df-sn 4575 df-pr 4577 df-op 4581 df-uni 4858 df-br 5090 df-opab 5152 df-mpt 5171 df-id 5509 df-po 5522 df-so 5523 df-xp 5620 df-rel 5621 df-cnv 5622 df-co 5623 df-dm 5624 df-rn 5625 df-res 5626 df-ima 5627 df-iota 6433 df-fun 6479 df-fn 6480 df-f 6481 df-f1 6482 df-fo 6483 df-f1o 6484 df-fv 6485 df-ov 7344 df-oprab 7345 df-mpo 7346 df-er 8617 df-en 8865 df-dom 8866 df-sdom 8867 df-sup 9321 df-pnf 11140 df-mnf 11141 df-ltxr 11143 df-gcd 16398 |
| This theorem is referenced by: gcdcomd 16417 divgcdnnr 16419 gcdid0 16423 neggcd 16426 gcdabs2 16433 1gcd 16436 6gcd4e2 16441 rprpwr 16462 eucalginv 16487 3lcm2e6woprm 16518 coprmdvds 16556 qredeq 16560 divgcdcoprmex 16569 cncongr1 16570 cncongrprm 16632 fermltl 16687 vfermltl 16705 coprimeprodsq2 16713 pythagtrip 16738 pcgcd 16782 pockthlem 16809 gcdi 16977 gcdmodi 16978 1259lem5 17038 2503lem3 17042 4001lem4 17047 odinv 19466 lgsprme0 27270 lgsdirnn0 27275 lgsquad2lem2 27316 lgsquad3 27318 ex-gcd 30427 gcd32 35761 gcdcomnni 42000 aks6d1c1 42128 aks6d1c4 42136 goldbachthlem2 47556 goldbachth 47557 gcd2odd1 47678 fpprwpprb 47750 |
| Copyright terms: Public domain | W3C validator |