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

Theorem 2sqmo 27610
Description: There exists at most one decomposition of a prime as a sum of two squares. See 2sqb 27605 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 1944 . . . . . . . . . . . 12 𝑏((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0)
2 nfre1 3290 . . . . . . . . . . . 12 𝑏𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)
31, 2nfan 1929 . . . . . . . . . . 11 𝑏(((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ ∃𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃))
4 nfv 1944 . . . . . . . . . . 11 𝑏 𝑑 ∈ ℕ0
53, 4nfan 1929 . . . . . . . . . 10 𝑏((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ ∃𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)) ∧ 𝑑 ∈ ℕ0)
6 nfv 1944 . . . . . . . . . 10 𝑏 𝑐𝑑
75, 6nfan 1929 . . . . . . . . 9 𝑏(((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ ∃𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)) ∧ 𝑑 ∈ ℕ0) ∧ 𝑐𝑑)
8 nfv 1944 . . . . . . . . 9 𝑏((𝑐↑2) + (𝑑↑2)) = 𝑃
97, 8nfan 1929 . . . . . . . 8 𝑏((((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ ∃𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)) ∧ 𝑑 ∈ ℕ0) ∧ 𝑐𝑑) ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃)
10 simp-8l 802 . . . . . . . . . . . 12 (((((((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ 𝑑 ∈ ℕ0) ∧ 𝑐𝑑) ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃) ∧ 𝑏 ∈ ℕ0) ∧ 𝑎𝑏) ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → 𝑃 ∈ ℙ)
11 simp-8r 803 . . . . . . . . . . . 12 (((((((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ 𝑑 ∈ ℕ0) ∧ 𝑐𝑑) ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃) ∧ 𝑏 ∈ ℕ0) ∧ 𝑎𝑏) ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → 𝑎 ∈ ℕ0)
12 simpllr 787 . . . . . . . . . . . 12 (((((((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ 𝑑 ∈ ℕ0) ∧ 𝑐𝑑) ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃) ∧ 𝑏 ∈ ℕ0) ∧ 𝑎𝑏) ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → 𝑏 ∈ ℕ0)
13 simp-7r 801 . . . . . . . . . . . 12 (((((((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ 𝑑 ∈ ℕ0) ∧ 𝑐𝑑) ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃) ∧ 𝑏 ∈ ℕ0) ∧ 𝑎𝑏) ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → 𝑐 ∈ ℕ0)
14 simp-6r 799 . . . . . . . . . . . 12 (((((((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ 𝑑 ∈ ℕ0) ∧ 𝑐𝑑) ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃) ∧ 𝑏 ∈ ℕ0) ∧ 𝑎𝑏) ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → 𝑑 ∈ ℕ0)
15 simplr 780 . . . . . . . . . . . 12 (((((((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ 𝑑 ∈ ℕ0) ∧ 𝑐𝑑) ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃) ∧ 𝑏 ∈ ℕ0) ∧ 𝑎𝑏) ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → 𝑎𝑏)
16 simp-5r 797 . . . . . . . . . . . 12 (((((((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ 𝑑 ∈ ℕ0) ∧ 𝑐𝑑) ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃) ∧ 𝑏 ∈ ℕ0) ∧ 𝑎𝑏) ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → 𝑐𝑑)
17 simpr 489 . . . . . . . . . . . 12 (((((((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ 𝑑 ∈ ℕ0) ∧ 𝑐𝑑) ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃) ∧ 𝑏 ∈ ℕ0) ∧ 𝑎𝑏) ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → ((𝑎↑2) + (𝑏↑2)) = 𝑃)
18 simp-4r 795 . . . . . . . . . . . 12 (((((((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ 𝑑 ∈ ℕ0) ∧ 𝑐𝑑) ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃) ∧ 𝑏 ∈ ℕ0) ∧ 𝑎𝑏) ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → ((𝑐↑2) + (𝑑↑2)) = 𝑃)
1910, 11, 12, 13, 14, 15, 16, 17, 182sqmod 27609 . . . . . . . . . . 11 (((((((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ 𝑑 ∈ ℕ0) ∧ 𝑐𝑑) ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃) ∧ 𝑏 ∈ ℕ0) ∧ 𝑎𝑏) ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → (𝑎 = 𝑐𝑏 = 𝑑))
2019simpld 499 . . . . . . . . . 10 (((((((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ 𝑑 ∈ ℕ0) ∧ 𝑐𝑑) ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃) ∧ 𝑏 ∈ ℕ0) ∧ 𝑎𝑏) ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) → 𝑎 = 𝑐)
2120anasss 471 . . . . . . . . 9 ((((((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ 𝑑 ∈ ℕ0) ∧ 𝑐𝑑) ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃) ∧ 𝑏 ∈ ℕ0) ∧ (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)) → 𝑎 = 𝑐)
2221adantl5r 774 . . . . . . . 8 (((((((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ ∃𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)) ∧ 𝑑 ∈ ℕ0) ∧ 𝑐𝑑) ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃) ∧ 𝑏 ∈ ℕ0) ∧ (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)) → 𝑎 = 𝑐)
23 simp-4r 795 . . . . . . . 8 (((((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ ∃𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)) ∧ 𝑑 ∈ ℕ0) ∧ 𝑐𝑑) ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃) → ∃𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃))
249, 22, 23r19.29af 3274 . . . . . . 7 (((((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ ∃𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)) ∧ 𝑑 ∈ ℕ0) ∧ 𝑐𝑑) ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃) → 𝑎 = 𝑐)
2524anasss 471 . . . . . 6 ((((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ ∃𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)) ∧ 𝑑 ∈ ℕ0) ∧ (𝑐𝑑 ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃)) → 𝑎 = 𝑐)
2625r19.29an 3169 . . . . 5 (((((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) ∧ ∃𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃)) ∧ ∃𝑑 ∈ ℕ0 (𝑐𝑑 ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃)) → 𝑎 = 𝑐)
2726expl 462 . . . 4 (((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) ∧ 𝑐 ∈ ℕ0) → ((∃𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ∧ ∃𝑑 ∈ ℕ0 (𝑐𝑑 ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃)) → 𝑎 = 𝑐))
2827ralrimiva 3157 . . 3 ((𝑃 ∈ ℙ ∧ 𝑎 ∈ ℕ0) → ∀𝑐 ∈ ℕ0 ((∃𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ∧ ∃𝑑 ∈ ℕ0 (𝑐𝑑 ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃)) → 𝑎 = 𝑐))
2928ralrimiva 3157 . 2 (𝑃 ∈ ℙ → ∀𝑎 ∈ ℕ0𝑐 ∈ ℕ0 ((∃𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ∧ ∃𝑑 ∈ ℕ0 (𝑐𝑑 ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃)) → 𝑎 = 𝑐))
30 breq12 5114 . . . . 5 ((𝑎 = 𝑐𝑏 = 𝑑) → (𝑎𝑏𝑐𝑑))
31 simpl 487 . . . . . . . 8 ((𝑎 = 𝑐𝑏 = 𝑑) → 𝑎 = 𝑐)
3231oveq1d 7425 . . . . . . 7 ((𝑎 = 𝑐𝑏 = 𝑑) → (𝑎↑2) = (𝑐↑2))
33 simpr 489 . . . . . . . 8 ((𝑎 = 𝑐𝑏 = 𝑑) → 𝑏 = 𝑑)
3433oveq1d 7425 . . . . . . 7 ((𝑎 = 𝑐𝑏 = 𝑑) → (𝑏↑2) = (𝑑↑2))
3532, 34oveq12d 7428 . . . . . 6 ((𝑎 = 𝑐𝑏 = 𝑑) → ((𝑎↑2) + (𝑏↑2)) = ((𝑐↑2) + (𝑑↑2)))
3635eqeq1d 2765 . . . . 5 ((𝑎 = 𝑐𝑏 = 𝑑) → (((𝑎↑2) + (𝑏↑2)) = 𝑃 ↔ ((𝑐↑2) + (𝑑↑2)) = 𝑃))
3730, 36anbi12d 643 . . . 4 ((𝑎 = 𝑐𝑏 = 𝑑) → ((𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ↔ (𝑐𝑑 ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃)))
3837cbvrexdva 3246 . . 3 (𝑎 = 𝑐 → (∃𝑏 ∈ ℕ0 (𝑎𝑏 ∧ ((𝑎↑2) + (𝑏↑2)) = 𝑃) ↔ ∃𝑑 ∈ ℕ0 (𝑐𝑑 ∧ ((𝑐↑2) + (𝑑↑2)) = 𝑃)))
3938rmo4 3693 . 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 400   = wceq 1570  wcel 2143  wral 3079  wrex 3089  ∃*wrmo 3368   class class class wbr 5109  (class class class)co 7410   + caddc 11107  cle 11248  2c2 12299  0cn0 12508  cexp 14102  cprime 16733
This proof depends on axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1825  ax-4 1839  ax-5 1940  ax-6 1997  ax-7 2038  ax-8 2145  ax-9 2153  ax-10 2176  ax-11 2192  ax-12 2213  ax-ext 2735  ax-sep 5257  ax-nul 5269  ax-pow 5336  ax-pr 5404  ax-un 7732  ax-cnex 11160  ax-resscn 11161  ax-1cn 11162  ax-icn 11163  ax-addcl 11164  ax-addrcl 11165  ax-mulcl 11166  ax-mulrcl 11167  ax-mulcom 11168  ax-addass 11169  ax-mulass 11170  ax-distr 11171  ax-i2m1 11172  ax-1ne0 11173  ax-1rid 11174  ax-rnegex 11175  ax-rrecex 11176  ax-cnre 11177  ax-pre-lttri 11178  ax-pre-lttrn 11179  ax-pre-ltadd 11180  ax-pre-mulgt0 11181  ax-pre-sup 11182
This proof depends on definitions:  df-bi 210  df-an 401  df-or 861  df-3or 1104  df-3an 1105  df-tru 1573  df-fal 1583  df-ex 1810  df-nf 1814  df-sb 2097  df-mo 2567  df-eu 2597  df-clab 2742  df-cleq 2755  df-clel 2838  df-nfc 2912  df-ne 2959  df-nel 3065  df-ral 3080  df-rex 3090  df-rmo 3369  df-reu 3370  df-rab 3417  df-v 3457  df-sbc 3745  df-csb 3854  df-dif 3908  df-un 3910  df-in 3912  df-ss 3922  df-pss 3925  df-nul 4287  df-if 4488  df-pw 4564  df-sn 4590  df-pr 4592  df-op 4596  df-uni 4873  df-iun 4958  df-br 5110  df-opab 5174  df-mpt 5193  df-tr 5219  df-id 5556  df-eprel 5561  df-po 5569  df-so 5570  df-fr 5614  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 6302  df-ord 6363  df-on 6364  df-lim 6365  df-suc 6366  df-iota 6492  df-fun 6538  df-fn 6539  df-f 6540  df-f1 6541  df-fo 6542  df-f1o 6543  df-fv 6544  df-riota 7367  df-ov 7413  df-oprab 7414  df-mpo 7415  df-om 7859  df-2nd 7983  df-frecs 8274  df-wrecs 8305  df-recs 8354  df-rdg 8393  df-1o 8449  df-2o 8450  df-er 8690  df-en 8940  df-dom 8941  df-sdom 8942  df-fin 8943  df-sup 9398  df-inf 9399  df-pnf 11249  df-mnf 11250  df-xr 11251  df-ltxr 11252  df-le 11253  df-sub 11447  df-neg 11448  df-div 11876  df-nn 12238  df-2 12307  df-3 12308  df-n0 12509  df-z 12596  df-uz 12867  df-rp 13021  df-fl 13830  df-mod 13908  df-seq 14043  df-exp 14103  df-cj 15155  df-re 15156  df-im 15157  df-sqrt 15291  df-abs 15292  df-dvds 16315  df-gcd 16557  df-prm 16734
This theorem is used by:  2sqreulem1  27619  2sqreunnlem1  27622
  Copyright terms: Public domain W3C validator