Metamath Proof Explorer


Theorem eqrdav

Description: Deduce equality of classes from an equivalence of membership that depends on the membership variable. (Contributed by NM, 7-Nov-2008) (Proof shortened by Wolf Lammen, 19-Nov-2019)

Ref Expression
Hypotheses eqrdav.1 ( ( 𝜑𝑥𝐴 ) → 𝑥𝐶 )
eqrdav.2 ( ( 𝜑𝑥𝐵 ) → 𝑥𝐶 )
eqrdav.3 ( ( 𝜑𝑥𝐶 ) → ( 𝑥𝐴𝑥𝐵 ) )
Assertion eqrdav ( 𝜑𝐴 = 𝐵 )

Proof

Step Hyp Ref Expression
1 eqrdav.1 ( ( 𝜑𝑥𝐴 ) → 𝑥𝐶 )
2 eqrdav.2 ( ( 𝜑𝑥𝐵 ) → 𝑥𝐶 )
3 eqrdav.3 ( ( 𝜑𝑥𝐶 ) → ( 𝑥𝐴𝑥𝐵 ) )
4 3 biimpd ( ( 𝜑𝑥𝐶 ) → ( 𝑥𝐴𝑥𝐵 ) )
5 4 impancom ( ( 𝜑𝑥𝐴 ) → ( 𝑥𝐶𝑥𝐵 ) )
6 1 5 mpd ( ( 𝜑𝑥𝐴 ) → 𝑥𝐵 )
7 3 biimprd ( ( 𝜑𝑥𝐶 ) → ( 𝑥𝐵𝑥𝐴 ) )
8 7 impancom ( ( 𝜑𝑥𝐵 ) → ( 𝑥𝐶𝑥𝐴 ) )
9 2 8 mpd ( ( 𝜑𝑥𝐵 ) → 𝑥𝐴 )
10 6 9 impbida ( 𝜑 → ( 𝑥𝐴𝑥𝐵 ) )
11 10 eqrdv ( 𝜑𝐴 = 𝐵 )