Metamath Proof Explorer


Theorem eqrel2

Description: Equality of relations. (Contributed by Peter Mazsa, 8-Mar-2019)

Ref Expression
Assertion eqrel2 ( ( Rel 𝐴 ∧ Rel 𝐵 ) → ( 𝐴 = 𝐵 ↔ ∀ 𝑥𝑦 ( 𝑥 𝐴 𝑦𝑥 𝐵 𝑦 ) ) )

Proof

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