Metamath Proof Explorer


Theorem mulsub

Description: Product of two differences. (Contributed by NM, 14-Jan-2006)

Ref Expression
Assertion mulsub A B C D A B C D = A C + D B - A D + C B

Proof

Step Hyp Ref Expression
1 negsub A B A + B = A B
2 negsub C D C + D = C D
3 1 2 oveqan12d A B C D A + B C + D = A B C D
4 negcl B B
5 negcl D D
6 muladd A B C D A + B C + D = A C + D B + A D + C B
7 5 6 sylanr2 A B C D A + B C + D = A C + D B + A D + C B
8 4 7 sylanl2 A B C D A + B C + D = A C + D B + A D + C B
9 mul2neg D B D B = D B
10 9 ancoms B D D B = D B
11 10 oveq2d B D A C + D B = A C + D B
12 11 ad2ant2l A B C D A C + D B = A C + D B
13 mulneg2 A D A D = A D
14 mulneg2 C B C B = C B
15 13 14 oveqan12d A D C B A D + C B = - A D + C B
16 mulcl A D A D
17 mulcl C B C B
18 negdi A D C B A D + C B = - A D + C B
19 16 17 18 syl2an A D C B A D + C B = - A D + C B
20 15 19 eqtr4d A D C B A D + C B = A D + C B
21 20 ancom2s A D B C A D + C B = A D + C B
22 21 an42s A B C D A D + C B = A D + C B
23 12 22 oveq12d A B C D A C + D B + A D + C B = A C + D B + A D + C B
24 mulcl A C A C
25 mulcl D B D B
26 25 ancoms B D D B
27 addcl A C D B A C + D B
28 24 26 27 syl2an A C B D A C + D B
29 28 an4s A B C D A C + D B
30 17 ancoms B C C B
31 addcl A D C B A D + C B
32 16 30 31 syl2an A D B C A D + C B
33 32 an42s A B C D A D + C B
34 29 33 negsubd A B C D A C + D B + A D + C B = A C + D B - A D + C B
35 8 23 34 3eqtrd A B C D A + B C + D = A C + D B - A D + C B
36 3 35 eqtr3d A B C D A B C D = A C + D B - A D + C B