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

Theorem 2sqmo 27656
Description: There exists at most one decomposition of a prime as a sum of two squares. See 2sqb 27651 for the existence of such a decomposition. (Contributed by Thierry Arnoux, 2-Feb-2020.)
Assertion
Ref Expression
2sqmo (𝑃 ∈ ℙ → ∃*𝑎 ∈ ℕ0𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃))
Distinct variable group:   𝑃,𝑎,𝑏

Proof of Theorem 2sqmo
Dummy variables 𝑐 𝑑 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 nfv 1947 . . . . . . . . . . . 12 𝑏((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0)
2 nfre1 3292 . . . . . . . . . . . 12 𝑏𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)
31, 2nfan 1932 . . . . . . . . . . 11 𝑏(((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ ∃𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃))
4 nfv 1947 . . . . . . . . . . 11 𝑏 𝑑 ∈ ℕ0
53, 4nfan 1932 . . . . . . . . . 10 𝑏((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ ∃𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)) ∧ 𝑑 ∈ ℕ0)
6 nfv 1947 . . . . . . . . . 10 𝑏 𝑐𝑑
75, 6nfan 1932 . . . . . . . . 9 𝑏(((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ ∃𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)) ∧ 𝑑 ∈ ℕ0) ∧ 𝑐𝑑)
8 nfv 1947 . . . . . . . . 9 𝑏((𝑐↑2) + (𝑑↑2)) = 𝑃
97, 8nfan 1932 . . . . . . . 8 𝑏((((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ ∃𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)) ∧ 𝑑 ∈ ℕ0) ∧ 𝑐𝑑) ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃)
10 simp-8l 803 . . . . . . . . . . . 12 (((((((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ 𝑑 ∈ ℕ0) ∧ 𝑐𝑑) ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃) ∧ 𝑏 ∈ ℕ0) ∧ 𝑎𝑏) ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → 𝑃 ∈ ℙ)
11 simp-8r 804 . . . . . . . . . . . 12 (((((((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ 𝑑 ∈ ℕ0) ∧ 𝑐𝑑) ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃) ∧ 𝑏 ∈ ℕ0) ∧ 𝑎𝑏) ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → 𝑎 ∈ ℕ0)
12 simpllr 788 . . . . . . . . . . . 12 (((((((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ 𝑑 ∈ ℕ0) ∧ 𝑐𝑑) ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃) ∧ 𝑏 ∈ ℕ0) ∧ 𝑎𝑏) ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → 𝑏 ∈ ℕ0)
13 simp-7r 802 . . . . . . . . . . . 12 (((((((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ 𝑑 ∈ ℕ0) ∧ 𝑐𝑑) ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃) ∧ 𝑏 ∈ ℕ0) ∧ 𝑎𝑏) ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → 𝑐 ∈ ℕ0)
14 simp-6r 800 . . . . . . . . . . . 12 (((((((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ 𝑑 ∈ ℕ0) ∧ 𝑐𝑑) ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃) ∧ 𝑏 ∈ ℕ0) ∧ 𝑎𝑏) ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → 𝑑 ∈ ℕ0)
15 simplr 781 . . . . . . . . . . . 12 (((((((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ 𝑑 ∈ ℕ0) ∧ 𝑐𝑑) ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃) ∧ 𝑏 ∈ ℕ0) ∧ 𝑎𝑏) ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → 𝑎𝑏)
16 simp-5r 798 . . . . . . . . . . . 12 (((((((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ 𝑑 ∈ ℕ0) ∧ 𝑐𝑑) ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃) ∧ 𝑏 ∈ ℕ0) ∧ 𝑎𝑏) ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → 𝑐𝑑)
17 simpr 490 . . . . . . . . . . . 12 (((((((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ 𝑑 ∈ ℕ0) ∧ 𝑐𝑑) ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃) ∧ 𝑏 ∈ ℕ0) ∧ 𝑎𝑏) ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → ((𝑎↑2) + (𝑏↑2)) = 𝑃)
18 simp-4r 796 . . . . . . . . . . . 12 (((((((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ 𝑑 ∈ ℕ0) ∧ 𝑐𝑑) ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃) ∧ 𝑏 ∈ ℕ0) ∧ 𝑎𝑏) ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → ((𝑐↑2) + (𝑑↑2)) = 𝑃)
1910, 11, 12, 13, 14, 15, 16, 17, 182sqmod 27655 . . . . . . . . . . 11 (((((((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ 𝑑 ∈ ℕ0) ∧ 𝑐𝑑) ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃) ∧ 𝑏 ∈ ℕ0) ∧ 𝑎𝑏) ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → (𝑎 = 𝑐𝑏 = 𝑑))
2019simpld 500 . . . . . . . . . 10 (((((((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ 𝑑 ∈ ℕ0) ∧ 𝑐𝑑) ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃) ∧ 𝑏 ∈ ℕ0) ∧ 𝑎𝑏) ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → 𝑎 = 𝑐)
2120anasss 472 . . . . . . . . 9 ((((((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ 𝑑 ∈ ℕ0) ∧ 𝑐𝑑) ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃) ∧ 𝑏 ∈ ℕ0) ∧ (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)) → 𝑎 = 𝑐)
2221adantl5r 775 . . . . . . . 8 (((((((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ ∃𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)) ∧ 𝑑 ∈ ℕ0) ∧ 𝑐𝑑) ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃) ∧ 𝑏 ∈ ℕ0) ∧ (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)) → 𝑎 = 𝑐)
23 simp-4r 796 . . . . . . . 8 (((((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ ∃𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)) ∧ 𝑑 ∈ ℕ0) ∧ 𝑐𝑑) ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃) → ∃𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃))
249, 22, 23r19.29af 3276 . . . . . . 7 (((((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ ∃𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)) ∧ 𝑑 ∈ ℕ0) ∧ 𝑐𝑑) ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃) → 𝑎 = 𝑐)
2524anasss 472 . . . . . 6 ((((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ ∃𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)) ∧ 𝑑 ∈ ℕ0) ∧ (𝑐𝑑 ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃)) → 𝑎 = 𝑐)
2625r19.29an 3171 . . . . 5 (((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ ∃𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)) ∧ ∃𝑑 ∈ ℕ0 (𝑐𝑑 ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃)) → 𝑎 = 𝑐)
2726expl 463 . . . 4 (((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) → ((∃𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ∧ ∃𝑑 ∈ ℕ0 (𝑐𝑑 ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃)) → 𝑎 = 𝑐))
2827ralrimiva 3159 . . 3 ((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) → ∀𝑐 ∈ ℕ0 ((∃𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ∧ ∃𝑑 ∈ ℕ0 (𝑐𝑑 ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃)) → 𝑎 = 𝑐))
2928ralrimiva 3159 . 2 (𝑃 ∈ ℙ → ∀𝑎 ∈ ℕ0𝑐 ∈ ℕ0 ((∃𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ∧ ∃𝑑 ∈ ℕ0 (𝑐𝑑 ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃)) → 𝑎 = 𝑐))
30 breq12 5116 . . . . 5 ((𝑎 = 𝑐𝑏 = 𝑑) → (𝑎𝑏𝑐𝑑))
31 simpl 488 . . . . . . . 8 ((𝑎 = 𝑐𝑏 = 𝑑) → 𝑎 = 𝑐)
3231oveq1d 7434 . . . . . . 7 ((𝑎 = 𝑐𝑏 = 𝑑) → (𝑎↑2) = (𝑐↑2))
33 simpr 490 . . . . . . . 8 ((𝑎 = 𝑐𝑏 = 𝑑) → 𝑏 = 𝑑)
3433oveq1d 7434 . . . . . . 7 ((𝑎 = 𝑐𝑏 = 𝑑) → (𝑏↑2) = (𝑑↑2))
3532, 34oveq12d 7437 . . . . . 6 ((𝑎 = 𝑐𝑏 = 𝑑) → ((𝑎↑2) + (𝑏↑2)) = ((𝑐↑2) + (𝑑↑2)))
3635eqeq1d 2767 . . . . 5 ((𝑎 = 𝑐𝑏 = 𝑑) → (((𝑎↑2) + (𝑏↑2)) = 𝑃 ↔ ((𝑐↑2) + (𝑑↑2)) = 𝑃))
3730, 36anbi12d 644 . . . 4 ((𝑎 = 𝑐𝑏 = 𝑑) → ((𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ↔ (𝑐𝑑 ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃)))
3837cbvrexdva 3248 . . 3 (𝑎 = 𝑐 → (∃𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ↔ ∃𝑑 ∈ ℕ0 (𝑐𝑑 ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃)))
3938rmo4 3695 . 2 (∃*𝑎 ∈ ℕ0𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ↔ ∀𝑎 ∈ ℕ0𝑐 ∈ ℕ0 ((∃𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ∧ ∃𝑑 ∈ ℕ0 (𝑐𝑑 ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃)) → 𝑎 = 𝑐))
4029, 39sylibr 237 1 (𝑃 ∈ ℙ → ∃*𝑎 ∈ ℕ0𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃))
Colors of variables:    wff setvar class
This proof depends on syntax axioms:  wi 4  wa 401   = wceq 1570  wcel 2146  wral 3081  wrex 3091  ∃*wrmo 3370   class class class wbr 5111  (class class class)co 7419   + caddc 11122  cle 11263  2c2 12314  0cn0 12523  cexp 14119  cprime 16755
This proof depends on axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1828  ax-4 1842  ax-5 1943  ax-6 2000  ax-7 2041  ax-8 2148  ax-9 2156  ax-10 2179  ax-11 2195  ax-12 2216  ax-ext 2737  ax-sep 5259  ax-nul 5271  ax-pow 5338  ax-pr 5406  ax-un 7742  ax-cnex 11175  ax-resscn 11176  ax-1cn 11177  ax-icn 11178  ax-addcl 11179  ax-addrcl 11180  ax-mulcl 11181  ax-mulrcl 11182  ax-mulcom 11183  ax-addass 11184  ax-mulass 11185  ax-distr 11186  ax-i2m1 11187  ax-1ne0 11188  ax-1rid 11189  ax-rnegex 11190  ax-rrecex 11191  ax-cnre 11192  ax-pre-lttri 11193  ax-pre-lttrn 11194  ax-pre-ltadd 11195  ax-pre-mulgt0 11196  ax-pre-sup 11197
This proof depends on definitions:  df-bi 210  df-an 402  df-or 862  df-3or 1104  df-3an 1105  df-tru 1573  df-fal 1583  df-ex 1813  df-nf 1817  df-sb 2100  df-mo 2569  df-eu 2599  df-clab 2744  df-cleq 2757  df-clel 2840  df-nfc 2914  df-ne 2961  df-nel 3067  df-ral 3082  df-rex 3092  df-rmo 3371  df-reu 3372  df-rab 3419  df-v 3459  df-sbc 3747  df-csb 3855  df-dif 3909  df-un 3911  df-in 3913  df-ss 3923  df-pss 3926  df-nul 4287  df-if 4490  df-pw 4566  df-sn 4592  df-pr 4594  df-op 4598  df-uni 4875  df-iun 4960  df-br 5112  df-opab 5176  df-mpt 5195  df-tr 5221  df-id 5558  df-eprel 5563  df-po 5571  df-so 5572  df-fr 5616  df-we 5618  df-xp 5669  df-rel 5670  df-cnv 5671  df-co 5672  df-dm 5673  df-rn 5674  df-res 5675  df-ima 5676  df-pred 6306  df-ord 6367  df-on 6368  df-lim 6369  df-suc 6370  df-iota 6496  df-fun 6542  df-fn 6543  df-f 6544  df-f1 6545  df-fo 6546  df-f1o 6547  df-fv 6548  df-riota 7376  df-ov 7422  df-oprab 7423  df-mpo 7424  df-om 7869  df-2nd 7993  df-frecs 8284  df-wrecs 8315  df-recs 8364  df-rdg 8403  df-1o 8459  df-2o 8460  df-er 8700  df-en 8950  df-dom 8951  df-sdom 8952  df-fin 8953  df-sup 9409  df-inf 9410  df-pnf 11264  df-mnf 11265  df-xr 11266  df-ltxr 11267  df-le 11268  df-sub 11462  df-neg 11463  df-div 11891  df-nn 12253  df-2 12322  df-3 12323  df-n0 12524  df-z 12611  df-uz 12883  df-rp 13037  df-fl 13847  df-mod 13925  df-seq 14060  df-exp 14120  df-cj 15178  df-re 15179  df-im 15180  df-sqrt 15314  df-abs 15315  df-dvds 16337  df-gcd 16579  df-prm 16756
This theorem is used by:  2sqreulem1  27665  2sqreunnlem1  27668
  Copyright terms: Public domain W3C validator