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

Theorem dfif6 4468
Description: An alternate definition of the conditional operator df-if 4466 as a simple class abstraction. (Contributed by Mario Carneiro, 8-Sep-2013.)
Assertion
Ref Expression
dfif6 if(𝜑, 𝐴, 𝐵) = ({𝑥𝐴𝜑} ∪ {𝑥𝐵 ∣ ¬ 𝜑})
Distinct variable groups:   𝜑,𝑥   𝑥,𝐴   𝑥,𝐵

Proof of Theorem dfif6
Dummy variable 𝑦 is distinct from all other variables.
StepHypRef Expression
1 eleq1w 2819 . . . 4 (𝑥 = 𝑦 → (𝑥𝐴𝑦𝐴))
21anbi1d 631 . . 3 (𝑥 = 𝑦 → ((𝑥𝐴𝜑) ↔ (𝑦𝐴𝜑)))
3 eleq1w 2819 . . . 4 (𝑥 = 𝑦 → (𝑥𝐵𝑦𝐵))
43anbi1d 631 . . 3 (𝑥 = 𝑦 → ((𝑥𝐵 ∧ ¬ 𝜑) ↔ (𝑦𝐵 ∧ ¬ 𝜑)))
52, 4unabw 4237 . 2 ({𝑥 ∣ (𝑥𝐴𝜑)} ∪ {𝑥 ∣ (𝑥𝐵 ∧ ¬ 𝜑)}) = {𝑦 ∣ ((𝑦𝐴𝜑) ∨ (𝑦𝐵 ∧ ¬ 𝜑))}
6 df-rab 3306 . . 3 {𝑥𝐴𝜑} = {𝑥 ∣ (𝑥𝐴𝜑)}
7 df-rab 3306 . . 3 {𝑥𝐵 ∣ ¬ 𝜑} = {𝑥 ∣ (𝑥𝐵 ∧ ¬ 𝜑)}
86, 7uneq12i 4101 . 2 ({𝑥𝐴𝜑} ∪ {𝑥𝐵 ∣ ¬ 𝜑}) = ({𝑥 ∣ (𝑥𝐴𝜑)} ∪ {𝑥 ∣ (𝑥𝐵 ∧ ¬ 𝜑)})
9 df-if 4466 . 2 if(𝜑, 𝐴, 𝐵) = {𝑦 ∣ ((𝑦𝐴𝜑) ∨ (𝑦𝐵 ∧ ¬ 𝜑))}
105, 8, 93eqtr4ri 2775 1 if(𝜑, 𝐴, 𝐵) = ({𝑥𝐴𝜑} ∪ {𝑥𝐵 ∣ ¬ 𝜑})
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wa 397  wo 845   = wceq 1539  wcel 2104  {cab 2713  {crab 3303  cun 3890  ifcif 4465
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1795  ax-4 1809  ax-5 1911  ax-6 1969  ax-7 2009  ax-8 2106  ax-9 2114  ax-ext 2707
This theorem depends on definitions:  df-bi 206  df-an 398  df-or 846  df-tru 1542  df-ex 1780  df-sb 2066  df-clab 2714  df-cleq 2728  df-clel 2814  df-rab 3306  df-v 3439  df-un 3897  df-if 4466
This theorem is referenced by:  ifeq1  4469  ifeq2  4470  dfif3  4479
  Copyright terms: Public domain W3C validator