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

Theorem 4sqlem19 15894
Description: Lemma for 4sq 15895. The proof is by strong induction - we show that if all the integers less than 𝑘 are in 𝑆, then 𝑘 is as well. In this part of the proof we do the induction argument and dispense with all the cases except the odd prime case, which is sent to 4sqlem18 15893. If 𝑘 is 0, 1, 2, we show 𝑘𝑆 directly; otherwise if 𝑘 is composite, 𝑘 is the product of two numbers less than it (and hence in 𝑆 by assumption), so by mul4sq 15885 𝑘𝑆. (Contributed by Mario Carneiro, 14-Jul-2014.) (Revised by Mario Carneiro, 20-Jun-2015.)
Hypothesis
Ref Expression
4sq.1 𝑆 = {𝑛 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2)))}
Assertion
Ref Expression
4sqlem19 0 = 𝑆
Distinct variable groups:   𝑤,𝑛,𝑥,𝑦,𝑧   𝑆,𝑛
Allowed substitution hints:   𝑆(𝑥,𝑦,𝑧,𝑤)

Proof of Theorem 4sqlem19
Dummy variables 𝑗 𝑘 𝑖 𝑚 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 elnn0 11518 . . . 4 (𝑘 ∈ ℕ0 ↔ (𝑘 ∈ ℕ ∨ 𝑘 = 0))
2 eleq1 2841 . . . . . 6 (𝑗 = 1 → (𝑗𝑆 ↔ 1 ∈ 𝑆))
3 eleq1 2841 . . . . . 6 (𝑗 = 𝑚 → (𝑗𝑆𝑚𝑆))
4 eleq1 2841 . . . . . 6 (𝑗 = 𝑖 → (𝑗𝑆𝑖𝑆))
5 eleq1 2841 . . . . . 6 (𝑗 = (𝑚 · 𝑖) → (𝑗𝑆 ↔ (𝑚 · 𝑖) ∈ 𝑆))
6 eleq1 2841 . . . . . 6 (𝑗 = 𝑘 → (𝑗𝑆𝑘𝑆))
7 abs1 14267 . . . . . . . . . . 11 (abs‘1) = 1
87oveq1i 6822 . . . . . . . . . 10 ((abs‘1)↑2) = (1↑2)
9 sq1 13187 . . . . . . . . . 10 (1↑2) = 1
108, 9eqtri 2796 . . . . . . . . 9 ((abs‘1)↑2) = 1
11 abs0 14255 . . . . . . . . . . 11 (abs‘0) = 0
1211oveq1i 6822 . . . . . . . . . 10 ((abs‘0)↑2) = (0↑2)
13 sq0 13184 . . . . . . . . . 10 (0↑2) = 0
1412, 13eqtri 2796 . . . . . . . . 9 ((abs‘0)↑2) = 0
1510, 14oveq12i 6824 . . . . . . . 8 (((abs‘1)↑2) + ((abs‘0)↑2)) = (1 + 0)
16 1p0e1 11357 . . . . . . . 8 (1 + 0) = 1
1715, 16eqtri 2796 . . . . . . 7 (((abs‘1)↑2) + ((abs‘0)↑2)) = 1
18 1z 11631 . . . . . . . . 9 1 ∈ ℤ
19 zgz 15864 . . . . . . . . 9 (1 ∈ ℤ → 1 ∈ ℤ[i])
2018, 19ax-mp 5 . . . . . . . 8 1 ∈ ℤ[i]
21 0z 11612 . . . . . . . . 9 0 ∈ ℤ
22 zgz 15864 . . . . . . . . 9 (0 ∈ ℤ → 0 ∈ ℤ[i])
2321, 22ax-mp 5 . . . . . . . 8 0 ∈ ℤ[i]
24 4sq.1 . . . . . . . . 9 𝑆 = {𝑛 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2)))}
25244sqlem4a 15882 . . . . . . . 8 ((1 ∈ ℤ[i] ∧ 0 ∈ ℤ[i]) → (((abs‘1)↑2) + ((abs‘0)↑2)) ∈ 𝑆)
2620, 23, 25mp2an 673 . . . . . . 7 (((abs‘1)↑2) + ((abs‘0)↑2)) ∈ 𝑆
2717, 26eqeltrri 2850 . . . . . 6 1 ∈ 𝑆
28 eleq1 2841 . . . . . . 7 (𝑗 = 2 → (𝑗𝑆 ↔ 2 ∈ 𝑆))
29 eldifsn 4464 . . . . . . . . 9 (𝑗 ∈ (ℙ ∖ {2}) ↔ (𝑗 ∈ ℙ ∧ 𝑗 ≠ 2))
30 oddprm 15742 . . . . . . . . . . 11 (𝑗 ∈ (ℙ ∖ {2}) → ((𝑗 − 1) / 2) ∈ ℕ)
3130adantr 467 . . . . . . . . . 10 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → ((𝑗 − 1) / 2) ∈ ℕ)
32 eldifi 3890 . . . . . . . . . . . . . . . 16 (𝑗 ∈ (ℙ ∖ {2}) → 𝑗 ∈ ℙ)
3332adantr 467 . . . . . . . . . . . . . . 15 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → 𝑗 ∈ ℙ)
34 prmnn 15616 . . . . . . . . . . . . . . 15 (𝑗 ∈ ℙ → 𝑗 ∈ ℕ)
35 nncn 11251 . . . . . . . . . . . . . . 15 (𝑗 ∈ ℕ → 𝑗 ∈ ℂ)
3633, 34, 353syl 18 . . . . . . . . . . . . . 14 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → 𝑗 ∈ ℂ)
37 ax-1cn 10217 . . . . . . . . . . . . . 14 1 ∈ ℂ
38 subcl 10503 . . . . . . . . . . . . . 14 ((𝑗 ∈ ℂ ∧ 1 ∈ ℂ) → (𝑗 − 1) ∈ ℂ)
3936, 37, 38sylancl 575 . . . . . . . . . . . . 13 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (𝑗 − 1) ∈ ℂ)
40 2cnd 11316 . . . . . . . . . . . . 13 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → 2 ∈ ℂ)
41 2ne0 11336 . . . . . . . . . . . . . 14 2 ≠ 0
4241a1i 11 . . . . . . . . . . . . 13 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → 2 ≠ 0)
4339, 40, 42divcan2d 11026 . . . . . . . . . . . 12 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (2 · ((𝑗 − 1) / 2)) = (𝑗 − 1))
4443oveq1d 6827 . . . . . . . . . . 11 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → ((2 · ((𝑗 − 1) / 2)) + 1) = ((𝑗 − 1) + 1))
45 npcan 10513 . . . . . . . . . . . 12 ((𝑗 ∈ ℂ ∧ 1 ∈ ℂ) → ((𝑗 − 1) + 1) = 𝑗)
4636, 37, 45sylancl 575 . . . . . . . . . . 11 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → ((𝑗 − 1) + 1) = 𝑗)
4744, 46eqtr2d 2809 . . . . . . . . . 10 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → 𝑗 = ((2 · ((𝑗 − 1) / 2)) + 1))
4843oveq2d 6828 . . . . . . . . . . . 12 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (0...(2 · ((𝑗 − 1) / 2))) = (0...(𝑗 − 1)))
49 nnm1nn0 11558 . . . . . . . . . . . . . . 15 (𝑗 ∈ ℕ → (𝑗 − 1) ∈ ℕ0)
5033, 34, 493syl 18 . . . . . . . . . . . . . 14 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (𝑗 − 1) ∈ ℕ0)
51 elnn0uz 11949 . . . . . . . . . . . . . 14 ((𝑗 − 1) ∈ ℕ0 ↔ (𝑗 − 1) ∈ (ℤ‘0))
5250, 51sylib 209 . . . . . . . . . . . . 13 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (𝑗 − 1) ∈ (ℤ‘0))
53 eluzfz1 12577 . . . . . . . . . . . . 13 ((𝑗 − 1) ∈ (ℤ‘0) → 0 ∈ (0...(𝑗 − 1)))
54 fzsplit 12596 . . . . . . . . . . . . 13 (0 ∈ (0...(𝑗 − 1)) → (0...(𝑗 − 1)) = ((0...0) ∪ ((0 + 1)...(𝑗 − 1))))
5552, 53, 543syl 18 . . . . . . . . . . . 12 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (0...(𝑗 − 1)) = ((0...0) ∪ ((0 + 1)...(𝑗 − 1))))
5648, 55eqtrd 2808 . . . . . . . . . . 11 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (0...(2 · ((𝑗 − 1) / 2))) = ((0...0) ∪ ((0 + 1)...(𝑗 − 1))))
57 fzsn 12612 . . . . . . . . . . . . . . 15 (0 ∈ ℤ → (0...0) = {0})
5821, 57ax-mp 5 . . . . . . . . . . . . . 14 (0...0) = {0}
5914, 14oveq12i 6824 . . . . . . . . . . . . . . . . 17 (((abs‘0)↑2) + ((abs‘0)↑2)) = (0 + 0)
60 00id 10434 . . . . . . . . . . . . . . . . 17 (0 + 0) = 0
6159, 60eqtri 2796 . . . . . . . . . . . . . . . 16 (((abs‘0)↑2) + ((abs‘0)↑2)) = 0
62244sqlem4a 15882 . . . . . . . . . . . . . . . . 17 ((0 ∈ ℤ[i] ∧ 0 ∈ ℤ[i]) → (((abs‘0)↑2) + ((abs‘0)↑2)) ∈ 𝑆)
6323, 23, 62mp2an 673 . . . . . . . . . . . . . . . 16 (((abs‘0)↑2) + ((abs‘0)↑2)) ∈ 𝑆
6461, 63eqeltrri 2850 . . . . . . . . . . . . . . 15 0 ∈ 𝑆
65 snssi 4485 . . . . . . . . . . . . . . 15 (0 ∈ 𝑆 → {0} ⊆ 𝑆)
6664, 65ax-mp 5 . . . . . . . . . . . . . 14 {0} ⊆ 𝑆
6758, 66eqsstri 3791 . . . . . . . . . . . . 13 (0...0) ⊆ 𝑆
6867a1i 11 . . . . . . . . . . . 12 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (0...0) ⊆ 𝑆)
69 0p1e1 11355 . . . . . . . . . . . . . 14 (0 + 1) = 1
7069oveq1i 6822 . . . . . . . . . . . . 13 ((0 + 1)...(𝑗 − 1)) = (1...(𝑗 − 1))
71 simpr 472 . . . . . . . . . . . . . 14 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆)
72 dfss3 3747 . . . . . . . . . . . . . 14 ((1...(𝑗 − 1)) ⊆ 𝑆 ↔ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆)
7371, 72sylibr 225 . . . . . . . . . . . . 13 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (1...(𝑗 − 1)) ⊆ 𝑆)
7470, 73syl5eqss 3805 . . . . . . . . . . . 12 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → ((0 + 1)...(𝑗 − 1)) ⊆ 𝑆)
7568, 74unssd 3947 . . . . . . . . . . 11 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → ((0...0) ∪ ((0 + 1)...(𝑗 − 1))) ⊆ 𝑆)
7656, 75eqsstrd 3795 . . . . . . . . . 10 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (0...(2 · ((𝑗 − 1) / 2))) ⊆ 𝑆)
77 oveq1 6819 . . . . . . . . . . . 12 (𝑘 = 𝑖 → (𝑘 · 𝑗) = (𝑖 · 𝑗))
7877eleq1d 2838 . . . . . . . . . . 11 (𝑘 = 𝑖 → ((𝑘 · 𝑗) ∈ 𝑆 ↔ (𝑖 · 𝑗) ∈ 𝑆))
7978cbvrabv 3353 . . . . . . . . . 10 {𝑘 ∈ ℕ ∣ (𝑘 · 𝑗) ∈ 𝑆} = {𝑖 ∈ ℕ ∣ (𝑖 · 𝑗) ∈ 𝑆}
80 eqid 2774 . . . . . . . . . 10 inf({𝑘 ∈ ℕ ∣ (𝑘 · 𝑗) ∈ 𝑆}, ℝ, < ) = inf({𝑘 ∈ ℕ ∣ (𝑘 · 𝑗) ∈ 𝑆}, ℝ, < )
8124, 31, 47, 33, 76, 79, 804sqlem18 15893 . . . . . . . . 9 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → 𝑗𝑆)
8229, 81sylanbr 572 . . . . . . . 8 (((𝑗 ∈ ℙ ∧ 𝑗 ≠ 2) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → 𝑗𝑆)
8382an32s 632 . . . . . . 7 (((𝑗 ∈ ℙ ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) ∧ 𝑗 ≠ 2) → 𝑗𝑆)
8410, 10oveq12i 6824 . . . . . . . . . 10 (((abs‘1)↑2) + ((abs‘1)↑2)) = (1 + 1)
85 df-2 11302 . . . . . . . . . 10 2 = (1 + 1)
8684, 85eqtr4i 2799 . . . . . . . . 9 (((abs‘1)↑2) + ((abs‘1)↑2)) = 2
87244sqlem4a 15882 . . . . . . . . . 10 ((1 ∈ ℤ[i] ∧ 1 ∈ ℤ[i]) → (((abs‘1)↑2) + ((abs‘1)↑2)) ∈ 𝑆)
8820, 20, 87mp2an 673 . . . . . . . . 9 (((abs‘1)↑2) + ((abs‘1)↑2)) ∈ 𝑆
8986, 88eqeltrri 2850 . . . . . . . 8 2 ∈ 𝑆
9089a1i 11 . . . . . . 7 ((𝑗 ∈ ℙ ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → 2 ∈ 𝑆)
9128, 83, 90pm2.61ne 3031 . . . . . 6 ((𝑗 ∈ ℙ ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → 𝑗𝑆)
9224mul4sq 15885 . . . . . . 7 ((𝑚𝑆𝑖𝑆) → (𝑚 · 𝑖) ∈ 𝑆)
9392a1i 11 . . . . . 6 ((𝑚 ∈ (ℤ‘2) ∧ 𝑖 ∈ (ℤ‘2)) → ((𝑚𝑆𝑖𝑆) → (𝑚 · 𝑖) ∈ 𝑆))
942, 3, 4, 5, 6, 27, 91, 93prmind2 15626 . . . . 5 (𝑘 ∈ ℕ → 𝑘𝑆)
95 id 22 . . . . . 6 (𝑘 = 0 → 𝑘 = 0)
9695, 64syl6eqel 2861 . . . . 5 (𝑘 = 0 → 𝑘𝑆)
9794, 96jaoi 873 . . . 4 ((𝑘 ∈ ℕ ∨ 𝑘 = 0) → 𝑘𝑆)
981, 97sylbi 208 . . 3 (𝑘 ∈ ℕ0𝑘𝑆)
9998ssriv 3762 . 2 0𝑆
100244sqlem1 15879 . 2 𝑆 ⊆ ℕ0
10199, 100eqssi 3774 1 0 = 𝑆
Colors of variables: wff setvar class
Syntax hints:  wi 4  wa 383  wo 863   = wceq 1634  wcel 2148  {cab 2760  wne 2946  wral 3064  wrex 3065  {crab 3068  cdif 3726  cun 3727  wss 3729  {csn 4326  cfv 6042  (class class class)co 6812  infcinf 8524  cc 10157  cr 10158  0cc0 10159  1c1 10160   + caddc 10162   · cmul 10164   < clt 10297  cmin 10489   / cdiv 10907  cn 11243  2c2 11293  0cn0 11516  cz 11601  cuz 11910  ...cfz 12555  cexp 13089  abscabs 14204  cprime 15613  ℤ[i]cgz 15860
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1873  ax-4 1888  ax-5 1994  ax-6 2060  ax-7 2096  ax-8 2150  ax-9 2157  ax-10 2177  ax-11 2193  ax-12 2206  ax-13 2411  ax-ext 2754  ax-rep 4917  ax-sep 4928  ax-nul 4936  ax-pow 4988  ax-pr 5048  ax-un 7117  ax-cnex 10215  ax-resscn 10216  ax-1cn 10217  ax-icn 10218  ax-addcl 10219  ax-addrcl 10220  ax-mulcl 10221  ax-mulrcl 10222  ax-mulcom 10223  ax-addass 10224  ax-mulass 10225  ax-distr 10226  ax-i2m1 10227  ax-1ne0 10228  ax-1rid 10229  ax-rnegex 10230  ax-rrecex 10231  ax-cnre 10232  ax-pre-lttri 10233  ax-pre-lttrn 10234  ax-pre-ltadd 10235  ax-pre-mulgt0 10236  ax-pre-sup 10237
This theorem depends on definitions:  df-bi 198  df-an 384  df-or 864  df-3or 1099  df-3an 1100  df-tru 1637  df-ex 1856  df-nf 1861  df-sb 2053  df-eu 2625  df-mo 2626  df-clab 2761  df-cleq 2767  df-clel 2770  df-nfc 2905  df-ne 2947  df-nel 3050  df-ral 3069  df-rex 3070  df-reu 3071  df-rmo 3072  df-rab 3073  df-v 3357  df-sbc 3594  df-csb 3689  df-dif 3732  df-un 3734  df-in 3736  df-ss 3743  df-pss 3745  df-nul 4074  df-if 4236  df-pw 4309  df-sn 4327  df-pr 4329  df-tp 4331  df-op 4333  df-uni 4586  df-int 4623  df-iun 4667  df-br 4798  df-opab 4860  df-mpt 4877  df-tr 4900  df-id 5171  df-eprel 5176  df-po 5184  df-so 5185  df-fr 5222  df-we 5224  df-xp 5269  df-rel 5270  df-cnv 5271  df-co 5272  df-dm 5273  df-rn 5274  df-res 5275  df-ima 5276  df-pred 5834  df-ord 5880  df-on 5881  df-lim 5882  df-suc 5883  df-iota 6005  df-fun 6044  df-fn 6045  df-f 6046  df-f1 6047  df-fo 6048  df-f1o 6049  df-fv 6050  df-riota 6773  df-ov 6815  df-oprab 6816  df-mpt2 6817  df-om 7234  df-1st 7336  df-2nd 7337  df-wrecs 7580  df-recs 7642  df-rdg 7680  df-1o 7734  df-2o 7735  df-oadd 7738  df-er 7917  df-en 8131  df-dom 8132  df-sdom 8133  df-fin 8134  df-sup 8525  df-inf 8526  df-card 8986  df-cda 9213  df-pnf 10299  df-mnf 10300  df-xr 10301  df-ltxr 10302  df-le 10303  df-sub 10491  df-neg 10492  df-div 10908  df-nn 11244  df-2 11302  df-3 11303  df-4 11304  df-n0 11517  df-xnn0 11588  df-z 11602  df-uz 11911  df-rp 12053  df-fz 12556  df-fl 12823  df-mod 12899  df-seq 13031  df-exp 13090  df-hash 13344  df-cj 14069  df-re 14070  df-im 14071  df-sqrt 14205  df-abs 14206  df-dvds 15212  df-gcd 15446  df-prm 15614  df-gz 15861
This theorem is referenced by:  4sq  15895
  Copyright terms: Public domain W3C validator