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

Theorem 4sqlem3 16749
Description: Lemma for 4sq 16763. 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 2737 . . 3 (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2)))
2 oveq1 7349 . . . . . . 7 (𝑐 = 𝐶 → (𝑐↑2) = (𝐶↑2))
32oveq1d 7357 . . . . . 6 (𝑐 = 𝐶 → ((𝑐↑2) + (𝑑↑2)) = ((𝐶↑2) + (𝑑↑2)))
43oveq2d 7358 . . . . 5 (𝑐 = 𝐶 → (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝑑↑2))))
54eqeq2d 2748 . . . 4 (𝑐 = 𝐶 → ((((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2))) ↔ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝑑↑2)))))
6 oveq1 7349 . . . . . . 7 (𝑑 = 𝐷 → (𝑑↑2) = (𝐷↑2))
76oveq2d 7358 . . . . . 6 (𝑑 = 𝐷 → ((𝐶↑2) + (𝑑↑2)) = ((𝐶↑2) + (𝐷↑2)))
87oveq2d 7358 . . . . 5 (𝑑 = 𝐷 → (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝑑↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))))
98eqeq2d 2748 . . . 4 (𝑑 = 𝐷 → ((((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝑑↑2))) ↔ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2)))))
105, 9rspc2ev 3585 . . 3 ((𝐶 ∈ ℤ ∧ 𝐷 ∈ ℤ ∧ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2)))) → ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2))))
111, 10mp3an3 1450 . 2 ((𝐶 ∈ ℤ ∧ 𝐷 ∈ ℤ) → ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2))))
12 oveq1 7349 . . . . . . . . 9 (𝑎 = 𝐴 → (𝑎↑2) = (𝐴↑2))
1312oveq1d 7357 . . . . . . . 8 (𝑎 = 𝐴 → ((𝑎↑2) + (𝑏↑2)) = ((𝐴↑2) + (𝑏↑2)))
1413oveq1d 7357 . . . . . . 7 (𝑎 = 𝐴 → (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) = (((𝐴↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))))
1514eqeq2d 2748 . . . . . 6 (𝑎 = 𝐴 → ((((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) ↔ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2)))))
16152rexbidv 3210 . . . . 5 (𝑎 = 𝐴 → (∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) ↔ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2)))))
17 oveq1 7349 . . . . . . . . 9 (𝑏 = 𝐵 → (𝑏↑2) = (𝐵↑2))
1817oveq2d 7358 . . . . . . . 8 (𝑏 = 𝐵 → ((𝐴↑2) + (𝑏↑2)) = ((𝐴↑2) + (𝐵↑2)))
1918oveq1d 7357 . . . . . . 7 (𝑏 = 𝐵 → (((𝐴↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2))))
2019eqeq2d 2748 . . . . . 6 (𝑏 = 𝐵 → ((((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) ↔ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2)))))
21202rexbidv 3210 . . . . 5 (𝑏 = 𝐵 → (∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) ↔ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2)))))
2216, 21rspc2ev 3585 . . . 4 ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ ∧ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2)))) → ∃𝑎 ∈ ℤ ∃𝑏 ∈ ℤ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))))
23223expa 1118 . . 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 16748 . . 3 ((((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) ∈ 𝑆 ↔ ∃𝑎 ∈ ℤ ∃𝑏 ∈ ℤ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))))
2623, 25sylibr 233 . 2 (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2)))) → (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) ∈ 𝑆)
2711, 26sylan2 594 1 (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ (𝐶 ∈ ℤ ∧ 𝐷 ∈ ℤ)) → (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) ∈ 𝑆)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wa 397   = wceq 1541  wcel 2106  {cab 2714  wrex 3071  (class class class)co 7342   + caddc 10980  2c2 12134  cz 12425  cexp 13888
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1797  ax-4 1811  ax-5 1913  ax-6 1971  ax-7 2011  ax-8 2108  ax-9 2116  ax-ext 2708  ax-nul 5255
This theorem depends on definitions:  df-bi 206  df-an 398  df-or 846  df-3an 1089  df-tru 1544  df-fal 1554  df-ex 1782  df-sb 2068  df-clab 2715  df-cleq 2729  df-clel 2815  df-ne 2942  df-ral 3063  df-rex 3072  df-rab 3405  df-v 3444  df-dif 3905  df-un 3907  df-in 3909  df-ss 3919  df-nul 4275  df-if 4479  df-sn 4579  df-pr 4581  df-op 4585  df-uni 4858  df-br 5098  df-iota 6436  df-fv 6492  df-ov 7345
This theorem is referenced by:  4sqlem4a  16750
  Copyright terms: Public domain W3C validator