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=degF
dgradd.2 N=degG
Assertion dgradd2 FPolySGPolySM<NdegF+fG=N

Proof

Step Hyp Ref Expression
1 dgradd.1 M=degF
2 dgradd.2 N=degG
3 plyaddcl FPolySGPolySF+fGPoly
4 3 3adant3 FPolySGPolySM<NF+fGPoly
5 dgrcl F+fGPolydegF+fG0
6 4 5 syl FPolySGPolySM<NdegF+fG0
7 6 nn0red FPolySGPolySM<NdegF+fG
8 dgrcl GPolySdegG0
9 2 8 eqeltrid GPolySN0
10 9 3ad2ant2 FPolySGPolySM<NN0
11 10 nn0red FPolySGPolySM<NN
12 dgrcl FPolySdegF0
13 1 12 eqeltrid FPolySM0
14 13 3ad2ant1 FPolySGPolySM<NM0
15 14 nn0red FPolySGPolySM<NM
16 11 15 ifcld FPolySGPolySM<NifMNNM
17 1 2 dgradd FPolySGPolySdegF+fGifMNNM
18 17 3adant3 FPolySGPolySM<NdegF+fGifMNNM
19 11 leidd FPolySGPolySM<NNN
20 simp3 FPolySGPolySM<NM<N
21 15 11 20 ltled FPolySGPolySM<NMN
22 breq1 N=ifMNNMNNifMNNMN
23 breq1 M=ifMNNMMNifMNNMN
24 22 23 ifboth NNMNifMNNMN
25 19 21 24 syl2anc FPolySGPolySM<NifMNNMN
26 7 16 11 18 25 letrd FPolySGPolySM<NdegF+fGN
27 eqid coeffF=coeffF
28 eqid coeffG=coeffG
29 27 28 coeadd FPolySGPolyScoeffF+fG=coeffF+fcoeffG
30 29 3adant3 FPolySGPolySM<NcoeffF+fG=coeffF+fcoeffG
31 30 fveq1d FPolySGPolySM<NcoeffF+fGN=coeffF+fcoeffGN
32 27 coef3 FPolyScoeffF:0
33 32 3ad2ant1 FPolySGPolySM<NcoeffF:0
34 33 ffnd FPolySGPolySM<NcoeffFFn0
35 28 coef3 GPolyScoeffG:0
36 35 3ad2ant2 FPolySGPolySM<NcoeffG:0
37 36 ffnd FPolySGPolySM<NcoeffGFn0
38 nn0ex 0V
39 38 a1i FPolySGPolySM<N0V
40 inidm 00=0
41 15 11 ltnled FPolySGPolySM<NM<N¬NM
42 20 41 mpbid FPolySGPolySM<N¬NM
43 simp1 FPolySGPolySM<NFPolyS
44 27 1 dgrub FPolySN0coeffFN0NM
45 44 3expia FPolySN0coeffFN0NM
46 43 10 45 syl2anc FPolySGPolySM<NcoeffFN0NM
47 46 necon1bd FPolySGPolySM<N¬NMcoeffFN=0
48 42 47 mpd FPolySGPolySM<NcoeffFN=0
49 48 adantr FPolySGPolySM<NN0coeffFN=0
50 eqidd FPolySGPolySM<NN0coeffGN=coeffGN
51 34 37 39 39 40 49 50 ofval FPolySGPolySM<NN0coeffF+fcoeffGN=0+coeffGN
52 10 51 mpdan FPolySGPolySM<NcoeffF+fcoeffGN=0+coeffGN
53 36 10 ffvelcdmd FPolySGPolySM<NcoeffGN
54 53 addlidd FPolySGPolySM<N0+coeffGN=coeffGN
55 31 52 54 3eqtrd FPolySGPolySM<NcoeffF+fGN=coeffGN
56 simp2 FPolySGPolySM<NGPolyS
57 0red FPolySGPolySM<N0
58 14 nn0ge0d FPolySGPolySM<N0M
59 57 15 11 58 20 lelttrd FPolySGPolySM<N0<N
60 59 gt0ne0d FPolySGPolySM<NN0
61 2 28 dgreq0 GPolySG=0𝑝coeffGN=0
62 fveq2 G=0𝑝degG=deg0𝑝
63 dgr0 deg0𝑝=0
64 63 eqcomi 0=deg0𝑝
65 62 2 64 3eqtr4g G=0𝑝N=0
66 61 65 syl6bir GPolyScoeffGN=0N=0
67 66 necon3d GPolySN0coeffGN0
68 56 60 67 sylc FPolySGPolySM<NcoeffGN0
69 55 68 eqnetrd FPolySGPolySM<NcoeffF+fGN0
70 eqid coeffF+fG=coeffF+fG
71 eqid degF+fG=degF+fG
72 70 71 dgrub F+fGPolyN0coeffF+fGN0NdegF+fG
73 4 10 69 72 syl3anc FPolySGPolySM<NNdegF+fG
74 7 11 letri3d FPolySGPolySM<NdegF+fG=NdegF+fGNNdegF+fG
75 26 73 74 mpbir2and FPolySGPolySM<NdegF+fG=N