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

Theorem 2sqreuopltb 26720
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 26714. (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 260 . . 3 ((𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ↔ (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃))
212sqreultb 26714 . 2 (𝑃 ∈ ℙ → ((𝑃 mod 4) = 1 ↔ (∃!𝑎 ∈ ℕ0𝑏 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ∧ ∃!𝑏 ∈ ℕ0𝑎 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃))))
3 fveq2 6826 . . . . . 6 (𝑝 = ⟨𝑎, 𝑏⟩ → (1st𝑝) = (1st ‘⟨𝑎, 𝑏⟩))
4 fveq2 6826 . . . . . 6 (𝑝 = ⟨𝑎, 𝑏⟩ → (2nd𝑝) = (2nd ‘⟨𝑎, 𝑏⟩))
53, 4breq12d 5106 . . . . 5 (𝑝 = ⟨𝑎, 𝑏⟩ → ((1st𝑝) < (2nd𝑝) ↔ (1st ‘⟨𝑎, 𝑏⟩) < (2nd ‘⟨𝑎, 𝑏⟩)))
6 vex 3445 . . . . . . 7 𝑎 ∈ V
7 vex 3445 . . . . . . 7 𝑏 ∈ V
86, 7op1st 7908 . . . . . 6 (1st ‘⟨𝑎, 𝑏⟩) = 𝑎
96, 7op2nd 7909 . . . . . 6 (2nd ‘⟨𝑎, 𝑏⟩) = 𝑏
108, 9breq12i 5102 . . . . 5 ((1st ‘⟨𝑎, 𝑏⟩) < (2nd ‘⟨𝑎, 𝑏⟩) ↔ 𝑎 < 𝑏)
115, 10bitrdi 286 . . . 4 (𝑝 = ⟨𝑎, 𝑏⟩ → ((1st𝑝) < (2nd𝑝) ↔ 𝑎 < 𝑏))
126, 7op1std 7910 . . . . . . 7 (𝑝 = ⟨𝑎, 𝑏⟩ → (1st𝑝) = 𝑎)
1312oveq1d 7353 . . . . . 6 (𝑝 = ⟨𝑎, 𝑏⟩ → ((1st𝑝)↑2) = (𝑎↑2))
146, 7op2ndd 7911 . . . . . . 7 (𝑝 = ⟨𝑎, 𝑏⟩ → (2nd𝑝) = 𝑏)
1514oveq1d 7353 . . . . . 6 (𝑝 = ⟨𝑎, 𝑏⟩ → ((2nd𝑝)↑2) = (𝑏↑2))
1613, 15oveq12d 7356 . . . . 5 (𝑝 = ⟨𝑎, 𝑏⟩ → (((1st𝑝)↑2) + ((2nd𝑝)↑2)) = ((𝑎↑2) + (𝑏↑2)))
1716eqeq1d 2738 . . . 4 (𝑝 = ⟨𝑎, 𝑏⟩ → ((((1st𝑝)↑2) + ((2nd𝑝)↑2)) = 𝑃 ↔ ((𝑎↑2) + (𝑏↑2)) = 𝑃))
1811, 17anbi12d 631 . . 3 (𝑝 = ⟨𝑎, 𝑏⟩ → (((1st𝑝) < (2nd𝑝) ∧ (((1st𝑝)↑2) + ((2nd𝑝)↑2)) = 𝑃) ↔ (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)))
1918opreu2reurex 6233 . 2 (∃!𝑝 ∈ (ℕ0 × ℕ0)((1st𝑝) < (2nd𝑝) ∧ (((1st𝑝)↑2) + ((2nd𝑝)↑2)) = 𝑃) ↔ (∃!𝑎 ∈ ℕ0𝑏 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ∧ ∃!𝑏 ∈ ℕ0𝑎 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)))
202, 19bitr4di 288 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 396   = wceq 1540  wcel 2105  wrex 3070  ∃!wreu 3347  cop 4580   class class class wbr 5093   × cxp 5619  cfv 6480  (class class class)co 7338  1st c1st 7898  2nd c2nd 7899  1c1 10974   + caddc 10976   < clt 11111  2c2 12130  4c4 12132  0cn0 12335   mod cmo 13691  cexp 13884  cprime 16474
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 1912  ax-6 1970  ax-7 2010  ax-8 2107  ax-9 2115  ax-10 2136  ax-11 2153  ax-12 2170  ax-ext 2707  ax-rep 5230  ax-sep 5244  ax-nul 5251  ax-pow 5309  ax-pr 5373  ax-un 7651  ax-cnex 11029  ax-resscn 11030  ax-1cn 11031  ax-icn 11032  ax-addcl 11033  ax-addrcl 11034  ax-mulcl 11035  ax-mulrcl 11036  ax-mulcom 11037  ax-addass 11038  ax-mulass 11039  ax-distr 11040  ax-i2m1 11041  ax-1ne0 11042  ax-1rid 11043  ax-rnegex 11044  ax-rrecex 11045  ax-cnre 11046  ax-pre-lttri 11047  ax-pre-lttrn 11048  ax-pre-ltadd 11049  ax-pre-mulgt0 11050  ax-pre-sup 11051  ax-addf 11052  ax-mulf 11053
This theorem depends on definitions:  df-bi 206  df-an 397  df-or 845  df-3or 1087  df-3an 1088  df-tru 1543  df-fal 1553  df-ex 1781  df-nf 1785  df-sb 2067  df-mo 2538  df-eu 2567  df-clab 2714  df-cleq 2728  df-clel 2814  df-nfc 2886  df-ne 2941  df-nel 3047  df-ral 3062  df-rex 3071  df-rmo 3349  df-reu 3350  df-rab 3404  df-v 3443  df-sbc 3728  df-csb 3844  df-dif 3901  df-un 3903  df-in 3905  df-ss 3915  df-pss 3917  df-nul 4271  df-if 4475  df-pw 4550  df-sn 4575  df-pr 4577  df-tp 4579  df-op 4581  df-uni 4854  df-int 4896  df-iun 4944  df-iin 4945  df-br 5094  df-opab 5156  df-mpt 5177  df-tr 5211  df-id 5519  df-eprel 5525  df-po 5533  df-so 5534  df-fr 5576  df-se 5577  df-we 5578  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-pred 6239  df-ord 6306  df-on 6307  df-lim 6308  df-suc 6309  df-iota 6432  df-fun 6482  df-fn 6483  df-f 6484  df-f1 6485  df-fo 6486  df-f1o 6487  df-fv 6488  df-isom 6489  df-riota 7294  df-ov 7341  df-oprab 7342  df-mpo 7343  df-of 7596  df-ofr 7597  df-om 7782  df-1st 7900  df-2nd 7901  df-supp 8049  df-tpos 8113  df-frecs 8168  df-wrecs 8199  df-recs 8273  df-rdg 8312  df-1o 8368  df-2o 8369  df-oadd 8372  df-er 8570  df-ec 8572  df-qs 8576  df-map 8689  df-pm 8690  df-ixp 8758  df-en 8806  df-dom 8807  df-sdom 8808  df-fin 8809  df-fsupp 9228  df-sup 9300  df-inf 9301  df-oi 9368  df-dju 9759  df-card 9797  df-pnf 11113  df-mnf 11114  df-xr 11115  df-ltxr 11116  df-le 11117  df-sub 11309  df-neg 11310  df-div 11735  df-nn 12076  df-2 12138  df-3 12139  df-4 12140  df-5 12141  df-6 12142  df-7 12143  df-8 12144  df-9 12145  df-n0 12336  df-xnn0 12408  df-z 12422  df-dec 12540  df-uz 12685  df-q 12791  df-rp 12833  df-fz 13342  df-fzo 13485  df-fl 13614  df-mod 13692  df-seq 13824  df-exp 13885  df-hash 14147  df-cj 14910  df-re 14911  df-im 14912  df-sqrt 15046  df-abs 15047  df-dvds 16064  df-gcd 16302  df-prm 16475  df-phi 16565  df-pc 16636  df-gz 16729  df-struct 16946  df-sets 16963  df-slot 16981  df-ndx 16993  df-base 17011  df-ress 17040  df-plusg 17073  df-mulr 17074  df-starv 17075  df-sca 17076  df-vsca 17077  df-ip 17078  df-tset 17079  df-ple 17080  df-ds 17082  df-unif 17083  df-hom 17084  df-cco 17085  df-0g 17250  df-gsum 17251  df-prds 17256  df-pws 17258  df-imas 17317  df-qus 17318  df-mre 17393  df-mrc 17394  df-acs 17396  df-mgm 18424  df-sgrp 18473  df-mnd 18484  df-mhm 18528  df-submnd 18529  df-grp 18677  df-minusg 18678  df-sbg 18679  df-mulg 18798  df-subg 18849  df-nsg 18850  df-eqg 18851  df-ghm 18929  df-cntz 19020  df-cmn 19484  df-abl 19485  df-mgp 19817  df-ur 19834  df-srg 19838  df-ring 19881  df-cring 19882  df-oppr 19958  df-dvdsr 19979  df-unit 19980  df-invr 20010  df-dvr 20021  df-rnghom 20055  df-drng 20096  df-field 20097  df-subrg 20128  df-lmod 20232  df-lss 20301  df-lsp 20341  df-sra 20541  df-rgmod 20542  df-lidl 20543  df-rsp 20544  df-2idl 20610  df-nzr 20636  df-rlreg 20661  df-domn 20662  df-idom 20663  df-cnfld 20705  df-zring 20778  df-zrh 20812  df-zn 20815  df-assa 21167  df-asp 21168  df-ascl 21169  df-psr 21219  df-mvr 21220  df-mpl 21221  df-opsr 21223  df-evls 21389  df-evl 21390  df-psr1 21458  df-vr1 21459  df-ply1 21460  df-coe1 21461  df-evl1 21589  df-mdeg 25324  df-deg1 25325  df-mon1 25402  df-uc1p 25403  df-q1p 25404  df-r1p 25405  df-lgs 26550
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator