Fermat's Last Theorem in Lean 4

← all definition modules

Definitions/Def_AutomorphicForm_FundamentalDomainVolume.lean

definition module

Finite positive hyperbolic volume of the modular fundamental domain

Working with the hyperbolic measure on the upper half-plane \mathbb{H} (the measure whose integral against a set is \int (1/|\operatorname{Im} w|)^2 over the image of the set in \mathbb{C}), this module establishes that the standard fundamental domain \mathcal{D} for \mathrm{SL}_2(\mathbb{Z}) has volume neither zero nor infinite. The combinatorial device is band A a n, the set of z \in \mathbb{H} with |\operatorname{Re} z| \le A and a\,2^n \le \operatorname{Im} z \le a\,2^{n+1}; verticalStrip_subset_iUnion_band shows that for a > 0 the vertical strip \{|\operatorname{Re} z| \le A,\ a \le \operatorname{Im} z\} is covered by the countably many bands. Auxiliary declarations introduce the closed coordinate box cbox relo rehi imlo imhi in \mathbb{C}, with its membership criterion and its Lebesgue volume (\mathrm{rehi}-\mathrm{relo})(\mathrm{imhi}-\mathrm{imlo}). Bounding the density 1/(\operatorname{Im} w)^2 by (a\,2^n)^{-2} on such a box gives volume_band_le: for 0 \le A and 0 < a, the volume of band A a n is at most 2A a^{-1} 2^{-n}. Summing the geometric series yields volume_verticalStrip_lt_top: every vertical strip with a>0 has finite volume (the case A<0 being vacuous). Since every point of \mathcal{D} has |\operatorname{Re} z| \le 1/2 and 4(\operatorname{Im} z)^2 \ge 3, one gets \mathcal{D} \subseteq the strip with A = a = 1/2, hence volume_fd_lt_top. Finiteness persists for any finite union \bigcup_{\gamma \in S} \gamma \cdot \mathcal{D} over a finite set S \subseteq \mathrm{SL}_2(\mathbb{Z}), by invariance of the measure. Positivity comes from exhibiting the point 2i in the open domain \mathcal{D}^{\mathrm{o}} (where |z|^2 > 1 and |\operatorname{Re} z| < 1/2) together with positivity of the measure on nonempty open sets; volume_fd_lt_volume_univ and volume_fd_ne_zero_ne_top record the resulting comparisons, the former using that \mathbb{H} itself has infinite volume.

Relation to Mathlib

The measure space structure on \mathbb{H}, the fundamental domain π’Ÿ and its interior π’Ÿα΅’, the vertical strips and the inequality 3 \le 4(\operatorname{Im} z)^2 on π’Ÿ are Mathlib's; the band decomposition, the explicit volume bound for a band, and the resulting finiteness and positivity statements for the covolume are the project's own, resting on the invariance and open-positivity results of FLT.HyperbolicMeasure.

Where it is used

These volume estimates provide the measure-theoretic foundation for the analytic theory of automorphic forms on \mathbb{H} in this development: finiteness and positivity of the covolume of \mathrm{SL}_2(\mathbb{Z}) is what makes L^2 spaces on the quotient and the associated spectral decomposition available.

References

  1. G. Shimura, Introduction to the Arithmetic Theory of Automorphic Functions, Publications of the Mathematical Society of Japan 11, Princeton University Press, 1971
  2. H. Iwaniec, Spectral Methods of Automorphic Forms, Graduate Studies in Mathematics 53, American Mathematical Society, 2002

References are suggested automatically and have not been individually verified.

English text generated automatically from the Lean source; the Lean statement is authoritative.

Source file: Definitions/Def_AutomorphicForm_FundamentalDomainVolume.lean

Imports

Imported by

Declarations

Source

import Mathlib
import Definitions.Def_AutomorphicForm_HyperbolicMeasure

open MeasureTheory Set ModularGroup UpperHalfPlane
open scoped MatrixGroups Modular Pointwise NNReal ENNReal

noncomputable section

namespace FLT.FundamentalDomainVolume

def band (A a : ℝ) (n : β„•) : Set ℍ :=
  {z : ℍ | |z.re| ≀ A ∧ a * 2 ^ n ≀ z.im ∧ z.im ≀ a * 2 ^ (n + 1)}

theorem verticalStrip_subset_iUnion_band (A : ℝ) {a : ℝ} (ha : 0 < a) :
    UpperHalfPlane.verticalStrip A a βŠ† ⋃ n : β„•, band A a n := by
  rintro z ⟨hre, him⟩

  have hex : βˆƒ n : β„•, z.im ≀ a * 2 ^ (n + 1) := by
    obtain ⟨n, hn⟩ := pow_unbounded_of_one_lt (z.im / a) (one_lt_two (Ξ± := ℝ))
    exact ⟨n, by
      rw [div_lt_iffβ‚€ ha] at hn
      nlinarith [pow_pos (zero_lt_two (Ξ± := ℝ)) n, pow_succ (2 : ℝ) n]⟩
  classical

  refine Set.mem_iUnion.mpr ⟨Nat.find hex, ?_, ?_, Nat.find_spec hex⟩
  Β· exact hre

  rcases Nat.eq_zero_or_eq_succ_pred (Nat.find hex) with h0 | hsucc
  Β· rw [h0]; simpa using him
  Β· rw [hsucc]
    have hlt := Nat.find_min hex (m := Nat.find hex - 1) (by omega)
    rw [not_le] at hlt
    exact le_of_lt hlt

private def cbox (relo rehi imlo imhi : ℝ) : Set β„‚ :=
  Complex.measurableEquivRealProd ⁻¹' (Set.Icc relo rehi Γ—Λ’ Set.Icc imlo imhi)

private lemma mem_cbox {relo rehi imlo imhi : ℝ} {w : β„‚} :
    w ∈ cbox relo rehi imlo imhi ↔
      (relo ≀ w.re ∧ w.re ≀ rehi) ∧ imlo ≀ w.im ∧ w.im ≀ imhi := by
  simp only [cbox, Set.mem_preimage, Complex.measurableEquivRealProd_apply, Set.mem_prod,
    Set.mem_Icc]

private lemma volume_cbox (relo rehi imlo imhi : ℝ) :
    volume (cbox relo rehi imlo imhi) =
      ENNReal.ofReal (rehi - relo) * ENNReal.ofReal (imhi - imlo) := by
  rw [cbox, Complex.volume_preserving_equiv_real_prod.measure_preimage
    ((measurableSet_Icc.prod measurableSet_Icc).nullMeasurableSet)]
  rw [show (volume : Measure (ℝ Γ— ℝ)) = (volume : Measure ℝ).prod volume from rfl,
    Measure.prod_prod, Real.volume_Icc, Real.volume_Icc]

theorem volume_band_le {A a : ℝ} (hA : 0 ≀ A) (ha : 0 < a) (n : β„•) :
    volume (band A a n) ≀ ENNReal.ofReal (2 * A * (a⁻¹ * (1 / 2) ^ n)) := by
  have h2n : (0 : ℝ) < a * 2 ^ n := by positivity

  rw [UpperHalfPlane.volume_eq_lintegral]

  have himg : (UpperHalfPlane.coe '' band A a n) βŠ†
      cbox (-A) A (a * 2 ^ n) (a * 2 ^ (n + 1)) := by
    rintro w ⟨z, ⟨hre, him₁, himβ‚‚βŸ©, rfl⟩
    rw [mem_cbox, UpperHalfPlane.coe_re, UpperHalfPlane.coe_im]
    exact ⟨abs_le.mp hre, him₁, himβ‚‚βŸ©
  refine le_trans (lintegral_mono_set himg) ?_

  have hbound : βˆ€ w ∈ cbox (-A) A (a * 2 ^ n) (a * 2 ^ (n + 1)),
      (((1 / β€–w.imβ€–β‚Š) ^ 2 : ℝβ‰₯0) : ℝβ‰₯0∞) ≀ ENNReal.ofReal ((a * 2 ^ n)⁻¹ ^ 2) := by
    intro w hw
    obtain ⟨-, him₁, -⟩ := mem_cbox.mp hw
    have hwim : (0 : ℝ) < w.im := lt_of_lt_of_le h2n him₁
    rw [← ENNReal.ofReal_coe_nnreal]
    refine ENNReal.ofReal_le_ofReal ?_
    push_cast
    rw [Real.norm_eq_abs, abs_of_pos hwim]
    have : (a * 2 ^ n)⁻¹ ^ 2 = (1 / (a * 2 ^ n)) ^ 2 := by rw [one_div]
    rw [this]
    gcongr
  refine le_trans (setLIntegral_mono measurable_const hbound) ?_

  rw [setLIntegral_const, volume_cbox]
  have harith₁ : A - -A = 2 * A := by ring
  have harithβ‚‚ : a * 2 ^ (n + 1) - a * 2 ^ n = a * 2 ^ n := by ring
  rw [harith₁, harithβ‚‚, ← ENNReal.ofReal_mul (by positivity),
    ← ENNReal.ofReal_mul (by positivity)]
  refine ENNReal.ofReal_le_ofReal (le_of_eq ?_)
  rw [show (a * 2 ^ n)⁻¹ ^ 2 * (2 * A * (a * 2 ^ n)) =
        2 * A * ((a * 2 ^ n)⁻¹ ^ 2 * (a * 2 ^ n)) by ring,
    pow_two, mul_assoc ((a * 2 ^ n)⁻¹), inv_mul_cancelβ‚€ h2n.ne', mul_one, mul_inv,
    ← inv_pow]
  norm_num

theorem volume_verticalStrip_lt_top (A : ℝ) {a : ℝ} (ha : 0 < a) :
    volume (UpperHalfPlane.verticalStrip A a) < ⊀ := by

  rcases le_or_gt 0 A with hA | hA
  swap
  Β· have hempty : UpperHalfPlane.verticalStrip A a = βˆ… := by
      ext z
      simp only [Set.mem_empty_iff_false, iff_false]
      intro hz
      exact absurd hz.1 (not_le.mpr (lt_of_lt_of_le hA (abs_nonneg _)))
    rw [hempty]
    simp
  calc volume (UpperHalfPlane.verticalStrip A a)
      ≀ volume (⋃ n : β„•, band A a n) :=
        measure_mono (verticalStrip_subset_iUnion_band A ha)
    _ ≀ βˆ‘' n : β„•, volume (band A a n) := measure_iUnion_le _
    _ ≀ βˆ‘' n : β„•, ENNReal.ofReal (2 * A * (a⁻¹ * (1 / 2) ^ n)) :=
        ENNReal.tsum_le_tsum fun n => volume_band_le hA ha n
    _ = βˆ‘' n : β„•, ENNReal.ofReal (2 * A * a⁻¹) * ENNReal.ofReal ((1 / 2) ^ n) :=
        tsum_congr fun n => by
          rw [← ENNReal.ofReal_mul (by positivity)]
          congr 1
          ring
    _ = ENNReal.ofReal (2 * A * a⁻¹) * βˆ‘' n : β„•, ENNReal.ofReal ((1 / 2) ^ n) :=
        ENNReal.tsum_mul_left
    _ = ENNReal.ofReal (2 * A * a⁻¹) * βˆ‘' n : β„•, ENNReal.ofReal (1 / 2) ^ n :=
        congrArg _ (tsum_congr fun n => ENNReal.ofReal_pow (by norm_num) n)
    _ = ENNReal.ofReal (2 * A * a⁻¹) * (1 - ENNReal.ofReal (1 / 2))⁻¹ := by
        rw [ENNReal.tsum_geometric]
    _ < ⊀ := by
        refine ENNReal.mul_lt_top ENNReal.ofReal_lt_top ?_
        rw [ENNReal.inv_lt_top, tsub_pos_iff_lt]
        exact ENNReal.ofReal_lt_one.mpr (by norm_num)

theorem fd_subset_verticalStrip : π’Ÿ βŠ† UpperHalfPlane.verticalStrip (1 / 2) (1 / 2) := by
  intro z hz
  refine ⟨hz.2, ?_⟩
  have h3 := ModularGroup.three_le_four_mul_im_sq_of_mem_fd hz
  nlinarith [z.im_pos]

theorem volume_fd_lt_top : volume π’Ÿ < ⊀ :=
  lt_of_le_of_lt (measure_mono fd_subset_verticalStrip)
    (volume_verticalStrip_lt_top (1 / 2) (by norm_num))

theorem volume_biUnion_smul_fd_lt_top (S : Finset SL(2, β„€)) :
    volume (⋃ Ξ³ ∈ S, Ξ³ β€’ π’Ÿ) < ⊀ := by
  refine lt_of_le_of_lt (measure_biUnion_finset_le S _) ?_
  rw [ENNReal.sum_lt_top]
  intro Ξ³ _
  rw [FLT.HyperbolicMeasure.volume_smul_sl2z]
  exact volume_fd_lt_top

private def fdoWitness : ℍ := UpperHalfPlane.mk ⟨0, 2⟩ (by norm_num)

private lemma fdoWitness_mem_fdo : fdoWitness ∈ π’Ÿα΅’ := by
  constructor
  Β· show 1 < Complex.normSq (fdoWitness : β„‚)
    norm_num [fdoWitness, Complex.normSq_apply, UpperHalfPlane.coe_mk]
  Β· show |fdoWitness.re| < 1 / 2
    norm_num [fdoWitness, UpperHalfPlane.mk_re]

theorem volume_fd_pos : 0 < volume π’Ÿ :=
  lt_of_lt_of_le
    (FLT.HyperbolicMeasure.volume_pos_of_isOpen ModularGroup.isOpen_fdo
      ⟨fdoWitness, fdoWitness_mem_fdo⟩)
    (measure_mono ModularGroup.fdo_subset_fd)

theorem volume_fd_lt_volume_univ : volume π’Ÿ < volume (Set.univ : Set ℍ) := by
  rw [FLT.HyperbolicMeasure.volume_univ_eq_top]
  exact volume_fd_lt_top

theorem volume_fd_ne_zero_ne_top : volume π’Ÿ β‰  0 ∧ volume π’Ÿ β‰  ⊀ :=
  ⟨volume_fd_pos.ne', volume_fd_lt_top.ne⟩

example : volume ((1 : SL(2, β„€)) β€’ π’Ÿ βˆͺ ModularGroup.S β€’ π’Ÿ) < ⊀ := by
  have := volume_biUnion_smul_fd_lt_top {1, ModularGroup.S}
  refine lt_of_le_of_lt (measure_mono ?_) this
  intro z hz
  rcases hz with hz | hz
  Β· exact Set.mem_biUnion (Finset.mem_insert_self _ _) hz
  Β· exact Set.mem_biUnion (Finset.mem_insert_of_mem (Finset.mem_singleton_self _)) hz

example : volume (⋃ Ξ³ ∈ (βˆ… : Finset SL(2, β„€)), Ξ³ β€’ π’Ÿ) < ⊀ := by
  simp

end FLT.FundamentalDomainVolume

end

Statements phrased using this module (0)

No statement module imports it directly (it is used through other definition modules or by proofs).