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

Theorem 2sqreuopltb 27531
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 27525. (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 263 . . 3 ((𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ↔ (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃))
212sqreultb 27525 . 2 (𝑃 ∈ ℙ → ((𝑃 mod 4) = 1 ↔ (∃!𝑎 ∈ ℕ0𝑏 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ∧ ∃!𝑏 ∈ ℕ0𝑎 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃))))
3 fveq2 6869 . . . . . 6 (𝑝 = ⟨𝑎, 𝑏⟩ → (1st𝑝) = (1st ‘⟨𝑎, 𝑏⟩))
4 fveq2 6869 . . . . . 6 (𝑝 = ⟨𝑎, 𝑏⟩ → (2nd𝑝) = (2nd ‘⟨𝑎, 𝑏⟩))
53, 4breq12d 5115 . . . . 5 (𝑝 = ⟨𝑎, 𝑏⟩ → ((1st𝑝) < (2nd𝑝) ↔ (1st ‘⟨𝑎, 𝑏⟩) < (2nd ‘⟨𝑎, 𝑏⟩)))
6 vex 3460 . . . . . . 7 𝑎 ∈ V
7 vex 3460 . . . . . . 7 𝑏 ∈ V
86, 7op1st 7980 . . . . . 6 (1st ‘⟨𝑎, 𝑏⟩) = 𝑎
96, 7op2nd 7981 . . . . . 6 (2nd ‘⟨𝑎, 𝑏⟩) = 𝑏
108, 9breq12i 5111 . . . . 5 ((1st ‘⟨𝑎, 𝑏⟩) < (2nd ‘⟨𝑎, 𝑏⟩) ↔ 𝑎 < 𝑏)
115, 10bitrdi 289 . . . 4 (𝑝 = ⟨𝑎, 𝑏⟩ → ((1st𝑝) < (2nd𝑝) ↔ 𝑎 < 𝑏))
126, 7op1std 7982 . . . . . . 7 (𝑝 = ⟨𝑎, 𝑏⟩ → (1st𝑝) = 𝑎)
1312oveq1d 7413 . . . . . 6 (𝑝 = ⟨𝑎, 𝑏⟩ → ((1st𝑝)↑2) = (𝑎↑2))
146, 7op2ndd 7983 . . . . . . 7 (𝑝 = ⟨𝑎, 𝑏⟩ → (2nd𝑝) = 𝑏)
1514oveq1d 7413 . . . . . 6 (𝑝 = ⟨𝑎, 𝑏⟩ → ((2nd𝑝)↑2) = (𝑏↑2))
1613, 15oveq12d 7416 . . . . 5 (𝑝 = ⟨𝑎, 𝑏⟩ → (((1st𝑝)↑2) + ((2nd𝑝)↑2)) = ((𝑎↑2) + (𝑏↑2)))
1716eqeq1d 2766 . . . 4 (𝑝 = ⟨𝑎, 𝑏⟩ → ((((1st𝑝)↑2) + ((2nd𝑝)↑2)) = 𝑃 ↔ ((𝑎↑2) + (𝑏↑2)) = 𝑃))
1811, 17anbi12d 641 . . 3 (𝑝 = ⟨𝑎, 𝑏⟩ → (((1st𝑝) < (2nd𝑝) ∧ (((1st𝑝)↑2) + ((2nd𝑝)↑2)) = 𝑃) ↔ (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)))
1918opreu2reurex 6283 . 2 (∃!𝑝 ∈ (ℕ0 × ℕ0)((1st𝑝) < (2nd𝑝) ∧ (((1st𝑝)↑2) + ((2nd𝑝)↑2)) = 𝑃) ↔ (∃!𝑎 ∈ ℕ0𝑏 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ∧ ∃!𝑏 ∈ ℕ0𝑎 ∈ ℕ0 (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)))
202, 19bitr4di 291 1 (𝑃 ∈ ℙ → ((𝑃 mod 4) = 1 ↔ ∃!𝑝 ∈ (ℕ0 × ℕ0)((1st𝑝) < (2nd𝑝) ∧ (((1st𝑝)↑2) + ((2nd𝑝)↑2)) = 𝑃)))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 208  wa 399   = wceq 1562  wcel 2144  wrex 3088  ∃!wreu 3367  cop 4590   class class class wbr 5102   × cxp 5647  cfv 6523  (class class class)co 7398  1st c1st 7970  2nd c2nd 7971  1c1 11076   + caddc 11078   < clt 11218  2c2 12274  4c4 12276  0cn0 12483   mod cmo 13881  cexp 14076  cprime 16707
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1817  ax-4 1831  ax-5 1932  ax-6 1989  ax-7 2030  ax-8 2146  ax-9 2154  ax-10 2177  ax-11 2193  ax-12 2214  ax-ext 2736  ax-rep 5229  ax-sep 5248  ax-nul 5258  ax-pow 5324  ax-pr 5392  ax-un 7720  ax-cnex 11131  ax-resscn 11132  ax-1cn 11133  ax-icn 11134  ax-addcl 11135  ax-addrcl 11136  ax-mulcl 11137  ax-mulrcl 11138  ax-mulcom 11139  ax-addass 11140  ax-mulass 11141  ax-distr 11142  ax-i2m1 11143  ax-1ne0 11144  ax-1rid 11145  ax-rnegex 11146  ax-rrecex 11147  ax-cnre 11148  ax-pre-lttri 11149  ax-pre-lttrn 11150  ax-pre-ltadd 11151  ax-pre-mulgt0 11152  ax-pre-sup 11153  ax-addf 11154  ax-mulf 11155
This theorem depends on definitions:  df-bi 209  df-an 400  df-or 859  df-3or 1100  df-3an 1101  df-tru 1565  df-fal 1575  df-ex 1802  df-nf 1806  df-sb 2093  df-mo 2568  df-eu 2598  df-clab 2743  df-cleq 2756  df-clel 2839  df-nfc 2913  df-ne 2960  df-nel 3064  df-ral 3079  df-rex 3089  df-rmo 3369  df-reu 3370  df-rab 3417  df-v 3458  df-sbc 3747  df-csb 3855  df-dif 3909  df-un 3911  df-in 3913  df-ss 3923  df-pss 3926  df-nul 4288  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 5103  df-opab 5165  df-mpt 5184  df-tr 5210  df-id 5544  df-eprel 5549  df-po 5557  df-so 5558  df-fr 5602  df-se 5603  df-we 5604  df-xp 5655  df-rel 5656  df-cnv 5657  df-co 5658  df-dm 5659  df-rn 5660  df-res 5661  df-ima 5662  df-pred 6290  df-ord 6351  df-on 6352  df-lim 6353  df-suc 6354  df-iota 6479  df-fun 6525  df-fn 6526  df-f 6527  df-f1 6528  df-fo 6529  df-f1o 6530  df-fv 6531  df-isom 6532  df-riota 7355  df-ov 7401  df-oprab 7402  df-mpo 7403  df-of 7662  df-ofr 7663  df-om 7849  df-1st 7972  df-2nd 7973  df-supp 8143  df-tpos 8208  df-frecs 8264  df-wrecs 8295  df-recs 8344  df-rdg 8383  df-1o 8439  df-2o 8440  df-oadd 8443  df-er 8680  df-ec 8682  df-qs 8686  df-map 8812  df-pm 8813  df-ixp 8882  df-en 8930  df-dom 8931  df-sdom 8932  df-fin 8933  df-fsupp 9310  df-sup 9390  df-inf 9391  df-oi 9460  df-dju 9861  df-card 9899  df-pnf 11220  df-mnf 11221  df-xr 11222  df-ltxr 11223  df-le 11224  df-sub 11418  df-neg 11419  df-div 11847  df-nn 12213  df-2 12282  df-3 12283  df-4 12284  df-5 12285  df-6 12286  df-7 12287  df-8 12288  df-9 12289  df-n0 12484  df-xnn0 12557  df-z 12571  df-dec 12691  df-uz 12842  df-q 12952  df-rp 12996  df-fz 13515  df-fzo 13662  df-fl 13804  df-mod 13882  df-seq 14017  df-exp 14077  df-hash 14346  df-cj 15128  df-re 15129  df-im 15130  df-sqrt 15264  df-abs 15265  df-dvds 16289  df-gcd 16531  df-prm 16708  df-phi 16803  df-pc 16875  df-gz 16968  df-struct 17185  df-sets 17202  df-slot 17220  df-ndx 17232  df-base 17248  df-ress 17269  df-plusg 17301  df-mulr 17302  df-starv 17303  df-sca 17304  df-vsca 17305  df-ip 17306  df-tset 17307  df-ple 17308  df-ds 17310  df-unif 17311  df-hom 17312  df-cco 17313  df-0g 17472  df-gsum 17473  df-prds 17478  df-pws 17480  df-imas 17540  df-qus 17541  df-mre 17616  df-mrc 17617  df-acs 17619  df-mgm 18676  df-sgrp 18755  df-mnd 18771  df-mhm 18819  df-submnd 18820  df-grp 18980  df-minusg 18981  df-sbg 18982  df-mulg 19112  df-subg 19167  df-nsg 19168  df-eqg 19169  df-ghm 19256  df-cntz 19359  df-cmn 19824  df-abl 19825  df-mgp 20189  df-rng 20201  df-ur 20234  df-srg 20239  df-ring 20287  df-cring 20288  df-oppr 20388  df-dvdsr 20408  df-unit 20409  df-invr 20439  df-dvr 20452  df-rhm 20523  df-nzr 20565  df-subrng 20598  df-subrg 20622  df-rlreg 20746  df-domn 20747  df-idom 20748  df-drng 20783  df-field 20784  df-lmod 20931  df-lss 21001  df-lsp 21041  df-sra 21242  df-rgmod 21243  df-lidl 21280  df-rsp 21281  df-2idl 21322  df-cnfld 21427  df-zring 21501  df-zrh 21557  df-zn 21560  df-assa 21907  df-asp 21908  df-ascl 21909  df-psr 21963  df-mvr 21964  df-mpl 21965  df-opsr 21967  df-evls 22129  df-evl 22130  df-psr1 22244  df-vr1 22245  df-ply1 22246  df-coe1 22247  df-evl1 22381  df-mdeg 26117  df-deg1 26118  df-mon1 26193  df-uc1p 26194  df-q1p 26195  df-r1p 26196  df-lgs 27361
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator