Documentation

CslibFrontier.Foundations.Data.MvPolynomial.HessianChainRule

The chain rule for formal Hessians #

Substituting polynomials L k for the variables of p transforms partial derivatives by the chain rule ∂ᵢ (p ∘ L) = ∑ₖ (∂ₖ p ∘ L) · ∂ᵢ Lₖ (MvPolynomial.pderiv_aeval). At a point x, the Hessian of p ∘ L is Jᵀ · Hess p (L x) · J plus the Hessians of the L k weighted by the gradient of p, where J is the Jacobian of L at x. An affine substitution (each L k of total degree at most one) has vanishing Hessians, so it can only lower the rank of the Hessian. No assumption on the characteristic is needed; the rank statement is over a field.

Main results #

References #

theorem MvPolynomial.eval_aeval {σ : Type u_1} {τ : Type u_2} {R : Type u_3} [CommSemiring R] (x : σ → R) (L : τ → MvPolynomial σ R) (q : MvPolynomial τ R) :
(eval x) ((aeval L) q) = (eval fun (k : τ) => (eval x) (L k)) q

Evaluating a substitution at x evaluates the substituted polynomial at the values of the substituted polynomials.

theorem MvPolynomial.hessian_aeval {σ : Type u_1} {τ : Type u_2} {R : Type u_3} [CommSemiring R] [Fintype τ] (x : σ → R) (L : τ → MvPolynomial σ R) (p : MvPolynomial τ R) :
hessian x ((aeval L) p) = ((Matrix.of fun (k : τ) (i : σ) => gradient x (L k) i).transpose * hessian (fun (k : τ) => (eval x) (L k)) p * Matrix.of fun (k : τ) (i : σ) => gradient x (L k) i) + ∑ k : τ, gradient (fun (k : τ) => (eval x) (L k)) p k • hessian x (L k)

Chain rule for Hessians: at x, the Hessian of p ∘ L is Jᵀ · Hess p (L x) · J plus the Hessians of the L k weighted by the gradient of p at L x, where J is the Jacobian of L at x.

theorem MvPolynomial.hessian_eq_zero_of_totalDegree_le_one {σ : Type u_1} {R : Type u_3} [CommSemiring R] (x : σ → R) {p : MvPolynomial σ R} (hp : p.totalDegree ≤ 1) :
hessian x p = 0

A polynomial of total degree at most one has zero Hessian at every point.

theorem MvPolynomial.hessian_mul_C {σ : Type u_1} {R : Type u_3} [CommSemiring R] (x : σ → R) (p : MvPolynomial σ R) (c : R) :
hessian x (p * C c) = c • hessian x p

Multiplying by a constant scales the Hessian.

theorem MvPolynomial.rank_hessian_aeval_le {σ : Type u_1} {τ : Type u_2} {K : Type u_4} [Field K] [Finite σ] [Finite τ] (x : σ → K) (L : τ → MvPolynomial σ K) (hL : ∀ (k : τ), (L k).totalDegree ≤ 1) (p : MvPolynomial τ K) :
(hessian x ((aeval L) p)).rank ≤ (hessian (fun (k : τ) => (eval x) (L k)) p).rank

An affine substitution does not increase the rank of the Hessian: the Hessian of p ∘ L at x has rank at most that of the Hessian of p at L x.