number_theory.modular_forms.basic
โท
Mathlib.NumberTheory.ModularForms.Basic
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -126,14 +126,14 @@ theorem CuspForm.toFun_eq_coe {f : CuspForm ฮ k} : f.toFun = (f : โ โ โ)
#print ModularForm.ext /-
@[ext]
theorem ModularForm.ext {f g : ModularForm ฮ k} (h : โ x, f x = g x) : f = g :=
- FunLike.ext f g h
+ DFunLike.ext f g h
#align modular_form.ext ModularForm.ext
-/
#print CuspForm.ext /-
@[ext]
theorem CuspForm.ext {f g : CuspForm ฮ k} (h : โ x, f x = g x) : f = g :=
- FunLike.ext f g h
+ DFunLike.ext f g h
#align cusp_form.ext CuspForm.ext
-/
@@ -294,7 +294,7 @@ theorem sub_apply (f g : ModularForm ฮ k) (z : โ) : (f - g) z = f z - g z :=
-/
instance : AddCommGroup (ModularForm ฮ k) :=
- FunLike.coe_injective.AddCommGroup _ rfl coe_add coe_neg coe_sub coe_smul coe_smul
+ DFunLike.coe_injective.AddCommGroup _ rfl coe_add coe_neg coe_sub coe_smul coe_smul
#print ModularForm.coeHom /-
/-- Additive coercion from `modular_form` to `โ โ โ`. -/
@@ -307,7 +307,7 @@ def coeHom : ModularForm ฮ k โ+ โ โ โ where
-/
instance : Module โ (ModularForm ฮ k) :=
- Function.Injective.module โ coeHom FunLike.coe_injective fun _ _ => rfl
+ Function.Injective.module โ coeHom DFunLike.coe_injective fun _ _ => rfl
instance : Inhabited (ModularForm ฮ k) :=
โจ0โฉ
@@ -477,7 +477,7 @@ theorem sub_apply (f g : CuspForm ฮ k) (z : โ) : (f - g) z = f z - g z :=
-/
instance : AddCommGroup (CuspForm ฮ k) :=
- FunLike.coe_injective.AddCommGroup _ rfl coe_add coe_neg coe_sub coe_smul coe_smul
+ DFunLike.coe_injective.AddCommGroup _ rfl coe_add coe_neg coe_sub coe_smul coe_smul
#print CuspForm.coeHom /-
/-- Additive coercion from `cusp_form` to `โ โ โ`. -/
@@ -490,15 +490,15 @@ def coeHom : CuspForm ฮ k โ+ โ โ โ where
-/
instance : Module โ (CuspForm ฮ k) :=
- Function.Injective.module โ coeHom FunLike.coe_injective fun _ _ => rfl
+ Function.Injective.module โ coeHom DFunLike.coe_injective fun _ _ => rfl
instance : Inhabited (CuspForm ฮ k) :=
โจ0โฉ
instance (priority := 99) [CuspFormClass F ฮ k] : ModularFormClass F ฮ k
where
- coe := FunLike.coe
- coe_injective' := FunLike.coe_injective'
+ coe := DFunLike.coe
+ coe_injective' := DFunLike.coe_injective'
slash_action_eq := CuspFormClass.slash_action_eq
holo := CuspFormClass.holo
bdd_at_infty _ _ := (CuspFormClass.zero_at_infty _ _).BoundedAtFilter
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,9 +3,9 @@ Copyright (c) 2022 Chris Birkbeck. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Birkbeck
-/
-import Mathbin.Analysis.Complex.UpperHalfPlane.FunctionsBoundedAtInfty
-import Mathbin.Analysis.Complex.UpperHalfPlane.Manifold
-import Mathbin.NumberTheory.ModularForms.SlashInvariantForms
+import Analysis.Complex.UpperHalfPlane.FunctionsBoundedAtInfty
+import Analysis.Complex.UpperHalfPlane.Manifold
+import NumberTheory.ModularForms.SlashInvariantForms
#align_import number_theory.modular_forms.basic from "leanprover-community/mathlib"@"1a51edf13debfcbe223fa06b1cb353b9ed9751cc"
mathlib commit https://github.com/leanprover-community/mathlib/commit/001ffdc42920050657fd45bd2b8bfbec8eaaeb29
@@ -194,15 +194,15 @@ theorem add_apply (f g : ModularForm ฮ k) (z : โ) : (f + g) z = f z + g z :=
#align modular_form.add_apply ModularForm.add_apply
-/
-#print ModularForm.hasZero /-
-instance hasZero : Zero (ModularForm ฮ k) :=
+#print ModularForm.instZero /-
+instance instZero : Zero (ModularForm ฮ k) :=
โจ{
(0 :
SlashInvariantForm ฮ
k) with
holo' := fun _ => mdifferentiableAt_const ๐(โ, โ) ๐(โ, โ)
bdd_at_infty' := fun A => by simpa using zero_form_is_bounded_at_im_infty }โฉ
-#align modular_form.has_zero ModularForm.hasZero
+#align modular_form.has_zero ModularForm.instZero
-/
#print ModularForm.coe_zero /-
@@ -223,14 +223,14 @@ section
variable {ฮฑ : Type _} [SMul ฮฑ โ] [IsScalarTower ฮฑ โ โ]
-#print ModularForm.hasSmul /-
-instance hasSmul : SMul ฮฑ (ModularForm ฮ k) :=
+#print ModularForm.instSMul /-
+instance instSMul : SMul ฮฑ (ModularForm ฮ k) :=
โจfun c f =>
{ c โข (f : SlashInvariantForm ฮ k) with
toFun := c โข f
holo' := by simpa using f.holo'.const_smul (c โข (1 : โ))
bdd_at_infty' := fun A => by simpa using (f.bdd_at_infty' A).const_smul_left (c โข (1 : โ)) }โฉ
-#align modular_form.has_smul ModularForm.hasSmul
+#align modular_form.has_smul ModularForm.instSMul
-/
#print ModularForm.coe_smul /-
@@ -249,14 +249,14 @@ theorem smul_apply (f : ModularForm ฮ k) (n : ฮฑ) (z : โ) : (n โข f) z = n
end
-#print ModularForm.hasNeg /-
-instance hasNeg : Neg (ModularForm ฮ k) :=
+#print ModularForm.instNeg /-
+instance instNeg : Neg (ModularForm ฮ k) :=
โจfun f =>
{ -(f : SlashInvariantForm ฮ k) with
toFun := -f
holo' := f.holo'.neg
bdd_at_infty' := fun A => by simpa using (f.bdd_at_infty' A).neg }โฉ
-#align modular_form.has_neg ModularForm.hasNeg
+#align modular_form.has_neg ModularForm.instNeg
-/
#print ModularForm.coe_neg /-
@@ -273,10 +273,10 @@ theorem neg_apply (f : ModularForm ฮ k) (z : โ) : (-f) z = -f z :=
#align modular_form.neg_apply ModularForm.neg_apply
-/
-#print ModularForm.hasSub /-
-instance hasSub : Sub (ModularForm ฮ k) :=
+#print ModularForm.instSub /-
+instance instSub : Sub (ModularForm ฮ k) :=
โจfun f g => f + -gโฉ
-#align modular_form.has_sub ModularForm.hasSub
+#align modular_form.has_sub ModularForm.instSub
-/
#print ModularForm.coe_sub /-
@@ -379,13 +379,13 @@ theorem add_apply (f g : CuspForm ฮ k) (z : โ) : (f + g) z = f z + g z :=
#align cusp_form.add_apply CuspForm.add_apply
-/
-#print CuspForm.hasZero /-
-instance hasZero : Zero (CuspForm ฮ k) :=
+#print CuspForm.instZero /-
+instance instZero : Zero (CuspForm ฮ k) :=
โจ{ (0 : SlashInvariantForm ฮ k) with
toFun := 0
holo' := fun _ => mdifferentiableAt_const ๐(โ, โ) ๐(โ, โ)
zero_at_infty' := by simpa using Filter.zero_zeroAtFilter _ }โฉ
-#align cusp_form.has_zero CuspForm.hasZero
+#align cusp_form.has_zero CuspForm.instZero
-/
#print CuspForm.coe_zero /-
@@ -406,14 +406,14 @@ section
variable {ฮฑ : Type _} [SMul ฮฑ โ] [IsScalarTower ฮฑ โ โ]
-#print CuspForm.hasSmul /-
-instance hasSmul : SMul ฮฑ (CuspForm ฮ k) :=
+#print CuspForm.instSMul /-
+instance instSMul : SMul ฮฑ (CuspForm ฮ k) :=
โจfun c f =>
{ c โข (f : SlashInvariantForm ฮ k) with
toFun := c โข f
holo' := by simpa using f.holo'.const_smul (c โข (1 : โ))
zero_at_infty' := fun A => by simpa using (f.zero_at_infty' A).smul (c โข (1 : โ)) }โฉ
-#align cusp_form.has_smul CuspForm.hasSmul
+#align cusp_form.has_smul CuspForm.instSMul
-/
#print CuspForm.coe_smul /-
@@ -432,14 +432,14 @@ theorem smul_apply (f : CuspForm ฮ k) (n : ฮฑ) {z : โ} : (n โข f) z = n โข
end
-#print CuspForm.hasNeg /-
-instance hasNeg : Neg (CuspForm ฮ k) :=
+#print CuspForm.instNeg /-
+instance instNeg : Neg (CuspForm ฮ k) :=
โจfun f =>
{ -(f : SlashInvariantForm ฮ k) with
toFun := -f
holo' := f.holo'.neg
zero_at_infty' := fun A => by simpa using (f.zero_at_infty' A).neg }โฉ
-#align cusp_form.has_neg CuspForm.hasNeg
+#align cusp_form.has_neg CuspForm.instNeg
-/
#print CuspForm.coe_neg /-
@@ -456,10 +456,10 @@ theorem neg_apply (f : CuspForm ฮ k) (z : โ) : (-f) z = -f z :=
#align cusp_form.neg_apply CuspForm.neg_apply
-/
-#print CuspForm.hasSub /-
-instance hasSub : Sub (CuspForm ฮ k) :=
+#print CuspForm.instSub /-
+instance instSub : Sub (CuspForm ฮ k) :=
โจfun f g => f + -gโฉ
-#align cusp_form.has_sub CuspForm.hasSub
+#align cusp_form.has_sub CuspForm.instSub
-/
#print CuspForm.coe_sub /-
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,16 +2,13 @@
Copyright (c) 2022 Chris Birkbeck. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Birkbeck
-
-! This file was ported from Lean 3 source module number_theory.modular_forms.basic
-! leanprover-community/mathlib commit 1a51edf13debfcbe223fa06b1cb353b9ed9751cc
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Analysis.Complex.UpperHalfPlane.FunctionsBoundedAtInfty
import Mathbin.Analysis.Complex.UpperHalfPlane.Manifold
import Mathbin.NumberTheory.ModularForms.SlashInvariantForms
+#align_import number_theory.modular_forms.basic from "leanprover-community/mathlib"@"1a51edf13debfcbe223fa06b1cb353b9ed9751cc"
+
/-!
# Modular forms
mathlib commit https://github.com/leanprover-community/mathlib/commit/1a51edf13debfcbe223fa06b1cb353b9ed9751cc
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Birkbeck
! This file was ported from Lean 3 source module number_theory.modular_forms.basic
-! leanprover-community/mathlib commit 57f9349f2fe19d2de7207e99b0341808d977cdcf
+! leanprover-community/mathlib commit 1a51edf13debfcbe223fa06b1cb353b9ed9751cc
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -15,6 +15,9 @@ import Mathbin.NumberTheory.ModularForms.SlashInvariantForms
/-!
# Modular forms
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
This file defines modular forms and proves some basic properties about them.
We begin by defining modular forms and cusp forms as extension of `slash_invariant_forms` then we
mathlib commit https://github.com/leanprover-community/mathlib/commit/9240e8be927a0955b9a82c6c85ef499ee3a626b8
@@ -43,24 +43,29 @@ variable (F : Type _) (ฮ : Subgroup SL(2, โค)) (k : โค)
open scoped ModularForm
+#print ModularForm /-
/-- These are `slash_invariant_form`'s that are holomophic and bounded at infinity. -/
structure ModularForm extends SlashInvariantForm ฮ k where
holo' : MDifferentiable ๐(โ) ๐(โ) (to_fun : โ โ โ)
bdd_at_infty' : โ A : SL(2, โค), IsBoundedAtImInfty (to_fun โฃ[k] A)
#align modular_form ModularForm
+-/
/-- The `slash_invariant_form` associated to a `modular_form`. -/
add_decl_doc ModularForm.toSlashInvariantForm
+#print CuspForm /-
/-- These are `slash_invariant_form`s that are holomophic and zero at infinity. -/
structure CuspForm extends SlashInvariantForm ฮ k where
holo' : MDifferentiable ๐(โ) ๐(โ) (to_fun : โ โ โ)
zero_at_infty' : โ A : SL(2, โค), IsZeroAtImInfty (to_fun โฃ[k] A)
#align cusp_form CuspForm
+-/
/-- The `slash_invariant_form` associated to a `cusp_form`. -/
add_decl_doc CuspForm.toSlashInvariantForm
+#print ModularFormClass /-
/-- `modular_form_class F ฮ k` says that `F` is a type of bundled functions that extend
`slash_invariant_form_class` by requiring that the functions be holomorphic and bounded
at infinity. -/
@@ -68,7 +73,9 @@ class ModularFormClass extends SlashInvariantFormClass F ฮ k where
holo : โ f : F, MDifferentiable ๐(โ) ๐(โ) (f : โ โ โ)
bdd_at_infty : โ (f : F) (A : SL(2, โค)), IsBoundedAtImInfty (f โฃ[k] A)
#align modular_form_class ModularFormClass
+-/
+#print CuspFormClass /-
/-- `cusp_form_class F ฮ k` says that `F` is a type of bundled functions that extend
`slash_invariant_form_class` by requiring that the functions be holomorphic and zero
at infinity. -/
@@ -76,7 +83,9 @@ class CuspFormClass extends SlashInvariantFormClass F ฮ k where
holo : โ f : F, MDifferentiable ๐(โ) ๐(โ) (f : โ โ โ)
zero_at_infty : โ (f : F) (A : SL(2, โค)), IsZeroAtImInfty (f โฃ[k] A)
#align cusp_form_class CuspFormClass
+-/
+#print ModularFormClass.modularForm /-
instance (priority := 100) ModularFormClass.modularForm : ModularFormClass (ModularForm ฮ k) ฮ k
where
coe := ModularForm.toFun
@@ -85,7 +94,9 @@ instance (priority := 100) ModularFormClass.modularForm : ModularFormClass (Modu
holo := ModularForm.holo'
bdd_at_infty := ModularForm.bdd_at_infty'
#align modular_form_class.modular_form ModularFormClass.modularForm
+-/
+#print CuspFormClass.cuspForm /-
instance (priority := 100) CuspFormClass.cuspForm : CuspFormClass (CuspForm ฮ k) ฮ k
where
coe := CuspForm.toFun
@@ -94,29 +105,39 @@ instance (priority := 100) CuspFormClass.cuspForm : CuspFormClass (CuspForm ฮ k
holo := CuspForm.holo'
zero_at_infty := CuspForm.zero_at_infty'
#align cusp_form_class.cusp_form CuspFormClass.cuspForm
+-/
variable {F ฮ k}
+#print ModularForm.toFun_eq_coe /-
@[simp]
-theorem modularForm_toFun_eq_coe {f : ModularForm ฮ k} : f.toFun = (f : โ โ โ) :=
+theorem ModularForm.toFun_eq_coe {f : ModularForm ฮ k} : f.toFun = (f : โ โ โ) :=
rfl
-#align modular_form_to_fun_eq_coe modularForm_toFun_eq_coe
+#align modular_form_to_fun_eq_coe ModularForm.toFun_eq_coe
+-/
+#print CuspForm.toFun_eq_coe /-
@[simp]
-theorem cuspForm_toFun_eq_coe {f : CuspForm ฮ k} : f.toFun = (f : โ โ โ) :=
+theorem CuspForm.toFun_eq_coe {f : CuspForm ฮ k} : f.toFun = (f : โ โ โ) :=
rfl
-#align cusp_form_to_fun_eq_coe cuspForm_toFun_eq_coe
+#align cusp_form_to_fun_eq_coe CuspForm.toFun_eq_coe
+-/
+#print ModularForm.ext /-
@[ext]
theorem ModularForm.ext {f g : ModularForm ฮ k} (h : โ x, f x = g x) : f = g :=
FunLike.ext f g h
#align modular_form.ext ModularForm.ext
+-/
+#print CuspForm.ext /-
@[ext]
theorem CuspForm.ext {f g : CuspForm ฮ k} (h : โ x, f x = g x) : f = g :=
FunLike.ext f g h
#align cusp_form.ext CuspForm.ext
+-/
+#print ModularForm.copy /-
/-- Copy of a `modular_form` with a new `to_fun` equal to the old one. Useful to fix
definitional equalities. -/
protected def ModularForm.copy (f : ModularForm ฮ k) (f' : โ โ โ) (h : f' = โf) : ModularForm ฮ k
@@ -126,7 +147,9 @@ protected def ModularForm.copy (f : ModularForm ฮ k) (f' : โ โ โ) (h : f'
holo' := h.symm โธ f.holo'
bdd_at_infty' A := h.symm โธ f.bdd_at_infty' A
#align modular_form.copy ModularForm.copy
+-/
+#print CuspForm.copy /-
/-- Copy of a `cusp_form` with a new `to_fun` equal to the old one. Useful to fix
definitional equalities. -/
protected def CuspForm.copy (f : CuspForm ฮ k) (f' : โ โ โ) (h : f' = โf) : CuspForm ฮ k
@@ -136,6 +159,7 @@ protected def CuspForm.copy (f : CuspForm ฮ k) (f' : โ โ โ) (h : f' = โ
holo' := h.symm โธ f.holo'
zero_at_infty' A := h.symm โธ f.zero_at_infty' A
#align cusp_form.copy CuspForm.copy
+-/
end ModularForm
@@ -145,25 +169,32 @@ open SlashInvariantForm
variable {F : Type _} {ฮ : Subgroup SL(2, โค)} {k : โค}
-instance hasAdd : Add (ModularForm ฮ k) :=
+#print ModularForm.add /-
+instance add : Add (ModularForm ฮ k) :=
โจfun f g =>
{
(f : SlashInvariantForm ฮ k) +
g with
holo' := f.holo'.add g.holo'
bdd_at_infty' := fun A => by simpa using (f.bdd_at_infty' A).add (g.bdd_at_infty' A) }โฉ
-#align modular_form.has_add ModularForm.hasAdd
+#align modular_form.has_add ModularForm.add
+-/
+#print ModularForm.coe_add /-
@[simp]
theorem coe_add (f g : ModularForm ฮ k) : โ(f + g) = f + g :=
rfl
#align modular_form.coe_add ModularForm.coe_add
+-/
+#print ModularForm.add_apply /-
@[simp]
theorem add_apply (f g : ModularForm ฮ k) (z : โ) : (f + g) z = f z + g z :=
rfl
#align modular_form.add_apply ModularForm.add_apply
+-/
+#print ModularForm.hasZero /-
instance hasZero : Zero (ModularForm ฮ k) :=
โจ{
(0 :
@@ -172,21 +203,27 @@ instance hasZero : Zero (ModularForm ฮ k) :=
holo' := fun _ => mdifferentiableAt_const ๐(โ, โ) ๐(โ, โ)
bdd_at_infty' := fun A => by simpa using zero_form_is_bounded_at_im_infty }โฉ
#align modular_form.has_zero ModularForm.hasZero
+-/
+#print ModularForm.coe_zero /-
@[simp]
theorem coe_zero : โ(0 : ModularForm ฮ k) = (0 : โ โ โ) :=
rfl
#align modular_form.coe_zero ModularForm.coe_zero
+-/
+#print ModularForm.zero_apply /-
@[simp]
theorem zero_apply (z : โ) : (0 : ModularForm ฮ k) z = 0 :=
rfl
#align modular_form.zero_apply ModularForm.zero_apply
+-/
section
variable {ฮฑ : Type _} [SMul ฮฑ โ] [IsScalarTower ฮฑ โ โ]
+#print ModularForm.hasSmul /-
instance hasSmul : SMul ฮฑ (ModularForm ฮ k) :=
โจfun c f =>
{ c โข (f : SlashInvariantForm ฮ k) with
@@ -194,19 +231,25 @@ instance hasSmul : SMul ฮฑ (ModularForm ฮ k) :=
holo' := by simpa using f.holo'.const_smul (c โข (1 : โ))
bdd_at_infty' := fun A => by simpa using (f.bdd_at_infty' A).const_smul_left (c โข (1 : โ)) }โฉ
#align modular_form.has_smul ModularForm.hasSmul
+-/
+#print ModularForm.coe_smul /-
@[simp]
theorem coe_smul (f : ModularForm ฮ k) (n : ฮฑ) : โ(n โข f) = n โข f :=
rfl
#align modular_form.coe_smul ModularForm.coe_smul
+-/
+#print ModularForm.smul_apply /-
@[simp]
theorem smul_apply (f : ModularForm ฮ k) (n : ฮฑ) (z : โ) : (n โข f) z = n โข f z :=
rfl
#align modular_form.smul_apply ModularForm.smul_apply
+-/
end
+#print ModularForm.hasNeg /-
instance hasNeg : Neg (ModularForm ฮ k) :=
โจfun f =>
{ -(f : SlashInvariantForm ฮ k) with
@@ -214,34 +257,46 @@ instance hasNeg : Neg (ModularForm ฮ k) :=
holo' := f.holo'.neg
bdd_at_infty' := fun A => by simpa using (f.bdd_at_infty' A).neg }โฉ
#align modular_form.has_neg ModularForm.hasNeg
+-/
+#print ModularForm.coe_neg /-
@[simp]
theorem coe_neg (f : ModularForm ฮ k) : โ(-f) = -f :=
rfl
#align modular_form.coe_neg ModularForm.coe_neg
+-/
+#print ModularForm.neg_apply /-
@[simp]
theorem neg_apply (f : ModularForm ฮ k) (z : โ) : (-f) z = -f z :=
rfl
#align modular_form.neg_apply ModularForm.neg_apply
+-/
+#print ModularForm.hasSub /-
instance hasSub : Sub (ModularForm ฮ k) :=
โจfun f g => f + -gโฉ
#align modular_form.has_sub ModularForm.hasSub
+-/
+#print ModularForm.coe_sub /-
@[simp]
theorem coe_sub (f g : ModularForm ฮ k) : โ(f - g) = f - g :=
rfl
#align modular_form.coe_sub ModularForm.coe_sub
+-/
+#print ModularForm.sub_apply /-
@[simp]
theorem sub_apply (f g : ModularForm ฮ k) (z : โ) : (f - g) z = f z - g z :=
rfl
#align modular_form.sub_apply ModularForm.sub_apply
+-/
instance : AddCommGroup (ModularForm ฮ k) :=
FunLike.coe_injective.AddCommGroup _ rfl coe_add coe_neg coe_sub coe_smul coe_smul
+#print ModularForm.coeHom /-
/-- Additive coercion from `modular_form` to `โ โ โ`. -/
@[simps]
def coeHom : ModularForm ฮ k โ+ โ โ โ where
@@ -249,6 +304,7 @@ def coeHom : ModularForm ฮ k โ+ โ โ โ where
map_zero' := coe_zero
map_add' _ _ := rfl
#align modular_form.coe_hom ModularForm.coeHom
+-/
instance : Module โ (ModularForm ฮ k) :=
Function.Injective.module โ coeHom FunLike.coe_injective fun _ _ => rfl
@@ -256,6 +312,7 @@ instance : Module โ (ModularForm ฮ k) :=
instance : Inhabited (ModularForm ฮ k) :=
โจ0โฉ
+#print ModularForm.mul /-
/-- The modular form of weight `k_1 + k_2` given by the product of two modular forms of weights
`k_1` and `k_2`. -/
def mul {k_1 k_2 : โค} {ฮ : Subgroup SL(2, โค)} (f : ModularForm ฮ k_1) (g : ModularForm ฮ k_2) :
@@ -265,12 +322,15 @@ def mul {k_1 k_2 : โค} {ฮ : Subgroup SL(2, โค)} (f : ModularForm ฮ k_1) (g :
holo' := f.holo'.mul g.holo'
bdd_at_infty' A := by simpa using (f.bdd_at_infty' A).mul (g.bdd_at_infty' A)
#align modular_form.mul ModularForm.mul
+-/
+#print ModularForm.mul_coe /-
@[simp]
theorem mul_coe {k_1 k_2 : โค} {ฮ : Subgroup SL(2, โค)} (f : ModularForm ฮ k_1)
(g : ModularForm ฮ k_2) : (f.mul g : โ โ โ) = f * g :=
rfl
#align modular_form.mul_coe ModularForm.mul_coe
+-/
instance : One (ModularForm ฮ 0) :=
โจ{
@@ -280,10 +340,12 @@ instance : One (ModularForm ฮ 0) :=
holo' := fun x => mdifferentiableAt_const ๐(โ, โ) ๐(โ, โ)
bdd_at_infty' := fun A => by simpa using at_im_infty.const_bounded_at_filter (1 : โ) }โฉ
+#print ModularForm.one_coe_eq_one /-
@[simp]
theorem one_coe_eq_one : ((1 : ModularForm ฮ 0) : โ โ โ) = 1 :=
rfl
#align modular_form.one_coe_eq_one ModularForm.one_coe_eq_one
+-/
end ModularForm
@@ -293,6 +355,7 @@ open ModularForm
variable {F : Type _} {ฮ : Subgroup SL(2, โค)} {k : โค}
+#print CuspForm.hasAdd /-
instance hasAdd : Add (CuspForm ฮ k) :=
โจfun f g =>
{ (f : SlashInvariantForm ฮ k) + g with
@@ -300,38 +363,50 @@ instance hasAdd : Add (CuspForm ฮ k) :=
holo' := f.holo'.add g.holo'
zero_at_infty' := fun A => by simpa using (f.zero_at_infty' A).add (g.zero_at_infty' A) }โฉ
#align cusp_form.has_add CuspForm.hasAdd
+-/
+#print CuspForm.coe_add /-
@[simp]
theorem coe_add (f g : CuspForm ฮ k) : โ(f + g) = f + g :=
rfl
#align cusp_form.coe_add CuspForm.coe_add
+-/
+#print CuspForm.add_apply /-
@[simp]
theorem add_apply (f g : CuspForm ฮ k) (z : โ) : (f + g) z = f z + g z :=
rfl
#align cusp_form.add_apply CuspForm.add_apply
+-/
+#print CuspForm.hasZero /-
instance hasZero : Zero (CuspForm ฮ k) :=
โจ{ (0 : SlashInvariantForm ฮ k) with
toFun := 0
holo' := fun _ => mdifferentiableAt_const ๐(โ, โ) ๐(โ, โ)
zero_at_infty' := by simpa using Filter.zero_zeroAtFilter _ }โฉ
#align cusp_form.has_zero CuspForm.hasZero
+-/
+#print CuspForm.coe_zero /-
@[simp]
theorem coe_zero : โ(0 : CuspForm ฮ k) = (0 : โ โ โ) :=
rfl
#align cusp_form.coe_zero CuspForm.coe_zero
+-/
+#print CuspForm.zero_apply /-
@[simp]
theorem zero_apply (z : โ) : (0 : CuspForm ฮ k) z = 0 :=
rfl
#align cusp_form.zero_apply CuspForm.zero_apply
+-/
section
variable {ฮฑ : Type _} [SMul ฮฑ โ] [IsScalarTower ฮฑ โ โ]
+#print CuspForm.hasSmul /-
instance hasSmul : SMul ฮฑ (CuspForm ฮ k) :=
โจfun c f =>
{ c โข (f : SlashInvariantForm ฮ k) with
@@ -339,19 +414,25 @@ instance hasSmul : SMul ฮฑ (CuspForm ฮ k) :=
holo' := by simpa using f.holo'.const_smul (c โข (1 : โ))
zero_at_infty' := fun A => by simpa using (f.zero_at_infty' A).smul (c โข (1 : โ)) }โฉ
#align cusp_form.has_smul CuspForm.hasSmul
+-/
+#print CuspForm.coe_smul /-
@[simp]
theorem coe_smul (f : CuspForm ฮ k) (n : ฮฑ) : โ(n โข f) = n โข f :=
rfl
#align cusp_form.coe_smul CuspForm.coe_smul
+-/
+#print CuspForm.smul_apply /-
@[simp]
theorem smul_apply (f : CuspForm ฮ k) (n : ฮฑ) {z : โ} : (n โข f) z = n โข f z :=
rfl
#align cusp_form.smul_apply CuspForm.smul_apply
+-/
end
+#print CuspForm.hasNeg /-
instance hasNeg : Neg (CuspForm ฮ k) :=
โจfun f =>
{ -(f : SlashInvariantForm ฮ k) with
@@ -359,34 +440,46 @@ instance hasNeg : Neg (CuspForm ฮ k) :=
holo' := f.holo'.neg
zero_at_infty' := fun A => by simpa using (f.zero_at_infty' A).neg }โฉ
#align cusp_form.has_neg CuspForm.hasNeg
+-/
+#print CuspForm.coe_neg /-
@[simp]
theorem coe_neg (f : CuspForm ฮ k) : โ(-f) = -f :=
rfl
#align cusp_form.coe_neg CuspForm.coe_neg
+-/
+#print CuspForm.neg_apply /-
@[simp]
theorem neg_apply (f : CuspForm ฮ k) (z : โ) : (-f) z = -f z :=
rfl
#align cusp_form.neg_apply CuspForm.neg_apply
+-/
+#print CuspForm.hasSub /-
instance hasSub : Sub (CuspForm ฮ k) :=
โจfun f g => f + -gโฉ
#align cusp_form.has_sub CuspForm.hasSub
+-/
+#print CuspForm.coe_sub /-
@[simp]
theorem coe_sub (f g : CuspForm ฮ k) : โ(f - g) = f - g :=
rfl
#align cusp_form.coe_sub CuspForm.coe_sub
+-/
+#print CuspForm.sub_apply /-
@[simp]
theorem sub_apply (f g : CuspForm ฮ k) (z : โ) : (f - g) z = f z - g z :=
rfl
#align cusp_form.sub_apply CuspForm.sub_apply
+-/
instance : AddCommGroup (CuspForm ฮ k) :=
FunLike.coe_injective.AddCommGroup _ rfl coe_add coe_neg coe_sub coe_smul coe_smul
+#print CuspForm.coeHom /-
/-- Additive coercion from `cusp_form` to `โ โ โ`. -/
@[simps]
def coeHom : CuspForm ฮ k โ+ โ โ โ where
@@ -394,6 +487,7 @@ def coeHom : CuspForm ฮ k โ+ โ โ โ where
map_zero' := CuspForm.coe_zero
map_add' _ _ := rfl
#align cusp_form.coe_hom CuspForm.coeHom
+-/
instance : Module โ (CuspForm ฮ k) :=
Function.Injective.module โ coeHom FunLike.coe_injective fun _ _ => rfl
mathlib commit https://github.com/leanprover-community/mathlib/commit/fdc286cc6967a012f41b87f76dcd2797b53152af
@@ -45,7 +45,7 @@ open scoped ModularForm
/-- These are `slash_invariant_form`'s that are holomophic and bounded at infinity. -/
structure ModularForm extends SlashInvariantForm ฮ k where
- holo' : Mdifferentiable ๐(โ) ๐(โ) (to_fun : โ โ โ)
+ holo' : MDifferentiable ๐(โ) ๐(โ) (to_fun : โ โ โ)
bdd_at_infty' : โ A : SL(2, โค), IsBoundedAtImInfty (to_fun โฃ[k] A)
#align modular_form ModularForm
@@ -54,7 +54,7 @@ add_decl_doc ModularForm.toSlashInvariantForm
/-- These are `slash_invariant_form`s that are holomophic and zero at infinity. -/
structure CuspForm extends SlashInvariantForm ฮ k where
- holo' : Mdifferentiable ๐(โ) ๐(โ) (to_fun : โ โ โ)
+ holo' : MDifferentiable ๐(โ) ๐(โ) (to_fun : โ โ โ)
zero_at_infty' : โ A : SL(2, โค), IsZeroAtImInfty (to_fun โฃ[k] A)
#align cusp_form CuspForm
@@ -65,7 +65,7 @@ add_decl_doc CuspForm.toSlashInvariantForm
`slash_invariant_form_class` by requiring that the functions be holomorphic and bounded
at infinity. -/
class ModularFormClass extends SlashInvariantFormClass F ฮ k where
- holo : โ f : F, Mdifferentiable ๐(โ) ๐(โ) (f : โ โ โ)
+ holo : โ f : F, MDifferentiable ๐(โ) ๐(โ) (f : โ โ โ)
bdd_at_infty : โ (f : F) (A : SL(2, โค)), IsBoundedAtImInfty (f โฃ[k] A)
#align modular_form_class ModularFormClass
@@ -73,7 +73,7 @@ class ModularFormClass extends SlashInvariantFormClass F ฮ k where
`slash_invariant_form_class` by requiring that the functions be holomorphic and zero
at infinity. -/
class CuspFormClass extends SlashInvariantFormClass F ฮ k where
- holo : โ f : F, Mdifferentiable ๐(โ) ๐(โ) (f : โ โ โ)
+ holo : โ f : F, MDifferentiable ๐(โ) ๐(โ) (f : โ โ โ)
zero_at_infty : โ (f : F) (A : SL(2, โค)), IsZeroAtImInfty (f โฃ[k] A)
#align cusp_form_class CuspFormClass
mathlib commit https://github.com/leanprover-community/mathlib/commit/93f880918cb51905fd51b76add8273cbc27718ab
@@ -4,12 +4,12 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Birkbeck
! This file was ported from Lean 3 source module number_theory.modular_forms.basic
-! leanprover-community/mathlib commit 59150e4a8ab64a88e35d5cfa0a17b762a68acfe9
+! leanprover-community/mathlib commit 57f9349f2fe19d2de7207e99b0341808d977cdcf
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathbin.Analysis.Complex.UpperHalfPlane.FunctionsBoundedAtInfty
-import Mathbin.Analysis.Complex.UpperHalfPlane.Topology
+import Mathbin.Analysis.Complex.UpperHalfPlane.Manifold
import Mathbin.NumberTheory.ModularForms.SlashInvariantForms
/-!
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -29,13 +29,10 @@ open scoped Topology Manifold UpperHalfPlane
noncomputable section
--- mathport name: ยซexprโโ ยป
local prefix:1024 "โโ" => @coe _ (Matrix (Fin 2) (Fin 2) _) _
--- mathport name: ยซexprGL( , )โบยป
local notation "GL(" n ", " R ")" "โบ" => Matrix.GLPos (Fin n) R
--- mathport name: ยซexprSL( , )ยป
local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R
section ModularForm
mathlib commit https://github.com/leanprover-community/mathlib/commit/a3e83f0fa4391c8740f7d773a7a9b74e311ae2a3
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Birkbeck
! This file was ported from Lean 3 source module number_theory.modular_forms.basic
-! leanprover-community/mathlib commit ef74e2bd3a553d31fdb139188a251509b6c6b038
+! leanprover-community/mathlib commit 59150e4a8ab64a88e35d5cfa0a17b762a68acfe9
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -65,7 +65,7 @@ structure CuspForm extends SlashInvariantForm ฮ k where
add_decl_doc CuspForm.toSlashInvariantForm
/-- `modular_form_class F ฮ k` says that `F` is a type of bundled functions that extend
-`slash_invariant_forms_class` by requiring that the functions be holomorphic and bounded
+`slash_invariant_form_class` by requiring that the functions be holomorphic and bounded
at infinity. -/
class ModularFormClass extends SlashInvariantFormClass F ฮ k where
holo : โ f : F, Mdifferentiable ๐(โ) ๐(โ) (f : โ โ โ)
@@ -73,7 +73,7 @@ class ModularFormClass extends SlashInvariantFormClass F ฮ k where
#align modular_form_class ModularFormClass
/-- `cusp_form_class F ฮ k` says that `F` is a type of bundled functions that extend
-`slash_invariant_forms_class` by requiring that the functions be holomorphic and zero
+`slash_invariant_form_class` by requiring that the functions be holomorphic and zero
at infinity. -/
class CuspFormClass extends SlashInvariantFormClass F ฮ k where
holo : โ f : F, Mdifferentiable ๐(โ) ๐(โ) (f : โ โ โ)
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -25,7 +25,7 @@ modular form.
open Complex UpperHalfPlane
-open Topology Manifold UpperHalfPlane
+open scoped Topology Manifold UpperHalfPlane
noncomputable section
@@ -44,7 +44,7 @@ open ModularForm
variable (F : Type _) (ฮ : Subgroup SL(2, โค)) (k : โค)
-open ModularForm
+open scoped ModularForm
/-- These are `slash_invariant_form`'s that are holomophic and bounded at infinity. -/
structure ModularForm extends SlashInvariantForm ฮ k where
mathlib commit https://github.com/leanprover-community/mathlib/commit/8d33f09cd7089ecf074b4791907588245aec5d1b
@@ -33,7 +33,7 @@ noncomputable section
local prefix:1024 "โโ" => @coe _ (Matrix (Fin 2) (Fin 2) _) _
-- mathport name: ยซexprGL( , )โบยป
-local notation "GL(" n ", " R ")" "โบ" => Matrix.gLPos (Fin n) R
+local notation "GL(" n ", " R ")" "โบ" => Matrix.GLPos (Fin n) R
-- mathport name: ยซexprSL( , )ยป
local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R
mathlib commit https://github.com/leanprover-community/mathlib/commit/36b8aa61ea7c05727161f96a0532897bd72aedab
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Birkbeck
! This file was ported from Lean 3 source module number_theory.modular_forms.basic
-! leanprover-community/mathlib commit fe44cd36149e675eb5dec87acc7e8f1d6568e081
+! leanprover-community/mathlib commit ef74e2bd3a553d31fdb139188a251509b6c6b038
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -44,13 +44,12 @@ open ModularForm
variable (F : Type _) (ฮ : Subgroup SL(2, โค)) (k : โค)
--- mathport name: ยซexpr โฃ[ , ]ยป
-local notation:73 f "โฃ[" k:0 "," A "]" => SlashAction.map โ k A f
+open ModularForm
/-- These are `slash_invariant_form`'s that are holomophic and bounded at infinity. -/
structure ModularForm extends SlashInvariantForm ฮ k where
holo' : Mdifferentiable ๐(โ) ๐(โ) (to_fun : โ โ โ)
- bdd_at_infty' : โ A : SL(2, โค), IsBoundedAtImInfty (to_funโฃ[k,A])
+ bdd_at_infty' : โ A : SL(2, โค), IsBoundedAtImInfty (to_fun โฃ[k] A)
#align modular_form ModularForm
/-- The `slash_invariant_form` associated to a `modular_form`. -/
@@ -59,7 +58,7 @@ add_decl_doc ModularForm.toSlashInvariantForm
/-- These are `slash_invariant_form`s that are holomophic and zero at infinity. -/
structure CuspForm extends SlashInvariantForm ฮ k where
holo' : Mdifferentiable ๐(โ) ๐(โ) (to_fun : โ โ โ)
- zero_at_infty' : โ A : SL(2, โค), IsZeroAtImInfty (to_funโฃ[k,A])
+ zero_at_infty' : โ A : SL(2, โค), IsZeroAtImInfty (to_fun โฃ[k] A)
#align cusp_form CuspForm
/-- The `slash_invariant_form` associated to a `cusp_form`. -/
@@ -70,7 +69,7 @@ add_decl_doc CuspForm.toSlashInvariantForm
at infinity. -/
class ModularFormClass extends SlashInvariantFormClass F ฮ k where
holo : โ f : F, Mdifferentiable ๐(โ) ๐(โ) (f : โ โ โ)
- bdd_at_infty : โ (f : F) (A : SL(2, โค)), IsBoundedAtImInfty (fโฃ[k,A])
+ bdd_at_infty : โ (f : F) (A : SL(2, โค)), IsBoundedAtImInfty (f โฃ[k] A)
#align modular_form_class ModularFormClass
/-- `cusp_form_class F ฮ k` says that `F` is a type of bundled functions that extend
@@ -78,7 +77,7 @@ class ModularFormClass extends SlashInvariantFormClass F ฮ k where
at infinity. -/
class CuspFormClass extends SlashInvariantFormClass F ฮ k where
holo : โ f : F, Mdifferentiable ๐(โ) ๐(โ) (f : โ โ โ)
- zero_at_infty : โ (f : F) (A : SL(2, โค)), IsZeroAtImInfty (fโฃ[k,A])
+ zero_at_infty : โ (f : F) (A : SL(2, โค)), IsZeroAtImInfty (f โฃ[k] A)
#align cusp_form_class CuspFormClass
instance (priority := 100) ModularFormClass.modularForm : ModularFormClass (ModularForm ฮ k) ฮ k
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce11c3c2a285bbe6937e26d9792fda4e51f3fe1a
@@ -4,11 +4,10 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Birkbeck
! This file was ported from Lean 3 source module number_theory.modular_forms.basic
-! leanprover-community/mathlib commit f2ce6086713c78a7f880485f7917ea547a215982
+! leanprover-community/mathlib commit fe44cd36149e675eb5dec87acc7e8f1d6568e081
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
-import Mathbin.Geometry.Manifold.Mfderiv
import Mathbin.Analysis.Complex.UpperHalfPlane.FunctionsBoundedAtInfty
import Mathbin.Analysis.Complex.UpperHalfPlane.Topology
import Mathbin.NumberTheory.ModularForms.SlashInvariantForms
@@ -30,14 +29,6 @@ open Topology Manifold UpperHalfPlane
noncomputable section
-instance UpperHalfPlane.chartedSpace : ChartedSpace โ โ :=
- UpperHalfPlane.openEmbedding_coe.singletonChartedSpace
-#align upper_half_plane.charted_space UpperHalfPlane.chartedSpace
-
-instance UpperHalfPlane.smoothManifoldWithCorners : SmoothManifoldWithCorners ๐(โ) โ :=
- UpperHalfPlane.openEmbedding_coe.singleton_smoothManifoldWithCorners ๐(โ)
-#align upper_half_plane.smooth_manifold_with_corners UpperHalfPlane.smoothManifoldWithCorners
-
-- mathport name: ยซexprโโ ยป
local prefix:1024 "โโ" => @coe _ (Matrix (Fin 2) (Fin 2) _) _
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
Homogenises porting notes via capitalisation and addition of whitespace.
It makes the following changes:
@@ -261,7 +261,7 @@ def mul {k_1 k_2 : โค} {ฮ : Subgroup SL(2, โค)} (f : ModularForm ฮ k_1) (g :
toSlashInvariantForm := f.1.mul g.1
holo' := f.holo'.mul g.holo'
bdd_at_infty' A := by
- -- porting note: was `by simpa using ...`
+ -- Porting note: was `by simpa using ...`
-- `mul_slash_SL2` is no longer a `simp` and `simpa only [mul_slash_SL2] using ...` failed
rw [SlashInvariantForm.coe_mul, mul_slash_SL2]
exact (f.bdd_at_infty' A).mul (g.bdd_at_infty' A)
@@ -40,7 +40,7 @@ variable (F : Type*) (ฮ : Subgroup SL(2, โค)) (k : โค)
open scoped ModularForm
-/-- These are `SlashInvariantForm`'s that are holomophic and bounded at infinity. -/
+/-- These are `SlashInvariantForm`'s that are holomorphic and bounded at infinity. -/
structure ModularForm extends SlashInvariantForm ฮ k where
holo' : MDifferentiable ๐(โ) ๐(โ) (toSlashInvariantForm : โ โ โ)
bdd_at_infty' : โ A : SL(2, โค), IsBoundedAtImInfty (toSlashInvariantForm โฃ[k] A)
@@ -49,7 +49,7 @@ structure ModularForm extends SlashInvariantForm ฮ k where
/-- The `SlashInvariantForm` associated to a `ModularForm`. -/
add_decl_doc ModularForm.toSlashInvariantForm
-/-- These are `SlashInvariantForm`s that are holomophic and zero at infinity. -/
+/-- These are `SlashInvariantForm`s that are holomorphic and zero at infinity. -/
structure CuspForm extends SlashInvariantForm ฮ k where
holo' : MDifferentiable ๐(โ) ๐(โ) (toSlashInvariantForm : โ โ โ)
zero_at_infty' : โ A : SL(2, โค), IsZeroAtImInfty (toSlashInvariantForm โฃ[k] A)
The FunLike hierarchy is very big and gets scanned through each time we need a coercion (via the CoeFun
instance). It looks like unbundled inheritance suits Lean 4 better here. The only class that still extends FunLike
is EquivLike
, since that has a custom coe_injective'
field that is easier to implement. All other classes should take FunLike
or EquivLike
as a parameter.
Previously, morphism classes would be Type
-valued and extend FunLike
:
/-- `MyHomClass F A B` states that `F` is a type of `MyClass.op`-preserving morphisms.
You should extend this class when you extend `MyHom`. -/
class MyHomClass (F : Type*) (A B : outParam <| Type*) [MyClass A] [MyClass B]
extends FunLike F A B :=
(map_op : โ (f : F) (x y : A), f (MyClass.op x y) = MyClass.op (f x) (f y))
After this PR, they should be Prop
-valued and take FunLike
as a parameter:
/-- `MyHomClass F A B` states that `F` is a type of `MyClass.op`-preserving morphisms.
You should extend this class when you extend `MyHom`. -/
class MyHomClass (F : Type*) (A B : outParam <| Type*) [MyClass A] [MyClass B]
[FunLike F A B] : Prop :=
(map_op : โ (f : F) (x y : A), f (MyClass.op x y) = MyClass.op (f x) (f y))
(Note that A B
stay marked as outParam
even though they are not purely required to be so due to the FunLike
parameter already filling them in. This is required to see through type synonyms, which is important in the category theory library. Also, I think keeping them as outParam
is slightly faster.)
Similarly, MyEquivClass
should take EquivLike
as a parameter.
As a result, every mention of [MyHomClass F A B]
should become [FunLike F A B] [MyHomClass F A B]
.
While overall this gives some great speedups, there are some cases that are noticeably slower. In particular, a failing application of a lemma such as map_mul
is more expensive. This is due to suboptimal processing of arguments. For example:
variable [FunLike F M N] [Mul M] [Mul N] (f : F) (x : M) (y : M)
theorem map_mul [MulHomClass F M N] : f (x * y) = f x * f y
example [AddHomClass F A B] : f (x * y) = f x * f y := map_mul f _ _
Before this PR, applying map_mul f
gives the goals [Mul ?M] [Mul ?N] [MulHomClass F ?M ?N]
. Since M
and N
are out_param
s, [MulHomClass F ?M ?N]
is synthesized first, supplies values for ?M
and ?N
and then the Mul M
and Mul N
instances can be found.
After this PR, the goals become [FunLike F ?M ?N] [Mul ?M] [Mul ?N] [MulHomClass F ?M ?N]
. Now [FunLike F ?M ?N]
is synthesized first, supplies values for ?M
and ?N
and then the Mul M
and Mul N
instances can be found, before trying MulHomClass F M N
which fails. Since the Mul
hierarchy is very big, this can be slow to fail, especially when there is no such Mul
instance.
A long-term but harder to achieve solution would be to specify the order in which instance goals get solved. For example, we'd like to change the arguments to map_mul
to look like [FunLike F M N] [Mul M] [Mul N] [highPriority <| MulHomClass F M N]
because MulHomClass
fails or succeeds much faster than the others.
As a consequence, the simpNF
linter is much slower since by design it tries and fails to apply many map_
lemmas. The same issue occurs a few times in existing calls to simp [map_mul]
, where map_mul
is tried "too soon" and fails. Thanks to the speedup of leanprover/lean4#2478 the impact is very limited, only in files that already were close to the timeout.
simp
not firing sometimesThis affects map_smulโโ
and related definitions. For simp
lemmas Lean apparently uses a slightly different mechanism to find instances, so that rw
can find every argument to map_smulโโ
successfully but simp
can't: leanprover/lean4#3701.
Especially in the category theory library, we might sometimes have a type A
which is also accessible as a synonym (Bundled A hA).1
. Instance synthesis doesn't always work if we have f : A โ* B
but x * y : (Bundled A hA).1
or vice versa. This seems to be mostly fixed by keeping A B
as outParam
s in MulHomClass F A B
. (Presumably because Lean will do a definitional check A =?= (Bundled A hA).1
instead of using the syntax in the discrimination tree.)
The timeouts can be worked around for now by specifying which map_mul
we mean, either as map_mul f
for some explicit f
, or as e.g. MonoidHomClass.map_mul
.
map_smulโโ
not firing as simp
lemma can be worked around by going back to the pre-FunLike situation and making LinearMap.map_smulโโ
a simp
lemma instead of the generic map_smulโโ
. Writing simp [map_smulโโ _]
also works.
Co-authored-by: Matthew Ballard <matt@mrb.email> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Scott Morrison <scott@tqft.net> Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>
@@ -62,7 +62,7 @@ add_decl_doc CuspForm.toSlashInvariantForm
`SlashInvariantFormClass` by requiring that the functions be holomorphic and bounded
at infinity. -/
class ModularFormClass (F : Type*) (ฮ : outParam <| Subgroup (SL(2, โค))) (k : outParam โค)
- extends SlashInvariantFormClass F ฮ k where
+ [FunLike F โ โ] extends SlashInvariantFormClass F ฮ k : Prop where
holo : โ f : F, MDifferentiable ๐(โ) ๐(โ) (f : โ โ โ)
bdd_at_infty : โ (f : F) (A : SL(2, โค)), IsBoundedAtImInfty (f โฃ[k] A)
#align modular_form_class ModularFormClass
@@ -71,23 +71,28 @@ class ModularFormClass (F : Type*) (ฮ : outParam <| Subgroup (SL(2, โค))) (k :
`SlashInvariantFormClass` by requiring that the functions be holomorphic and zero
at infinity. -/
class CuspFormClass (F : Type*) (ฮ : outParam <| Subgroup (SL(2, โค))) (k : outParam โค)
- extends SlashInvariantFormClass F ฮ k where
+ [FunLike F โ โ] extends SlashInvariantFormClass F ฮ k : Prop where
holo : โ f : F, MDifferentiable ๐(โ) ๐(โ) (f : โ โ โ)
zero_at_infty : โ (f : F) (A : SL(2, โค)), IsZeroAtImInfty (f โฃ[k] A)
#align cusp_form_class CuspFormClass
-instance (priority := 100) ModularFormClass.modularForm :
- ModularFormClass (ModularForm ฮ k) ฮ k where
+instance (priority := 100) ModularForm.funLike :
+ FunLike (ModularForm ฮ k) โ โ where
coe f := f.toFun
coe_injective' f g h := by cases f; cases g; congr; exact DFunLike.ext' h
+
+instance (priority := 100) ModularFormClass.modularForm :
+ ModularFormClass (ModularForm ฮ k) ฮ k where
slash_action_eq f := f.slash_action_eq'
holo := ModularForm.holo'
bdd_at_infty := ModularForm.bdd_at_infty'
#align modular_form_class.modular_form ModularFormClass.modularForm
-instance (priority := 100) CuspFormClass.cuspForm : CuspFormClass (CuspForm ฮ k) ฮ k where
+instance (priority := 100) CuspForm.funLike : FunLike (CuspForm ฮ k) โ โ where
coe f := f.toFun
coe_injective' f g h := by cases f; cases g; congr; exact DFunLike.ext' h
+
+instance (priority := 100) CuspFormClass.cuspForm : CuspFormClass (CuspForm ฮ k) ฮ k where
slash_action_eq f := f.slash_action_eq'
holo := CuspForm.holo'
zero_at_infty := CuspForm.zero_at_infty'
@@ -417,9 +422,7 @@ instance : Module โ (CuspForm ฮ k) :=
instance : Inhabited (CuspForm ฮ k) :=
โจ0โฉ
-instance (priority := 99) [CuspFormClass F ฮ k] : ModularFormClass F ฮ k where
- coe := DFunLike.coe
- coe_injective' := DFunLike.coe_injective'
+instance (priority := 99) [FunLike F โ โ] [CuspFormClass F ฮ k] : ModularFormClass F ฮ k where
slash_action_eq := SlashInvariantFormClass.slash_action_eq
holo := CuspFormClass.holo
bdd_at_infty _ _ := (CuspFormClass.zero_at_infty _ _).boundedAtFilter
FunLike
to DFunLike
(#9785)
This prepares for the introduction of a non-dependent synonym of FunLike, which helps a lot with keeping #8386 readable.
This is entirely search-and-replace in 680197f combined with manual fixes in 4145626, e900597 and b8428f8. The commands that generated this change:
sed -i 's/\bFunLike\b/DFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\btoFunLike\b/toDFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/import Mathlib.Data.DFunLike/import Mathlib.Data.FunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\bHom_FunLike\b/Hom_DFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\binstFunLike\b/instDFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\bfunLike\b/instDFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\btoo many metavariables to apply `fun_like.has_coe_to_fun`/too many metavariables to apply `DFunLike.hasCoeToFun`/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>
@@ -79,7 +79,7 @@ class CuspFormClass (F : Type*) (ฮ : outParam <| Subgroup (SL(2, โค))) (k : ou
instance (priority := 100) ModularFormClass.modularForm :
ModularFormClass (ModularForm ฮ k) ฮ k where
coe f := f.toFun
- coe_injective' f g h := by cases f; cases g; congr; exact FunLike.ext' h
+ coe_injective' f g h := by cases f; cases g; congr; exact DFunLike.ext' h
slash_action_eq f := f.slash_action_eq'
holo := ModularForm.holo'
bdd_at_infty := ModularForm.bdd_at_infty'
@@ -87,7 +87,7 @@ instance (priority := 100) ModularFormClass.modularForm :
instance (priority := 100) CuspFormClass.cuspForm : CuspFormClass (CuspForm ฮ k) ฮ k where
coe f := f.toFun
- coe_injective' f g h := by cases f; cases g; congr; exact FunLike.ext' h
+ coe_injective' f g h := by cases f; cases g; congr; exact DFunLike.ext' h
slash_action_eq f := f.slash_action_eq'
holo := CuspForm.holo'
zero_at_infty := CuspForm.zero_at_infty'
@@ -112,12 +112,12 @@ theorem CuspForm.toSlashInvariantForm_coe (f : CuspForm ฮ k) : โf.1 = f := rf
@[ext]
theorem ModularForm.ext {f g : ModularForm ฮ k} (h : โ x, f x = g x) : f = g :=
- FunLike.ext f g h
+ DFunLike.ext f g h
#align modular_form.ext ModularForm.ext
@[ext]
theorem CuspForm.ext {f g : CuspForm ฮ k} (h : โ x, f x = g x) : f = g :=
- FunLike.ext f g h
+ DFunLike.ext f g h
#align cusp_form.ext CuspForm.ext
/-- Copy of a `ModularForm` with a new `toFun` equal to the old one. Useful to fix
@@ -233,7 +233,7 @@ theorem sub_apply (f g : ModularForm ฮ k) (z : โ) : (f - g) z = f z - g z :=
#align modular_form.sub_apply ModularForm.sub_apply
instance : AddCommGroup (ModularForm ฮ k) :=
- FunLike.coe_injective.addCommGroup _ rfl coe_add coe_neg coe_sub coe_smul coe_smul
+ DFunLike.coe_injective.addCommGroup _ rfl coe_add coe_neg coe_sub coe_smul coe_smul
/-- Additive coercion from `ModularForm` to `โ โ โ`. -/
@[simps]
@@ -244,7 +244,7 @@ def coeHom : ModularForm ฮ k โ+ โ โ โ where
#align modular_form.coe_hom ModularForm.coeHom
instance : Module โ (ModularForm ฮ k) :=
- Function.Injective.module โ coeHom FunLike.coe_injective fun _ _ => rfl
+ Function.Injective.module โ coeHom DFunLike.coe_injective fun _ _ => rfl
instance : Inhabited (ModularForm ฮ k) :=
โจ0โฉ
@@ -401,7 +401,7 @@ theorem sub_apply (f g : CuspForm ฮ k) (z : โ) : (f - g) z = f z - g z :=
#align cusp_form.sub_apply CuspForm.sub_apply
instance : AddCommGroup (CuspForm ฮ k) :=
- FunLike.coe_injective.addCommGroup _ rfl coe_add coe_neg coe_sub coe_smul coe_smul
+ DFunLike.coe_injective.addCommGroup _ rfl coe_add coe_neg coe_sub coe_smul coe_smul
/-- Additive coercion from `CuspForm` to `โ โ โ`. -/
@[simps]
@@ -412,14 +412,14 @@ def coeHom : CuspForm ฮ k โ+ โ โ โ where
#align cusp_form.coe_hom CuspForm.coeHom
instance : Module โ (CuspForm ฮ k) :=
- Function.Injective.module โ coeHom FunLike.coe_injective fun _ _ => rfl
+ Function.Injective.module โ coeHom DFunLike.coe_injective fun _ _ => rfl
instance : Inhabited (CuspForm ฮ k) :=
โจ0โฉ
instance (priority := 99) [CuspFormClass F ฮ k] : ModularFormClass F ฮ k where
- coe := FunLike.coe
- coe_injective' := FunLike.coe_injective'
+ coe := DFunLike.coe
+ coe_injective' := DFunLike.coe_injective'
slash_action_eq := SlashInvariantFormClass.slash_action_eq
holo := CuspFormClass.holo
bdd_at_infty _ _ := (CuspFormClass.zero_at_infty _ _).boundedAtFilter
With about 2200 lines, this is the largest file in Geometry/Manifolds.
@@ -4,9 +4,9 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Birkbeck
-/
import Mathlib.Algebra.DirectSum.Algebra
-import Mathlib.Algebra.GradedMonoid
import Mathlib.Analysis.Complex.UpperHalfPlane.FunctionsBoundedAtInfty
import Mathlib.Analysis.Complex.UpperHalfPlane.Manifold
+import Mathlib.Geometry.Manifold.MFDeriv.SpecificFunctions
import Mathlib.NumberTheory.ModularForms.SlashInvariantForms
#align_import number_theory.modular_forms.basic from "leanprover-community/mathlib"@"57f9349f2fe19d2de7207e99b0341808d977cdcf"
This adds the graded ring instance to spaces of modular forms.
Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Chris Birkbeck <c.birkbeck@uea.ac.uk>
@@ -3,6 +3,8 @@ Copyright (c) 2022 Chris Birkbeck. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Birkbeck
-/
+import Mathlib.Algebra.DirectSum.Algebra
+import Mathlib.Algebra.GradedMonoid
import Mathlib.Analysis.Complex.UpperHalfPlane.FunctionsBoundedAtInfty
import Mathlib.Analysis.Complex.UpperHalfPlane.Manifold
import Mathlib.NumberTheory.ModularForms.SlashInvariantForms
@@ -12,7 +14,8 @@ import Mathlib.NumberTheory.ModularForms.SlashInvariantForms
/-!
# Modular forms
-This file defines modular forms and proves some basic properties about them.
+This file defines modular forms and proves some basic properties about them. Including constructing
+the graded ring of modular forms.
We begin by defining modular forms and cusp forms as extension of `SlashInvariantForm`s then we
define the space of modular forms, cusp forms and prove that the product of two modular forms is a
@@ -265,18 +268,43 @@ theorem mul_coe {k_1 k_2 : โค} {ฮ : Subgroup SL(2, โค)} (f : ModularForm ฮ k
rfl
#align modular_form.mul_coe ModularForm.mul_coe
-instance : One (ModularForm ฮ 0) :=
- โจ { toSlashInvariantForm := 1
- holo' := fun x => mdifferentiableAt_const ๐(โ, โ) ๐(โ, โ)
- bdd_at_infty' := fun A => by
- simpa only [SlashInvariantForm.one_coe_eq_one,
- ModularForm.is_invariant_one] using atImInfty.const_boundedAtFilter (1 : โ) }โฉ
+/-- The constant function with value `x : โ` as a modular form of weight 0 and any level. -/
+@[simps! (config := .asFn) toFun toSlashInvariantForm]
+def const (x : โ) : ModularForm ฮ 0 where
+ toSlashInvariantForm := .const x
+ holo' x := mdifferentiableAt_const ๐(โ, โ) ๐(โ, โ)
+ bdd_at_infty' A := by
+ simpa only [SlashInvariantForm.const_toFun,
+ ModularForm.is_invariant_const] using atImInfty.const_boundedAtFilter x
+
+instance : One (ModularForm ฮ 0) where
+ one := { const 1 with toSlashInvariantForm := 1 }
@[simp]
-theorem one_coe_eq_one : ((1 : ModularForm ฮ 0) : โ โ โ) = 1 :=
+theorem one_coe_eq_one : โ(1 : ModularForm ฮ 0) = 1 :=
rfl
#align modular_form.one_coe_eq_one ModularForm.one_coe_eq_one
+instance (ฮ : Subgroup SL(2, โค)) : NatCast (ModularForm ฮ 0) where
+ natCast n := const n
+
+@[simp, norm_cast]
+lemma coe_natCast (ฮ : Subgroup SL(2, โค)) (n : โ) :
+ โ(n : ModularForm ฮ 0) = n := rfl
+
+lemma toSlashInvariantForm_natCast (ฮ : Subgroup SL(2, โค)) (n : โ) :
+ (n : ModularForm ฮ 0).toSlashInvariantForm = n := rfl
+
+instance (ฮ : Subgroup SL(2, โค)) : IntCast (ModularForm ฮ 0) where
+ intCast z := const z
+
+@[simp, norm_cast]
+lemma coe_intCast (ฮ : Subgroup SL(2, โค)) (z : โค) :
+ โ(z : ModularForm ฮ 0) = z := rfl
+
+lemma toSlashInvariantForm_intCast (ฮ : Subgroup SL(2, โค)) (z : โค) :
+ (z : ModularForm ฮ 0).toSlashInvariantForm = z := rfl
+
end ModularForm
namespace CuspForm
@@ -397,3 +425,55 @@ instance (priority := 99) [CuspFormClass F ฮ k] : ModularFormClass F ฮ k where
bdd_at_infty _ _ := (CuspFormClass.zero_at_infty _ _).boundedAtFilter
end CuspForm
+
+namespace ModularForm
+
+section GradedRing
+
+/-- Cast for modular forms, which is useful for avoiding `Heq`s. -/
+def mcast {a b : โค} {ฮ : Subgroup SL(2, โค)} (h : a = b) (f : ModularForm ฮ a) : ModularForm ฮ b
+ where
+ toFun := (f : โ โ โ)
+ slash_action_eq' A := h โธ f.slash_action_eq' A
+ holo' := f.holo'
+ bdd_at_infty' A := h โธ f.bdd_at_infty' A
+
+@[ext]
+theorem gradedMonoid_eq_of_cast {ฮ : Subgroup SL(2, โค)} {a b : GradedMonoid (ModularForm ฮ)}
+ (h : a.fst = b.fst) (h2 : mcast h a.snd = b.snd) : a = b := by
+ obtain โจi, aโฉ := a
+ obtain โจj, bโฉ := b
+ cases h
+ exact congr_arg _ h2
+
+instance (ฮ : Subgroup SL(2, โค)) : GradedMonoid.GOne (ModularForm ฮ) where
+ one := 1
+
+instance (ฮ : Subgroup SL(2, โค)) : GradedMonoid.GMul (ModularForm ฮ) where
+ mul f g := f.mul g
+
+instance instGCommRing (ฮ : Subgroup SL(2, โค)) : DirectSum.GCommRing (ModularForm ฮ) where
+ one_mul a := gradedMonoid_eq_of_cast (zero_add _) (ext fun _ => one_mul _)
+ mul_one a := gradedMonoid_eq_of_cast (add_zero _) (ext fun _ => mul_one _)
+ mul_assoc a b c := gradedMonoid_eq_of_cast (add_assoc _ _ _) (ext fun _ => mul_assoc _ _ _)
+ mul_zero {i j} f := ext fun _ => mul_zero _
+ zero_mul {i j} f := ext fun _ => zero_mul _
+ mul_add {i j} f g h := ext fun _ => mul_add _ _ _
+ add_mul {i j} f g h := ext fun _ => add_mul _ _ _
+ mul_comm a b := gradedMonoid_eq_of_cast (add_comm _ _) (ext fun _ => mul_comm _ _)
+ natCast := Nat.cast
+ natCast_zero := ext fun _ => Nat.cast_zero
+ natCast_succ n := ext fun _ => Nat.cast_succ _
+ intCast := Int.cast
+ intCast_ofNat n := ext fun _ => AddGroupWithOne.intCast_ofNat _
+ intCast_negSucc_ofNat n := ext fun _ => AddGroupWithOne.intCast_negSucc _
+
+instance instGAlgebra (ฮ : Subgroup SL(2, โค)) : DirectSum.GAlgebra โ (ModularForm ฮ) where
+ toFun := { toFun := const, map_zero' := rfl, map_add' := fun _ _ => rfl }
+ map_one := rfl
+ map_mul _x _y := rfl
+ commutes _c _x := gradedMonoid_eq_of_cast (add_comm _ _) (ext fun _ => mul_comm _ _)
+ smul_def _x _x := gradedMonoid_eq_of_cast (zero_add _).symm (ext fun _ => rfl)
+
+open scoped DirectSum in
+example (ฮ : Subgroup SL(2, โค)) : Algebra โ (โจ i, ModularForm ฮ i) := inferInstance
@@ -14,7 +14,7 @@ import Mathlib.NumberTheory.ModularForms.SlashInvariantForms
This file defines modular forms and proves some basic properties about them.
-We begin by defining modular forms and cusp forms as extension of `slash_invariant_forms` then we
+We begin by defining modular forms and cusp forms as extension of `SlashInvariantForm`s then we
define the space of modular forms, cusp forms and prove that the product of two modular forms is a
modular form.
-/
@@ -37,26 +37,26 @@ variable (F : Type*) (ฮ : Subgroup SL(2, โค)) (k : โค)
open scoped ModularForm
-/-- These are `slash_invariant_form`'s that are holomophic and bounded at infinity. -/
+/-- These are `SlashInvariantForm`'s that are holomophic and bounded at infinity. -/
structure ModularForm extends SlashInvariantForm ฮ k where
holo' : MDifferentiable ๐(โ) ๐(โ) (toSlashInvariantForm : โ โ โ)
bdd_at_infty' : โ A : SL(2, โค), IsBoundedAtImInfty (toSlashInvariantForm โฃ[k] A)
#align modular_form ModularForm
-/-- The `slash_invariant_form` associated to a `modular_form`. -/
+/-- The `SlashInvariantForm` associated to a `ModularForm`. -/
add_decl_doc ModularForm.toSlashInvariantForm
-/-- These are `slash_invariant_form`s that are holomophic and zero at infinity. -/
+/-- These are `SlashInvariantForm`s that are holomophic and zero at infinity. -/
structure CuspForm extends SlashInvariantForm ฮ k where
holo' : MDifferentiable ๐(โ) ๐(โ) (toSlashInvariantForm : โ โ โ)
zero_at_infty' : โ A : SL(2, โค), IsZeroAtImInfty (toSlashInvariantForm โฃ[k] A)
#align cusp_form CuspForm
-/-- The `slash_invariant_form` associated to a `cusp_form`. -/
+/-- The `SlashInvariantForm` associated to a `CuspForm`. -/
add_decl_doc CuspForm.toSlashInvariantForm
-/-- `modular_form_class F ฮ k` says that `F` is a type of bundled functions that extend
-`slash_invariant_form_class` by requiring that the functions be holomorphic and bounded
+/-- `ModularFormClass F ฮ k` says that `F` is a type of bundled functions that extend
+`SlashInvariantFormClass` by requiring that the functions be holomorphic and bounded
at infinity. -/
class ModularFormClass (F : Type*) (ฮ : outParam <| Subgroup (SL(2, โค))) (k : outParam โค)
extends SlashInvariantFormClass F ฮ k where
@@ -64,8 +64,8 @@ class ModularFormClass (F : Type*) (ฮ : outParam <| Subgroup (SL(2, โค))) (k :
bdd_at_infty : โ (f : F) (A : SL(2, โค)), IsBoundedAtImInfty (f โฃ[k] A)
#align modular_form_class ModularFormClass
-/-- `cusp_form_class F ฮ k` says that `F` is a type of bundled functions that extend
-`slash_invariant_form_class` by requiring that the functions be holomorphic and zero
+/-- `CuspFormClass F ฮ k` says that `F` is a type of bundled functions that extend
+`SlashInvariantFormClass` by requiring that the functions be holomorphic and zero
at infinity. -/
class CuspFormClass (F : Type*) (ฮ : outParam <| Subgroup (SL(2, โค))) (k : outParam โค)
extends SlashInvariantFormClass F ฮ k where
@@ -117,7 +117,7 @@ theorem CuspForm.ext {f g : CuspForm ฮ k} (h : โ x, f x = g x) : f = g :=
FunLike.ext f g h
#align cusp_form.ext CuspForm.ext
-/-- Copy of a `modular_form` with a new `to_fun` equal to the old one. Useful to fix
+/-- Copy of a `ModularForm` with a new `toFun` equal to the old one. Useful to fix
definitional equalities. -/
protected def ModularForm.copy (f : ModularForm ฮ k) (f' : โ โ โ) (h : f' = โf) :
ModularForm ฮ k where
@@ -126,7 +126,7 @@ protected def ModularForm.copy (f : ModularForm ฮ k) (f' : โ โ โ) (h : f'
bdd_at_infty' A := h.symm โธ f.bdd_at_infty' A
#align modular_form.copy ModularForm.copy
-/-- Copy of a `cusp_form` with a new `to_fun` equal to the old one. Useful to fix
+/-- Copy of a `CuspForm` with a new `toFun` equal to the old one. Useful to fix
definitional equalities. -/
protected def CuspForm.copy (f : CuspForm ฮ k) (f' : โ โ โ) (h : f' = โf) : CuspForm ฮ k where
toSlashInvariantForm := f.1.copy f' h
@@ -159,11 +159,11 @@ theorem add_apply (f g : ModularForm ฮ k) (z : โ) : (f + g) z = f z + g z :=
rfl
#align modular_form.add_apply ModularForm.add_apply
-instance hasZero : Zero (ModularForm ฮ k) :=
+instance instZero : Zero (ModularForm ฮ k) :=
โจ { toSlashInvariantForm := 0
holo' := fun _ => mdifferentiableAt_const ๐(โ, โ) ๐(โ, โ)
bdd_at_infty' := fun A => by simpa using zero_form_isBoundedAtImInfty } โฉ
-#align modular_form.has_zero ModularForm.hasZero
+#align modular_form.has_zero ModularForm.instZero
@[simp]
theorem coe_zero : โ(0 : ModularForm ฮ k) = (0 : โ โ โ) :=
@@ -179,12 +179,12 @@ section
variable {ฮฑ : Type*} [SMul ฮฑ โ] [IsScalarTower ฮฑ โ โ]
-instance hasSmul : SMul ฮฑ (ModularForm ฮ k) :=
+instance instSMul : SMul ฮฑ (ModularForm ฮ k) :=
โจfun c f =>
{ toSlashInvariantForm := c โข f.1
holo' := by simpa using f.holo'.const_smul (c โข (1 : โ))
bdd_at_infty' := fun A => by simpa using (f.bdd_at_infty' A).const_smul_left (c โข (1 : โ)) }โฉ
-#align modular_form.has_smul ModularForm.hasSmul
+#align modular_form.has_smul ModularForm.instSMul
@[simp]
theorem coe_smul (f : ModularForm ฮ k) (n : ฮฑ) : โ(n โข f) = n โข โf :=
@@ -198,12 +198,12 @@ theorem smul_apply (f : ModularForm ฮ k) (n : ฮฑ) (z : โ) : (n โข f) z = n
end
-instance hasNeg : Neg (ModularForm ฮ k) :=
+instance instNeg : Neg (ModularForm ฮ k) :=
โจfun f =>
{ toSlashInvariantForm := -f.1
holo' := f.holo'.neg
bdd_at_infty' := fun A => by simpa using (f.bdd_at_infty' A).neg }โฉ
-#align modular_form.has_neg ModularForm.hasNeg
+#align modular_form.has_neg ModularForm.instNeg
@[simp]
theorem coe_neg (f : ModularForm ฮ k) : โ(-f) = -f :=
@@ -215,9 +215,9 @@ theorem neg_apply (f : ModularForm ฮ k) (z : โ) : (-f) z = -f z :=
rfl
#align modular_form.neg_apply ModularForm.neg_apply
-instance hasSub : Sub (ModularForm ฮ k) :=
+instance instSub : Sub (ModularForm ฮ k) :=
โจfun f g => f + -gโฉ
-#align modular_form.has_sub ModularForm.hasSub
+#align modular_form.has_sub ModularForm.instSub
@[simp]
theorem coe_sub (f g : ModularForm ฮ k) : โ(f - g) = f - g :=
@@ -232,7 +232,7 @@ theorem sub_apply (f g : ModularForm ฮ k) (z : โ) : (f - g) z = f z - g z :=
instance : AddCommGroup (ModularForm ฮ k) :=
FunLike.coe_injective.addCommGroup _ rfl coe_add coe_neg coe_sub coe_smul coe_smul
-/-- Additive coercion from `modular_form` to `โ โ โ`. -/
+/-- Additive coercion from `ModularForm` to `โ โ โ`. -/
@[simps]
def coeHom : ModularForm ฮ k โ+ โ โ โ where
toFun f := f
@@ -302,11 +302,11 @@ theorem add_apply (f g : CuspForm ฮ k) (z : โ) : (f + g) z = f z + g z :=
rfl
#align cusp_form.add_apply CuspForm.add_apply
-instance hasZero : Zero (CuspForm ฮ k) :=
+instance instZero : Zero (CuspForm ฮ k) :=
โจ { toSlashInvariantForm := 0
holo' := fun _ => mdifferentiableAt_const ๐(โ, โ) ๐(โ, โ)
zero_at_infty' := by simpa using Filter.zero_zeroAtFilter _ } โฉ
-#align cusp_form.has_zero CuspForm.hasZero
+#align cusp_form.has_zero CuspForm.instZero
@[simp]
theorem coe_zero : โ(0 : CuspForm ฮ k) = (0 : โ โ โ) :=
@@ -322,12 +322,12 @@ section
variable {ฮฑ : Type*} [SMul ฮฑ โ] [IsScalarTower ฮฑ โ โ]
-instance hasSmul : SMul ฮฑ (CuspForm ฮ k) :=
+instance instSMul : SMul ฮฑ (CuspForm ฮ k) :=
โจfun c f =>
{ toSlashInvariantForm := c โข f.1
holo' := by simpa using f.holo'.const_smul (c โข (1 : โ))
zero_at_infty' := fun A => by simpa using (f.zero_at_infty' A).smul (c โข (1 : โ)) }โฉ
-#align cusp_form.has_smul CuspForm.hasSmul
+#align cusp_form.has_smul CuspForm.instSMul
@[simp]
theorem coe_smul (f : CuspForm ฮ k) (n : ฮฑ) : โ(n โข f) = n โข โf :=
@@ -341,12 +341,12 @@ theorem smul_apply (f : CuspForm ฮ k) (n : ฮฑ) {z : โ} : (n โข f) z = n โข
end
-instance hasNeg : Neg (CuspForm ฮ k) :=
+instance instNeg : Neg (CuspForm ฮ k) :=
โจfun f =>
{ toSlashInvariantForm := -f.1
holo' := f.holo'.neg
zero_at_infty' := fun A => by simpa using (f.zero_at_infty' A).neg }โฉ
-#align cusp_form.has_neg CuspForm.hasNeg
+#align cusp_form.has_neg CuspForm.instNeg
@[simp]
theorem coe_neg (f : CuspForm ฮ k) : โ(-f) = -f :=
@@ -358,9 +358,9 @@ theorem neg_apply (f : CuspForm ฮ k) (z : โ) : (-f) z = -f z :=
rfl
#align cusp_form.neg_apply CuspForm.neg_apply
-instance hasSub : Sub (CuspForm ฮ k) :=
+instance instSub : Sub (CuspForm ฮ k) :=
โจfun f g => f + -gโฉ
-#align cusp_form.has_sub CuspForm.hasSub
+#align cusp_form.has_sub CuspForm.instSub
@[simp]
theorem coe_sub (f g : CuspForm ฮ k) : โ(f - g) = f - g :=
@@ -375,7 +375,7 @@ theorem sub_apply (f g : CuspForm ฮ k) (z : โ) : (f - g) z = f z - g z :=
instance : AddCommGroup (CuspForm ฮ k) :=
FunLike.coe_injective.addCommGroup _ rfl coe_add coe_neg coe_sub coe_smul coe_smul
-/-- Additive coercion from `cusp_form` to `โ โ โ`. -/
+/-- Additive coercion from `CuspForm` to `โ โ โ`. -/
@[simps]
def coeHom : CuspForm ฮ k โ+ โ โ โ where
toFun f := f
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -33,7 +33,7 @@ section ModularForm
open ModularForm
-variable (F : Type _) (ฮ : Subgroup SL(2, โค)) (k : โค)
+variable (F : Type*) (ฮ : Subgroup SL(2, โค)) (k : โค)
open scoped ModularForm
@@ -58,7 +58,7 @@ add_decl_doc CuspForm.toSlashInvariantForm
/-- `modular_form_class F ฮ k` says that `F` is a type of bundled functions that extend
`slash_invariant_form_class` by requiring that the functions be holomorphic and bounded
at infinity. -/
-class ModularFormClass (F : Type _) (ฮ : outParam <| Subgroup (SL(2, โค))) (k : outParam โค)
+class ModularFormClass (F : Type*) (ฮ : outParam <| Subgroup (SL(2, โค))) (k : outParam โค)
extends SlashInvariantFormClass F ฮ k where
holo : โ f : F, MDifferentiable ๐(โ) ๐(โ) (f : โ โ โ)
bdd_at_infty : โ (f : F) (A : SL(2, โค)), IsBoundedAtImInfty (f โฃ[k] A)
@@ -67,7 +67,7 @@ class ModularFormClass (F : Type _) (ฮ : outParam <| Subgroup (SL(2, โค))) (k
/-- `cusp_form_class F ฮ k` says that `F` is a type of bundled functions that extend
`slash_invariant_form_class` by requiring that the functions be holomorphic and zero
at infinity. -/
-class CuspFormClass (F : Type _) (ฮ : outParam <| Subgroup (SL(2, โค))) (k : outParam โค)
+class CuspFormClass (F : Type*) (ฮ : outParam <| Subgroup (SL(2, โค))) (k : outParam โค)
extends SlashInvariantFormClass F ฮ k where
holo : โ f : F, MDifferentiable ๐(โ) ๐(โ) (f : โ โ โ)
zero_at_infty : โ (f : F) (A : SL(2, โค)), IsZeroAtImInfty (f โฃ[k] A)
@@ -140,7 +140,7 @@ namespace ModularForm
open SlashInvariantForm
-variable {F : Type _} {ฮ : Subgroup SL(2, โค)} {k : โค}
+variable {F : Type*} {ฮ : Subgroup SL(2, โค)} {k : โค}
instance add : Add (ModularForm ฮ k) :=
โจfun f g =>
@@ -177,7 +177,7 @@ theorem zero_apply (z : โ) : (0 : ModularForm ฮ k) z = 0 :=
section
-variable {ฮฑ : Type _} [SMul ฮฑ โ] [IsScalarTower ฮฑ โ โ]
+variable {ฮฑ : Type*} [SMul ฮฑ โ] [IsScalarTower ฮฑ โ โ]
instance hasSmul : SMul ฮฑ (ModularForm ฮ k) :=
โจfun c f =>
@@ -283,7 +283,7 @@ namespace CuspForm
open ModularForm
-variable {F : Type _} {ฮ : Subgroup SL(2, โค)} {k : โค}
+variable {F : Type*} {ฮ : Subgroup SL(2, โค)} {k : โค}
instance hasAdd : Add (CuspForm ฮ k) :=
โจfun f g =>
@@ -320,7 +320,7 @@ theorem zero_apply (z : โ) : (0 : CuspForm ฮ k) z = 0 :=
section
-variable {ฮฑ : Type _} [SMul ฮฑ โ] [IsScalarTower ฮฑ โ โ]
+variable {ฮฑ : Type*} [SMul ฮฑ โ] [IsScalarTower ฮฑ โ โ]
instance hasSmul : SMul ฮฑ (CuspForm ฮ k) :=
โจfun c f =>
@@ -2,16 +2,13 @@
Copyright (c) 2022 Chris Birkbeck. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Birkbeck
-
-! This file was ported from Lean 3 source module number_theory.modular_forms.basic
-! leanprover-community/mathlib commit 57f9349f2fe19d2de7207e99b0341808d977cdcf
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Analysis.Complex.UpperHalfPlane.FunctionsBoundedAtInfty
import Mathlib.Analysis.Complex.UpperHalfPlane.Manifold
import Mathlib.NumberTheory.ModularForms.SlashInvariantForms
+#align_import number_theory.modular_forms.basic from "leanprover-community/mathlib"@"57f9349f2fe19d2de7207e99b0341808d977cdcf"
+
/-!
# Modular forms
The unported dependencies are
algebra.order.module
init.core
linear_algebra.free_module.finite.rank
algebra.order.monoid.cancel.defs
algebra.abs
algebra.group_power.lemmas
init.data.list.basic
linear_algebra.free_module.rank
algebra.order.monoid.cancel.basic
init.data.list.default
topology.subset_properties
init.logic
The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file