Metamath Proof Explorer


Theorem iftrueb

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)

Ref Expression
Assertion iftrueb ⊢ A ≠ B → if φ A B = A ↔ φ

Proof

Step Hyp Ref Expression
1 necom ⊢ A ≠ B ↔ B ≠ A
2 1 biimpi ⊢ A ≠ B → B ≠ A
3 iffalse ⊢ ¬ φ → if φ A B = B
4 3 neeq1d ⊢ ¬ φ → if φ A B ≠ A ↔ B ≠ A
5 2 4 syl5ibrcom ⊢ A ≠ B → ¬ φ → if φ A B ≠ A
6 5 necon4bd ⊢ A ≠ B → if φ A B = A → φ
7 iftrue ⊢ φ → if φ A B = A
8 6 7 impbid1 ⊢ A ≠ B → if φ A B = A ↔ φ