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
|- -. ( A e. B /\ A = B )

Proof

Step Hyp Ref Expression
1 elirr
 |-  -. A e. A
2 eleq2
 |-  ( A = B -> ( A e. A <-> A e. B ) )
3 1 2 mtbii
 |-  ( A = B -> -. A e. B )
4 3 con2i
 |-  ( A e. B -> -. A = B )
5 imnan
 |-  ( ( A e. B -> -. A = B ) <-> -. ( A e. B /\ A = B ) )
6 4 5 mpbi
 |-  -. ( A e. B /\ A = B )