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 A B C D A + B C + D = A C + D B + A D + C B

Proof

Step Hyp Ref Expression
1 addcl A B A + B
2 adddi A + B C D A + B C + D = A + B C + A + B D
3 2 3expb A + B C D A + B C + D = A + B C + A + B D
4 1 3 sylan A B C D A + B C + D = A + B C + A + B D
5 adddir A B C A + B C = A C + B C
6 5 3expa A B C A + B C = A C + B C
7 6 adantrr A B C D A + B C = A C + B C
8 adddir A B D A + B D = A D + B D
9 8 3expa A B D A + B D = A D + B D
10 9 adantrl A B C D A + B D = A D + B D
11 7 10 oveq12d A B C D A + B C + A + B D = A C + B C + A D + B D
12 mulcl A C A C
13 12 ad2ant2r A B C D A C
14 mulcl B C B C
15 14 ad2ant2lr A B C D B C
16 mulcl A D A D
17 mulcl B D B D
18 addcl A D B D A D + B D
19 16 17 18 syl2an A D B D A D + B D
20 19 anandirs A B D A D + B D
21 20 adantrl A B C D A D + B D
22 13 15 21 add32d A B C D A C + B C + A D + B D = A C + A D + B D + B C
23 mulcom B D B D = D B
24 23 ad2ant2l A B C D B D = D B
25 24 oveq2d A B C D A C + A D + B D = A C + A D + D B
26 16 ad2ant2rl A B C D A D
27 17 ad2ant2l A B C D B D
28 13 26 27 addassd A B C D A C + A D + B D = A C + A D + B D
29 mulcl D B D B
30 29 ancoms B D D B
31 30 ad2ant2l A B C D D B
32 13 26 31 add32d A B C D A C + A D + D B = A C + D B + A D
33 25 28 32 3eqtr3d A B C D A C + A D + B D = A C + D B + A D
34 mulcom B C B C = C B
35 34 ad2ant2lr A B C D B C = C B
36 33 35 oveq12d A B C D A C + A D + B D + B C = A C + D B + A D + C B
37 addcl A C D B A C + D B
38 12 30 37 syl2an A C B D A C + D B
39 38 an4s A B C D A C + D B
40 mulcl C B C B
41 40 ancoms B C C B
42 41 ad2ant2lr A B C D C B
43 39 26 42 addassd A B C D A C + D B + A D + C B = A C + D B + A D + C B
44 22 36 43 3eqtrd A B C D A C + B C + A D + B D = A C + D B + A D + C B
45 4 11 44 3eqtrd A B C D A + B C + D = A C + D B + A D + C B