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

Theorem ifcomnan 4476
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 992 . 2 (¬ (𝜑𝜓) → (¬ 𝜑 ∨ ¬ 𝜓))
2 iffalse 4429 . . . 4 𝜑 → if(𝜑, 𝐴, if(𝜓, 𝐵, 𝐶)) = if(𝜓, 𝐵, 𝐶))
3 iffalse 4429 . . . . 5 𝜑 → if(𝜑, 𝐴, 𝐶) = 𝐶)
43ifeq2d 4440 . . . 4 𝜑 → if(𝜓, 𝐵, if(𝜑, 𝐴, 𝐶)) = if(𝜓, 𝐵, 𝐶))
52, 4eqtr4d 2796 . . 3 𝜑 → if(𝜑, 𝐴, if(𝜓, 𝐵, 𝐶)) = if(𝜓, 𝐵, if(𝜑, 𝐴, 𝐶)))
6 iffalse 4429 . . . . 5 𝜓 → if(𝜓, 𝐵, 𝐶) = 𝐶)
76ifeq2d 4440 . . . 4 𝜓 → if(𝜑, 𝐴, if(𝜓, 𝐵, 𝐶)) = if(𝜑, 𝐴, 𝐶))
8 iffalse 4429 . . . 4 𝜓 → if(𝜓, 𝐵, if(𝜑, 𝐴, 𝐶)) = if(𝜑, 𝐴, 𝐶))
97, 8eqtr4d 2796 . . 3 𝜓 → if(𝜑, 𝐴, if(𝜓, 𝐵, 𝐶)) = if(𝜓, 𝐵, if(𝜑, 𝐴, 𝐶)))
105, 9jaoi 854 . 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 399  wo 844   = wceq 1538  ifcif 4420
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1797  ax-4 1811  ax-5 1911  ax-6 1970  ax-7 2015  ax-8 2113  ax-9 2121  ax-10 2142  ax-12 2175  ax-ext 2729
This theorem depends on definitions:  df-bi 210  df-an 400  df-or 845  df-tru 1541  df-ex 1782  df-nf 1786  df-sb 2070  df-clab 2736  df-cleq 2750  df-clel 2830  df-rab 3079  df-v 3411  df-un 3863  df-if 4421
This theorem is referenced by:  mdetunilem6  21317
  Copyright terms: Public domain W3C validator