Metamath Proof Explorer


Theorem eqrel

Description: Extensionality principle for relations. Theorem 3.2(ii) of Monk1 p. 33. (Contributed by NM, 2-Aug-1994)

Ref Expression
Assertion eqrel ( ( Rel 𝐴 ∧ Rel 𝐵 ) → ( 𝐴 = 𝐵 ↔ ∀ 𝑥𝑦 ( ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝐴 ↔ ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝐵 ) ) )

Proof

Step Hyp Ref Expression
1 ssrel ( Rel 𝐴 → ( 𝐴𝐵 ↔ ∀ 𝑥𝑦 ( ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝐴 → ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝐵 ) ) )
2 ssrel ( Rel 𝐵 → ( 𝐵𝐴 ↔ ∀ 𝑥𝑦 ( ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝐵 → ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝐴 ) ) )
3 1 2 bi2anan9 ( ( Rel 𝐴 ∧ Rel 𝐵 ) → ( ( 𝐴𝐵𝐵𝐴 ) ↔ ( ∀ 𝑥𝑦 ( ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝐴 → ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝐵 ) ∧ ∀ 𝑥𝑦 ( ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝐵 → ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝐴 ) ) ) )
4 eqss ( 𝐴 = 𝐵 ↔ ( 𝐴𝐵𝐵𝐴 ) )
5 2albiim ( ∀ 𝑥𝑦 ( ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝐴 ↔ ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝐵 ) ↔ ( ∀ 𝑥𝑦 ( ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝐴 → ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝐵 ) ∧ ∀ 𝑥𝑦 ( ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝐵 → ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝐴 ) ) )
6 3 4 5 3bitr4g ( ( Rel 𝐴 ∧ Rel 𝐵 ) → ( 𝐴 = 𝐵 ↔ ∀ 𝑥𝑦 ( ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝐴 ↔ ⟨ 𝑥 , 𝑦 ⟩ ∈ 𝐵 ) ) )