Metamath Proof Explorer


Theorem muladd

Description: Product of two sums. (Contributed by NM, 14-Jan-2006) (Proof shortened by Andrew Salmon, 19-Nov-2011)

Ref Expression
Assertion muladd ABCDA+BC+D=AC+DB+AD+CB

Proof

Step Hyp Ref Expression
1 addcl ABA+B
2 adddi A+BCDA+BC+D=A+BC+A+BD
3 2 3expb A+BCDA+BC+D=A+BC+A+BD
4 1 3 sylan ABCDA+BC+D=A+BC+A+BD
5 adddir ABCA+BC=AC+BC
6 5 3expa ABCA+BC=AC+BC
7 6 adantrr ABCDA+BC=AC+BC
8 adddir ABDA+BD=AD+BD
9 8 3expa ABDA+BD=AD+BD
10 9 adantrl ABCDA+BD=AD+BD
11 7 10 oveq12d ABCDA+BC+A+BD=AC+BC+AD+BD
12 mulcl ACAC
13 12 ad2ant2r ABCDAC
14 mulcl BCBC
15 14 ad2ant2lr ABCDBC
16 mulcl ADAD
17 mulcl BDBD
18 addcl ADBDAD+BD
19 16 17 18 syl2an ADBDAD+BD
20 19 anandirs ABDAD+BD
21 20 adantrl ABCDAD+BD
22 13 15 21 add32d ABCDAC+BC+AD+BD=AC+AD+BD+BC
23 mulcom BDBD=DB
24 23 ad2ant2l ABCDBD=DB
25 24 oveq2d ABCDAC+AD+BD=AC+AD+DB
26 16 ad2ant2rl ABCDAD
27 17 ad2ant2l ABCDBD
28 13 26 27 addassd ABCDAC+AD+BD=AC+AD+BD
29 mulcl DBDB
30 29 ancoms BDDB
31 30 ad2ant2l ABCDDB
32 13 26 31 add32d ABCDAC+AD+DB=AC+DB+AD
33 25 28 32 3eqtr3d ABCDAC+AD+BD=AC+DB+AD
34 mulcom BCBC=CB
35 34 ad2ant2lr ABCDBC=CB
36 33 35 oveq12d ABCDAC+AD+BD+BC=AC+DB+AD+CB
37 addcl ACDBAC+DB
38 12 30 37 syl2an ACBDAC+DB
39 38 an4s ABCDAC+DB
40 mulcl CBCB
41 40 ancoms BCCB
42 41 ad2ant2lr ABCDCB
43 39 26 42 addassd ABCDAC+DB+AD+CB=AC+DB+AD+CB
44 22 36 43 3eqtrd ABCDAC+BC+AD+BD=AC+DB+AD+CB
45 4 11 44 3eqtrd ABCDA+BC+D=AC+DB+AD+CB