| Metamath Proof Explorer |
< Previous
Next >
Related theorems GIF version |
| Description: Negating the first argument swaps the last two arguments of a conditional operator. |
| Ref | Expression |
|---|---|
| ifswap | ⊢ if(¬ φ, A, B) = if(φ, B, A) |
| Step | Hyp | Ref | Expression |
|---|---|---|---|
| 1 | negb 86 | . . . 4 ⊢ (φ → ¬ ¬ φ) | |
| 2 | iffalse 2364 | . . . 4 ⊢ (¬ ¬ φ → if(¬ φ, A, B) = B) | |
| 3 | 1, 2 | syl 10 | . . 3 ⊢ (φ → if(¬ φ, A, B) = B) |
| 4 | iftrue 2363 | . . 3 ⊢ (φ → if(φ, B, A) = B) | |
| 5 | 3, 4 | eqtr4d 1508 | . 2 ⊢ (φ → if(¬ φ, A, B) = if(φ, B, A)) |
| 6 | iftrue 2363 | . . 3 ⊢ (¬ φ → if(¬ φ, A, B) = A) | |
| 7 | iffalse 2364 | . . 3 ⊢ (¬ φ → if(φ, B, A) = A) | |
| 8 | 6, 7 | eqtr4d 1508 | . 2 ⊢ (¬ φ → if(¬ φ, A, B) = if(φ, B, A)) |
| 9 | 5, 8 | pm2.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 |