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

Theorem 2sqreuopnnltb 27870
Description: There exists a unique decomposition of a prime as a sum of squares of two different positive integers iff the prime is of the form 4𝑘 + 1. Ordered pair variant of 2sqreunnltb 27864. (Contributed by AV, 3-Jul-2023.)
Assertion
Ref Expression
2sqreuopnnltb (𝑃 ∈ ℙ → ((𝑃 mod 4) = 1 ↔ ∃!𝑝 ∈ (ℕ × ℕ)((1st ‘𝑝) < (2nd ‘𝑝) ∧ (((1st ‘𝑝)↑2) + ((2nd ‘𝑝)↑2)) = 𝑃)))
Distinct variable group:   𝑃,𝑝

Proof of Theorem 2sqreuopnnltb
Dummy variables 𝑎 𝑏 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 biid 264 . . 3 ((𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ↔ (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃))
212sqreunnltb 27864 . 2 (𝑃 ∈ ℙ → ((𝑃 mod 4) = 1 ↔ (∃!𝑎 ∈ ℕ ∃𝑏 ∈ ℕ (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ∧ ∃!𝑏 ∈ ℕ ∃𝑎 ∈ ℕ (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃))))
3 fveq2 6926 . . . . . 6 (𝑝 = ⟨𝑎, 𝑏⟩ → (1st ‘𝑝) = (1st ‘⟨𝑎, 𝑏⟩))
4 fveq2 6926 . . . . . 6 (𝑝 = ⟨𝑎, 𝑏⟩ → (2nd ‘𝑝) = (2nd ‘⟨𝑎, 𝑏⟩))
53, 4breq12d 5124 . . . . 5 (𝑝 = ⟨𝑎, 𝑏⟩ → ((1st ‘𝑝) < (2nd ‘𝑝) ↔ (1st ‘⟨𝑎, 𝑏⟩) < (2nd ‘⟨𝑎, 𝑏⟩)))
6 vex 3460 . . . . . . 7 𝑎 ∈ V
7 vex 3460 . . . . . . 7 𝑏 ∈ V
86, 7op1st 8053 . . . . . 6 (1st ‘⟨𝑎, 𝑏⟩) = 𝑎
96, 7op2nd 8054 . . . . . 6 (2nd ‘⟨𝑎, 𝑏⟩) = 𝑏
108, 9breq12i 5120 . . . . 5 ((1st ‘⟨𝑎, 𝑏⟩) < (2nd ‘⟨𝑎, 𝑏⟩) ↔ 𝑎 < 𝑏)
115, 10bitrdi 290 . . . 4 (𝑝 = ⟨𝑎, 𝑏⟩ → ((1st ‘𝑝) < (2nd ‘𝑝) ↔ 𝑎 < 𝑏))
126, 7op1std 8055 . . . . . . 7 (𝑝 = ⟨𝑎, 𝑏⟩ → (1st ‘𝑝) = 𝑎)
1312oveq1d 7476 . . . . . 6 (𝑝 = ⟨𝑎, 𝑏⟩ → ((1st ‘𝑝)↑2) = (𝑎↑2))
146, 7op2ndd 8056 . . . . . . 7 (𝑝 = ⟨𝑎, 𝑏⟩ → (2nd ‘𝑝) = 𝑏)
1514oveq1d 7476 . . . . . 6 (𝑝 = ⟨𝑎, 𝑏⟩ → ((2nd ‘𝑝)↑2) = (𝑏↑2))
1613, 15oveq12d 7479 . . . . 5 (𝑝 = ⟨𝑎, 𝑏⟩ → (((1st ‘𝑝)↑2) + ((2nd ‘𝑝)↑2)) = ((𝑎↑2) + (𝑏↑2)))
1716eqeq1d 2771 . . . 4 (𝑝 = ⟨𝑎, 𝑏⟩ → ((((1st ‘𝑝)↑2) + ((2nd ‘𝑝)↑2)) = 𝑃 ↔ ((𝑎↑2) + (𝑏↑2)) = 𝑃))
1811, 17anbi12d 644 . . 3 (𝑝 = ⟨𝑎, 𝑏⟩ → (((1st ‘𝑝) < (2nd ‘𝑝) ∧ (((1st ‘𝑝)↑2) + ((2nd ‘𝑝)↑2)) = 𝑃) ↔ (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)))
1918opreu2reurex 6330 . 2 (∃!𝑝 ∈ (ℕ × ℕ)((1st ‘𝑝) < (2nd ‘𝑝) ∧ (((1st ‘𝑝)↑2) + ((2nd ‘𝑝)↑2)) = 𝑃) ↔ (∃!𝑎 ∈ ℕ ∃𝑏 ∈ ℕ (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ∧ ∃!𝑏 ∈ ℕ ∃𝑎 ∈ ℕ (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)))
202, 19bitr4di 292 1 (𝑃 ∈ ℙ → ((𝑃 mod 4) = 1 ↔ ∃!𝑝 ∈ (ℕ × ℕ)((1st ‘𝑝) < (2nd ‘𝑝) ∧ (((1st ‘𝑝)↑2) + ((2nd ‘𝑝)↑2)) = 𝑃)))
Colors of variables:    wff setvar class
This proof depends on syntax axioms:   → wi 4   ↔ wb 209   ∧ wa 401   = wceq 1572   ∈ wcel 2151  ∃wrex 3096  ∃!wreu 3369  ⟨cop 4843   class class class wbr 5111   × cxp 5659  ‘cfv 6573  (class class class)co 7461  1st c1st 8043  2nd c2nd 8044  1c1 11250   + caddc 11252   < clt 11392  ℕcn 12385  2c2 12447  4c4 12449   mod cmo 14059  ↑cexp 14254  ℙcprime 16900
This proof depends on axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1830  ax-4 1844  ax-5 1947  ax-6 2004  ax-7 2045  ax-8 2153  ax-9 2161  ax-10 2184  ax-11 2201  ax-12 2220  ax-ext 2741  ax-rep 5241  ax-sep 5258  ax-nul 5269  ax-pow 5337  ax-pr 5401  ax-un 7793  ax-cnex 11305  ax-resscn 11306  ax-1cn 11307  ax-icn 11308  ax-addcl 11309  ax-addrcl 11310  ax-mulcl 11311  ax-mulrcl 11312  ax-mulcom 11313  ax-addass 11314  ax-mulass 11315  ax-distr 11316  ax-i2m1 11317  ax-1ne0 11318  ax-1rid 11319  ax-rnegex 11320  ax-rrecex 11321  ax-cnre 11322  ax-pre-lttri 11323  ax-pre-lttrn 11324  ax-pre-ltadd 11325  ax-pre-mulgt0 11326  ax-pre-sup 11327  ax-addf 11328  ax-mulf 11329
This proof depends on definitions:  df-bi 210  df-an 402  df-or 862  df-3or 1105  df-3an 1106  df-tru 1575  df-fal 1585  df-ex 1815  df-nf 1819  df-sb 2105  df-mo 2571  df-eu 2601  df-clab 2748  df-cleq 2761  df-clel 2845  df-nfc 2919  df-ne 2966  df-nel 3072  df-ral 3087  df-rex 3097  df-rmo 3371  df-reu 3372  df-rab 3419  df-v 3458  df-sbc 3745  df-csb 3854  df-ss 3903  df-pss 4019  df-dif 4052  df-in 4096  df-un 4156  df-nul 4284  df-if 4488  df-pw 4564  df-sn 4591  df-pr 4593  df-tp 4595  df-op 4844  df-uni 4876  df-int 4916  df-iun 4961  df-iin 4962  df-br 5112  df-opab 5177  df-mpt 5196  df-tr 5222  df-id 5556  df-eprel 5561  df-po 5569  df-so 5570  df-fr 5614  df-se 5615  df-we 5616  df-xp 5667  df-rel 5668  df-cnv 5669  df-co 5670  df-dm 5671  df-rn 5672  df-res 5673  df-ima 5674  df-pred 6337  df-ord 6398  df-on 6399  df-lim 6400  df-suc 6401  df-iota 6527  df-fun 6575  df-fn 6576  df-f 6577  df-f1 6578  df-fo 6579  df-f1o 6580  df-fv 6581  df-isom 6582  df-riota 7418  df-ov 7464  df-oprab 7465  df-mpo 7466  df-of 7735  df-ofr 7736  df-om 7922  df-1st 8045  df-2nd 8046  df-supp 8225  df-tpos 8291  df-frecs 8347  df-wrecs 8378  df-recs 8427  df-rdg 8466  df-1o 8524  df-2o 8525  df-oadd 8528  df-er 8765  df-ec 8767  df-qs 8771  df-map 8897  df-pm 8898  df-ixp 8974  df-en 9022  df-dom 9023  df-sdom 9024  df-fin 9025  df-fsupp 9402  df-sup 9481  df-inf 9482  df-oi 9551  df-dju 10029  df-card 10067  df-pnf 11394  df-mnf 11395  df-xr 11396  df-ltxr 11397  df-le 11398  df-sub 11592  df-neg 11593  df-div 12024  df-nn 12386  df-2 12455  df-3 12456  df-4 12457  df-5 12458  df-6 12459  df-7 12460  df-8 12461  df-9 12462  df-n0 12657  df-xnn0 12730  df-z 12744  df-dec 12865  df-uz 13016  df-q 13126  df-rp 13171  df-fz 13690  df-fzo 13839  df-fl 13982  df-mod 14060  df-seq 14195  df-exp 14255  df-hash 14526  df-cj 15319  df-re 15320  df-im 15321  df-sqrt 15455  df-abs 15456  df-dvds 16476  df-gcd 16718  df-prm 16901  df-phi 17000  df-pc 17072  df-gz 17165  df-struct 17382  df-sets 17399  df-slot 17417  df-ndx 17429  df-base 17445  df-ress 17466  df-plusg 17499  df-mulr 17500  df-starv 17501  df-sca 17502  df-vsca 17503  df-ip 17504  df-tset 17505  df-ple 17506  df-ds 17508  df-unif 17509  df-hom 17510  df-cco 17511  df-euf 17512  df-0g 17679  df-gsum 17680  df-prds 17685  df-pws 17687  df-imas 17747  df-qus 17748  df-mre 17823  df-mrc 17824  df-acs 17826  df-mgm 18883  df-sgrp 18975  df-mnd 18991  df-mhm 19045  df-submnd 19046  df-grp 19214  df-minusg 19215  df-sbg 19216  df-mulg 19345  df-subg 19400  df-nsg 19401  df-eqg 19402  df-ghm 19495  df-cntz 19599  df-cmn 20064  df-abl 20065  df-mgp 20429  df-rng 20443  df-ur 20476  df-srg 20481  df-ring 20529  df-cring 20530  df-oppr 20635  df-dvdsr 20655  df-unit 20656  df-invr 20686  df-dvr 20699  df-rhm 20770  df-nzr 20831  df-subrng 20866  df-subrg 20890  df-rlreg 21014  df-domn 21015  df-idom 21016  df-drng 21050  df-field 21051  df-lmod 21205  df-lss 21275  df-lsp 21315  df-sra 21516  df-rgmod 21517  df-lidl 21554  df-rsp 21555  df-2idl 21611  df-cnfld 21747  df-zring 21824  df-zrh 21881  df-zn 21884  df-assa 22233  df-asp 22234  df-ascl 22235  df-psr 22290  df-mvr 22291  df-mpl 22292  df-mdeg 22293  df-opsr 22295  df-evls 22457  df-evl 22458  df-psr1 22573  df-vr1 22574  df-deg1 22575  df-ply1 22576  df-coe1 22577  df-evl1 22712  df-mon1 26523  df-uc1p 26524  df-q1p 26525  df-r1p 26526  df-lgs 27698
This theorem is used by:  2sqreuopb  27871
  Copyright terms: Public domain W3C validator