Skip to content

Commit 856a596

Browse files
committed
Invariance of measure
1 parent a8d664f commit 856a596

File tree

2 files changed

+94
-27
lines changed

2 files changed

+94
-27
lines changed

ModularFormDimensions/Divisor.lean

Lines changed: 52 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,61 @@ import Mathlib.Algebra.Group.Action.Sum
1111
import Mathlib.Analysis.Meromorphic.Order
1212
import Mathlib.Analysis.Complex.CauchyIntegral
1313
import Mathlib.Analysis.Meromorphic.NormalForm
14+
import Mathlib.LinearAlgebra.Complex.Determinant
15+
import Mathlib.RingTheory.Norm.Transitivity
16+
import Mathlib.RingTheory.Complex
1417

1518
open UpperHalfPlane Filter Topology
1619

1720
open scoped ModularForm Manifold
1821

19-
private lemma UpperHalfPlane.analyticAt_smul {g : GL (Fin 2) ℝ} (hg : 0 < g.val.det) (τ : ℍ) :
22+
lemma Algebra.norm_complex (a : ℂ) : Algebra.norm ℝ a = ‖a‖ ^ 2 := by
23+
simp [Algebra.norm_eq_matrix_det Complex.basisOneI, Algebra.leftMulMatrix_complex,
24+
Matrix.det_fin_two, RCLike.norm_sq_eq_def]
25+
26+
/-- The derivative of the `GL(2, ℝ)`-action on `ℍ`, as an `ℝ`-linear map from `ℂ` to itself. -/
27+
noncomputable def UpperHalfPlane.smulFDeriv (g : GL (Fin 2) ℝ) (z : ℂ) : ℂ →L[ℝ] ℂ :=
28+
(if 0 < g.det.val then ContinuousLinearEquiv.refl ℝ ℂ else Complex.conjCLE) ∘L
29+
(ContinuousLinearMap.toSpanSingleton ℂ (g.det.val / denom g z ^ 2)).restrictScalars ℝ
30+
31+
lemma det_smulFDeriv (g : GL (Fin 2) ℝ) (z : ℂ) :
32+
(UpperHalfPlane.smulFDeriv g z).det =
33+
SignType.sign g.det.val * g.det ^ 2 / ‖denom g z‖ ^ 4 := by
34+
simp only [ContinuousLinearMap.det, smulFDeriv, ContinuousLinearEquiv.coe_refl,
35+
ContinuousLinearMap.coe_comp, apply_ite, ContinuousLinearMap.coe_id,
36+
ContinuousLinearMap.coe_restrictScalars, ContinuousLinearMap.toLinearMap_toSpanSingleton,
37+
LinearMap.det_comp, LinearMap.det_id]
38+
rw [show Complex.conjCLE.toContinuousLinearMap.toLinearMap = Complex.conjAe.toLinearMap by rfl]
39+
simp only [Complex.det_conjAe]
40+
rw [mul_div_assoc]
41+
congr 1
42+
· rcases lt_or_gt_of_ne (NeZero.ne g.det.val) with h | h
43+
· simp only [not_lt.mpr h.le, ↓reduceIte, sign_neg h, SignType.coe_neg_one]
44+
· simp only [h, ↓reduceIte, sign_pos h, SignType.coe_one]
45+
· simp only [LinearMap.det_restrictScalars, LinearMap.det_ring, LinearMap.toSpanSingleton_apply,
46+
smul_eq_mul, one_mul, Algebra.norm_complex_apply, Complex.normSq_eq_norm_sq]
47+
rw [norm_div, div_pow, Complex.norm_real, ← norm_pow, Real.norm_of_nonneg (sq_nonneg _),
48+
norm_pow, ← pow_mul]
49+
50+
lemma UpperHalfPlane.hasFDerivAt_smul (g : GL (Fin 2) ℝ) (τ : ℍ) :
51+
HasFDerivAt (fun z ↦ ↑(g • ofComplex z) : ℂ → ℂ) (smulFDeriv g τ) τ := by
52+
suffices HasFDerivAt (σ g ∘ (num g / denom g)) _ τ by
53+
refine this.congr_of_eventuallyEq ?_
54+
filter_upwards [isOpen_upperHalfPlaneSet.mem_nhds τ.property] with z hz
55+
simp_all [σ, coe_smul, ofComplex_apply_of_im_pos]
56+
unfold UpperHalfPlane.smulFDeriv
57+
apply HasFDerivAt.comp
58+
· convert ContinuousLinearMap.hasFDerivAt ..
59+
split_ifs with h <;>
60+
· ext
61+
simp [σ, h, -Matrix.GeneralLinearGroup.val_det_apply]
62+
· refine (HasDerivAt.hasFDerivAt ?_).restrictScalars ℝ
63+
convert HasDerivAt.div (c' := (g 0 0 : ℂ)) (d' := g 1 0) ?_ ?_ (denom_ne_zero g τ)
64+
· simp [num, denom, Matrix.det_fin_two]
65+
ring
66+
all_goals exact (hasDerivAt_const_mul _).add_const _
67+
68+
lemma UpperHalfPlane.analyticAt_smul {g : GL (Fin 2) ℝ} (hg : 0 < g.val.det) (τ : ℍ) :
2069
AnalyticAt ℂ (fun z ↦ ↑(g • ofComplex z) : ℂ → ℂ) τ := by
2170
refine DifferentiableOn.analyticAt ?_ (isOpen_upperHalfPlaneSet.mem_nhds τ.property)
2271
-- surely the following must be proved in mathlib somewhere?
@@ -26,7 +75,7 @@ private lemma UpperHalfPlane.analyticAt_smul {g : GL (Fin 2) ℝ} (hg : 0 < g.va
2675
unfold num denom
2776
exact .div (by fun_prop) (by fun_prop) fun _ hz ↦ denom_ne_zero_of_im g hz.ne'
2877

29-
private lemma UpperHalfPlane.deriv_smul {g : GL (Fin 2) ℝ} (hg : 0 < g.val.det) (τ : ℍ) :
78+
lemma UpperHalfPlane.deriv_smul {g : GL (Fin 2) ℝ} (hg : 0 < g.val.det) (τ : ℍ) :
3079
deriv (fun z ↦ ↑(g • ofComplex z) : ℂ → ℂ) τ = g.val.det / denom g τ ^ 2 := by
3180
have : (fun z ↦ ↑(g • ofComplex z)) =ᶠ[𝓝 ↑τ] (num g / denom g) := by
3281
filter_upwards [isOpen_upperHalfPlaneSet.mem_nhds τ.im_pos] with z hz
@@ -60,8 +109,7 @@ private lemma order_comp_smul {f : ℍ → ℂ} {τ : ℍ} {g : GL (Fin 2) ℝ}
60109
· exact τ.deriv_smul_ne_zero hg
61110

62111
open scoped ModularForm in
63-
private lemma order_slash {k : ℤ} {f : ℍ → ℂ} {τ : ℍ} {g : GL (Fin 2) ℝ}
64-
(hg : 0 < g.val.det) :
112+
private lemma order_slash {k : ℤ} {f : ℍ → ℂ} {τ : ℍ} {g : GL (Fin 2) ℝ} (hg : 0 < g.val.det) :
65113
meromorphicOrderAt (fun z : ℂ ↦ (f ∣[k] g) (ofComplex z)) ↑τ =
66114
meromorphicOrderAt (fun z ↦ f (ofComplex z)) ↑(g • τ) := by
67115
simp only [ModularForm.slash_def, σ, Matrix.GeneralLinearGroup.val_det_apply, hg, ↓reduceIte,

ModularFormDimensions/Measure.lean

Lines changed: 42 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import Mathlib.MeasureTheory.Measure.WithDensity
66
import Mathlib.MeasureTheory.Function.Jacobian
77
import Mathlib.Analysis.Calculus.FDeriv.RestrictScalars
88

9+
import ModularFormDimensions.Divisor
10+
911
open MeasureTheory
1012

1113
noncomputable section
@@ -21,11 +23,11 @@ lemma measurableEmbedding_coe : MeasurableEmbedding UpperHalfPlane.coe :=
2123

2224
/-- The invariant measure on the upper half-plane, defined by `dx dy / y ^ 2`. -/
2325
instance : MeasureSpace ℍ :=
24-
⟨(volume.comap UpperHalfPlane.coe).withDensity fun z ↦ (1 / ⟨z.im, z.im_pos.le⟩ : NNReal) ^ 2
26+
⟨(volume.comap UpperHalfPlane.coe).withDensity fun z ↦ ↑((1 / ⟨z.im, z.im_pos.le⟩ : NNReal) ^ 2)
2527

2628
/-- Express the volume of a measurable set as a lintegral over the corresponding subset of `ℂ`. -/
2729
lemma volume_eq_lintegral {s : Set ℍ} (hs : MeasurableSet s) :
28-
volume s = ∫⁻ z : ℂ in (↑) '' s, (1 / ‖z.im‖₊) ^ 2 := by
30+
volume s = ∫⁻ z : ℂ in (↑) '' s, ↑((1 / ‖z.im‖₊) ^ 2 : NNReal) := by
2931
simp only [volume, one_div]
3032
-- This proof is annoying because `setLIntegral_subtype` only works on a literal subtype,
3133
-- while `UpperHalfPlane` is a _type alias_ for a subtype, so we need to do some annoying
@@ -34,38 +36,55 @@ lemma volume_eq_lintegral {s : Set ℍ} (hs : MeasurableSet s) :
3436
← setLIntegral_subtype (by exact isOpen_upperHalfPlaneSet.measurableSet),
3537
withDensity_apply _ hs]
3638
congr 1 with z
37-
rw [ENNReal.coe_inv (mod_cast NNReal.coe_ne_zero.mp z.im_pos.ne')]
38-
congr
39+
congr 4
3940
rw [Real.norm_of_nonneg (by simpa using z.im_pos.le), ← z.coe_im,
4041
show UpperHalfPlane.coe = Subtype.val from rfl]
4142

43+
/-- The measure on the upper half-plane is invariant under `GL(2, ℝ)`. -/
4244
instance : SMulInvariantMeasure (GL (Fin 2) ℝ) ℍ volume := by
45+
-- It suffices to show `volume (g • s) = volume s` for measurable sets `s`. First
46+
-- we write this as a lintegral over subsets of `ℂ`.
4347
refine ((smulInvariantMeasure_tfae _ _).out 2 0).mp fun g s hs ↦ ?_
4448
rw [volume_eq_lintegral hs, volume_eq_lintegral (hs.const_smul _)]
45-
46-
have aux1a (x : ℂ) (hx : x ∈ UpperHalfPlane.coe '' s) :
47-
HasFDerivWithinAt (𝕜 := ℂ) (smulAux' g) (17) (UpperHalfPlane.coe '' s) x := by
48-
sorry
49-
50-
have aux1b (x : ℂ) (hx : x ∈ UpperHalfPlane.coe '' s) :
51-
HasFDerivWithinAt (𝕜 := ℝ) (smulAux' g) (
52-
ContinuousLinearMap.restrictScalars ℝ (17 : ℂ →L[ℂ] ℂ)) (UpperHalfPlane.coe '' s) x :=
53-
(aux1a x hx).restrictScalars ℝ
54-
49+
-- We want to apply the Jacobian change-of-variable formula, so first
50+
-- we establish the hypotheses.
51+
have aux1 (x : ℂ) (hx : x ∈ UpperHalfPlane.coe '' s) :
52+
HasFDerivWithinAt (𝕜 := ℝ) (smulAux' g) (smulFDeriv g x) (UpperHalfPlane.coe '' s) x := by
53+
apply HasFDerivAt.hasFDerivWithinAt
54+
rcases hx with ⟨τ, hτ, rfl⟩
55+
apply (UpperHalfPlane.hasFDerivAt_smul g τ).congr_of_eventuallyEq
56+
filter_upwards [isOpen_upperHalfPlaneSet.mem_nhds τ.property] with z hz
57+
simp_all [σ, coe_smul, ofComplex_apply_of_im_pos, smulAux']
5558
have aux2 : ((↑) '' s).InjOn (smulAux' g) := by
5659
rintro _ ⟨x, hx, rfl⟩ _ ⟨y, hy, rfl⟩
5760
rw [← UpperHalfPlane.ext_iff]
5861
change (↑(g • x) : ℂ) = ↑(g • y) → x = y
5962
simp only [ext_iff', smul_left_cancel_iff, imp_self]
60-
61-
convert MeasureTheory.lintegral_image_eq_lintegral_abs_det_fderiv_mul
62-
volume (measurableEmbedding_coe.measurableSet_image.mpr hs)
63-
(fun a ha ↦ (aux1a a ha).restrictScalars ℝ) aux2
64-
(fun z ↦ (1 / ‖z.im‖₊) ^ 2)
65-
· have : smulAux' g ∘ ((↑) : ℍ → ℂ) = (↑) ∘ (fun x ↦ g • x) := by rfl
66-
rw [← Set.image_comp, this, Set.image_comp, Set.image_smul]
67-
· sorry
68-
63+
-- Now invoke the change-of-variable formula.
64+
have main := MeasureTheory.lintegral_image_eq_lintegral_abs_det_fderiv_mul
65+
volume (measurableEmbedding_coe.measurableSet_image.mpr hs) aux1 aux2
66+
(fun z ↦ ↑((1 / ‖z.im‖₊) ^ 2 : NNReal))
67+
-- Adjust the LHS of the resulting statement slightly to match our goal.
68+
have aux3 : smulAux' g ∘ ((↑) : ℍ → ℂ) = (↑) ∘ (fun x ↦ g • x) := by rfl
69+
rw [← Set.image_comp, aux3, Set.image_comp, Set.image_smul] at main
70+
rw [main]
71+
-- Now it remains to compare two integrals over `coe '' s`.
72+
apply setLIntegral_congr_fun (measurableEmbedding_coe.measurableSet_image.mpr hs)
73+
rintro _ ⟨τ, hτ, rfl⟩
74+
simp only [det_smulFDeriv, abs_div, abs_mul, abs_pow, abs_pow, sq_abs,
75+
(show Even 4 by grind).pow_abs]
76+
have : |(SignType.sign g.det.val : ℝ)| = 1 := by
77+
rcases lt_or_gt_of_ne (NeZero.ne g.det.val) with h | h <;>
78+
simp [-Matrix.GeneralLinearGroup.val_det_apply, h]
79+
rw [this, one_mul, ENNReal.ofReal_eq_coe_nnreal (by positivity), ← ENNReal.coe_mul,
80+
ENNReal.coe_inj, NNReal.eq_iff]
81+
push_cast
82+
rw [div_pow, one_pow, mul_one_div, show 4 = 2 * 2 by rfl, pow_mul, ← div_pow, ← div_pow]
83+
simp only [sq_eq_sq_iff_abs_eq_abs, abs_div, abs_pow, abs_one, abs_norm,
84+
show smulAux' g τ = ↑(g • τ) by rfl, coe_im, im_smul_eq_div_normSq, Complex.normSq_eq_norm_sq]
85+
simp only [norm_div, norm_pow, norm_mul, norm_abs_eq_norm, Real.norm_eq_abs, abs_norm]
86+
rw [div_div_div_cancel_right₀ (by simpa using denom_ne_zero g τ),
87+
← div_div, div_self (by aesop)]
6988

7089
end UpperHalfPlane
7190

0 commit comments

Comments
 (0)