The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V21. Dynamics, ergodic theory and information theory

Mathlib.Dynamics.Newton

9 declarations. Mathlib docs · Source

Newton-Raphson method

Given a single-variable polynomial P with derivative P', Newton's method concerns iteration of the rational map: x ↦ x - P(x) / P'(x).

Over a field, it can serve as a root-finding algorithm. It is also useful in proving results such as Hensel's lemma and the Jordan-Chevalley decomposition.

Main definitions / results:

  • Polynomial.newtonMap: the map x ↦ x - P(x) / P'(x), where P' is the derivative of the polynomial P.
  • Polynomial.isFixedPt_newtonMap_of_isUnit_iff: x is a fixed point for Newton iteration iff it is a root of P (provided P'(x) is a unit).
  • Polynomial.existsUnique_nilpotent_sub_and_aeval_eq_zero: if x is almost a root of P in the sense that P(x) is nilpotent (and P'(x) is a unit) then we may write x as a sum x = n + r where n is nilpotent and r is a root of P. This can be used to prove the Jordan-Chevalley decomposition of linear endomorphisms.

def Polynomial.newtonMap E1 #

{R : Type u_1} → {S : Type u_2} → [inst : CommRing R] → [inst_1 : CommRing S] → [Algebra R S] → Polynomial R → S → S

Given a single-variable polynomial P with derivative P', this is the map: x ↦ x - P(x) / P'(x). When P'(x) is not a unit we use a junk-value pattern and send x ↦ x.

theorem Polynomial.newtonMap_apply E0 #

∀ {R : Type u_1} {S : Type u_2} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : Algebra R S] (P : Polynomial R)
  {x : S}, P.newtonMap x = x - Ring.inverse ((Polynomial.aeval x) (Polynomial.derivative P)) * (Polynomial.aeval x) P

theorem Polynomial.newtonMap_apply_of_isUnit E1 #

∀ {R : Type u_1} {S : Type u_2} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : Algebra R S] {P : Polynomial R}
  {x : S} (h : IsUnit ((Polynomial.aeval x) (Polynomial.derivative P))),
  P.newtonMap x = x - ↑h.unit⁻¹ * (Polynomial.aeval x) P

theorem Polynomial.newtonMap_apply_of_not_isUnit E1 #

∀ {R : Type u_1} {S : Type u_2} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : Algebra R S] {P : Polynomial R}
  {x : S}, ¬IsUnit ((Polynomial.aeval x) (Polynomial.derivative P)) → P.newtonMap x = x

theorem Polynomial.isNilpotent_iterate_newtonMap_sub_of_isNilpotent E1 #

∀ {R : Type u_1} {S : Type u_2} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : Algebra R S] {P : Polynomial R}
  {x : S}, IsNilpotent ((Polynomial.aeval x) P) → ∀ (n : ℕ), IsNilpotent (P.newtonMap^[n] x - x)

theorem Polynomial.isFixedPt_newtonMap_of_aeval_eq_zero E1 #

∀ {R : Type u_1} {S : Type u_2} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : Algebra R S] {P : Polynomial R}
  {x : S}, (Polynomial.aeval x) P = 0 → Function.IsFixedPt P.newtonMap x

theorem Polynomial.isFixedPt_newtonMap_of_isUnit_iff E0 #

∀ {R : Type u_1} {S : Type u_2} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : Algebra R S] {P : Polynomial R}
  {x : S},
  IsUnit ((Polynomial.aeval x) (Polynomial.derivative P)) →
    (Function.IsFixedPt P.newtonMap x ↔ (Polynomial.aeval x) P = 0)

theorem Polynomial.aeval_pow_two_pow_dvd_aeval_iterate_newtonMap E1 #

∀ {R : Type u_1} {S : Type u_2} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : Algebra R S] {P : Polynomial R}
  {x : S},
  IsNilpotent ((Polynomial.aeval x) P) →
    IsUnit ((Polynomial.aeval x) (Polynomial.derivative P)) →
      ∀ (n : ℕ), (Polynomial.aeval x) P ^ 2 ^ n ∣ (Polynomial.aeval (P.newtonMap^[n] x)) P

This is really an auxiliary result, en route to Polynomial.existsUnique_nilpotent_sub_and_aeval_eq_zero.

theorem Polynomial.existsUnique_nilpotent_sub_and_aeval_eq_zero E1 #

∀ {R : Type u_1} {S : Type u_2} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : Algebra R S] {P : Polynomial R}
  {x : S},
  IsNilpotent ((Polynomial.aeval x) P) →
    IsUnit ((Polynomial.aeval x) (Polynomial.derivative P)) → ∃! r, IsNilpotent (x - r) ∧ (Polynomial.aeval r) P = 0

If x is almost a root of P in the sense that P(x) is nilpotent (and P'(x) is a unit) then we may write x as a sum x = n + r where n is nilpotent and r is a root of P. Moreover, n and r are unique.

This can be used to prove the Jordan-Chevalley decomposition of linear endomorphisms.