Metamath Proof Explorer


Theorem opprb

Description: Equality for unordered pairs corresponds to equality of unordered pairs with the same elements. (Contributed by AV, 9-Jul-2023)

Ref Expression
Assertion opprb ( ( ( 𝐴𝑉𝐵𝑊 ) ∧ ( 𝐶𝑋𝐷𝑌 ) ) → ( { 𝐴 , 𝐵 } = { 𝐶 , 𝐷 } ↔ ( ⟨ 𝐴 , 𝐵 ⟩ = ⟨ 𝐶 , 𝐷 ⟩ ∨ ⟨ 𝐴 , 𝐵 ⟩ = ⟨ 𝐷 , 𝐶 ⟩ ) ) )

Proof

Step Hyp Ref Expression
1 preq12bg ( ( ( 𝐴𝑉𝐵𝑊 ) ∧ ( 𝐶𝑋𝐷𝑌 ) ) → ( { 𝐴 , 𝐵 } = { 𝐶 , 𝐷 } ↔ ( ( 𝐴 = 𝐶𝐵 = 𝐷 ) ∨ ( 𝐴 = 𝐷𝐵 = 𝐶 ) ) ) )
2 opthg ( ( 𝐴𝑉𝐵𝑊 ) → ( ⟨ 𝐴 , 𝐵 ⟩ = ⟨ 𝐶 , 𝐷 ⟩ ↔ ( 𝐴 = 𝐶𝐵 = 𝐷 ) ) )
3 2 adantr ( ( ( 𝐴𝑉𝐵𝑊 ) ∧ ( 𝐶𝑋𝐷𝑌 ) ) → ( ⟨ 𝐴 , 𝐵 ⟩ = ⟨ 𝐶 , 𝐷 ⟩ ↔ ( 𝐴 = 𝐶𝐵 = 𝐷 ) ) )
4 opthg ( ( 𝐴𝑉𝐵𝑊 ) → ( ⟨ 𝐴 , 𝐵 ⟩ = ⟨ 𝐷 , 𝐶 ⟩ ↔ ( 𝐴 = 𝐷𝐵 = 𝐶 ) ) )
5 4 adantr ( ( ( 𝐴𝑉𝐵𝑊 ) ∧ ( 𝐶𝑋𝐷𝑌 ) ) → ( ⟨ 𝐴 , 𝐵 ⟩ = ⟨ 𝐷 , 𝐶 ⟩ ↔ ( 𝐴 = 𝐷𝐵 = 𝐶 ) ) )
6 3 5 orbi12d ( ( ( 𝐴𝑉𝐵𝑊 ) ∧ ( 𝐶𝑋𝐷𝑌 ) ) → ( ( ⟨ 𝐴 , 𝐵 ⟩ = ⟨ 𝐶 , 𝐷 ⟩ ∨ ⟨ 𝐴 , 𝐵 ⟩ = ⟨ 𝐷 , 𝐶 ⟩ ) ↔ ( ( 𝐴 = 𝐶𝐵 = 𝐷 ) ∨ ( 𝐴 = 𝐷𝐵 = 𝐶 ) ) ) )
7 1 6 bitr4d ( ( ( 𝐴𝑉𝐵𝑊 ) ∧ ( 𝐶𝑋𝐷𝑌 ) ) → ( { 𝐴 , 𝐵 } = { 𝐶 , 𝐷 } ↔ ( ⟨ 𝐴 , 𝐵 ⟩ = ⟨ 𝐶 , 𝐷 ⟩ ∨ ⟨ 𝐴 , 𝐵 ⟩ = ⟨ 𝐷 , 𝐶 ⟩ ) ) )