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

Theorem dfif5 4261
Description: Alternate definition of the conditional operator df-if 4246. Note that 𝜑 is independent of 𝑥 i.e. a constant true or false (see also ab0orv 4120). (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 3992 . 2 ((𝐴𝐵) ∩ ((𝐴 ∪ (V ∖ 𝐶)) ∩ (𝐵𝐶))) = (((𝐴𝐵) ∩ (𝐴 ∪ (V ∖ 𝐶))) ∩ ((𝐴𝐵) ∩ (𝐵𝐶)))
2 dfif3.1 . . 3 𝐶 = {𝑥𝜑}
32dfif4 4260 . 2 if(𝜑, 𝐴, 𝐵) = ((𝐴𝐵) ∩ ((𝐴 ∪ (V ∖ 𝐶)) ∩ (𝐵𝐶)))
4 undir 4043 . . 3 ((𝐴𝐵) ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))) = ((𝐴 ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))) ∩ (𝐵 ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))))
5 unidm 3920 . . . . . . . 8 (𝐴𝐴) = 𝐴
65uneq1i 3927 . . . . . . 7 ((𝐴𝐴) ∪ (𝐵 ∩ (V ∖ 𝐶))) = (𝐴 ∪ (𝐵 ∩ (V ∖ 𝐶)))
7 unass 3934 . . . . . . 7 ((𝐴𝐴) ∪ (𝐵 ∩ (V ∖ 𝐶))) = (𝐴 ∪ (𝐴 ∪ (𝐵 ∩ (V ∖ 𝐶))))
8 undi 4041 . . . . . . 7 (𝐴 ∪ (𝐵 ∩ (V ∖ 𝐶))) = ((𝐴𝐵) ∩ (𝐴 ∪ (V ∖ 𝐶)))
96, 7, 83eqtr3ri 2796 . . . . . 6 ((𝐴𝐵) ∩ (𝐴 ∪ (V ∖ 𝐶))) = (𝐴 ∪ (𝐴 ∪ (𝐵 ∩ (V ∖ 𝐶))))
10 undi 4041 . . . . . . . 8 (𝐴 ∪ ((𝐴𝐵) ∩ 𝐶)) = ((𝐴 ∪ (𝐴𝐵)) ∩ (𝐴𝐶))
11 undifabs 4207 . . . . . . . . 9 (𝐴 ∪ (𝐴𝐵)) = 𝐴
1211ineq1i 3974 . . . . . . . 8 ((𝐴 ∪ (𝐴𝐵)) ∩ (𝐴𝐶)) = (𝐴 ∩ (𝐴𝐶))
13 inabs 4022 . . . . . . . 8 (𝐴 ∩ (𝐴𝐶)) = 𝐴
1410, 12, 133eqtri 2791 . . . . . . 7 (𝐴 ∪ ((𝐴𝐵) ∩ 𝐶)) = 𝐴
15 undif2 4206 . . . . . . . . 9 (𝐴 ∪ (𝐵𝐴)) = (𝐴𝐵)
1615ineq1i 3974 . . . . . . . 8 ((𝐴 ∪ (𝐵𝐴)) ∩ (𝐴 ∪ (V ∖ 𝐶))) = ((𝐴𝐵) ∩ (𝐴 ∪ (V ∖ 𝐶)))
17 undi 4041 . . . . . . . 8 (𝐴 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))) = ((𝐴 ∪ (𝐵𝐴)) ∩ (𝐴 ∪ (V ∖ 𝐶)))
1816, 17, 83eqtr4i 2797 . . . . . . 7 (𝐴 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))) = (𝐴 ∪ (𝐵 ∩ (V ∖ 𝐶)))
1914, 18uneq12i 3929 . . . . . 6 ((𝐴 ∪ ((𝐴𝐵) ∩ 𝐶)) ∪ (𝐴 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))) = (𝐴 ∪ (𝐴 ∪ (𝐵 ∩ (V ∖ 𝐶))))
209, 19eqtr4i 2790 . . . . 5 ((𝐴𝐵) ∩ (𝐴 ∪ (V ∖ 𝐶))) = ((𝐴 ∪ ((𝐴𝐵) ∩ 𝐶)) ∪ (𝐴 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))))
21 unundi 3938 . . . . 5 (𝐴 ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))) = ((𝐴 ∪ ((𝐴𝐵) ∩ 𝐶)) ∪ (𝐴 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))))
2220, 21eqtr4i 2790 . . . 4 ((𝐴𝐵) ∩ (𝐴 ∪ (V ∖ 𝐶))) = (𝐴 ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))))
23 unass 3934 . . . . . 6 (((𝐴𝐶) ∪ 𝐵) ∪ 𝐵) = ((𝐴𝐶) ∪ (𝐵𝐵))
24 undi 4041 . . . . . . . . 9 (𝐵 ∪ (𝐴𝐶)) = ((𝐵𝐴) ∩ (𝐵𝐶))
25 uncom 3921 . . . . . . . . 9 ((𝐴𝐶) ∪ 𝐵) = (𝐵 ∪ (𝐴𝐶))
26 undif2 4206 . . . . . . . . . 10 (𝐵 ∪ (𝐴𝐵)) = (𝐵𝐴)
2726ineq1i 3974 . . . . . . . . 9 ((𝐵 ∪ (𝐴𝐵)) ∩ (𝐵𝐶)) = ((𝐵𝐴) ∩ (𝐵𝐶))
2824, 25, 273eqtr4i 2797 . . . . . . . 8 ((𝐴𝐶) ∪ 𝐵) = ((𝐵 ∪ (𝐴𝐵)) ∩ (𝐵𝐶))
29 undi 4041 . . . . . . . 8 (𝐵 ∪ ((𝐴𝐵) ∩ 𝐶)) = ((𝐵 ∪ (𝐴𝐵)) ∩ (𝐵𝐶))
3028, 29eqtr4i 2790 . . . . . . 7 ((𝐴𝐶) ∪ 𝐵) = (𝐵 ∪ ((𝐴𝐵) ∩ 𝐶))
31 undi 4041 . . . . . . . 8 (𝐵 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))) = ((𝐵 ∪ (𝐵𝐴)) ∩ (𝐵 ∪ (V ∖ 𝐶)))
32 undifabs 4207 . . . . . . . . 9 (𝐵 ∪ (𝐵𝐴)) = 𝐵
3332ineq1i 3974 . . . . . . . 8 ((𝐵 ∪ (𝐵𝐴)) ∩ (𝐵 ∪ (V ∖ 𝐶))) = (𝐵 ∩ (𝐵 ∪ (V ∖ 𝐶)))
34 inabs 4022 . . . . . . . 8 (𝐵 ∩ (𝐵 ∪ (V ∖ 𝐶))) = 𝐵
3531, 33, 343eqtrri 2792 . . . . . . 7 𝐵 = (𝐵 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))
3630, 35uneq12i 3929 . . . . . 6 (((𝐴𝐶) ∪ 𝐵) ∪ 𝐵) = ((𝐵 ∪ ((𝐴𝐵) ∩ 𝐶)) ∪ (𝐵 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))))
37 unidm 3920 . . . . . . 7 (𝐵𝐵) = 𝐵
3837uneq2i 3928 . . . . . 6 ((𝐴𝐶) ∪ (𝐵𝐵)) = ((𝐴𝐶) ∪ 𝐵)
3923, 36, 383eqtr3ri 2796 . . . . 5 ((𝐴𝐶) ∪ 𝐵) = ((𝐵 ∪ ((𝐴𝐵) ∩ 𝐶)) ∪ (𝐵 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))))
40 uncom 3921 . . . . . . 7 (𝐵𝐶) = (𝐶𝐵)
4140ineq2i 3975 . . . . . 6 ((𝐴𝐵) ∩ (𝐵𝐶)) = ((𝐴𝐵) ∩ (𝐶𝐵))
42 undir 4043 . . . . . 6 ((𝐴𝐶) ∪ 𝐵) = ((𝐴𝐵) ∩ (𝐶𝐵))
4341, 42eqtr4i 2790 . . . . 5 ((𝐴𝐵) ∩ (𝐵𝐶)) = ((𝐴𝐶) ∪ 𝐵)
44 unundi 3938 . . . . 5 (𝐵 ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))) = ((𝐵 ∪ ((𝐴𝐵) ∩ 𝐶)) ∪ (𝐵 ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))))
4539, 43, 443eqtr4i 2797 . . . 4 ((𝐴𝐵) ∩ (𝐵𝐶)) = (𝐵 ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))))
4622, 45ineq12i 3976 . . 3 (((𝐴𝐵) ∩ (𝐴 ∪ (V ∖ 𝐶))) ∩ ((𝐴𝐵) ∩ (𝐵𝐶))) = ((𝐴 ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))) ∩ (𝐵 ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))))
474, 46eqtr4i 2790 . 2 ((𝐴𝐵) ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶)))) = (((𝐴𝐵) ∩ (𝐴 ∪ (V ∖ 𝐶))) ∩ ((𝐴𝐵) ∩ (𝐵𝐶)))
481, 3, 473eqtr4i 2797 1 if(𝜑, 𝐴, 𝐵) = ((𝐴𝐵) ∪ (((𝐴𝐵) ∩ 𝐶) ∪ ((𝐵𝐴) ∩ (V ∖ 𝐶))))
Colors of variables: wff setvar class
Syntax hints:   = wceq 1652  {cab 2751  Vcvv 3350  cdif 3731  cun 3732  cin 3733  ifcif 4245
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1890  ax-4 1904  ax-5 2005  ax-6 2070  ax-7 2105  ax-9 2164  ax-10 2183  ax-11 2198  ax-12 2211  ax-13 2352  ax-ext 2743
This theorem depends on definitions:  df-bi 198  df-an 385  df-or 874  df-tru 1656  df-ex 1875  df-nf 1879  df-sb 2063  df-clab 2752  df-cleq 2758  df-clel 2761  df-nfc 2896  df-ral 3060  df-rab 3064  df-v 3352  df-dif 3737  df-un 3739  df-in 3741  df-ss 3748  df-nul 4082  df-if 4246
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator