Metamath Proof Explorer


Theorem xpeq2

Description: Equality theorem for Cartesian product. (Contributed by NM, 5-Jul-1994)

Ref Expression
Assertion xpeq2 ( 𝐴 = 𝐵 → ( 𝐶 × 𝐴 ) = ( 𝐶 × 𝐵 ) )

Proof

Step Hyp Ref Expression
1 eleq2 ( 𝐴 = 𝐵 → ( 𝑦𝐴𝑦𝐵 ) )
2 1 anbi2d ( 𝐴 = 𝐵 → ( ( 𝑥𝐶𝑦𝐴 ) ↔ ( 𝑥𝐶𝑦𝐵 ) ) )
3 2 opabbidv ( 𝐴 = 𝐵 → { ⟨ 𝑥 , 𝑦 ⟩ ∣ ( 𝑥𝐶𝑦𝐴 ) } = { ⟨ 𝑥 , 𝑦 ⟩ ∣ ( 𝑥𝐶𝑦𝐵 ) } )
4 df-xp ( 𝐶 × 𝐴 ) = { ⟨ 𝑥 , 𝑦 ⟩ ∣ ( 𝑥𝐶𝑦𝐴 ) }
5 df-xp ( 𝐶 × 𝐵 ) = { ⟨ 𝑥 , 𝑦 ⟩ ∣ ( 𝑥𝐶𝑦𝐵 ) }
6 3 4 5 3eqtr4g ( 𝐴 = 𝐵 → ( 𝐶 × 𝐴 ) = ( 𝐶 × 𝐵 ) )