Schwarz symmetry for nested derivatives at the origin
Provedderiv_deriv_comm_of_contDiffOnLet be a function of two real variables with complex values, let be a subset of , assume is open and that the origin lies in , and assume that the uncurried function is twice continuously differentiable on in the sense of ContDiffOn ℝ 2. Then the two nested one-variable derivatives at the origin agree: the derivative at of the function equals the derivative at of the function . Here the derivatives are Mathlib's total deriv on functions , so in each nested expression the inner derivative is formed at the point for every value of the outer variable, including those for which the relevant slice need not meet , and no differentiability is asserted of the intermediate functions beyond what the conclusion requires.
This is the Schwarz–Clairaut symmetry of second partial derivatives, in the shape needed when is only assumed on an open neighbourhood of the origin rather than on all of , and with the partial derivatives written as iterated one-variable derivs. It is used in the computation of the action of the Casimir element on archimedean lifts in LanglandsTunnell.CubicInduction.casimir_apply_eq_sum_deriv_archRealLift3_mul.
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_comm_of_contDiffOn
(F : ℝ → ℝ → ℂ) (U : Set (ℝ × ℝ)) (hU : IsOpen U) (h0 : ((0 : ℝ), (0 : ℝ)) ∈ U)
(hF : ContDiffOn ℝ 2 (fun p : ℝ × ℝ => F p.1 p.2) U) :
deriv (fun s : ℝ => deriv (fun t : ℝ => F s t) 0) 0
= deriv (fun t : ℝ => deriv (fun s : ℝ => F s t) 0) 0 := by sorry