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

Theorem 4sqlem3 16274
Description: Lemma for 4sq 16288. Sufficient condition to be in 𝑆. (Contributed by Mario Carneiro, 14-Jul-2014.)
Hypothesis
Ref Expression
4sq.1 𝑆 = {𝑛 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2)))}
Assertion
Ref Expression
4sqlem3 (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ (𝐶 ∈ ℤ ∧ 𝐷 ∈ ℤ)) → (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) ∈ 𝑆)
Distinct variable groups:   𝑤,𝑛,𝑥,𝑦,𝑧   𝐵,𝑛   𝐴,𝑛   𝐶,𝑛   𝐷,𝑛   𝑆,𝑛
Allowed substitution hints:   𝐴(𝑥,𝑦,𝑧,𝑤)   𝐵(𝑥,𝑦,𝑧,𝑤)   𝐶(𝑥,𝑦,𝑧,𝑤)   𝐷(𝑥,𝑦,𝑧,𝑤)   𝑆(𝑥,𝑦,𝑧,𝑤)

Proof of Theorem 4sqlem3
Dummy variables 𝑎 𝑏 𝑐 𝑑 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 eqid 2818 . . 3 (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2)))
2 oveq1 7152 . . . . . . 7 (𝑐 = 𝐶 → (𝑐↑2) = (𝐶↑2))
32oveq1d 7160 . . . . . 6 (𝑐 = 𝐶 → ((𝑐↑2) + (𝑑↑2)) = ((𝐶↑2) + (𝑑↑2)))
43oveq2d 7161 . . . . 5 (𝑐 = 𝐶 → (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝑑↑2))))
54eqeq2d 2829 . . . 4 (𝑐 = 𝐶 → ((((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2))) ↔ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝑑↑2)))))
6 oveq1 7152 . . . . . . 7 (𝑑 = 𝐷 → (𝑑↑2) = (𝐷↑2))
76oveq2d 7161 . . . . . 6 (𝑑 = 𝐷 → ((𝐶↑2) + (𝑑↑2)) = ((𝐶↑2) + (𝐷↑2)))
87oveq2d 7161 . . . . 5 (𝑑 = 𝐷 → (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝑑↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))))
98eqeq2d 2829 . . . 4 (𝑑 = 𝐷 → ((((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝑑↑2))) ↔ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2)))))
105, 9rspc2ev 3632 . . 3 ((𝐶 ∈ ℤ ∧ 𝐷 ∈ ℤ ∧ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2)))) → ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2))))
111, 10mp3an3 1441 . 2 ((𝐶 ∈ ℤ ∧ 𝐷 ∈ ℤ) → ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2))))
12 oveq1 7152 . . . . . . . . 9 (𝑎 = 𝐴 → (𝑎↑2) = (𝐴↑2))
1312oveq1d 7160 . . . . . . . 8 (𝑎 = 𝐴 → ((𝑎↑2) + (𝑏↑2)) = ((𝐴↑2) + (𝑏↑2)))
1413oveq1d 7160 . . . . . . 7 (𝑎 = 𝐴 → (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) = (((𝐴↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))))
1514eqeq2d 2829 . . . . . 6 (𝑎 = 𝐴 → ((((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) ↔ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2)))))
16152rexbidv 3297 . . . . 5 (𝑎 = 𝐴 → (∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) ↔ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2)))))
17 oveq1 7152 . . . . . . . . 9 (𝑏 = 𝐵 → (𝑏↑2) = (𝐵↑2))
1817oveq2d 7161 . . . . . . . 8 (𝑏 = 𝐵 → ((𝐴↑2) + (𝑏↑2)) = ((𝐴↑2) + (𝐵↑2)))
1918oveq1d 7160 . . . . . . 7 (𝑏 = 𝐵 → (((𝐴↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2))))
2019eqeq2d 2829 . . . . . 6 (𝑏 = 𝐵 → ((((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) ↔ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2)))))
21202rexbidv 3297 . . . . 5 (𝑏 = 𝐵 → (∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) ↔ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2)))))
2216, 21rspc2ev 3632 . . . 4 ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ ∧ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2)))) → ∃𝑎 ∈ ℤ ∃𝑏 ∈ ℤ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))))
23223expa 1110 . . 3 (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2)))) → ∃𝑎 ∈ ℤ ∃𝑏 ∈ ℤ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))))
24 4sq.1 . . . 4 𝑆 = {𝑛 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2)))}
25244sqlem2 16273 . . 3 ((((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) ∈ 𝑆 ↔ ∃𝑎 ∈ ℤ ∃𝑏 ∈ ℤ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))))
2623, 25sylibr 235 . 2 (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2)))) → (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) ∈ 𝑆)
2711, 26sylan2 592 1 (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ (𝐶 ∈ ℤ ∧ 𝐷 ∈ ℤ)) → (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) ∈ 𝑆)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wa 396   = wceq 1528  wcel 2105  {cab 2796  wrex 3136  (class class class)co 7145   + caddc 10528  2c2 11680  cz 11969  cexp 13417
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1787  ax-4 1801  ax-5 1902  ax-6 1961  ax-7 2006  ax-8 2107  ax-9 2115  ax-10 2136  ax-11 2151  ax-12 2167  ax-ext 2790  ax-nul 5201
This theorem depends on definitions:  df-bi 208  df-an 397  df-or 842  df-3an 1081  df-tru 1531  df-ex 1772  df-nf 1776  df-sb 2061  df-mo 2615  df-eu 2647  df-clab 2797  df-cleq 2811  df-clel 2890  df-nfc 2960  df-ral 3140  df-rex 3141  df-rab 3144  df-v 3494  df-sbc 3770  df-dif 3936  df-un 3938  df-in 3940  df-ss 3949  df-nul 4289  df-if 4464  df-sn 4558  df-pr 4560  df-op 4564  df-uni 4831  df-br 5058  df-iota 6307  df-fv 6356  df-ov 7148
This theorem is referenced by:  4sqlem4a  16275
  Copyright terms: Public domain W3C validator