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

Theorem 2sqlem10 26004
Description: Lemma for 2sq 26006. Every factor of a "proper" sum of two squares (where the summands are coprime) is a sum of two squares. (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
2sqlem10 ((𝐴𝑌𝐵 ∈ ℕ ∧ 𝐵𝐴) → 𝐵𝑆)
Distinct variable groups:   𝑥,𝑤,𝑦,𝑧   𝑥,𝐴,𝑦,𝑧   𝑥,𝐵,𝑦   𝑥,𝑆,𝑦,𝑧   𝑥,𝑌,𝑦
Allowed substitution hints:   𝐴(𝑤)   𝐵(𝑧,𝑤)   𝑆(𝑤)   𝑌(𝑧,𝑤)

Proof of Theorem 2sqlem10
Dummy variables 𝑎 𝑏 𝑛 𝑚 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 breq1 5069 . . . . . 6 (𝑏 = 𝐵 → (𝑏𝑎𝐵𝑎))
2 eleq1 2900 . . . . . 6 (𝑏 = 𝐵 → (𝑏𝑆𝐵𝑆))
31, 2imbi12d 347 . . . . 5 (𝑏 = 𝐵 → ((𝑏𝑎𝑏𝑆) ↔ (𝐵𝑎𝐵𝑆)))
43ralbidv 3197 . . . 4 (𝑏 = 𝐵 → (∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ↔ ∀𝑎𝑌 (𝐵𝑎𝐵𝑆)))
5 oveq2 7164 . . . . . 6 (𝑚 = 1 → (1...𝑚) = (1...1))
65raleqdv 3415 . . . . 5 (𝑚 = 1 → (∀𝑏 ∈ (1...𝑚)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ↔ ∀𝑏 ∈ (1...1)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)))
7 oveq2 7164 . . . . . 6 (𝑚 = 𝑛 → (1...𝑚) = (1...𝑛))
87raleqdv 3415 . . . . 5 (𝑚 = 𝑛 → (∀𝑏 ∈ (1...𝑚)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ↔ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)))
9 oveq2 7164 . . . . . 6 (𝑚 = (𝑛 + 1) → (1...𝑚) = (1...(𝑛 + 1)))
109raleqdv 3415 . . . . 5 (𝑚 = (𝑛 + 1) → (∀𝑏 ∈ (1...𝑚)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ↔ ∀𝑏 ∈ (1...(𝑛 + 1))∀𝑎𝑌 (𝑏𝑎𝑏𝑆)))
11 oveq2 7164 . . . . . 6 (𝑚 = 𝐵 → (1...𝑚) = (1...𝐵))
1211raleqdv 3415 . . . . 5 (𝑚 = 𝐵 → (∀𝑏 ∈ (1...𝑚)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ↔ ∀𝑏 ∈ (1...𝐵)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)))
13 elfz1eq 12919 . . . . . . . . 9 (𝑏 ∈ (1...1) → 𝑏 = 1)
14 1z 12013 . . . . . . . . . . . 12 1 ∈ ℤ
15 zgz 16269 . . . . . . . . . . . 12 (1 ∈ ℤ → 1 ∈ ℤ[i])
1614, 15ax-mp 5 . . . . . . . . . . 11 1 ∈ ℤ[i]
17 sq1 13559 . . . . . . . . . . . 12 (1↑2) = 1
1817eqcomi 2830 . . . . . . . . . . 11 1 = (1↑2)
19 fveq2 6670 . . . . . . . . . . . . . 14 (𝑥 = 1 → (abs‘𝑥) = (abs‘1))
20 abs1 14657 . . . . . . . . . . . . . 14 (abs‘1) = 1
2119, 20syl6eq 2872 . . . . . . . . . . . . 13 (𝑥 = 1 → (abs‘𝑥) = 1)
2221oveq1d 7171 . . . . . . . . . . . 12 (𝑥 = 1 → ((abs‘𝑥)↑2) = (1↑2))
2322rspceeqv 3638 . . . . . . . . . . 11 ((1 ∈ ℤ[i] ∧ 1 = (1↑2)) → ∃𝑥 ∈ ℤ[i] 1 = ((abs‘𝑥)↑2))
2416, 18, 23mp2an 690 . . . . . . . . . 10 𝑥 ∈ ℤ[i] 1 = ((abs‘𝑥)↑2)
25 2sq.1 . . . . . . . . . . 11 𝑆 = ran (𝑤 ∈ ℤ[i] ↦ ((abs‘𝑤)↑2))
26252sqlem1 25993 . . . . . . . . . 10 (1 ∈ 𝑆 ↔ ∃𝑥 ∈ ℤ[i] 1 = ((abs‘𝑥)↑2))
2724, 26mpbir 233 . . . . . . . . 9 1 ∈ 𝑆
2813, 27eqeltrdi 2921 . . . . . . . 8 (𝑏 ∈ (1...1) → 𝑏𝑆)
2928a1d 25 . . . . . . 7 (𝑏 ∈ (1...1) → (𝑏𝑎𝑏𝑆))
3029ralrimivw 3183 . . . . . 6 (𝑏 ∈ (1...1) → ∀𝑎𝑌 (𝑏𝑎𝑏𝑆))
3130rgen 3148 . . . . 5 𝑏 ∈ (1...1)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)
32 2sqlem7.2 . . . . . . . . . . . . 13 𝑌 = {𝑧 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ((𝑥 gcd 𝑦) = 1 ∧ 𝑧 = ((𝑥↑2) + (𝑦↑2)))}
33 simplr 767 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ ∧ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)) ∧ (𝑚𝑌 ∧ (𝑛 + 1) ∥ 𝑚)) → ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆))
34 nncn 11646 . . . . . . . . . . . . . . . . . 18 (𝑛 ∈ ℕ → 𝑛 ∈ ℂ)
3534ad2antrr 724 . . . . . . . . . . . . . . . . 17 (((𝑛 ∈ ℕ ∧ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)) ∧ (𝑚𝑌 ∧ (𝑛 + 1) ∥ 𝑚)) → 𝑛 ∈ ℂ)
36 ax-1cn 10595 . . . . . . . . . . . . . . . . 17 1 ∈ ℂ
37 pncan 10892 . . . . . . . . . . . . . . . . 17 ((𝑛 ∈ ℂ ∧ 1 ∈ ℂ) → ((𝑛 + 1) − 1) = 𝑛)
3835, 36, 37sylancl 588 . . . . . . . . . . . . . . . 16 (((𝑛 ∈ ℕ ∧ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)) ∧ (𝑚𝑌 ∧ (𝑛 + 1) ∥ 𝑚)) → ((𝑛 + 1) − 1) = 𝑛)
3938oveq2d 7172 . . . . . . . . . . . . . . 15 (((𝑛 ∈ ℕ ∧ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)) ∧ (𝑚𝑌 ∧ (𝑛 + 1) ∥ 𝑚)) → (1...((𝑛 + 1) − 1)) = (1...𝑛))
4039raleqdv 3415 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ ∧ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)) ∧ (𝑚𝑌 ∧ (𝑛 + 1) ∥ 𝑚)) → (∀𝑏 ∈ (1...((𝑛 + 1) − 1))∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ↔ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)))
4133, 40mpbird 259 . . . . . . . . . . . . 13 (((𝑛 ∈ ℕ ∧ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)) ∧ (𝑚𝑌 ∧ (𝑛 + 1) ∥ 𝑚)) → ∀𝑏 ∈ (1...((𝑛 + 1) − 1))∀𝑎𝑌 (𝑏𝑎𝑏𝑆))
42 simprr 771 . . . . . . . . . . . . 13 (((𝑛 ∈ ℕ ∧ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)) ∧ (𝑚𝑌 ∧ (𝑛 + 1) ∥ 𝑚)) → (𝑛 + 1) ∥ 𝑚)
43 peano2nn 11650 . . . . . . . . . . . . . 14 (𝑛 ∈ ℕ → (𝑛 + 1) ∈ ℕ)
4443ad2antrr 724 . . . . . . . . . . . . 13 (((𝑛 ∈ ℕ ∧ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)) ∧ (𝑚𝑌 ∧ (𝑛 + 1) ∥ 𝑚)) → (𝑛 + 1) ∈ ℕ)
45 simprl 769 . . . . . . . . . . . . 13 (((𝑛 ∈ ℕ ∧ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)) ∧ (𝑚𝑌 ∧ (𝑛 + 1) ∥ 𝑚)) → 𝑚𝑌)
4625, 32, 41, 42, 44, 452sqlem9 26003 . . . . . . . . . . . 12 (((𝑛 ∈ ℕ ∧ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)) ∧ (𝑚𝑌 ∧ (𝑛 + 1) ∥ 𝑚)) → (𝑛 + 1) ∈ 𝑆)
4746expr 459 . . . . . . . . . . 11 (((𝑛 ∈ ℕ ∧ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)) ∧ 𝑚𝑌) → ((𝑛 + 1) ∥ 𝑚 → (𝑛 + 1) ∈ 𝑆))
4847ralrimiva 3182 . . . . . . . . . 10 ((𝑛 ∈ ℕ ∧ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)) → ∀𝑚𝑌 ((𝑛 + 1) ∥ 𝑚 → (𝑛 + 1) ∈ 𝑆))
4948ex 415 . . . . . . . . 9 (𝑛 ∈ ℕ → (∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) → ∀𝑚𝑌 ((𝑛 + 1) ∥ 𝑚 → (𝑛 + 1) ∈ 𝑆)))
50 breq2 5070 . . . . . . . . . . 11 (𝑎 = 𝑚 → ((𝑛 + 1) ∥ 𝑎 ↔ (𝑛 + 1) ∥ 𝑚))
5150imbi1d 344 . . . . . . . . . 10 (𝑎 = 𝑚 → (((𝑛 + 1) ∥ 𝑎 → (𝑛 + 1) ∈ 𝑆) ↔ ((𝑛 + 1) ∥ 𝑚 → (𝑛 + 1) ∈ 𝑆)))
5251cbvralvw 3449 . . . . . . . . 9 (∀𝑎𝑌 ((𝑛 + 1) ∥ 𝑎 → (𝑛 + 1) ∈ 𝑆) ↔ ∀𝑚𝑌 ((𝑛 + 1) ∥ 𝑚 → (𝑛 + 1) ∈ 𝑆))
5349, 52syl6ibr 254 . . . . . . . 8 (𝑛 ∈ ℕ → (∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) → ∀𝑎𝑌 ((𝑛 + 1) ∥ 𝑎 → (𝑛 + 1) ∈ 𝑆)))
54 ovex 7189 . . . . . . . . 9 (𝑛 + 1) ∈ V
55 breq1 5069 . . . . . . . . . . 11 (𝑏 = (𝑛 + 1) → (𝑏𝑎 ↔ (𝑛 + 1) ∥ 𝑎))
56 eleq1 2900 . . . . . . . . . . 11 (𝑏 = (𝑛 + 1) → (𝑏𝑆 ↔ (𝑛 + 1) ∈ 𝑆))
5755, 56imbi12d 347 . . . . . . . . . 10 (𝑏 = (𝑛 + 1) → ((𝑏𝑎𝑏𝑆) ↔ ((𝑛 + 1) ∥ 𝑎 → (𝑛 + 1) ∈ 𝑆)))
5857ralbidv 3197 . . . . . . . . 9 (𝑏 = (𝑛 + 1) → (∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ↔ ∀𝑎𝑌 ((𝑛 + 1) ∥ 𝑎 → (𝑛 + 1) ∈ 𝑆)))
5954, 58ralsn 4619 . . . . . . . 8 (∀𝑏 ∈ {(𝑛 + 1)}∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ↔ ∀𝑎𝑌 ((𝑛 + 1) ∥ 𝑎 → (𝑛 + 1) ∈ 𝑆))
6053, 59syl6ibr 254 . . . . . . 7 (𝑛 ∈ ℕ → (∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) → ∀𝑏 ∈ {(𝑛 + 1)}∀𝑎𝑌 (𝑏𝑎𝑏𝑆)))
6160ancld 553 . . . . . 6 (𝑛 ∈ ℕ → (∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) → (∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ∧ ∀𝑏 ∈ {(𝑛 + 1)}∀𝑎𝑌 (𝑏𝑎𝑏𝑆))))
62 elnnuz 12283 . . . . . . . . 9 (𝑛 ∈ ℕ ↔ 𝑛 ∈ (ℤ‘1))
63 fzsuc 12955 . . . . . . . . 9 (𝑛 ∈ (ℤ‘1) → (1...(𝑛 + 1)) = ((1...𝑛) ∪ {(𝑛 + 1)}))
6462, 63sylbi 219 . . . . . . . 8 (𝑛 ∈ ℕ → (1...(𝑛 + 1)) = ((1...𝑛) ∪ {(𝑛 + 1)}))
6564raleqdv 3415 . . . . . . 7 (𝑛 ∈ ℕ → (∀𝑏 ∈ (1...(𝑛 + 1))∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ↔ ∀𝑏 ∈ ((1...𝑛) ∪ {(𝑛 + 1)})∀𝑎𝑌 (𝑏𝑎𝑏𝑆)))
66 ralunb 4167 . . . . . . 7 (∀𝑏 ∈ ((1...𝑛) ∪ {(𝑛 + 1)})∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ↔ (∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ∧ ∀𝑏 ∈ {(𝑛 + 1)}∀𝑎𝑌 (𝑏𝑎𝑏𝑆)))
6765, 66syl6bb 289 . . . . . 6 (𝑛 ∈ ℕ → (∀𝑏 ∈ (1...(𝑛 + 1))∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ↔ (∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ∧ ∀𝑏 ∈ {(𝑛 + 1)}∀𝑎𝑌 (𝑏𝑎𝑏𝑆))))
6861, 67sylibrd 261 . . . . 5 (𝑛 ∈ ℕ → (∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) → ∀𝑏 ∈ (1...(𝑛 + 1))∀𝑎𝑌 (𝑏𝑎𝑏𝑆)))
696, 8, 10, 12, 31, 68nnind 11656 . . . 4 (𝐵 ∈ ℕ → ∀𝑏 ∈ (1...𝐵)∀𝑎𝑌 (𝑏𝑎𝑏𝑆))
70 elfz1end 12938 . . . . 5 (𝐵 ∈ ℕ ↔ 𝐵 ∈ (1...𝐵))
7170biimpi 218 . . . 4 (𝐵 ∈ ℕ → 𝐵 ∈ (1...𝐵))
724, 69, 71rspcdva 3625 . . 3 (𝐵 ∈ ℕ → ∀𝑎𝑌 (𝐵𝑎𝐵𝑆))
73 breq2 5070 . . . . 5 (𝑎 = 𝐴 → (𝐵𝑎𝐵𝐴))
7473imbi1d 344 . . . 4 (𝑎 = 𝐴 → ((𝐵𝑎𝐵𝑆) ↔ (𝐵𝐴𝐵𝑆)))
7574rspcv 3618 . . 3 (𝐴𝑌 → (∀𝑎𝑌 (𝐵𝑎𝐵𝑆) → (𝐵𝐴𝐵𝑆)))
7672, 75syl5 34 . 2 (𝐴𝑌 → (𝐵 ∈ ℕ → (𝐵𝐴𝐵𝑆)))
77763imp 1107 1 ((𝐴𝑌𝐵 ∈ ℕ ∧ 𝐵𝐴) → 𝐵𝑆)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wa 398  w3a 1083   = wceq 1537  wcel 2114  {cab 2799  wral 3138  wrex 3139  cun 3934  {csn 4567   class class class wbr 5066  cmpt 5146  ran crn 5556  cfv 6355  (class class class)co 7156  cc 10535  1c1 10538   + caddc 10540  cmin 10870  cn 11638  2c2 11693  cz 11982  cuz 12244  ...cfz 12893  cexp 13430  abscabs 14593  cdvds 15607   gcd cgcd 15843  ℤ[i]cgz 16265
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1796  ax-4 1810  ax-5 1911  ax-6 1970  ax-7 2015  ax-8 2116  ax-9 2124  ax-10 2145  ax-11 2161  ax-12 2177  ax-ext 2793  ax-sep 5203  ax-nul 5210  ax-pow 5266  ax-pr 5330  ax-un 7461  ax-cnex 10593  ax-resscn 10594  ax-1cn 10595  ax-icn 10596  ax-addcl 10597  ax-addrcl 10598  ax-mulcl 10599  ax-mulrcl 10600  ax-mulcom 10601  ax-addass 10602  ax-mulass 10603  ax-distr 10604  ax-i2m1 10605  ax-1ne0 10606  ax-1rid 10607  ax-rnegex 10608  ax-rrecex 10609  ax-cnre 10610  ax-pre-lttri 10611  ax-pre-lttrn 10612  ax-pre-ltadd 10613  ax-pre-mulgt0 10614  ax-pre-sup 10615
This theorem depends on definitions:  df-bi 209  df-an 399  df-or 844  df-3or 1084  df-3an 1085  df-tru 1540  df-ex 1781  df-nf 1785  df-sb 2070  df-mo 2622  df-eu 2654  df-clab 2800  df-cleq 2814  df-clel 2893  df-nfc 2963  df-ne 3017  df-nel 3124  df-ral 3143  df-rex 3144  df-reu 3145  df-rmo 3146  df-rab 3147  df-v 3496  df-sbc 3773  df-csb 3884  df-dif 3939  df-un 3941  df-in 3943  df-ss 3952  df-pss 3954  df-nul 4292  df-if 4468  df-pw 4541  df-sn 4568  df-pr 4570  df-tp 4572  df-op 4574  df-uni 4839  df-iun 4921  df-br 5067  df-opab 5129  df-mpt 5147  df-tr 5173  df-id 5460  df-eprel 5465  df-po 5474  df-so 5475  df-fr 5514  df-we 5516  df-xp 5561  df-rel 5562  df-cnv 5563  df-co 5564  df-dm 5565  df-rn 5566  df-res 5567  df-ima 5568  df-pred 6148  df-ord 6194  df-on 6195  df-lim 6196  df-suc 6197  df-iota 6314  df-fun 6357  df-fn 6358  df-f 6359  df-f1 6360  df-fo 6361  df-f1o 6362  df-fv 6363  df-riota 7114  df-ov 7159  df-oprab 7160  df-mpo 7161  df-om 7581  df-1st 7689  df-2nd 7690  df-wrecs 7947  df-recs 8008  df-rdg 8046  df-1o 8102  df-2o 8103  df-er 8289  df-en 8510  df-dom 8511  df-sdom 8512  df-fin 8513  df-sup 8906  df-inf 8907  df-pnf 10677  df-mnf 10678  df-xr 10679  df-ltxr 10680  df-le 10681  df-sub 10872  df-neg 10873  df-div 11298  df-nn 11639  df-2 11701  df-3 11702  df-n0 11899  df-z 11983  df-uz 12245  df-rp 12391  df-fz 12894  df-fl 13163  df-mod 13239  df-seq 13371  df-exp 13431  df-cj 14458  df-re 14459  df-im 14460  df-sqrt 14594  df-abs 14595  df-dvds 15608  df-gcd 15844  df-prm 16016  df-gz 16266
This theorem is referenced by:  2sqlem11  26005
  Copyright terms: Public domain W3C validator