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

Theorem iftrueb 4494
Description: When the branches are not equal, an "if" condition results in the first branch if and only if its condition is true. (Contributed by SN, 16-Oct-2025.)
Assertion
Ref Expression
iftrueb (𝐴𝐵 → (if(𝜑, 𝐴, 𝐵) = 𝐴𝜑))

Proof of Theorem iftrueb
StepHypRef Expression
1 necom 3011 . . . . 5 (𝐴𝐵𝐵𝐴)
21biimpi 218 . . . 4 (𝐴𝐵𝐵𝐴)
3 iffalse 4490 . . . . 5 𝜑 → if(𝜑, 𝐴, 𝐵) = 𝐵)
43neeq1d 3017 . . . 4 𝜑 → (if(𝜑, 𝐴, 𝐵) ≠ 𝐴𝐵𝐴))
52, 4syl5ibrcom 249 . . 3 (𝐴𝐵 → (¬ 𝜑 → if(𝜑, 𝐴, 𝐵) ≠ 𝐴))
65necon4bd 2978 . 2 (𝐴𝐵 → (if(𝜑, 𝐴, 𝐵) = 𝐴𝜑))
7 iftrue 4487 . 2 (𝜑 → if(𝜑, 𝐴, 𝐵) = 𝐴)
86, 7impbid1 227 1 (𝐴𝐵 → (if(𝜑, 𝐴, 𝐵) = 𝐴𝜑))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 208   = wceq 1561  wne 2958  ifcif 4481
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1816  ax-4 1830  ax-5 1931  ax-6 1988  ax-7 2029  ax-8 2145  ax-9 2153  ax-ext 2735
This theorem depends on definitions:  df-bi 209  df-an 400  df-or 859  df-ex 1801  df-sb 2092  df-clab 2742  df-cleq 2755  df-clel 2838  df-ne 2959  df-if 4482
This theorem is referenced by:  psdmvr  22241
  Copyright terms: Public domain W3C validator