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 B A B = 0 A = B

Proof

Step Hyp Ref Expression
1 subid B B B = 0
2 1 adantl A B B B = 0
3 2 eqeq2d A B A B = B B A B = 0
4 subcan2 A B B A B = B B A = B
5 4 3anidm23 A B A B = B B A = B
6 3 5 bitr3d A B A B = 0 A = B