Metamath Proof Explorer


Theorem add4

Description: Rearrangement of 4 terms in a sum. (Contributed by NM, 13-Nov-1999) (Proof shortened by Andrew Salmon, 22-Oct-2011)

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

Proof

Step Hyp Ref Expression
1 add12
 |-  ( ( B e. CC /\ C e. CC /\ D e. CC ) -> ( B + ( C + D ) ) = ( C + ( B + D ) ) )
2 1 3expb
 |-  ( ( B e. CC /\ ( C e. CC /\ D e. CC ) ) -> ( B + ( C + D ) ) = ( C + ( B + D ) ) )
3 2 oveq2d
 |-  ( ( B e. CC /\ ( C e. CC /\ D e. CC ) ) -> ( A + ( B + ( C + D ) ) ) = ( A + ( C + ( B + D ) ) ) )
4 3 adantll
 |-  ( ( ( A e. CC /\ B e. CC ) /\ ( C e. CC /\ D e. CC ) ) -> ( A + ( B + ( C + D ) ) ) = ( A + ( C + ( B + D ) ) ) )
5 addcl
 |-  ( ( C e. CC /\ D e. CC ) -> ( C + D ) e. CC )
6 addass
 |-  ( ( A e. CC /\ B e. CC /\ ( C + D ) e. CC ) -> ( ( A + B ) + ( C + D ) ) = ( A + ( B + ( C + D ) ) ) )
7 6 3expa
 |-  ( ( ( A e. CC /\ B e. CC ) /\ ( C + D ) e. CC ) -> ( ( A + B ) + ( C + D ) ) = ( A + ( B + ( C + D ) ) ) )
8 5 7 sylan2
 |-  ( ( ( A e. CC /\ B e. CC ) /\ ( C e. CC /\ D e. CC ) ) -> ( ( A + B ) + ( C + D ) ) = ( A + ( B + ( C + D ) ) ) )
9 addcl
 |-  ( ( B e. CC /\ D e. CC ) -> ( B + D ) e. CC )
10 addass
 |-  ( ( A e. CC /\ C e. CC /\ ( B + D ) e. CC ) -> ( ( A + C ) + ( B + D ) ) = ( A + ( C + ( B + D ) ) ) )
11 10 3expa
 |-  ( ( ( A e. CC /\ C e. CC ) /\ ( B + D ) e. CC ) -> ( ( A + C ) + ( B + D ) ) = ( A + ( C + ( B + D ) ) ) )
12 9 11 sylan2
 |-  ( ( ( A e. CC /\ C e. CC ) /\ ( B e. CC /\ D e. CC ) ) -> ( ( A + C ) + ( B + D ) ) = ( A + ( C + ( B + D ) ) ) )
13 12 an4s
 |-  ( ( ( A e. CC /\ B e. CC ) /\ ( C e. CC /\ D e. CC ) ) -> ( ( A + C ) + ( B + D ) ) = ( A + ( C + ( B + D ) ) ) )
14 4 8 13 3eqtr4d
 |-  ( ( ( A e. CC /\ B e. CC ) /\ ( C e. CC /\ D e. CC ) ) -> ( ( A + B ) + ( C + D ) ) = ( ( A + C ) + ( B + D ) ) )