![]() |
Intuitionistic Logic Explorer |
< Previous
Next >
Nearby theorems |
|
Mirrors > Home > ILE Home > Th. List > gcdabs | GIF version |
Description: The gcd of two integers is the same as that of their absolute values. (Contributed by Paul Chapman, 31-Mar-2011.) |
Ref | Expression |
---|---|
gcdabs | ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((abs‘𝑀) gcd (abs‘𝑁)) = (𝑀 gcd 𝑁)) |
Step | Hyp | Ref | Expression |
---|---|---|---|
1 | zq 9677 | . . 3 ⊢ (𝑀 ∈ ℤ → 𝑀 ∈ ℚ) | |
2 | zq 9677 | . . 3 ⊢ (𝑁 ∈ ℤ → 𝑁 ∈ ℚ) | |
3 | qabsor 11193 | . . . 4 ⊢ (𝑀 ∈ ℚ → ((abs‘𝑀) = 𝑀 ∨ (abs‘𝑀) = -𝑀)) | |
4 | qabsor 11193 | . . . 4 ⊢ (𝑁 ∈ ℚ → ((abs‘𝑁) = 𝑁 ∨ (abs‘𝑁) = -𝑁)) | |
5 | 3, 4 | anim12i 338 | . . 3 ⊢ ((𝑀 ∈ ℚ ∧ 𝑁 ∈ ℚ) → (((abs‘𝑀) = 𝑀 ∨ (abs‘𝑀) = -𝑀) ∧ ((abs‘𝑁) = 𝑁 ∨ (abs‘𝑁) = -𝑁))) |
6 | 1, 2, 5 | syl2an 289 | . 2 ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (((abs‘𝑀) = 𝑀 ∨ (abs‘𝑀) = -𝑀) ∧ ((abs‘𝑁) = 𝑁 ∨ (abs‘𝑁) = -𝑁))) |
7 | oveq12 5915 | . . . 4 ⊢ (((abs‘𝑀) = 𝑀 ∧ (abs‘𝑁) = 𝑁) → ((abs‘𝑀) gcd (abs‘𝑁)) = (𝑀 gcd 𝑁)) | |
8 | 7 | a1i 9 | . . 3 ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (((abs‘𝑀) = 𝑀 ∧ (abs‘𝑁) = 𝑁) → ((abs‘𝑀) gcd (abs‘𝑁)) = (𝑀 gcd 𝑁))) |
9 | oveq12 5915 | . . . . 5 ⊢ (((abs‘𝑀) = -𝑀 ∧ (abs‘𝑁) = 𝑁) → ((abs‘𝑀) gcd (abs‘𝑁)) = (-𝑀 gcd 𝑁)) | |
10 | neggcd 12094 | . . . . 5 ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (-𝑀 gcd 𝑁) = (𝑀 gcd 𝑁)) | |
11 | 9, 10 | sylan9eqr 2244 | . . . 4 ⊢ (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ ((abs‘𝑀) = -𝑀 ∧ (abs‘𝑁) = 𝑁)) → ((abs‘𝑀) gcd (abs‘𝑁)) = (𝑀 gcd 𝑁)) |
12 | 11 | ex 115 | . . 3 ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (((abs‘𝑀) = -𝑀 ∧ (abs‘𝑁) = 𝑁) → ((abs‘𝑀) gcd (abs‘𝑁)) = (𝑀 gcd 𝑁))) |
13 | oveq12 5915 | . . . . 5 ⊢ (((abs‘𝑀) = 𝑀 ∧ (abs‘𝑁) = -𝑁) → ((abs‘𝑀) gcd (abs‘𝑁)) = (𝑀 gcd -𝑁)) | |
14 | gcdneg 12093 | . . . . 5 ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 gcd -𝑁) = (𝑀 gcd 𝑁)) | |
15 | 13, 14 | sylan9eqr 2244 | . . . 4 ⊢ (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ ((abs‘𝑀) = 𝑀 ∧ (abs‘𝑁) = -𝑁)) → ((abs‘𝑀) gcd (abs‘𝑁)) = (𝑀 gcd 𝑁)) |
16 | 15 | ex 115 | . . 3 ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (((abs‘𝑀) = 𝑀 ∧ (abs‘𝑁) = -𝑁) → ((abs‘𝑀) gcd (abs‘𝑁)) = (𝑀 gcd 𝑁))) |
17 | oveq12 5915 | . . . . 5 ⊢ (((abs‘𝑀) = -𝑀 ∧ (abs‘𝑁) = -𝑁) → ((abs‘𝑀) gcd (abs‘𝑁)) = (-𝑀 gcd -𝑁)) | |
18 | znegcl 9334 | . . . . . . 7 ⊢ (𝑀 ∈ ℤ → -𝑀 ∈ ℤ) | |
19 | gcdneg 12093 | . . . . . . 7 ⊢ ((-𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (-𝑀 gcd -𝑁) = (-𝑀 gcd 𝑁)) | |
20 | 18, 19 | sylan 283 | . . . . . 6 ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (-𝑀 gcd -𝑁) = (-𝑀 gcd 𝑁)) |
21 | 20, 10 | eqtrd 2222 | . . . . 5 ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (-𝑀 gcd -𝑁) = (𝑀 gcd 𝑁)) |
22 | 17, 21 | sylan9eqr 2244 | . . . 4 ⊢ (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ ((abs‘𝑀) = -𝑀 ∧ (abs‘𝑁) = -𝑁)) → ((abs‘𝑀) gcd (abs‘𝑁)) = (𝑀 gcd 𝑁)) |
23 | 22 | ex 115 | . . 3 ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (((abs‘𝑀) = -𝑀 ∧ (abs‘𝑁) = -𝑁) → ((abs‘𝑀) gcd (abs‘𝑁)) = (𝑀 gcd 𝑁))) |
24 | 8, 12, 16, 23 | ccased 967 | . 2 ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((((abs‘𝑀) = 𝑀 ∨ (abs‘𝑀) = -𝑀) ∧ ((abs‘𝑁) = 𝑁 ∨ (abs‘𝑁) = -𝑁)) → ((abs‘𝑀) gcd (abs‘𝑁)) = (𝑀 gcd 𝑁))) |
25 | 6, 24 | mpd 13 | 1 ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((abs‘𝑀) gcd (abs‘𝑁)) = (𝑀 gcd 𝑁)) |
Colors of variables: wff set class |
Syntax hints: → wi 4 ∧ wa 104 ∨ wo 709 = wceq 1364 ∈ wcel 2160 ‘cfv 5242 (class class class)co 5906 -cneg 8177 ℤcz 9303 ℚcq 9670 abscabs 11115 gcd cgcd 12053 |
This theorem was proved from axioms: ax-mp 5 ax-1 6 ax-2 7 ax-ia1 106 ax-ia2 107 ax-ia3 108 ax-in1 615 ax-in2 616 ax-io 710 ax-5 1458 ax-7 1459 ax-gen 1460 ax-ie1 1504 ax-ie2 1505 ax-8 1515 ax-10 1516 ax-11 1517 ax-i12 1518 ax-bndl 1520 ax-4 1521 ax-17 1537 ax-i9 1541 ax-ial 1545 ax-i5r 1546 ax-13 2162 ax-14 2163 ax-ext 2171 ax-coll 4140 ax-sep 4143 ax-nul 4151 ax-pow 4199 ax-pr 4234 ax-un 4458 ax-setind 4561 ax-iinf 4612 ax-cnex 7949 ax-resscn 7950 ax-1cn 7951 ax-1re 7952 ax-icn 7953 ax-addcl 7954 ax-addrcl 7955 ax-mulcl 7956 ax-mulrcl 7957 ax-addcom 7958 ax-mulcom 7959 ax-addass 7960 ax-mulass 7961 ax-distr 7962 ax-i2m1 7963 ax-0lt1 7964 ax-1rid 7965 ax-0id 7966 ax-rnegex 7967 ax-precex 7968 ax-cnre 7969 ax-pre-ltirr 7970 ax-pre-ltwlin 7971 ax-pre-lttrn 7972 ax-pre-apti 7973 ax-pre-ltadd 7974 ax-pre-mulgt0 7975 ax-pre-mulext 7976 ax-arch 7977 ax-caucvg 7978 |
This theorem depends on definitions: df-bi 117 df-dc 836 df-3or 981 df-3an 982 df-tru 1367 df-fal 1370 df-nf 1472 df-sb 1774 df-eu 2041 df-mo 2042 df-clab 2176 df-cleq 2182 df-clel 2185 df-nfc 2321 df-ne 2361 df-nel 2456 df-ral 2473 df-rex 2474 df-reu 2475 df-rmo 2476 df-rab 2477 df-v 2758 df-sbc 2982 df-csb 3077 df-dif 3151 df-un 3153 df-in 3155 df-ss 3162 df-nul 3443 df-if 3554 df-pw 3599 df-sn 3620 df-pr 3621 df-op 3623 df-uni 3832 df-int 3867 df-iun 3910 df-br 4026 df-opab 4087 df-mpt 4088 df-tr 4124 df-id 4318 df-po 4321 df-iso 4322 df-iord 4391 df-on 4393 df-ilim 4394 df-suc 4396 df-iom 4615 df-xp 4657 df-rel 4658 df-cnv 4659 df-co 4660 df-dm 4661 df-rn 4662 df-res 4663 df-ima 4664 df-iota 5203 df-fun 5244 df-fn 5245 df-f 5246 df-f1 5247 df-fo 5248 df-f1o 5249 df-fv 5250 df-riota 5861 df-ov 5909 df-oprab 5910 df-mpo 5911 df-1st 6180 df-2nd 6181 df-recs 6345 df-frec 6431 df-sup 7029 df-pnf 8042 df-mnf 8043 df-xr 8044 df-ltxr 8045 df-le 8046 df-sub 8178 df-neg 8179 df-reap 8580 df-ap 8587 df-div 8678 df-inn 8969 df-2 9027 df-3 9028 df-4 9029 df-n0 9227 df-z 9304 df-uz 9579 df-q 9671 df-rp 9706 df-fz 10061 df-fzo 10195 df-fl 10325 df-mod 10380 df-seqfrec 10505 df-exp 10584 df-cj 10960 df-re 10961 df-im 10962 df-rsqrt 11116 df-abs 11117 df-dvds 11905 df-gcd 12054 |
This theorem is referenced by: absmulgcd 12128 lcmgcd 12190 lcmgcdeq 12195 zgcdsq 12313 lgsne0 15082 |
Copyright terms: Public domain | W3C validator |