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

Theorem dfif5 4475
Description: Alternate definition of the conditional operator df-if 4460. Note that 𝜑 is independent of 𝑥 i.e. a constant true or false (see also ab0orv 4312). (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 4160 . 2 ((𝐴𝐵) ∩ ((𝐴 ∪ (V ∖ 𝐶)) ∩ (𝐵𝐶))) = (((𝐴𝐵) ∩ (𝐴 ∪ (V ∖ 𝐶))) ∩ ((𝐴𝐵) ∩ (𝐵𝐶)))
2 dfif3.1 . . 3 𝐶 = {𝑥𝜑}
32dfif4 4474 . 2 if(𝜑, 𝐴, 𝐵) = ((𝐴𝐵) ∩ ((𝐴 ∪ (V ∖ 𝐶)) ∩ (𝐵𝐶)))
4 undir 4210 . . 3 ((𝐴𝐵) ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))) = ((𝐴 ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))) ∩ (𝐵 ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))))
5 unidm 4086 . . . . . . . 8 (𝐴𝐴) = 𝐴
65uneq1i 4093 . . . . . . 7 ((𝐴𝐴) ∪ (𝐵 ∩ (V ∖ 𝐶))) = (𝐴 ∪ (𝐵 ∩ (V ∖ 𝐶)))
7 unass 4100 . . . . . . 7 ((𝐴𝐴) ∪ (𝐵 ∩ (V ∖ 𝐶))) = (𝐴 ∪ (𝐴 ∪ (𝐵 ∩ (V ∖ 𝐶))))
8 undi 4208 . . . . . . 7 (𝐴 ∪ (𝐵 ∩ (V ∖ 𝐶))) = ((𝐴𝐵) ∩ (𝐴 ∪ (V ∖ 𝐶)))
96, 7, 83eqtr3ri 2775 . . . . . 6 ((𝐴𝐵) ∩ (𝐴 ∪ (V ∖ 𝐶))) = (𝐴 ∪ (𝐴 ∪ (𝐵 ∩ (V ∖ 𝐶))))
10 undi 4208 . . . . . . . 8 (𝐴 ∪ ((𝐴𝐵) ∩ 𝐶)) = ((𝐴 ∪ (𝐴𝐵)) ∩ (𝐴𝐶))
11 undifabs 4411 . . . . . . . . 9 (𝐴 ∪ (𝐴𝐵)) = 𝐴
1211ineq1i 4142 . . . . . . . 8 ((𝐴 ∪ (𝐴𝐵)) ∩ (𝐴𝐶)) = (𝐴 ∩ (𝐴𝐶))
13 inabs 4189 . . . . . . . 8 (𝐴 ∩ (𝐴𝐶)) = 𝐴
1410, 12, 133eqtri 2770 . . . . . . 7 (𝐴 ∪ ((𝐴𝐵) ∩ 𝐶)) = 𝐴
15 undif2 4410 . . . . . . . . 9 (𝐴 ∪ (𝐵𝐴)) = (𝐴𝐵)
1615ineq1i 4142 . . . . . . . 8 ((𝐴 ∪ (𝐵𝐴)) ∩ (𝐴 ∪ (V ∖ 𝐶))) = ((𝐴𝐵) ∩ (𝐴 ∪ (V ∖ 𝐶)))
17 undi 4208 . . . . . . . 8 (𝐴 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))) = ((𝐴 ∪ (𝐵𝐴)) ∩ (𝐴 ∪ (V ∖ 𝐶)))
1816, 17, 83eqtr4i 2776 . . . . . . 7 (𝐴 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))) = (𝐴 ∪ (𝐵 ∩ (V ∖ 𝐶)))
1914, 18uneq12i 4095 . . . . . 6 ((𝐴 ∪ ((𝐴𝐵) ∩ 𝐶)) ∪ (𝐴 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))) = (𝐴 ∪ (𝐴 ∪ (𝐵 ∩ (V ∖ 𝐶))))
209, 19eqtr4i 2769 . . . . 5 ((𝐴𝐵) ∩ (𝐴 ∪ (V ∖ 𝐶))) = ((𝐴 ∪ ((𝐴𝐵) ∩ 𝐶)) ∪ (𝐴 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))))
21 unundi 4104 . . . . 5 (𝐴 ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))) = ((𝐴 ∪ ((𝐴𝐵) ∩ 𝐶)) ∪ (𝐴 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))))
2220, 21eqtr4i 2769 . . . 4 ((𝐴𝐵) ∩ (𝐴 ∪ (V ∖ 𝐶))) = (𝐴 ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))))
23 unass 4100 . . . . . 6 (((𝐴𝐶) ∪ 𝐵) ∪ 𝐵) = ((𝐴𝐶) ∪ (𝐵𝐵))
24 undi 4208 . . . . . . . . 9 (𝐵 ∪ (𝐴𝐶)) = ((𝐵𝐴) ∩ (𝐵𝐶))
25 uncom 4087 . . . . . . . . 9 ((𝐴𝐶) ∪ 𝐵) = (𝐵 ∪ (𝐴𝐶))
26 undif2 4410 . . . . . . . . . 10 (𝐵 ∪ (𝐴𝐵)) = (𝐵𝐴)
2726ineq1i 4142 . . . . . . . . 9 ((𝐵 ∪ (𝐴𝐵)) ∩ (𝐵𝐶)) = ((𝐵𝐴) ∩ (𝐵𝐶))
2824, 25, 273eqtr4i 2776 . . . . . . . 8 ((𝐴𝐶) ∪ 𝐵) = ((𝐵 ∪ (𝐴𝐵)) ∩ (𝐵𝐶))
29 undi 4208 . . . . . . . 8 (𝐵 ∪ ((𝐴𝐵) ∩ 𝐶)) = ((𝐵 ∪ (𝐴𝐵)) ∩ (𝐵𝐶))
3028, 29eqtr4i 2769 . . . . . . 7 ((𝐴𝐶) ∪ 𝐵) = (𝐵 ∪ ((𝐴𝐵) ∩ 𝐶))
31 undi 4208 . . . . . . . 8 (𝐵 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))) = ((𝐵 ∪ (𝐵𝐴)) ∩ (𝐵 ∪ (V ∖ 𝐶)))
32 undifabs 4411 . . . . . . . . 9 (𝐵 ∪ (𝐵𝐴)) = 𝐵
3332ineq1i 4142 . . . . . . . 8 ((𝐵 ∪ (𝐵𝐴)) ∩ (𝐵 ∪ (V ∖ 𝐶))) = (𝐵 ∩ (𝐵 ∪ (V ∖ 𝐶)))
34 inabs 4189 . . . . . . . 8 (𝐵 ∩ (𝐵 ∪ (V ∖ 𝐶))) = 𝐵
3531, 33, 343eqtrri 2771 . . . . . . 7 𝐵 = (𝐵 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))
3630, 35uneq12i 4095 . . . . . 6 (((𝐴𝐶) ∪ 𝐵) ∪ 𝐵) = ((𝐵 ∪ ((𝐴𝐵) ∩ 𝐶)) ∪ (𝐵 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))))
37 unidm 4086 . . . . . . 7 (𝐵𝐵) = 𝐵
3837uneq2i 4094 . . . . . 6 ((𝐴𝐶) ∪ (𝐵𝐵)) = ((𝐴𝐶) ∪ 𝐵)
3923, 36, 383eqtr3ri 2775 . . . . 5 ((𝐴𝐶) ∪ 𝐵) = ((𝐵 ∪ ((𝐴𝐵) ∩ 𝐶)) ∪ (𝐵 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))))
40 uncom 4087 . . . . . . 7 (𝐵𝐶) = (𝐶𝐵)
4140ineq2i 4143 . . . . . 6 ((𝐴𝐵) ∩ (𝐵𝐶)) = ((𝐴𝐵) ∩ (𝐶𝐵))
42 undir 4210 . . . . . 6 ((𝐴𝐶) ∪ 𝐵) = ((𝐴𝐵) ∩ (𝐶𝐵))
4341, 42eqtr4i 2769 . . . . 5 ((𝐴𝐵) ∩ (𝐵𝐶)) = ((𝐴𝐶) ∪ 𝐵)
44 unundi 4104 . . . . 5 (𝐵 ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))) = ((𝐵 ∪ ((𝐴𝐵) ∩ 𝐶)) ∪ (𝐵 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))))
4539, 43, 443eqtr4i 2776 . . . 4 ((𝐴𝐵) ∩ (𝐵𝐶)) = (𝐵 ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))))
4622, 45ineq12i 4144 . . 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 3432  cdif 3884  cun 3885  cin 3886  ifcif 4459
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1798  ax-4 1812  ax-5 1913  ax-6 1971  ax-7 2011  ax-8 2108  ax-9 2116  ax-ext 2709
This theorem depends on definitions:  df-bi 206  df-an 397  df-or 845  df-tru 1542  df-fal 1552  df-ex 1783  df-sb 2068  df-clab 2716  df-cleq 2730  df-clel 2816  df-rab 3073  df-v 3434  df-dif 3890  df-un 3892  df-in 3894  df-ss 3904  df-nul 4257  df-if 4460
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator