Metamath Proof Explorer


Theorem dgrsub

Description: The degree of a difference of polynomials is at most the maximum of the degrees. (Contributed by Mario Carneiro, 26-Jul-2014)

Ref Expression
Hypotheses dgrsub.1 M = deg F
dgrsub.2 N = deg G
Assertion dgrsub F Poly S G Poly S deg F f G if M N N M

Proof

Step Hyp Ref Expression
1 dgrsub.1 M = deg F
2 dgrsub.2 N = deg G
3 plyssc Poly S Poly
4 3 sseli F Poly S F Poly
5 ssid
6 neg1cn 1
7 plyconst 1 × 1 Poly
8 5 6 7 mp2an × 1 Poly
9 3 sseli G Poly S G Poly
10 plymulcl × 1 Poly G Poly × 1 × f G Poly
11 8 9 10 sylancr G Poly S × 1 × f G Poly
12 eqid deg × 1 × f G = deg × 1 × f G
13 1 12 dgradd F Poly × 1 × f G Poly deg F + f × 1 × f G if M deg × 1 × f G deg × 1 × f G M
14 4 11 13 syl2an F Poly S G Poly S deg F + f × 1 × f G if M deg × 1 × f G deg × 1 × f G M
15 cnex V
16 plyf F Poly S F :
17 plyf G Poly S G :
18 ofnegsub V F : G : F + f × 1 × f G = F f G
19 15 16 17 18 mp3an3an F Poly S G Poly S F + f × 1 × f G = F f G
20 19 fveq2d F Poly S G Poly S deg F + f × 1 × f G = deg F f G
21 neg1ne0 1 0
22 dgrmulc 1 1 0 G Poly S deg × 1 × f G = deg G
23 6 21 22 mp3an12 G Poly S deg × 1 × f G = deg G
24 23 2 eqtr4di G Poly S deg × 1 × f G = N
25 24 adantl F Poly S G Poly S deg × 1 × f G = N
26 25 breq2d F Poly S G Poly S M deg × 1 × f G M N
27 26 25 ifbieq1d F Poly S G Poly S if M deg × 1 × f G deg × 1 × f G M = if M N N M
28 14 20 27 3brtr3d F Poly S G Poly S deg F f G if M N N M