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

Theorem 4sqlem3 16276
Description: Lemma for 4sq 16290. 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 2798 . . 3 (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2)))
2 oveq1 7142 . . . . . . 7 (𝑐 = 𝐶 → (𝑐↑2) = (𝐶↑2))
32oveq1d 7150 . . . . . 6 (𝑐 = 𝐶 → ((𝑐↑2) + (𝑑↑2)) = ((𝐶↑2) + (𝑑↑2)))
43oveq2d 7151 . . . . 5 (𝑐 = 𝐶 → (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝑑↑2))))
54eqeq2d 2809 . . . 4 (𝑐 = 𝐶 → ((((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2))) ↔ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝑑↑2)))))
6 oveq1 7142 . . . . . . 7 (𝑑 = 𝐷 → (𝑑↑2) = (𝐷↑2))
76oveq2d 7151 . . . . . 6 (𝑑 = 𝐷 → ((𝐶↑2) + (𝑑↑2)) = ((𝐶↑2) + (𝐷↑2)))
87oveq2d 7151 . . . . 5 (𝑑 = 𝐷 → (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝑑↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))))
98eqeq2d 2809 . . . 4 (𝑑 = 𝐷 → ((((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝑑↑2))) ↔ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2)))))
105, 9rspc2ev 3583 . . 3 ((𝐶 ∈ ℤ ∧ 𝐷 ∈ ℤ ∧ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2)))) → ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2))))
111, 10mp3an3 1447 . 2 ((𝐶 ∈ ℤ ∧ 𝐷 ∈ ℤ) → ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2))))
12 oveq1 7142 . . . . . . . . 9 (𝑎 = 𝐴 → (𝑎↑2) = (𝐴↑2))
1312oveq1d 7150 . . . . . . . 8 (𝑎 = 𝐴 → ((𝑎↑2) + (𝑏↑2)) = ((𝐴↑2) + (𝑏↑2)))
1413oveq1d 7150 . . . . . . 7 (𝑎 = 𝐴 → (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) = (((𝐴↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))))
1514eqeq2d 2809 . . . . . 6 (𝑎 = 𝐴 → ((((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) ↔ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2)))))
16152rexbidv 3259 . . . . 5 (𝑎 = 𝐴 → (∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) ↔ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2)))))
17 oveq1 7142 . . . . . . . . 9 (𝑏 = 𝐵 → (𝑏↑2) = (𝐵↑2))
1817oveq2d 7151 . . . . . . . 8 (𝑏 = 𝐵 → ((𝐴↑2) + (𝑏↑2)) = ((𝐴↑2) + (𝐵↑2)))
1918oveq1d 7150 . . . . . . 7 (𝑏 = 𝐵 → (((𝐴↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2))))
2019eqeq2d 2809 . . . . . 6 (𝑏 = 𝐵 → ((((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) ↔ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2)))))
21202rexbidv 3259 . . . . 5 (𝑏 = 𝐵 → (∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))) ↔ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2)))))
2216, 21rspc2ev 3583 . . . 4 ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ ∧ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2)))) → ∃𝑎 ∈ ℤ ∃𝑏 ∈ ℤ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))))
23223expa 1115 . . 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 16275 . . 3 ((((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) ∈ 𝑆 ↔ ∃𝑎 ∈ ℤ ∃𝑏 ∈ ℤ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))))
2623, 25sylibr 237 . 2 (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) = (((𝐴↑2) + (𝐵↑2)) + ((𝑐↑2) + (𝑑↑2)))) → (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) ∈ 𝑆)
2711, 26sylan2 595 1 (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ (𝐶 ∈ ℤ ∧ 𝐷 ∈ ℤ)) → (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) ∈ 𝑆)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wa 399   = wceq 1538  wcel 2111  {cab 2776  wrex 3107  (class class class)co 7135   + caddc 10529  2c2 11680  cz 11969  cexp 13425
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 1911  ax-6 1970  ax-7 2015  ax-8 2113  ax-9 2121  ax-10 2142  ax-11 2158  ax-12 2175  ax-ext 2770  ax-nul 5174
This theorem depends on definitions:  df-bi 210  df-an 400  df-or 845  df-3an 1086  df-tru 1541  df-ex 1782  df-nf 1786  df-sb 2070  df-mo 2598  df-eu 2629  df-clab 2777  df-cleq 2791  df-clel 2870  df-nfc 2938  df-ral 3111  df-rex 3112  df-v 3443  df-sbc 3721  df-dif 3884  df-un 3886  df-in 3888  df-ss 3898  df-nul 4244  df-sn 4526  df-pr 4528  df-op 4532  df-uni 4801  df-br 5031  df-iota 6283  df-fv 6332  df-ov 7138
This theorem is referenced by:  4sqlem4a  16277
  Copyright terms: Public domain W3C validator