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

Theorem dfif5 4427
Description: Alternate definition of the conditional operator df-if 4412. Note that 𝜑 is independent of 𝑥 i.e. a constant true or false (see also ab0orv 4264). (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 4115 . 2 ((𝐴𝐵) ∩ ((𝐴 ∪ (V ∖ 𝐶)) ∩ (𝐵𝐶))) = (((𝐴𝐵) ∩ (𝐴 ∪ (V ∖ 𝐶))) ∩ ((𝐴𝐵) ∩ (𝐵𝐶)))
2 dfif3.1 . . 3 𝐶 = {𝑥𝜑}
32dfif4 4426 . 2 if(𝜑, 𝐴, 𝐵) = ((𝐴𝐵) ∩ ((𝐴 ∪ (V ∖ 𝐶)) ∩ (𝐵𝐶)))
4 undir 4165 . . 3 ((𝐴𝐵) ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))) = ((𝐴 ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))) ∩ (𝐵 ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))))
5 unidm 4040 . . . . . . . 8 (𝐴𝐴) = 𝐴
65uneq1i 4047 . . . . . . 7 ((𝐴𝐴) ∪ (𝐵 ∩ (V ∖ 𝐶))) = (𝐴 ∪ (𝐵 ∩ (V ∖ 𝐶)))
7 unass 4054 . . . . . . 7 ((𝐴𝐴) ∪ (𝐵 ∩ (V ∖ 𝐶))) = (𝐴 ∪ (𝐴 ∪ (𝐵 ∩ (V ∖ 𝐶))))
8 undi 4163 . . . . . . 7 (𝐴 ∪ (𝐵 ∩ (V ∖ 𝐶))) = ((𝐴𝐵) ∩ (𝐴 ∪ (V ∖ 𝐶)))
96, 7, 83eqtr3ri 2770 . . . . . 6 ((𝐴𝐵) ∩ (𝐴 ∪ (V ∖ 𝐶))) = (𝐴 ∪ (𝐴 ∪ (𝐵 ∩ (V ∖ 𝐶))))
10 undi 4163 . . . . . . . 8 (𝐴 ∪ ((𝐴𝐵) ∩ 𝐶)) = ((𝐴 ∪ (𝐴𝐵)) ∩ (𝐴𝐶))
11 undifabs 4364 . . . . . . . . 9 (𝐴 ∪ (𝐴𝐵)) = 𝐴
1211ineq1i 4097 . . . . . . . 8 ((𝐴 ∪ (𝐴𝐵)) ∩ (𝐴𝐶)) = (𝐴 ∩ (𝐴𝐶))
13 inabs 4144 . . . . . . . 8 (𝐴 ∩ (𝐴𝐶)) = 𝐴
1410, 12, 133eqtri 2765 . . . . . . 7 (𝐴 ∪ ((𝐴𝐵) ∩ 𝐶)) = 𝐴
15 undif2 4363 . . . . . . . . 9 (𝐴 ∪ (𝐵𝐴)) = (𝐴𝐵)
1615ineq1i 4097 . . . . . . . 8 ((𝐴 ∪ (𝐵𝐴)) ∩ (𝐴 ∪ (V ∖ 𝐶))) = ((𝐴𝐵) ∩ (𝐴 ∪ (V ∖ 𝐶)))
17 undi 4163 . . . . . . . 8 (𝐴 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))) = ((𝐴 ∪ (𝐵𝐴)) ∩ (𝐴 ∪ (V ∖ 𝐶)))
1816, 17, 83eqtr4i 2771 . . . . . . 7 (𝐴 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))) = (𝐴 ∪ (𝐵 ∩ (V ∖ 𝐶)))
1914, 18uneq12i 4049 . . . . . 6 ((𝐴 ∪ ((𝐴𝐵) ∩ 𝐶)) ∪ (𝐴 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))) = (𝐴 ∪ (𝐴 ∪ (𝐵 ∩ (V ∖ 𝐶))))
209, 19eqtr4i 2764 . . . . 5 ((𝐴𝐵) ∩ (𝐴 ∪ (V ∖ 𝐶))) = ((𝐴 ∪ ((𝐴𝐵) ∩ 𝐶)) ∪ (𝐴 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))))
21 unundi 4058 . . . . 5 (𝐴 ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))) = ((𝐴 ∪ ((𝐴𝐵) ∩ 𝐶)) ∪ (𝐴 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))))
2220, 21eqtr4i 2764 . . . 4 ((𝐴𝐵) ∩ (𝐴 ∪ (V ∖ 𝐶))) = (𝐴 ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))))
23 unass 4054 . . . . . 6 (((𝐴𝐶) ∪ 𝐵) ∪ 𝐵) = ((𝐴𝐶) ∪ (𝐵𝐵))
24 undi 4163 . . . . . . . . 9 (𝐵 ∪ (𝐴𝐶)) = ((𝐵𝐴) ∩ (𝐵𝐶))
25 uncom 4041 . . . . . . . . 9 ((𝐴𝐶) ∪ 𝐵) = (𝐵 ∪ (𝐴𝐶))
26 undif2 4363 . . . . . . . . . 10 (𝐵 ∪ (𝐴𝐵)) = (𝐵𝐴)
2726ineq1i 4097 . . . . . . . . 9 ((𝐵 ∪ (𝐴𝐵)) ∩ (𝐵𝐶)) = ((𝐵𝐴) ∩ (𝐵𝐶))
2824, 25, 273eqtr4i 2771 . . . . . . . 8 ((𝐴𝐶) ∪ 𝐵) = ((𝐵 ∪ (𝐴𝐵)) ∩ (𝐵𝐶))
29 undi 4163 . . . . . . . 8 (𝐵 ∪ ((𝐴𝐵) ∩ 𝐶)) = ((𝐵 ∪ (𝐴𝐵)) ∩ (𝐵𝐶))
3028, 29eqtr4i 2764 . . . . . . 7 ((𝐴𝐶) ∪ 𝐵) = (𝐵 ∪ ((𝐴𝐵) ∩ 𝐶))
31 undi 4163 . . . . . . . 8 (𝐵 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))) = ((𝐵 ∪ (𝐵𝐴)) ∩ (𝐵 ∪ (V ∖ 𝐶)))
32 undifabs 4364 . . . . . . . . 9 (𝐵 ∪ (𝐵𝐴)) = 𝐵
3332ineq1i 4097 . . . . . . . 8 ((𝐵 ∪ (𝐵𝐴)) ∩ (𝐵 ∪ (V ∖ 𝐶))) = (𝐵 ∩ (𝐵 ∪ (V ∖ 𝐶)))
34 inabs 4144 . . . . . . . 8 (𝐵 ∩ (𝐵 ∪ (V ∖ 𝐶))) = 𝐵
3531, 33, 343eqtrri 2766 . . . . . . 7 𝐵 = (𝐵 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))
3630, 35uneq12i 4049 . . . . . 6 (((𝐴𝐶) ∪ 𝐵) ∪ 𝐵) = ((𝐵 ∪ ((𝐴𝐵) ∩ 𝐶)) ∪ (𝐵 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))))
37 unidm 4040 . . . . . . 7 (𝐵𝐵) = 𝐵
3837uneq2i 4048 . . . . . 6 ((𝐴𝐶) ∪ (𝐵𝐵)) = ((𝐴𝐶) ∪ 𝐵)
3923, 36, 383eqtr3ri 2770 . . . . 5 ((𝐴𝐶) ∪ 𝐵) = ((𝐵 ∪ ((𝐴𝐵) ∩ 𝐶)) ∪ (𝐵 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))))
40 uncom 4041 . . . . . . 7 (𝐵𝐶) = (𝐶𝐵)
4140ineq2i 4098 . . . . . 6 ((𝐴𝐵) ∩ (𝐵𝐶)) = ((𝐴𝐵) ∩ (𝐶𝐵))
42 undir 4165 . . . . . 6 ((𝐴𝐶) ∪ 𝐵) = ((𝐴𝐵) ∩ (𝐶𝐵))
4341, 42eqtr4i 2764 . . . . 5 ((𝐴𝐵) ∩ (𝐵𝐶)) = ((𝐴𝐶) ∪ 𝐵)
44 unundi 4058 . . . . 5 (𝐵 ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))) = ((𝐵 ∪ ((𝐴𝐵) ∩ 𝐶)) ∪ (𝐵 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))))
4539, 43, 443eqtr4i 2771 . . . 4 ((𝐴𝐵) ∩ (𝐵𝐶)) = (𝐵 ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))))
4622, 45ineq12i 4099 . . 3 (((𝐴𝐵) ∩ (𝐴 ∪ (V ∖ 𝐶))) ∩ ((𝐴𝐵) ∩ (𝐵𝐶))) = ((𝐴 ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))) ∩ (𝐵 ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))))
474, 46eqtr4i 2764 . 2 ((𝐴𝐵) ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))) = (((𝐴𝐵) ∩ (𝐴 ∪ (V ∖ 𝐶))) ∩ ((𝐴𝐵) ∩ (𝐵𝐶)))
481, 3, 473eqtr4i 2771 1 if(𝜑, 𝐴, 𝐵) = ((𝐴𝐵) ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))))
Colors of variables: wff setvar class
Syntax hints:   = wceq 1542  {cab 2716  Vcvv 3397  cdif 3838  cun 3839  cin 3840  ifcif 4411
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1802  ax-4 1816  ax-5 1916  ax-6 1974  ax-7 2019  ax-8 2115  ax-9 2123  ax-10 2144  ax-12 2178  ax-ext 2710
This theorem depends on definitions:  df-bi 210  df-an 400  df-or 847  df-tru 1545  df-fal 1555  df-ex 1787  df-nf 1791  df-sb 2074  df-clab 2717  df-cleq 2730  df-clel 2811  df-rab 3062  df-v 3399  df-dif 3844  df-un 3846  df-in 3848  df-ss 3858  df-nul 4210  df-if 4412
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator