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

Theorem 4sqlem19 15591
Description: Lemma for 4sq 15592. 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 15590. 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 15582 𝑘𝑆. (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 11238 . . . 4 (𝑘 ∈ ℕ0 ↔ (𝑘 ∈ ℕ ∨ 𝑘 = 0))
2 eleq1 2686 . . . . . 6 (𝑗 = 1 → (𝑗𝑆 ↔ 1 ∈ 𝑆))
3 eleq1 2686 . . . . . 6 (𝑗 = 𝑚 → (𝑗𝑆𝑚𝑆))
4 eleq1 2686 . . . . . 6 (𝑗 = 𝑖 → (𝑗𝑆𝑖𝑆))
5 eleq1 2686 . . . . . 6 (𝑗 = (𝑚 · 𝑖) → (𝑗𝑆 ↔ (𝑚 · 𝑖) ∈ 𝑆))
6 eleq1 2686 . . . . . 6 (𝑗 = 𝑘 → (𝑗𝑆𝑘𝑆))
7 abs1 13971 . . . . . . . . . . 11 (abs‘1) = 1
87oveq1i 6614 . . . . . . . . . 10 ((abs‘1)↑2) = (1↑2)
9 sq1 12898 . . . . . . . . . 10 (1↑2) = 1
108, 9eqtri 2643 . . . . . . . . 9 ((abs‘1)↑2) = 1
11 abs0 13959 . . . . . . . . . . 11 (abs‘0) = 0
1211oveq1i 6614 . . . . . . . . . 10 ((abs‘0)↑2) = (0↑2)
13 sq0 12895 . . . . . . . . . 10 (0↑2) = 0
1412, 13eqtri 2643 . . . . . . . . 9 ((abs‘0)↑2) = 0
1510, 14oveq12i 6616 . . . . . . . 8 (((abs‘1)↑2) + ((abs‘0)↑2)) = (1 + 0)
16 1p0e1 11077 . . . . . . . 8 (1 + 0) = 1
1715, 16eqtri 2643 . . . . . . 7 (((abs‘1)↑2) + ((abs‘0)↑2)) = 1
18 1z 11351 . . . . . . . . 9 1 ∈ ℤ
19 zgz 15561 . . . . . . . . 9 (1 ∈ ℤ → 1 ∈ ℤ[i])
2018, 19ax-mp 5 . . . . . . . 8 1 ∈ ℤ[i]
21 0z 11332 . . . . . . . . 9 0 ∈ ℤ
22 zgz 15561 . . . . . . . . 9 (0 ∈ ℤ → 0 ∈ ℤ[i])
2321, 22ax-mp 5 . . . . . . . 8 0 ∈ ℤ[i]
24 4sq.1 . . . . . . . . 9 𝑆 = {𝑛 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2)))}
25244sqlem4a 15579 . . . . . . . 8 ((1 ∈ ℤ[i] ∧ 0 ∈ ℤ[i]) → (((abs‘1)↑2) + ((abs‘0)↑2)) ∈ 𝑆)
2620, 23, 25mp2an 707 . . . . . . 7 (((abs‘1)↑2) + ((abs‘0)↑2)) ∈ 𝑆
2717, 26eqeltrri 2695 . . . . . 6 1 ∈ 𝑆
28 eleq1 2686 . . . . . . 7 (𝑗 = 2 → (𝑗𝑆 ↔ 2 ∈ 𝑆))
29 eldifsn 4287 . . . . . . . . 9 (𝑗 ∈ (ℙ ∖ {2}) ↔ (𝑗 ∈ ℙ ∧ 𝑗 ≠ 2))
30 oddprm 15439 . . . . . . . . . . 11 (𝑗 ∈ (ℙ ∖ {2}) → ((𝑗 − 1) / 2) ∈ ℕ)
3130adantr 481 . . . . . . . . . 10 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → ((𝑗 − 1) / 2) ∈ ℕ)
32 eldifi 3710 . . . . . . . . . . . . . . . 16 (𝑗 ∈ (ℙ ∖ {2}) → 𝑗 ∈ ℙ)
3332adantr 481 . . . . . . . . . . . . . . 15 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → 𝑗 ∈ ℙ)
34 prmnn 15312 . . . . . . . . . . . . . . 15 (𝑗 ∈ ℙ → 𝑗 ∈ ℕ)
35 nncn 10972 . . . . . . . . . . . . . . 15 (𝑗 ∈ ℕ → 𝑗 ∈ ℂ)
3633, 34, 353syl 18 . . . . . . . . . . . . . 14 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → 𝑗 ∈ ℂ)
37 ax-1cn 9938 . . . . . . . . . . . . . 14 1 ∈ ℂ
38 subcl 10224 . . . . . . . . . . . . . 14 ((𝑗 ∈ ℂ ∧ 1 ∈ ℂ) → (𝑗 − 1) ∈ ℂ)
3936, 37, 38sylancl 693 . . . . . . . . . . . . 13 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (𝑗 − 1) ∈ ℂ)
40 2cnd 11037 . . . . . . . . . . . . 13 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → 2 ∈ ℂ)
41 2ne0 11057 . . . . . . . . . . . . . 14 2 ≠ 0
4241a1i 11 . . . . . . . . . . . . 13 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → 2 ≠ 0)
4339, 40, 42divcan2d 10747 . . . . . . . . . . . 12 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (2 · ((𝑗 − 1) / 2)) = (𝑗 − 1))
4443oveq1d 6619 . . . . . . . . . . 11 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → ((2 · ((𝑗 − 1) / 2)) + 1) = ((𝑗 − 1) + 1))
45 npcan 10234 . . . . . . . . . . . 12 ((𝑗 ∈ ℂ ∧ 1 ∈ ℂ) → ((𝑗 − 1) + 1) = 𝑗)
4636, 37, 45sylancl 693 . . . . . . . . . . 11 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → ((𝑗 − 1) + 1) = 𝑗)
4744, 46eqtr2d 2656 . . . . . . . . . 10 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → 𝑗 = ((2 · ((𝑗 − 1) / 2)) + 1))
4843oveq2d 6620 . . . . . . . . . . . 12 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (0...(2 · ((𝑗 − 1) / 2))) = (0...(𝑗 − 1)))
49 nnm1nn0 11278 . . . . . . . . . . . . . . 15 (𝑗 ∈ ℕ → (𝑗 − 1) ∈ ℕ0)
5033, 34, 493syl 18 . . . . . . . . . . . . . 14 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (𝑗 − 1) ∈ ℕ0)
51 elnn0uz 11669 . . . . . . . . . . . . . 14 ((𝑗 − 1) ∈ ℕ0 ↔ (𝑗 − 1) ∈ (ℤ‘0))
5250, 51sylib 208 . . . . . . . . . . . . 13 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (𝑗 − 1) ∈ (ℤ‘0))
53 eluzfz1 12290 . . . . . . . . . . . . 13 ((𝑗 − 1) ∈ (ℤ‘0) → 0 ∈ (0...(𝑗 − 1)))
54 fzsplit 12309 . . . . . . . . . . . . 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 2655 . . . . . . . . . . 11 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (0...(2 · ((𝑗 − 1) / 2))) = ((0...0) ∪ ((0 + 1)...(𝑗 − 1))))
57 fzsn 12325 . . . . . . . . . . . . . . 15 (0 ∈ ℤ → (0...0) = {0})
5821, 57ax-mp 5 . . . . . . . . . . . . . 14 (0...0) = {0}
5914, 14oveq12i 6616 . . . . . . . . . . . . . . . . 17 (((abs‘0)↑2) + ((abs‘0)↑2)) = (0 + 0)
60 00id 10155 . . . . . . . . . . . . . . . . 17 (0 + 0) = 0
6159, 60eqtri 2643 . . . . . . . . . . . . . . . 16 (((abs‘0)↑2) + ((abs‘0)↑2)) = 0
62244sqlem4a 15579 . . . . . . . . . . . . . . . . 17 ((0 ∈ ℤ[i] ∧ 0 ∈ ℤ[i]) → (((abs‘0)↑2) + ((abs‘0)↑2)) ∈ 𝑆)
6323, 23, 62mp2an 707 . . . . . . . . . . . . . . . 16 (((abs‘0)↑2) + ((abs‘0)↑2)) ∈ 𝑆
6461, 63eqeltrri 2695 . . . . . . . . . . . . . . 15 0 ∈ 𝑆
65 snssi 4308 . . . . . . . . . . . . . . 15 (0 ∈ 𝑆 → {0} ⊆ 𝑆)
6664, 65ax-mp 5 . . . . . . . . . . . . . 14 {0} ⊆ 𝑆
6758, 66eqsstri 3614 . . . . . . . . . . . . 13 (0...0) ⊆ 𝑆
6867a1i 11 . . . . . . . . . . . 12 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (0...0) ⊆ 𝑆)
69 0p1e1 11076 . . . . . . . . . . . . . 14 (0 + 1) = 1
7069oveq1i 6614 . . . . . . . . . . . . 13 ((0 + 1)...(𝑗 − 1)) = (1...(𝑗 − 1))
71 simpr 477 . . . . . . . . . . . . . 14 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆)
72 dfss3 3573 . . . . . . . . . . . . . 14 ((1...(𝑗 − 1)) ⊆ 𝑆 ↔ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆)
7371, 72sylibr 224 . . . . . . . . . . . . 13 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (1...(𝑗 − 1)) ⊆ 𝑆)
7470, 73syl5eqss 3628 . . . . . . . . . . . 12 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → ((0 + 1)...(𝑗 − 1)) ⊆ 𝑆)
7568, 74unssd 3767 . . . . . . . . . . 11 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → ((0...0) ∪ ((0 + 1)...(𝑗 − 1))) ⊆ 𝑆)
7656, 75eqsstrd 3618 . . . . . . . . . 10 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (0...(2 · ((𝑗 − 1) / 2))) ⊆ 𝑆)
77 oveq1 6611 . . . . . . . . . . . 12 (𝑘 = 𝑖 → (𝑘 · 𝑗) = (𝑖 · 𝑗))
7877eleq1d 2683 . . . . . . . . . . 11 (𝑘 = 𝑖 → ((𝑘 · 𝑗) ∈ 𝑆 ↔ (𝑖 · 𝑗) ∈ 𝑆))
7978cbvrabv 3185 . . . . . . . . . 10 {𝑘 ∈ ℕ ∣ (𝑘 · 𝑗) ∈ 𝑆} = {𝑖 ∈ ℕ ∣ (𝑖 · 𝑗) ∈ 𝑆}
80 eqid 2621 . . . . . . . . . 10 inf({𝑘 ∈ ℕ ∣ (𝑘 · 𝑗) ∈ 𝑆}, ℝ, < ) = inf({𝑘 ∈ ℕ ∣ (𝑘 · 𝑗) ∈ 𝑆}, ℝ, < )
8124, 31, 47, 33, 76, 79, 804sqlem18 15590 . . . . . . . . 9 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → 𝑗𝑆)
8229, 81sylanbr 490 . . . . . . . 8 (((𝑗 ∈ ℙ ∧ 𝑗 ≠ 2) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → 𝑗𝑆)
8382an32s 845 . . . . . . 7 (((𝑗 ∈ ℙ ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) ∧ 𝑗 ≠ 2) → 𝑗𝑆)
8410, 10oveq12i 6616 . . . . . . . . . 10 (((abs‘1)↑2) + ((abs‘1)↑2)) = (1 + 1)
85 df-2 11023 . . . . . . . . . 10 2 = (1 + 1)
8684, 85eqtr4i 2646 . . . . . . . . 9 (((abs‘1)↑2) + ((abs‘1)↑2)) = 2
87244sqlem4a 15579 . . . . . . . . . 10 ((1 ∈ ℤ[i] ∧ 1 ∈ ℤ[i]) → (((abs‘1)↑2) + ((abs‘1)↑2)) ∈ 𝑆)
8820, 20, 87mp2an 707 . . . . . . . . 9 (((abs‘1)↑2) + ((abs‘1)↑2)) ∈ 𝑆
8986, 88eqeltrri 2695 . . . . . . . 8 2 ∈ 𝑆
9089a1i 11 . . . . . . 7 ((𝑗 ∈ ℙ ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → 2 ∈ 𝑆)
9128, 83, 90pm2.61ne 2875 . . . . . 6 ((𝑗 ∈ ℙ ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → 𝑗𝑆)
9224mul4sq 15582 . . . . . . 7 ((𝑚𝑆𝑖𝑆) → (𝑚 · 𝑖) ∈ 𝑆)
9392a1i 11 . . . . . 6 ((𝑚 ∈ (ℤ‘2) ∧ 𝑖 ∈ (ℤ‘2)) → ((𝑚𝑆𝑖𝑆) → (𝑚 · 𝑖) ∈ 𝑆))
942, 3, 4, 5, 6, 27, 91, 93prmind2 15322 . . . . 5 (𝑘 ∈ ℕ → 𝑘𝑆)
95 id 22 . . . . . 6 (𝑘 = 0 → 𝑘 = 0)
9695, 64syl6eqel 2706 . . . . 5 (𝑘 = 0 → 𝑘𝑆)
9794, 96jaoi 394 . . . 4 ((𝑘 ∈ ℕ ∨ 𝑘 = 0) → 𝑘𝑆)
981, 97sylbi 207 . . 3 (𝑘 ∈ ℕ0𝑘𝑆)
9998ssriv 3587 . 2 0𝑆
100244sqlem1 15576 . 2 𝑆 ⊆ ℕ0
10199, 100eqssi 3599 1 0 = 𝑆
Colors of variables: wff setvar class
Syntax hints:  wi 4  wo 383  wa 384   = wceq 1480  wcel 1987  {cab 2607  wne 2790  wral 2907  wrex 2908  {crab 2911  cdif 3552  cun 3553  wss 3555  {csn 4148  cfv 5847  (class class class)co 6604  infcinf 8291  cc 9878  cr 9879  0cc0 9880  1c1 9881   + caddc 9883   · cmul 9885   < clt 10018  cmin 10210   / cdiv 10628  cn 10964  2c2 11014  0cn0 11236  cz 11321  cuz 11631  ...cfz 12268  cexp 12800  abscabs 13908  cprime 15309  ℤ[i]cgz 15557
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1719  ax-4 1734  ax-5 1836  ax-6 1885  ax-7 1932  ax-8 1989  ax-9 1996  ax-10 2016  ax-11 2031  ax-12 2044  ax-13 2245  ax-ext 2601  ax-rep 4731  ax-sep 4741  ax-nul 4749  ax-pow 4803  ax-pr 4867  ax-un 6902  ax-cnex 9936  ax-resscn 9937  ax-1cn 9938  ax-icn 9939  ax-addcl 9940  ax-addrcl 9941  ax-mulcl 9942  ax-mulrcl 9943  ax-mulcom 9944  ax-addass 9945  ax-mulass 9946  ax-distr 9947  ax-i2m1 9948  ax-1ne0 9949  ax-1rid 9950  ax-rnegex 9951  ax-rrecex 9952  ax-cnre 9953  ax-pre-lttri 9954  ax-pre-lttrn 9955  ax-pre-ltadd 9956  ax-pre-mulgt0 9957  ax-pre-sup 9958
This theorem depends on definitions:  df-bi 197  df-or 385  df-an 386  df-3or 1037  df-3an 1038  df-tru 1483  df-ex 1702  df-nf 1707  df-sb 1878  df-eu 2473  df-mo 2474  df-clab 2608  df-cleq 2614  df-clel 2617  df-nfc 2750  df-ne 2791  df-nel 2894  df-ral 2912  df-rex 2913  df-reu 2914  df-rmo 2915  df-rab 2916  df-v 3188  df-sbc 3418  df-csb 3515  df-dif 3558  df-un 3560  df-in 3562  df-ss 3569  df-pss 3571  df-nul 3892  df-if 4059  df-pw 4132  df-sn 4149  df-pr 4151  df-tp 4153  df-op 4155  df-uni 4403  df-int 4441  df-iun 4487  df-br 4614  df-opab 4674  df-mpt 4675  df-tr 4713  df-eprel 4985  df-id 4989  df-po 4995  df-so 4996  df-fr 5033  df-we 5035  df-xp 5080  df-rel 5081  df-cnv 5082  df-co 5083  df-dm 5084  df-rn 5085  df-res 5086  df-ima 5087  df-pred 5639  df-ord 5685  df-on 5686  df-lim 5687  df-suc 5688  df-iota 5810  df-fun 5849  df-fn 5850  df-f 5851  df-f1 5852  df-fo 5853  df-f1o 5854  df-fv 5855  df-riota 6565  df-ov 6607  df-oprab 6608  df-mpt2 6609  df-om 7013  df-1st 7113  df-2nd 7114  df-wrecs 7352  df-recs 7413  df-rdg 7451  df-1o 7505  df-2o 7506  df-oadd 7509  df-er 7687  df-en 7900  df-dom 7901  df-sdom 7902  df-fin 7903  df-sup 8292  df-inf 8293  df-card 8709  df-cda 8934  df-pnf 10020  df-mnf 10021  df-xr 10022  df-ltxr 10023  df-le 10024  df-sub 10212  df-neg 10213  df-div 10629  df-nn 10965  df-2 11023  df-3 11024  df-4 11025  df-n0 11237  df-xnn0 11308  df-z 11322  df-uz 11632  df-rp 11777  df-fz 12269  df-fl 12533  df-mod 12609  df-seq 12742  df-exp 12801  df-hash 13058  df-cj 13773  df-re 13774  df-im 13775  df-sqrt 13909  df-abs 13910  df-dvds 14908  df-gcd 15141  df-prm 15310  df-gz 15558
This theorem is referenced by:  4sq  15592
  Copyright terms: Public domain W3C validator