Metamath Proof Explorer


Theorem vtoclgaf

Description: Implicit substitution of a class for a setvar variable. (Contributed by NM, 17-Feb-2006) (Revised by Mario Carneiro, 10-Oct-2016)

Ref Expression
Hypotheses vtoclgaf.1 𝑥 𝐴
vtoclgaf.2 𝑥 𝜓
vtoclgaf.3 ( 𝑥 = 𝐴 → ( 𝜑𝜓 ) )
vtoclgaf.4 ( 𝑥𝐵𝜑 )
Assertion vtoclgaf ( 𝐴𝐵𝜓 )

Proof

Step Hyp Ref Expression
1 vtoclgaf.1 𝑥 𝐴
2 vtoclgaf.2 𝑥 𝜓
3 vtoclgaf.3 ( 𝑥 = 𝐴 → ( 𝜑𝜓 ) )
4 vtoclgaf.4 ( 𝑥𝐵𝜑 )
5 1 nfel1 𝑥 𝐴𝐵
6 5 2 nfim 𝑥 ( 𝐴𝐵𝜓 )
7 eleq1 ( 𝑥 = 𝐴 → ( 𝑥𝐵𝐴𝐵 ) )
8 7 3 imbi12d ( 𝑥 = 𝐴 → ( ( 𝑥𝐵𝜑 ) ↔ ( 𝐴𝐵𝜓 ) ) )
9 1 6 8 4 vtoclgf ( 𝐴𝐵 → ( 𝐴𝐵𝜓 ) )
10 9 pm2.43i ( 𝐴𝐵𝜓 )