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

Theorem dfif3 4496
Description: Alternate definition of the conditional operator df-if 4482. Note that 𝜑 is independent of 𝑥 i.e. a constant true or false. (Contributed by NM, 25-Aug-2013.) (Revised by Mario Carneiro, 8-Sep-2013.)
Hypothesis
Ref Expression
dfif3.1 𝐶 = {𝑥 ∣ 𝜑}
Assertion
Ref Expression
dfif3 if(𝜑, 𝐴, 𝐵) = ((𝐴 ∩ 𝐶) ∪ (𝐵 ∩ (V ∖ 𝐶)))
Distinct variable group:   𝜑,𝑥
Allowed substitution hints:   𝐴(𝑥)   𝐵(𝑥)   𝐶(𝑥)

Proof of Theorem dfif3
Dummy variables 𝑦 𝑧 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 dfif6 4484 . 2 if(𝜑, 𝐴, 𝐵) = ({𝑦 ∈ 𝐴 ∣ 𝜑} ∪ {𝑦 ∈ 𝐵 ∣ ¬ 𝜑})
2 dfif3.1 . . . . . 6 𝐶 = {𝑥 ∣ 𝜑}
3 biidd 265 . . . . . . 7 (𝑥 = 𝑦 → (𝜑 ↔ 𝜑))
43cbvabv 2830 . . . . . 6 {𝑥 ∣ 𝜑} = {𝑦 ∣ 𝜑}
52, 4eqtri 2783 . . . . 5 𝐶 = {𝑦 ∣ 𝜑}
65ineq2i 4113 . . . 4 (𝐴 ∩ 𝐶) = (𝐴 ∩ {𝑦 ∣ 𝜑})
7 dfrab3 4263 . . . 4 {𝑦 ∈ 𝐴 ∣ 𝜑} = (𝐴 ∩ {𝑦 ∣ 𝜑})
86, 7eqtr4i 2786 . . 3 (𝐴 ∩ 𝐶) = {𝑦 ∈ 𝐴 ∣ 𝜑}
9 dfrab3 4263 . . . 4 {𝑦 ∈ 𝐵 ∣ ¬ 𝜑} = (𝐵 ∩ {𝑦 ∣ ¬ 𝜑})
10 biidd 265 . . . . . . 7 (𝑦 = 𝑧 → (𝜑 ↔ 𝜑))
1110notabw 4257 . . . . . 6 {𝑦 ∣ ¬ 𝜑} = (V ∖ {𝑧 ∣ 𝜑})
12 biidd 265 . . . . . . . . 9 (𝑥 = 𝑧 → (𝜑 ↔ 𝜑))
1312cbvabv 2830 . . . . . . . 8 {𝑥 ∣ 𝜑} = {𝑧 ∣ 𝜑}
142, 13eqtri 2783 . . . . . . 7 𝐶 = {𝑧 ∣ 𝜑}
1514difeq2i 4059 . . . . . 6 (V ∖ 𝐶) = (V ∖ {𝑧 ∣ 𝜑})
1611, 15eqtr4i 2786 . . . . 5 {𝑦 ∣ ¬ 𝜑} = (V ∖ 𝐶)
1716ineq2i 4113 . . . 4 (𝐵 ∩ {𝑦 ∣ ¬ 𝜑}) = (𝐵 ∩ (V ∖ 𝐶))
189, 17eqtr2i 2784 . . 3 (𝐵 ∩ (V ∖ 𝐶)) = {𝑦 ∈ 𝐵 ∣ ¬ 𝜑}
198, 18uneq12i 4164 . 2 ((𝐴 ∩ 𝐶) ∪ (𝐵 ∩ (V ∖ 𝐶))) = ({𝑦 ∈ 𝐴 ∣ 𝜑} ∪ {𝑦 ∈ 𝐵 ∣ ¬ 𝜑})
201, 19eqtr4i 2786 1 if(𝜑, 𝐴, 𝐵) = ((𝐴 ∩ 𝐶) ∪ (𝐵 ∩ (V ∖ 𝐶)))
Colors of variables:    wff setvar class
This proof depends on syntax axioms:  ¬ wn 3   = wceq 1569  {cab 2738  {crab 3412  Vcvv 3450   ∖ cdif 4044   ∩ cin 4088   ∪ cun 4148  ifcif 4481
This proof depends on axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1827  ax-4 1841  ax-5 1942  ax-6 1999  ax-7 2040  ax-8 2146  ax-9 2154  ax-ext 2732
This proof depends on definitions:  df-bi 210  df-an 402  df-or 862  df-tru 1572  df-ex 1812  df-sb 2099  df-clab 2739  df-cleq 2752  df-clel 2835  df-rab 3413  df-v 3452  df-dif 4046  df-in 4090  df-un 4150  df-if 4482
This theorem is used by:  dfif4  4497
  Copyright terms: Public domain W3C validator