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

Theorem 4sqlem3 15492
Description: Lemma for 4sq 15506. 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 2610 . . 3 (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2)))
2 oveq1 6556 . . . . . . 7 (𝑐 = 𝐶 → (𝑐↑2) = (𝐶↑2))
32oveq1d 6564 . . . . . 6 (𝑐 = 𝐶 → ((𝑐↑2) + (𝑑↑2)) = ((𝐶↑2) + (𝑑↑2)))
43oveq2d 6565 . . . . 5 (𝑐 = 𝐶 → (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝑑↑2))))
54eqeq2d 2620 . . . 4 (𝑐 = 𝐶 → ((((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2))) ↔ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝑑↑2)))))
6 oveq1 6556 . . . . . . 7 (𝑑 = 𝐷 → (𝑑↑2) = (𝐷↑2))
76oveq2d 6565 . . . . . 6 (𝑑 = 𝐷 → ((𝐶↑2) + (𝑑↑2)) = ((𝐶↑2) + (𝐷↑2)))
87oveq2d 6565 . . . . 5 (𝑑 = 𝐷 → (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝑑↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))))
98eqeq2d 2620 . . . 4 (𝑑 = 𝐷 → ((((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝑑↑2))) ↔ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2)))))
105, 9rspc2ev 3295 . . 3 ((𝐶 ∈ ℤ ∧ 𝐷 ∈ ℤ ∧ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2)))) → ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2))))
111, 10mp3an3 1405 . 2 ((𝐶 ∈ ℤ ∧ 𝐷 ∈ ℤ) → ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2))))
12 oveq1 6556 . . . . . . . . 9 (𝑎 = 𝐴 → (𝑎↑2) = (𝐴↑2))
1312oveq1d 6564 . . . . . . . 8 (𝑎 = 𝐴 → ((𝑎↑2) + (𝑏↑2)) = ((𝐴↑2) + (𝑏↑2)))
1413oveq1d 6564 . . . . . . 7 (𝑎 = 𝐴 → (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) = (((𝐴↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))))
1514eqeq2d 2620 . . . . . 6 (𝑎 = 𝐴 → ((((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) ↔ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2)))))
16152rexbidv 3039 . . . . 5 (𝑎 = 𝐴 → (∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) ↔ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2)))))
17 oveq1 6556 . . . . . . . . 9 (𝑏 = 𝐵 → (𝑏↑2) = (𝐵↑2))
1817oveq2d 6565 . . . . . . . 8 (𝑏 = 𝐵 → ((𝐴↑2) + (𝑏↑2)) = ((𝐴↑2) + (𝐵↑2)))
1918oveq1d 6564 . . . . . . 7 (𝑏 = 𝐵 → (((𝐴↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2))))
2019eqeq2d 2620 . . . . . 6 (𝑏 = 𝐵 → ((((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) ↔ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2)))))
21202rexbidv 3039 . . . . 5 (𝑏 = 𝐵 → (∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) ↔ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2)))))
2216, 21rspc2ev 3295 . . . 4 ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ ∧ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2)))) → ∃𝑎 ∈ ℤ ∃𝑏 ∈ ℤ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))))
23223expa 1257 . . 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 15491 . . 3 ((((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) ∈ 𝑆 ↔ ∃𝑎 ∈ ℤ ∃𝑏 ∈ ℤ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))))
2623, 25sylibr 223 . 2 (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2)))) → (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) ∈ 𝑆)
2711, 26sylan2 490 1 (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ (𝐶 ∈ ℤ ∧ 𝐷 ∈ ℤ)) → (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) ∈ 𝑆)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wa 383   = wceq 1475  wcel 1977  {cab 2596  wrex 2897  (class class class)co 6549   + caddc 9818  2c2 10947  cz 11254  cexp 12722
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-10 2006  ax-11 2021  ax-12 2034  ax-13 2234  ax-ext 2590  ax-nul 4717
This theorem depends on definitions:  df-bi 196  df-or 384  df-an 385  df-3an 1033  df-tru 1478  df-ex 1696  df-nf 1701  df-sb 1868  df-eu 2462  df-clab 2597  df-cleq 2603  df-clel 2606  df-nfc 2740  df-ral 2901  df-rex 2902  df-rab 2905  df-v 3175  df-sbc 3403  df-dif 3543  df-un 3545  df-in 3547  df-ss 3554  df-nul 3875  df-if 4037  df-sn 4126  df-pr 4128  df-op 4132  df-uni 4373  df-br 4584  df-iota 5768  df-fv 5812  df-ov 6552
This theorem is referenced by:  4sqlem4a  15493
  Copyright terms: Public domain W3C validator