Metamath Proof Explorer


Theorem addsubsub23

Description: Swap the second and the third terms in a difference of a sum and a difference (or, vice versa, in a sum of a difference and a sum). (Contributed by AV, 15-Nov-2025)

Ref Expression
Hypotheses negidd.1 φ A
pncand.2 φ B
subaddd.3 φ C
addsub4d.4 φ D
Assertion addsubsub23 φ A + B - C D = A C + B + D

Proof

Step Hyp Ref Expression
1 negidd.1 φ A
2 pncand.2 φ B
3 subaddd.3 φ C
4 addsub4d.4 φ D
5 1 2 addcld φ A + B
6 5 3 4 subsubd φ A + B - C D = A + B - C + D
7 1 2 3 addsubd φ A + B - C = A - C + B
8 7 oveq1d φ A + B - C + D = A C + B + D
9 1 3 subcld φ A C
10 9 2 4 addassd φ A C + B + D = A C + B + D
11 6 8 10 3eqtrd φ A + B - C D = A C + B + D