Documentation

SpherePacking.ModularForms.Derivative

Derivatives of Modular Forms #

The normalized derivative D = (2πi)⁻¹ d/dz and the Serre derivative ∂ₖ = D - k/12 E₂ are Mathlib's Derivative.normalizedDerivOfComplex (notation D) and Derivative.serreDerivative, including their linearity/Leibniz rules, slash equivariance, and boundedness at i∞ (Derivative.serreDerivativeMF packages ∂ₖ of a modular form as a modular form).

This file collects the project-specific complements: termwise differentiation of q-series (D_qexp_tsum_pnat, D_qexp_const_add_smul), the interaction of D and ∂ₖ with the restriction to the imaginary axis (realness, positivity via monotonicity arguments), and the log-derivative limit logderiv_tendsto_of_div_exp_tendsto.

theorem MDifferentiable.pi_ofNat (n : ℕ) [n.AtLeastTwo] :
MDiff (OfNat.ofNat n)

Constant Pi functions (numeric literals) are MDifferentiable.

Inverse of a constant Pi function (e.g. 6⁻¹ : ℍ → ℂ) is MDifferentiable.

D and ∂ₖ are Mathlib's; register their MDifferentiable lemmas, and E₂'s, with fun_prop.

@[simp]

Normalize a numeric literal (n : ℍ → ℂ) to a constant function so Derivative.normalizedDerivOfComplex_const fires.

@[simp]
theorem pi_inv_const_eq_const (c : ℂ) :
(fun (x : UpperHalfPlane) => c)⁻¹ = fun (x : UpperHalfPlane) => c⁻¹

Normalize (fun _ ↦ c)⁻¹ to fun _ ↦ c⁻¹ so Derivative.normalizedDerivOfComplex_const fires.

The normalized log-derivative of w ↦ exp (c * w) is the constant c / (2πi).

Termwise differentiation of q-series (Lemma 6.45) #

theorem D_qexp_term (n : ℤ) (a : ℂ) (z : UpperHalfPlane) :
Derivative.normalizedDerivOfComplex (fun (w : UpperHalfPlane) => a * Complex.exp (2 * ↑Real.pi * Complex.I * ↑n * ↑w)) z = ↑n * a * Complex.exp (2 * ↑Real.pi * Complex.I * ↑n * ↑z)

Lemma 6.45 (Blueprint): The normalized derivative $D$ acts as $q \frac{d}{dq}$ on $q$-series. For a single q-power term: D(a·qⁿ) = n·a·qⁿ where q = exp(2πiz) and n ∈ ℤ.

The key calculation:

  • d/dz(exp(2πinz)) = 2πin·exp(2πinz)
  • D(exp(2πinz)) = (2πi)⁻¹·(2πin·exp(2πinz)) = n·exp(2πinz)
theorem D_qexp_tsum (a : ℕ → ℂ) (z : UpperHalfPlane) (_hsum : Summable fun (n : ℕ) => a n * Complex.exp (2 * ↑Real.pi * Complex.I * ↑n * ↑z)) (hsum_deriv : ∀ K ⊆ {w : ℂ | 0 < w.im}, IsCompact K → ∃ (u : ℕ → ℝ), Summable u ∧ ∀ (n : ℕ) (k : ↑K), ‖a n * (2 * ↑Real.pi * Complex.I * ↑n) * Complex.exp (2 * ↑Real.pi * Complex.I * ↑n * ↑k)‖ ≤ u n) :
Derivative.normalizedDerivOfComplex (fun (w : UpperHalfPlane) => ∑' (n : ℕ), a n * Complex.exp (2 * ↑Real.pi * Complex.I * ↑n * ↑w)) z = ∑' (n : ℕ), ↑n * a n * Complex.exp (2 * ↑Real.pi * Complex.I * ↑n * ↑z)

Lemma 6.45 (Blueprint): $D$ commutes with tsum for $q$-series. If F(z) = Σ a(n)·qⁿ where q = exp(2πiz), then D F(z) = Σ n·a(n)·qⁿ.

More precisely, this lemma shows that for a ℕ-indexed q-series with summable coefficients satisfying appropriate derivative bounds, D acts termwise by multiplying coefficients by n.

theorem D_qexp_tsum_pnat (a : ℕ+ → ℂ) (z : UpperHalfPlane) (hsum : Summable fun (n : ℕ+) => a n * Complex.exp (2 * ↑Real.pi * Complex.I * ↑↑n * ↑z)) (hsum_deriv : ∀ K ⊆ {w : ℂ | 0 < w.im}, IsCompact K → ∃ (u : ℕ+ → ℝ), Summable u ∧ ∀ (n : ℕ+) (k : ↑K), ‖a n * (2 * ↑Real.pi * Complex.I * ↑↑n) * Complex.exp (2 * ↑Real.pi * Complex.I * ↑↑n * ↑k)‖ ≤ u n) :
Derivative.normalizedDerivOfComplex (fun (w : UpperHalfPlane) => ∑' (n : ℕ+), a n * Complex.exp (2 * ↑Real.pi * Complex.I * ↑↑n * ↑w)) z = ∑' (n : ℕ+), ↑↑n * a n * Complex.exp (2 * ↑Real.pi * Complex.I * ↑↑n * ↑z)

Simplified version of D_qexp_tsum for ℕ+-indexed series (starting from n=1). This is the form most commonly used for Eisenstein series q-expansions.

Thin layer implementation: Extends a : ℕ+ → ℂ to ℕ → ℂ with a' 0 = 0, uses tsum_pNat and summable_pnat_iff_summable_nat to convert between sums, then applies D_qexp_tsum.

theorem D_qexp_const_add_smul {g : UpperHalfPlane → ℂ} {c₀ c : ℂ} {a : ℕ+ → ℂ} (hc : c ≠ 0) (hg_md : MDiff g) (hg : ∀ (w : UpperHalfPlane), g w = c₀ + c * ∑' (n : ℕ+), a n * Complex.exp (2 * ↑Real.pi * Complex.I * ↑↑n * ↑w)) (hsum : ∀ (w : UpperHalfPlane), Summable fun (n : ℕ+) => a n * Complex.exp (2 * ↑Real.pi * Complex.I * ↑↑n * ↑w)) (hbound : ∀ K ⊆ {w : ℂ | 0 < w.im}, IsCompact K → ∃ (u : ℕ+ → ℝ), Summable u ∧ ∀ (n : ℕ+) (k : ↑K), ‖a n * (2 * ↑Real.pi * Complex.I * ↑↑n) * Complex.exp (2 * ↑Real.pi * Complex.I * ↑↑n * ↑k)‖ ≤ u n) (z : UpperHalfPlane) :
Derivative.normalizedDerivOfComplex g z = c * ∑' (n : ℕ+), ↑↑n * a n * Complex.exp (2 * ↑Real.pi * Complex.I * ↑↑n * ↑z)

Termwise differentiation of a c₀ + c • ∑' n : ℕ+, a n * qⁿ expansion: if a holomorphic g agrees pointwise with such a series (c ≠ 0), then D g z = c * ∑' n, n * a n * qⁿ. The summability and derivative-bound hypotheses are those of D_qexp_tsum_pnat.

Chain rule for restriction to imaginary axis: d/dt F(it) = -2π * (D F)(it).

This connects the real derivative along the imaginary axis to the normalized derivative D. The key computation is:

  • The imaginary axis is parametrized by g(t) = I * t
  • By chain rule: d/dt F(it) = (dF/dz)(it) · (d/dt)(it) = F'(it) · I
  • Since D = (2πi)⁻¹ · d/dz, we have F' = 2πi · D F
  • So d/dt F(it) = 2πi · D F(it) · I = -2π · D F(it)
theorem im_deriv_eq_zero_of_im_eq_zero {f : ℝ → ℂ} {t : ℝ} (hf : DifferentiableAt ℝ f t) (him : ∀ (s : ℝ), (f s).im = 0) :
(deriv f t).im = 0

The derivative of a function with zero imaginary part also has zero imaginary part.

If F is real on the imaginary axis and MDifferentiable, then D F is also real on the imaginary axis.

theorem serreDerivative_real_of_real {F : UpperHalfPlane → ℂ} {k : ℝ} (hF_real : ResToImagAxis.Real F) (hF_diff : MDiff F) :

If F is real on the imaginary axis and MDifferentiable, then the Serre derivative (of real weight) is also real on the imaginary axis.

theorem hasDerivAt_resToImagAxis_re {F : UpperHalfPlane → ℂ} (hdiff : MDiff F) {t : ℝ} (ht : 0 < t) :

The real part of F.resToImagAxis has derivative -2π * ((D F).resToImagAxis t).re at t.

theorem neg_after_zero_of_deriv_neg {g : ℝ → ℝ} {t₀ : ℝ} (hg0 : g t₀ = 0) (hd : deriv g t₀ < 0) :
∃ δ > 0, ∀ (s : ℝ), t₀ < s → s < t₀ + δ → g s < 0

If g(t₀) = 0 and deriv g t₀ < 0, then g is negative shortly after t₀.

theorem pos_of_deriv_neg_at_zeros {g : ℝ → ℝ} (hcont : ContinuousOn g (Set.Ioi 0)) {t₀ : ℝ} (_ht₀ : 0 < t₀) (hpos : ∀ (t : ℝ), t₀ ≤ t → 0 < g t) (hderiv : ∀ (t : ℝ), 0 < t → t < t₀ → g t = 0 → deriv g t < 0) (t : ℝ) :
0 < t → 0 < g t

If g is continuous on (0, ∞), positive for t ≥ t₀, and has strictly negative derivative at any zero in (0, t₀), then g is positive on all of (0, ∞).

Let $F : \mathbb{H} \to \mathbb{C}$ be a holomorphic function where $F(it)$ is real for all $t > 0$. Assume that Serre derivative $\partial_k F$ is positive on the imaginary axis. If $F(it)$ is positive for sufficiently large $t$, then $F(it)$ is positive for all $t > 0$.

Log-derivative limits at i∞ #

If F z / exp (a * z) → C ≠ 0 at i∞, then D F / F → a / (2πi).