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

Theorem 4sqlem19 15714
Description: Lemma for 4sq 15715. 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 15713. 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 15705 𝑘𝑆. (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 11332 . . . 4 (𝑘 ∈ ℕ0 ↔ (𝑘 ∈ ℕ ∨ 𝑘 = 0))
2 eleq1 2718 . . . . . 6 (𝑗 = 1 → (𝑗𝑆 ↔ 1 ∈ 𝑆))
3 eleq1 2718 . . . . . 6 (𝑗 = 𝑚 → (𝑗𝑆𝑚𝑆))
4 eleq1 2718 . . . . . 6 (𝑗 = 𝑖 → (𝑗𝑆𝑖𝑆))
5 eleq1 2718 . . . . . 6 (𝑗 = (𝑚 · 𝑖) → (𝑗𝑆 ↔ (𝑚 · 𝑖) ∈ 𝑆))
6 eleq1 2718 . . . . . 6 (𝑗 = 𝑘 → (𝑗𝑆𝑘𝑆))
7 abs1 14081 . . . . . . . . . . 11 (abs‘1) = 1
87oveq1i 6700 . . . . . . . . . 10 ((abs‘1)↑2) = (1↑2)
9 sq1 12998 . . . . . . . . . 10 (1↑2) = 1
108, 9eqtri 2673 . . . . . . . . 9 ((abs‘1)↑2) = 1
11 abs0 14069 . . . . . . . . . . 11 (abs‘0) = 0
1211oveq1i 6700 . . . . . . . . . 10 ((abs‘0)↑2) = (0↑2)
13 sq0 12995 . . . . . . . . . 10 (0↑2) = 0
1412, 13eqtri 2673 . . . . . . . . 9 ((abs‘0)↑2) = 0
1510, 14oveq12i 6702 . . . . . . . 8 (((abs‘1)↑2) + ((abs‘0)↑2)) = (1 + 0)
16 1p0e1 11171 . . . . . . . 8 (1 + 0) = 1
1715, 16eqtri 2673 . . . . . . 7 (((abs‘1)↑2) + ((abs‘0)↑2)) = 1
18 1z 11445 . . . . . . . . 9 1 ∈ ℤ
19 zgz 15684 . . . . . . . . 9 (1 ∈ ℤ → 1 ∈ ℤ[i])
2018, 19ax-mp 5 . . . . . . . 8 1 ∈ ℤ[i]
21 0z 11426 . . . . . . . . 9 0 ∈ ℤ
22 zgz 15684 . . . . . . . . 9 (0 ∈ ℤ → 0 ∈ ℤ[i])
2321, 22ax-mp 5 . . . . . . . 8 0 ∈ ℤ[i]
24 4sq.1 . . . . . . . . 9 𝑆 = {𝑛 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2)))}
25244sqlem4a 15702 . . . . . . . 8 ((1 ∈ ℤ[i] ∧ 0 ∈ ℤ[i]) → (((abs‘1)↑2) + ((abs‘0)↑2)) ∈ 𝑆)
2620, 23, 25mp2an 708 . . . . . . 7 (((abs‘1)↑2) + ((abs‘0)↑2)) ∈ 𝑆
2717, 26eqeltrri 2727 . . . . . 6 1 ∈ 𝑆
28 eleq1 2718 . . . . . . 7 (𝑗 = 2 → (𝑗𝑆 ↔ 2 ∈ 𝑆))
29 eldifsn 4350 . . . . . . . . 9 (𝑗 ∈ (ℙ ∖ {2}) ↔ (𝑗 ∈ ℙ ∧ 𝑗 ≠ 2))
30 oddprm 15562 . . . . . . . . . . 11 (𝑗 ∈ (ℙ ∖ {2}) → ((𝑗 − 1) / 2) ∈ ℕ)
3130adantr 480 . . . . . . . . . 10 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → ((𝑗 − 1) / 2) ∈ ℕ)
32 eldifi 3765 . . . . . . . . . . . . . . . 16 (𝑗 ∈ (ℙ ∖ {2}) → 𝑗 ∈ ℙ)
3332adantr 480 . . . . . . . . . . . . . . 15 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → 𝑗 ∈ ℙ)
34 prmnn 15435 . . . . . . . . . . . . . . 15 (𝑗 ∈ ℙ → 𝑗 ∈ ℕ)
35 nncn 11066 . . . . . . . . . . . . . . 15 (𝑗 ∈ ℕ → 𝑗 ∈ ℂ)
3633, 34, 353syl 18 . . . . . . . . . . . . . 14 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → 𝑗 ∈ ℂ)
37 ax-1cn 10032 . . . . . . . . . . . . . 14 1 ∈ ℂ
38 subcl 10318 . . . . . . . . . . . . . 14 ((𝑗 ∈ ℂ ∧ 1 ∈ ℂ) → (𝑗 − 1) ∈ ℂ)
3936, 37, 38sylancl 695 . . . . . . . . . . . . 13 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (𝑗 − 1) ∈ ℂ)
40 2cnd 11131 . . . . . . . . . . . . 13 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → 2 ∈ ℂ)
41 2ne0 11151 . . . . . . . . . . . . . 14 2 ≠ 0
4241a1i 11 . . . . . . . . . . . . 13 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → 2 ≠ 0)
4339, 40, 42divcan2d 10841 . . . . . . . . . . . 12 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (2 · ((𝑗 − 1) / 2)) = (𝑗 − 1))
4443oveq1d 6705 . . . . . . . . . . 11 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → ((2 · ((𝑗 − 1) / 2)) + 1) = ((𝑗 − 1) + 1))
45 npcan 10328 . . . . . . . . . . . 12 ((𝑗 ∈ ℂ ∧ 1 ∈ ℂ) → ((𝑗 − 1) + 1) = 𝑗)
4636, 37, 45sylancl 695 . . . . . . . . . . 11 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → ((𝑗 − 1) + 1) = 𝑗)
4744, 46eqtr2d 2686 . . . . . . . . . 10 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → 𝑗 = ((2 · ((𝑗 − 1) / 2)) + 1))
4843oveq2d 6706 . . . . . . . . . . . 12 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (0...(2 · ((𝑗 − 1) / 2))) = (0...(𝑗 − 1)))
49 nnm1nn0 11372 . . . . . . . . . . . . . . 15 (𝑗 ∈ ℕ → (𝑗 − 1) ∈ ℕ0)
5033, 34, 493syl 18 . . . . . . . . . . . . . 14 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (𝑗 − 1) ∈ ℕ0)
51 elnn0uz 11763 . . . . . . . . . . . . . 14 ((𝑗 − 1) ∈ ℕ0 ↔ (𝑗 − 1) ∈ (ℤ‘0))
5250, 51sylib 208 . . . . . . . . . . . . 13 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (𝑗 − 1) ∈ (ℤ‘0))
53 eluzfz1 12386 . . . . . . . . . . . . 13 ((𝑗 − 1) ∈ (ℤ‘0) → 0 ∈ (0...(𝑗 − 1)))
54 fzsplit 12405 . . . . . . . . . . . . 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 2685 . . . . . . . . . . 11 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (0...(2 · ((𝑗 − 1) / 2))) = ((0...0) ∪ ((0 + 1)...(𝑗 − 1))))
57 fzsn 12421 . . . . . . . . . . . . . . 15 (0 ∈ ℤ → (0...0) = {0})
5821, 57ax-mp 5 . . . . . . . . . . . . . 14 (0...0) = {0}
5914, 14oveq12i 6702 . . . . . . . . . . . . . . . . 17 (((abs‘0)↑2) + ((abs‘0)↑2)) = (0 + 0)
60 00id 10249 . . . . . . . . . . . . . . . . 17 (0 + 0) = 0
6159, 60eqtri 2673 . . . . . . . . . . . . . . . 16 (((abs‘0)↑2) + ((abs‘0)↑2)) = 0
62244sqlem4a 15702 . . . . . . . . . . . . . . . . 17 ((0 ∈ ℤ[i] ∧ 0 ∈ ℤ[i]) → (((abs‘0)↑2) + ((abs‘0)↑2)) ∈ 𝑆)
6323, 23, 62mp2an 708 . . . . . . . . . . . . . . . 16 (((abs‘0)↑2) + ((abs‘0)↑2)) ∈ 𝑆
6461, 63eqeltrri 2727 . . . . . . . . . . . . . . 15 0 ∈ 𝑆
65 snssi 4371 . . . . . . . . . . . . . . 15 (0 ∈ 𝑆 → {0} ⊆ 𝑆)
6664, 65ax-mp 5 . . . . . . . . . . . . . 14 {0} ⊆ 𝑆
6758, 66eqsstri 3668 . . . . . . . . . . . . 13 (0...0) ⊆ 𝑆
6867a1i 11 . . . . . . . . . . . 12 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (0...0) ⊆ 𝑆)
69 0p1e1 11170 . . . . . . . . . . . . . 14 (0 + 1) = 1
7069oveq1i 6700 . . . . . . . . . . . . 13 ((0 + 1)...(𝑗 − 1)) = (1...(𝑗 − 1))
71 simpr 476 . . . . . . . . . . . . . 14 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆)
72 dfss3 3625 . . . . . . . . . . . . . 14 ((1...(𝑗 − 1)) ⊆ 𝑆 ↔ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆)
7371, 72sylibr 224 . . . . . . . . . . . . 13 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (1...(𝑗 − 1)) ⊆ 𝑆)
7470, 73syl5eqss 3682 . . . . . . . . . . . 12 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → ((0 + 1)...(𝑗 − 1)) ⊆ 𝑆)
7568, 74unssd 3822 . . . . . . . . . . 11 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → ((0...0) ∪ ((0 + 1)...(𝑗 − 1))) ⊆ 𝑆)
7656, 75eqsstrd 3672 . . . . . . . . . 10 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (0...(2 · ((𝑗 − 1) / 2))) ⊆ 𝑆)
77 oveq1 6697 . . . . . . . . . . . 12 (𝑘 = 𝑖 → (𝑘 · 𝑗) = (𝑖 · 𝑗))
7877eleq1d 2715 . . . . . . . . . . 11 (𝑘 = 𝑖 → ((𝑘 · 𝑗) ∈ 𝑆 ↔ (𝑖 · 𝑗) ∈ 𝑆))
7978cbvrabv 3230 . . . . . . . . . 10 {𝑘 ∈ ℕ ∣ (𝑘 · 𝑗) ∈ 𝑆} = {𝑖 ∈ ℕ ∣ (𝑖 · 𝑗) ∈ 𝑆}
80 eqid 2651 . . . . . . . . . 10 inf({𝑘 ∈ ℕ ∣ (𝑘 · 𝑗) ∈ 𝑆}, ℝ, < ) = inf({𝑘 ∈ ℕ ∣ (𝑘 · 𝑗) ∈ 𝑆}, ℝ, < )
8124, 31, 47, 33, 76, 79, 804sqlem18 15713 . . . . . . . . 9 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → 𝑗𝑆)
8229, 81sylanbr 489 . . . . . . . 8 (((𝑗 ∈ ℙ ∧ 𝑗 ≠ 2) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → 𝑗𝑆)
8382an32s 863 . . . . . . 7 (((𝑗 ∈ ℙ ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) ∧ 𝑗 ≠ 2) → 𝑗𝑆)
8410, 10oveq12i 6702 . . . . . . . . . 10 (((abs‘1)↑2) + ((abs‘1)↑2)) = (1 + 1)
85 df-2 11117 . . . . . . . . . 10 2 = (1 + 1)
8684, 85eqtr4i 2676 . . . . . . . . 9 (((abs‘1)↑2) + ((abs‘1)↑2)) = 2
87244sqlem4a 15702 . . . . . . . . . 10 ((1 ∈ ℤ[i] ∧ 1 ∈ ℤ[i]) → (((abs‘1)↑2) + ((abs‘1)↑2)) ∈ 𝑆)
8820, 20, 87mp2an 708 . . . . . . . . 9 (((abs‘1)↑2) + ((abs‘1)↑2)) ∈ 𝑆
8986, 88eqeltrri 2727 . . . . . . . 8 2 ∈ 𝑆
9089a1i 11 . . . . . . 7 ((𝑗 ∈ ℙ ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → 2 ∈ 𝑆)
9128, 83, 90pm2.61ne 2908 . . . . . 6 ((𝑗 ∈ ℙ ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → 𝑗𝑆)
9224mul4sq 15705 . . . . . . 7 ((𝑚𝑆𝑖𝑆) → (𝑚 · 𝑖) ∈ 𝑆)
9392a1i 11 . . . . . 6 ((𝑚 ∈ (ℤ‘2) ∧ 𝑖 ∈ (ℤ‘2)) → ((𝑚𝑆𝑖𝑆) → (𝑚 · 𝑖) ∈ 𝑆))
942, 3, 4, 5, 6, 27, 91, 93prmind2 15445 . . . . 5 (𝑘 ∈ ℕ → 𝑘𝑆)
95 id 22 . . . . . 6 (𝑘 = 0 → 𝑘 = 0)
9695, 64syl6eqel 2738 . . . . 5 (𝑘 = 0 → 𝑘𝑆)
9794, 96jaoi 393 . . . 4 ((𝑘 ∈ ℕ ∨ 𝑘 = 0) → 𝑘𝑆)
981, 97sylbi 207 . . 3 (𝑘 ∈ ℕ0𝑘𝑆)
9998ssriv 3640 . 2 0𝑆
100244sqlem1 15699 . 2 𝑆 ⊆ ℕ0
10199, 100eqssi 3652 1 0 = 𝑆
Colors of variables: wff setvar class
Syntax hints:  wi 4  wo 382  wa 383   = wceq 1523  wcel 2030  {cab 2637  wne 2823  wral 2941  wrex 2942  {crab 2945  cdif 3604  cun 3605  wss 3607  {csn 4210  cfv 5926  (class class class)co 6690  infcinf 8388  cc 9972  cr 9973  0cc0 9974  1c1 9975   + caddc 9977   · cmul 9979   < clt 10112  cmin 10304   / cdiv 10722  cn 11058  2c2 11108  0cn0 11330  cz 11415  cuz 11725  ...cfz 12364  cexp 12900  abscabs 14018  cprime 15432  ℤ[i]cgz 15680
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1762  ax-4 1777  ax-5 1879  ax-6 1945  ax-7 1981  ax-8 2032  ax-9 2039  ax-10 2059  ax-11 2074  ax-12 2087  ax-13 2282  ax-ext 2631  ax-rep 4804  ax-sep 4814  ax-nul 4822  ax-pow 4873  ax-pr 4936  ax-un 6991  ax-cnex 10030  ax-resscn 10031  ax-1cn 10032  ax-icn 10033  ax-addcl 10034  ax-addrcl 10035  ax-mulcl 10036  ax-mulrcl 10037  ax-mulcom 10038  ax-addass 10039  ax-mulass 10040  ax-distr 10041  ax-i2m1 10042  ax-1ne0 10043  ax-1rid 10044  ax-rnegex 10045  ax-rrecex 10046  ax-cnre 10047  ax-pre-lttri 10048  ax-pre-lttrn 10049  ax-pre-ltadd 10050  ax-pre-mulgt0 10051  ax-pre-sup 10052
This theorem depends on definitions:  df-bi 197  df-or 384  df-an 385  df-3or 1055  df-3an 1056  df-tru 1526  df-ex 1745  df-nf 1750  df-sb 1938  df-eu 2502  df-mo 2503  df-clab 2638  df-cleq 2644  df-clel 2647  df-nfc 2782  df-ne 2824  df-nel 2927  df-ral 2946  df-rex 2947  df-reu 2948  df-rmo 2949  df-rab 2950  df-v 3233  df-sbc 3469  df-csb 3567  df-dif 3610  df-un 3612  df-in 3614  df-ss 3621  df-pss 3623  df-nul 3949  df-if 4120  df-pw 4193  df-sn 4211  df-pr 4213  df-tp 4215  df-op 4217  df-uni 4469  df-int 4508  df-iun 4554  df-br 4686  df-opab 4746  df-mpt 4763  df-tr 4786  df-id 5053  df-eprel 5058  df-po 5064  df-so 5065  df-fr 5102  df-we 5104  df-xp 5149  df-rel 5150  df-cnv 5151  df-co 5152  df-dm 5153  df-rn 5154  df-res 5155  df-ima 5156  df-pred 5718  df-ord 5764  df-on 5765  df-lim 5766  df-suc 5767  df-iota 5889  df-fun 5928  df-fn 5929  df-f 5930  df-f1 5931  df-fo 5932  df-f1o 5933  df-fv 5934  df-riota 6651  df-ov 6693  df-oprab 6694  df-mpt2 6695  df-om 7108  df-1st 7210  df-2nd 7211  df-wrecs 7452  df-recs 7513  df-rdg 7551  df-1o 7605  df-2o 7606  df-oadd 7609  df-er 7787  df-en 7998  df-dom 7999  df-sdom 8000  df-fin 8001  df-sup 8389  df-inf 8390  df-card 8803  df-cda 9028  df-pnf 10114  df-mnf 10115  df-xr 10116  df-ltxr 10117  df-le 10118  df-sub 10306  df-neg 10307  df-div 10723  df-nn 11059  df-2 11117  df-3 11118  df-4 11119  df-n0 11331  df-xnn0 11402  df-z 11416  df-uz 11726  df-rp 11871  df-fz 12365  df-fl 12633  df-mod 12709  df-seq 12842  df-exp 12901  df-hash 13158  df-cj 13883  df-re 13884  df-im 13885  df-sqrt 14019  df-abs 14020  df-dvds 15028  df-gcd 15264  df-prm 15433  df-gz 15681
This theorem is referenced by:  4sq  15715
  Copyright terms: Public domain W3C validator