The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V12. Number theory

Mathlib.NumberTheory.Modular

54 declarations. Mathlib docs · Source

The action of the modular group SL(2, ℤ) on the upper half-plane

We define the action of SL(2,ℤ) on ℍ (via restriction of the SL(2,ℝ) action in Analysis.Complex.UpperHalfPlane). We then define the standard fundamental domain (ModularGroup.fd, 𝒟) for this action and show (ModularGroup.exists_smul_mem_fd) that any point in ℍ can be moved inside 𝒟.

Main definitions

The standard (closed) fundamental domain of the action of SL(2,ℤ) on ℍ, denoted 𝒟: fd := {z | 1 ≤ (z : ℂ).normSq ∧ |z.re| ≤ (1 : ℝ) / 2}

The standard open fundamental domain of the action of SL(2,ℤ) on ℍ, denoted 𝒟ᵒ: fdo := {z | 1 < (z : ℂ).normSq ∧ |z.re| < (1 : ℝ) / 2}

These notations are localized in the Modular scope and can be enabled via open scoped Modular.

Main results

  • ModularGroup.exists_smul_mem_fd: Any z : ℍ can be moved to 𝒟 by an element of SL(2,ℤ).
  • ModularGroup.eq_one_or_neg_one_of_mem_fdo_mem_fd: The open fundamental domain 𝒟ᵒ is disjoint from g • 𝒟 for any g ≠ ±1.
  • ModularGroup.eq_smul_self_of_mem_fdo_mem_fdo: If both z and γ • z are in the open domain 𝒟ᵒ then z = γ • z.
  • ModularGroup.fdo_eq_interior_fd and ModularGroup.fd_eq_closure_fdo: topological relations between fd and fdo.

Discussion

Standard proofs make use of the identity

g • z = a / c - 1 / (c (cz + d))

for g = [[a, b], [c, d]] in SL(2), but this requires separate handling of whether c = 0. Instead, our proof makes use of the following perhaps novel identity (see ModularGroup.smul_eq_lcRow0_add):

g • z = (a c + b d) / (c^2 + d^2) + (d z - c) / ((c^2 + d^2) (c z + d))

where there is no issue of division by zero.

Another feature is that we delay until the very end the consideration of special matrices T=[[1,1],[0,1]] (see ModularGroup.T) and S=[[0,-1],[1,0]] (see ModularGroup.S), by instead using abstract theory on the properness of certain maps (phrased in terms of the filters Filter.cocompact, Filter.cofinite, etc) to deduce existence theorems, first to prove the existence of g maximizing (g•z).im (see ModularGroup.exists_max_im), and then among those, to minimize |(g•z).re| (see ModularGroup.exists_row_one_eq_and_min_re).

The characterization of cases with z ∈ 𝒟 and g • z ∈ 𝒟 follows Theorem VII.1 [serre1973].

Topological properties of the fundamental domain

theorem ModularGroup.lcRow0Extend.congr_simp E1 #

∀ {cd cd_1 : Fin 2 → ℤ} (e_cd : cd = cd_1) (hcd : IsCoprime (cd 0) (cd 1)),
  ModularGroup.lcRow0Extend hcd = ModularGroup.lcRow0Extend ⋯

theorem ModularGroup.bottom_row_coprime E1 #

∀ {R : Type u_1} [inst : CommRing R] (g : Matrix.SpecialLinearGroup (Fin 2) R), IsCoprime (↑g 1 0) (↑g 1 1)

The two numbers c, d in the "bottom row" of g=[[*,*],[c,d]] in SL(2, ℤ) are coprime.

theorem ModularGroup.bottom_row_surj E1 #

∀ {R : Type u_1} [inst : CommRing R], Set.SurjOn (fun g ↦ ↑g 1) Set.univ {cd | IsCoprime (cd 0) (cd 1)}

Every pair ![c, d] of coprime integers is the "bottom row" of some element g=[[*,*],[c,d]] of SL(2,ℤ).

theorem ModularGroup.tendsto_normSq_coprime_pair E1 #

∀ (z : UpperHalfPlane), Filter.Tendsto (fun p ↦ Complex.normSq (↑(p 0) * ↑z + ↑(p 1))) Filter.cofinite Filter.atTop

The function (c,d) → |cz+d|^2 is proper, that is, preimages of bounded-above sets are finite.

def ModularGroup.lcRow0 E1 #

(Fin 2 → ℤ) → Matrix (Fin 2) (Fin 2) ℝ →ₗ[ℝ] ℝ

Given coprime_pair p=(c,d), the matrix [[a,b],[*,*]] is sent to a*c+b*d. This is the linear map version of this operation.

theorem ModularGroup.lcRow0_apply E0 #

∀ (p : Fin 2 → ℤ) (g : Matrix (Fin 2) (Fin 2) ℝ), (ModularGroup.lcRow0 p) g = ↑(p 0) * g 0 0 + ↑(p 1) * g 0 1

def ModularGroup.lcRow0Extend E1 #

{cd : Fin 2 → ℤ} → IsCoprime (cd 0) (cd 1) → Matrix (Fin 2) (Fin 2) ℝ ≃ₗ[ℝ] Matrix (Fin 2) (Fin 2) ℝ

Linear map sending the matrix [a, b; c, d] to the matrix [ac₀ + bd₀, - ad₀ + bc₀; c, d], for some fixed (c₀, d₀).

theorem ModularGroup.lcRow0Extend_symm_apply E0 #

∀ {cd : Fin 2 → ℤ} (hcd : IsCoprime (cd 0) (cd 1)) (f : (i : Fin 2) → (fun a ↦ Fin 2 → ℝ) i) (i a : Fin 2),
  (ModularGroup.lcRow0Extend hcd).symm f i a =
    (![(LinearMap.GeneralLinearGroup.generalLinearEquiv ℝ (Fin 2 → ℝ))
              (Matrix.GeneralLinearGroup.toLin (Matrix.planeConformalMatrix (↑(cd 0)) (-↑(cd 1)) ⋯)),
            LinearEquiv.refl ℝ (Fin 2 → ℝ)]
          i).symm
      (f i) a

theorem ModularGroup.lcRow0Extend_apply E0 #

∀ {cd : Fin 2 → ℤ} (hcd : IsCoprime (cd 0) (cd 1)) (f : (i : Fin 2) → (fun a ↦ Fin 2 → ℝ) i) (i a : Fin 2),
  (ModularGroup.lcRow0Extend hcd) f i a =
    (![(LinearMap.GeneralLinearGroup.generalLinearEquiv ℝ (Fin 2 → ℝ))
            (Matrix.GeneralLinearGroup.toLin (Matrix.planeConformalMatrix (↑(cd 0)) (-↑(cd 1)) ⋯)),
          LinearEquiv.refl ℝ (Fin 2 → ℝ)]
        i)
      (f i) a

theorem ModularGroup.tendsto_lcRow0 E1 #

∀ {cd : Fin 2 → ℤ},
  IsCoprime (cd 0) (cd 1) →
    Filter.Tendsto (fun g ↦ (ModularGroup.lcRow0 cd) ↑((Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ)) ↑g))
      Filter.cofinite (Filter.cocompact ℝ)

The map lcRow0 is proper, that is, preimages of cocompact sets are finite in [[* , *], [c, d]].

theorem ModularGroup.smul_eq_lcRow0_add E1 #

∀ {g : Matrix.SpecialLinearGroup (Fin 2) ℤ} (z : UpperHalfPlane) {p : Fin 2 → ℤ},
  IsCoprime (p 0) (p 1) →
    ↑g 1 = p →
      ↑(g • z) =
        ↑((ModularGroup.lcRow0 p) ↑((Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ)) g)) /
            (↑(p 0) ^ 2 + ↑(p 1) ^ 2) +
          (↑(p 1) * ↑z - ↑(p 0)) / ((↑(p 0) ^ 2 + ↑(p 1) ^ 2) * (↑(p 0) * ↑z + ↑(p 1)))

This replaces (g•z).re = a/c + * in the standard theory with the following novel identity: g • z = (a c + b d) / (c^2 + d^2) + (d z - c) / ((c^2 + d^2) (c z + d)) which does not need to be decomposed depending on whether c = 0.

theorem ModularGroup.tendsto_abs_re_smul E1 #

∀ (z : UpperHalfPlane) {p : Fin 2 → ℤ},
  IsCoprime (p 0) (p 1) → Filter.Tendsto (fun g ↦ |(↑g • z).re|) Filter.cofinite Filter.atTop

theorem ModularGroup.exists_max_im E1 #

∀ (z : UpperHalfPlane), ∃ g, ∀ (g' : Matrix.SpecialLinearGroup (Fin 2) ℤ), (g' • z).im ≤ (g • z).im

For z : ℍ, there is a g : SL(2,ℤ) maximizing (g•z).im

theorem ModularGroup.exists_row_one_eq_and_min_re E1 #

∀ (z : UpperHalfPlane) {cd : Fin 2 → ℤ},
  IsCoprime (cd 0) (cd 1) →
    ∃ g, ↑g 1 = cd ∧ ∀ (g' : Matrix.SpecialLinearGroup (Fin 2) ℤ), ↑g 1 = ↑g' 1 → |(g • z).re| ≤ |(g' • z).re|

Given z : ℍ and a bottom row (c,d), among the g : SL(2,ℤ) with this bottom row, minimize |(g•z).re|.

theorem ModularGroup.coe_T_zpow_smul_eq E0 #

∀ (z : UpperHalfPlane) {n : ℤ}, ↑(ModularGroup.T ^ n • z) = ↑z + ↑n

theorem ModularGroup.re_T_zpow_smul E1 #

∀ (z : UpperHalfPlane) (n : ℤ), (ModularGroup.T ^ n • z).re = z.re + ↑n

theorem ModularGroup.im_T_zpow_smul E1 #

∀ (z : UpperHalfPlane) (n : ℤ), (ModularGroup.T ^ n • z).im = z.im

theorem ModularGroup.re_T_smul E1 #

∀ (z : UpperHalfPlane), (ModularGroup.T • z).re = z.re + 1

theorem ModularGroup.im_T_smul E1 #

∀ (z : UpperHalfPlane), (ModularGroup.T • z).im = z.im

theorem ModularGroup.re_T_inv_smul E1 #

∀ (z : UpperHalfPlane), (ModularGroup.T⁻¹ • z).re = z.re - 1

theorem ModularGroup.im_T_inv_smul E1 #

∀ (z : UpperHalfPlane), (ModularGroup.T⁻¹ • z).im = z.im

theorem ModularGroup.exists_eq_T_zpow_of_c_eq_zero E1 #

∀ {g : Matrix.SpecialLinearGroup (Fin 2) ℤ}, ↑g 1 0 = 0 → ∃ n, ∀ (z : UpperHalfPlane), g • z = ModularGroup.T ^ n • z

theorem ModularGroup.g_eq_of_c_eq_one E1 #

∀ {g : Matrix.SpecialLinearGroup (Fin 2) ℤ},
  ↑g 1 0 = 1 → g = ModularGroup.T ^ ↑g 0 0 * ModularGroup.S * ModularGroup.T ^ ↑g 1 1

theorem ModularGroup.normSq_S_smul_lt_one E1 #

∀ {z : UpperHalfPlane}, 1 < Complex.normSq ↑z → Complex.normSq ↑(ModularGroup.S • z) < 1

If 1 < |z|, then |S • z| < 1.

theorem ModularGroup.im_lt_im_S_smul E1 #

∀ {z : UpperHalfPlane}, Complex.normSq ↑z < 1 → z.im < (ModularGroup.S • z).im

If |z| < 1, then applying S strictly decreases im.

def ModularGroup.fd E3 #

Set UpperHalfPlane

The standard (closed) fundamental domain of the action of SL(2,ℤ) on ℍ.

def ModularGroup.fdo E3 #

Set UpperHalfPlane

The standard open fundamental domain of the action of SL(2,ℤ) on ℍ.

def Modular.term𝒟 E1 #

Lean.ParserDescr

The standard (closed) fundamental domain of the action of SL(2,ℤ) on ℍ.

def Modular.«term𝒟ᵒ» E1 #

Lean.ParserDescr

The standard open fundamental domain of the action of SL(2,ℤ) on ℍ.

theorem ModularGroup.fdo_subset_fd E1 #

ModularGroup.fdo ⊆ ModularGroup.fd

theorem ModularGroup.ρ_mem_fd E1 #

UpperHalfPlane.ρ ∈ ModularGroup.fd

theorem ModularGroup.I_mem_fd E1 #

UpperHalfPlane.I ∈ ModularGroup.fd

theorem ModularGroup.abs_two_mul_re_lt_one_of_mem_fdo E1 #

∀ {z : UpperHalfPlane}, z ∈ ModularGroup.fdo → |2 * z.re| < 1

theorem ModularGroup.three_lt_four_mul_im_sq_of_mem_fdo E1 #

∀ {z : UpperHalfPlane}, z ∈ ModularGroup.fdo → 3 < 4 * z.im ^ 2

theorem ModularGroup.three_le_four_mul_im_sq_of_mem_fd E1 #

∀ {τ : UpperHalfPlane}, τ ∈ ModularGroup.fd → 3 ≤ 4 * τ.im ^ 2

non-strict variant of ModularGroup.three_le_four_mul_im_sq_of_mem_fdo

theorem ModularGroup.one_lt_normSq_T_zpow_smul E1 #

∀ {z : UpperHalfPlane}, z ∈ ModularGroup.fdo → ∀ (n : ℤ), 1 < Complex.normSq ↑(ModularGroup.T ^ n • z)

If z ∈ 𝒟ᵒ, and n : ℤ, then |z + n| > 1.

theorem ModularGroup.exists_smul_mem_fd E3 #

∀ (z : UpperHalfPlane), ∃ g, g • z ∈ ModularGroup.fd

First Fundamental Domain Lemma: Any z : ℍ can be moved to 𝒟 by an element of SL(2,ℤ)

theorem ModularGroup.abs_c_le_one E1 #

∀ {g : Matrix.SpecialLinearGroup (Fin 2) ℤ} {z : UpperHalfPlane},
  z ∈ ModularGroup.fd → g • z ∈ ModularGroup.fd → |↑g 1 0| ≤ 1

An auxiliary result en route to ModularGroup.c_eq_zero and cases_of_mem_fd_smul_mem_fd.

theorem ModularGroup.cases_of_mem_fd_smul_mem_fd E1 #

∀ {g : Matrix.SpecialLinearGroup (Fin 2) ℤ} {z : UpperHalfPlane},
  z ∈ ModularGroup.fd →
    g • z ∈ ModularGroup.fd →
      (g = 1 ∨ g = -1) ∨
        (g = ModularGroup.T ∨ g = -ModularGroup.T) ∧ z.re = -1 / 2 ∨
          (g = ModularGroup.T⁻¹ ∨ g = -ModularGroup.T⁻¹) ∧ z.re = 1 / 2 ∨
            (g = ModularGroup.S ∨ g = -ModularGroup.S) ∧ ‖↑z‖ = 1 ∨
              (g = ModularGroup.T * ModularGroup.S ∨ g = -(ModularGroup.T * ModularGroup.S)) ∧
                  z = 1 +ᵥ UpperHalfPlane.ρ ∨
                (g = ModularGroup.T⁻¹ * ModularGroup.S * ModularGroup.T⁻¹ ∨
                      g = -(ModularGroup.T⁻¹ * ModularGroup.S * ModularGroup.T⁻¹)) ∧
                    z = 1 +ᵥ UpperHalfPlane.ρ ∨
                  (g = ModularGroup.S * ModularGroup.T⁻¹ ∨ g = -(ModularGroup.S * ModularGroup.T⁻¹)) ∧
                      z = 1 +ᵥ UpperHalfPlane.ρ ∨
                    (g = ModularGroup.S * ModularGroup.T ∨ g = -(ModularGroup.S * ModularGroup.T)) ∧
                        z = UpperHalfPlane.ρ ∨
                      (g = ModularGroup.T * ModularGroup.S * ModularGroup.T ∨
                            g = -(ModularGroup.T * ModularGroup.S * ModularGroup.T)) ∧
                          z = UpperHalfPlane.ρ ∨
                        (g = ModularGroup.T⁻¹ * ModularGroup.S ∨ g = -(ModularGroup.T⁻¹ * ModularGroup.S)) ∧
                          z = UpperHalfPlane.ρ

Classify the z and g with z ∈ 𝒟 and g • z ∈ 𝒟.

theorem ModularGroup.stabilizer_of_ne E1 #

∀ {g : Matrix.SpecialLinearGroup (Fin 2) ℤ} {z : UpperHalfPlane},
  z ∈ ModularGroup.fd →
    g • z = z → z ≠ UpperHalfPlane.I → z ≠ UpperHalfPlane.ρ → z ≠ 1 +ᵥ UpperHalfPlane.ρ → g = 1 ∨ g = -1

If z ∈ 𝒟 and z ≠ I, ρ, 1 + ρ, then the stabilizer of z in SL(2, ℤ) is ± 1.

theorem ModularGroup.stabilizer_I E1 #

∀ {g : Matrix.SpecialLinearGroup (Fin 2) ℤ},
  g • UpperHalfPlane.I = UpperHalfPlane.I ↔ g ∈ {1, -1, ModularGroup.S, -ModularGroup.S}

theorem ModularGroup.stabilizer_ρ E1 #

∀ {g : Matrix.SpecialLinearGroup (Fin 2) ℤ},
  g • UpperHalfPlane.ρ = UpperHalfPlane.ρ ↔
    g ∈
      {1, -1, ModularGroup.S * ModularGroup.T, -(ModularGroup.S * ModularGroup.T), ModularGroup.T⁻¹ * ModularGroup.S,
        -(ModularGroup.T⁻¹ * ModularGroup.S)}

theorem ModularGroup.isClosed_fd E1 #

IsClosed ModularGroup.fd

theorem ModularGroup.isOpen_fdo E1 #

IsOpen ModularGroup.fdo

theorem ModularGroup.coe_fdo E0 #

UpperHalfPlane.coe '' ModularGroup.fdo = {z | 0 < z.im ∧ 1 < ‖z‖ ∧ |z.re| < 1 / 2}

Explicit formula for the image of ModularGroup.fdo in ℂ.

theorem ModularGroup.coe_fd E0 #

UpperHalfPlane.coe '' ModularGroup.fd = {z | 0 < z.im ∧ 1 ≤ ‖z‖ ∧ |z.re| ≤ 1 / 2}

Explicit formula for the image of ModularGroup.fd in ℂ.

theorem ModularGroup.isClosed_coe_fd E1 #

IsClosed (UpperHalfPlane.coe '' ModularGroup.fd)

The image of the fundamental domain 𝒟 in ℂ is closed. This is not immediate (unlike the analogous statement for 𝒟ᵒ), since the inclusion of ℍ in ℂ is an open but not a closed map.

theorem ModularGroup.fd_eq_closure_fdo E3 #

ModularGroup.fd = closure ModularGroup.fdo

theorem ModularGroup.fdo_eq_interior_fd E3 #

ModularGroup.fdo = interior ModularGroup.fd

def ModularGroup.truncatedFundamentalDomain E1 #

ℝ → Set UpperHalfPlane

The standard fundamental domain truncated at height y.

theorem ModularGroup.coe_truncatedFundamentalDomain E0 #

∀ (y : ℝ),
  UpperHalfPlane.coe '' ModularGroup.truncatedFundamentalDomain y = {z | 0 ≤ z.im ∧ z.im ≤ y ∧ |z.re| ≤ 1 / 2 ∧ 1 ≤ ‖z‖}

Explicit description of the truncated fundamental domain as a subset of ℂ, given by obviously closed conditions.

theorem ModularGroup.isCompact_truncatedFundamentalDomain E1 #

∀ (y : ℝ), IsCompact (ModularGroup.truncatedFundamentalDomain y)

For any y : ℝ, the standard fundamental domain truncated at height y is compact.

theorem ModularGroup.exists_one_half_le_im_smul E1 #

∀ (τ : UpperHalfPlane), ∃ γ, 1 / 2 ≤ (γ • τ).im

theorem ModularGroup.exists_one_half_le_im_smul_and_norm_denom_le E1 #

∀ (τ : UpperHalfPlane),
  ∃ γ,
    1 / 2 ≤ (γ • τ).im ∧
      ‖UpperHalfPlane.denom (Matrix.SpecialLinearGroup.toGL ((Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ)) γ))
            ↑τ‖ ≤
        1

For every τ : ℍ there is some γ ∈ SL(2, ℤ) that sends it to an element whose imaginary part is at least 1/2 and such that denom γ τ has norm at most 1.