Metamath Proof Explorer


Theorem dfif2

Description: An alternate definition of the conditional operator df-if with one fewer connectives (but probably less intuitive to understand). (Contributed by NM, 30-Jan-2006)

Ref Expression
Assertion dfif2 if ( 𝜑 , 𝐴 , 𝐵 ) = { 𝑥 ∣ ( ( 𝑥𝐵𝜑 ) → ( 𝑥𝐴𝜑 ) ) }

Proof

Step Hyp Ref Expression
1 df-if if ( 𝜑 , 𝐴 , 𝐵 ) = { 𝑥 ∣ ( ( 𝑥𝐴𝜑 ) ∨ ( 𝑥𝐵 ∧ ¬ 𝜑 ) ) }
2 df-or ( ( ( 𝑥𝐵 ∧ ¬ 𝜑 ) ∨ ( 𝑥𝐴𝜑 ) ) ↔ ( ¬ ( 𝑥𝐵 ∧ ¬ 𝜑 ) → ( 𝑥𝐴𝜑 ) ) )
3 orcom ( ( ( 𝑥𝐴𝜑 ) ∨ ( 𝑥𝐵 ∧ ¬ 𝜑 ) ) ↔ ( ( 𝑥𝐵 ∧ ¬ 𝜑 ) ∨ ( 𝑥𝐴𝜑 ) ) )
4 iman ( ( 𝑥𝐵𝜑 ) ↔ ¬ ( 𝑥𝐵 ∧ ¬ 𝜑 ) )
5 4 imbi1i ( ( ( 𝑥𝐵𝜑 ) → ( 𝑥𝐴𝜑 ) ) ↔ ( ¬ ( 𝑥𝐵 ∧ ¬ 𝜑 ) → ( 𝑥𝐴𝜑 ) ) )
6 2 3 5 3bitr4i ( ( ( 𝑥𝐴𝜑 ) ∨ ( 𝑥𝐵 ∧ ¬ 𝜑 ) ) ↔ ( ( 𝑥𝐵𝜑 ) → ( 𝑥𝐴𝜑 ) ) )
7 6 abbii { 𝑥 ∣ ( ( 𝑥𝐴𝜑 ) ∨ ( 𝑥𝐵 ∧ ¬ 𝜑 ) ) } = { 𝑥 ∣ ( ( 𝑥𝐵𝜑 ) → ( 𝑥𝐴𝜑 ) ) }
8 1 7 eqtri if ( 𝜑 , 𝐴 , 𝐵 ) = { 𝑥 ∣ ( ( 𝑥𝐵𝜑 ) → ( 𝑥𝐴𝜑 ) ) }