Metamath Proof Explorer


Theorem coeaddlem

Description: Lemma for coeadd and dgradd . (Contributed by Mario Carneiro, 24-Jul-2014)

Ref Expression
Hypotheses coefv0.1 A = coeff F
coeadd.2 B = coeff G
coeadd.3 M = deg F
coeadd.4 N = deg G
Assertion coeaddlem F Poly S G Poly S coeff F + f G = A + f B deg F + f G if M N N M

Proof

Step Hyp Ref Expression
1 coefv0.1 A = coeff F
2 coeadd.2 B = coeff G
3 coeadd.3 M = deg F
4 coeadd.4 N = deg G
5 plyaddcl F Poly S G Poly S F + f G Poly
6 dgrcl G Poly S deg G 0
7 4 6 eqeltrid G Poly S N 0
8 7 adantl F Poly S G Poly S N 0
9 dgrcl F Poly S deg F 0
10 3 9 eqeltrid F Poly S M 0
11 10 adantr F Poly S G Poly S M 0
12 8 11 ifcld F Poly S G Poly S if M N N M 0
13 addcl x y x + y
14 13 adantl F Poly S G Poly S x y x + y
15 1 coef3 F Poly S A : 0
16 15 adantr F Poly S G Poly S A : 0
17 2 coef3 G Poly S B : 0
18 17 adantl F Poly S G Poly S B : 0
19 nn0ex 0 V
20 19 a1i F Poly S G Poly S 0 V
21 inidm 0 0 = 0
22 14 16 18 20 20 21 off F Poly S G Poly S A + f B : 0
23 oveq12 A k = 0 B k = 0 A k + B k = 0 + 0
24 00id 0 + 0 = 0
25 23 24 eqtrdi A k = 0 B k = 0 A k + B k = 0
26 16 ffnd F Poly S G Poly S A Fn 0
27 18 ffnd F Poly S G Poly S B Fn 0
28 eqidd F Poly S G Poly S k 0 A k = A k
29 eqidd F Poly S G Poly S k 0 B k = B k
30 26 27 20 20 21 28 29 ofval F Poly S G Poly S k 0 A + f B k = A k + B k
31 30 eqeq1d F Poly S G Poly S k 0 A + f B k = 0 A k + B k = 0
32 25 31 syl5ibr F Poly S G Poly S k 0 A k = 0 B k = 0 A + f B k = 0
33 32 necon3ad F Poly S G Poly S k 0 A + f B k 0 ¬ A k = 0 B k = 0
34 neorian A k 0 B k 0 ¬ A k = 0 B k = 0
35 33 34 syl6ibr F Poly S G Poly S k 0 A + f B k 0 A k 0 B k 0
36 1 3 dgrub2 F Poly S A M + 1 = 0
37 36 adantr F Poly S G Poly S A M + 1 = 0
38 plyco0 M 0 A : 0 A M + 1 = 0 k 0 A k 0 k M
39 11 16 38 syl2anc F Poly S G Poly S A M + 1 = 0 k 0 A k 0 k M
40 37 39 mpbid F Poly S G Poly S k 0 A k 0 k M
41 40 r19.21bi F Poly S G Poly S k 0 A k 0 k M
42 11 adantr F Poly S G Poly S k 0 M 0
43 42 nn0red F Poly S G Poly S k 0 M
44 8 adantr F Poly S G Poly S k 0 N 0
45 44 nn0red F Poly S G Poly S k 0 N
46 max1 M N M if M N N M
47 43 45 46 syl2anc F Poly S G Poly S k 0 M if M N N M
48 nn0re k 0 k
49 48 adantl F Poly S G Poly S k 0 k
50 12 adantr F Poly S G Poly S k 0 if M N N M 0
51 50 nn0red F Poly S G Poly S k 0 if M N N M
52 letr k M if M N N M k M M if M N N M k if M N N M
53 49 43 51 52 syl3anc F Poly S G Poly S k 0 k M M if M N N M k if M N N M
54 47 53 mpan2d F Poly S G Poly S k 0 k M k if M N N M
55 41 54 syld F Poly S G Poly S k 0 A k 0 k if M N N M
56 2 4 dgrub2 G Poly S B N + 1 = 0
57 56 adantl F Poly S G Poly S B N + 1 = 0
58 plyco0 N 0 B : 0 B N + 1 = 0 k 0 B k 0 k N
59 8 18 58 syl2anc F Poly S G Poly S B N + 1 = 0 k 0 B k 0 k N
60 57 59 mpbid F Poly S G Poly S k 0 B k 0 k N
61 60 r19.21bi F Poly S G Poly S k 0 B k 0 k N
62 max2 M N N if M N N M
63 43 45 62 syl2anc F Poly S G Poly S k 0 N if M N N M
64 letr k N if M N N M k N N if M N N M k if M N N M
65 49 45 51 64 syl3anc F Poly S G Poly S k 0 k N N if M N N M k if M N N M
66 63 65 mpan2d F Poly S G Poly S k 0 k N k if M N N M
67 61 66 syld F Poly S G Poly S k 0 B k 0 k if M N N M
68 55 67 jaod F Poly S G Poly S k 0 A k 0 B k 0 k if M N N M
69 35 68 syld F Poly S G Poly S k 0 A + f B k 0 k if M N N M
70 69 ralrimiva F Poly S G Poly S k 0 A + f B k 0 k if M N N M
71 plyco0 if M N N M 0 A + f B : 0 A + f B if M N N M + 1 = 0 k 0 A + f B k 0 k if M N N M
72 12 22 71 syl2anc F Poly S G Poly S A + f B if M N N M + 1 = 0 k 0 A + f B k 0 k if M N N M
73 70 72 mpbird F Poly S G Poly S A + f B if M N N M + 1 = 0
74 simpl F Poly S G Poly S F Poly S
75 simpr F Poly S G Poly S G Poly S
76 1 3 coeid F Poly S F = z k = 0 M A k z k
77 76 adantr F Poly S G Poly S F = z k = 0 M A k z k
78 2 4 coeid G Poly S G = z k = 0 N B k z k
79 78 adantl F Poly S G Poly S G = z k = 0 N B k z k
80 74 75 11 8 16 18 37 57 77 79 plyaddlem1 F Poly S G Poly S F + f G = z k = 0 if M N N M A + f B k z k
81 5 12 22 73 80 coeeq F Poly S G Poly S coeff F + f G = A + f B
82 elfznn0 k 0 if M N N M k 0
83 ffvelrn A + f B : 0 k 0 A + f B k
84 22 82 83 syl2an F Poly S G Poly S k 0 if M N N M A + f B k
85 5 12 84 80 dgrle F Poly S G Poly S deg F + f G if M N N M
86 81 85 jca F Poly S G Poly S coeff F + f G = A + f B deg F + f G if M N N M