Metamath Proof Explorer


Theorem dgradd2

Description: The degree of a sum of polynomials of unequal degrees is the degree of the larger polynomial. (Contributed by Mario Carneiro, 24-Jul-2014)

Ref Expression
Hypotheses dgradd.1 M = deg F
dgradd.2 N = deg G
Assertion dgradd2 F Poly S G Poly S M < N deg F + f G = N

Proof

Step Hyp Ref Expression
1 dgradd.1 M = deg F
2 dgradd.2 N = deg G
3 plyaddcl F Poly S G Poly S F + f G Poly
4 3 3adant3 F Poly S G Poly S M < N F + f G Poly
5 dgrcl F + f G Poly deg F + f G 0
6 4 5 syl F Poly S G Poly S M < N deg F + f G 0
7 6 nn0red F Poly S G Poly S M < N deg F + f G
8 dgrcl G Poly S deg G 0
9 2 8 eqeltrid G Poly S N 0
10 9 3ad2ant2 F Poly S G Poly S M < N N 0
11 10 nn0red F Poly S G Poly S M < N N
12 dgrcl F Poly S deg F 0
13 1 12 eqeltrid F Poly S M 0
14 13 3ad2ant1 F Poly S G Poly S M < N M 0
15 14 nn0red F Poly S G Poly S M < N M
16 11 15 ifcld F Poly S G Poly S M < N if M N N M
17 1 2 dgradd F Poly S G Poly S deg F + f G if M N N M
18 17 3adant3 F Poly S G Poly S M < N deg F + f G if M N N M
19 11 leidd F Poly S G Poly S M < N N N
20 simp3 F Poly S G Poly S M < N M < N
21 15 11 20 ltled F Poly S G Poly S M < N M N
22 breq1 N = if M N N M N N if M N N M N
23 breq1 M = if M N N M M N if M N N M N
24 22 23 ifboth N N M N if M N N M N
25 19 21 24 syl2anc F Poly S G Poly S M < N if M N N M N
26 7 16 11 18 25 letrd F Poly S G Poly S M < N deg F + f G N
27 eqid coeff F = coeff F
28 eqid coeff G = coeff G
29 27 28 coeadd F Poly S G Poly S coeff F + f G = coeff F + f coeff G
30 29 3adant3 F Poly S G Poly S M < N coeff F + f G = coeff F + f coeff G
31 30 fveq1d F Poly S G Poly S M < N coeff F + f G N = coeff F + f coeff G N
32 27 coef3 F Poly S coeff F : 0
33 32 3ad2ant1 F Poly S G Poly S M < N coeff F : 0
34 33 ffnd F Poly S G Poly S M < N coeff F Fn 0
35 28 coef3 G Poly S coeff G : 0
36 35 3ad2ant2 F Poly S G Poly S M < N coeff G : 0
37 36 ffnd F Poly S G Poly S M < N coeff G Fn 0
38 nn0ex 0 V
39 38 a1i F Poly S G Poly S M < N 0 V
40 inidm 0 0 = 0
41 15 11 ltnled F Poly S G Poly S M < N M < N ¬ N M
42 20 41 mpbid F Poly S G Poly S M < N ¬ N M
43 simp1 F Poly S G Poly S M < N F Poly S
44 27 1 dgrub F Poly S N 0 coeff F N 0 N M
45 44 3expia F Poly S N 0 coeff F N 0 N M
46 43 10 45 syl2anc F Poly S G Poly S M < N coeff F N 0 N M
47 46 necon1bd F Poly S G Poly S M < N ¬ N M coeff F N = 0
48 42 47 mpd F Poly S G Poly S M < N coeff F N = 0
49 48 adantr F Poly S G Poly S M < N N 0 coeff F N = 0
50 eqidd F Poly S G Poly S M < N N 0 coeff G N = coeff G N
51 34 37 39 39 40 49 50 ofval F Poly S G Poly S M < N N 0 coeff F + f coeff G N = 0 + coeff G N
52 10 51 mpdan F Poly S G Poly S M < N coeff F + f coeff G N = 0 + coeff G N
53 36 10 ffvelrnd F Poly S G Poly S M < N coeff G N
54 53 addid2d F Poly S G Poly S M < N 0 + coeff G N = coeff G N
55 31 52 54 3eqtrd F Poly S G Poly S M < N coeff F + f G N = coeff G N
56 simp2 F Poly S G Poly S M < N G Poly S
57 0red F Poly S G Poly S M < N 0
58 14 nn0ge0d F Poly S G Poly S M < N 0 M
59 57 15 11 58 20 lelttrd F Poly S G Poly S M < N 0 < N
60 59 gt0ne0d F Poly S G Poly S M < N N 0
61 2 28 dgreq0 G Poly S G = 0 𝑝 coeff G N = 0
62 fveq2 G = 0 𝑝 deg G = deg 0 𝑝
63 dgr0 deg 0 𝑝 = 0
64 63 eqcomi 0 = deg 0 𝑝
65 62 2 64 3eqtr4g G = 0 𝑝 N = 0
66 61 65 syl6bir G Poly S coeff G N = 0 N = 0
67 66 necon3d G Poly S N 0 coeff G N 0
68 56 60 67 sylc F Poly S G Poly S M < N coeff G N 0
69 55 68 eqnetrd F Poly S G Poly S M < N coeff F + f G N 0
70 eqid coeff F + f G = coeff F + f G
71 eqid deg F + f G = deg F + f G
72 70 71 dgrub F + f G Poly N 0 coeff F + f G N 0 N deg F + f G
73 4 10 69 72 syl3anc F Poly S G Poly S M < N N deg F + f G
74 7 11 letri3d F Poly S G Poly S M < N deg F + f G = N deg F + f G N N deg F + f G
75 26 73 74 mpbir2and F Poly S G Poly S M < N deg F + f G = N