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

Theorem 2sqlem10 26263
Description: Lemma for 2sq 26265. 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 5042 . . . . . 6 (𝑏 = 𝐵 → (𝑏𝑎𝐵𝑎))
2 eleq1 2818 . . . . . 6 (𝑏 = 𝐵 → (𝑏𝑆𝐵𝑆))
31, 2imbi12d 348 . . . . 5 (𝑏 = 𝐵 → ((𝑏𝑎𝑏𝑆) ↔ (𝐵𝑎𝐵𝑆)))
43ralbidv 3108 . . . 4 (𝑏 = 𝐵 → (∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ↔ ∀𝑎𝑌 (𝐵𝑎𝐵𝑆)))
5 oveq2 7199 . . . . . 6 (𝑚 = 1 → (1...𝑚) = (1...1))
65raleqdv 3315 . . . . 5 (𝑚 = 1 → (∀𝑏 ∈ (1...𝑚)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ↔ ∀𝑏 ∈ (1...1)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)))
7 oveq2 7199 . . . . . 6 (𝑚 = 𝑛 → (1...𝑚) = (1...𝑛))
87raleqdv 3315 . . . . 5 (𝑚 = 𝑛 → (∀𝑏 ∈ (1...𝑚)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ↔ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)))
9 oveq2 7199 . . . . . 6 (𝑚 = (𝑛 + 1) → (1...𝑚) = (1...(𝑛 + 1)))
109raleqdv 3315 . . . . 5 (𝑚 = (𝑛 + 1) → (∀𝑏 ∈ (1...𝑚)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ↔ ∀𝑏 ∈ (1...(𝑛 + 1))∀𝑎𝑌 (𝑏𝑎𝑏𝑆)))
11 oveq2 7199 . . . . . 6 (𝑚 = 𝐵 → (1...𝑚) = (1...𝐵))
1211raleqdv 3315 . . . . 5 (𝑚 = 𝐵 → (∀𝑏 ∈ (1...𝑚)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ↔ ∀𝑏 ∈ (1...𝐵)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)))
13 elfz1eq 13088 . . . . . . . . 9 (𝑏 ∈ (1...1) → 𝑏 = 1)
14 1z 12172 . . . . . . . . . . . 12 1 ∈ ℤ
15 zgz 16449 . . . . . . . . . . . 12 (1 ∈ ℤ → 1 ∈ ℤ[i])
1614, 15ax-mp 5 . . . . . . . . . . 11 1 ∈ ℤ[i]
17 sq1 13729 . . . . . . . . . . . 12 (1↑2) = 1
1817eqcomi 2745 . . . . . . . . . . 11 1 = (1↑2)
19 fveq2 6695 . . . . . . . . . . . . . 14 (𝑥 = 1 → (abs‘𝑥) = (abs‘1))
20 abs1 14826 . . . . . . . . . . . . . 14 (abs‘1) = 1
2119, 20eqtrdi 2787 . . . . . . . . . . . . 13 (𝑥 = 1 → (abs‘𝑥) = 1)
2221oveq1d 7206 . . . . . . . . . . . 12 (𝑥 = 1 → ((abs‘𝑥)↑2) = (1↑2))
2322rspceeqv 3542 . . . . . . . . . . 11 ((1 ∈ ℤ[i] ∧ 1 = (1↑2)) → ∃𝑥 ∈ ℤ[i] 1 = ((abs‘𝑥)↑2))
2416, 18, 23mp2an 692 . . . . . . . . . 10 𝑥 ∈ ℤ[i] 1 = ((abs‘𝑥)↑2)
25 2sq.1 . . . . . . . . . . 11 𝑆 = ran (𝑤 ∈ ℤ[i] ↦ ((abs‘𝑤)↑2))
26252sqlem1 26252 . . . . . . . . . 10 (1 ∈ 𝑆 ↔ ∃𝑥 ∈ ℤ[i] 1 = ((abs‘𝑥)↑2))
2724, 26mpbir 234 . . . . . . . . 9 1 ∈ 𝑆
2813, 27eqeltrdi 2839 . . . . . . . 8 (𝑏 ∈ (1...1) → 𝑏𝑆)
2928a1d 25 . . . . . . 7 (𝑏 ∈ (1...1) → (𝑏𝑎𝑏𝑆))
3029ralrimivw 3096 . . . . . 6 (𝑏 ∈ (1...1) → ∀𝑎𝑌 (𝑏𝑎𝑏𝑆))
3130rgen 3061 . . . . 5 𝑏 ∈ (1...1)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)
32 2sqlem7.2 . . . . . . . . . . . . 13 𝑌 = {𝑧 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ((𝑥 gcd 𝑦) = 1 ∧ 𝑧 = ((𝑥↑2) + (𝑦↑2)))}
33 simplr 769 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ ∧ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)) ∧ (𝑚𝑌 ∧ (𝑛 + 1) ∥ 𝑚)) → ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆))
34 nncn 11803 . . . . . . . . . . . . . . . . . 18 (𝑛 ∈ ℕ → 𝑛 ∈ ℂ)
3534ad2antrr 726 . . . . . . . . . . . . . . . . 17 (((𝑛 ∈ ℕ ∧ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)) ∧ (𝑚𝑌 ∧ (𝑛 + 1) ∥ 𝑚)) → 𝑛 ∈ ℂ)
36 ax-1cn 10752 . . . . . . . . . . . . . . . . 17 1 ∈ ℂ
37 pncan 11049 . . . . . . . . . . . . . . . . 17 ((𝑛 ∈ ℂ ∧ 1 ∈ ℂ) → ((𝑛 + 1) − 1) = 𝑛)
3835, 36, 37sylancl 589 . . . . . . . . . . . . . . . 16 (((𝑛 ∈ ℕ ∧ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)) ∧ (𝑚𝑌 ∧ (𝑛 + 1) ∥ 𝑚)) → ((𝑛 + 1) − 1) = 𝑛)
3938oveq2d 7207 . . . . . . . . . . . . . . 15 (((𝑛 ∈ ℕ ∧ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)) ∧ (𝑚𝑌 ∧ (𝑛 + 1) ∥ 𝑚)) → (1...((𝑛 + 1) − 1)) = (1...𝑛))
4039raleqdv 3315 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ ∧ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)) ∧ (𝑚𝑌 ∧ (𝑛 + 1) ∥ 𝑚)) → (∀𝑏 ∈ (1...((𝑛 + 1) − 1))∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ↔ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)))
4133, 40mpbird 260 . . . . . . . . . . . . 13 (((𝑛 ∈ ℕ ∧ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)) ∧ (𝑚𝑌 ∧ (𝑛 + 1) ∥ 𝑚)) → ∀𝑏 ∈ (1...((𝑛 + 1) − 1))∀𝑎𝑌 (𝑏𝑎𝑏𝑆))
42 simprr 773 . . . . . . . . . . . . 13 (((𝑛 ∈ ℕ ∧ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)) ∧ (𝑚𝑌 ∧ (𝑛 + 1) ∥ 𝑚)) → (𝑛 + 1) ∥ 𝑚)
43 peano2nn 11807 . . . . . . . . . . . . . 14 (𝑛 ∈ ℕ → (𝑛 + 1) ∈ ℕ)
4443ad2antrr 726 . . . . . . . . . . . . 13 (((𝑛 ∈ ℕ ∧ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)) ∧ (𝑚𝑌 ∧ (𝑛 + 1) ∥ 𝑚)) → (𝑛 + 1) ∈ ℕ)
45 simprl 771 . . . . . . . . . . . . 13 (((𝑛 ∈ ℕ ∧ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)) ∧ (𝑚𝑌 ∧ (𝑛 + 1) ∥ 𝑚)) → 𝑚𝑌)
4625, 32, 41, 42, 44, 452sqlem9 26262 . . . . . . . . . . . 12 (((𝑛 ∈ ℕ ∧ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)) ∧ (𝑚𝑌 ∧ (𝑛 + 1) ∥ 𝑚)) → (𝑛 + 1) ∈ 𝑆)
4746expr 460 . . . . . . . . . . 11 (((𝑛 ∈ ℕ ∧ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)) ∧ 𝑚𝑌) → ((𝑛 + 1) ∥ 𝑚 → (𝑛 + 1) ∈ 𝑆))
4847ralrimiva 3095 . . . . . . . . . 10 ((𝑛 ∈ ℕ ∧ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)) → ∀𝑚𝑌 ((𝑛 + 1) ∥ 𝑚 → (𝑛 + 1) ∈ 𝑆))
4948ex 416 . . . . . . . . 9 (𝑛 ∈ ℕ → (∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) → ∀𝑚𝑌 ((𝑛 + 1) ∥ 𝑚 → (𝑛 + 1) ∈ 𝑆)))
50 breq2 5043 . . . . . . . . . . 11 (𝑎 = 𝑚 → ((𝑛 + 1) ∥ 𝑎 ↔ (𝑛 + 1) ∥ 𝑚))
5150imbi1d 345 . . . . . . . . . 10 (𝑎 = 𝑚 → (((𝑛 + 1) ∥ 𝑎 → (𝑛 + 1) ∈ 𝑆) ↔ ((𝑛 + 1) ∥ 𝑚 → (𝑛 + 1) ∈ 𝑆)))
5251cbvralvw 3348 . . . . . . . . 9 (∀𝑎𝑌 ((𝑛 + 1) ∥ 𝑎 → (𝑛 + 1) ∈ 𝑆) ↔ ∀𝑚𝑌 ((𝑛 + 1) ∥ 𝑚 → (𝑛 + 1) ∈ 𝑆))
5349, 52syl6ibr 255 . . . . . . . 8 (𝑛 ∈ ℕ → (∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) → ∀𝑎𝑌 ((𝑛 + 1) ∥ 𝑎 → (𝑛 + 1) ∈ 𝑆)))
54 ovex 7224 . . . . . . . . 9 (𝑛 + 1) ∈ V
55 breq1 5042 . . . . . . . . . . 11 (𝑏 = (𝑛 + 1) → (𝑏𝑎 ↔ (𝑛 + 1) ∥ 𝑎))
56 eleq1 2818 . . . . . . . . . . 11 (𝑏 = (𝑛 + 1) → (𝑏𝑆 ↔ (𝑛 + 1) ∈ 𝑆))
5755, 56imbi12d 348 . . . . . . . . . 10 (𝑏 = (𝑛 + 1) → ((𝑏𝑎𝑏𝑆) ↔ ((𝑛 + 1) ∥ 𝑎 → (𝑛 + 1) ∈ 𝑆)))
5857ralbidv 3108 . . . . . . . . 9 (𝑏 = (𝑛 + 1) → (∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ↔ ∀𝑎𝑌 ((𝑛 + 1) ∥ 𝑎 → (𝑛 + 1) ∈ 𝑆)))
5954, 58ralsn 4583 . . . . . . . 8 (∀𝑏 ∈ {(𝑛 + 1)}∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ↔ ∀𝑎𝑌 ((𝑛 + 1) ∥ 𝑎 → (𝑛 + 1) ∈ 𝑆))
6053, 59syl6ibr 255 . . . . . . 7 (𝑛 ∈ ℕ → (∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) → ∀𝑏 ∈ {(𝑛 + 1)}∀𝑎𝑌 (𝑏𝑎𝑏𝑆)))
6160ancld 554 . . . . . 6 (𝑛 ∈ ℕ → (∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) → (∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ∧ ∀𝑏 ∈ {(𝑛 + 1)}∀𝑎𝑌 (𝑏𝑎𝑏𝑆))))
62 elnnuz 12443 . . . . . . . . 9 (𝑛 ∈ ℕ ↔ 𝑛 ∈ (ℤ‘1))
63 fzsuc 13124 . . . . . . . . 9 (𝑛 ∈ (ℤ‘1) → (1...(𝑛 + 1)) = ((1...𝑛) ∪ {(𝑛 + 1)}))
6462, 63sylbi 220 . . . . . . . 8 (𝑛 ∈ ℕ → (1...(𝑛 + 1)) = ((1...𝑛) ∪ {(𝑛 + 1)}))
6564raleqdv 3315 . . . . . . 7 (𝑛 ∈ ℕ → (∀𝑏 ∈ (1...(𝑛 + 1))∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ↔ ∀𝑏 ∈ ((1...𝑛) ∪ {(𝑛 + 1)})∀𝑎𝑌 (𝑏𝑎𝑏𝑆)))
66 ralunb 4091 . . . . . . 7 (∀𝑏 ∈ ((1...𝑛) ∪ {(𝑛 + 1)})∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ↔ (∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ∧ ∀𝑏 ∈ {(𝑛 + 1)}∀𝑎𝑌 (𝑏𝑎𝑏𝑆)))
6765, 66bitrdi 290 . . . . . 6 (𝑛 ∈ ℕ → (∀𝑏 ∈ (1...(𝑛 + 1))∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ↔ (∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ∧ ∀𝑏 ∈ {(𝑛 + 1)}∀𝑎𝑌 (𝑏𝑎𝑏𝑆))))
6861, 67sylibrd 262 . . . . 5 (𝑛 ∈ ℕ → (∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) → ∀𝑏 ∈ (1...(𝑛 + 1))∀𝑎𝑌 (𝑏𝑎𝑏𝑆)))
696, 8, 10, 12, 31, 68nnind 11813 . . . 4 (𝐵 ∈ ℕ → ∀𝑏 ∈ (1...𝐵)∀𝑎𝑌 (𝑏𝑎𝑏𝑆))
70 elfz1end 13107 . . . . 5 (𝐵 ∈ ℕ ↔ 𝐵 ∈ (1...𝐵))
7170biimpi 219 . . . 4 (𝐵 ∈ ℕ → 𝐵 ∈ (1...𝐵))
724, 69, 71rspcdva 3529 . . 3 (𝐵 ∈ ℕ → ∀𝑎𝑌 (𝐵𝑎𝐵𝑆))
73 breq2 5043 . . . . 5 (𝑎 = 𝐴 → (𝐵𝑎𝐵𝐴))
7473imbi1d 345 . . . 4 (𝑎 = 𝐴 → ((𝐵𝑎𝐵𝑆) ↔ (𝐵𝐴𝐵𝑆)))
7574rspcv 3522 . . 3 (𝐴𝑌 → (∀𝑎𝑌 (𝐵𝑎𝐵𝑆) → (𝐵𝐴𝐵𝑆)))
7672, 75syl5 34 . 2 (𝐴𝑌 → (𝐵 ∈ ℕ → (𝐵𝐴𝐵𝑆)))
77763imp 1113 1 ((𝐴𝑌𝐵 ∈ ℕ ∧ 𝐵𝐴) → 𝐵𝑆)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wa 399  w3a 1089   = wceq 1543  wcel 2112  {cab 2714  wral 3051  wrex 3052  cun 3851  {csn 4527   class class class wbr 5039  cmpt 5120  ran crn 5537  cfv 6358  (class class class)co 7191  cc 10692  1c1 10695   + caddc 10697  cmin 11027  cn 11795  2c2 11850  cz 12141  cuz 12403  ...cfz 13060  cexp 13600  abscabs 14762  cdvds 15778   gcd cgcd 16016  ℤ[i]cgz 16445
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1803  ax-4 1817  ax-5 1918  ax-6 1976  ax-7 2018  ax-8 2114  ax-9 2122  ax-10 2143  ax-11 2160  ax-12 2177  ax-ext 2708  ax-sep 5177  ax-nul 5184  ax-pow 5243  ax-pr 5307  ax-un 7501  ax-cnex 10750  ax-resscn 10751  ax-1cn 10752  ax-icn 10753  ax-addcl 10754  ax-addrcl 10755  ax-mulcl 10756  ax-mulrcl 10757  ax-mulcom 10758  ax-addass 10759  ax-mulass 10760  ax-distr 10761  ax-i2m1 10762  ax-1ne0 10763  ax-1rid 10764  ax-rnegex 10765  ax-rrecex 10766  ax-cnre 10767  ax-pre-lttri 10768  ax-pre-lttrn 10769  ax-pre-ltadd 10770  ax-pre-mulgt0 10771  ax-pre-sup 10772
This theorem depends on definitions:  df-bi 210  df-an 400  df-or 848  df-3or 1090  df-3an 1091  df-tru 1546  df-fal 1556  df-ex 1788  df-nf 1792  df-sb 2073  df-mo 2539  df-eu 2568  df-clab 2715  df-cleq 2728  df-clel 2809  df-nfc 2879  df-ne 2933  df-nel 3037  df-ral 3056  df-rex 3057  df-reu 3058  df-rmo 3059  df-rab 3060  df-v 3400  df-sbc 3684  df-csb 3799  df-dif 3856  df-un 3858  df-in 3860  df-ss 3870  df-pss 3872  df-nul 4224  df-if 4426  df-pw 4501  df-sn 4528  df-pr 4530  df-tp 4532  df-op 4534  df-uni 4806  df-iun 4892  df-br 5040  df-opab 5102  df-mpt 5121  df-tr 5147  df-id 5440  df-eprel 5445  df-po 5453  df-so 5454  df-fr 5494  df-we 5496  df-xp 5542  df-rel 5543  df-cnv 5544  df-co 5545  df-dm 5546  df-rn 5547  df-res 5548  df-ima 5549  df-pred 6140  df-ord 6194  df-on 6195  df-lim 6196  df-suc 6197  df-iota 6316  df-fun 6360  df-fn 6361  df-f 6362  df-f1 6363  df-fo 6364  df-f1o 6365  df-fv 6366  df-riota 7148  df-ov 7194  df-oprab 7195  df-mpo 7196  df-om 7623  df-1st 7739  df-2nd 7740  df-wrecs 8025  df-recs 8086  df-rdg 8124  df-1o 8180  df-2o 8181  df-er 8369  df-en 8605  df-dom 8606  df-sdom 8607  df-fin 8608  df-sup 9036  df-inf 9037  df-pnf 10834  df-mnf 10835  df-xr 10836  df-ltxr 10837  df-le 10838  df-sub 11029  df-neg 11030  df-div 11455  df-nn 11796  df-2 11858  df-3 11859  df-n0 12056  df-z 12142  df-uz 12404  df-rp 12552  df-fz 13061  df-fl 13332  df-mod 13408  df-seq 13540  df-exp 13601  df-cj 14627  df-re 14628  df-im 14629  df-sqrt 14763  df-abs 14764  df-dvds 15779  df-gcd 16017  df-prm 16192  df-gz 16446
This theorem is referenced by:  2sqlem11  26264
  Copyright terms: Public domain W3C validator