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

Theorem dfif5 4472
Description: Alternate definition of the conditional operator df-if 4457. Note that 𝜑 is independent of 𝑥 i.e. a constant true or false (see also ab0orv 4309). (Contributed by Gérard Lang, 18-Aug-2013.)
Hypothesis
Ref Expression
dfif3.1 𝐶 = {𝑥𝜑}
Assertion
Ref Expression
dfif5 if(𝜑, 𝐴, 𝐵) = ((𝐴𝐵) ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))))
Distinct variable group:   𝜑,𝑥
Allowed substitution hints:   𝐴(𝑥)   𝐵(𝑥)   𝐶(𝑥)

Proof of Theorem dfif5
StepHypRef Expression
1 inindi 4157 . 2 ((𝐴𝐵) ∩ ((𝐴 ∪ (V ∖ 𝐶)) ∩ (𝐵𝐶))) = (((𝐴𝐵) ∩ (𝐴 ∪ (V ∖ 𝐶))) ∩ ((𝐴𝐵) ∩ (𝐵𝐶)))
2 dfif3.1 . . 3 𝐶 = {𝑥𝜑}
32dfif4 4471 . 2 if(𝜑, 𝐴, 𝐵) = ((𝐴𝐵) ∩ ((𝐴 ∪ (V ∖ 𝐶)) ∩ (𝐵𝐶)))
4 undir 4207 . . 3 ((𝐴𝐵) ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))) = ((𝐴 ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))) ∩ (𝐵 ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))))
5 unidm 4082 . . . . . . . 8 (𝐴𝐴) = 𝐴
65uneq1i 4089 . . . . . . 7 ((𝐴𝐴) ∪ (𝐵 ∩ (V ∖ 𝐶))) = (𝐴 ∪ (𝐵 ∩ (V ∖ 𝐶)))
7 unass 4096 . . . . . . 7 ((𝐴𝐴) ∪ (𝐵 ∩ (V ∖ 𝐶))) = (𝐴 ∪ (𝐴 ∪ (𝐵 ∩ (V ∖ 𝐶))))
8 undi 4205 . . . . . . 7 (𝐴 ∪ (𝐵 ∩ (V ∖ 𝐶))) = ((𝐴𝐵) ∩ (𝐴 ∪ (V ∖ 𝐶)))
96, 7, 83eqtr3ri 2775 . . . . . 6 ((𝐴𝐵) ∩ (𝐴 ∪ (V ∖ 𝐶))) = (𝐴 ∪ (𝐴 ∪ (𝐵 ∩ (V ∖ 𝐶))))
10 undi 4205 . . . . . . . 8 (𝐴 ∪ ((𝐴𝐵) ∩ 𝐶)) = ((𝐴 ∪ (𝐴𝐵)) ∩ (𝐴𝐶))
11 undifabs 4408 . . . . . . . . 9 (𝐴 ∪ (𝐴𝐵)) = 𝐴
1211ineq1i 4139 . . . . . . . 8 ((𝐴 ∪ (𝐴𝐵)) ∩ (𝐴𝐶)) = (𝐴 ∩ (𝐴𝐶))
13 inabs 4186 . . . . . . . 8 (𝐴 ∩ (𝐴𝐶)) = 𝐴
1410, 12, 133eqtri 2770 . . . . . . 7 (𝐴 ∪ ((𝐴𝐵) ∩ 𝐶)) = 𝐴
15 undif2 4407 . . . . . . . . 9 (𝐴 ∪ (𝐵𝐴)) = (𝐴𝐵)
1615ineq1i 4139 . . . . . . . 8 ((𝐴 ∪ (𝐵𝐴)) ∩ (𝐴 ∪ (V ∖ 𝐶))) = ((𝐴𝐵) ∩ (𝐴 ∪ (V ∖ 𝐶)))
17 undi 4205 . . . . . . . 8 (𝐴 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))) = ((𝐴 ∪ (𝐵𝐴)) ∩ (𝐴 ∪ (V ∖ 𝐶)))
1816, 17, 83eqtr4i 2776 . . . . . . 7 (𝐴 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))) = (𝐴 ∪ (𝐵 ∩ (V ∖ 𝐶)))
1914, 18uneq12i 4091 . . . . . 6 ((𝐴 ∪ ((𝐴𝐵) ∩ 𝐶)) ∪ (𝐴 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))) = (𝐴 ∪ (𝐴 ∪ (𝐵 ∩ (V ∖ 𝐶))))
209, 19eqtr4i 2769 . . . . 5 ((𝐴𝐵) ∩ (𝐴 ∪ (V ∖ 𝐶))) = ((𝐴 ∪ ((𝐴𝐵) ∩ 𝐶)) ∪ (𝐴 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))))
21 unundi 4100 . . . . 5 (𝐴 ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))) = ((𝐴 ∪ ((𝐴𝐵) ∩ 𝐶)) ∪ (𝐴 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))))
2220, 21eqtr4i 2769 . . . 4 ((𝐴𝐵) ∩ (𝐴 ∪ (V ∖ 𝐶))) = (𝐴 ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))))
23 unass 4096 . . . . . 6 (((𝐴𝐶) ∪ 𝐵) ∪ 𝐵) = ((𝐴𝐶) ∪ (𝐵𝐵))
24 undi 4205 . . . . . . . . 9 (𝐵 ∪ (𝐴𝐶)) = ((𝐵𝐴) ∩ (𝐵𝐶))
25 uncom 4083 . . . . . . . . 9 ((𝐴𝐶) ∪ 𝐵) = (𝐵 ∪ (𝐴𝐶))
26 undif2 4407 . . . . . . . . . 10 (𝐵 ∪ (𝐴𝐵)) = (𝐵𝐴)
2726ineq1i 4139 . . . . . . . . 9 ((𝐵 ∪ (𝐴𝐵)) ∩ (𝐵𝐶)) = ((𝐵𝐴) ∩ (𝐵𝐶))
2824, 25, 273eqtr4i 2776 . . . . . . . 8 ((𝐴𝐶) ∪ 𝐵) = ((𝐵 ∪ (𝐴𝐵)) ∩ (𝐵𝐶))
29 undi 4205 . . . . . . . 8 (𝐵 ∪ ((𝐴𝐵) ∩ 𝐶)) = ((𝐵 ∪ (𝐴𝐵)) ∩ (𝐵𝐶))
3028, 29eqtr4i 2769 . . . . . . 7 ((𝐴𝐶) ∪ 𝐵) = (𝐵 ∪ ((𝐴𝐵) ∩ 𝐶))
31 undi 4205 . . . . . . . 8 (𝐵 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))) = ((𝐵 ∪ (𝐵𝐴)) ∩ (𝐵 ∪ (V ∖ 𝐶)))
32 undifabs 4408 . . . . . . . . 9 (𝐵 ∪ (𝐵𝐴)) = 𝐵
3332ineq1i 4139 . . . . . . . 8 ((𝐵 ∪ (𝐵𝐴)) ∩ (𝐵 ∪ (V ∖ 𝐶))) = (𝐵 ∩ (𝐵 ∪ (V ∖ 𝐶)))
34 inabs 4186 . . . . . . . 8 (𝐵 ∩ (𝐵 ∪ (V ∖ 𝐶))) = 𝐵
3531, 33, 343eqtrri 2771 . . . . . . 7 𝐵 = (𝐵 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))
3630, 35uneq12i 4091 . . . . . 6 (((𝐴𝐶) ∪ 𝐵) ∪ 𝐵) = ((𝐵 ∪ ((𝐴𝐵) ∩ 𝐶)) ∪ (𝐵 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))))
37 unidm 4082 . . . . . . 7 (𝐵𝐵) = 𝐵
3837uneq2i 4090 . . . . . 6 ((𝐴𝐶) ∪ (𝐵𝐵)) = ((𝐴𝐶) ∪ 𝐵)
3923, 36, 383eqtr3ri 2775 . . . . 5 ((𝐴𝐶) ∪ 𝐵) = ((𝐵 ∪ ((𝐴𝐵) ∩ 𝐶)) ∪ (𝐵 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))))
40 uncom 4083 . . . . . . 7 (𝐵𝐶) = (𝐶𝐵)
4140ineq2i 4140 . . . . . 6 ((𝐴𝐵) ∩ (𝐵𝐶)) = ((𝐴𝐵) ∩ (𝐶𝐵))
42 undir 4207 . . . . . 6 ((𝐴𝐶) ∪ 𝐵) = ((𝐴𝐵) ∩ (𝐶𝐵))
4341, 42eqtr4i 2769 . . . . 5 ((𝐴𝐵) ∩ (𝐵𝐶)) = ((𝐴𝐶) ∪ 𝐵)
44 unundi 4100 . . . . 5 (𝐵 ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))) = ((𝐵 ∪ ((𝐴𝐵) ∩ 𝐶)) ∪ (𝐵 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))))
4539, 43, 443eqtr4i 2776 . . . 4 ((𝐴𝐵) ∩ (𝐵𝐶)) = (𝐵 ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))))
4622, 45ineq12i 4141 . . 3 (((𝐴𝐵) ∩ (𝐴 ∪ (V ∖ 𝐶))) ∩ ((𝐴𝐵) ∩ (𝐵𝐶))) = ((𝐴 ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))) ∩ (𝐵 ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))))
474, 46eqtr4i 2769 . 2 ((𝐴𝐵) ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))) = (((𝐴𝐵) ∩ (𝐴 ∪ (V ∖ 𝐶))) ∩ ((𝐴𝐵) ∩ (𝐵𝐶)))
481, 3, 473eqtr4i 2776 1 if(𝜑, 𝐴, 𝐵) = ((𝐴𝐵) ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))))
Colors of variables: wff setvar class
Syntax hints:   = wceq 1539  {cab 2715  Vcvv 3422  cdif 3880  cun 3881  cin 3882  ifcif 4456
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1799  ax-4 1813  ax-5 1914  ax-6 1972  ax-7 2012  ax-8 2110  ax-9 2118  ax-ext 2709
This theorem depends on definitions:  df-bi 206  df-an 396  df-or 844  df-tru 1542  df-fal 1552  df-ex 1784  df-sb 2069  df-clab 2716  df-cleq 2730  df-clel 2817  df-rab 3072  df-v 3424  df-dif 3886  df-un 3888  df-in 3890  df-ss 3900  df-nul 4254  df-if 4457
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator