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

Theorem 2sqlem10 24953
 Description: Lemma for 2sq 24955. 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 elfz1end 12242 . . . . 5 (𝐵 ∈ ℕ ↔ 𝐵 ∈ (1...𝐵))
21biimpi 205 . . . 4 (𝐵 ∈ ℕ → 𝐵 ∈ (1...𝐵))
3 oveq2 6557 . . . . . 6 (𝑚 = 1 → (1...𝑚) = (1...1))
43raleqdv 3121 . . . . 5 (𝑚 = 1 → (∀𝑏 ∈ (1...𝑚)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ↔ ∀𝑏 ∈ (1...1)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)))
5 oveq2 6557 . . . . . 6 (𝑚 = 𝑛 → (1...𝑚) = (1...𝑛))
65raleqdv 3121 . . . . 5 (𝑚 = 𝑛 → (∀𝑏 ∈ (1...𝑚)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ↔ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)))
7 oveq2 6557 . . . . . 6 (𝑚 = (𝑛 + 1) → (1...𝑚) = (1...(𝑛 + 1)))
87raleqdv 3121 . . . . 5 (𝑚 = (𝑛 + 1) → (∀𝑏 ∈ (1...𝑚)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ↔ ∀𝑏 ∈ (1...(𝑛 + 1))∀𝑎𝑌 (𝑏𝑎𝑏𝑆)))
9 oveq2 6557 . . . . . 6 (𝑚 = 𝐵 → (1...𝑚) = (1...𝐵))
109raleqdv 3121 . . . . 5 (𝑚 = 𝐵 → (∀𝑏 ∈ (1...𝑚)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ↔ ∀𝑏 ∈ (1...𝐵)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)))
11 elfz1eq 12223 . . . . . . . . 9 (𝑏 ∈ (1...1) → 𝑏 = 1)
12 1z 11284 . . . . . . . . . . . 12 1 ∈ ℤ
13 zgz 15475 . . . . . . . . . . . 12 (1 ∈ ℤ → 1 ∈ ℤ[i])
1412, 13ax-mp 5 . . . . . . . . . . 11 1 ∈ ℤ[i]
15 sq1 12820 . . . . . . . . . . . 12 (1↑2) = 1
1615eqcomi 2619 . . . . . . . . . . 11 1 = (1↑2)
17 fveq2 6103 . . . . . . . . . . . . . . 15 (𝑥 = 1 → (abs‘𝑥) = (abs‘1))
18 abs1 13885 . . . . . . . . . . . . . . 15 (abs‘1) = 1
1917, 18syl6eq 2660 . . . . . . . . . . . . . 14 (𝑥 = 1 → (abs‘𝑥) = 1)
2019oveq1d 6564 . . . . . . . . . . . . 13 (𝑥 = 1 → ((abs‘𝑥)↑2) = (1↑2))
2120eqeq2d 2620 . . . . . . . . . . . 12 (𝑥 = 1 → (1 = ((abs‘𝑥)↑2) ↔ 1 = (1↑2)))
2221rspcev 3282 . . . . . . . . . . 11 ((1 ∈ ℤ[i] ∧ 1 = (1↑2)) → ∃𝑥 ∈ ℤ[i] 1 = ((abs‘𝑥)↑2))
2314, 16, 22mp2an 704 . . . . . . . . . 10 𝑥 ∈ ℤ[i] 1 = ((abs‘𝑥)↑2)
24 2sq.1 . . . . . . . . . . 11 𝑆 = ran (𝑤 ∈ ℤ[i] ↦ ((abs‘𝑤)↑2))
25242sqlem1 24942 . . . . . . . . . 10 (1 ∈ 𝑆 ↔ ∃𝑥 ∈ ℤ[i] 1 = ((abs‘𝑥)↑2))
2623, 25mpbir 220 . . . . . . . . 9 1 ∈ 𝑆
2711, 26syl6eqel 2696 . . . . . . . 8 (𝑏 ∈ (1...1) → 𝑏𝑆)
2827a1d 25 . . . . . . 7 (𝑏 ∈ (1...1) → (𝑏𝑎𝑏𝑆))
2928ralrimivw 2950 . . . . . 6 (𝑏 ∈ (1...1) → ∀𝑎𝑌 (𝑏𝑎𝑏𝑆))
3029rgen 2906 . . . . 5 𝑏 ∈ (1...1)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)
31 2sqlem7.2 . . . . . . . . . . . . 13 𝑌 = {𝑧 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ((𝑥 gcd 𝑦) = 1 ∧ 𝑧 = ((𝑥↑2) + (𝑦↑2)))}
32 simplr 788 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ ∧ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)) ∧ (𝑚𝑌 ∧ (𝑛 + 1) ∥ 𝑚)) → ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆))
33 nncn 10905 . . . . . . . . . . . . . . . . . 18 (𝑛 ∈ ℕ → 𝑛 ∈ ℂ)
3433ad2antrr 758 . . . . . . . . . . . . . . . . 17 (((𝑛 ∈ ℕ ∧ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)) ∧ (𝑚𝑌 ∧ (𝑛 + 1) ∥ 𝑚)) → 𝑛 ∈ ℂ)
35 ax-1cn 9873 . . . . . . . . . . . . . . . . 17 1 ∈ ℂ
36 pncan 10166 . . . . . . . . . . . . . . . . 17 ((𝑛 ∈ ℂ ∧ 1 ∈ ℂ) → ((𝑛 + 1) − 1) = 𝑛)
3734, 35, 36sylancl 693 . . . . . . . . . . . . . . . 16 (((𝑛 ∈ ℕ ∧ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)) ∧ (𝑚𝑌 ∧ (𝑛 + 1) ∥ 𝑚)) → ((𝑛 + 1) − 1) = 𝑛)
3837oveq2d 6565 . . . . . . . . . . . . . . 15 (((𝑛 ∈ ℕ ∧ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)) ∧ (𝑚𝑌 ∧ (𝑛 + 1) ∥ 𝑚)) → (1...((𝑛 + 1) − 1)) = (1...𝑛))
3938raleqdv 3121 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ ∧ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)) ∧ (𝑚𝑌 ∧ (𝑛 + 1) ∥ 𝑚)) → (∀𝑏 ∈ (1...((𝑛 + 1) − 1))∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ↔ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)))
4032, 39mpbird 246 . . . . . . . . . . . . 13 (((𝑛 ∈ ℕ ∧ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)) ∧ (𝑚𝑌 ∧ (𝑛 + 1) ∥ 𝑚)) → ∀𝑏 ∈ (1...((𝑛 + 1) − 1))∀𝑎𝑌 (𝑏𝑎𝑏𝑆))
41 simprr 792 . . . . . . . . . . . . 13 (((𝑛 ∈ ℕ ∧ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)) ∧ (𝑚𝑌 ∧ (𝑛 + 1) ∥ 𝑚)) → (𝑛 + 1) ∥ 𝑚)
42 peano2nn 10909 . . . . . . . . . . . . . 14 (𝑛 ∈ ℕ → (𝑛 + 1) ∈ ℕ)
4342ad2antrr 758 . . . . . . . . . . . . 13 (((𝑛 ∈ ℕ ∧ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)) ∧ (𝑚𝑌 ∧ (𝑛 + 1) ∥ 𝑚)) → (𝑛 + 1) ∈ ℕ)
44 simprl 790 . . . . . . . . . . . . 13 (((𝑛 ∈ ℕ ∧ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)) ∧ (𝑚𝑌 ∧ (𝑛 + 1) ∥ 𝑚)) → 𝑚𝑌)
4524, 31, 40, 41, 43, 442sqlem9 24952 . . . . . . . . . . . 12 (((𝑛 ∈ ℕ ∧ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)) ∧ (𝑚𝑌 ∧ (𝑛 + 1) ∥ 𝑚)) → (𝑛 + 1) ∈ 𝑆)
4645expr 641 . . . . . . . . . . 11 (((𝑛 ∈ ℕ ∧ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)) ∧ 𝑚𝑌) → ((𝑛 + 1) ∥ 𝑚 → (𝑛 + 1) ∈ 𝑆))
4746ralrimiva 2949 . . . . . . . . . 10 ((𝑛 ∈ ℕ ∧ ∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆)) → ∀𝑚𝑌 ((𝑛 + 1) ∥ 𝑚 → (𝑛 + 1) ∈ 𝑆))
4847ex 449 . . . . . . . . 9 (𝑛 ∈ ℕ → (∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) → ∀𝑚𝑌 ((𝑛 + 1) ∥ 𝑚 → (𝑛 + 1) ∈ 𝑆)))
49 breq2 4587 . . . . . . . . . . 11 (𝑎 = 𝑚 → ((𝑛 + 1) ∥ 𝑎 ↔ (𝑛 + 1) ∥ 𝑚))
5049imbi1d 330 . . . . . . . . . 10 (𝑎 = 𝑚 → (((𝑛 + 1) ∥ 𝑎 → (𝑛 + 1) ∈ 𝑆) ↔ ((𝑛 + 1) ∥ 𝑚 → (𝑛 + 1) ∈ 𝑆)))
5150cbvralv 3147 . . . . . . . . 9 (∀𝑎𝑌 ((𝑛 + 1) ∥ 𝑎 → (𝑛 + 1) ∈ 𝑆) ↔ ∀𝑚𝑌 ((𝑛 + 1) ∥ 𝑚 → (𝑛 + 1) ∈ 𝑆))
5248, 51syl6ibr 241 . . . . . . . 8 (𝑛 ∈ ℕ → (∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) → ∀𝑎𝑌 ((𝑛 + 1) ∥ 𝑎 → (𝑛 + 1) ∈ 𝑆)))
53 ovex 6577 . . . . . . . . 9 (𝑛 + 1) ∈ V
54 breq1 4586 . . . . . . . . . . 11 (𝑏 = (𝑛 + 1) → (𝑏𝑎 ↔ (𝑛 + 1) ∥ 𝑎))
55 eleq1 2676 . . . . . . . . . . 11 (𝑏 = (𝑛 + 1) → (𝑏𝑆 ↔ (𝑛 + 1) ∈ 𝑆))
5654, 55imbi12d 333 . . . . . . . . . 10 (𝑏 = (𝑛 + 1) → ((𝑏𝑎𝑏𝑆) ↔ ((𝑛 + 1) ∥ 𝑎 → (𝑛 + 1) ∈ 𝑆)))
5756ralbidv 2969 . . . . . . . . 9 (𝑏 = (𝑛 + 1) → (∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ↔ ∀𝑎𝑌 ((𝑛 + 1) ∥ 𝑎 → (𝑛 + 1) ∈ 𝑆)))
5853, 57ralsn 4169 . . . . . . . 8 (∀𝑏 ∈ {(𝑛 + 1)}∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ↔ ∀𝑎𝑌 ((𝑛 + 1) ∥ 𝑎 → (𝑛 + 1) ∈ 𝑆))
5952, 58syl6ibr 241 . . . . . . 7 (𝑛 ∈ ℕ → (∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) → ∀𝑏 ∈ {(𝑛 + 1)}∀𝑎𝑌 (𝑏𝑎𝑏𝑆)))
6059ancld 574 . . . . . 6 (𝑛 ∈ ℕ → (∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) → (∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ∧ ∀𝑏 ∈ {(𝑛 + 1)}∀𝑎𝑌 (𝑏𝑎𝑏𝑆))))
61 elnnuz 11600 . . . . . . . . 9 (𝑛 ∈ ℕ ↔ 𝑛 ∈ (ℤ‘1))
62 fzsuc 12258 . . . . . . . . 9 (𝑛 ∈ (ℤ‘1) → (1...(𝑛 + 1)) = ((1...𝑛) ∪ {(𝑛 + 1)}))
6361, 62sylbi 206 . . . . . . . 8 (𝑛 ∈ ℕ → (1...(𝑛 + 1)) = ((1...𝑛) ∪ {(𝑛 + 1)}))
6463raleqdv 3121 . . . . . . 7 (𝑛 ∈ ℕ → (∀𝑏 ∈ (1...(𝑛 + 1))∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ↔ ∀𝑏 ∈ ((1...𝑛) ∪ {(𝑛 + 1)})∀𝑎𝑌 (𝑏𝑎𝑏𝑆)))
65 ralunb 3756 . . . . . . 7 (∀𝑏 ∈ ((1...𝑛) ∪ {(𝑛 + 1)})∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ↔ (∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ∧ ∀𝑏 ∈ {(𝑛 + 1)}∀𝑎𝑌 (𝑏𝑎𝑏𝑆)))
6664, 65syl6bb 275 . . . . . 6 (𝑛 ∈ ℕ → (∀𝑏 ∈ (1...(𝑛 + 1))∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ↔ (∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ∧ ∀𝑏 ∈ {(𝑛 + 1)}∀𝑎𝑌 (𝑏𝑎𝑏𝑆))))
6760, 66sylibrd 248 . . . . 5 (𝑛 ∈ ℕ → (∀𝑏 ∈ (1...𝑛)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) → ∀𝑏 ∈ (1...(𝑛 + 1))∀𝑎𝑌 (𝑏𝑎𝑏𝑆)))
684, 6, 8, 10, 30, 67nnind 10915 . . . 4 (𝐵 ∈ ℕ → ∀𝑏 ∈ (1...𝐵)∀𝑎𝑌 (𝑏𝑎𝑏𝑆))
69 breq1 4586 . . . . . . 7 (𝑏 = 𝐵 → (𝑏𝑎𝐵𝑎))
70 eleq1 2676 . . . . . . 7 (𝑏 = 𝐵 → (𝑏𝑆𝐵𝑆))
7169, 70imbi12d 333 . . . . . 6 (𝑏 = 𝐵 → ((𝑏𝑎𝑏𝑆) ↔ (𝐵𝑎𝐵𝑆)))
7271ralbidv 2969 . . . . 5 (𝑏 = 𝐵 → (∀𝑎𝑌 (𝑏𝑎𝑏𝑆) ↔ ∀𝑎𝑌 (𝐵𝑎𝐵𝑆)))
7372rspcv 3278 . . . 4 (𝐵 ∈ (1...𝐵) → (∀𝑏 ∈ (1...𝐵)∀𝑎𝑌 (𝑏𝑎𝑏𝑆) → ∀𝑎𝑌 (𝐵𝑎𝐵𝑆)))
742, 68, 73sylc 63 . . 3 (𝐵 ∈ ℕ → ∀𝑎𝑌 (𝐵𝑎𝐵𝑆))
75 breq2 4587 . . . . 5 (𝑎 = 𝐴 → (𝐵𝑎𝐵𝐴))
7675imbi1d 330 . . . 4 (𝑎 = 𝐴 → ((𝐵𝑎𝐵𝑆) ↔ (𝐵𝐴𝐵𝑆)))
7776rspcv 3278 . . 3 (𝐴𝑌 → (∀𝑎𝑌 (𝐵𝑎𝐵𝑆) → (𝐵𝐴𝐵𝑆)))
7874, 77syl5 33 . 2 (𝐴𝑌 → (𝐵 ∈ ℕ → (𝐵𝐴𝐵𝑆)))
79783imp 1249 1 ((𝐴𝑌𝐵 ∈ ℕ ∧ 𝐵𝐴) → 𝐵𝑆)
 Colors of variables: wff setvar class Syntax hints:   → wi 4   ∧ wa 383   ∧ w3a 1031   = wceq 1475   ∈ wcel 1977  {cab 2596  ∀wral 2896  ∃wrex 2897   ∪ cun 3538  {csn 4125   class class class wbr 4583   ↦ cmpt 4643  ran crn 5039  ‘cfv 5804  (class class class)co 6549  ℂcc 9813  1c1 9816   + caddc 9818   − cmin 10145  ℕcn 10897  2c2 10947  ℤcz 11254  ℤ≥cuz 11563  ...cfz 12197  ↑cexp 12722  abscabs 13822   ∥ cdvds 14821   gcd cgcd 15054  ℤ[i]cgz 15471 This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1713  ax-4 1728  ax-5 1827  ax-6 1875  ax-7 1922  ax-8 1979  ax-9 1986  ax-10 2006  ax-11 2021  ax-12 2034  ax-13 2234  ax-ext 2590  ax-sep 4709  ax-nul 4717  ax-pow 4769  ax-pr 4833  ax-un 6847  ax-cnex 9871  ax-resscn 9872  ax-1cn 9873  ax-icn 9874  ax-addcl 9875  ax-addrcl 9876  ax-mulcl 9877  ax-mulrcl 9878  ax-mulcom 9879  ax-addass 9880  ax-mulass 9881  ax-distr 9882  ax-i2m1 9883  ax-1ne0 9884  ax-1rid 9885  ax-rnegex 9886  ax-rrecex 9887  ax-cnre 9888  ax-pre-lttri 9889  ax-pre-lttrn 9890  ax-pre-ltadd 9891  ax-pre-mulgt0 9892  ax-pre-sup 9893 This theorem depends on definitions:  df-bi 196  df-or 384  df-an 385  df-3or 1032  df-3an 1033  df-tru 1478  df-ex 1696  df-nf 1701  df-sb 1868  df-eu 2462  df-mo 2463  df-clab 2597  df-cleq 2603  df-clel 2606  df-nfc 2740  df-ne 2782  df-nel 2783  df-ral 2901  df-rex 2902  df-reu 2903  df-rmo 2904  df-rab 2905  df-v 3175  df-sbc 3403  df-csb 3500  df-dif 3543  df-un 3545  df-in 3547  df-ss 3554  df-pss 3556  df-nul 3875  df-if 4037  df-pw 4110  df-sn 4126  df-pr 4128  df-tp 4130  df-op 4132  df-uni 4373  df-int 4411  df-iun 4457  df-br 4584  df-opab 4644  df-mpt 4645  df-tr 4681  df-eprel 4949  df-id 4953  df-po 4959  df-so 4960  df-fr 4997  df-we 4999  df-xp 5044  df-rel 5045  df-cnv 5046  df-co 5047  df-dm 5048  df-rn 5049  df-res 5050  df-ima 5051  df-pred 5597  df-ord 5643  df-on 5644  df-lim 5645  df-suc 5646  df-iota 5768  df-fun 5806  df-fn 5807  df-f 5808  df-f1 5809  df-fo 5810  df-f1o 5811  df-fv 5812  df-riota 6511  df-ov 6552  df-oprab 6553  df-mpt2 6554  df-om 6958  df-1st 7059  df-2nd 7060  df-wrecs 7294  df-recs 7355  df-rdg 7393  df-1o 7447  df-2o 7448  df-oadd 7451  df-er 7629  df-en 7842  df-dom 7843  df-sdom 7844  df-fin 7845  df-sup 8231  df-inf 8232  df-pnf 9955  df-mnf 9956  df-xr 9957  df-ltxr 9958  df-le 9959  df-sub 10147  df-neg 10148  df-div 10564  df-nn 10898  df-2 10956  df-3 10957  df-n0 11170  df-z 11255  df-uz 11564  df-rp 11709  df-fz 12198  df-fl 12455  df-mod 12531  df-seq 12664  df-exp 12723  df-cj 13687  df-re 13688  df-im 13689  df-sqrt 13823  df-abs 13824  df-dvds 14822  df-gcd 15055  df-prm 15224  df-gz 15472 This theorem is referenced by:  2sqlem11  24954
 Copyright terms: Public domain W3C validator