HomeHome Metamath Proof Explorer < Previous   Next >
Related theorems
GIF version

Theorem ifswap 2379
Description: Negating the first argument swaps the last two arguments of a conditional operator.
Assertion
Ref Expression
ifswap if(¬ φ, A, B) = if(φ, B, A)

Proof of Theorem ifswap
StepHypRef Expression
1 negb 86 . . . 4 (φ → ¬ ¬ φ)
2 iffalse 2364 . . . 4 (¬ ¬ φ → if(¬ φ, A, B) = B)
31, 2syl 10 . . 3 (φ → if(¬ φ, A, B) = B)
4 iftrue 2363 . . 3 (φ → if(φ, B, A) = B)
53, 4eqtr4d 1508 . 2 (φ → if(¬ φ, A, B) = if(φ, B, A))
6 iftrue 2363 . . 3 φ → if(¬ φ, A, B) = A)
7 iffalse 2364 . . 3 φ → if(φ, B, A) = A)
86, 7eqtr4d 1508 . 2 φ → if(¬ φ, A, B) = if(φ, B, A))
95, 8pm2.61i 126 1 if(¬ φ, A, B) = if(φ, B, A)
Colors of variables: wff set class
Syntax hints:  ¬ wn 2   = wceq 955   ifcif 2358
This theorem was proved from axioms:  ax-1 4  ax-2 5  ax-3 6  ax-mp 7  ax-7 961  ax-gen 962  ax-8 963  ax-10 965  ax-12 967  ax-17 970  ax-4 972  ax-5o 974  ax-6o 977  ax-9o 1122  ax-10o 1139  ax-16 1209  ax-11o 1217  ax-ext 1458
This theorem depends on definitions:  df-bi 147  df-or 224  df-an 225  df-ex 980  df-sb 1171  df-clab 1463  df-cleq 1468  df-clel 1471  df-if 2359
Copyright terms: Public domain