Metamath Proof Explorer


Theorem addsubeq4

Description: Relation between sums and differences. (Contributed by Jeff Madsen, 17-Jun-2010)

Ref Expression
Assertion addsubeq4 A B C D A + B = C + D C A = B D

Proof

Step Hyp Ref Expression
1 eqcom C A = B D B D = C A
2 subcl C A C A
3 2 ancoms A C C A
4 subadd B D C A B D = C A D + C - A = B
5 4 3expa B D C A B D = C A D + C - A = B
6 5 ancoms C A B D B D = C A D + C - A = B
7 3 6 sylan A C B D B D = C A D + C - A = B
8 7 an4s A B C D B D = C A D + C - A = B
9 1 8 syl5bb A B C D C A = B D D + C - A = B
10 addcom C D C + D = D + C
11 10 adantl A C D C + D = D + C
12 11 oveq1d A C D C + D - A = D + C - A
13 addsubass D C A D + C - A = D + C - A
14 13 3com12 C D A D + C - A = D + C - A
15 14 3expa C D A D + C - A = D + C - A
16 15 ancoms A C D D + C - A = D + C - A
17 12 16 eqtrd A C D C + D - A = D + C - A
18 17 adantlr A B C D C + D - A = D + C - A
19 18 eqeq1d A B C D C + D - A = B D + C - A = B
20 addcl C D C + D
21 subadd C + D A B C + D - A = B A + B = C + D
22 21 3expb C + D A B C + D - A = B A + B = C + D
23 22 ancoms A B C + D C + D - A = B A + B = C + D
24 20 23 sylan2 A B C D C + D - A = B A + B = C + D
25 9 19 24 3bitr2rd A B C D A + B = C + D C A = B D