Metamath Proof Explorer


Theorem nnncan

Description: Cancellation law for subtraction. (Contributed by NM, 4-Sep-2005)

Ref Expression
Assertion nnncan
|- ( ( A e. CC /\ B e. CC /\ C e. CC ) -> ( ( A - ( B - C ) ) - C ) = ( A - B ) )

Proof

Step Hyp Ref Expression
1 subcl
 |-  ( ( B e. CC /\ C e. CC ) -> ( B - C ) e. CC )
2 1 3adant1
 |-  ( ( A e. CC /\ B e. CC /\ C e. CC ) -> ( B - C ) e. CC )
3 subsub4
 |-  ( ( A e. CC /\ ( B - C ) e. CC /\ C e. CC ) -> ( ( A - ( B - C ) ) - C ) = ( A - ( ( B - C ) + C ) ) )
4 2 3 syld3an2
 |-  ( ( A e. CC /\ B e. CC /\ C e. CC ) -> ( ( A - ( B - C ) ) - C ) = ( A - ( ( B - C ) + C ) ) )
5 npcan
 |-  ( ( B e. CC /\ C e. CC ) -> ( ( B - C ) + C ) = B )
6 5 oveq2d
 |-  ( ( B e. CC /\ C e. CC ) -> ( A - ( ( B - C ) + C ) ) = ( A - B ) )
7 6 3adant1
 |-  ( ( A e. CC /\ B e. CC /\ C e. CC ) -> ( A - ( ( B - C ) + C ) ) = ( A - B ) )
8 4 7 eqtrd
 |-  ( ( A e. CC /\ B e. CC /\ C e. CC ) -> ( ( A - ( B - C ) ) - C ) = ( A - B ) )