Metamath Proof Explorer


Theorem addsubass

Description: Associative-type law for addition and subtraction. (Contributed by NM, 6-Aug-2003) (Revised by Mario Carneiro, 27-May-2016)

Ref Expression
Assertion addsubass A B C A + B - C = A + B - C

Proof

Step Hyp Ref Expression
1 simp1 A B C A
2 subcl B C B C
3 2 3adant1 A B C B C
4 simp3 A B C C
5 1 3 4 addassd A B C A + B C + C = A + B C + C
6 npcan B C B - C + C = B
7 6 3adant1 A B C B - C + C = B
8 7 oveq2d A B C A + B C + C = A + B
9 5 8 eqtrd A B C A + B C + C = A + B
10 9 oveq1d A B C A + B - C + C - C = A + B - C
11 1 3 addcld A B C A + B - C
12 pncan A + B - C C A + B - C + C - C = A + B - C
13 11 4 12 syl2anc A B C A + B - C + C - C = A + B - C
14 10 13 eqtr3d A B C A + B - C = A + B - C