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

Theorem dfif6 4551
Description: An alternate definition of the conditional operator df-if 4549 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 2827 . . . 4 (𝑥 = 𝑦 → (𝑥𝐴𝑦𝐴))
21anbi1d 630 . . 3 (𝑥 = 𝑦 → ((𝑥𝐴𝜑) ↔ (𝑦𝐴𝜑)))
3 eleq1w 2827 . . . 4 (𝑥 = 𝑦 → (𝑥𝐵𝑦𝐵))
43anbi1d 630 . . 3 (𝑥 = 𝑦 → ((𝑥𝐵 ∧ ¬ 𝜑) ↔ (𝑦𝐵 ∧ ¬ 𝜑)))
52, 4unabw 4326 . 2 ({𝑥 ∣ (𝑥𝐴𝜑)} ∪ {𝑥 ∣ (𝑥𝐵 ∧ ¬ 𝜑)}) = {𝑦 ∣ ((𝑦𝐴𝜑) ∨ (𝑦𝐵 ∧ ¬ 𝜑))}
6 df-rab 3444 . . 3 {𝑥𝐴𝜑} = {𝑥 ∣ (𝑥𝐴𝜑)}
7 df-rab 3444 . . 3 {𝑥𝐵 ∣ ¬ 𝜑} = {𝑥 ∣ (𝑥𝐵 ∧ ¬ 𝜑)}
86, 7uneq12i 4189 . 2 ({𝑥𝐴𝜑} ∪ {𝑥𝐵 ∣ ¬ 𝜑}) = ({𝑥 ∣ (𝑥𝐴𝜑)} ∪ {𝑥 ∣ (𝑥𝐵 ∧ ¬ 𝜑)})
9 df-if 4549 . 2 if(𝜑, 𝐴, 𝐵) = {𝑦 ∣ ((𝑦𝐴𝜑) ∨ (𝑦𝐵 ∧ ¬ 𝜑))}
105, 8, 93eqtr4ri 2779 1 if(𝜑, 𝐴, 𝐵) = ({𝑥𝐴𝜑} ∪ {𝑥𝐵 ∣ ¬ 𝜑})
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wa 395  wo 846   = wceq 1537  wcel 2108  {cab 2717  {crab 3443  cun 3974  ifcif 4548
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1793  ax-4 1807  ax-5 1909  ax-6 1967  ax-7 2007  ax-8 2110  ax-9 2118  ax-ext 2711
This theorem depends on definitions:  df-bi 207  df-an 396  df-or 847  df-tru 1540  df-ex 1778  df-sb 2065  df-clab 2718  df-cleq 2732  df-clel 2819  df-rab 3444  df-v 3490  df-un 3981  df-if 4549
This theorem is referenced by:  ifeq1  4552  ifeq2  4553  dfif3  4562
  Copyright terms: Public domain W3C validator