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

Theorem ifcomnan 4276
Description: Commute the conditions in two nested conditionals if both conditions are not simultaneously true. (Contributed by SO, 15-Jul-2018.)
Assertion
Ref Expression
ifcomnan (¬ (𝜑𝜓) → if(𝜑, 𝐴, if(𝜓, 𝐵, 𝐶)) = if(𝜓, 𝐵, if(𝜑, 𝐴, 𝐶)))

Proof of Theorem ifcomnan
StepHypRef Expression
1 pm3.13 975 . 2 (¬ (𝜑𝜓) → (¬ 𝜑 ∨ ¬ 𝜓))
2 iffalse 4234 . . . 4 𝜑 → if(𝜑, 𝐴, if(𝜓, 𝐵, 𝐶)) = if(𝜓, 𝐵, 𝐶))
3 iffalse 4234 . . . . 5 𝜑 → if(𝜑, 𝐴, 𝐶) = 𝐶)
43ifeq2d 4244 . . . 4 𝜑 → if(𝜓, 𝐵, if(𝜑, 𝐴, 𝐶)) = if(𝜓, 𝐵, 𝐶))
52, 4eqtr4d 2808 . . 3 𝜑 → if(𝜑, 𝐴, if(𝜓, 𝐵, 𝐶)) = if(𝜓, 𝐵, if(𝜑, 𝐴, 𝐶)))
6 iffalse 4234 . . . . 5 𝜓 → if(𝜓, 𝐵, 𝐶) = 𝐶)
76ifeq2d 4244 . . . 4 𝜓 → if(𝜑, 𝐴, if(𝜓, 𝐵, 𝐶)) = if(𝜑, 𝐴, 𝐶))
8 iffalse 4234 . . . 4 𝜓 → if(𝜓, 𝐵, if(𝜑, 𝐴, 𝐶)) = if(𝜑, 𝐴, 𝐶))
97, 8eqtr4d 2808 . . 3 𝜓 → if(𝜑, 𝐴, if(𝜓, 𝐵, 𝐶)) = if(𝜓, 𝐵, if(𝜑, 𝐴, 𝐶)))
105, 9jaoi 844 . 2 ((¬ 𝜑 ∨ ¬ 𝜓) → if(𝜑, 𝐴, if(𝜓, 𝐵, 𝐶)) = if(𝜓, 𝐵, if(𝜑, 𝐴, 𝐶)))
111, 10syl 17 1 (¬ (𝜑𝜓) → if(𝜑, 𝐴, if(𝜓, 𝐵, 𝐶)) = if(𝜓, 𝐵, if(𝜑, 𝐴, 𝐶)))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wa 382  wo 834   = wceq 1631  ifcif 4225
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1870  ax-4 1885  ax-5 1991  ax-6 2057  ax-7 2093  ax-9 2154  ax-10 2174  ax-11 2190  ax-12 2203  ax-13 2408  ax-ext 2751
This theorem depends on definitions:  df-bi 197  df-an 383  df-or 835  df-tru 1634  df-ex 1853  df-nf 1858  df-sb 2050  df-clab 2758  df-cleq 2764  df-clel 2767  df-nfc 2902  df-rab 3070  df-v 3353  df-un 3728  df-if 4226
This theorem is referenced by:  mdetunilem6  20641
  Copyright terms: Public domain W3C validator