Metamath Proof Explorer


Theorem plyaddlem1

Description: Derive the coefficient function for the sum of two polynomials. (Contributed by Mario Carneiro, 23-Jul-2014)

Ref Expression
Hypotheses plyaddlem.1 φ F Poly S
plyaddlem.2 φ G Poly S
plyaddlem.m φ M 0
plyaddlem.n φ N 0
plyaddlem.a φ A : 0
plyaddlem.b φ B : 0
plyaddlem.a2 φ A M + 1 = 0
plyaddlem.b2 φ B N + 1 = 0
plyaddlem.f φ F = z k = 0 M A k z k
plyaddlem.g φ G = z k = 0 N B k z k
Assertion plyaddlem1 φ F + f G = z k = 0 if M N N M A + f B k z k

Proof

Step Hyp Ref Expression
1 plyaddlem.1 φ F Poly S
2 plyaddlem.2 φ G Poly S
3 plyaddlem.m φ M 0
4 plyaddlem.n φ N 0
5 plyaddlem.a φ A : 0
6 plyaddlem.b φ B : 0
7 plyaddlem.a2 φ A M + 1 = 0
8 plyaddlem.b2 φ B N + 1 = 0
9 plyaddlem.f φ F = z k = 0 M A k z k
10 plyaddlem.g φ G = z k = 0 N B k z k
11 cnex V
12 11 a1i φ V
13 sumex k = 0 M A k z k V
14 13 a1i φ z k = 0 M A k z k V
15 sumex k = 0 N B k z k V
16 15 a1i φ z k = 0 N B k z k V
17 12 14 16 9 10 offval2 φ F + f G = z k = 0 M A k z k + k = 0 N B k z k
18 fzfid φ z 0 if M N N M Fin
19 elfznn0 k 0 if M N N M k 0
20 5 adantr φ z A : 0
21 20 ffvelrnda φ z k 0 A k
22 expcl z k 0 z k
23 22 adantll φ z k 0 z k
24 21 23 mulcld φ z k 0 A k z k
25 19 24 sylan2 φ z k 0 if M N N M A k z k
26 6 adantr φ z B : 0
27 26 ffvelrnda φ z k 0 B k
28 27 23 mulcld φ z k 0 B k z k
29 19 28 sylan2 φ z k 0 if M N N M B k z k
30 18 25 29 fsumadd φ z k = 0 if M N N M A k z k + B k z k = k = 0 if M N N M A k z k + k = 0 if M N N M B k z k
31 5 ffnd φ A Fn 0
32 6 ffnd φ B Fn 0
33 nn0ex 0 V
34 33 a1i φ 0 V
35 inidm 0 0 = 0
36 eqidd φ k 0 A k = A k
37 eqidd φ k 0 B k = B k
38 31 32 34 34 35 36 37 ofval φ k 0 A + f B k = A k + B k
39 38 adantlr φ z k 0 A + f B k = A k + B k
40 39 oveq1d φ z k 0 A + f B k z k = A k + B k z k
41 21 27 23 adddird φ z k 0 A k + B k z k = A k z k + B k z k
42 40 41 eqtrd φ z k 0 A + f B k z k = A k z k + B k z k
43 19 42 sylan2 φ z k 0 if M N N M A + f B k z k = A k z k + B k z k
44 43 sumeq2dv φ z k = 0 if M N N M A + f B k z k = k = 0 if M N N M A k z k + B k z k
45 3 nn0zd φ M
46 4 3 ifcld φ if M N N M 0
47 46 nn0zd φ if M N N M
48 3 nn0red φ M
49 4 nn0red φ N
50 max1 M N M if M N N M
51 48 49 50 syl2anc φ M if M N N M
52 eluz2 if M N N M M M if M N N M M if M N N M
53 45 47 51 52 syl3anbrc φ if M N N M M
54 fzss2 if M N N M M 0 M 0 if M N N M
55 53 54 syl φ 0 M 0 if M N N M
56 55 adantr φ z 0 M 0 if M N N M
57 elfznn0 k 0 M k 0
58 57 24 sylan2 φ z k 0 M A k z k
59 eldifn k 0 if M N N M 0 M ¬ k 0 M
60 59 adantl φ z k 0 if M N N M 0 M ¬ k 0 M
61 eldifi k 0 if M N N M 0 M k 0 if M N N M
62 61 19 syl k 0 if M N N M 0 M k 0
63 62 adantl φ z k 0 if M N N M 0 M k 0
64 nn0uz 0 = 0
65 peano2nn0 M 0 M + 1 0
66 3 65 syl φ M + 1 0
67 66 64 eleqtrdi φ M + 1 0
68 uzsplit M + 1 0 0 = 0 M + 1 - 1 M + 1
69 67 68 syl φ 0 = 0 M + 1 - 1 M + 1
70 64 69 eqtrid φ 0 = 0 M + 1 - 1 M + 1
71 3 nn0cnd φ M
72 ax-1cn 1
73 pncan M 1 M + 1 - 1 = M
74 71 72 73 sylancl φ M + 1 - 1 = M
75 74 oveq2d φ 0 M + 1 - 1 = 0 M
76 75 uneq1d φ 0 M + 1 - 1 M + 1 = 0 M M + 1
77 70 76 eqtrd φ 0 = 0 M M + 1
78 77 ad2antrr φ z k 0 if M N N M 0 M 0 = 0 M M + 1
79 63 78 eleqtrd φ z k 0 if M N N M 0 M k 0 M M + 1
80 elun k 0 M M + 1 k 0 M k M + 1
81 79 80 sylib φ z k 0 if M N N M 0 M k 0 M k M + 1
82 81 ord φ z k 0 if M N N M 0 M ¬ k 0 M k M + 1
83 60 82 mpd φ z k 0 if M N N M 0 M k M + 1
84 5 ffund φ Fun A
85 ssun2 M + 1 0 M + 1 - 1 M + 1
86 85 70 sseqtrrid φ M + 1 0
87 5 fdmd φ dom A = 0
88 86 87 sseqtrrd φ M + 1 dom A
89 funfvima2 Fun A M + 1 dom A k M + 1 A k A M + 1
90 84 88 89 syl2anc φ k M + 1 A k A M + 1
91 90 ad2antrr φ z k 0 if M N N M 0 M k M + 1 A k A M + 1
92 83 91 mpd φ z k 0 if M N N M 0 M A k A M + 1
93 7 ad2antrr φ z k 0 if M N N M 0 M A M + 1 = 0
94 92 93 eleqtrd φ z k 0 if M N N M 0 M A k 0
95 elsni A k 0 A k = 0
96 94 95 syl φ z k 0 if M N N M 0 M A k = 0
97 96 oveq1d φ z k 0 if M N N M 0 M A k z k = 0 z k
98 62 23 sylan2 φ z k 0 if M N N M 0 M z k
99 98 mul02d φ z k 0 if M N N M 0 M 0 z k = 0
100 97 99 eqtrd φ z k 0 if M N N M 0 M A k z k = 0
101 56 58 100 18 fsumss φ z k = 0 M A k z k = k = 0 if M N N M A k z k
102 4 nn0zd φ N
103 max2 M N N if M N N M
104 48 49 103 syl2anc φ N if M N N M
105 eluz2 if M N N M N N if M N N M N if M N N M
106 102 47 104 105 syl3anbrc φ if M N N M N
107 fzss2 if M N N M N 0 N 0 if M N N M
108 106 107 syl φ 0 N 0 if M N N M
109 108 adantr φ z 0 N 0 if M N N M
110 elfznn0 k 0 N k 0
111 110 28 sylan2 φ z k 0 N B k z k
112 eldifn k 0 if M N N M 0 N ¬ k 0 N
113 112 adantl φ z k 0 if M N N M 0 N ¬ k 0 N
114 eldifi k 0 if M N N M 0 N k 0 if M N N M
115 114 19 syl k 0 if M N N M 0 N k 0
116 115 adantl φ z k 0 if M N N M 0 N k 0
117 peano2nn0 N 0 N + 1 0
118 4 117 syl φ N + 1 0
119 118 64 eleqtrdi φ N + 1 0
120 uzsplit N + 1 0 0 = 0 N + 1 - 1 N + 1
121 119 120 syl φ 0 = 0 N + 1 - 1 N + 1
122 64 121 eqtrid φ 0 = 0 N + 1 - 1 N + 1
123 4 nn0cnd φ N
124 pncan N 1 N + 1 - 1 = N
125 123 72 124 sylancl φ N + 1 - 1 = N
126 125 oveq2d φ 0 N + 1 - 1 = 0 N
127 126 uneq1d φ 0 N + 1 - 1 N + 1 = 0 N N + 1
128 122 127 eqtrd φ 0 = 0 N N + 1
129 128 ad2antrr φ z k 0 if M N N M 0 N 0 = 0 N N + 1
130 116 129 eleqtrd φ z k 0 if M N N M 0 N k 0 N N + 1
131 elun k 0 N N + 1 k 0 N k N + 1
132 130 131 sylib φ z k 0 if M N N M 0 N k 0 N k N + 1
133 132 ord φ z k 0 if M N N M 0 N ¬ k 0 N k N + 1
134 113 133 mpd φ z k 0 if M N N M 0 N k N + 1
135 6 ffund φ Fun B
136 ssun2 N + 1 0 N + 1 - 1 N + 1
137 136 122 sseqtrrid φ N + 1 0
138 6 fdmd φ dom B = 0
139 137 138 sseqtrrd φ N + 1 dom B
140 funfvima2 Fun B N + 1 dom B k N + 1 B k B N + 1
141 135 139 140 syl2anc φ k N + 1 B k B N + 1
142 141 ad2antrr φ z k 0 if M N N M 0 N k N + 1 B k B N + 1
143 134 142 mpd φ z k 0 if M N N M 0 N B k B N + 1
144 8 ad2antrr φ z k 0 if M N N M 0 N B N + 1 = 0
145 143 144 eleqtrd φ z k 0 if M N N M 0 N B k 0
146 elsni B k 0 B k = 0
147 145 146 syl φ z k 0 if M N N M 0 N B k = 0
148 147 oveq1d φ z k 0 if M N N M 0 N B k z k = 0 z k
149 115 23 sylan2 φ z k 0 if M N N M 0 N z k
150 149 mul02d φ z k 0 if M N N M 0 N 0 z k = 0
151 148 150 eqtrd φ z k 0 if M N N M 0 N B k z k = 0
152 109 111 151 18 fsumss φ z k = 0 N B k z k = k = 0 if M N N M B k z k
153 101 152 oveq12d φ z k = 0 M A k z k + k = 0 N B k z k = k = 0 if M N N M A k z k + k = 0 if M N N M B k z k
154 30 44 153 3eqtr4d φ z k = 0 if M N N M A + f B k z k = k = 0 M A k z k + k = 0 N B k z k
155 154 mpteq2dva φ z k = 0 if M N N M A + f B k z k = z k = 0 M A k z k + k = 0 N B k z k
156 17 155 eqtr4d φ F + f G = z k = 0 if M N N M A + f B k z k