Documentation

Mathlib.FieldTheory.RatFunc.Degree

The degree of rational functions #

Main definitions #

We define the degree of a rational function, with values in โ„ค:

noncomputable def RatFunc.intDegree {K : Type u} [Field K] (x : RatFunc K) :
โ„ค

intDegree x is the degree of the rational function x, defined as the difference between the natDegree of its numerator and the natDegree of its denominator. In particular, intDegree 0 = 0.

Instances For
    @[simp]
    theorem RatFunc.intDegree_C {K : Type u} [Field K] (k : K) :
    (C k).intDegree = 0
    theorem RatFunc.intDegree_mul {K : Type u} [Field K] {x y : RatFunc K} (hx : x โ‰  0) (hy : y โ‰  0) :
    (x * y).intDegree = x.intDegree + y.intDegree
    theorem RatFunc.intDegree_div {K : Type u} [Field K] {x y : RatFunc K} (hx : x โ‰  0) (hy : y โ‰  0) :
    (x / y).intDegree = x.intDegree - y.intDegree
    theorem RatFunc.intDegree_add {K : Type u} [Field K] {x y : RatFunc K} (hxy : x + y โ‰  0) :
    (x + y).intDegree = โ†‘(x.num * y.denom + x.denom * y.num).natDegree - โ†‘(x.denom * y.denom).natDegree
    theorem RatFunc.natDegree_num_mul_right_sub_natDegree_denom_mul_left_eq_intDegree {K : Type u} [Field K] {x : RatFunc K} (hx : x โ‰  0) {s : Polynomial K} (hs : s โ‰  0) :
    โ†‘(x.num * s).natDegree - โ†‘(s * x.denom).natDegree = x.intDegree
    theorem RatFunc.intDegree_add_le {K : Type u} [Field K] {x y : RatFunc K} (hy : y โ‰  0) (hxy : x + y โ‰  0) :