Reversing a triple nested derivative of a C³ function
Provedderiv_deriv_deriv_reverse_of_contDiffOnLet be a complex-valued function of three real variables, let be an open set containing the origin , and suppose that the uncurried function is three times continuously differentiable on in the sense of real Fréchet differentiability (ContDiffOn ℝ 3). The conclusion equates two iterated one-variable derivatives, each taken at and each formed with Mathlib's deriv, which is defined unconditionally and returns at points of non-differentiability. On the left, the innermost derivative is in the third variable , the next in the second variable , and the outermost in the first variable ; on the right the order is reversed, the innermost derivative being in , then , then . Thus the value at the origin of agrees with that of , the derivatives being computed as nested derivatives of the partial functions rather than as components of a single third Fréchet derivative.
This is the symmetry of third-order partial derivatives (Schwarz's theorem, in the form of iterated one-variable derivatives of a function on an open neighbourhood of the origin), stated for functions valued in . It is used in the construction of the cubic Casimir operator, where LanglandsTunnell.CubicInduction.casimir_apply_eq_sum_deriv_archRealLift3_mul needs the freedom to reorder the three differentiations applied to a smooth lift of a real group element.
import Mathlib set_option maxHeartbeats 4000000 set_option synthInstance.maxHeartbeats 400000 set_option backward.isDefEq.respectTransparency.types false set_option autoImplicit false
theorem deriv_deriv_deriv_reverse_of_contDiffOn
(G : ℝ → ℝ → ℝ → ℂ) (U : Set (ℝ × ℝ × ℝ)) (hU : IsOpen U) (h0 : ((0 : ℝ), (0 : ℝ), (0 : ℝ)) ∈ U)
(hG : ContDiffOn ℝ 3 (fun p : ℝ × ℝ × ℝ => G p.1 p.2.1 p.2.2) U) :
deriv (fun s : ℝ => deriv (fun t : ℝ => deriv (fun u : ℝ => G s t u) 0) 0) 0
= deriv (fun u : ℝ => deriv (fun t : ℝ => deriv (fun s : ℝ => G s t u) 0) 0) 0 := by sorry