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

Theorem 2sqreunnltb 27410
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. (Contributed by AV, 11-Jun-2023.) The prime needs not be odd, as observed by WL. (Revised by AV, 25-Jun-2023.)
Hypothesis
Ref Expression
2sqreult.1 (𝜑 ↔ (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃))
Assertion
Ref Expression
2sqreunnltb (𝑃 ∈ ℙ → ((𝑃 mod 4) = 1 ↔ (∃!𝑎 ∈ ℕ ∃𝑏 ∈ ℕ 𝜑 ∧ ∃!𝑏 ∈ ℕ ∃𝑎 ∈ ℕ 𝜑)))
Distinct variable group:   𝑃,𝑎,𝑏
Allowed substitution hints:   𝜑(𝑎,𝑏)

Proof of Theorem 2sqreunnltb
StepHypRef Expression
1 2sqreunnltblem 27400 . 2 (𝑃 ∈ ℙ → ((𝑃 mod 4) = 1 ↔ ∃!𝑎 ∈ ℕ ∃!𝑏 ∈ ℕ (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)))
2 2sqreult.1 . . . . . 6 (𝜑 ↔ (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃))
32bicomi 223 . . . . 5 ((𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ↔ 𝜑)
43reubii 3373 . . . 4 (∃!𝑏 ∈ ℕ (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ↔ ∃!𝑏 ∈ ℕ 𝜑)
54reubii 3373 . . 3 (∃!𝑎 ∈ ℕ ∃!𝑏 ∈ ℕ (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ↔ ∃!𝑎 ∈ ℕ ∃!𝑏 ∈ ℕ 𝜑)
622sqreunnlem2 27404 . . . 4 𝑎 ∈ ℕ ∃*𝑏 ∈ ℕ 𝜑
7 2reu1 3883 . . . 4 (∀𝑎 ∈ ℕ ∃*𝑏 ∈ ℕ 𝜑 → (∃!𝑎 ∈ ℕ ∃!𝑏 ∈ ℕ 𝜑 ↔ (∃!𝑎 ∈ ℕ ∃𝑏 ∈ ℕ 𝜑 ∧ ∃!𝑏 ∈ ℕ ∃𝑎 ∈ ℕ 𝜑)))
86, 7ax-mp 5 . . 3 (∃!𝑎 ∈ ℕ ∃!𝑏 ∈ ℕ 𝜑 ↔ (∃!𝑎 ∈ ℕ ∃𝑏 ∈ ℕ 𝜑 ∧ ∃!𝑏 ∈ ℕ ∃𝑎 ∈ ℕ 𝜑))
95, 8bitri 274 . 2 (∃!𝑎 ∈ ℕ ∃!𝑏 ∈ ℕ (𝑎 < 𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ↔ (∃!𝑎 ∈ ℕ ∃𝑏 ∈ ℕ 𝜑 ∧ ∃!𝑏 ∈ ℕ ∃𝑎 ∈ ℕ 𝜑))
101, 9bitrdi 286 1 (𝑃 ∈ ℙ → ((𝑃 mod 4) = 1 ↔ (∃!𝑎 ∈ ℕ ∃𝑏 ∈ ℕ 𝜑 ∧ ∃!𝑏 ∈ ℕ ∃𝑎 ∈ ℕ 𝜑)))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 205  wa 394   = wceq 1533  wcel 2098  wral 3051  wrex 3060  ∃!wreu 3362  ∃*wrmo 3363   class class class wbr 5143  (class class class)co 7415  1c1 11137   + caddc 11139   < clt 11276  cn 12240  2c2 12295  4c4 12297   mod cmo 13864  cexp 14056  cprime 16639
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1789  ax-4 1803  ax-5 1905  ax-6 1963  ax-7 2003  ax-8 2100  ax-9 2108  ax-10 2129  ax-11 2146  ax-12 2166  ax-ext 2696  ax-rep 5280  ax-sep 5294  ax-nul 5301  ax-pow 5359  ax-pr 5423  ax-un 7737  ax-cnex 11192  ax-resscn 11193  ax-1cn 11194  ax-icn 11195  ax-addcl 11196  ax-addrcl 11197  ax-mulcl 11198  ax-mulrcl 11199  ax-mulcom 11200  ax-addass 11201  ax-mulass 11202  ax-distr 11203  ax-i2m1 11204  ax-1ne0 11205  ax-1rid 11206  ax-rnegex 11207  ax-rrecex 11208  ax-cnre 11209  ax-pre-lttri 11210  ax-pre-lttrn 11211  ax-pre-ltadd 11212  ax-pre-mulgt0 11213  ax-pre-sup 11214  ax-addf 11215  ax-mulf 11216
This theorem depends on definitions:  df-bi 206  df-an 395  df-or 846  df-3or 1085  df-3an 1086  df-tru 1536  df-fal 1546  df-ex 1774  df-nf 1778  df-sb 2060  df-mo 2528  df-eu 2557  df-clab 2703  df-cleq 2717  df-clel 2802  df-nfc 2877  df-ne 2931  df-nel 3037  df-ral 3052  df-rex 3061  df-rmo 3364  df-reu 3365  df-rab 3420  df-v 3465  df-sbc 3770  df-csb 3886  df-dif 3943  df-un 3945  df-in 3947  df-ss 3957  df-pss 3960  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 5144  df-opab 5206  df-mpt 5227  df-tr 5261  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 6300  df-ord 6367  df-on 6368  df-lim 6369  df-suc 6370  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 7371  df-ov 7418  df-oprab 7419  df-mpo 7420  df-of 7681  df-ofr 7682  df-om 7868  df-1st 7989  df-2nd 7990  df-supp 8162  df-tpos 8228  df-frecs 8283  df-wrecs 8314  df-recs 8388  df-rdg 8427  df-1o 8483  df-2o 8484  df-oadd 8487  df-er 8721  df-ec 8723  df-qs 8727  df-map 8843  df-pm 8844  df-ixp 8913  df-en 8961  df-dom 8962  df-sdom 8963  df-fin 8964  df-fsupp 9384  df-sup 9463  df-inf 9464  df-oi 9531  df-dju 9922  df-card 9960  df-pnf 11278  df-mnf 11279  df-xr 11280  df-ltxr 11281  df-le 11282  df-sub 11474  df-neg 11475  df-div 11900  df-nn 12241  df-2 12303  df-3 12304  df-4 12305  df-5 12306  df-6 12307  df-7 12308  df-8 12309  df-9 12310  df-n0 12501  df-xnn0 12573  df-z 12587  df-dec 12706  df-uz 12851  df-q 12961  df-rp 13005  df-fz 13515  df-fzo 13658  df-fl 13787  df-mod 13865  df-seq 13997  df-exp 14057  df-hash 14320  df-cj 15076  df-re 15077  df-im 15078  df-sqrt 15212  df-abs 15213  df-dvds 16229  df-gcd 16467  df-prm 16640  df-phi 16732  df-pc 16803  df-gz 16896  df-struct 17113  df-sets 17130  df-slot 17148  df-ndx 17160  df-base 17178  df-ress 17207  df-plusg 17243  df-mulr 17244  df-starv 17245  df-sca 17246  df-vsca 17247  df-ip 17248  df-tset 17249  df-ple 17250  df-ds 17252  df-unif 17253  df-hom 17254  df-cco 17255  df-0g 17420  df-gsum 17421  df-prds 17426  df-pws 17428  df-imas 17487  df-qus 17488  df-mre 17563  df-mrc 17564  df-acs 17566  df-mgm 18597  df-sgrp 18676  df-mnd 18692  df-mhm 18737  df-submnd 18738  df-grp 18895  df-minusg 18896  df-sbg 18897  df-mulg 19026  df-subg 19080  df-nsg 19081  df-eqg 19082  df-ghm 19170  df-cntz 19270  df-cmn 19739  df-abl 19740  df-mgp 20077  df-rng 20095  df-ur 20124  df-srg 20129  df-ring 20177  df-cring 20178  df-oppr 20275  df-dvdsr 20298  df-unit 20299  df-invr 20329  df-dvr 20342  df-rhm 20413  df-nzr 20454  df-subrng 20485  df-subrg 20510  df-drng 20628  df-field 20629  df-lmod 20747  df-lss 20818  df-lsp 20858  df-sra 21060  df-rgmod 21061  df-lidl 21106  df-rsp 21107  df-2idl 21146  df-rlreg 21232  df-domn 21233  df-idom 21234  df-cnfld 21282  df-zring 21375  df-zrh 21431  df-zn 21434  df-assa 21789  df-asp 21790  df-ascl 21791  df-psr 21844  df-mvr 21845  df-mpl 21846  df-opsr 21848  df-evls 22023  df-evl 22024  df-psr1 22105  df-vr1 22106  df-ply1 22107  df-coe1 22108  df-evl1 22242  df-mdeg 26004  df-deg1 26005  df-mon1 26082  df-uc1p 26083  df-q1p 26084  df-r1p 26085  df-lgs 27244
This theorem is referenced by:  2sqreuopnnltb  27416  sq2reunnltb  32326
  Copyright terms: Public domain W3C validator