Metamath Proof Explorer


Theorem coesub

Description: The coefficient function of a sum is the sum of coefficients. (Contributed by Mario Carneiro, 24-Jul-2014)

Ref Expression
Hypotheses coesub.1 A = coeff F
coesub.2 B = coeff G
Assertion coesub F Poly S G Poly S coeff F f G = A f B

Proof

Step Hyp Ref Expression
1 coesub.1 A = coeff F
2 coesub.2 B = coeff G
3 plyssc Poly S Poly
4 simpl F Poly S G Poly S F Poly S
5 3 4 sselid F Poly S G Poly S F Poly
6 ssid
7 neg1cn 1
8 plyconst 1 × 1 Poly
9 6 7 8 mp2an × 1 Poly
10 simpr F Poly S G Poly S G Poly S
11 3 10 sselid F Poly S G Poly S G Poly
12 plymulcl × 1 Poly G Poly × 1 × f G Poly
13 9 11 12 sylancr F Poly S G Poly S × 1 × f G Poly
14 eqid coeff × 1 × f G = coeff × 1 × f G
15 1 14 coeadd F Poly × 1 × f G Poly coeff F + f × 1 × f G = A + f coeff × 1 × f G
16 5 13 15 syl2anc F Poly S G Poly S coeff F + f × 1 × f G = A + f coeff × 1 × f G
17 coemulc 1 G Poly coeff × 1 × f G = 0 × 1 × f coeff G
18 7 11 17 sylancr F Poly S G Poly S coeff × 1 × f G = 0 × 1 × f coeff G
19 2 oveq2i 0 × 1 × f B = 0 × 1 × f coeff G
20 18 19 eqtr4di F Poly S G Poly S coeff × 1 × f G = 0 × 1 × f B
21 20 oveq2d F Poly S G Poly S A + f coeff × 1 × f G = A + f 0 × 1 × f B
22 16 21 eqtrd F Poly S G Poly S coeff F + f × 1 × f G = A + f 0 × 1 × f B
23 cnex V
24 plyf F Poly S F :
25 plyf G Poly S G :
26 ofnegsub V F : G : F + f × 1 × f G = F f G
27 23 24 25 26 mp3an3an F Poly S G Poly S F + f × 1 × f G = F f G
28 27 fveq2d F Poly S G Poly S coeff F + f × 1 × f G = coeff F f G
29 nn0ex 0 V
30 1 coef3 F Poly S A : 0
31 2 coef3 G Poly S B : 0
32 ofnegsub 0 V A : 0 B : 0 A + f 0 × 1 × f B = A f B
33 29 30 31 32 mp3an3an F Poly S G Poly S A + f 0 × 1 × f B = A f B
34 22 28 33 3eqtr3d F Poly S G Poly S coeff F f G = A f B