Documentation

Mathlib.Analysis.Polynomial.CauchyIndex

The Cauchy index of a rational function #

The Cauchy index of a rational function f on (a, b) counts the jumps of f from -∞ to +∞ minus those from +∞ to -∞ at the poles of f in (a, b). It is the central quantity in Sturm's theorem and the Sturm–Tarski theorem (via Tarski queries), and also underlies the Routh–Hurwitz stability criterion and the counting of complex roots through winding numbers.

Main definitions #

Main results #

Implementation notes #

The jump is defined algebraically, through the reduced representation f = f.num / f.denom. Since f.num and f.denom are coprime, f has a pole of odd order at x exactly when rootMultiplicity x f.denom is odd, and only poles of odd order make f change sign. At such a pole the direction of the jump is the sign of f.num * f.denom (which is equal to the sign of f) immediately to the right of x, that is signRight x (f.num * f.denom). For an arbitrary representation f = q / p, RatFunc.jump_div recovers the formula of [Li14]: the jump is signRight x (p * q) when rootMultiplicity x p - rootMultiplicity x q is odd (with truncated subtraction), and 0 otherwise.

References #

The jump of a rational function at a point #

noncomputable def RatFunc.jump {K : Type u_1} [Field K] [LinearOrder K] (f : RatFunc K) (x : K) :

The jump of the rational function f at x: 1 if it goes from -∞ to +∞, -1 if it goes from +∞ to -∞, and 0 otherwise (in particular when f has no pole at x).

Equations
Instances For
    theorem RatFunc.jump_eq_zero_of_eval_denom_ne_zero {K : Type u_1} [Field K] [LinearOrder K] {f : RatFunc K} {x : K} (h : Polynomial.eval x f.denom ≠ 0) :
    f.jump x = 0

    There is no jump at a point that is not a pole.

    @[simp]
    theorem RatFunc.jump_algebraMap {K : Type u_1} [Field K] [LinearOrder K] (p : Polynomial K) (x : K) :
    ((algebraMap (Polynomial K) (RatFunc K)) p).jump x = 0
    @[simp]
    theorem RatFunc.jump_zero {K : Type u_1} [Field K] [LinearOrder K] (x : K) :
    jump 0 x = 0

    The jump of q / p at x, computed from any representation of the rational function as a quotient of polynomials.

    Note that the statement uses truncated ℕ subtraction since if x is a root of both p and q but with greater multiplicity in the numerator q, then there is no jump.

    @[simp]
    theorem RatFunc.jump_add_algebraMap {K : Type u_1} [Field K] [LinearOrder K] [IsStrictOrderedRing K] (f : RatFunc K) (g : Polynomial K) (x : K) :
    (f + (algebraMap (Polynomial K) (RatFunc K)) g).jump x = f.jump x

    Adding a polynomial does not change the jump.

    @[simp]
    theorem RatFunc.jump_algebraMap_add {K : Type u_1} [Field K] [LinearOrder K] [IsStrictOrderedRing K] (f : RatFunc K) (g : Polynomial K) (x : K) :
    ((algebraMap (Polynomial K) (RatFunc K)) g + f).jump x = f.jump x
    theorem RatFunc.jump_algebraMap_mul {K : Type u_1} [Field K] [LinearOrder K] [IsStrictOrderedRing K] {g : Polynomial K} {x : K} (hg : Polynomial.eval x g ≠ 0) (f : RatFunc K) :

    Multiplying by a polynomial g that does not vanish at x multiplies the jump at x by the sign of g at x.

    theorem RatFunc.jump_smul {K : Type u_1} [Field K] [LinearOrder K] [IsStrictOrderedRing K] (c : K) (f : RatFunc K) (x : K) :
    (c • f).jump x = ↑(SignType.sign c) * f.jump x

    Scaling by a constant c scales the jump by sign c.

    @[simp]
    theorem RatFunc.jump_neg {K : Type u_1} [Field K] [LinearOrder K] [IsStrictOrderedRing K] (f : RatFunc K) (x : K) :
    (-f).jump x = -f.jump x

    At a root x of p, the jump of derivative p * q / p is the sign of q at x.

    The Cauchy index #

    noncomputable def RatFunc.cauchyIndex {K : Type u_1} [Field K] [LinearOrder K] (f : RatFunc K) (a b : K) :

    The Cauchy index of the rational function f on the open interval (a, b): the sum of the jumps of f at its poles in (a, b). The roots of f.denom are exactly the poles of f.

    Equations
    Instances For
      theorem RatFunc.cauchyIndex_eq_sum {K : Type u_1} [Field K] [LinearOrder K] {f : RatFunc K} {p : Polynomial K} {a b : K} (hp : p ≠ 0) (h : f.denom ∣ p) :
      f.cauchyIndex a b = ∑ x ∈ p.roots.toFinset with x ∈ Set.Ioo a b, f.jump x

      The Cauchy index can be computed as a sum over the roots of any nonzero multiple of the denominator.

      theorem RatFunc.cauchyIndex_div {K : Type u_1} [Field K] [LinearOrder K] (p q : Polynomial K) (a b : K) :
      ((algebraMap (Polynomial K) (RatFunc K)) q / (algebraMap (Polynomial K) (RatFunc K)) p).cauchyIndex a b = ∑ x ∈ p.roots.toFinset with x ∈ Set.Ioo a b, ((algebraMap (Polynomial K) (RatFunc K)) q / (algebraMap (Polynomial K) (RatFunc K)) p).jump x

      The Cauchy index of q / p is the sum of its jumps at the roots of p.

      @[simp]
      theorem RatFunc.cauchyIndex_algebraMap {K : Type u_1} [Field K] [LinearOrder K] (p : Polynomial K) (a b : K) :
      @[simp]
      theorem RatFunc.cauchyIndex_zero {K : Type u_1} [Field K] [LinearOrder K] (a b : K) :
      cauchyIndex 0 a b = 0
      theorem RatFunc.cauchyIndex_of_le {K : Type u_1} [Field K] [LinearOrder K] (f : RatFunc K) {a b : K} (h : b ≤ a) :
      f.cauchyIndex a b = 0

      The Cauchy index on an empty interval is zero.

      @[simp]
      theorem RatFunc.cauchyIndex_add_algebraMap {K : Type u_1} [Field K] [LinearOrder K] [IsStrictOrderedRing K] (f : RatFunc K) (g : Polynomial K) (a b : K) :

      Adding a polynomial does not change the Cauchy index.

      @[simp]
      theorem RatFunc.cauchyIndex_algebraMap_add {K : Type u_1} [Field K] [LinearOrder K] [IsStrictOrderedRing K] (f : RatFunc K) (g : Polynomial K) (a b : K) :

      The Cauchy index of q / p only depends on q modulo p.

      theorem RatFunc.cauchyIndex_smul {K : Type u_1} [Field K] [LinearOrder K] [IsStrictOrderedRing K] (c : K) (f : RatFunc K) (a b : K) :
      (c • f).cauchyIndex a b = ↑(SignType.sign c) * f.cauchyIndex a b

      Scaling by a constant c scales the Cauchy index by sign c.

      @[simp]
      theorem RatFunc.cauchyIndex_neg {K : Type u_1} [Field K] [LinearOrder K] [IsStrictOrderedRing K] (f : RatFunc K) (a b : K) :