MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  2sqreuopltb Structured version   Visualization version   GIF version

Theorem 2sqreuopltb 27372
Description: There exists a unique decomposition of a prime as a sum of squares of two different nonnegative integers iff 𝑃≡1 (mod 4). Ordered pair variant of 2sqreultb 27366. (Contributed by AV, 3-Jul-2023.)
Assertion
Ref Expression
2sqreuopltb (𝑃 ∈ ℙ → ((𝑃 mod 4) = 1 ↔ ∃!𝑝 ∈ (ℕ0 × ℕ0)((1st𝑝) < (2nd𝑝) ∧ (((1st𝑝)↑2) + ((2nd𝑝)↑2)) = 𝑃)))
Distinct variable group:   𝑃,𝑝

Proof of Theorem 2sqreuopltb
Dummy variables 𝑎 𝑏 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 biid 261 . . 3 ((𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ↔ (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃))
212sqreultb 27366 . 2 (𝑃 ∈ ℙ → ((𝑃 mod 4) = 1 ↔ (∃!𝑎 ∈ ℕ0𝑏 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ∧ ∃!𝑏 ∈ ℕ0𝑎 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃))))
3 fveq2 6891 . . . . . 6 (𝑝 = ⟨𝑎, 𝑏⟩ → (1st𝑝) = (1st ‘⟨𝑎, 𝑏⟩))
4 fveq2 6891 . . . . . 6 (𝑝 = ⟨𝑎, 𝑏⟩ → (2nd𝑝) = (2nd ‘⟨𝑎, 𝑏⟩))
53, 4breq12d 5155 . . . . 5 (𝑝 = ⟨𝑎, 𝑏⟩ → ((1st𝑝) < (2nd𝑝) ↔ (1st ‘⟨𝑎, 𝑏⟩) < (2nd ‘⟨𝑎, 𝑏⟩)))
6 vex 3473 . . . . . . 7 𝑎 ∈ V
7 vex 3473 . . . . . . 7 𝑏 ∈ V
86, 7op1st 7993 . . . . . 6 (1st ‘⟨𝑎, 𝑏⟩) = 𝑎
96, 7op2nd 7994 . . . . . 6 (2nd ‘⟨𝑎, 𝑏⟩) = 𝑏
108, 9breq12i 5151 . . . . 5 ((1st ‘⟨𝑎, 𝑏⟩) < (2nd ‘⟨𝑎, 𝑏⟩) ↔ 𝑎 < 𝑏)
115, 10bitrdi 287 . . . 4 (𝑝 = ⟨𝑎, 𝑏⟩ → ((1st𝑝) < (2nd𝑝) ↔ 𝑎 < 𝑏))
126, 7op1std 7995 . . . . . . 7 (𝑝 = ⟨𝑎, 𝑏⟩ → (1st𝑝) = 𝑎)
1312oveq1d 7429 . . . . . 6 (𝑝 = ⟨𝑎, 𝑏⟩ → ((1st𝑝)↑2) = (𝑎↑2))
146, 7op2ndd 7996 . . . . . . 7 (𝑝 = ⟨𝑎, 𝑏⟩ → (2nd𝑝) = 𝑏)
1514oveq1d 7429 . . . . . 6 (𝑝 = ⟨𝑎, 𝑏⟩ → ((2nd𝑝)↑2) = (𝑏↑2))
1613, 15oveq12d 7432 . . . . 5 (𝑝 = ⟨𝑎, 𝑏⟩ → (((1st𝑝)↑2) + ((2nd𝑝)↑2)) = ((𝑎↑2) + (𝑏↑2)))
1716eqeq1d 2729 . . . 4 (𝑝 = ⟨𝑎, 𝑏⟩ → ((((1st𝑝)↑2) + ((2nd𝑝)↑2)) = 𝑃 ↔ ((𝑎↑2) + (𝑏↑2)) = 𝑃))
1811, 17anbi12d 630 . . 3 (𝑝 = ⟨𝑎, 𝑏⟩ → (((1st𝑝) < (2nd𝑝) ∧ (((1st𝑝)↑2) + ((2nd𝑝)↑2)) = 𝑃) ↔ (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)))
1918opreu2reurex 6292 . 2 (∃!𝑝 ∈ (ℕ0 × ℕ0)((1st𝑝) < (2nd𝑝) ∧ (((1st𝑝)↑2) + ((2nd𝑝)↑2)) = 𝑃) ↔ (∃!𝑎 ∈ ℕ0𝑏 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ∧ ∃!𝑏 ∈ ℕ0𝑎 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)))
202, 19bitr4di 289 1 (𝑃 ∈ ℙ → ((𝑃 mod 4) = 1 ↔ ∃!𝑝 ∈ (ℕ0 × ℕ0)((1st𝑝) < (2nd𝑝) ∧ (((1st𝑝)↑2) + ((2nd𝑝)↑2)) = 𝑃)))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 205  wa 395   = wceq 1534  wcel 2099  wrex 3065  ∃!wreu 3369  cop 4630   class class class wbr 5142   × cxp 5670  cfv 6542  (class class class)co 7414  1st c1st 7983  2nd c2nd 7984  1c1 11125   + caddc 11127   < clt 11264  2c2 12283  4c4 12285  0cn0 12488   mod cmo 13852  cexp 14044  cprime 16627
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1790  ax-4 1804  ax-5 1906  ax-6 1964  ax-7 2004  ax-8 2101  ax-9 2109  ax-10 2130  ax-11 2147  ax-12 2164  ax-ext 2698  ax-rep 5279  ax-sep 5293  ax-nul 5300  ax-pow 5359  ax-pr 5423  ax-un 7732  ax-cnex 11180  ax-resscn 11181  ax-1cn 11182  ax-icn 11183  ax-addcl 11184  ax-addrcl 11185  ax-mulcl 11186  ax-mulrcl 11187  ax-mulcom 11188  ax-addass 11189  ax-mulass 11190  ax-distr 11191  ax-i2m1 11192  ax-1ne0 11193  ax-1rid 11194  ax-rnegex 11195  ax-rrecex 11196  ax-cnre 11197  ax-pre-lttri 11198  ax-pre-lttrn 11199  ax-pre-ltadd 11200  ax-pre-mulgt0 11201  ax-pre-sup 11202  ax-addf 11203  ax-mulf 11204
This theorem depends on definitions:  df-bi 206  df-an 396  df-or 847  df-3or 1086  df-3an 1087  df-tru 1537  df-fal 1547  df-ex 1775  df-nf 1779  df-sb 2061  df-mo 2529  df-eu 2558  df-clab 2705  df-cleq 2719  df-clel 2805  df-nfc 2880  df-ne 2936  df-nel 3042  df-ral 3057  df-rex 3066  df-rmo 3371  df-reu 3372  df-rab 3428  df-v 3471  df-sbc 3775  df-csb 3890  df-dif 3947  df-un 3949  df-in 3951  df-ss 3961  df-pss 3963  df-nul 4319  df-if 4525  df-pw 4600  df-sn 4625  df-pr 4627  df-tp 4629  df-op 4631  df-uni 4904  df-int 4945  df-iun 4993  df-iin 4994  df-br 5143  df-opab 5205  df-mpt 5226  df-tr 5260  df-id 5570  df-eprel 5576  df-po 5584  df-so 5585  df-fr 5627  df-se 5628  df-we 5629  df-xp 5678  df-rel 5679  df-cnv 5680  df-co 5681  df-dm 5682  df-rn 5683  df-res 5684  df-ima 5685  df-pred 6299  df-ord 6366  df-on 6367  df-lim 6368  df-suc 6369  df-iota 6494  df-fun 6544  df-fn 6545  df-f 6546  df-f1 6547  df-fo 6548  df-f1o 6549  df-fv 6550  df-isom 6551  df-riota 7370  df-ov 7417  df-oprab 7418  df-mpo 7419  df-of 7677  df-ofr 7678  df-om 7863  df-1st 7985  df-2nd 7986  df-supp 8158  df-tpos 8223  df-frecs 8278  df-wrecs 8309  df-recs 8383  df-rdg 8422  df-1o 8478  df-2o 8479  df-oadd 8482  df-er 8716  df-ec 8718  df-qs 8722  df-map 8836  df-pm 8837  df-ixp 8906  df-en 8954  df-dom 8955  df-sdom 8956  df-fin 8957  df-fsupp 9376  df-sup 9451  df-inf 9452  df-oi 9519  df-dju 9910  df-card 9948  df-pnf 11266  df-mnf 11267  df-xr 11268  df-ltxr 11269  df-le 11270  df-sub 11462  df-neg 11463  df-div 11888  df-nn 12229  df-2 12291  df-3 12292  df-4 12293  df-5 12294  df-6 12295  df-7 12296  df-8 12297  df-9 12298  df-n0 12489  df-xnn0 12561  df-z 12575  df-dec 12694  df-uz 12839  df-q 12949  df-rp 12993  df-fz 13503  df-fzo 13646  df-fl 13775  df-mod 13853  df-seq 13985  df-exp 14045  df-hash 14308  df-cj 15064  df-re 15065  df-im 15066  df-sqrt 15200  df-abs 15201  df-dvds 16217  df-gcd 16455  df-prm 16628  df-phi 16720  df-pc 16791  df-gz 16884  df-struct 17101  df-sets 17118  df-slot 17136  df-ndx 17148  df-base 17166  df-ress 17195  df-plusg 17231  df-mulr 17232  df-starv 17233  df-sca 17234  df-vsca 17235  df-ip 17236  df-tset 17237  df-ple 17238  df-ds 17240  df-unif 17241  df-hom 17242  df-cco 17243  df-0g 17408  df-gsum 17409  df-prds 17414  df-pws 17416  df-imas 17475  df-qus 17476  df-mre 17551  df-mrc 17552  df-acs 17554  df-mgm 18585  df-sgrp 18664  df-mnd 18680  df-mhm 18725  df-submnd 18726  df-grp 18878  df-minusg 18879  df-sbg 18880  df-mulg 19008  df-subg 19062  df-nsg 19063  df-eqg 19064  df-ghm 19152  df-cntz 19252  df-cmn 19721  df-abl 19722  df-mgp 20059  df-rng 20077  df-ur 20106  df-srg 20111  df-ring 20159  df-cring 20160  df-oppr 20255  df-dvdsr 20278  df-unit 20279  df-invr 20309  df-dvr 20322  df-rhm 20393  df-nzr 20434  df-subrng 20465  df-subrg 20490  df-drng 20608  df-field 20609  df-lmod 20727  df-lss 20798  df-lsp 20838  df-sra 21040  df-rgmod 21041  df-lidl 21086  df-rsp 21087  df-2idl 21126  df-rlreg 21212  df-domn 21213  df-idom 21214  df-cnfld 21260  df-zring 21353  df-zrh 21409  df-zn 21412  df-assa 21767  df-asp 21768  df-ascl 21769  df-psr 21822  df-mvr 21823  df-mpl 21824  df-opsr 21826  df-evls 21996  df-evl 21997  df-psr1 22073  df-vr1 22074  df-ply1 22075  df-coe1 22076  df-evl1 22209  df-mdeg 25962  df-deg1 25963  df-mon1 26040  df-uc1p 26041  df-q1p 26042  df-r1p 26043  df-lgs 27202
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator