| Metamath Proof Explorer |
< Previous
Next >
Nearby theorems |
||
| Mirrors > Home > MPE Home > Th. List > 2sq | Structured version Visualization version GIF version | ||
| Description: All primes of the form 4𝑘 + 1 are sums of two squares. This is Metamath 100 proof #20. (Contributed by Mario Carneiro, 20-Jun-2015.) |
| Ref | Expression |
|---|---|
| 2sq | ⊢ ((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) → ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ 𝑃 = ((𝑥↑2) + (𝑦↑2))) |
| Step | Hyp | Ref | Expression |
|---|---|---|---|
| 1 | eqid 2760 | . . 3 ⊢ ran (𝑤 ∈ ℤ[i] ↦ ((abs‘𝑤)↑2)) = ran (𝑤 ∈ ℤ[i] ↦ ((abs‘𝑤)↑2)) | |
| 2 | oveq1 7421 | . . . . . . 7 ⊢ (𝑎 = 𝑥 → (𝑎 gcd 𝑏) = (𝑥 gcd 𝑏)) | |
| 3 | 2 | eqeq1d 2762 | . . . . . 6 ⊢ (𝑎 = 𝑥 → ((𝑎 gcd 𝑏) = 1 ↔ (𝑥 gcd 𝑏) = 1)) |
| 4 | oveq1 7421 | . . . . . . . 8 ⊢ (𝑎 = 𝑥 → (𝑎↑2) = (𝑥↑2)) | |
| 5 | 4 | oveq1d 7429 | . . . . . . 7 ⊢ (𝑎 = 𝑥 → ((𝑎↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑏↑2))) |
| 6 | 5 | eqeq2d 2771 | . . . . . 6 ⊢ (𝑎 = 𝑥 → (𝑧 = ((𝑎↑2) + (𝑏↑2)) ↔ 𝑧 = ((𝑥↑2) + (𝑏↑2)))) |
| 7 | 3, 6 | anbi12d 644 | . . . . 5 ⊢ (𝑎 = 𝑥 → (((𝑎 gcd 𝑏) = 1 ∧ 𝑧 = ((𝑎↑2) + (𝑏↑2))) ↔ ((𝑥 gcd 𝑏) = 1 ∧ 𝑧 = ((𝑥↑2) + (𝑏↑2))))) |
| 8 | oveq2 7422 | . . . . . . 7 ⊢ (𝑏 = 𝑦 → (𝑥 gcd 𝑏) = (𝑥 gcd 𝑦)) | |
| 9 | 8 | eqeq1d 2762 | . . . . . 6 ⊢ (𝑏 = 𝑦 → ((𝑥 gcd 𝑏) = 1 ↔ (𝑥 gcd 𝑦) = 1)) |
| 10 | oveq1 7421 | . . . . . . . 8 ⊢ (𝑏 = 𝑦 → (𝑏↑2) = (𝑦↑2)) | |
| 11 | 10 | oveq2d 7430 | . . . . . . 7 ⊢ (𝑏 = 𝑦 → ((𝑥↑2) + (𝑏↑2)) = ((𝑥↑2) + (𝑦↑2))) |
| 12 | 11 | eqeq2d 2771 | . . . . . 6 ⊢ (𝑏 = 𝑦 → (𝑧 = ((𝑥↑2) + (𝑏↑2)) ↔ 𝑧 = ((𝑥↑2) + (𝑦↑2)))) |
| 13 | 9, 12 | anbi12d 644 | . . . . 5 ⊢ (𝑏 = 𝑦 → (((𝑥 gcd 𝑏) = 1 ∧ 𝑧 = ((𝑥↑2) + (𝑏↑2))) ↔ ((𝑥 gcd 𝑦) = 1 ∧ 𝑧 = ((𝑥↑2) + (𝑦↑2))))) |
| 14 | 7, 13 | cbvrex2vw 3245 | . . . 4 ⊢ (∃𝑎 ∈ ℤ ∃𝑏 ∈ ℤ ((𝑎 gcd 𝑏) = 1 ∧ 𝑧 = ((𝑎↑2) + (𝑏↑2))) ↔ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ((𝑥 gcd 𝑦) = 1 ∧ 𝑧 = ((𝑥↑2) + (𝑦↑2)))) |
| 15 | 14 | abbii 2827 | . . 3 ⊢ {𝑧 ∣ ∃𝑎 ∈ ℤ ∃𝑏 ∈ ℤ ((𝑎 gcd 𝑏) = 1 ∧ 𝑧 = ((𝑎↑2) + (𝑏↑2)))} = {𝑧 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ((𝑥 gcd 𝑦) = 1 ∧ 𝑧 = ((𝑥↑2) + (𝑦↑2)))} |
| 16 | 1, 15 | 2sqlem11 27668 | . 2 ⊢ ((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) → 𝑃 ∈ ran (𝑤 ∈ ℤ[i] ↦ ((abs‘𝑤)↑2))) |
| 17 | 1 | 2sqlem2 27657 | . 2 ⊢ (𝑃 ∈ ran (𝑤 ∈ ℤ[i] ↦ ((abs‘𝑤)↑2)) ↔ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ 𝑃 = ((𝑥↑2) + (𝑦↑2))) |
| 18 | 16, 17 | sylib 221 | 1 ⊢ ((𝑃 ∈ ℙ ∧ (𝑃 mod 4) = 1) → ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ 𝑃 = ((𝑥↑2) + (𝑦↑2))) |
| Colors of variables: wff setvar class |
| This proof depends on syntax axioms: → wi 4 ∧ wa 401 = wceq 1570 ∈ wcel 2145 {cab 2738 ∃wrex 3086 ↦ cmpt 5186 ran crn 5656 ‘cfv 6533 (class class class)co 7414 1c1 11128 + caddc 11130 2c2 12322 4c4 12324 ℤcz 12618 mod cmo 13933 ↑cexp 14128 abscabs 15324 gcd cgcd 16587 ℙcprime 16764 ℤ[i]cgz 17024 |
| This proof depends on axioms: ax-mp 5 ax-1 6 ax-2 7 ax-3 8 ax-gen 1828 ax-4 1842 ax-5 1943 ax-6 2000 ax-7 2041 ax-8 2147 ax-9 2155 ax-10 2178 ax-11 2194 ax-12 2213 ax-ext 2732 ax-rep 5232 ax-sep 5251 ax-nul 5263 ax-pow 5330 ax-pr 5398 ax-un 7737 ax-cnex 11183 ax-resscn 11184 ax-1cn 11185 ax-icn 11186 ax-addcl 11187 ax-addrcl 11188 ax-mulcl 11189 ax-mulrcl 11190 ax-mulcom 11191 ax-addass 11192 ax-mulass 11193 ax-distr 11194 ax-i2m1 11195 ax-1ne0 11196 ax-1rid 11197 ax-rnegex 11198 ax-rrecex 11199 ax-cnre 11200 ax-pre-lttri 11201 ax-pre-lttrn 11202 ax-pre-ltadd 11203 ax-pre-mulgt0 11204 ax-pre-sup 11205 ax-addf 11206 ax-mulf 11207 |
| This proof depends on definitions: df-bi 210 df-an 402 df-or 862 df-3or 1104 df-3an 1105 df-tru 1573 df-fal 1583 df-ex 1813 df-nf 1817 df-sb 2100 df-mo 2564 df-eu 2594 df-clab 2739 df-cleq 2752 df-clel 2835 df-nfc 2909 df-ne 2956 df-nel 3062 df-ral 3077 df-rex 3087 df-rmo 3365 df-reu 3366 df-rab 3413 df-v 3452 df-sbc 3740 df-csb 3848 df-dif 3902 df-un 3904 df-in 3906 df-ss 3916 df-pss 3919 df-nul 4280 df-if 4483 df-pw 4559 df-sn 4585 df-pr 4587 df-tp 4589 df-op 4591 df-uni 4868 df-int 4908 df-iun 4953 df-iin 4954 df-br 5104 df-opab 5168 df-mpt 5187 df-tr 5213 df-id 5550 df-eprel 5555 df-po 5563 df-so 5564 df-fr 5608 df-se 5609 df-we 5610 df-xp 5661 df-rel 5662 df-cnv 5663 df-co 5664 df-dm 5665 df-rn 5666 df-res 5667 df-ima 5668 df-pred 6299 df-ord 6360 df-on 6361 df-lim 6362 df-suc 6363 df-iota 6489 df-fun 6535 df-fn 6536 df-f 6537 df-f1 6538 df-fo 6539 df-f1o 6540 df-fv 6541 df-isom 6542 df-riota 7371 df-ov 7417 df-oprab 7418 df-mpo 7419 df-of 7679 df-ofr 7680 df-om 7864 df-1st 7987 df-2nd 7988 df-supp 8160 df-tpos 8225 df-frecs 8281 df-wrecs 8312 df-recs 8361 df-rdg 8400 df-1o 8458 df-2o 8459 df-oadd 8462 df-er 8699 df-ec 8701 df-qs 8705 df-map 8831 df-pm 8832 df-ixp 8908 df-en 8956 df-dom 8957 df-sdom 8958 df-fin 8959 df-fsupp 9335 df-sup 9415 df-inf 9416 df-oi 9485 df-dju 9909 df-card 9947 df-pnf 11272 df-mnf 11273 df-xr 11274 df-ltxr 11275 df-le 11276 df-sub 11470 df-neg 11471 df-div 11899 df-nn 12261 df-2 12330 df-3 12331 df-4 12332 df-5 12333 df-6 12334 df-7 12335 df-8 12336 df-9 12337 df-n0 12532 df-xnn0 12605 df-z 12619 df-dec 12740 df-uz 12891 df-q 13001 df-rp 13046 df-fz 13565 df-fzo 13713 df-fl 13856 df-mod 13934 df-seq 14069 df-exp 14129 df-hash 14398 df-cj 15189 df-re 15190 df-im 15191 df-sqrt 15325 df-abs 15326 df-dvds 16346 df-gcd 16588 df-prm 16765 df-phi 16860 df-pc 16932 df-gz 17025 df-struct 17242 df-sets 17259 df-slot 17277 df-ndx 17289 df-base 17305 df-ress 17326 df-plusg 17358 df-mulr 17359 df-starv 17360 df-sca 17361 df-vsca 17362 df-ip 17363 df-tset 17364 df-ple 17365 df-ds 17367 df-unif 17368 df-hom 17369 df-cco 17370 df-0g 17529 df-gsum 17530 df-prds 17535 df-pws 17537 df-imas 17597 df-qus 17598 df-mre 17673 df-mrc 17674 df-acs 17676 df-mgm 18733 df-sgrp 18824 df-mnd 18840 df-mhm 18894 df-submnd 18895 df-grp 19063 df-minusg 19064 df-sbg 19065 df-mulg 19194 df-subg 19249 df-nsg 19250 df-eqg 19251 df-ghm 19344 df-cntz 19447 df-cmn 19912 df-abl 19913 df-mgp 20277 df-rng 20291 df-ur 20324 df-srg 20329 df-ring 20377 df-cring 20378 df-oppr 20481 df-dvdsr 20501 df-unit 20502 df-invr 20532 df-dvr 20545 df-rhm 20616 df-nzr 20676 df-subrng 20711 df-subrg 20735 df-rlreg 20859 df-domn 20860 df-idom 20861 df-drng 20895 df-field 20896 df-lmod 21049 df-lss 21119 df-lsp 21159 df-sra 21360 df-rgmod 21361 df-lidl 21398 df-rsp 21399 df-2idl 21455 df-cnfld 21589 df-zring 21663 df-zrh 21719 df-zn 21722 df-assa 22071 df-asp 22072 df-ascl 22073 df-psr 22127 df-mvr 22128 df-mpl 22129 df-opsr 22131 df-evls 22293 df-evl 22294 df-psr1 22408 df-vr1 22409 df-ply1 22410 df-coe1 22411 df-evl1 22544 df-mdeg 26283 df-deg1 26284 df-mon1 26359 df-uc1p 26360 df-q1p 26361 df-r1p 26362 df-lgs 27534 |
| This theorem is used by: 2sqb 27671 2sqnn0 27677 |
| Copyright terms: Public domain | W3C validator |