Metamath Proof Explorer


Theorem ifeq2

Description: Equality theorem for conditional operator. (Contributed by NM, 1-Sep-2004) (Revised by Mario Carneiro, 8-Sep-2013)

Ref Expression
Assertion ifeq2 ( 𝐴 = 𝐵 → if ( 𝜑 , 𝐶 , 𝐴 ) = if ( 𝜑 , 𝐶 , 𝐵 ) )

Proof

Step Hyp Ref Expression
1 rabeq ⊢ ( 𝐴 = 𝐵 → { 𝑥 ∈ 𝐴 ∣ ¬ 𝜑 } = { 𝑥 ∈ 𝐵 ∣ ¬ 𝜑 } )
2 1 uneq2d ⊢ ( 𝐴 = 𝐵 → ( { 𝑥 ∈ 𝐶 ∣ 𝜑 } ∪ { 𝑥 ∈ 𝐴 ∣ ¬ 𝜑 } ) = ( { 𝑥 ∈ 𝐶 ∣ 𝜑 } ∪ { 𝑥 ∈ 𝐵 ∣ ¬ 𝜑 } ) )
3 dfif6 ⊢ if ( 𝜑 , 𝐶 , 𝐴 ) = ( { 𝑥 ∈ 𝐶 ∣ 𝜑 } ∪ { 𝑥 ∈ 𝐴 ∣ ¬ 𝜑 } )
4 dfif6 ⊢ if ( 𝜑 , 𝐶 , 𝐵 ) = ( { 𝑥 ∈ 𝐶 ∣ 𝜑 } ∪ { 𝑥 ∈ 𝐵 ∣ ¬ 𝜑 } )
5 2 3 4 3eqtr4g ⊢ ( 𝐴 = 𝐵 → if ( 𝜑 , 𝐶 , 𝐴 ) = if ( 𝜑 , 𝐶 , 𝐵 ) )