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

Theorem 4sqlem19 15505
 Description: Lemma for 4sq 15506. 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 15504. 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 15496 𝑘 ∈ 𝑆. (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 11171 . . . 4 (𝑘 ∈ ℕ0 ↔ (𝑘 ∈ ℕ ∨ 𝑘 = 0))
2 eleq1 2676 . . . . . 6 (𝑗 = 1 → (𝑗𝑆 ↔ 1 ∈ 𝑆))
3 eleq1 2676 . . . . . 6 (𝑗 = 𝑚 → (𝑗𝑆𝑚𝑆))
4 eleq1 2676 . . . . . 6 (𝑗 = 𝑖 → (𝑗𝑆𝑖𝑆))
5 eleq1 2676 . . . . . 6 (𝑗 = (𝑚 · 𝑖) → (𝑗𝑆 ↔ (𝑚 · 𝑖) ∈ 𝑆))
6 eleq1 2676 . . . . . 6 (𝑗 = 𝑘 → (𝑗𝑆𝑘𝑆))
7 abs1 13885 . . . . . . . . . . 11 (abs‘1) = 1
87oveq1i 6559 . . . . . . . . . 10 ((abs‘1)↑2) = (1↑2)
9 sq1 12820 . . . . . . . . . 10 (1↑2) = 1
108, 9eqtri 2632 . . . . . . . . 9 ((abs‘1)↑2) = 1
11 abs0 13873 . . . . . . . . . . 11 (abs‘0) = 0
1211oveq1i 6559 . . . . . . . . . 10 ((abs‘0)↑2) = (0↑2)
13 sq0 12817 . . . . . . . . . 10 (0↑2) = 0
1412, 13eqtri 2632 . . . . . . . . 9 ((abs‘0)↑2) = 0
1510, 14oveq12i 6561 . . . . . . . 8 (((abs‘1)↑2) + ((abs‘0)↑2)) = (1 + 0)
16 1p0e1 11010 . . . . . . . 8 (1 + 0) = 1
1715, 16eqtri 2632 . . . . . . 7 (((abs‘1)↑2) + ((abs‘0)↑2)) = 1
18 1z 11284 . . . . . . . . 9 1 ∈ ℤ
19 zgz 15475 . . . . . . . . 9 (1 ∈ ℤ → 1 ∈ ℤ[i])
2018, 19ax-mp 5 . . . . . . . 8 1 ∈ ℤ[i]
21 0z 11265 . . . . . . . . 9 0 ∈ ℤ
22 zgz 15475 . . . . . . . . 9 (0 ∈ ℤ → 0 ∈ ℤ[i])
2321, 22ax-mp 5 . . . . . . . 8 0 ∈ ℤ[i]
24 4sq.1 . . . . . . . . 9 𝑆 = {𝑛 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2)))}
25244sqlem4a 15493 . . . . . . . 8 ((1 ∈ ℤ[i] ∧ 0 ∈ ℤ[i]) → (((abs‘1)↑2) + ((abs‘0)↑2)) ∈ 𝑆)
2620, 23, 25mp2an 704 . . . . . . 7 (((abs‘1)↑2) + ((abs‘0)↑2)) ∈ 𝑆
2717, 26eqeltrri 2685 . . . . . 6 1 ∈ 𝑆
28 eleq1 2676 . . . . . . 7 (𝑗 = 2 → (𝑗𝑆 ↔ 2 ∈ 𝑆))
29 eldifsn 4260 . . . . . . . . 9 (𝑗 ∈ (ℙ ∖ {2}) ↔ (𝑗 ∈ ℙ ∧ 𝑗 ≠ 2))
30 oddprm 15353 . . . . . . . . . . 11 (𝑗 ∈ (ℙ ∖ {2}) → ((𝑗 − 1) / 2) ∈ ℕ)
3130adantr 480 . . . . . . . . . 10 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → ((𝑗 − 1) / 2) ∈ ℕ)
32 eldifi 3694 . . . . . . . . . . . . . . . 16 (𝑗 ∈ (ℙ ∖ {2}) → 𝑗 ∈ ℙ)
3332adantr 480 . . . . . . . . . . . . . . 15 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → 𝑗 ∈ ℙ)
34 prmnn 15226 . . . . . . . . . . . . . . 15 (𝑗 ∈ ℙ → 𝑗 ∈ ℕ)
35 nncn 10905 . . . . . . . . . . . . . . 15 (𝑗 ∈ ℕ → 𝑗 ∈ ℂ)
3633, 34, 353syl 18 . . . . . . . . . . . . . 14 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → 𝑗 ∈ ℂ)
37 ax-1cn 9873 . . . . . . . . . . . . . 14 1 ∈ ℂ
38 subcl 10159 . . . . . . . . . . . . . 14 ((𝑗 ∈ ℂ ∧ 1 ∈ ℂ) → (𝑗 − 1) ∈ ℂ)
3936, 37, 38sylancl 693 . . . . . . . . . . . . 13 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (𝑗 − 1) ∈ ℂ)
40 2cnd 10970 . . . . . . . . . . . . 13 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → 2 ∈ ℂ)
41 2ne0 10990 . . . . . . . . . . . . . 14 2 ≠ 0
4241a1i 11 . . . . . . . . . . . . 13 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → 2 ≠ 0)
4339, 40, 42divcan2d 10682 . . . . . . . . . . . 12 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (2 · ((𝑗 − 1) / 2)) = (𝑗 − 1))
4443oveq1d 6564 . . . . . . . . . . 11 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → ((2 · ((𝑗 − 1) / 2)) + 1) = ((𝑗 − 1) + 1))
45 npcan 10169 . . . . . . . . . . . 12 ((𝑗 ∈ ℂ ∧ 1 ∈ ℂ) → ((𝑗 − 1) + 1) = 𝑗)
4636, 37, 45sylancl 693 . . . . . . . . . . 11 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → ((𝑗 − 1) + 1) = 𝑗)
4744, 46eqtr2d 2645 . . . . . . . . . 10 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → 𝑗 = ((2 · ((𝑗 − 1) / 2)) + 1))
4843oveq2d 6565 . . . . . . . . . . . 12 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (0...(2 · ((𝑗 − 1) / 2))) = (0...(𝑗 − 1)))
49 nnm1nn0 11211 . . . . . . . . . . . . . . 15 (𝑗 ∈ ℕ → (𝑗 − 1) ∈ ℕ0)
5033, 34, 493syl 18 . . . . . . . . . . . . . 14 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (𝑗 − 1) ∈ ℕ0)
51 elnn0uz 11601 . . . . . . . . . . . . . 14 ((𝑗 − 1) ∈ ℕ0 ↔ (𝑗 − 1) ∈ (ℤ‘0))
5250, 51sylib 207 . . . . . . . . . . . . 13 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (𝑗 − 1) ∈ (ℤ‘0))
53 eluzfz1 12219 . . . . . . . . . . . . 13 ((𝑗 − 1) ∈ (ℤ‘0) → 0 ∈ (0...(𝑗 − 1)))
54 fzsplit 12238 . . . . . . . . . . . . 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 2644 . . . . . . . . . . 11 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (0...(2 · ((𝑗 − 1) / 2))) = ((0...0) ∪ ((0 + 1)...(𝑗 − 1))))
57 fzsn 12254 . . . . . . . . . . . . . . 15 (0 ∈ ℤ → (0...0) = {0})
5821, 57ax-mp 5 . . . . . . . . . . . . . 14 (0...0) = {0}
5914, 14oveq12i 6561 . . . . . . . . . . . . . . . . 17 (((abs‘0)↑2) + ((abs‘0)↑2)) = (0 + 0)
60 00id 10090 . . . . . . . . . . . . . . . . 17 (0 + 0) = 0
6159, 60eqtri 2632 . . . . . . . . . . . . . . . 16 (((abs‘0)↑2) + ((abs‘0)↑2)) = 0
62244sqlem4a 15493 . . . . . . . . . . . . . . . . 17 ((0 ∈ ℤ[i] ∧ 0 ∈ ℤ[i]) → (((abs‘0)↑2) + ((abs‘0)↑2)) ∈ 𝑆)
6323, 23, 62mp2an 704 . . . . . . . . . . . . . . . 16 (((abs‘0)↑2) + ((abs‘0)↑2)) ∈ 𝑆
6461, 63eqeltrri 2685 . . . . . . . . . . . . . . 15 0 ∈ 𝑆
65 snssi 4280 . . . . . . . . . . . . . . 15 (0 ∈ 𝑆 → {0} ⊆ 𝑆)
6664, 65ax-mp 5 . . . . . . . . . . . . . 14 {0} ⊆ 𝑆
6758, 66eqsstri 3598 . . . . . . . . . . . . 13 (0...0) ⊆ 𝑆
6867a1i 11 . . . . . . . . . . . 12 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (0...0) ⊆ 𝑆)
69 0p1e1 11009 . . . . . . . . . . . . . 14 (0 + 1) = 1
7069oveq1i 6559 . . . . . . . . . . . . 13 ((0 + 1)...(𝑗 − 1)) = (1...(𝑗 − 1))
71 simpr 476 . . . . . . . . . . . . . 14 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆)
72 dfss3 3558 . . . . . . . . . . . . . 14 ((1...(𝑗 − 1)) ⊆ 𝑆 ↔ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆)
7371, 72sylibr 223 . . . . . . . . . . . . 13 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (1...(𝑗 − 1)) ⊆ 𝑆)
7470, 73syl5eqss 3612 . . . . . . . . . . . 12 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → ((0 + 1)...(𝑗 − 1)) ⊆ 𝑆)
7568, 74unssd 3751 . . . . . . . . . . 11 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → ((0...0) ∪ ((0 + 1)...(𝑗 − 1))) ⊆ 𝑆)
7656, 75eqsstrd 3602 . . . . . . . . . 10 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → (0...(2 · ((𝑗 − 1) / 2))) ⊆ 𝑆)
77 oveq1 6556 . . . . . . . . . . . 12 (𝑘 = 𝑖 → (𝑘 · 𝑗) = (𝑖 · 𝑗))
7877eleq1d 2672 . . . . . . . . . . 11 (𝑘 = 𝑖 → ((𝑘 · 𝑗) ∈ 𝑆 ↔ (𝑖 · 𝑗) ∈ 𝑆))
7978cbvrabv 3172 . . . . . . . . . 10 {𝑘 ∈ ℕ ∣ (𝑘 · 𝑗) ∈ 𝑆} = {𝑖 ∈ ℕ ∣ (𝑖 · 𝑗) ∈ 𝑆}
80 eqid 2610 . . . . . . . . . 10 inf({𝑘 ∈ ℕ ∣ (𝑘 · 𝑗) ∈ 𝑆}, ℝ, < ) = inf({𝑘 ∈ ℕ ∣ (𝑘 · 𝑗) ∈ 𝑆}, ℝ, < )
8124, 31, 47, 33, 76, 79, 804sqlem18 15504 . . . . . . . . 9 ((𝑗 ∈ (ℙ ∖ {2}) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → 𝑗𝑆)
8229, 81sylanbr 489 . . . . . . . 8 (((𝑗 ∈ ℙ ∧ 𝑗 ≠ 2) ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → 𝑗𝑆)
8382an32s 842 . . . . . . 7 (((𝑗 ∈ ℙ ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) ∧ 𝑗 ≠ 2) → 𝑗𝑆)
8410, 10oveq12i 6561 . . . . . . . . . 10 (((abs‘1)↑2) + ((abs‘1)↑2)) = (1 + 1)
85 df-2 10956 . . . . . . . . . 10 2 = (1 + 1)
8684, 85eqtr4i 2635 . . . . . . . . 9 (((abs‘1)↑2) + ((abs‘1)↑2)) = 2
87244sqlem4a 15493 . . . . . . . . . 10 ((1 ∈ ℤ[i] ∧ 1 ∈ ℤ[i]) → (((abs‘1)↑2) + ((abs‘1)↑2)) ∈ 𝑆)
8820, 20, 87mp2an 704 . . . . . . . . 9 (((abs‘1)↑2) + ((abs‘1)↑2)) ∈ 𝑆
8986, 88eqeltrri 2685 . . . . . . . 8 2 ∈ 𝑆
9089a1i 11 . . . . . . 7 ((𝑗 ∈ ℙ ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → 2 ∈ 𝑆)
9128, 83, 90pm2.61ne 2867 . . . . . 6 ((𝑗 ∈ ℙ ∧ ∀𝑚 ∈ (1...(𝑗 − 1))𝑚𝑆) → 𝑗𝑆)
9224mul4sq 15496 . . . . . . 7 ((𝑚𝑆𝑖𝑆) → (𝑚 · 𝑖) ∈ 𝑆)
9392a1i 11 . . . . . 6 ((𝑚 ∈ (ℤ‘2) ∧ 𝑖 ∈ (ℤ‘2)) → ((𝑚𝑆𝑖𝑆) → (𝑚 · 𝑖) ∈ 𝑆))
942, 3, 4, 5, 6, 27, 91, 93prmind2 15236 . . . . 5 (𝑘 ∈ ℕ → 𝑘𝑆)
95 id 22 . . . . . 6 (𝑘 = 0 → 𝑘 = 0)
9695, 64syl6eqel 2696 . . . . 5 (𝑘 = 0 → 𝑘𝑆)
9794, 96jaoi 393 . . . 4 ((𝑘 ∈ ℕ ∨ 𝑘 = 0) → 𝑘𝑆)
981, 97sylbi 206 . . 3 (𝑘 ∈ ℕ0𝑘𝑆)
9998ssriv 3572 . 2 0𝑆
100244sqlem1 15490 . 2 𝑆 ⊆ ℕ0
10199, 100eqssi 3584 1 0 = 𝑆
 Colors of variables: wff setvar class Syntax hints:   → wi 4   ∨ wo 382   ∧ wa 383   = wceq 1475   ∈ wcel 1977  {cab 2596   ≠ wne 2780  ∀wral 2896  ∃wrex 2897  {crab 2900   ∖ cdif 3537   ∪ cun 3538   ⊆ wss 3540  {csn 4125  ‘cfv 5804  (class class class)co 6549  infcinf 8230  ℂcc 9813  ℝcr 9814  0cc0 9815  1c1 9816   + caddc 9818   · cmul 9820   < clt 9953   − cmin 10145   / cdiv 10563  ℕcn 10897  2c2 10947  ℕ0cn0 11169  ℤcz 11254  ℤ≥cuz 11563  ...cfz 12197  ↑cexp 12722  abscabs 13822  ℙcprime 15223  ℤ[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-rep 4699  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-card 8648  df-cda 8873  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-4 10958  df-n0 11170  df-xnn0 11241  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-hash 12980  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:  4sq  15506
 Copyright terms: Public domain W3C validator