Metamath Proof Explorer


Theorem ifeq2da

Description: Conditional equality. (Contributed by Jeff Madsen, 2-Sep-2009)

Ref Expression
Hypothesis ifeq2da.1 ( ( 𝜑 ∧ ¬ 𝜓 ) → 𝐴 = 𝐵 )
Assertion ifeq2da ( 𝜑 → if ( 𝜓 , 𝐶 , 𝐴 ) = if ( 𝜓 , 𝐶 , 𝐵 ) )

Proof

Step Hyp Ref Expression
1 ifeq2da.1 ( ( 𝜑 ∧ ¬ 𝜓 ) → 𝐴 = 𝐵 )
2 iftrue ( 𝜓 → if ( 𝜓 , 𝐶 , 𝐴 ) = 𝐶 )
3 iftrue ( 𝜓 → if ( 𝜓 , 𝐶 , 𝐵 ) = 𝐶 )
4 2 3 eqtr4d ( 𝜓 → if ( 𝜓 , 𝐶 , 𝐴 ) = if ( 𝜓 , 𝐶 , 𝐵 ) )
5 4 adantl ( ( 𝜑𝜓 ) → if ( 𝜓 , 𝐶 , 𝐴 ) = if ( 𝜓 , 𝐶 , 𝐵 ) )
6 1 ifeq2d ( ( 𝜑 ∧ ¬ 𝜓 ) → if ( 𝜓 , 𝐶 , 𝐴 ) = if ( 𝜓 , 𝐶 , 𝐵 ) )
7 5 6 pm2.61dan ( 𝜑 → if ( 𝜓 , 𝐶 , 𝐴 ) = if ( 𝜓 , 𝐶 , 𝐵 ) )