§5.3.2, p. 320 — C² function with gradient and Hessian maps, Lipschitz Hessian, and Newton's method x_{k+1} = x_k − [∇²f(x_k)]⁻¹∇f(x_k)
DefinitionConvexOptAlg_Newton_DefsThroughout, carries the Euclidean norm , and denotes the operator norm of a linear map , so that .
C² function, gradient and Hessian. A function is twice continuously differentiable, with gradient and Hessian , where is the derivative of the gradient map at .
Lipschitz Hessian. For , the Hessian is -Lipschitz if
Newton's method. Starting at , Newton's method iterates, for ,
These are the objects of the traditional local analysis of Newton's method: the method itself and the regularity assumption (a Lipschitz Hessian) under which it converges quadratically near a strict local minimum.
Formalization Note is EuclideanSpace ℝ (Fin n). The gradient and the Hessian are explicit maps and with (HasGradientAt) and the Fréchet derivative of at (HasFDerivAt), together with ContDiff ℝ 2 f. A Newton run is a sequence satisfying the linear system for every : this is the printed recursion whenever is invertible, and it never takes the inverse of a possibly singular operator (Lean's inverse of a non-invertible map is ). Invertibility along the run is a conclusion of Theorem 5.3, not part of the definition.
import Mathlib
namespace ConvexOptAlg.Newton
open InnerProductSpace
/-- `f : ℝⁿ → ℝ` is a C² function whose gradient map is `g` and whose Hessian map is `H`
(Bubeck, arXiv:1405.4980v2, §5.3.2, p. 320: "Let f : ℝⁿ → ℝ be a C² function"):
`f` is twice continuously differentiable, `g x = ∇f(x)` for every `x`, and `H x = ∇²f(x)` is the
derivative of the gradient map at every `x`. The Hessian is a continuous linear map
`ℝⁿ →L[ℝ] ℝⁿ`; its norm is the operator norm, as on the page. -/
def IsC2GradHess {n : ℕ} (f : EuclideanSpace ℝ (Fin n) → ℝ)
(g : EuclideanSpace ℝ (Fin n) → EuclideanSpace ℝ (Fin n))
(H : EuclideanSpace ℝ (Fin n) → (EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n))) :
Prop :=
ContDiff ℝ 2 f ∧ (∀ x, HasGradientAt f (g x) x) ∧ ∀ x, HasFDerivAt g (H x) x
/-- The Hessian map `H` is `M`-Lipschitz in operator norm (Bubeck, arXiv:1405.4980v2,
Theorem 5.3, p. 320): `‖∇²f(x) − ∇²f(y)‖ ≤ M‖x − y‖` for all `x, y ∈ ℝⁿ`. -/
def IsLipschitzHessian {n : ℕ}
(H : EuclideanSpace ℝ (Fin n) → (EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n)))
(M : ℝ) : Prop :=
∀ x y, ‖H x - H y‖ ≤ M * ‖x - y‖
/-- A run of Newton's method (Bubeck, arXiv:1405.4980v2, §5.3.2, p. 320):
`x_{k+1} = x_k − [∇²f(x_k)]⁻¹ ∇f(x_k)` for every `k ≥ 0`, starting at `x₀ = x 0`.
The step is encoded as the linear system it solves, `∇²f(x_k)(x_k − x_{k+1}) = ∇f(x_k)`, so no
inverse of a possibly singular operator is ever taken. When every `∇²f(x_k)` is invertible the
relation determines `x_{k+1}` uniquely and coincides with the printed formula; that the Hessians
along the run are invertible ("Newton's method is well-defined") is a conclusion of Theorem 5.3,
not part of this definition. -/
def IsNewtonRun {n : ℕ} (g : EuclideanSpace ℝ (Fin n) → EuclideanSpace ℝ (Fin n))
(H : EuclideanSpace ℝ (Fin n) → (EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n)))
(x : ℕ → EuclideanSpace ℝ (Fin n)) : Prop :=
∀ k : ℕ, H (x k) (x k - x (k + 1)) = g (x k)
end ConvexOptAlg.Newton