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

Theorem 2sqlem7 26120
 Description: Lemma for 2sq 26126. (Contributed by Mario Carneiro, 19-Jun-2015.)
Hypotheses
Ref Expression
2sq.1 𝑆 = ran (𝑤 ∈ ℤ[i] ↦ ((abs‘𝑤)↑2))
2sqlem7.2 𝑌 = {𝑧 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ((𝑥 gcd 𝑦) = 1 ∧ 𝑧 = ((𝑥↑2) + (𝑦↑2)))}
Assertion
Ref Expression
2sqlem7 𝑌 ⊆ (𝑆 ∩ ℕ)
Distinct variable groups:   𝑥,𝑤,𝑦,𝑧   𝑥,𝑆,𝑦,𝑧   𝑥,𝑌,𝑦
Allowed substitution hints:   𝑆(𝑤)   𝑌(𝑧,𝑤)

Proof of Theorem 2sqlem7
StepHypRef Expression
1 2sqlem7.2 . 2 𝑌 = {𝑧 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ((𝑥 gcd 𝑦) = 1 ∧ 𝑧 = ((𝑥↑2) + (𝑦↑2)))}
2 simpr 488 . . . . . . 7 (((𝑥 gcd 𝑦) = 1 ∧ 𝑧 = ((𝑥↑2) + (𝑦↑2))) → 𝑧 = ((𝑥↑2) + (𝑦↑2)))
32reximi 3171 . . . . . 6 (∃𝑦 ∈ ℤ ((𝑥 gcd 𝑦) = 1 ∧ 𝑧 = ((𝑥↑2) + (𝑦↑2))) → ∃𝑦 ∈ ℤ 𝑧 = ((𝑥↑2) + (𝑦↑2)))
43reximi 3171 . . . . 5 (∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ((𝑥 gcd 𝑦) = 1 ∧ 𝑧 = ((𝑥↑2) + (𝑦↑2))) → ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ 𝑧 = ((𝑥↑2) + (𝑦↑2)))
5 2sq.1 . . . . . 6 𝑆 = ran (𝑤 ∈ ℤ[i] ↦ ((abs‘𝑤)↑2))
652sqlem2 26114 . . . . 5 (𝑧𝑆 ↔ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ 𝑧 = ((𝑥↑2) + (𝑦↑2)))
74, 6sylibr 237 . . . 4 (∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ((𝑥 gcd 𝑦) = 1 ∧ 𝑧 = ((𝑥↑2) + (𝑦↑2))) → 𝑧𝑆)
8 ax-1ne0 10657 . . . . . . . . . 10 1 ≠ 0
9 gcdeq0 15929 . . . . . . . . . . . . 13 ((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℤ) → ((𝑥 gcd 𝑦) = 0 ↔ (𝑥 = 0 ∧ 𝑦 = 0)))
109adantr 484 . . . . . . . . . . . 12 (((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℤ) ∧ (𝑥 gcd 𝑦) = 1) → ((𝑥 gcd 𝑦) = 0 ↔ (𝑥 = 0 ∧ 𝑦 = 0)))
11 simpr 488 . . . . . . . . . . . . 13 (((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℤ) ∧ (𝑥 gcd 𝑦) = 1) → (𝑥 gcd 𝑦) = 1)
1211eqeq1d 2760 . . . . . . . . . . . 12 (((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℤ) ∧ (𝑥 gcd 𝑦) = 1) → ((𝑥 gcd 𝑦) = 0 ↔ 1 = 0))
1310, 12bitr3d 284 . . . . . . . . . . 11 (((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℤ) ∧ (𝑥 gcd 𝑦) = 1) → ((𝑥 = 0 ∧ 𝑦 = 0) ↔ 1 = 0))
1413necon3bbid 2988 . . . . . . . . . 10 (((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℤ) ∧ (𝑥 gcd 𝑦) = 1) → (¬ (𝑥 = 0 ∧ 𝑦 = 0) ↔ 1 ≠ 0))
158, 14mpbiri 261 . . . . . . . . 9 (((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℤ) ∧ (𝑥 gcd 𝑦) = 1) → ¬ (𝑥 = 0 ∧ 𝑦 = 0))
16 zsqcl2 13565 . . . . . . . . . . . . 13 (𝑥 ∈ ℤ → (𝑥↑2) ∈ ℕ0)
1716ad2antrr 725 . . . . . . . . . . . 12 (((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℤ) ∧ (𝑥 gcd 𝑦) = 1) → (𝑥↑2) ∈ ℕ0)
1817nn0red 12008 . . . . . . . . . . 11 (((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℤ) ∧ (𝑥 gcd 𝑦) = 1) → (𝑥↑2) ∈ ℝ)
1917nn0ge0d 12010 . . . . . . . . . . 11 (((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℤ) ∧ (𝑥 gcd 𝑦) = 1) → 0 ≤ (𝑥↑2))
20 zsqcl2 13565 . . . . . . . . . . . . 13 (𝑦 ∈ ℤ → (𝑦↑2) ∈ ℕ0)
2120ad2antlr 726 . . . . . . . . . . . 12 (((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℤ) ∧ (𝑥 gcd 𝑦) = 1) → (𝑦↑2) ∈ ℕ0)
2221nn0red 12008 . . . . . . . . . . 11 (((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℤ) ∧ (𝑥 gcd 𝑦) = 1) → (𝑦↑2) ∈ ℝ)
2321nn0ge0d 12010 . . . . . . . . . . 11 (((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℤ) ∧ (𝑥 gcd 𝑦) = 1) → 0 ≤ (𝑦↑2))
24 add20 11203 . . . . . . . . . . 11 ((((𝑥↑2) ∈ ℝ ∧ 0 ≤ (𝑥↑2)) ∧ ((𝑦↑2) ∈ ℝ ∧ 0 ≤ (𝑦↑2))) → (((𝑥↑2) + (𝑦↑2)) = 0 ↔ ((𝑥↑2) = 0 ∧ (𝑦↑2) = 0)))
2518, 19, 22, 23, 24syl22anc 837 . . . . . . . . . 10 (((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℤ) ∧ (𝑥 gcd 𝑦) = 1) → (((𝑥↑2) + (𝑦↑2)) = 0 ↔ ((𝑥↑2) = 0 ∧ (𝑦↑2) = 0)))
26 zcn 12038 . . . . . . . . . . . 12 (𝑥 ∈ ℤ → 𝑥 ∈ ℂ)
2726ad2antrr 725 . . . . . . . . . . 11 (((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℤ) ∧ (𝑥 gcd 𝑦) = 1) → 𝑥 ∈ ℂ)
28 zcn 12038 . . . . . . . . . . . 12 (𝑦 ∈ ℤ → 𝑦 ∈ ℂ)
2928ad2antlr 726 . . . . . . . . . . 11 (((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℤ) ∧ (𝑥 gcd 𝑦) = 1) → 𝑦 ∈ ℂ)
30 sqeq0 13549 . . . . . . . . . . . 12 (𝑥 ∈ ℂ → ((𝑥↑2) = 0 ↔ 𝑥 = 0))
31 sqeq0 13549 . . . . . . . . . . . 12 (𝑦 ∈ ℂ → ((𝑦↑2) = 0 ↔ 𝑦 = 0))
3230, 31bi2anan9 638 . . . . . . . . . . 11 ((𝑥 ∈ ℂ ∧ 𝑦 ∈ ℂ) → (((𝑥↑2) = 0 ∧ (𝑦↑2) = 0) ↔ (𝑥 = 0 ∧ 𝑦 = 0)))
3327, 29, 32syl2anc 587 . . . . . . . . . 10 (((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℤ) ∧ (𝑥 gcd 𝑦) = 1) → (((𝑥↑2) = 0 ∧ (𝑦↑2) = 0) ↔ (𝑥 = 0 ∧ 𝑦 = 0)))
3425, 33bitrd 282 . . . . . . . . 9 (((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℤ) ∧ (𝑥 gcd 𝑦) = 1) → (((𝑥↑2) + (𝑦↑2)) = 0 ↔ (𝑥 = 0 ∧ 𝑦 = 0)))
3515, 34mtbird 328 . . . . . . . 8 (((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℤ) ∧ (𝑥 gcd 𝑦) = 1) → ¬ ((𝑥↑2) + (𝑦↑2)) = 0)
36 nn0addcl 11982 . . . . . . . . . . . 12 (((𝑥↑2) ∈ ℕ0 ∧ (𝑦↑2) ∈ ℕ0) → ((𝑥↑2) + (𝑦↑2)) ∈ ℕ0)
3716, 20, 36syl2an 598 . . . . . . . . . . 11 ((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℤ) → ((𝑥↑2) + (𝑦↑2)) ∈ ℕ0)
3837adantr 484 . . . . . . . . . 10 (((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℤ) ∧ (𝑥 gcd 𝑦) = 1) → ((𝑥↑2) + (𝑦↑2)) ∈ ℕ0)
39 elnn0 11949 . . . . . . . . . 10 (((𝑥↑2) + (𝑦↑2)) ∈ ℕ0 ↔ (((𝑥↑2) + (𝑦↑2)) ∈ ℕ ∨ ((𝑥↑2) + (𝑦↑2)) = 0))
4038, 39sylib 221 . . . . . . . . 9 (((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℤ) ∧ (𝑥 gcd 𝑦) = 1) → (((𝑥↑2) + (𝑦↑2)) ∈ ℕ ∨ ((𝑥↑2) + (𝑦↑2)) = 0))
4140ord 861 . . . . . . . 8 (((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℤ) ∧ (𝑥 gcd 𝑦) = 1) → (¬ ((𝑥↑2) + (𝑦↑2)) ∈ ℕ → ((𝑥↑2) + (𝑦↑2)) = 0))
4235, 41mt3d 150 . . . . . . 7 (((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℤ) ∧ (𝑥 gcd 𝑦) = 1) → ((𝑥↑2) + (𝑦↑2)) ∈ ℕ)
43 eleq1 2839 . . . . . . 7 (𝑧 = ((𝑥↑2) + (𝑦↑2)) → (𝑧 ∈ ℕ ↔ ((𝑥↑2) + (𝑦↑2)) ∈ ℕ))
4442, 43syl5ibrcom 250 . . . . . 6 (((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℤ) ∧ (𝑥 gcd 𝑦) = 1) → (𝑧 = ((𝑥↑2) + (𝑦↑2)) → 𝑧 ∈ ℕ))
4544expimpd 457 . . . . 5 ((𝑥 ∈ ℤ ∧ 𝑦 ∈ ℤ) → (((𝑥 gcd 𝑦) = 1 ∧ 𝑧 = ((𝑥↑2) + (𝑦↑2))) → 𝑧 ∈ ℕ))
4645rexlimivv 3216 . . . 4 (∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ((𝑥 gcd 𝑦) = 1 ∧ 𝑧 = ((𝑥↑2) + (𝑦↑2))) → 𝑧 ∈ ℕ)
477, 46elind 4101 . . 3 (∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ((𝑥 gcd 𝑦) = 1 ∧ 𝑧 = ((𝑥↑2) + (𝑦↑2))) → 𝑧 ∈ (𝑆 ∩ ℕ))
4847abssi 3976 . 2 {𝑧 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ((𝑥 gcd 𝑦) = 1 ∧ 𝑧 = ((𝑥↑2) + (𝑦↑2)))} ⊆ (𝑆 ∩ ℕ)
491, 48eqsstri 3928 1 𝑌 ⊆ (𝑆 ∩ ℕ)
 Colors of variables: wff setvar class Syntax hints:  ¬ wn 3   ↔ wb 209   ∧ wa 399   ∨ wo 844   = wceq 1538   ∈ wcel 2111  {cab 2735   ≠ wne 2951  ∃wrex 3071   ∩ cin 3859   ⊆ wss 3860   class class class wbr 5036   ↦ cmpt 5116  ran crn 5529  ‘cfv 6340  (class class class)co 7156  ℂcc 10586  ℝcr 10587  0cc0 10588  1c1 10589   + caddc 10591   ≤ cle 10727  ℕcn 11687  2c2 11742  ℕ0cn0 11947  ℤcz 12033  ↑cexp 13492  abscabs 14654   gcd cgcd 15906  ℤ[i]cgz 16333 This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1797  ax-4 1811  ax-5 1911  ax-6 1970  ax-7 2015  ax-8 2113  ax-9 2121  ax-10 2142  ax-11 2158  ax-12 2175  ax-ext 2729  ax-sep 5173  ax-nul 5180  ax-pow 5238  ax-pr 5302  ax-un 7465  ax-cnex 10644  ax-resscn 10645  ax-1cn 10646  ax-icn 10647  ax-addcl 10648  ax-addrcl 10649  ax-mulcl 10650  ax-mulrcl 10651  ax-mulcom 10652  ax-addass 10653  ax-mulass 10654  ax-distr 10655  ax-i2m1 10656  ax-1ne0 10657  ax-1rid 10658  ax-rnegex 10659  ax-rrecex 10660  ax-cnre 10661  ax-pre-lttri 10662  ax-pre-lttrn 10663  ax-pre-ltadd 10664  ax-pre-mulgt0 10665  ax-pre-sup 10666 This theorem depends on definitions:  df-bi 210  df-an 400  df-or 845  df-3or 1085  df-3an 1086  df-tru 1541  df-fal 1551  df-ex 1782  df-nf 1786  df-sb 2070  df-mo 2557  df-eu 2588  df-clab 2736  df-cleq 2750  df-clel 2830  df-nfc 2901  df-ne 2952  df-nel 3056  df-ral 3075  df-rex 3076  df-reu 3077  df-rmo 3078  df-rab 3079  df-v 3411  df-sbc 3699  df-csb 3808  df-dif 3863  df-un 3865  df-in 3867  df-ss 3877  df-pss 3879  df-nul 4228  df-if 4424  df-pw 4499  df-sn 4526  df-pr 4528  df-tp 4530  df-op 4532  df-uni 4802  df-iun 4888  df-br 5037  df-opab 5099  df-mpt 5117  df-tr 5143  df-id 5434  df-eprel 5439  df-po 5447  df-so 5448  df-fr 5487  df-we 5489  df-xp 5534  df-rel 5535  df-cnv 5536  df-co 5537  df-dm 5538  df-rn 5539  df-res 5540  df-ima 5541  df-pred 6131  df-ord 6177  df-on 6178  df-lim 6179  df-suc 6180  df-iota 6299  df-fun 6342  df-fn 6343  df-f 6344  df-f1 6345  df-fo 6346  df-f1o 6347  df-fv 6348  df-riota 7114  df-ov 7159  df-oprab 7160  df-mpo 7161  df-om 7586  df-2nd 7700  df-wrecs 7963  df-recs 8024  df-rdg 8062  df-er 8305  df-en 8541  df-dom 8542  df-sdom 8543  df-sup 8952  df-inf 8953  df-pnf 10728  df-mnf 10729  df-xr 10730  df-ltxr 10731  df-le 10732  df-sub 10923  df-neg 10924  df-div 11349  df-nn 11688  df-2 11750  df-3 11751  df-n0 11948  df-z 12034  df-uz 12296  df-rp 12444  df-seq 13432  df-exp 13493  df-cj 14519  df-re 14520  df-im 14521  df-sqrt 14655  df-abs 14656  df-dvds 15669  df-gcd 15907  df-gz 16334 This theorem is referenced by:  2sqlem8  26122  2sqlem9  26123
 Copyright terms: Public domain W3C validator