Metamath Proof Explorer


Theorem nelaneq

Description: A class is not an element of and equal to a class at the same time. Variant of elneq analogously to elnotel and en2lp . (Proposed by BJ, 18-Jun-2022.) (Contributed by AV, 18-Jun-2022) (Proof shortened by TM, 31-Dec-2025)

Ref Expression
Assertion nelaneq ¬ ( 𝐴𝐵𝐴 = 𝐵 )

Proof

Step Hyp Ref Expression
1 elirr ¬ 𝐴𝐴
2 eleq2 ( 𝐴 = 𝐵 → ( 𝐴𝐴𝐴𝐵 ) )
3 1 2 mtbii ( 𝐴 = 𝐵 → ¬ 𝐴𝐵 )
4 3 con2i ( 𝐴𝐵 → ¬ 𝐴 = 𝐵 )
5 imnan ( ( 𝐴𝐵 → ¬ 𝐴 = 𝐵 ) ↔ ¬ ( 𝐴𝐵𝐴 = 𝐵 ) )
6 4 5 mpbi ¬ ( 𝐴𝐵𝐴 = 𝐵 )