Derivative commutes with the coercion :
Provedderiv.ofReal_compcomplex-analysispntreal-analysis
Let be any real function and let . Consider the complex-valued function obtained by post-composing with the embedding of into , i.e. . Then its derivative at is the coercion of the real derivative:
where the right-hand side is the real derivative of at , viewed as a complex number. No differentiability hypothesis is needed: the coercion is a continuous linear isometric embedding, so it maps derivatives to derivatives, and when is not differentiable at both sides are the junk value .
This is a small but ubiquitous bridging lemma for computations that mix real-variable calculus with complex-valued integrands, as happens throughout the Fourier/Mellin and contour-integration infrastructure of the PNT+ project.
Preamble
/- Copyright (c) 2024 Michael Stoll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Stoll -/ import Mathlib.Analysis.Complex.RealDeriv import Mathlib.Analysis.InnerProductSpace.Basic /-! ### Auxiliary lemmas -/ open Complex -- see https://leanprover.zulipchat.com/#narrow/stream/217875-Is-there-code-for-X.3F/topic/Differentiability.20of.20the.20natural.20map.20.E2.84.9D.20.E2.86.92.20.E2.84.82/near/418095234
Formal statement
theorem deriv.ofReal_comp {z : ℝ} {f : ℝ → ℝ} :
deriv (fun (y : ℝ) ↦ (f y : ℂ)) z = deriv f z := by sorrySource