Metamath Proof Explorer


Theorem subeq0

Description: If the difference between two numbers is zero, they are equal. (Contributed by NM, 16-Nov-1999)

Ref Expression
Assertion subeq0
|- ( ( A e. CC /\ B e. CC ) -> ( ( A - B ) = 0 <-> A = B ) )

Proof

Step Hyp Ref Expression
1 subid
 |-  ( B e. CC -> ( B - B ) = 0 )
2 1 adantl
 |-  ( ( A e. CC /\ B e. CC ) -> ( B - B ) = 0 )
3 2 eqeq2d
 |-  ( ( A e. CC /\ B e. CC ) -> ( ( A - B ) = ( B - B ) <-> ( A - B ) = 0 ) )
4 subcan2
 |-  ( ( A e. CC /\ B e. CC /\ B e. CC ) -> ( ( A - B ) = ( B - B ) <-> A = B ) )
5 4 3anidm23
 |-  ( ( A e. CC /\ B e. CC ) -> ( ( A - B ) = ( B - B ) <-> A = B ) )
6 3 5 bitr3d
 |-  ( ( A e. CC /\ B e. CC ) -> ( ( A - B ) = 0 <-> A = B ) )