state
stringlengths
0
159k
srcUpToTactic
stringlengths
387
167k
nextTactic
stringlengths
3
9k
declUpToTactic
stringlengths
22
11.5k
declId
stringlengths
38
95
decl
stringlengths
16
1.89k
file_tag
stringlengths
17
73
F : Type u_1 M : Type u_2 N : Type u_3 R : Type u_4 α : Type u_5 inst✝ : NonUnitalNonAssocRing α f g : CentroidHom α src✝ : α →+ α := ↑f - ↑g a b : α ⊢ (⇑f - ⇑g) (a * b) = (⇑f - ⇑g) a * b
/- Copyright (c) 2022 Yaël Dillies. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies, Christopher Hoskin -/ import Mathlib.Algebra.Module.Hom import Mathlib.RingTheory.NonUnitalSubsemiring.Basic import Mathlib.RingTheory.Subsemiring.Basic #align_import algebra.hom.centroid from "leanprover-community/mathlib"@"6cb77a8eaff0ddd100e87b1591c6d3ad319514ff" /-! # Centroid homomorphisms Let `A` be a (non unital, non associative) algebra. The centroid of `A` is the set of linear maps `T` on `A` such that `T` commutes with left and right multiplication, that is to say, for all `a` and `b` in `A`, $$ T(ab) = (Ta)b, T(ab) = a(Tb). $$ In mathlib we call elements of the centroid "centroid homomorphisms" (`CentroidHom`) in keeping with `AddMonoidHom` etc. We use the `FunLike` design, so each type of morphisms has a companion typeclass which is meant to be satisfied by itself and all stricter types. ## Types of morphisms * `CentroidHom`: Maps which preserve left and right multiplication. ## Typeclasses * `CentroidHomClass` ## References * [Jacobson, Structure of Rings][Jacobson1956] * [McCrimmon, A taste of Jordan algebras][mccrimmon2004] ## Tags centroid -/ open Function variable {F M N R α : Type*} /-- The type of centroid homomorphisms from `α` to `α`. -/ structure CentroidHom (α : Type*) [NonUnitalNonAssocSemiring α] extends α →+ α where /-- Commutativity of centroid homomorphims with left multiplication. -/ map_mul_left' (a b : α) : toFun (a * b) = a * toFun b /-- Commutativity of centroid homomorphims with right multiplication. -/ map_mul_right' (a b : α) : toFun (a * b) = toFun a * b #align centroid_hom CentroidHom attribute [nolint docBlame] CentroidHom.toAddMonoidHom /-- `CentroidHomClass F α` states that `F` is a type of centroid homomorphisms. You should extend this class when you extend `CentroidHom`. -/ class CentroidHomClass (F : Type*) (α : outParam <| Type*) [NonUnitalNonAssocSemiring α] extends AddMonoidHomClass F α α where /-- Commutativity of centroid homomorphims with left multiplication. -/ map_mul_left (f : F) (a b : α) : f (a * b) = a * f b /-- Commutativity of centroid homomorphims with right multiplication. -/ map_mul_right (f : F) (a b : α) : f (a * b) = f a * b #align centroid_hom_class CentroidHomClass export CentroidHomClass (map_mul_left map_mul_right) instance [NonUnitalNonAssocSemiring α] [CentroidHomClass F α] : CoeTC F (CentroidHom α) := ⟨fun f ↦ { (f : α →+ α) with toFun := f map_mul_left' := map_mul_left f map_mul_right' := map_mul_right f }⟩ /-! ### Centroid homomorphisms -/ namespace CentroidHom section NonUnitalNonAssocSemiring variable [NonUnitalNonAssocSemiring α] instance : CentroidHomClass (CentroidHom α) α where coe f := f.toFun coe_injective' f g h := by cases f cases g congr with x exact congrFun h x map_zero f := f.map_zero' map_add f := f.map_add' map_mul_left f := f.map_mul_left' map_mul_right f := f.map_mul_right' /-- Helper instance for when there's too many metavariables to apply `FunLike.CoeFun` directly. -/ /- Porting note: Lean gave me `unknown constant 'FunLike.CoeFun'` and says `CoeFun` is a type mismatch, so I used `library_search`. -/ instance : CoeFun (CentroidHom α) fun _ ↦ α → α := inferInstanceAs (CoeFun (CentroidHom α) fun _ ↦ α → α) -- Porting note: removed @[simp]; not in normal form. (`toAddMonoidHom_eq_coe` below ensures that -- the LHS simplifies to the RHS anyway.) theorem toFun_eq_coe {f : CentroidHom α} : f.toFun = f := rfl #align centroid_hom.to_fun_eq_coe CentroidHom.toFun_eq_coe @[ext] theorem ext {f g : CentroidHom α} (h : ∀ a, f a = g a) : f = g := FunLike.ext f g h #align centroid_hom.ext CentroidHom.ext @[simp, norm_cast] theorem coe_toAddMonoidHom (f : CentroidHom α) : ⇑(f : α →+ α) = f := rfl #align centroid_hom.coe_to_add_monoid_hom CentroidHom.coe_toAddMonoidHom @[simp] theorem toAddMonoidHom_eq_coe (f : CentroidHom α) : f.toAddMonoidHom = f := rfl #align centroid_hom.to_add_monoid_hom_eq_coe CentroidHom.toAddMonoidHom_eq_coe theorem coe_toAddMonoidHom_injective : Injective ((↑) : CentroidHom α → α →+ α) := fun _f _g h => ext fun a ↦ haveI := FunLike.congr_fun h a this #align centroid_hom.coe_to_add_monoid_hom_injective CentroidHom.coe_toAddMonoidHom_injective /-- Turn a centroid homomorphism into an additive monoid endomorphism. -/ def toEnd (f : CentroidHom α) : AddMonoid.End α := (f : α →+ α) #align centroid_hom.to_End CentroidHom.toEnd theorem toEnd_injective : Injective (CentroidHom.toEnd : CentroidHom α → AddMonoid.End α) := coe_toAddMonoidHom_injective #align centroid_hom.to_End_injective CentroidHom.toEnd_injective /-- Copy of a `CentroidHom` with a new `toFun` equal to the old one. Useful to fix definitional equalities. -/ protected def copy (f : CentroidHom α) (f' : α → α) (h : f' = f) : CentroidHom α := { f.toAddMonoidHom.copy f' <| h with toFun := f' map_mul_left' := fun a b ↦ by simp_rw [h, map_mul_left] map_mul_right' := fun a b ↦ by simp_rw [h, map_mul_right] } #align centroid_hom.copy CentroidHom.copy @[simp] theorem coe_copy (f : CentroidHom α) (f' : α → α) (h : f' = f) : ⇑(f.copy f' h) = f' := rfl #align centroid_hom.coe_copy CentroidHom.coe_copy theorem copy_eq (f : CentroidHom α) (f' : α → α) (h : f' = f) : f.copy f' h = f := FunLike.ext' h #align centroid_hom.copy_eq CentroidHom.copy_eq variable (α) /-- `id` as a `CentroidHom`. -/ protected def id : CentroidHom α := { AddMonoidHom.id α with map_mul_left' := fun _ _ ↦ rfl map_mul_right' := fun _ _ ↦ rfl } #align centroid_hom.id CentroidHom.id instance : Inhabited (CentroidHom α) := ⟨CentroidHom.id α⟩ @[simp, norm_cast] theorem coe_id : ⇑(CentroidHom.id α) = id := rfl #align centroid_hom.coe_id CentroidHom.coe_id @[simp, norm_cast] theorem toAddMonoidHom_id : (CentroidHom.id α : α →+ α) = AddMonoidHom.id α := rfl #align centroid_hom.coe_to_add_monoid_hom_id CentroidHom.toAddMonoidHom_id variable {α} @[simp] theorem id_apply (a : α) : CentroidHom.id α a = a := rfl #align centroid_hom.id_apply CentroidHom.id_apply /-- Composition of `CentroidHom`s as a `CentroidHom`. -/ def comp (g f : CentroidHom α) : CentroidHom α := { g.toAddMonoidHom.comp f.toAddMonoidHom with map_mul_left' := fun _a _b ↦ (congr_arg g <| f.map_mul_left' _ _).trans <| g.map_mul_left' _ _ map_mul_right' := fun _a _b ↦ (congr_arg g <| f.map_mul_right' _ _).trans <| g.map_mul_right' _ _ } #align centroid_hom.comp CentroidHom.comp @[simp, norm_cast] theorem coe_comp (g f : CentroidHom α) : ⇑(g.comp f) = g ∘ f := rfl #align centroid_hom.coe_comp CentroidHom.coe_comp @[simp] theorem comp_apply (g f : CentroidHom α) (a : α) : g.comp f a = g (f a) := rfl #align centroid_hom.comp_apply CentroidHom.comp_apply @[simp, norm_cast] theorem coe_comp_addMonoidHom (g f : CentroidHom α) : (g.comp f : α →+ α) = (g : α →+ α).comp f := rfl #align centroid_hom.coe_comp_add_monoid_hom CentroidHom.coe_comp_addMonoidHom @[simp] theorem comp_assoc (h g f : CentroidHom α) : (h.comp g).comp f = h.comp (g.comp f) := rfl #align centroid_hom.comp_assoc CentroidHom.comp_assoc @[simp] theorem comp_id (f : CentroidHom α) : f.comp (CentroidHom.id α) = f := rfl #align centroid_hom.comp_id CentroidHom.comp_id @[simp] theorem id_comp (f : CentroidHom α) : (CentroidHom.id α).comp f = f := rfl #align centroid_hom.id_comp CentroidHom.id_comp @[simp] theorem cancel_right {g₁ g₂ f : CentroidHom α} (hf : Surjective f) : g₁.comp f = g₂.comp f ↔ g₁ = g₂ := ⟨fun h ↦ ext <| hf.forall.2 <| FunLike.ext_iff.1 h, fun a ↦ congrFun (congrArg comp a) f⟩ #align centroid_hom.cancel_right CentroidHom.cancel_right @[simp] theorem cancel_left {g f₁ f₂ : CentroidHom α} (hg : Injective g) : g.comp f₁ = g.comp f₂ ↔ f₁ = f₂ := ⟨fun h ↦ ext fun a ↦ hg <| by rw [← comp_apply, h, comp_apply], congr_arg _⟩ #align centroid_hom.cancel_left CentroidHom.cancel_left instance : Zero (CentroidHom α) := ⟨{ (0 : α →+ α) with map_mul_left' := fun _a _b ↦ (mul_zero _).symm map_mul_right' := fun _a _b ↦ (zero_mul _).symm }⟩ instance : One (CentroidHom α) := ⟨CentroidHom.id α⟩ instance : Add (CentroidHom α) := ⟨fun f g ↦ { (f + g : α →+ α) with map_mul_left' := fun a b ↦ by show f (a * b) + g (a * b) = a * (f b + g b) simp [map_mul_left, mul_add] map_mul_right' := fun a b ↦ by show f (a * b) + g (a * b) = (f a + g a) * b simp [map_mul_right, add_mul] }⟩ instance : Mul (CentroidHom α) := ⟨comp⟩ variable [Monoid M] [Monoid N] [Semiring R] variable [DistribMulAction M α] [SMulCommClass M α α] [IsScalarTower M α α] variable [DistribMulAction N α] [SMulCommClass N α α] [IsScalarTower N α α] variable [Module R α] [SMulCommClass R α α] [IsScalarTower R α α] instance instSMul : SMul M (CentroidHom α) where smul n f := { (n • f : α →+ α) with map_mul_left' := fun a b ↦ by change n • f (a * b) = a * n • f b rw [map_mul_left f, ← mul_smul_comm] map_mul_right' := fun a b ↦ by change n • f (a * b) = n • f a * b rw [map_mul_right f, ← smul_mul_assoc] } #noalign centroid_hom.has_nsmul instance [SMul M N] [IsScalarTower M N α] : IsScalarTower M N (CentroidHom α) where smul_assoc _ _ _ := ext <| fun _ => smul_assoc _ _ _ instance [SMulCommClass M N α] : SMulCommClass M N (CentroidHom α) where smul_comm _ _ _ := ext <| fun _ => smul_comm _ _ _ instance [DistribMulAction Mᵐᵒᵖ α] [IsCentralScalar M α] : IsCentralScalar M (CentroidHom α) where op_smul_eq_smul _ _ := ext <| fun _ => op_smul_eq_smul _ _ instance isScalarTowerRight : IsScalarTower M (CentroidHom α) (CentroidHom α) where smul_assoc _ _ _ := rfl instance hasNPowNat : Pow (CentroidHom α) ℕ := ⟨fun f n ↦ { (f.toEnd ^ n : AddMonoid.End α) with map_mul_left' := fun a b ↦ by induction' n with n ih · exact rfl · simp rw [pow_succ] exact (congr_arg f.toEnd ih).trans (f.map_mul_left' _ _) map_mul_right' := fun a b ↦ by induction' n with n ih · exact rfl · simp rw [pow_succ] exact (congr_arg f.toEnd ih).trans (f.map_mul_right' _ _) }⟩ #align centroid_hom.has_npow_nat CentroidHom.hasNPowNat @[simp, norm_cast] theorem coe_zero : ⇑(0 : CentroidHom α) = 0 := rfl #align centroid_hom.coe_zero CentroidHom.coe_zero @[simp, norm_cast] theorem coe_one : ⇑(1 : CentroidHom α) = id := rfl #align centroid_hom.coe_one CentroidHom.coe_one @[simp, norm_cast] theorem coe_add (f g : CentroidHom α) : ⇑(f + g) = f + g := rfl #align centroid_hom.coe_add CentroidHom.coe_add @[simp, norm_cast] theorem coe_mul (f g : CentroidHom α) : ⇑(f * g) = f ∘ g := rfl #align centroid_hom.coe_mul CentroidHom.coe_mul @[simp, norm_cast] theorem coe_smul (n : M) (f : CentroidHom α) : ⇑(n • f) = n • ⇑f := rfl #align centroid_hom.coe_nsmul CentroidHom.coe_smul @[simp] theorem zero_apply (a : α) : (0 : CentroidHom α) a = 0 := rfl #align centroid_hom.zero_apply CentroidHom.zero_apply @[simp] theorem one_apply (a : α) : (1 : CentroidHom α) a = a := rfl #align centroid_hom.one_apply CentroidHom.one_apply @[simp] theorem add_apply (f g : CentroidHom α) (a : α) : (f + g) a = f a + g a := rfl #align centroid_hom.add_apply CentroidHom.add_apply @[simp] theorem mul_apply (f g : CentroidHom α) (a : α) : (f * g) a = f (g a) := rfl #align centroid_hom.mul_apply CentroidHom.mul_apply @[simp] theorem smul_apply (n : M) (f : CentroidHom α) (a : α) : (n • f) a = n • f a := rfl #align centroid_hom.nsmul_apply CentroidHom.smul_apply example : SMul ℕ (CentroidHom α) := instSMul @[simp] theorem toEnd_zero : (0 : CentroidHom α).toEnd = 0 := rfl #align centroid_hom.to_End_zero CentroidHom.toEnd_zero @[simp] theorem toEnd_add (x y : CentroidHom α) : (x + y).toEnd = x.toEnd + y.toEnd := rfl #align centroid_hom.to_End_add CentroidHom.toEnd_add theorem toEnd_smul (m : M) (x : CentroidHom α) : (m • x).toEnd = m • x.toEnd := rfl #align centroid_hom.to_End_nsmul CentroidHom.toEnd_smul instance : AddCommMonoid (CentroidHom α) := coe_toAddMonoidHom_injective.addCommMonoid _ toEnd_zero toEnd_add (swap toEnd_smul) instance : NatCast (CentroidHom α) where natCast n := n • (1 : CentroidHom α) -- Porting note: `nolint simpNF` added because simplify fails on left-hand side @[simp, norm_cast, nolint simpNF] theorem coe_nat_cast (n : ℕ) : ⇑(n : CentroidHom α) = n • (CentroidHom.id α) := rfl #align centroid_hom.coe_nat_cast CentroidHom.coe_nat_cast theorem nat_cast_apply (n : ℕ) (m : α) : (n : CentroidHom α) m = n • m := rfl #align centroid_hom.nat_cast_apply CentroidHom.nat_cast_apply @[simp] theorem toEnd_one : (1 : CentroidHom α).toEnd = 1 := rfl #align centroid_hom.to_End_one CentroidHom.toEnd_one @[simp] theorem toEnd_mul (x y : CentroidHom α) : (x * y).toEnd = x.toEnd * y.toEnd := rfl #align centroid_hom.to_End_mul CentroidHom.toEnd_mul @[simp] theorem toEnd_pow (x : CentroidHom α) (n : ℕ) : (x ^ n).toEnd = x.toEnd ^ n := rfl #align centroid_hom.to_End_pow CentroidHom.toEnd_pow @[simp, norm_cast] theorem toEnd_nat_cast (n : ℕ) : (n : CentroidHom α).toEnd = ↑n := rfl #align centroid_hom.to_End_nat_cast CentroidHom.toEnd_nat_cast -- cf `add_monoid.End.semiring` instance : Semiring (CentroidHom α) := toEnd_injective.semiring _ toEnd_zero toEnd_one toEnd_add toEnd_mul (swap toEnd_smul) toEnd_pow toEnd_nat_cast variable (α) in /-- `CentroidHom.toEnd` as a `RingHom`. -/ @[simps] def toEndRingHom : CentroidHom α →+* AddMonoid.End α where toFun := toEnd map_zero' := toEnd_zero map_one' := toEnd_one map_add' := toEnd_add map_mul' := toEnd_mul theorem comp_mul_comm (T S : CentroidHom α) (a b : α) : (T ∘ S) (a * b) = (S ∘ T) (a * b) := by simp only [Function.comp_apply] rw [map_mul_right, map_mul_left, ← map_mul_right, ← map_mul_left] #align centroid_hom.comp_mul_comm CentroidHom.comp_mul_comm instance : DistribMulAction M (CentroidHom α) := toEnd_injective.distribMulAction (toEndRingHom α).toAddMonoidHom toEnd_smul instance : Module R (CentroidHom α) := toEnd_injective.module R (toEndRingHom α).toAddMonoidHom toEnd_smul local notation "L" => AddMonoid.End.mulLeft local notation "R" => AddMonoid.End.mulRight lemma centroid_eq_centralizer_mulLeftRight : RingHom.rangeS (toEndRingHom α) = Subsemiring.centralizer (Set.range L ∪ Set.range R) := by ext T refine ⟨?_, fun h ↦ ?_⟩ · rintro ⟨f, rfl⟩ S (⟨a, rfl⟩ | ⟨b, rfl⟩) · exact AddMonoidHom.ext fun b ↦ (map_mul_left f a b).symm · exact AddMonoidHom.ext fun a ↦ (map_mul_right f a b).symm · rw [Subsemiring.mem_centralizer_iff] at h refine ⟨⟨T, fun a b ↦ ?_, fun a b ↦ ?_⟩, rfl⟩ · exact congr($(h (L a) (.inl ⟨a, rfl⟩)) b).symm · exact congr($(h (R b) (.inr ⟨b, rfl⟩)) a).symm /-- The canonical homomorphism from the center into the centroid -/ def centerToCentroid : NonUnitalSubsemiring.center α →ₙ+* CentroidHom α where toFun z := { L (z : α) with map_mul_left' := ((Set.mem_center_iff _).mp z.prop).left_comm map_mul_right' := ((Set.mem_center_iff _).mp z.prop).left_assoc } map_zero' := by simp only [ZeroMemClass.coe_zero, map_zero] exact rfl map_add' := fun _ _ => by simp only [AddSubmonoid.coe_add, NonUnitalSubsemiring.coe_toAddSubmonoid, map_add] exact rfl map_mul' := fun z₁ z₂ => by ext a exact (((Set.mem_center_iff _).mp z₁.prop).left_assoc z₂ a).symm lemma centerToCentroid_apply (z : { x // x ∈ NonUnitalSubsemiring.center α }) (a : α) : (centerToCentroid z) a = z * a := rfl lemma center_iff_op_centroid (a : α) : a ∈ NonUnitalSubsemiring.center α ↔ L a = R a ∧ (L a) ∈ Set.range CentroidHom.toEnd := by constructor · exact fun ha ↦ ⟨AddMonoidHom.ext <| IsMulCentral.comm ha, ⟨centerToCentroid ⟨a, ha⟩, rfl⟩⟩ · rintro ⟨hc, ⟨T, hT⟩⟩ have e1 (d : α) : T d = a * d := congr($hT d) have e2 (d : α) : T d = d * a := congr($(hT.trans hc) d) constructor case comm => exact (congr($hc ·)) case left_assoc => simpa [e1] using (map_mul_right T · ·) case mid_assoc => exact fun b c ↦ by simpa [e1 c, e2 b] using (map_mul_right T b c).symm.trans <| map_mul_left T b c case right_assoc => simpa [e2] using (map_mul_left T · ·) end NonUnitalNonAssocSemiring section NonAssocSemiring variable [NonAssocSemiring α] /-- The canonical isomorphism from the center of a (non-associative) semiring onto its centroid. -/ def centerIsoCentroid : NonUnitalSubsemiring.center α ≃+* CentroidHom α := { centerToCentroid with invFun := fun T ↦ ⟨T 1, by refine ⟨?_, ?_, ?_, ?_⟩; all_goals simp [← map_mul_left, ← map_mul_right]⟩ left_inv := fun z ↦ Subtype.ext <| by simp [centerToCentroid_apply] right_inv := fun T ↦ CentroidHom.ext <| by simp [centerToCentroid_apply, ← map_mul_right] } end NonAssocSemiring section NonUnitalNonAssocRing variable [NonUnitalNonAssocRing α] /-- Negation of `CentroidHom`s as a `CentroidHom`. -/ instance : Neg (CentroidHom α) := ⟨fun f ↦ { (-f : α →+ α) with map_mul_left' := fun a b ↦ by change -f (a * b) = a * (-f b) simp [map_mul_left] map_mul_right' := fun a b ↦ by change -f (a * b) = (-f a) * b simp [map_mul_right] }⟩ instance : Sub (CentroidHom α) := ⟨fun f g ↦ { (f - g : α →+ α) with map_mul_left' := fun a b ↦ by change (⇑f - ⇑g) (a * b) = a * (⇑f - ⇑g) b simp [map_mul_left, mul_sub] map_mul_right' := fun a b ↦ by change (⇑f - ⇑g) (a * b) = ((⇑f - ⇑g) a) * b
simp [map_mul_right, sub_mul]
instance : Sub (CentroidHom α) := ⟨fun f g ↦ { (f - g : α →+ α) with map_mul_left' := fun a b ↦ by change (⇑f - ⇑g) (a * b) = a * (⇑f - ⇑g) b simp [map_mul_left, mul_sub] map_mul_right' := fun a b ↦ by change (⇑f - ⇑g) (a * b) = ((⇑f - ⇑g) a) * b
Mathlib.Algebra.Ring.CentroidHom.514_0.FQQ3LT1tg3cKlkH
instance : Sub (CentroidHom α)
Mathlib_Algebra_Ring_CentroidHom
F : Type u_1 M : Type u_2 N : Type u_3 R : Type u_4 α : Type u_5 inst✝ : NonUnitalRing α h : ∀ (a b : α), (∀ (r : α), a * r * b = 0) → a = 0 ∨ b = 0 src✝ : Ring (CentroidHom α) := instRing f g : CentroidHom α ⊢ f * g = g * f
/- Copyright (c) 2022 Yaël Dillies. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies, Christopher Hoskin -/ import Mathlib.Algebra.Module.Hom import Mathlib.RingTheory.NonUnitalSubsemiring.Basic import Mathlib.RingTheory.Subsemiring.Basic #align_import algebra.hom.centroid from "leanprover-community/mathlib"@"6cb77a8eaff0ddd100e87b1591c6d3ad319514ff" /-! # Centroid homomorphisms Let `A` be a (non unital, non associative) algebra. The centroid of `A` is the set of linear maps `T` on `A` such that `T` commutes with left and right multiplication, that is to say, for all `a` and `b` in `A`, $$ T(ab) = (Ta)b, T(ab) = a(Tb). $$ In mathlib we call elements of the centroid "centroid homomorphisms" (`CentroidHom`) in keeping with `AddMonoidHom` etc. We use the `FunLike` design, so each type of morphisms has a companion typeclass which is meant to be satisfied by itself and all stricter types. ## Types of morphisms * `CentroidHom`: Maps which preserve left and right multiplication. ## Typeclasses * `CentroidHomClass` ## References * [Jacobson, Structure of Rings][Jacobson1956] * [McCrimmon, A taste of Jordan algebras][mccrimmon2004] ## Tags centroid -/ open Function variable {F M N R α : Type*} /-- The type of centroid homomorphisms from `α` to `α`. -/ structure CentroidHom (α : Type*) [NonUnitalNonAssocSemiring α] extends α →+ α where /-- Commutativity of centroid homomorphims with left multiplication. -/ map_mul_left' (a b : α) : toFun (a * b) = a * toFun b /-- Commutativity of centroid homomorphims with right multiplication. -/ map_mul_right' (a b : α) : toFun (a * b) = toFun a * b #align centroid_hom CentroidHom attribute [nolint docBlame] CentroidHom.toAddMonoidHom /-- `CentroidHomClass F α` states that `F` is a type of centroid homomorphisms. You should extend this class when you extend `CentroidHom`. -/ class CentroidHomClass (F : Type*) (α : outParam <| Type*) [NonUnitalNonAssocSemiring α] extends AddMonoidHomClass F α α where /-- Commutativity of centroid homomorphims with left multiplication. -/ map_mul_left (f : F) (a b : α) : f (a * b) = a * f b /-- Commutativity of centroid homomorphims with right multiplication. -/ map_mul_right (f : F) (a b : α) : f (a * b) = f a * b #align centroid_hom_class CentroidHomClass export CentroidHomClass (map_mul_left map_mul_right) instance [NonUnitalNonAssocSemiring α] [CentroidHomClass F α] : CoeTC F (CentroidHom α) := ⟨fun f ↦ { (f : α →+ α) with toFun := f map_mul_left' := map_mul_left f map_mul_right' := map_mul_right f }⟩ /-! ### Centroid homomorphisms -/ namespace CentroidHom section NonUnitalNonAssocSemiring variable [NonUnitalNonAssocSemiring α] instance : CentroidHomClass (CentroidHom α) α where coe f := f.toFun coe_injective' f g h := by cases f cases g congr with x exact congrFun h x map_zero f := f.map_zero' map_add f := f.map_add' map_mul_left f := f.map_mul_left' map_mul_right f := f.map_mul_right' /-- Helper instance for when there's too many metavariables to apply `FunLike.CoeFun` directly. -/ /- Porting note: Lean gave me `unknown constant 'FunLike.CoeFun'` and says `CoeFun` is a type mismatch, so I used `library_search`. -/ instance : CoeFun (CentroidHom α) fun _ ↦ α → α := inferInstanceAs (CoeFun (CentroidHom α) fun _ ↦ α → α) -- Porting note: removed @[simp]; not in normal form. (`toAddMonoidHom_eq_coe` below ensures that -- the LHS simplifies to the RHS anyway.) theorem toFun_eq_coe {f : CentroidHom α} : f.toFun = f := rfl #align centroid_hom.to_fun_eq_coe CentroidHom.toFun_eq_coe @[ext] theorem ext {f g : CentroidHom α} (h : ∀ a, f a = g a) : f = g := FunLike.ext f g h #align centroid_hom.ext CentroidHom.ext @[simp, norm_cast] theorem coe_toAddMonoidHom (f : CentroidHom α) : ⇑(f : α →+ α) = f := rfl #align centroid_hom.coe_to_add_monoid_hom CentroidHom.coe_toAddMonoidHom @[simp] theorem toAddMonoidHom_eq_coe (f : CentroidHom α) : f.toAddMonoidHom = f := rfl #align centroid_hom.to_add_monoid_hom_eq_coe CentroidHom.toAddMonoidHom_eq_coe theorem coe_toAddMonoidHom_injective : Injective ((↑) : CentroidHom α → α →+ α) := fun _f _g h => ext fun a ↦ haveI := FunLike.congr_fun h a this #align centroid_hom.coe_to_add_monoid_hom_injective CentroidHom.coe_toAddMonoidHom_injective /-- Turn a centroid homomorphism into an additive monoid endomorphism. -/ def toEnd (f : CentroidHom α) : AddMonoid.End α := (f : α →+ α) #align centroid_hom.to_End CentroidHom.toEnd theorem toEnd_injective : Injective (CentroidHom.toEnd : CentroidHom α → AddMonoid.End α) := coe_toAddMonoidHom_injective #align centroid_hom.to_End_injective CentroidHom.toEnd_injective /-- Copy of a `CentroidHom` with a new `toFun` equal to the old one. Useful to fix definitional equalities. -/ protected def copy (f : CentroidHom α) (f' : α → α) (h : f' = f) : CentroidHom α := { f.toAddMonoidHom.copy f' <| h with toFun := f' map_mul_left' := fun a b ↦ by simp_rw [h, map_mul_left] map_mul_right' := fun a b ↦ by simp_rw [h, map_mul_right] } #align centroid_hom.copy CentroidHom.copy @[simp] theorem coe_copy (f : CentroidHom α) (f' : α → α) (h : f' = f) : ⇑(f.copy f' h) = f' := rfl #align centroid_hom.coe_copy CentroidHom.coe_copy theorem copy_eq (f : CentroidHom α) (f' : α → α) (h : f' = f) : f.copy f' h = f := FunLike.ext' h #align centroid_hom.copy_eq CentroidHom.copy_eq variable (α) /-- `id` as a `CentroidHom`. -/ protected def id : CentroidHom α := { AddMonoidHom.id α with map_mul_left' := fun _ _ ↦ rfl map_mul_right' := fun _ _ ↦ rfl } #align centroid_hom.id CentroidHom.id instance : Inhabited (CentroidHom α) := ⟨CentroidHom.id α⟩ @[simp, norm_cast] theorem coe_id : ⇑(CentroidHom.id α) = id := rfl #align centroid_hom.coe_id CentroidHom.coe_id @[simp, norm_cast] theorem toAddMonoidHom_id : (CentroidHom.id α : α →+ α) = AddMonoidHom.id α := rfl #align centroid_hom.coe_to_add_monoid_hom_id CentroidHom.toAddMonoidHom_id variable {α} @[simp] theorem id_apply (a : α) : CentroidHom.id α a = a := rfl #align centroid_hom.id_apply CentroidHom.id_apply /-- Composition of `CentroidHom`s as a `CentroidHom`. -/ def comp (g f : CentroidHom α) : CentroidHom α := { g.toAddMonoidHom.comp f.toAddMonoidHom with map_mul_left' := fun _a _b ↦ (congr_arg g <| f.map_mul_left' _ _).trans <| g.map_mul_left' _ _ map_mul_right' := fun _a _b ↦ (congr_arg g <| f.map_mul_right' _ _).trans <| g.map_mul_right' _ _ } #align centroid_hom.comp CentroidHom.comp @[simp, norm_cast] theorem coe_comp (g f : CentroidHom α) : ⇑(g.comp f) = g ∘ f := rfl #align centroid_hom.coe_comp CentroidHom.coe_comp @[simp] theorem comp_apply (g f : CentroidHom α) (a : α) : g.comp f a = g (f a) := rfl #align centroid_hom.comp_apply CentroidHom.comp_apply @[simp, norm_cast] theorem coe_comp_addMonoidHom (g f : CentroidHom α) : (g.comp f : α →+ α) = (g : α →+ α).comp f := rfl #align centroid_hom.coe_comp_add_monoid_hom CentroidHom.coe_comp_addMonoidHom @[simp] theorem comp_assoc (h g f : CentroidHom α) : (h.comp g).comp f = h.comp (g.comp f) := rfl #align centroid_hom.comp_assoc CentroidHom.comp_assoc @[simp] theorem comp_id (f : CentroidHom α) : f.comp (CentroidHom.id α) = f := rfl #align centroid_hom.comp_id CentroidHom.comp_id @[simp] theorem id_comp (f : CentroidHom α) : (CentroidHom.id α).comp f = f := rfl #align centroid_hom.id_comp CentroidHom.id_comp @[simp] theorem cancel_right {g₁ g₂ f : CentroidHom α} (hf : Surjective f) : g₁.comp f = g₂.comp f ↔ g₁ = g₂ := ⟨fun h ↦ ext <| hf.forall.2 <| FunLike.ext_iff.1 h, fun a ↦ congrFun (congrArg comp a) f⟩ #align centroid_hom.cancel_right CentroidHom.cancel_right @[simp] theorem cancel_left {g f₁ f₂ : CentroidHom α} (hg : Injective g) : g.comp f₁ = g.comp f₂ ↔ f₁ = f₂ := ⟨fun h ↦ ext fun a ↦ hg <| by rw [← comp_apply, h, comp_apply], congr_arg _⟩ #align centroid_hom.cancel_left CentroidHom.cancel_left instance : Zero (CentroidHom α) := ⟨{ (0 : α →+ α) with map_mul_left' := fun _a _b ↦ (mul_zero _).symm map_mul_right' := fun _a _b ↦ (zero_mul _).symm }⟩ instance : One (CentroidHom α) := ⟨CentroidHom.id α⟩ instance : Add (CentroidHom α) := ⟨fun f g ↦ { (f + g : α →+ α) with map_mul_left' := fun a b ↦ by show f (a * b) + g (a * b) = a * (f b + g b) simp [map_mul_left, mul_add] map_mul_right' := fun a b ↦ by show f (a * b) + g (a * b) = (f a + g a) * b simp [map_mul_right, add_mul] }⟩ instance : Mul (CentroidHom α) := ⟨comp⟩ variable [Monoid M] [Monoid N] [Semiring R] variable [DistribMulAction M α] [SMulCommClass M α α] [IsScalarTower M α α] variable [DistribMulAction N α] [SMulCommClass N α α] [IsScalarTower N α α] variable [Module R α] [SMulCommClass R α α] [IsScalarTower R α α] instance instSMul : SMul M (CentroidHom α) where smul n f := { (n • f : α →+ α) with map_mul_left' := fun a b ↦ by change n • f (a * b) = a * n • f b rw [map_mul_left f, ← mul_smul_comm] map_mul_right' := fun a b ↦ by change n • f (a * b) = n • f a * b rw [map_mul_right f, ← smul_mul_assoc] } #noalign centroid_hom.has_nsmul instance [SMul M N] [IsScalarTower M N α] : IsScalarTower M N (CentroidHom α) where smul_assoc _ _ _ := ext <| fun _ => smul_assoc _ _ _ instance [SMulCommClass M N α] : SMulCommClass M N (CentroidHom α) where smul_comm _ _ _ := ext <| fun _ => smul_comm _ _ _ instance [DistribMulAction Mᵐᵒᵖ α] [IsCentralScalar M α] : IsCentralScalar M (CentroidHom α) where op_smul_eq_smul _ _ := ext <| fun _ => op_smul_eq_smul _ _ instance isScalarTowerRight : IsScalarTower M (CentroidHom α) (CentroidHom α) where smul_assoc _ _ _ := rfl instance hasNPowNat : Pow (CentroidHom α) ℕ := ⟨fun f n ↦ { (f.toEnd ^ n : AddMonoid.End α) with map_mul_left' := fun a b ↦ by induction' n with n ih · exact rfl · simp rw [pow_succ] exact (congr_arg f.toEnd ih).trans (f.map_mul_left' _ _) map_mul_right' := fun a b ↦ by induction' n with n ih · exact rfl · simp rw [pow_succ] exact (congr_arg f.toEnd ih).trans (f.map_mul_right' _ _) }⟩ #align centroid_hom.has_npow_nat CentroidHom.hasNPowNat @[simp, norm_cast] theorem coe_zero : ⇑(0 : CentroidHom α) = 0 := rfl #align centroid_hom.coe_zero CentroidHom.coe_zero @[simp, norm_cast] theorem coe_one : ⇑(1 : CentroidHom α) = id := rfl #align centroid_hom.coe_one CentroidHom.coe_one @[simp, norm_cast] theorem coe_add (f g : CentroidHom α) : ⇑(f + g) = f + g := rfl #align centroid_hom.coe_add CentroidHom.coe_add @[simp, norm_cast] theorem coe_mul (f g : CentroidHom α) : ⇑(f * g) = f ∘ g := rfl #align centroid_hom.coe_mul CentroidHom.coe_mul @[simp, norm_cast] theorem coe_smul (n : M) (f : CentroidHom α) : ⇑(n • f) = n • ⇑f := rfl #align centroid_hom.coe_nsmul CentroidHom.coe_smul @[simp] theorem zero_apply (a : α) : (0 : CentroidHom α) a = 0 := rfl #align centroid_hom.zero_apply CentroidHom.zero_apply @[simp] theorem one_apply (a : α) : (1 : CentroidHom α) a = a := rfl #align centroid_hom.one_apply CentroidHom.one_apply @[simp] theorem add_apply (f g : CentroidHom α) (a : α) : (f + g) a = f a + g a := rfl #align centroid_hom.add_apply CentroidHom.add_apply @[simp] theorem mul_apply (f g : CentroidHom α) (a : α) : (f * g) a = f (g a) := rfl #align centroid_hom.mul_apply CentroidHom.mul_apply @[simp] theorem smul_apply (n : M) (f : CentroidHom α) (a : α) : (n • f) a = n • f a := rfl #align centroid_hom.nsmul_apply CentroidHom.smul_apply example : SMul ℕ (CentroidHom α) := instSMul @[simp] theorem toEnd_zero : (0 : CentroidHom α).toEnd = 0 := rfl #align centroid_hom.to_End_zero CentroidHom.toEnd_zero @[simp] theorem toEnd_add (x y : CentroidHom α) : (x + y).toEnd = x.toEnd + y.toEnd := rfl #align centroid_hom.to_End_add CentroidHom.toEnd_add theorem toEnd_smul (m : M) (x : CentroidHom α) : (m • x).toEnd = m • x.toEnd := rfl #align centroid_hom.to_End_nsmul CentroidHom.toEnd_smul instance : AddCommMonoid (CentroidHom α) := coe_toAddMonoidHom_injective.addCommMonoid _ toEnd_zero toEnd_add (swap toEnd_smul) instance : NatCast (CentroidHom α) where natCast n := n • (1 : CentroidHom α) -- Porting note: `nolint simpNF` added because simplify fails on left-hand side @[simp, norm_cast, nolint simpNF] theorem coe_nat_cast (n : ℕ) : ⇑(n : CentroidHom α) = n • (CentroidHom.id α) := rfl #align centroid_hom.coe_nat_cast CentroidHom.coe_nat_cast theorem nat_cast_apply (n : ℕ) (m : α) : (n : CentroidHom α) m = n • m := rfl #align centroid_hom.nat_cast_apply CentroidHom.nat_cast_apply @[simp] theorem toEnd_one : (1 : CentroidHom α).toEnd = 1 := rfl #align centroid_hom.to_End_one CentroidHom.toEnd_one @[simp] theorem toEnd_mul (x y : CentroidHom α) : (x * y).toEnd = x.toEnd * y.toEnd := rfl #align centroid_hom.to_End_mul CentroidHom.toEnd_mul @[simp] theorem toEnd_pow (x : CentroidHom α) (n : ℕ) : (x ^ n).toEnd = x.toEnd ^ n := rfl #align centroid_hom.to_End_pow CentroidHom.toEnd_pow @[simp, norm_cast] theorem toEnd_nat_cast (n : ℕ) : (n : CentroidHom α).toEnd = ↑n := rfl #align centroid_hom.to_End_nat_cast CentroidHom.toEnd_nat_cast -- cf `add_monoid.End.semiring` instance : Semiring (CentroidHom α) := toEnd_injective.semiring _ toEnd_zero toEnd_one toEnd_add toEnd_mul (swap toEnd_smul) toEnd_pow toEnd_nat_cast variable (α) in /-- `CentroidHom.toEnd` as a `RingHom`. -/ @[simps] def toEndRingHom : CentroidHom α →+* AddMonoid.End α where toFun := toEnd map_zero' := toEnd_zero map_one' := toEnd_one map_add' := toEnd_add map_mul' := toEnd_mul theorem comp_mul_comm (T S : CentroidHom α) (a b : α) : (T ∘ S) (a * b) = (S ∘ T) (a * b) := by simp only [Function.comp_apply] rw [map_mul_right, map_mul_left, ← map_mul_right, ← map_mul_left] #align centroid_hom.comp_mul_comm CentroidHom.comp_mul_comm instance : DistribMulAction M (CentroidHom α) := toEnd_injective.distribMulAction (toEndRingHom α).toAddMonoidHom toEnd_smul instance : Module R (CentroidHom α) := toEnd_injective.module R (toEndRingHom α).toAddMonoidHom toEnd_smul local notation "L" => AddMonoid.End.mulLeft local notation "R" => AddMonoid.End.mulRight lemma centroid_eq_centralizer_mulLeftRight : RingHom.rangeS (toEndRingHom α) = Subsemiring.centralizer (Set.range L ∪ Set.range R) := by ext T refine ⟨?_, fun h ↦ ?_⟩ · rintro ⟨f, rfl⟩ S (⟨a, rfl⟩ | ⟨b, rfl⟩) · exact AddMonoidHom.ext fun b ↦ (map_mul_left f a b).symm · exact AddMonoidHom.ext fun a ↦ (map_mul_right f a b).symm · rw [Subsemiring.mem_centralizer_iff] at h refine ⟨⟨T, fun a b ↦ ?_, fun a b ↦ ?_⟩, rfl⟩ · exact congr($(h (L a) (.inl ⟨a, rfl⟩)) b).symm · exact congr($(h (R b) (.inr ⟨b, rfl⟩)) a).symm /-- The canonical homomorphism from the center into the centroid -/ def centerToCentroid : NonUnitalSubsemiring.center α →ₙ+* CentroidHom α where toFun z := { L (z : α) with map_mul_left' := ((Set.mem_center_iff _).mp z.prop).left_comm map_mul_right' := ((Set.mem_center_iff _).mp z.prop).left_assoc } map_zero' := by simp only [ZeroMemClass.coe_zero, map_zero] exact rfl map_add' := fun _ _ => by simp only [AddSubmonoid.coe_add, NonUnitalSubsemiring.coe_toAddSubmonoid, map_add] exact rfl map_mul' := fun z₁ z₂ => by ext a exact (((Set.mem_center_iff _).mp z₁.prop).left_assoc z₂ a).symm lemma centerToCentroid_apply (z : { x // x ∈ NonUnitalSubsemiring.center α }) (a : α) : (centerToCentroid z) a = z * a := rfl lemma center_iff_op_centroid (a : α) : a ∈ NonUnitalSubsemiring.center α ↔ L a = R a ∧ (L a) ∈ Set.range CentroidHom.toEnd := by constructor · exact fun ha ↦ ⟨AddMonoidHom.ext <| IsMulCentral.comm ha, ⟨centerToCentroid ⟨a, ha⟩, rfl⟩⟩ · rintro ⟨hc, ⟨T, hT⟩⟩ have e1 (d : α) : T d = a * d := congr($hT d) have e2 (d : α) : T d = d * a := congr($(hT.trans hc) d) constructor case comm => exact (congr($hc ·)) case left_assoc => simpa [e1] using (map_mul_right T · ·) case mid_assoc => exact fun b c ↦ by simpa [e1 c, e2 b] using (map_mul_right T b c).symm.trans <| map_mul_left T b c case right_assoc => simpa [e2] using (map_mul_left T · ·) end NonUnitalNonAssocSemiring section NonAssocSemiring variable [NonAssocSemiring α] /-- The canonical isomorphism from the center of a (non-associative) semiring onto its centroid. -/ def centerIsoCentroid : NonUnitalSubsemiring.center α ≃+* CentroidHom α := { centerToCentroid with invFun := fun T ↦ ⟨T 1, by refine ⟨?_, ?_, ?_, ?_⟩; all_goals simp [← map_mul_left, ← map_mul_right]⟩ left_inv := fun z ↦ Subtype.ext <| by simp [centerToCentroid_apply] right_inv := fun T ↦ CentroidHom.ext <| by simp [centerToCentroid_apply, ← map_mul_right] } end NonAssocSemiring section NonUnitalNonAssocRing variable [NonUnitalNonAssocRing α] /-- Negation of `CentroidHom`s as a `CentroidHom`. -/ instance : Neg (CentroidHom α) := ⟨fun f ↦ { (-f : α →+ α) with map_mul_left' := fun a b ↦ by change -f (a * b) = a * (-f b) simp [map_mul_left] map_mul_right' := fun a b ↦ by change -f (a * b) = (-f a) * b simp [map_mul_right] }⟩ instance : Sub (CentroidHom α) := ⟨fun f g ↦ { (f - g : α →+ α) with map_mul_left' := fun a b ↦ by change (⇑f - ⇑g) (a * b) = a * (⇑f - ⇑g) b simp [map_mul_left, mul_sub] map_mul_right' := fun a b ↦ by change (⇑f - ⇑g) (a * b) = ((⇑f - ⇑g) a) * b simp [map_mul_right, sub_mul] }⟩ #noalign centroid_hom.has_zsmul instance : IntCast (CentroidHom α) where intCast z := z • (1 : CentroidHom α) -- Porting note: `nolint simpNF` added because simplify fails on left-hand side @[simp, norm_cast, nolint simpNF] theorem coe_int_cast (z : ℤ) : ⇑(z : CentroidHom α) = z • (CentroidHom.id α) := rfl #align centroid_hom.coe_int_cast CentroidHom.coe_int_cast theorem int_cast_apply (z : ℤ) (m : α) : (z : CentroidHom α) m = z • m := rfl #align centroid_hom.int_cast_apply CentroidHom.int_cast_apply @[simp] theorem toEnd_neg (x : CentroidHom α) : (-x).toEnd = -x.toEnd := rfl #align centroid_hom.to_End_neg CentroidHom.toEnd_neg @[simp] theorem toEnd_sub (x y : CentroidHom α) : (x - y).toEnd = x.toEnd - y.toEnd := rfl #align centroid_hom.to_End_sub CentroidHom.toEnd_sub #align centroid_hom.to_End_zsmul CentroidHom.toEnd_smul instance : AddCommGroup (CentroidHom α) := toEnd_injective.addCommGroup _ toEnd_zero toEnd_add toEnd_neg toEnd_sub (swap toEnd_smul) (swap toEnd_smul) @[simp, norm_cast] theorem coe_neg (f : CentroidHom α) : ⇑(-f) = -f := rfl #align centroid_hom.coe_neg CentroidHom.coe_neg @[simp, norm_cast] theorem coe_sub (f g : CentroidHom α) : ⇑(f - g) = f - g := rfl #align centroid_hom.coe_sub CentroidHom.coe_sub @[simp] theorem neg_apply (f : CentroidHom α) (a : α) : (-f) a = -f a := rfl #align centroid_hom.neg_apply CentroidHom.neg_apply @[simp] theorem sub_apply (f g : CentroidHom α) (a : α) : (f - g) a = f a - g a := rfl #align centroid_hom.sub_apply CentroidHom.sub_apply @[simp, norm_cast] theorem toEnd_int_cast (z : ℤ) : (z : CentroidHom α).toEnd = ↑z := rfl #align centroid_hom.to_End_int_cast CentroidHom.toEnd_int_cast instance instRing : Ring (CentroidHom α) := toEnd_injective.ring _ toEnd_zero toEnd_one toEnd_add toEnd_mul toEnd_neg toEnd_sub (swap toEnd_smul) (swap toEnd_smul) toEnd_pow toEnd_nat_cast toEnd_int_cast end NonUnitalNonAssocRing section NonUnitalRing variable [NonUnitalRing α] -- Porting note: Not sure why Lean didn't like `CentroidHom.Ring` -- See note [reducible non instances] /-- A prime associative ring has commutative centroid. -/ @[reducible] def commRing (h : ∀ a b : α, (∀ r : α, a * r * b = 0) → a = 0 ∨ b = 0) : CommRing (CentroidHom α) := { CentroidHom.instRing with mul_comm := fun f g ↦ by
ext
/-- A prime associative ring has commutative centroid. -/ @[reducible] def commRing (h : ∀ a b : α, (∀ r : α, a * r * b = 0) → a = 0 ∨ b = 0) : CommRing (CentroidHom α) := { CentroidHom.instRing with mul_comm := fun f g ↦ by
Mathlib.Algebra.Ring.CentroidHom.591_0.FQQ3LT1tg3cKlkH
/-- A prime associative ring has commutative centroid. -/ @[reducible] def commRing (h : ∀ a b : α, (∀ r : α, a * r * b = 0) → a = 0 ∨ b = 0) : CommRing (CentroidHom α)
Mathlib_Algebra_Ring_CentroidHom
case h F : Type u_1 M : Type u_2 N : Type u_3 R : Type u_4 α : Type u_5 inst✝ : NonUnitalRing α h : ∀ (a b : α), (∀ (r : α), a * r * b = 0) → a = 0 ∨ b = 0 src✝ : Ring (CentroidHom α) := instRing f g : CentroidHom α a✝ : α ⊢ (f * g) a✝ = (g * f) a✝
/- Copyright (c) 2022 Yaël Dillies. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies, Christopher Hoskin -/ import Mathlib.Algebra.Module.Hom import Mathlib.RingTheory.NonUnitalSubsemiring.Basic import Mathlib.RingTheory.Subsemiring.Basic #align_import algebra.hom.centroid from "leanprover-community/mathlib"@"6cb77a8eaff0ddd100e87b1591c6d3ad319514ff" /-! # Centroid homomorphisms Let `A` be a (non unital, non associative) algebra. The centroid of `A` is the set of linear maps `T` on `A` such that `T` commutes with left and right multiplication, that is to say, for all `a` and `b` in `A`, $$ T(ab) = (Ta)b, T(ab) = a(Tb). $$ In mathlib we call elements of the centroid "centroid homomorphisms" (`CentroidHom`) in keeping with `AddMonoidHom` etc. We use the `FunLike` design, so each type of morphisms has a companion typeclass which is meant to be satisfied by itself and all stricter types. ## Types of morphisms * `CentroidHom`: Maps which preserve left and right multiplication. ## Typeclasses * `CentroidHomClass` ## References * [Jacobson, Structure of Rings][Jacobson1956] * [McCrimmon, A taste of Jordan algebras][mccrimmon2004] ## Tags centroid -/ open Function variable {F M N R α : Type*} /-- The type of centroid homomorphisms from `α` to `α`. -/ structure CentroidHom (α : Type*) [NonUnitalNonAssocSemiring α] extends α →+ α where /-- Commutativity of centroid homomorphims with left multiplication. -/ map_mul_left' (a b : α) : toFun (a * b) = a * toFun b /-- Commutativity of centroid homomorphims with right multiplication. -/ map_mul_right' (a b : α) : toFun (a * b) = toFun a * b #align centroid_hom CentroidHom attribute [nolint docBlame] CentroidHom.toAddMonoidHom /-- `CentroidHomClass F α` states that `F` is a type of centroid homomorphisms. You should extend this class when you extend `CentroidHom`. -/ class CentroidHomClass (F : Type*) (α : outParam <| Type*) [NonUnitalNonAssocSemiring α] extends AddMonoidHomClass F α α where /-- Commutativity of centroid homomorphims with left multiplication. -/ map_mul_left (f : F) (a b : α) : f (a * b) = a * f b /-- Commutativity of centroid homomorphims with right multiplication. -/ map_mul_right (f : F) (a b : α) : f (a * b) = f a * b #align centroid_hom_class CentroidHomClass export CentroidHomClass (map_mul_left map_mul_right) instance [NonUnitalNonAssocSemiring α] [CentroidHomClass F α] : CoeTC F (CentroidHom α) := ⟨fun f ↦ { (f : α →+ α) with toFun := f map_mul_left' := map_mul_left f map_mul_right' := map_mul_right f }⟩ /-! ### Centroid homomorphisms -/ namespace CentroidHom section NonUnitalNonAssocSemiring variable [NonUnitalNonAssocSemiring α] instance : CentroidHomClass (CentroidHom α) α where coe f := f.toFun coe_injective' f g h := by cases f cases g congr with x exact congrFun h x map_zero f := f.map_zero' map_add f := f.map_add' map_mul_left f := f.map_mul_left' map_mul_right f := f.map_mul_right' /-- Helper instance for when there's too many metavariables to apply `FunLike.CoeFun` directly. -/ /- Porting note: Lean gave me `unknown constant 'FunLike.CoeFun'` and says `CoeFun` is a type mismatch, so I used `library_search`. -/ instance : CoeFun (CentroidHom α) fun _ ↦ α → α := inferInstanceAs (CoeFun (CentroidHom α) fun _ ↦ α → α) -- Porting note: removed @[simp]; not in normal form. (`toAddMonoidHom_eq_coe` below ensures that -- the LHS simplifies to the RHS anyway.) theorem toFun_eq_coe {f : CentroidHom α} : f.toFun = f := rfl #align centroid_hom.to_fun_eq_coe CentroidHom.toFun_eq_coe @[ext] theorem ext {f g : CentroidHom α} (h : ∀ a, f a = g a) : f = g := FunLike.ext f g h #align centroid_hom.ext CentroidHom.ext @[simp, norm_cast] theorem coe_toAddMonoidHom (f : CentroidHom α) : ⇑(f : α →+ α) = f := rfl #align centroid_hom.coe_to_add_monoid_hom CentroidHom.coe_toAddMonoidHom @[simp] theorem toAddMonoidHom_eq_coe (f : CentroidHom α) : f.toAddMonoidHom = f := rfl #align centroid_hom.to_add_monoid_hom_eq_coe CentroidHom.toAddMonoidHom_eq_coe theorem coe_toAddMonoidHom_injective : Injective ((↑) : CentroidHom α → α →+ α) := fun _f _g h => ext fun a ↦ haveI := FunLike.congr_fun h a this #align centroid_hom.coe_to_add_monoid_hom_injective CentroidHom.coe_toAddMonoidHom_injective /-- Turn a centroid homomorphism into an additive monoid endomorphism. -/ def toEnd (f : CentroidHom α) : AddMonoid.End α := (f : α →+ α) #align centroid_hom.to_End CentroidHom.toEnd theorem toEnd_injective : Injective (CentroidHom.toEnd : CentroidHom α → AddMonoid.End α) := coe_toAddMonoidHom_injective #align centroid_hom.to_End_injective CentroidHom.toEnd_injective /-- Copy of a `CentroidHom` with a new `toFun` equal to the old one. Useful to fix definitional equalities. -/ protected def copy (f : CentroidHom α) (f' : α → α) (h : f' = f) : CentroidHom α := { f.toAddMonoidHom.copy f' <| h with toFun := f' map_mul_left' := fun a b ↦ by simp_rw [h, map_mul_left] map_mul_right' := fun a b ↦ by simp_rw [h, map_mul_right] } #align centroid_hom.copy CentroidHom.copy @[simp] theorem coe_copy (f : CentroidHom α) (f' : α → α) (h : f' = f) : ⇑(f.copy f' h) = f' := rfl #align centroid_hom.coe_copy CentroidHom.coe_copy theorem copy_eq (f : CentroidHom α) (f' : α → α) (h : f' = f) : f.copy f' h = f := FunLike.ext' h #align centroid_hom.copy_eq CentroidHom.copy_eq variable (α) /-- `id` as a `CentroidHom`. -/ protected def id : CentroidHom α := { AddMonoidHom.id α with map_mul_left' := fun _ _ ↦ rfl map_mul_right' := fun _ _ ↦ rfl } #align centroid_hom.id CentroidHom.id instance : Inhabited (CentroidHom α) := ⟨CentroidHom.id α⟩ @[simp, norm_cast] theorem coe_id : ⇑(CentroidHom.id α) = id := rfl #align centroid_hom.coe_id CentroidHom.coe_id @[simp, norm_cast] theorem toAddMonoidHom_id : (CentroidHom.id α : α →+ α) = AddMonoidHom.id α := rfl #align centroid_hom.coe_to_add_monoid_hom_id CentroidHom.toAddMonoidHom_id variable {α} @[simp] theorem id_apply (a : α) : CentroidHom.id α a = a := rfl #align centroid_hom.id_apply CentroidHom.id_apply /-- Composition of `CentroidHom`s as a `CentroidHom`. -/ def comp (g f : CentroidHom α) : CentroidHom α := { g.toAddMonoidHom.comp f.toAddMonoidHom with map_mul_left' := fun _a _b ↦ (congr_arg g <| f.map_mul_left' _ _).trans <| g.map_mul_left' _ _ map_mul_right' := fun _a _b ↦ (congr_arg g <| f.map_mul_right' _ _).trans <| g.map_mul_right' _ _ } #align centroid_hom.comp CentroidHom.comp @[simp, norm_cast] theorem coe_comp (g f : CentroidHom α) : ⇑(g.comp f) = g ∘ f := rfl #align centroid_hom.coe_comp CentroidHom.coe_comp @[simp] theorem comp_apply (g f : CentroidHom α) (a : α) : g.comp f a = g (f a) := rfl #align centroid_hom.comp_apply CentroidHom.comp_apply @[simp, norm_cast] theorem coe_comp_addMonoidHom (g f : CentroidHom α) : (g.comp f : α →+ α) = (g : α →+ α).comp f := rfl #align centroid_hom.coe_comp_add_monoid_hom CentroidHom.coe_comp_addMonoidHom @[simp] theorem comp_assoc (h g f : CentroidHom α) : (h.comp g).comp f = h.comp (g.comp f) := rfl #align centroid_hom.comp_assoc CentroidHom.comp_assoc @[simp] theorem comp_id (f : CentroidHom α) : f.comp (CentroidHom.id α) = f := rfl #align centroid_hom.comp_id CentroidHom.comp_id @[simp] theorem id_comp (f : CentroidHom α) : (CentroidHom.id α).comp f = f := rfl #align centroid_hom.id_comp CentroidHom.id_comp @[simp] theorem cancel_right {g₁ g₂ f : CentroidHom α} (hf : Surjective f) : g₁.comp f = g₂.comp f ↔ g₁ = g₂ := ⟨fun h ↦ ext <| hf.forall.2 <| FunLike.ext_iff.1 h, fun a ↦ congrFun (congrArg comp a) f⟩ #align centroid_hom.cancel_right CentroidHom.cancel_right @[simp] theorem cancel_left {g f₁ f₂ : CentroidHom α} (hg : Injective g) : g.comp f₁ = g.comp f₂ ↔ f₁ = f₂ := ⟨fun h ↦ ext fun a ↦ hg <| by rw [← comp_apply, h, comp_apply], congr_arg _⟩ #align centroid_hom.cancel_left CentroidHom.cancel_left instance : Zero (CentroidHom α) := ⟨{ (0 : α →+ α) with map_mul_left' := fun _a _b ↦ (mul_zero _).symm map_mul_right' := fun _a _b ↦ (zero_mul _).symm }⟩ instance : One (CentroidHom α) := ⟨CentroidHom.id α⟩ instance : Add (CentroidHom α) := ⟨fun f g ↦ { (f + g : α →+ α) with map_mul_left' := fun a b ↦ by show f (a * b) + g (a * b) = a * (f b + g b) simp [map_mul_left, mul_add] map_mul_right' := fun a b ↦ by show f (a * b) + g (a * b) = (f a + g a) * b simp [map_mul_right, add_mul] }⟩ instance : Mul (CentroidHom α) := ⟨comp⟩ variable [Monoid M] [Monoid N] [Semiring R] variable [DistribMulAction M α] [SMulCommClass M α α] [IsScalarTower M α α] variable [DistribMulAction N α] [SMulCommClass N α α] [IsScalarTower N α α] variable [Module R α] [SMulCommClass R α α] [IsScalarTower R α α] instance instSMul : SMul M (CentroidHom α) where smul n f := { (n • f : α →+ α) with map_mul_left' := fun a b ↦ by change n • f (a * b) = a * n • f b rw [map_mul_left f, ← mul_smul_comm] map_mul_right' := fun a b ↦ by change n • f (a * b) = n • f a * b rw [map_mul_right f, ← smul_mul_assoc] } #noalign centroid_hom.has_nsmul instance [SMul M N] [IsScalarTower M N α] : IsScalarTower M N (CentroidHom α) where smul_assoc _ _ _ := ext <| fun _ => smul_assoc _ _ _ instance [SMulCommClass M N α] : SMulCommClass M N (CentroidHom α) where smul_comm _ _ _ := ext <| fun _ => smul_comm _ _ _ instance [DistribMulAction Mᵐᵒᵖ α] [IsCentralScalar M α] : IsCentralScalar M (CentroidHom α) where op_smul_eq_smul _ _ := ext <| fun _ => op_smul_eq_smul _ _ instance isScalarTowerRight : IsScalarTower M (CentroidHom α) (CentroidHom α) where smul_assoc _ _ _ := rfl instance hasNPowNat : Pow (CentroidHom α) ℕ := ⟨fun f n ↦ { (f.toEnd ^ n : AddMonoid.End α) with map_mul_left' := fun a b ↦ by induction' n with n ih · exact rfl · simp rw [pow_succ] exact (congr_arg f.toEnd ih).trans (f.map_mul_left' _ _) map_mul_right' := fun a b ↦ by induction' n with n ih · exact rfl · simp rw [pow_succ] exact (congr_arg f.toEnd ih).trans (f.map_mul_right' _ _) }⟩ #align centroid_hom.has_npow_nat CentroidHom.hasNPowNat @[simp, norm_cast] theorem coe_zero : ⇑(0 : CentroidHom α) = 0 := rfl #align centroid_hom.coe_zero CentroidHom.coe_zero @[simp, norm_cast] theorem coe_one : ⇑(1 : CentroidHom α) = id := rfl #align centroid_hom.coe_one CentroidHom.coe_one @[simp, norm_cast] theorem coe_add (f g : CentroidHom α) : ⇑(f + g) = f + g := rfl #align centroid_hom.coe_add CentroidHom.coe_add @[simp, norm_cast] theorem coe_mul (f g : CentroidHom α) : ⇑(f * g) = f ∘ g := rfl #align centroid_hom.coe_mul CentroidHom.coe_mul @[simp, norm_cast] theorem coe_smul (n : M) (f : CentroidHom α) : ⇑(n • f) = n • ⇑f := rfl #align centroid_hom.coe_nsmul CentroidHom.coe_smul @[simp] theorem zero_apply (a : α) : (0 : CentroidHom α) a = 0 := rfl #align centroid_hom.zero_apply CentroidHom.zero_apply @[simp] theorem one_apply (a : α) : (1 : CentroidHom α) a = a := rfl #align centroid_hom.one_apply CentroidHom.one_apply @[simp] theorem add_apply (f g : CentroidHom α) (a : α) : (f + g) a = f a + g a := rfl #align centroid_hom.add_apply CentroidHom.add_apply @[simp] theorem mul_apply (f g : CentroidHom α) (a : α) : (f * g) a = f (g a) := rfl #align centroid_hom.mul_apply CentroidHom.mul_apply @[simp] theorem smul_apply (n : M) (f : CentroidHom α) (a : α) : (n • f) a = n • f a := rfl #align centroid_hom.nsmul_apply CentroidHom.smul_apply example : SMul ℕ (CentroidHom α) := instSMul @[simp] theorem toEnd_zero : (0 : CentroidHom α).toEnd = 0 := rfl #align centroid_hom.to_End_zero CentroidHom.toEnd_zero @[simp] theorem toEnd_add (x y : CentroidHom α) : (x + y).toEnd = x.toEnd + y.toEnd := rfl #align centroid_hom.to_End_add CentroidHom.toEnd_add theorem toEnd_smul (m : M) (x : CentroidHom α) : (m • x).toEnd = m • x.toEnd := rfl #align centroid_hom.to_End_nsmul CentroidHom.toEnd_smul instance : AddCommMonoid (CentroidHom α) := coe_toAddMonoidHom_injective.addCommMonoid _ toEnd_zero toEnd_add (swap toEnd_smul) instance : NatCast (CentroidHom α) where natCast n := n • (1 : CentroidHom α) -- Porting note: `nolint simpNF` added because simplify fails on left-hand side @[simp, norm_cast, nolint simpNF] theorem coe_nat_cast (n : ℕ) : ⇑(n : CentroidHom α) = n • (CentroidHom.id α) := rfl #align centroid_hom.coe_nat_cast CentroidHom.coe_nat_cast theorem nat_cast_apply (n : ℕ) (m : α) : (n : CentroidHom α) m = n • m := rfl #align centroid_hom.nat_cast_apply CentroidHom.nat_cast_apply @[simp] theorem toEnd_one : (1 : CentroidHom α).toEnd = 1 := rfl #align centroid_hom.to_End_one CentroidHom.toEnd_one @[simp] theorem toEnd_mul (x y : CentroidHom α) : (x * y).toEnd = x.toEnd * y.toEnd := rfl #align centroid_hom.to_End_mul CentroidHom.toEnd_mul @[simp] theorem toEnd_pow (x : CentroidHom α) (n : ℕ) : (x ^ n).toEnd = x.toEnd ^ n := rfl #align centroid_hom.to_End_pow CentroidHom.toEnd_pow @[simp, norm_cast] theorem toEnd_nat_cast (n : ℕ) : (n : CentroidHom α).toEnd = ↑n := rfl #align centroid_hom.to_End_nat_cast CentroidHom.toEnd_nat_cast -- cf `add_monoid.End.semiring` instance : Semiring (CentroidHom α) := toEnd_injective.semiring _ toEnd_zero toEnd_one toEnd_add toEnd_mul (swap toEnd_smul) toEnd_pow toEnd_nat_cast variable (α) in /-- `CentroidHom.toEnd` as a `RingHom`. -/ @[simps] def toEndRingHom : CentroidHom α →+* AddMonoid.End α where toFun := toEnd map_zero' := toEnd_zero map_one' := toEnd_one map_add' := toEnd_add map_mul' := toEnd_mul theorem comp_mul_comm (T S : CentroidHom α) (a b : α) : (T ∘ S) (a * b) = (S ∘ T) (a * b) := by simp only [Function.comp_apply] rw [map_mul_right, map_mul_left, ← map_mul_right, ← map_mul_left] #align centroid_hom.comp_mul_comm CentroidHom.comp_mul_comm instance : DistribMulAction M (CentroidHom α) := toEnd_injective.distribMulAction (toEndRingHom α).toAddMonoidHom toEnd_smul instance : Module R (CentroidHom α) := toEnd_injective.module R (toEndRingHom α).toAddMonoidHom toEnd_smul local notation "L" => AddMonoid.End.mulLeft local notation "R" => AddMonoid.End.mulRight lemma centroid_eq_centralizer_mulLeftRight : RingHom.rangeS (toEndRingHom α) = Subsemiring.centralizer (Set.range L ∪ Set.range R) := by ext T refine ⟨?_, fun h ↦ ?_⟩ · rintro ⟨f, rfl⟩ S (⟨a, rfl⟩ | ⟨b, rfl⟩) · exact AddMonoidHom.ext fun b ↦ (map_mul_left f a b).symm · exact AddMonoidHom.ext fun a ↦ (map_mul_right f a b).symm · rw [Subsemiring.mem_centralizer_iff] at h refine ⟨⟨T, fun a b ↦ ?_, fun a b ↦ ?_⟩, rfl⟩ · exact congr($(h (L a) (.inl ⟨a, rfl⟩)) b).symm · exact congr($(h (R b) (.inr ⟨b, rfl⟩)) a).symm /-- The canonical homomorphism from the center into the centroid -/ def centerToCentroid : NonUnitalSubsemiring.center α →ₙ+* CentroidHom α where toFun z := { L (z : α) with map_mul_left' := ((Set.mem_center_iff _).mp z.prop).left_comm map_mul_right' := ((Set.mem_center_iff _).mp z.prop).left_assoc } map_zero' := by simp only [ZeroMemClass.coe_zero, map_zero] exact rfl map_add' := fun _ _ => by simp only [AddSubmonoid.coe_add, NonUnitalSubsemiring.coe_toAddSubmonoid, map_add] exact rfl map_mul' := fun z₁ z₂ => by ext a exact (((Set.mem_center_iff _).mp z₁.prop).left_assoc z₂ a).symm lemma centerToCentroid_apply (z : { x // x ∈ NonUnitalSubsemiring.center α }) (a : α) : (centerToCentroid z) a = z * a := rfl lemma center_iff_op_centroid (a : α) : a ∈ NonUnitalSubsemiring.center α ↔ L a = R a ∧ (L a) ∈ Set.range CentroidHom.toEnd := by constructor · exact fun ha ↦ ⟨AddMonoidHom.ext <| IsMulCentral.comm ha, ⟨centerToCentroid ⟨a, ha⟩, rfl⟩⟩ · rintro ⟨hc, ⟨T, hT⟩⟩ have e1 (d : α) : T d = a * d := congr($hT d) have e2 (d : α) : T d = d * a := congr($(hT.trans hc) d) constructor case comm => exact (congr($hc ·)) case left_assoc => simpa [e1] using (map_mul_right T · ·) case mid_assoc => exact fun b c ↦ by simpa [e1 c, e2 b] using (map_mul_right T b c).symm.trans <| map_mul_left T b c case right_assoc => simpa [e2] using (map_mul_left T · ·) end NonUnitalNonAssocSemiring section NonAssocSemiring variable [NonAssocSemiring α] /-- The canonical isomorphism from the center of a (non-associative) semiring onto its centroid. -/ def centerIsoCentroid : NonUnitalSubsemiring.center α ≃+* CentroidHom α := { centerToCentroid with invFun := fun T ↦ ⟨T 1, by refine ⟨?_, ?_, ?_, ?_⟩; all_goals simp [← map_mul_left, ← map_mul_right]⟩ left_inv := fun z ↦ Subtype.ext <| by simp [centerToCentroid_apply] right_inv := fun T ↦ CentroidHom.ext <| by simp [centerToCentroid_apply, ← map_mul_right] } end NonAssocSemiring section NonUnitalNonAssocRing variable [NonUnitalNonAssocRing α] /-- Negation of `CentroidHom`s as a `CentroidHom`. -/ instance : Neg (CentroidHom α) := ⟨fun f ↦ { (-f : α →+ α) with map_mul_left' := fun a b ↦ by change -f (a * b) = a * (-f b) simp [map_mul_left] map_mul_right' := fun a b ↦ by change -f (a * b) = (-f a) * b simp [map_mul_right] }⟩ instance : Sub (CentroidHom α) := ⟨fun f g ↦ { (f - g : α →+ α) with map_mul_left' := fun a b ↦ by change (⇑f - ⇑g) (a * b) = a * (⇑f - ⇑g) b simp [map_mul_left, mul_sub] map_mul_right' := fun a b ↦ by change (⇑f - ⇑g) (a * b) = ((⇑f - ⇑g) a) * b simp [map_mul_right, sub_mul] }⟩ #noalign centroid_hom.has_zsmul instance : IntCast (CentroidHom α) where intCast z := z • (1 : CentroidHom α) -- Porting note: `nolint simpNF` added because simplify fails on left-hand side @[simp, norm_cast, nolint simpNF] theorem coe_int_cast (z : ℤ) : ⇑(z : CentroidHom α) = z • (CentroidHom.id α) := rfl #align centroid_hom.coe_int_cast CentroidHom.coe_int_cast theorem int_cast_apply (z : ℤ) (m : α) : (z : CentroidHom α) m = z • m := rfl #align centroid_hom.int_cast_apply CentroidHom.int_cast_apply @[simp] theorem toEnd_neg (x : CentroidHom α) : (-x).toEnd = -x.toEnd := rfl #align centroid_hom.to_End_neg CentroidHom.toEnd_neg @[simp] theorem toEnd_sub (x y : CentroidHom α) : (x - y).toEnd = x.toEnd - y.toEnd := rfl #align centroid_hom.to_End_sub CentroidHom.toEnd_sub #align centroid_hom.to_End_zsmul CentroidHom.toEnd_smul instance : AddCommGroup (CentroidHom α) := toEnd_injective.addCommGroup _ toEnd_zero toEnd_add toEnd_neg toEnd_sub (swap toEnd_smul) (swap toEnd_smul) @[simp, norm_cast] theorem coe_neg (f : CentroidHom α) : ⇑(-f) = -f := rfl #align centroid_hom.coe_neg CentroidHom.coe_neg @[simp, norm_cast] theorem coe_sub (f g : CentroidHom α) : ⇑(f - g) = f - g := rfl #align centroid_hom.coe_sub CentroidHom.coe_sub @[simp] theorem neg_apply (f : CentroidHom α) (a : α) : (-f) a = -f a := rfl #align centroid_hom.neg_apply CentroidHom.neg_apply @[simp] theorem sub_apply (f g : CentroidHom α) (a : α) : (f - g) a = f a - g a := rfl #align centroid_hom.sub_apply CentroidHom.sub_apply @[simp, norm_cast] theorem toEnd_int_cast (z : ℤ) : (z : CentroidHom α).toEnd = ↑z := rfl #align centroid_hom.to_End_int_cast CentroidHom.toEnd_int_cast instance instRing : Ring (CentroidHom α) := toEnd_injective.ring _ toEnd_zero toEnd_one toEnd_add toEnd_mul toEnd_neg toEnd_sub (swap toEnd_smul) (swap toEnd_smul) toEnd_pow toEnd_nat_cast toEnd_int_cast end NonUnitalNonAssocRing section NonUnitalRing variable [NonUnitalRing α] -- Porting note: Not sure why Lean didn't like `CentroidHom.Ring` -- See note [reducible non instances] /-- A prime associative ring has commutative centroid. -/ @[reducible] def commRing (h : ∀ a b : α, (∀ r : α, a * r * b = 0) → a = 0 ∨ b = 0) : CommRing (CentroidHom α) := { CentroidHom.instRing with mul_comm := fun f g ↦ by ext
refine' sub_eq_zero.1 (or_self_iff.1 <| (h _ _) fun r ↦ _)
/-- A prime associative ring has commutative centroid. -/ @[reducible] def commRing (h : ∀ a b : α, (∀ r : α, a * r * b = 0) → a = 0 ∨ b = 0) : CommRing (CentroidHom α) := { CentroidHom.instRing with mul_comm := fun f g ↦ by ext
Mathlib.Algebra.Ring.CentroidHom.591_0.FQQ3LT1tg3cKlkH
/-- A prime associative ring has commutative centroid. -/ @[reducible] def commRing (h : ∀ a b : α, (∀ r : α, a * r * b = 0) → a = 0 ∨ b = 0) : CommRing (CentroidHom α)
Mathlib_Algebra_Ring_CentroidHom
case h F : Type u_1 M : Type u_2 N : Type u_3 R : Type u_4 α : Type u_5 inst✝ : NonUnitalRing α h : ∀ (a b : α), (∀ (r : α), a * r * b = 0) → a = 0 ∨ b = 0 src✝ : Ring (CentroidHom α) := instRing f g : CentroidHom α a✝ r : α ⊢ ((f * g) a✝ - (g * f) a✝) * r * ((f * g) a✝ - (g * f) a✝) = 0
/- Copyright (c) 2022 Yaël Dillies. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yaël Dillies, Christopher Hoskin -/ import Mathlib.Algebra.Module.Hom import Mathlib.RingTheory.NonUnitalSubsemiring.Basic import Mathlib.RingTheory.Subsemiring.Basic #align_import algebra.hom.centroid from "leanprover-community/mathlib"@"6cb77a8eaff0ddd100e87b1591c6d3ad319514ff" /-! # Centroid homomorphisms Let `A` be a (non unital, non associative) algebra. The centroid of `A` is the set of linear maps `T` on `A` such that `T` commutes with left and right multiplication, that is to say, for all `a` and `b` in `A`, $$ T(ab) = (Ta)b, T(ab) = a(Tb). $$ In mathlib we call elements of the centroid "centroid homomorphisms" (`CentroidHom`) in keeping with `AddMonoidHom` etc. We use the `FunLike` design, so each type of morphisms has a companion typeclass which is meant to be satisfied by itself and all stricter types. ## Types of morphisms * `CentroidHom`: Maps which preserve left and right multiplication. ## Typeclasses * `CentroidHomClass` ## References * [Jacobson, Structure of Rings][Jacobson1956] * [McCrimmon, A taste of Jordan algebras][mccrimmon2004] ## Tags centroid -/ open Function variable {F M N R α : Type*} /-- The type of centroid homomorphisms from `α` to `α`. -/ structure CentroidHom (α : Type*) [NonUnitalNonAssocSemiring α] extends α →+ α where /-- Commutativity of centroid homomorphims with left multiplication. -/ map_mul_left' (a b : α) : toFun (a * b) = a * toFun b /-- Commutativity of centroid homomorphims with right multiplication. -/ map_mul_right' (a b : α) : toFun (a * b) = toFun a * b #align centroid_hom CentroidHom attribute [nolint docBlame] CentroidHom.toAddMonoidHom /-- `CentroidHomClass F α` states that `F` is a type of centroid homomorphisms. You should extend this class when you extend `CentroidHom`. -/ class CentroidHomClass (F : Type*) (α : outParam <| Type*) [NonUnitalNonAssocSemiring α] extends AddMonoidHomClass F α α where /-- Commutativity of centroid homomorphims with left multiplication. -/ map_mul_left (f : F) (a b : α) : f (a * b) = a * f b /-- Commutativity of centroid homomorphims with right multiplication. -/ map_mul_right (f : F) (a b : α) : f (a * b) = f a * b #align centroid_hom_class CentroidHomClass export CentroidHomClass (map_mul_left map_mul_right) instance [NonUnitalNonAssocSemiring α] [CentroidHomClass F α] : CoeTC F (CentroidHom α) := ⟨fun f ↦ { (f : α →+ α) with toFun := f map_mul_left' := map_mul_left f map_mul_right' := map_mul_right f }⟩ /-! ### Centroid homomorphisms -/ namespace CentroidHom section NonUnitalNonAssocSemiring variable [NonUnitalNonAssocSemiring α] instance : CentroidHomClass (CentroidHom α) α where coe f := f.toFun coe_injective' f g h := by cases f cases g congr with x exact congrFun h x map_zero f := f.map_zero' map_add f := f.map_add' map_mul_left f := f.map_mul_left' map_mul_right f := f.map_mul_right' /-- Helper instance for when there's too many metavariables to apply `FunLike.CoeFun` directly. -/ /- Porting note: Lean gave me `unknown constant 'FunLike.CoeFun'` and says `CoeFun` is a type mismatch, so I used `library_search`. -/ instance : CoeFun (CentroidHom α) fun _ ↦ α → α := inferInstanceAs (CoeFun (CentroidHom α) fun _ ↦ α → α) -- Porting note: removed @[simp]; not in normal form. (`toAddMonoidHom_eq_coe` below ensures that -- the LHS simplifies to the RHS anyway.) theorem toFun_eq_coe {f : CentroidHom α} : f.toFun = f := rfl #align centroid_hom.to_fun_eq_coe CentroidHom.toFun_eq_coe @[ext] theorem ext {f g : CentroidHom α} (h : ∀ a, f a = g a) : f = g := FunLike.ext f g h #align centroid_hom.ext CentroidHom.ext @[simp, norm_cast] theorem coe_toAddMonoidHom (f : CentroidHom α) : ⇑(f : α →+ α) = f := rfl #align centroid_hom.coe_to_add_monoid_hom CentroidHom.coe_toAddMonoidHom @[simp] theorem toAddMonoidHom_eq_coe (f : CentroidHom α) : f.toAddMonoidHom = f := rfl #align centroid_hom.to_add_monoid_hom_eq_coe CentroidHom.toAddMonoidHom_eq_coe theorem coe_toAddMonoidHom_injective : Injective ((↑) : CentroidHom α → α →+ α) := fun _f _g h => ext fun a ↦ haveI := FunLike.congr_fun h a this #align centroid_hom.coe_to_add_monoid_hom_injective CentroidHom.coe_toAddMonoidHom_injective /-- Turn a centroid homomorphism into an additive monoid endomorphism. -/ def toEnd (f : CentroidHom α) : AddMonoid.End α := (f : α →+ α) #align centroid_hom.to_End CentroidHom.toEnd theorem toEnd_injective : Injective (CentroidHom.toEnd : CentroidHom α → AddMonoid.End α) := coe_toAddMonoidHom_injective #align centroid_hom.to_End_injective CentroidHom.toEnd_injective /-- Copy of a `CentroidHom` with a new `toFun` equal to the old one. Useful to fix definitional equalities. -/ protected def copy (f : CentroidHom α) (f' : α → α) (h : f' = f) : CentroidHom α := { f.toAddMonoidHom.copy f' <| h with toFun := f' map_mul_left' := fun a b ↦ by simp_rw [h, map_mul_left] map_mul_right' := fun a b ↦ by simp_rw [h, map_mul_right] } #align centroid_hom.copy CentroidHom.copy @[simp] theorem coe_copy (f : CentroidHom α) (f' : α → α) (h : f' = f) : ⇑(f.copy f' h) = f' := rfl #align centroid_hom.coe_copy CentroidHom.coe_copy theorem copy_eq (f : CentroidHom α) (f' : α → α) (h : f' = f) : f.copy f' h = f := FunLike.ext' h #align centroid_hom.copy_eq CentroidHom.copy_eq variable (α) /-- `id` as a `CentroidHom`. -/ protected def id : CentroidHom α := { AddMonoidHom.id α with map_mul_left' := fun _ _ ↦ rfl map_mul_right' := fun _ _ ↦ rfl } #align centroid_hom.id CentroidHom.id instance : Inhabited (CentroidHom α) := ⟨CentroidHom.id α⟩ @[simp, norm_cast] theorem coe_id : ⇑(CentroidHom.id α) = id := rfl #align centroid_hom.coe_id CentroidHom.coe_id @[simp, norm_cast] theorem toAddMonoidHom_id : (CentroidHom.id α : α →+ α) = AddMonoidHom.id α := rfl #align centroid_hom.coe_to_add_monoid_hom_id CentroidHom.toAddMonoidHom_id variable {α} @[simp] theorem id_apply (a : α) : CentroidHom.id α a = a := rfl #align centroid_hom.id_apply CentroidHom.id_apply /-- Composition of `CentroidHom`s as a `CentroidHom`. -/ def comp (g f : CentroidHom α) : CentroidHom α := { g.toAddMonoidHom.comp f.toAddMonoidHom with map_mul_left' := fun _a _b ↦ (congr_arg g <| f.map_mul_left' _ _).trans <| g.map_mul_left' _ _ map_mul_right' := fun _a _b ↦ (congr_arg g <| f.map_mul_right' _ _).trans <| g.map_mul_right' _ _ } #align centroid_hom.comp CentroidHom.comp @[simp, norm_cast] theorem coe_comp (g f : CentroidHom α) : ⇑(g.comp f) = g ∘ f := rfl #align centroid_hom.coe_comp CentroidHom.coe_comp @[simp] theorem comp_apply (g f : CentroidHom α) (a : α) : g.comp f a = g (f a) := rfl #align centroid_hom.comp_apply CentroidHom.comp_apply @[simp, norm_cast] theorem coe_comp_addMonoidHom (g f : CentroidHom α) : (g.comp f : α →+ α) = (g : α →+ α).comp f := rfl #align centroid_hom.coe_comp_add_monoid_hom CentroidHom.coe_comp_addMonoidHom @[simp] theorem comp_assoc (h g f : CentroidHom α) : (h.comp g).comp f = h.comp (g.comp f) := rfl #align centroid_hom.comp_assoc CentroidHom.comp_assoc @[simp] theorem comp_id (f : CentroidHom α) : f.comp (CentroidHom.id α) = f := rfl #align centroid_hom.comp_id CentroidHom.comp_id @[simp] theorem id_comp (f : CentroidHom α) : (CentroidHom.id α).comp f = f := rfl #align centroid_hom.id_comp CentroidHom.id_comp @[simp] theorem cancel_right {g₁ g₂ f : CentroidHom α} (hf : Surjective f) : g₁.comp f = g₂.comp f ↔ g₁ = g₂ := ⟨fun h ↦ ext <| hf.forall.2 <| FunLike.ext_iff.1 h, fun a ↦ congrFun (congrArg comp a) f⟩ #align centroid_hom.cancel_right CentroidHom.cancel_right @[simp] theorem cancel_left {g f₁ f₂ : CentroidHom α} (hg : Injective g) : g.comp f₁ = g.comp f₂ ↔ f₁ = f₂ := ⟨fun h ↦ ext fun a ↦ hg <| by rw [← comp_apply, h, comp_apply], congr_arg _⟩ #align centroid_hom.cancel_left CentroidHom.cancel_left instance : Zero (CentroidHom α) := ⟨{ (0 : α →+ α) with map_mul_left' := fun _a _b ↦ (mul_zero _).symm map_mul_right' := fun _a _b ↦ (zero_mul _).symm }⟩ instance : One (CentroidHom α) := ⟨CentroidHom.id α⟩ instance : Add (CentroidHom α) := ⟨fun f g ↦ { (f + g : α →+ α) with map_mul_left' := fun a b ↦ by show f (a * b) + g (a * b) = a * (f b + g b) simp [map_mul_left, mul_add] map_mul_right' := fun a b ↦ by show f (a * b) + g (a * b) = (f a + g a) * b simp [map_mul_right, add_mul] }⟩ instance : Mul (CentroidHom α) := ⟨comp⟩ variable [Monoid M] [Monoid N] [Semiring R] variable [DistribMulAction M α] [SMulCommClass M α α] [IsScalarTower M α α] variable [DistribMulAction N α] [SMulCommClass N α α] [IsScalarTower N α α] variable [Module R α] [SMulCommClass R α α] [IsScalarTower R α α] instance instSMul : SMul M (CentroidHom α) where smul n f := { (n • f : α →+ α) with map_mul_left' := fun a b ↦ by change n • f (a * b) = a * n • f b rw [map_mul_left f, ← mul_smul_comm] map_mul_right' := fun a b ↦ by change n • f (a * b) = n • f a * b rw [map_mul_right f, ← smul_mul_assoc] } #noalign centroid_hom.has_nsmul instance [SMul M N] [IsScalarTower M N α] : IsScalarTower M N (CentroidHom α) where smul_assoc _ _ _ := ext <| fun _ => smul_assoc _ _ _ instance [SMulCommClass M N α] : SMulCommClass M N (CentroidHom α) where smul_comm _ _ _ := ext <| fun _ => smul_comm _ _ _ instance [DistribMulAction Mᵐᵒᵖ α] [IsCentralScalar M α] : IsCentralScalar M (CentroidHom α) where op_smul_eq_smul _ _ := ext <| fun _ => op_smul_eq_smul _ _ instance isScalarTowerRight : IsScalarTower M (CentroidHom α) (CentroidHom α) where smul_assoc _ _ _ := rfl instance hasNPowNat : Pow (CentroidHom α) ℕ := ⟨fun f n ↦ { (f.toEnd ^ n : AddMonoid.End α) with map_mul_left' := fun a b ↦ by induction' n with n ih · exact rfl · simp rw [pow_succ] exact (congr_arg f.toEnd ih).trans (f.map_mul_left' _ _) map_mul_right' := fun a b ↦ by induction' n with n ih · exact rfl · simp rw [pow_succ] exact (congr_arg f.toEnd ih).trans (f.map_mul_right' _ _) }⟩ #align centroid_hom.has_npow_nat CentroidHom.hasNPowNat @[simp, norm_cast] theorem coe_zero : ⇑(0 : CentroidHom α) = 0 := rfl #align centroid_hom.coe_zero CentroidHom.coe_zero @[simp, norm_cast] theorem coe_one : ⇑(1 : CentroidHom α) = id := rfl #align centroid_hom.coe_one CentroidHom.coe_one @[simp, norm_cast] theorem coe_add (f g : CentroidHom α) : ⇑(f + g) = f + g := rfl #align centroid_hom.coe_add CentroidHom.coe_add @[simp, norm_cast] theorem coe_mul (f g : CentroidHom α) : ⇑(f * g) = f ∘ g := rfl #align centroid_hom.coe_mul CentroidHom.coe_mul @[simp, norm_cast] theorem coe_smul (n : M) (f : CentroidHom α) : ⇑(n • f) = n • ⇑f := rfl #align centroid_hom.coe_nsmul CentroidHom.coe_smul @[simp] theorem zero_apply (a : α) : (0 : CentroidHom α) a = 0 := rfl #align centroid_hom.zero_apply CentroidHom.zero_apply @[simp] theorem one_apply (a : α) : (1 : CentroidHom α) a = a := rfl #align centroid_hom.one_apply CentroidHom.one_apply @[simp] theorem add_apply (f g : CentroidHom α) (a : α) : (f + g) a = f a + g a := rfl #align centroid_hom.add_apply CentroidHom.add_apply @[simp] theorem mul_apply (f g : CentroidHom α) (a : α) : (f * g) a = f (g a) := rfl #align centroid_hom.mul_apply CentroidHom.mul_apply @[simp] theorem smul_apply (n : M) (f : CentroidHom α) (a : α) : (n • f) a = n • f a := rfl #align centroid_hom.nsmul_apply CentroidHom.smul_apply example : SMul ℕ (CentroidHom α) := instSMul @[simp] theorem toEnd_zero : (0 : CentroidHom α).toEnd = 0 := rfl #align centroid_hom.to_End_zero CentroidHom.toEnd_zero @[simp] theorem toEnd_add (x y : CentroidHom α) : (x + y).toEnd = x.toEnd + y.toEnd := rfl #align centroid_hom.to_End_add CentroidHom.toEnd_add theorem toEnd_smul (m : M) (x : CentroidHom α) : (m • x).toEnd = m • x.toEnd := rfl #align centroid_hom.to_End_nsmul CentroidHom.toEnd_smul instance : AddCommMonoid (CentroidHom α) := coe_toAddMonoidHom_injective.addCommMonoid _ toEnd_zero toEnd_add (swap toEnd_smul) instance : NatCast (CentroidHom α) where natCast n := n • (1 : CentroidHom α) -- Porting note: `nolint simpNF` added because simplify fails on left-hand side @[simp, norm_cast, nolint simpNF] theorem coe_nat_cast (n : ℕ) : ⇑(n : CentroidHom α) = n • (CentroidHom.id α) := rfl #align centroid_hom.coe_nat_cast CentroidHom.coe_nat_cast theorem nat_cast_apply (n : ℕ) (m : α) : (n : CentroidHom α) m = n • m := rfl #align centroid_hom.nat_cast_apply CentroidHom.nat_cast_apply @[simp] theorem toEnd_one : (1 : CentroidHom α).toEnd = 1 := rfl #align centroid_hom.to_End_one CentroidHom.toEnd_one @[simp] theorem toEnd_mul (x y : CentroidHom α) : (x * y).toEnd = x.toEnd * y.toEnd := rfl #align centroid_hom.to_End_mul CentroidHom.toEnd_mul @[simp] theorem toEnd_pow (x : CentroidHom α) (n : ℕ) : (x ^ n).toEnd = x.toEnd ^ n := rfl #align centroid_hom.to_End_pow CentroidHom.toEnd_pow @[simp, norm_cast] theorem toEnd_nat_cast (n : ℕ) : (n : CentroidHom α).toEnd = ↑n := rfl #align centroid_hom.to_End_nat_cast CentroidHom.toEnd_nat_cast -- cf `add_monoid.End.semiring` instance : Semiring (CentroidHom α) := toEnd_injective.semiring _ toEnd_zero toEnd_one toEnd_add toEnd_mul (swap toEnd_smul) toEnd_pow toEnd_nat_cast variable (α) in /-- `CentroidHom.toEnd` as a `RingHom`. -/ @[simps] def toEndRingHom : CentroidHom α →+* AddMonoid.End α where toFun := toEnd map_zero' := toEnd_zero map_one' := toEnd_one map_add' := toEnd_add map_mul' := toEnd_mul theorem comp_mul_comm (T S : CentroidHom α) (a b : α) : (T ∘ S) (a * b) = (S ∘ T) (a * b) := by simp only [Function.comp_apply] rw [map_mul_right, map_mul_left, ← map_mul_right, ← map_mul_left] #align centroid_hom.comp_mul_comm CentroidHom.comp_mul_comm instance : DistribMulAction M (CentroidHom α) := toEnd_injective.distribMulAction (toEndRingHom α).toAddMonoidHom toEnd_smul instance : Module R (CentroidHom α) := toEnd_injective.module R (toEndRingHom α).toAddMonoidHom toEnd_smul local notation "L" => AddMonoid.End.mulLeft local notation "R" => AddMonoid.End.mulRight lemma centroid_eq_centralizer_mulLeftRight : RingHom.rangeS (toEndRingHom α) = Subsemiring.centralizer (Set.range L ∪ Set.range R) := by ext T refine ⟨?_, fun h ↦ ?_⟩ · rintro ⟨f, rfl⟩ S (⟨a, rfl⟩ | ⟨b, rfl⟩) · exact AddMonoidHom.ext fun b ↦ (map_mul_left f a b).symm · exact AddMonoidHom.ext fun a ↦ (map_mul_right f a b).symm · rw [Subsemiring.mem_centralizer_iff] at h refine ⟨⟨T, fun a b ↦ ?_, fun a b ↦ ?_⟩, rfl⟩ · exact congr($(h (L a) (.inl ⟨a, rfl⟩)) b).symm · exact congr($(h (R b) (.inr ⟨b, rfl⟩)) a).symm /-- The canonical homomorphism from the center into the centroid -/ def centerToCentroid : NonUnitalSubsemiring.center α →ₙ+* CentroidHom α where toFun z := { L (z : α) with map_mul_left' := ((Set.mem_center_iff _).mp z.prop).left_comm map_mul_right' := ((Set.mem_center_iff _).mp z.prop).left_assoc } map_zero' := by simp only [ZeroMemClass.coe_zero, map_zero] exact rfl map_add' := fun _ _ => by simp only [AddSubmonoid.coe_add, NonUnitalSubsemiring.coe_toAddSubmonoid, map_add] exact rfl map_mul' := fun z₁ z₂ => by ext a exact (((Set.mem_center_iff _).mp z₁.prop).left_assoc z₂ a).symm lemma centerToCentroid_apply (z : { x // x ∈ NonUnitalSubsemiring.center α }) (a : α) : (centerToCentroid z) a = z * a := rfl lemma center_iff_op_centroid (a : α) : a ∈ NonUnitalSubsemiring.center α ↔ L a = R a ∧ (L a) ∈ Set.range CentroidHom.toEnd := by constructor · exact fun ha ↦ ⟨AddMonoidHom.ext <| IsMulCentral.comm ha, ⟨centerToCentroid ⟨a, ha⟩, rfl⟩⟩ · rintro ⟨hc, ⟨T, hT⟩⟩ have e1 (d : α) : T d = a * d := congr($hT d) have e2 (d : α) : T d = d * a := congr($(hT.trans hc) d) constructor case comm => exact (congr($hc ·)) case left_assoc => simpa [e1] using (map_mul_right T · ·) case mid_assoc => exact fun b c ↦ by simpa [e1 c, e2 b] using (map_mul_right T b c).symm.trans <| map_mul_left T b c case right_assoc => simpa [e2] using (map_mul_left T · ·) end NonUnitalNonAssocSemiring section NonAssocSemiring variable [NonAssocSemiring α] /-- The canonical isomorphism from the center of a (non-associative) semiring onto its centroid. -/ def centerIsoCentroid : NonUnitalSubsemiring.center α ≃+* CentroidHom α := { centerToCentroid with invFun := fun T ↦ ⟨T 1, by refine ⟨?_, ?_, ?_, ?_⟩; all_goals simp [← map_mul_left, ← map_mul_right]⟩ left_inv := fun z ↦ Subtype.ext <| by simp [centerToCentroid_apply] right_inv := fun T ↦ CentroidHom.ext <| by simp [centerToCentroid_apply, ← map_mul_right] } end NonAssocSemiring section NonUnitalNonAssocRing variable [NonUnitalNonAssocRing α] /-- Negation of `CentroidHom`s as a `CentroidHom`. -/ instance : Neg (CentroidHom α) := ⟨fun f ↦ { (-f : α →+ α) with map_mul_left' := fun a b ↦ by change -f (a * b) = a * (-f b) simp [map_mul_left] map_mul_right' := fun a b ↦ by change -f (a * b) = (-f a) * b simp [map_mul_right] }⟩ instance : Sub (CentroidHom α) := ⟨fun f g ↦ { (f - g : α →+ α) with map_mul_left' := fun a b ↦ by change (⇑f - ⇑g) (a * b) = a * (⇑f - ⇑g) b simp [map_mul_left, mul_sub] map_mul_right' := fun a b ↦ by change (⇑f - ⇑g) (a * b) = ((⇑f - ⇑g) a) * b simp [map_mul_right, sub_mul] }⟩ #noalign centroid_hom.has_zsmul instance : IntCast (CentroidHom α) where intCast z := z • (1 : CentroidHom α) -- Porting note: `nolint simpNF` added because simplify fails on left-hand side @[simp, norm_cast, nolint simpNF] theorem coe_int_cast (z : ℤ) : ⇑(z : CentroidHom α) = z • (CentroidHom.id α) := rfl #align centroid_hom.coe_int_cast CentroidHom.coe_int_cast theorem int_cast_apply (z : ℤ) (m : α) : (z : CentroidHom α) m = z • m := rfl #align centroid_hom.int_cast_apply CentroidHom.int_cast_apply @[simp] theorem toEnd_neg (x : CentroidHom α) : (-x).toEnd = -x.toEnd := rfl #align centroid_hom.to_End_neg CentroidHom.toEnd_neg @[simp] theorem toEnd_sub (x y : CentroidHom α) : (x - y).toEnd = x.toEnd - y.toEnd := rfl #align centroid_hom.to_End_sub CentroidHom.toEnd_sub #align centroid_hom.to_End_zsmul CentroidHom.toEnd_smul instance : AddCommGroup (CentroidHom α) := toEnd_injective.addCommGroup _ toEnd_zero toEnd_add toEnd_neg toEnd_sub (swap toEnd_smul) (swap toEnd_smul) @[simp, norm_cast] theorem coe_neg (f : CentroidHom α) : ⇑(-f) = -f := rfl #align centroid_hom.coe_neg CentroidHom.coe_neg @[simp, norm_cast] theorem coe_sub (f g : CentroidHom α) : ⇑(f - g) = f - g := rfl #align centroid_hom.coe_sub CentroidHom.coe_sub @[simp] theorem neg_apply (f : CentroidHom α) (a : α) : (-f) a = -f a := rfl #align centroid_hom.neg_apply CentroidHom.neg_apply @[simp] theorem sub_apply (f g : CentroidHom α) (a : α) : (f - g) a = f a - g a := rfl #align centroid_hom.sub_apply CentroidHom.sub_apply @[simp, norm_cast] theorem toEnd_int_cast (z : ℤ) : (z : CentroidHom α).toEnd = ↑z := rfl #align centroid_hom.to_End_int_cast CentroidHom.toEnd_int_cast instance instRing : Ring (CentroidHom α) := toEnd_injective.ring _ toEnd_zero toEnd_one toEnd_add toEnd_mul toEnd_neg toEnd_sub (swap toEnd_smul) (swap toEnd_smul) toEnd_pow toEnd_nat_cast toEnd_int_cast end NonUnitalNonAssocRing section NonUnitalRing variable [NonUnitalRing α] -- Porting note: Not sure why Lean didn't like `CentroidHom.Ring` -- See note [reducible non instances] /-- A prime associative ring has commutative centroid. -/ @[reducible] def commRing (h : ∀ a b : α, (∀ r : α, a * r * b = 0) → a = 0 ∨ b = 0) : CommRing (CentroidHom α) := { CentroidHom.instRing with mul_comm := fun f g ↦ by ext refine' sub_eq_zero.1 (or_self_iff.1 <| (h _ _) fun r ↦ _)
rw [mul_assoc, sub_mul, sub_eq_zero, ← map_mul_right, ← map_mul_right, coe_mul, coe_mul, comp_mul_comm]
/-- A prime associative ring has commutative centroid. -/ @[reducible] def commRing (h : ∀ a b : α, (∀ r : α, a * r * b = 0) → a = 0 ∨ b = 0) : CommRing (CentroidHom α) := { CentroidHom.instRing with mul_comm := fun f g ↦ by ext refine' sub_eq_zero.1 (or_self_iff.1 <| (h _ _) fun r ↦ _)
Mathlib.Algebra.Ring.CentroidHom.591_0.FQQ3LT1tg3cKlkH
/-- A prime associative ring has commutative centroid. -/ @[reducible] def commRing (h : ∀ a b : α, (∀ r : α, a * r * b = 0) → a = 0 ∨ b = 0) : CommRing (CentroidHom α)
Mathlib_Algebra_Ring_CentroidHom
β : Type u_1 G : Type u_2 α : Type u_3 γ : Type u_4 inst✝³ : Group G inst✝² : AddGroup α inst✝¹ : SMul γ α inst✝ : SlashAction β G α γ k : β g : G a : α ⊢ (-a) ∣[k;γ] g + a ∣[k;γ] g = 0
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by
rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash]
@[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by
Mathlib.NumberTheory.ModularForms.SlashActions.58_0.3orIHeXinm1hkfX
@[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g
Mathlib_NumberTheory_ModularForms_SlashActions
R : Type u_1 β : Type u_2 G : Type u_3 α : Type u_4 γ : Type u_5 inst✝⁷ : Group G inst✝⁶ : AddGroup α inst✝⁵ : Monoid γ inst✝⁴ : MulAction γ α inst✝³ : SMul R γ inst✝² : SMul R α inst✝¹ : IsScalarTower R γ α inst✝ : SlashAction β G α γ k : β g : G a : α r : R ⊢ (r • a) ∣[k;γ] g = r • a ∣[k;γ] g
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by
rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul]
@[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by
Mathlib.NumberTheory.ModularForms.SlashActions.65_0.3orIHeXinm1hkfX
@[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g
Mathlib_NumberTheory_ModularForms_SlashActions
β : Type u_1 G : Type u_2 H : Type u_3 α : Type u_4 γ : Type u_5 inst✝⁴ : Group G inst✝³ : AddMonoid α inst✝² : SMul γ α inst✝¹ : Group H inst✝ : SlashAction β G α γ h : H →* G k : β a : α ⊢ (fun k g => SlashAction.map γ k (h g)) k 1 a = a
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by
simp only [map_one, SlashAction.slash_one]
/-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by
Mathlib.NumberTheory.ModularForms.SlashActions.75_0.3orIHeXinm1hkfX
/-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g
Mathlib_NumberTheory_ModularForms_SlashActions
β : Type u_1 G : Type u_2 H : Type u_3 α : Type u_4 γ : Type u_5 inst✝⁴ : Group G inst✝³ : AddMonoid α inst✝² : SMul γ α inst✝¹ : Group H inst✝ : SlashAction β G α γ h : H →* G k : β g gg : H a : α ⊢ (fun k g => SlashAction.map γ k (h g)) k (g * gg) a = (fun k g => SlashAction.map γ k (h g)) k gg ((fun k g => SlashAction.map γ k (h g)) k g a)
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by
simp only [map_mul, SlashAction.slash_mul]
/-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by
Mathlib.NumberTheory.ModularForms.SlashActions.75_0.3orIHeXinm1hkfX
/-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g
Mathlib_NumberTheory_ModularForms_SlashActions
Γ : Subgroup SL(2, ℤ) k✝ : ℤ f✝ : ℍ → ℂ k : ℤ A B : ↥GL(2, ℝ)⁺ f : ℍ → ℂ ⊢ f ∣[k](A * B) = (f ∣[k]A) ∣[k]B
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by
ext1 x
private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by
Mathlib.NumberTheory.ModularForms.SlashActions.102_0.3orIHeXinm1hkfX
private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B
Mathlib_NumberTheory_ModularForms_SlashActions
case h Γ : Subgroup SL(2, ℤ) k✝ : ℤ f✝ : ℍ → ℂ k : ℤ A B : ↥GL(2, ℝ)⁺ f : ℍ → ℂ x : ℍ ⊢ (f ∣[k](A * B)) x = ((f ∣[k]A) ∣[k]B) x
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x
simp_rw [slash, UpperHalfPlane.denom_cocycle A B x]
private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x
Mathlib.NumberTheory.ModularForms.SlashActions.102_0.3orIHeXinm1hkfX
private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B
Mathlib_NumberTheory_ModularForms_SlashActions
case h Γ : Subgroup SL(2, ℤ) k✝ : ℤ f✝ : ℍ → ℂ k : ℤ A B : ↥GL(2, ℝ)⁺ f : ℍ → ℂ x : ℍ ⊢ f ((A * B) • x) * ↑(Matrix.det ↑↑(A * B)) ^ (k - 1) * (denom A (smulAux B x) * denom B x) ^ (-k) = f (A • B • x) * ↑(Matrix.det ↑↑A) ^ (k - 1) * denom A (B • x) ^ (-k) * ↑(Matrix.det ↑↑B) ^ (k - 1) * denom B x ^ (-k)
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x]
have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x
private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x]
Mathlib.NumberTheory.ModularForms.SlashActions.102_0.3orIHeXinm1hkfX
private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B
Mathlib_NumberTheory_ModularForms_SlashActions
Γ : Subgroup SL(2, ℤ) k✝ : ℤ f✝ : ℍ → ℂ k : ℤ A B : ↥GL(2, ℝ)⁺ f : ℍ → ℂ x : ℍ ⊢ (A * B) • x = A • B • x
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by
convert UpperHalfPlane.mul_smul' A B x
private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by
Mathlib.NumberTheory.ModularForms.SlashActions.102_0.3orIHeXinm1hkfX
private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B
Mathlib_NumberTheory_ModularForms_SlashActions
case h Γ : Subgroup SL(2, ℤ) k✝ : ℤ f✝ : ℍ → ℂ k : ℤ A B : ↥GL(2, ℝ)⁺ f : ℍ → ℂ x : ℍ e3 : (A * B) • x = A • B • x ⊢ f ((A * B) • x) * ↑(Matrix.det ↑↑(A * B)) ^ (k - 1) * (denom A (smulAux B x) * denom B x) ^ (-k) = f (A • B • x) * ↑(Matrix.det ↑↑A) ^ (k - 1) * denom A (B • x) ^ (-k) * ↑(Matrix.det ↑↑B) ^ (k - 1) * denom B x ^ (-k)
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x
rw [e3]
private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x
Mathlib.NumberTheory.ModularForms.SlashActions.102_0.3orIHeXinm1hkfX
private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B
Mathlib_NumberTheory_ModularForms_SlashActions
case h Γ : Subgroup SL(2, ℤ) k✝ : ℤ f✝ : ℍ → ℂ k : ℤ A B : ↥GL(2, ℝ)⁺ f : ℍ → ℂ x : ℍ e3 : (A * B) • x = A • B • x ⊢ f (A • B • x) * ↑(Matrix.det ↑↑(A * B)) ^ (k - 1) * (denom A (smulAux B x) * denom B x) ^ (-k) = f (A • B • x) * ↑(Matrix.det ↑↑A) ^ (k - 1) * denom A (B • x) ^ (-k) * ↑(Matrix.det ↑↑B) ^ (k - 1) * denom B x ^ (-k)
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3]
simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at *
private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3]
Mathlib.NumberTheory.ModularForms.SlashActions.102_0.3orIHeXinm1hkfX
private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B
Mathlib_NumberTheory_ModularForms_SlashActions
case h Γ : Subgroup SL(2, ℤ) k✝ : ℤ f✝ : ℍ → ℂ k : ℤ A B : ↥GL(2, ℝ)⁺ f : ℍ → ℂ x : ℍ e3 : (A * B) • x = A • B • x ⊢ f (A • B • x) * (↑(Matrix.det ↑↑A) * ↑(Matrix.det ↑↑B)) ^ (k - 1) * ((↑(↑↑A 1 0) * ((↑(↑↑B 0 0) * ↑x + ↑(↑↑B 0 1)) / (↑(↑↑B 1 0) * ↑x + ↑(↑↑B 1 1))) + ↑(↑↑A 1 1)) * (↑(↑↑B 1 0) * ↑x + ↑(↑↑B 1 1))) ^ (-k) = f (A • B • x) * ↑(Matrix.det ↑↑A) ^ (k - 1) * (↑(↑↑A 1 0) * ((↑(↑↑B 0 0) * ↑x + ↑(↑↑B 0 1)) / (↑(↑↑B 1 0) * ↑x + ↑(↑↑B 1 1))) + ↑(↑↑A 1 1)) ^ (-k) * ↑(Matrix.det ↑↑B) ^ (k - 1) * (↑(↑↑B 1 0) * ↑x + ↑(↑↑B 1 1)) ^ (-k)
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at *
field_simp
private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at *
Mathlib.NumberTheory.ModularForms.SlashActions.102_0.3orIHeXinm1hkfX
private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B
Mathlib_NumberTheory_ModularForms_SlashActions
case h Γ : Subgroup SL(2, ℤ) k✝ : ℤ f✝ : ℍ → ℂ k : ℤ A B : ↥GL(2, ℝ)⁺ f : ℍ → ℂ x : ℍ e3 : (A * B) • x = A • B • x ⊢ f (A • B • x) * (↑(Matrix.det ↑↑A) * ↑(Matrix.det ↑↑B)) ^ (k - 1) / ((↑(↑↑A 1 0) * (↑(↑↑B 0 0) * ↑x + ↑(↑↑B 0 1)) / (↑(↑↑B 1 0) * ↑x + ↑(↑↑B 1 1)) + ↑(↑↑A 1 1)) * (↑(↑↑B 1 0) * ↑x + ↑(↑↑B 1 1))) ^ k = f (A • B • x) * ↑(Matrix.det ↑↑A) ^ (k - 1) * ↑(Matrix.det ↑↑B) ^ (k - 1) / ((↑(↑↑A 1 0) * (↑(↑↑B 0 0) * ↑x + ↑(↑↑B 0 1)) / (↑(↑↑B 1 0) * ↑x + ↑(↑↑B 1 1)) + ↑(↑↑A 1 1)) ^ k * (↑(↑↑B 1 0) * ↑x + ↑(↑↑B 1 1)) ^ k)
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp
have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow]
private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp
Mathlib.NumberTheory.ModularForms.SlashActions.102_0.3orIHeXinm1hkfX
private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B
Mathlib_NumberTheory_ModularForms_SlashActions
Γ : Subgroup SL(2, ℤ) k✝ : ℤ f✝ : ℍ → ℂ k : ℤ A B : ↥GL(2, ℝ)⁺ f : ℍ → ℂ x : ℍ e3 : (A * B) • x = A • B • x ⊢ (↑(Matrix.det ↑↑A) * ↑(Matrix.det ↑↑B)) ^ (k - 1) = ↑(Matrix.det ↑↑A) ^ (k - 1) * ↑(Matrix.det ↑↑B) ^ (k - 1)
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by
simp_rw [← mul_zpow]
private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by
Mathlib.NumberTheory.ModularForms.SlashActions.102_0.3orIHeXinm1hkfX
private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B
Mathlib_NumberTheory_ModularForms_SlashActions
case h Γ : Subgroup SL(2, ℤ) k✝ : ℤ f✝ : ℍ → ℂ k : ℤ A B : ↥GL(2, ℝ)⁺ f : ℍ → ℂ x : ℍ e3 : (A * B) • x = A • B • x this : (↑(Matrix.det ↑↑A) * ↑(Matrix.det ↑↑B)) ^ (k - 1) = ↑(Matrix.det ↑↑A) ^ (k - 1) * ↑(Matrix.det ↑↑B) ^ (k - 1) ⊢ f (A • B • x) * (↑(Matrix.det ↑↑A) * ↑(Matrix.det ↑↑B)) ^ (k - 1) / ((↑(↑↑A 1 0) * (↑(↑↑B 0 0) * ↑x + ↑(↑↑B 0 1)) / (↑(↑↑B 1 0) * ↑x + ↑(↑↑B 1 1)) + ↑(↑↑A 1 1)) * (↑(↑↑B 1 0) * ↑x + ↑(↑↑B 1 1))) ^ k = f (A • B • x) * ↑(Matrix.det ↑↑A) ^ (k - 1) * ↑(Matrix.det ↑↑B) ^ (k - 1) / ((↑(↑↑A 1 0) * (↑(↑↑B 0 0) * ↑x + ↑(↑↑B 0 1)) / (↑(↑↑B 1 0) * ↑x + ↑(↑↑B 1 1)) + ↑(↑↑A 1 1)) ^ k * (↑(↑↑B 1 0) * ↑x + ↑(↑↑B 1 1)) ^ k)
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow]
simp_rw [this, ← mul_assoc, ← mul_zpow]
private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow]
Mathlib.NumberTheory.ModularForms.SlashActions.102_0.3orIHeXinm1hkfX
private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B
Mathlib_NumberTheory_ModularForms_SlashActions
Γ : Subgroup SL(2, ℤ) k✝ : ℤ f✝ : ℍ → ℂ k : ℤ A : ↥GL(2, ℝ)⁺ f g : ℍ → ℂ ⊢ (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by
ext1
private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by
Mathlib.NumberTheory.ModularForms.SlashActions.119_0.3orIHeXinm1hkfX
private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A
Mathlib_NumberTheory_ModularForms_SlashActions
case h Γ : Subgroup SL(2, ℤ) k✝ : ℤ f✝ : ℍ → ℂ k : ℤ A : ↥GL(2, ℝ)⁺ f g : ℍ → ℂ x✝ : ℍ ⊢ ((f + g) ∣[k]A) x✝ = (f ∣[k]A + g ∣[k]A) x✝
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1
simp only [slash, Pi.add_apply, denom, zpow_neg]
private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1
Mathlib.NumberTheory.ModularForms.SlashActions.119_0.3orIHeXinm1hkfX
private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A
Mathlib_NumberTheory_ModularForms_SlashActions
case h Γ : Subgroup SL(2, ℤ) k✝ : ℤ f✝ : ℍ → ℂ k : ℤ A : ↥GL(2, ℝ)⁺ f g : ℍ → ℂ x✝ : ℍ ⊢ (f (A • x✝) + g (A • x✝)) * ↑(Matrix.det ↑↑A) ^ (k - 1) * ((↑(↑↑A 1 0) * ↑x✝ + ↑(↑↑A 1 1)) ^ k)⁻¹ = f (A • x✝) * ↑(Matrix.det ↑↑A) ^ (k - 1) * ((↑(↑↑A 1 0) * ↑x✝ + ↑(↑↑A 1 1)) ^ k)⁻¹ + g (A • x✝) * ↑(Matrix.det ↑↑A) ^ (k - 1) * ((↑(↑↑A 1 0) * ↑x✝ + ↑(↑↑A 1 1)) ^ k)⁻¹
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg]
ring
private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg]
Mathlib.NumberTheory.ModularForms.SlashActions.119_0.3orIHeXinm1hkfX
private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A
Mathlib_NumberTheory_ModularForms_SlashActions
Γ : Subgroup SL(2, ℤ) k✝ : ℤ f✝ : ℍ → ℂ k : ℤ f : ℍ → ℂ ⊢ ∀ (x : ℍ), (f ∣[k]1) x = f x
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg] ring private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by
simp [slash, denom]
private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by
Mathlib.NumberTheory.ModularForms.SlashActions.125_0.3orIHeXinm1hkfX
private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f
Mathlib_NumberTheory_ModularForms_SlashActions
Γ : Subgroup SL(2, ℤ) k✝ : ℤ f✝ : ℍ → ℂ α : Type u_1 inst✝¹ : SMul α ℂ inst✝ : IsScalarTower α ℂ ℂ k : ℤ A : ↥GL(2, ℝ)⁺ f : ℍ → ℂ c : α ⊢ (c • f) ∣[k]A = c • f ∣[k]A
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg] ring private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by simp [slash, denom] variable {α : Type*} [SMul α ℂ] [IsScalarTower α ℂ ℂ] private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by
simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)]
private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by
Mathlib.NumberTheory.ModularForms.SlashActions.130_0.3orIHeXinm1hkfX
private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A
Mathlib_NumberTheory_ModularForms_SlashActions
Γ : Subgroup SL(2, ℤ) k✝ : ℤ f✝ : ℍ → ℂ α : Type u_1 inst✝¹ : SMul α ℂ inst✝ : IsScalarTower α ℂ ℂ k : ℤ A : ↥GL(2, ℝ)⁺ f : ℍ → ℂ c : α ⊢ ((c • 1) • f) ∣[k]A = (c • 1) • f ∣[k]A
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg] ring private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by simp [slash, denom] variable {α : Type*} [SMul α ℂ] [IsScalarTower α ℂ ℂ] private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)]
ext1
private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)]
Mathlib.NumberTheory.ModularForms.SlashActions.130_0.3orIHeXinm1hkfX
private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A
Mathlib_NumberTheory_ModularForms_SlashActions
case h Γ : Subgroup SL(2, ℤ) k✝ : ℤ f✝ : ℍ → ℂ α : Type u_1 inst✝¹ : SMul α ℂ inst✝ : IsScalarTower α ℂ ℂ k : ℤ A : ↥GL(2, ℝ)⁺ f : ℍ → ℂ c : α x✝ : ℍ ⊢ (((c • 1) • f) ∣[k]A) x✝ = ((c • 1) • f ∣[k]A) x✝
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg] ring private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by simp [slash, denom] variable {α : Type*} [SMul α ℂ] [IsScalarTower α ℂ ℂ] private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)] ext1
simp_rw [slash]
private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)] ext1
Mathlib.NumberTheory.ModularForms.SlashActions.130_0.3orIHeXinm1hkfX
private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A
Mathlib_NumberTheory_ModularForms_SlashActions
case h Γ : Subgroup SL(2, ℤ) k✝ : ℤ f✝ : ℍ → ℂ α : Type u_1 inst✝¹ : SMul α ℂ inst✝ : IsScalarTower α ℂ ℂ k : ℤ A : ↥GL(2, ℝ)⁺ f : ℍ → ℂ c : α x✝ : ℍ ⊢ ((c • 1) • f) (A • x✝) * ↑(Matrix.det ↑↑A) ^ (k - 1) * denom A x✝ ^ (-k) = ((c • 1) • f ∣[k]A) x✝
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg] ring private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by simp [slash, denom] variable {α : Type*} [SMul α ℂ] [IsScalarTower α ℂ ℂ] private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)] ext1 simp_rw [slash]
simp only [slash, Algebra.id.smul_eq_mul, Matrix.GeneralLinearGroup.val_det_apply, Pi.smul_apply]
private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)] ext1 simp_rw [slash]
Mathlib.NumberTheory.ModularForms.SlashActions.130_0.3orIHeXinm1hkfX
private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A
Mathlib_NumberTheory_ModularForms_SlashActions
case h Γ : Subgroup SL(2, ℤ) k✝ : ℤ f✝ : ℍ → ℂ α : Type u_1 inst✝¹ : SMul α ℂ inst✝ : IsScalarTower α ℂ ℂ k : ℤ A : ↥GL(2, ℝ)⁺ f : ℍ → ℂ c : α x✝ : ℍ ⊢ c • 1 * f (A • x✝) * ↑(Matrix.det ↑↑A) ^ (k - 1) * denom A x✝ ^ (-k) = c • 1 * (f (A • x✝) * ↑(Matrix.det ↑↑A) ^ (k - 1) * denom A x✝ ^ (-k))
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg] ring private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by simp [slash, denom] variable {α : Type*} [SMul α ℂ] [IsScalarTower α ℂ ℂ] private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)] ext1 simp_rw [slash] simp only [slash, Algebra.id.smul_eq_mul, Matrix.GeneralLinearGroup.val_det_apply, Pi.smul_apply]
ring
private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)] ext1 simp_rw [slash] simp only [slash, Algebra.id.smul_eq_mul, Matrix.GeneralLinearGroup.val_det_apply, Pi.smul_apply]
Mathlib.NumberTheory.ModularForms.SlashActions.130_0.3orIHeXinm1hkfX
private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A
Mathlib_NumberTheory_ModularForms_SlashActions
Γ : Subgroup SL(2, ℤ) k✝ : ℤ f : ℍ → ℂ α : Type u_1 inst✝¹ : SMul α ℂ inst✝ : IsScalarTower α ℂ ℂ k : ℤ A : ↥GL(2, ℝ)⁺ x✝ : ℍ ⊢ (0 ∣[k]A) x✝ = OfNat.ofNat 0 x✝
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg] ring private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by simp [slash, denom] variable {α : Type*} [SMul α ℂ] [IsScalarTower α ℂ ℂ] private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)] ext1 simp_rw [slash] simp only [slash, Algebra.id.smul_eq_mul, Matrix.GeneralLinearGroup.val_det_apply, Pi.smul_apply] ring private theorem zero_slash (k : ℤ) (A : GL(2, ℝ)⁺) : (0 : ℍ → ℂ) ∣[k]A = 0 := funext fun _ => by
simp only [slash, Pi.zero_apply, zero_mul]
private theorem zero_slash (k : ℤ) (A : GL(2, ℝ)⁺) : (0 : ℍ → ℂ) ∣[k]A = 0 := funext fun _ => by
Mathlib.NumberTheory.ModularForms.SlashActions.138_0.3orIHeXinm1hkfX
private theorem zero_slash (k : ℤ) (A : GL(2, ℝ)⁺) : (0 : ℍ → ℂ) ∣[k]A = 0
Mathlib_NumberTheory_ModularForms_SlashActions
Γ : Subgroup SL(2, ℤ) k : ℤ f : ℍ → ℂ A : SL(2, ℤ) ⊢ 1 ∣[0] A = 1
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg] ring private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by simp [slash, denom] variable {α : Type*} [SMul α ℂ] [IsScalarTower α ℂ ℂ] private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)] ext1 simp_rw [slash] simp only [slash, Algebra.id.smul_eq_mul, Matrix.GeneralLinearGroup.val_det_apply, Pi.smul_apply] ring private theorem zero_slash (k : ℤ) (A : GL(2, ℝ)⁺) : (0 : ℍ → ℂ) ∣[k]A = 0 := funext fun _ => by simp only [slash, Pi.zero_apply, zero_mul] instance : SlashAction ℤ GL(2, ℝ)⁺ (ℍ → ℂ) ℂ where map := slash zero_slash := zero_slash slash_one := slash_one slash_mul := slash_mul smul_slash := smul_slash add_slash := add_slash end theorem slash_def (A : GL(2, ℝ)⁺) : f ∣[k] A = slash k A f := rfl #align modular_form.slash_def ModularForm.slash_def instance subgroupAction (Γ : Subgroup SL(2, ℤ)) : SlashAction ℤ Γ (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (MonoidHom.comp (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ)) (Subgroup.subtype Γ))) #align modular_form.subgroup_action ModularForm.subgroupAction @[simp] theorem subgroup_slash (Γ : Subgroup SL(2, ℤ)) (γ : Γ) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl #align modular_form.subgroup_slash ModularForm.subgroup_slash instance SLAction : SlashAction ℤ SL(2, ℤ) (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ))) set_option linter.uppercaseLean3 false in #align modular_form.SL_action ModularForm.SLAction @[simp] theorem SL_slash (γ : SL(2, ℤ)) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl set_option linter.uppercaseLean3 false in #align modular_form.SL_slash ModularForm.SL_slash /-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by
have : ((↑ₘ(A : GL(2, ℝ)⁺)).det : ℝ) = 1 := det_coe'
/-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by
Mathlib.NumberTheory.ModularForms.SlashActions.179_0.3orIHeXinm1hkfX
/-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ)
Mathlib_NumberTheory_ModularForms_SlashActions
Γ : Subgroup SL(2, ℤ) k : ℤ f : ℍ → ℂ A : SL(2, ℤ) this : Matrix.det ↑↑↑A = 1 ⊢ 1 ∣[0] A = 1
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg] ring private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by simp [slash, denom] variable {α : Type*} [SMul α ℂ] [IsScalarTower α ℂ ℂ] private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)] ext1 simp_rw [slash] simp only [slash, Algebra.id.smul_eq_mul, Matrix.GeneralLinearGroup.val_det_apply, Pi.smul_apply] ring private theorem zero_slash (k : ℤ) (A : GL(2, ℝ)⁺) : (0 : ℍ → ℂ) ∣[k]A = 0 := funext fun _ => by simp only [slash, Pi.zero_apply, zero_mul] instance : SlashAction ℤ GL(2, ℝ)⁺ (ℍ → ℂ) ℂ where map := slash zero_slash := zero_slash slash_one := slash_one slash_mul := slash_mul smul_slash := smul_slash add_slash := add_slash end theorem slash_def (A : GL(2, ℝ)⁺) : f ∣[k] A = slash k A f := rfl #align modular_form.slash_def ModularForm.slash_def instance subgroupAction (Γ : Subgroup SL(2, ℤ)) : SlashAction ℤ Γ (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (MonoidHom.comp (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ)) (Subgroup.subtype Γ))) #align modular_form.subgroup_action ModularForm.subgroupAction @[simp] theorem subgroup_slash (Γ : Subgroup SL(2, ℤ)) (γ : Γ) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl #align modular_form.subgroup_slash ModularForm.subgroup_slash instance SLAction : SlashAction ℤ SL(2, ℤ) (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ))) set_option linter.uppercaseLean3 false in #align modular_form.SL_action ModularForm.SLAction @[simp] theorem SL_slash (γ : SL(2, ℤ)) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl set_option linter.uppercaseLean3 false in #align modular_form.SL_slash ModularForm.SL_slash /-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by have : ((↑ₘ(A : GL(2, ℝ)⁺)).det : ℝ) = 1 := det_coe'
funext
/-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by have : ((↑ₘ(A : GL(2, ℝ)⁺)).det : ℝ) = 1 := det_coe'
Mathlib.NumberTheory.ModularForms.SlashActions.179_0.3orIHeXinm1hkfX
/-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ)
Mathlib_NumberTheory_ModularForms_SlashActions
case h Γ : Subgroup SL(2, ℤ) k : ℤ f : ℍ → ℂ A : SL(2, ℤ) this : Matrix.det ↑↑↑A = 1 x✝ : ℍ ⊢ (1 ∣[0] A) x✝ = OfNat.ofNat 1 x✝
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg] ring private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by simp [slash, denom] variable {α : Type*} [SMul α ℂ] [IsScalarTower α ℂ ℂ] private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)] ext1 simp_rw [slash] simp only [slash, Algebra.id.smul_eq_mul, Matrix.GeneralLinearGroup.val_det_apply, Pi.smul_apply] ring private theorem zero_slash (k : ℤ) (A : GL(2, ℝ)⁺) : (0 : ℍ → ℂ) ∣[k]A = 0 := funext fun _ => by simp only [slash, Pi.zero_apply, zero_mul] instance : SlashAction ℤ GL(2, ℝ)⁺ (ℍ → ℂ) ℂ where map := slash zero_slash := zero_slash slash_one := slash_one slash_mul := slash_mul smul_slash := smul_slash add_slash := add_slash end theorem slash_def (A : GL(2, ℝ)⁺) : f ∣[k] A = slash k A f := rfl #align modular_form.slash_def ModularForm.slash_def instance subgroupAction (Γ : Subgroup SL(2, ℤ)) : SlashAction ℤ Γ (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (MonoidHom.comp (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ)) (Subgroup.subtype Γ))) #align modular_form.subgroup_action ModularForm.subgroupAction @[simp] theorem subgroup_slash (Γ : Subgroup SL(2, ℤ)) (γ : Γ) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl #align modular_form.subgroup_slash ModularForm.subgroup_slash instance SLAction : SlashAction ℤ SL(2, ℤ) (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ))) set_option linter.uppercaseLean3 false in #align modular_form.SL_action ModularForm.SLAction @[simp] theorem SL_slash (γ : SL(2, ℤ)) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl set_option linter.uppercaseLean3 false in #align modular_form.SL_slash ModularForm.SL_slash /-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by have : ((↑ₘ(A : GL(2, ℝ)⁺)).det : ℝ) = 1 := det_coe' funext
rw [SL_slash, slash_def, slash, zero_sub, this]
/-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by have : ((↑ₘ(A : GL(2, ℝ)⁺)).det : ℝ) = 1 := det_coe' funext
Mathlib.NumberTheory.ModularForms.SlashActions.179_0.3orIHeXinm1hkfX
/-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ)
Mathlib_NumberTheory_ModularForms_SlashActions
case h Γ : Subgroup SL(2, ℤ) k : ℤ f : ℍ → ℂ A : SL(2, ℤ) this : Matrix.det ↑↑↑A = 1 x✝ : ℍ ⊢ OfNat.ofNat 1 (↑A • x✝) * ↑1 ^ (-1) * denom (↑A) x✝ ^ (-0) = OfNat.ofNat 1 x✝
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg] ring private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by simp [slash, denom] variable {α : Type*} [SMul α ℂ] [IsScalarTower α ℂ ℂ] private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)] ext1 simp_rw [slash] simp only [slash, Algebra.id.smul_eq_mul, Matrix.GeneralLinearGroup.val_det_apply, Pi.smul_apply] ring private theorem zero_slash (k : ℤ) (A : GL(2, ℝ)⁺) : (0 : ℍ → ℂ) ∣[k]A = 0 := funext fun _ => by simp only [slash, Pi.zero_apply, zero_mul] instance : SlashAction ℤ GL(2, ℝ)⁺ (ℍ → ℂ) ℂ where map := slash zero_slash := zero_slash slash_one := slash_one slash_mul := slash_mul smul_slash := smul_slash add_slash := add_slash end theorem slash_def (A : GL(2, ℝ)⁺) : f ∣[k] A = slash k A f := rfl #align modular_form.slash_def ModularForm.slash_def instance subgroupAction (Γ : Subgroup SL(2, ℤ)) : SlashAction ℤ Γ (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (MonoidHom.comp (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ)) (Subgroup.subtype Γ))) #align modular_form.subgroup_action ModularForm.subgroupAction @[simp] theorem subgroup_slash (Γ : Subgroup SL(2, ℤ)) (γ : Γ) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl #align modular_form.subgroup_slash ModularForm.subgroup_slash instance SLAction : SlashAction ℤ SL(2, ℤ) (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ))) set_option linter.uppercaseLean3 false in #align modular_form.SL_action ModularForm.SLAction @[simp] theorem SL_slash (γ : SL(2, ℤ)) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl set_option linter.uppercaseLean3 false in #align modular_form.SL_slash ModularForm.SL_slash /-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by have : ((↑ₘ(A : GL(2, ℝ)⁺)).det : ℝ) = 1 := det_coe' funext rw [SL_slash, slash_def, slash, zero_sub, this]
simp
/-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by have : ((↑ₘ(A : GL(2, ℝ)⁺)).det : ℝ) = 1 := det_coe' funext rw [SL_slash, slash_def, slash, zero_sub, this]
Mathlib.NumberTheory.ModularForms.SlashActions.179_0.3orIHeXinm1hkfX
/-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ)
Mathlib_NumberTheory_ModularForms_SlashActions
Γ✝ : Subgroup SL(2, ℤ) k✝ : ℤ f✝ : ℍ → ℂ k : ℤ Γ : Subgroup SL(2, ℤ) f : ℍ → ℂ γ : ↥Γ z : ℍ ⊢ (f ∣[k] γ) z = f z ↔ f (γ • z) = (↑(↑↑↑γ 1 0) * ↑z + ↑(↑↑↑γ 1 1)) ^ k * f z
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg] ring private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by simp [slash, denom] variable {α : Type*} [SMul α ℂ] [IsScalarTower α ℂ ℂ] private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)] ext1 simp_rw [slash] simp only [slash, Algebra.id.smul_eq_mul, Matrix.GeneralLinearGroup.val_det_apply, Pi.smul_apply] ring private theorem zero_slash (k : ℤ) (A : GL(2, ℝ)⁺) : (0 : ℍ → ℂ) ∣[k]A = 0 := funext fun _ => by simp only [slash, Pi.zero_apply, zero_mul] instance : SlashAction ℤ GL(2, ℝ)⁺ (ℍ → ℂ) ℂ where map := slash zero_slash := zero_slash slash_one := slash_one slash_mul := slash_mul smul_slash := smul_slash add_slash := add_slash end theorem slash_def (A : GL(2, ℝ)⁺) : f ∣[k] A = slash k A f := rfl #align modular_form.slash_def ModularForm.slash_def instance subgroupAction (Γ : Subgroup SL(2, ℤ)) : SlashAction ℤ Γ (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (MonoidHom.comp (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ)) (Subgroup.subtype Γ))) #align modular_form.subgroup_action ModularForm.subgroupAction @[simp] theorem subgroup_slash (Γ : Subgroup SL(2, ℤ)) (γ : Γ) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl #align modular_form.subgroup_slash ModularForm.subgroup_slash instance SLAction : SlashAction ℤ SL(2, ℤ) (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ))) set_option linter.uppercaseLean3 false in #align modular_form.SL_action ModularForm.SLAction @[simp] theorem SL_slash (γ : SL(2, ℤ)) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl set_option linter.uppercaseLean3 false in #align modular_form.SL_slash ModularForm.SL_slash /-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by have : ((↑ₘ(A : GL(2, ℝ)⁺)).det : ℝ) = 1 := det_coe' funext rw [SL_slash, slash_def, slash, zero_sub, this] simp #align modular_form.is_invariant_one ModularForm.is_invariant_one /-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by
simp only [subgroup_slash, slash_def, ModularForm.slash]
/-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by
Mathlib.NumberTheory.ModularForms.SlashActions.188_0.3orIHeXinm1hkfX
/-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z
Mathlib_NumberTheory_ModularForms_SlashActions
Γ✝ : Subgroup SL(2, ℤ) k✝ : ℤ f✝ : ℍ → ℂ k : ℤ Γ : Subgroup SL(2, ℤ) f : ℍ → ℂ γ : ↥Γ z : ℍ ⊢ f (↑↑γ • z) * ↑(Matrix.det ↑↑↑↑γ) ^ (k - 1) * denom (↑↑γ) z ^ (-k) = f z ↔ f (γ • z) = (↑(↑↑↑γ 1 0) * ↑z + ↑(↑↑↑γ 1 1)) ^ k * f z
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg] ring private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by simp [slash, denom] variable {α : Type*} [SMul α ℂ] [IsScalarTower α ℂ ℂ] private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)] ext1 simp_rw [slash] simp only [slash, Algebra.id.smul_eq_mul, Matrix.GeneralLinearGroup.val_det_apply, Pi.smul_apply] ring private theorem zero_slash (k : ℤ) (A : GL(2, ℝ)⁺) : (0 : ℍ → ℂ) ∣[k]A = 0 := funext fun _ => by simp only [slash, Pi.zero_apply, zero_mul] instance : SlashAction ℤ GL(2, ℝ)⁺ (ℍ → ℂ) ℂ where map := slash zero_slash := zero_slash slash_one := slash_one slash_mul := slash_mul smul_slash := smul_slash add_slash := add_slash end theorem slash_def (A : GL(2, ℝ)⁺) : f ∣[k] A = slash k A f := rfl #align modular_form.slash_def ModularForm.slash_def instance subgroupAction (Γ : Subgroup SL(2, ℤ)) : SlashAction ℤ Γ (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (MonoidHom.comp (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ)) (Subgroup.subtype Γ))) #align modular_form.subgroup_action ModularForm.subgroupAction @[simp] theorem subgroup_slash (Γ : Subgroup SL(2, ℤ)) (γ : Γ) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl #align modular_form.subgroup_slash ModularForm.subgroup_slash instance SLAction : SlashAction ℤ SL(2, ℤ) (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ))) set_option linter.uppercaseLean3 false in #align modular_form.SL_action ModularForm.SLAction @[simp] theorem SL_slash (γ : SL(2, ℤ)) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl set_option linter.uppercaseLean3 false in #align modular_form.SL_slash ModularForm.SL_slash /-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by have : ((↑ₘ(A : GL(2, ℝ)⁺)).det : ℝ) = 1 := det_coe' funext rw [SL_slash, slash_def, slash, zero_sub, this] simp #align modular_form.is_invariant_one ModularForm.is_invariant_one /-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by simp only [subgroup_slash, slash_def, ModularForm.slash]
convert inv_mul_eq_iff_eq_mul₀ (G₀ := ℂ) _ using 2
/-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by simp only [subgroup_slash, slash_def, ModularForm.slash]
Mathlib.NumberTheory.ModularForms.SlashActions.188_0.3orIHeXinm1hkfX
/-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z
Mathlib_NumberTheory_ModularForms_SlashActions
case h.e'_1.h.e'_2 Γ✝ : Subgroup SL(2, ℤ) k✝ : ℤ f✝ : ℍ → ℂ k : ℤ Γ : Subgroup SL(2, ℤ) f : ℍ → ℂ γ : ↥Γ z : ℍ ⊢ f (↑↑γ • z) * ↑(Matrix.det ↑↑↑↑γ) ^ (k - 1) * denom (↑↑γ) z ^ (-k) = ((↑(↑↑↑γ 1 0) * ↑z + ↑(↑↑↑γ 1 1)) ^ k)⁻¹ * f (γ • z)
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg] ring private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by simp [slash, denom] variable {α : Type*} [SMul α ℂ] [IsScalarTower α ℂ ℂ] private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)] ext1 simp_rw [slash] simp only [slash, Algebra.id.smul_eq_mul, Matrix.GeneralLinearGroup.val_det_apply, Pi.smul_apply] ring private theorem zero_slash (k : ℤ) (A : GL(2, ℝ)⁺) : (0 : ℍ → ℂ) ∣[k]A = 0 := funext fun _ => by simp only [slash, Pi.zero_apply, zero_mul] instance : SlashAction ℤ GL(2, ℝ)⁺ (ℍ → ℂ) ℂ where map := slash zero_slash := zero_slash slash_one := slash_one slash_mul := slash_mul smul_slash := smul_slash add_slash := add_slash end theorem slash_def (A : GL(2, ℝ)⁺) : f ∣[k] A = slash k A f := rfl #align modular_form.slash_def ModularForm.slash_def instance subgroupAction (Γ : Subgroup SL(2, ℤ)) : SlashAction ℤ Γ (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (MonoidHom.comp (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ)) (Subgroup.subtype Γ))) #align modular_form.subgroup_action ModularForm.subgroupAction @[simp] theorem subgroup_slash (Γ : Subgroup SL(2, ℤ)) (γ : Γ) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl #align modular_form.subgroup_slash ModularForm.subgroup_slash instance SLAction : SlashAction ℤ SL(2, ℤ) (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ))) set_option linter.uppercaseLean3 false in #align modular_form.SL_action ModularForm.SLAction @[simp] theorem SL_slash (γ : SL(2, ℤ)) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl set_option linter.uppercaseLean3 false in #align modular_form.SL_slash ModularForm.SL_slash /-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by have : ((↑ₘ(A : GL(2, ℝ)⁺)).det : ℝ) = 1 := det_coe' funext rw [SL_slash, slash_def, slash, zero_sub, this] simp #align modular_form.is_invariant_one ModularForm.is_invariant_one /-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by simp only [subgroup_slash, slash_def, ModularForm.slash] convert inv_mul_eq_iff_eq_mul₀ (G₀ := ℂ) _ using 2 ·
rw [mul_comm]
/-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by simp only [subgroup_slash, slash_def, ModularForm.slash] convert inv_mul_eq_iff_eq_mul₀ (G₀ := ℂ) _ using 2 ·
Mathlib.NumberTheory.ModularForms.SlashActions.188_0.3orIHeXinm1hkfX
/-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z
Mathlib_NumberTheory_ModularForms_SlashActions
case h.e'_1.h.e'_2 Γ✝ : Subgroup SL(2, ℤ) k✝ : ℤ f✝ : ℍ → ℂ k : ℤ Γ : Subgroup SL(2, ℤ) f : ℍ → ℂ γ : ↥Γ z : ℍ ⊢ denom (↑↑γ) z ^ (-k) * (f (↑↑γ • z) * ↑(Matrix.det ↑↑↑↑γ) ^ (k - 1)) = ((↑(↑↑↑γ 1 0) * ↑z + ↑(↑↑↑γ 1 1)) ^ k)⁻¹ * f (γ • z)
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg] ring private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by simp [slash, denom] variable {α : Type*} [SMul α ℂ] [IsScalarTower α ℂ ℂ] private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)] ext1 simp_rw [slash] simp only [slash, Algebra.id.smul_eq_mul, Matrix.GeneralLinearGroup.val_det_apply, Pi.smul_apply] ring private theorem zero_slash (k : ℤ) (A : GL(2, ℝ)⁺) : (0 : ℍ → ℂ) ∣[k]A = 0 := funext fun _ => by simp only [slash, Pi.zero_apply, zero_mul] instance : SlashAction ℤ GL(2, ℝ)⁺ (ℍ → ℂ) ℂ where map := slash zero_slash := zero_slash slash_one := slash_one slash_mul := slash_mul smul_slash := smul_slash add_slash := add_slash end theorem slash_def (A : GL(2, ℝ)⁺) : f ∣[k] A = slash k A f := rfl #align modular_form.slash_def ModularForm.slash_def instance subgroupAction (Γ : Subgroup SL(2, ℤ)) : SlashAction ℤ Γ (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (MonoidHom.comp (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ)) (Subgroup.subtype Γ))) #align modular_form.subgroup_action ModularForm.subgroupAction @[simp] theorem subgroup_slash (Γ : Subgroup SL(2, ℤ)) (γ : Γ) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl #align modular_form.subgroup_slash ModularForm.subgroup_slash instance SLAction : SlashAction ℤ SL(2, ℤ) (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ))) set_option linter.uppercaseLean3 false in #align modular_form.SL_action ModularForm.SLAction @[simp] theorem SL_slash (γ : SL(2, ℤ)) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl set_option linter.uppercaseLean3 false in #align modular_form.SL_slash ModularForm.SL_slash /-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by have : ((↑ₘ(A : GL(2, ℝ)⁺)).det : ℝ) = 1 := det_coe' funext rw [SL_slash, slash_def, slash, zero_sub, this] simp #align modular_form.is_invariant_one ModularForm.is_invariant_one /-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by simp only [subgroup_slash, slash_def, ModularForm.slash] convert inv_mul_eq_iff_eq_mul₀ (G₀ := ℂ) _ using 2 · rw [mul_comm]
simp only [denom, zpow_neg, det_coe', ofReal_one, one_zpow, mul_one, subgroup_to_sl_moeb, sl_moeb]
/-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by simp only [subgroup_slash, slash_def, ModularForm.slash] convert inv_mul_eq_iff_eq_mul₀ (G₀ := ℂ) _ using 2 · rw [mul_comm]
Mathlib.NumberTheory.ModularForms.SlashActions.188_0.3orIHeXinm1hkfX
/-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z
Mathlib_NumberTheory_ModularForms_SlashActions
case h.e'_1.h.e'_2 Γ✝ : Subgroup SL(2, ℤ) k✝ : ℤ f✝ : ℍ → ℂ k : ℤ Γ : Subgroup SL(2, ℤ) f : ℍ → ℂ γ : ↥Γ z : ℍ ⊢ ((↑(↑↑↑↑γ 1 0) * ↑z + ↑(↑↑↑↑γ 1 1)) ^ k)⁻¹ * f (↑↑γ • z) = ((↑(↑↑↑γ 1 0) * ↑z + ↑(↑↑↑γ 1 1)) ^ k)⁻¹ * f (↑↑γ • z)
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg] ring private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by simp [slash, denom] variable {α : Type*} [SMul α ℂ] [IsScalarTower α ℂ ℂ] private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)] ext1 simp_rw [slash] simp only [slash, Algebra.id.smul_eq_mul, Matrix.GeneralLinearGroup.val_det_apply, Pi.smul_apply] ring private theorem zero_slash (k : ℤ) (A : GL(2, ℝ)⁺) : (0 : ℍ → ℂ) ∣[k]A = 0 := funext fun _ => by simp only [slash, Pi.zero_apply, zero_mul] instance : SlashAction ℤ GL(2, ℝ)⁺ (ℍ → ℂ) ℂ where map := slash zero_slash := zero_slash slash_one := slash_one slash_mul := slash_mul smul_slash := smul_slash add_slash := add_slash end theorem slash_def (A : GL(2, ℝ)⁺) : f ∣[k] A = slash k A f := rfl #align modular_form.slash_def ModularForm.slash_def instance subgroupAction (Γ : Subgroup SL(2, ℤ)) : SlashAction ℤ Γ (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (MonoidHom.comp (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ)) (Subgroup.subtype Γ))) #align modular_form.subgroup_action ModularForm.subgroupAction @[simp] theorem subgroup_slash (Γ : Subgroup SL(2, ℤ)) (γ : Γ) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl #align modular_form.subgroup_slash ModularForm.subgroup_slash instance SLAction : SlashAction ℤ SL(2, ℤ) (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ))) set_option linter.uppercaseLean3 false in #align modular_form.SL_action ModularForm.SLAction @[simp] theorem SL_slash (γ : SL(2, ℤ)) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl set_option linter.uppercaseLean3 false in #align modular_form.SL_slash ModularForm.SL_slash /-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by have : ((↑ₘ(A : GL(2, ℝ)⁺)).det : ℝ) = 1 := det_coe' funext rw [SL_slash, slash_def, slash, zero_sub, this] simp #align modular_form.is_invariant_one ModularForm.is_invariant_one /-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by simp only [subgroup_slash, slash_def, ModularForm.slash] convert inv_mul_eq_iff_eq_mul₀ (G₀ := ℂ) _ using 2 · rw [mul_comm] simp only [denom, zpow_neg, det_coe', ofReal_one, one_zpow, mul_one, subgroup_to_sl_moeb, sl_moeb]
rfl
/-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by simp only [subgroup_slash, slash_def, ModularForm.slash] convert inv_mul_eq_iff_eq_mul₀ (G₀ := ℂ) _ using 2 · rw [mul_comm] simp only [denom, zpow_neg, det_coe', ofReal_one, one_zpow, mul_one, subgroup_to_sl_moeb, sl_moeb]
Mathlib.NumberTheory.ModularForms.SlashActions.188_0.3orIHeXinm1hkfX
/-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z
Mathlib_NumberTheory_ModularForms_SlashActions
case convert_4 Γ✝ : Subgroup SL(2, ℤ) k✝ : ℤ f✝ : ℍ → ℂ k : ℤ Γ : Subgroup SL(2, ℤ) f : ℍ → ℂ γ : ↥Γ z : ℍ ⊢ (↑(↑↑↑γ 1 0) * ↑z + ↑(↑↑↑γ 1 1)) ^ k ≠ 0
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg] ring private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by simp [slash, denom] variable {α : Type*} [SMul α ℂ] [IsScalarTower α ℂ ℂ] private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)] ext1 simp_rw [slash] simp only [slash, Algebra.id.smul_eq_mul, Matrix.GeneralLinearGroup.val_det_apply, Pi.smul_apply] ring private theorem zero_slash (k : ℤ) (A : GL(2, ℝ)⁺) : (0 : ℍ → ℂ) ∣[k]A = 0 := funext fun _ => by simp only [slash, Pi.zero_apply, zero_mul] instance : SlashAction ℤ GL(2, ℝ)⁺ (ℍ → ℂ) ℂ where map := slash zero_slash := zero_slash slash_one := slash_one slash_mul := slash_mul smul_slash := smul_slash add_slash := add_slash end theorem slash_def (A : GL(2, ℝ)⁺) : f ∣[k] A = slash k A f := rfl #align modular_form.slash_def ModularForm.slash_def instance subgroupAction (Γ : Subgroup SL(2, ℤ)) : SlashAction ℤ Γ (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (MonoidHom.comp (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ)) (Subgroup.subtype Γ))) #align modular_form.subgroup_action ModularForm.subgroupAction @[simp] theorem subgroup_slash (Γ : Subgroup SL(2, ℤ)) (γ : Γ) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl #align modular_form.subgroup_slash ModularForm.subgroup_slash instance SLAction : SlashAction ℤ SL(2, ℤ) (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ))) set_option linter.uppercaseLean3 false in #align modular_form.SL_action ModularForm.SLAction @[simp] theorem SL_slash (γ : SL(2, ℤ)) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl set_option linter.uppercaseLean3 false in #align modular_form.SL_slash ModularForm.SL_slash /-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by have : ((↑ₘ(A : GL(2, ℝ)⁺)).det : ℝ) = 1 := det_coe' funext rw [SL_slash, slash_def, slash, zero_sub, this] simp #align modular_form.is_invariant_one ModularForm.is_invariant_one /-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by simp only [subgroup_slash, slash_def, ModularForm.slash] convert inv_mul_eq_iff_eq_mul₀ (G₀ := ℂ) _ using 2 · rw [mul_comm] simp only [denom, zpow_neg, det_coe', ofReal_one, one_zpow, mul_one, subgroup_to_sl_moeb, sl_moeb] rfl ·
convert zpow_ne_zero k (denom_ne_zero γ z)
/-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by simp only [subgroup_slash, slash_def, ModularForm.slash] convert inv_mul_eq_iff_eq_mul₀ (G₀ := ℂ) _ using 2 · rw [mul_comm] simp only [denom, zpow_neg, det_coe', ofReal_one, one_zpow, mul_one, subgroup_to_sl_moeb, sl_moeb] rfl ·
Mathlib.NumberTheory.ModularForms.SlashActions.188_0.3orIHeXinm1hkfX
/-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z
Mathlib_NumberTheory_ModularForms_SlashActions
Γ : Subgroup SL(2, ℤ) k : ℤ f✝ : ℍ → ℂ k1 k2 : ℤ A : ↥GL(2, ℝ)⁺ f g : ℍ → ℂ ⊢ (f * g) ∣[k1 + k2] A = Matrix.det ↑↑A • f ∣[k1] A * g ∣[k2] A
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg] ring private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by simp [slash, denom] variable {α : Type*} [SMul α ℂ] [IsScalarTower α ℂ ℂ] private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)] ext1 simp_rw [slash] simp only [slash, Algebra.id.smul_eq_mul, Matrix.GeneralLinearGroup.val_det_apply, Pi.smul_apply] ring private theorem zero_slash (k : ℤ) (A : GL(2, ℝ)⁺) : (0 : ℍ → ℂ) ∣[k]A = 0 := funext fun _ => by simp only [slash, Pi.zero_apply, zero_mul] instance : SlashAction ℤ GL(2, ℝ)⁺ (ℍ → ℂ) ℂ where map := slash zero_slash := zero_slash slash_one := slash_one slash_mul := slash_mul smul_slash := smul_slash add_slash := add_slash end theorem slash_def (A : GL(2, ℝ)⁺) : f ∣[k] A = slash k A f := rfl #align modular_form.slash_def ModularForm.slash_def instance subgroupAction (Γ : Subgroup SL(2, ℤ)) : SlashAction ℤ Γ (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (MonoidHom.comp (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ)) (Subgroup.subtype Γ))) #align modular_form.subgroup_action ModularForm.subgroupAction @[simp] theorem subgroup_slash (Γ : Subgroup SL(2, ℤ)) (γ : Γ) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl #align modular_form.subgroup_slash ModularForm.subgroup_slash instance SLAction : SlashAction ℤ SL(2, ℤ) (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ))) set_option linter.uppercaseLean3 false in #align modular_form.SL_action ModularForm.SLAction @[simp] theorem SL_slash (γ : SL(2, ℤ)) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl set_option linter.uppercaseLean3 false in #align modular_form.SL_slash ModularForm.SL_slash /-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by have : ((↑ₘ(A : GL(2, ℝ)⁺)).det : ℝ) = 1 := det_coe' funext rw [SL_slash, slash_def, slash, zero_sub, this] simp #align modular_form.is_invariant_one ModularForm.is_invariant_one /-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by simp only [subgroup_slash, slash_def, ModularForm.slash] convert inv_mul_eq_iff_eq_mul₀ (G₀ := ℂ) _ using 2 · rw [mul_comm] simp only [denom, zpow_neg, det_coe', ofReal_one, one_zpow, mul_one, subgroup_to_sl_moeb, sl_moeb] rfl · convert zpow_ne_zero k (denom_ne_zero γ z) #align modular_form.slash_action_eq'_iff ModularForm.slash_action_eq'_iff theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by
ext1 x
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by
Mathlib.NumberTheory.ModularForms.SlashActions.202_0.3orIHeXinm1hkfX
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A
Mathlib_NumberTheory_ModularForms_SlashActions
case h Γ : Subgroup SL(2, ℤ) k : ℤ f✝ : ℍ → ℂ k1 k2 : ℤ A : ↥GL(2, ℝ)⁺ f g : ℍ → ℂ x : ℍ ⊢ ((f * g) ∣[k1 + k2] A) x = (Matrix.det ↑↑A • f ∣[k1] A * g ∣[k2] A) x
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg] ring private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by simp [slash, denom] variable {α : Type*} [SMul α ℂ] [IsScalarTower α ℂ ℂ] private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)] ext1 simp_rw [slash] simp only [slash, Algebra.id.smul_eq_mul, Matrix.GeneralLinearGroup.val_det_apply, Pi.smul_apply] ring private theorem zero_slash (k : ℤ) (A : GL(2, ℝ)⁺) : (0 : ℍ → ℂ) ∣[k]A = 0 := funext fun _ => by simp only [slash, Pi.zero_apply, zero_mul] instance : SlashAction ℤ GL(2, ℝ)⁺ (ℍ → ℂ) ℂ where map := slash zero_slash := zero_slash slash_one := slash_one slash_mul := slash_mul smul_slash := smul_slash add_slash := add_slash end theorem slash_def (A : GL(2, ℝ)⁺) : f ∣[k] A = slash k A f := rfl #align modular_form.slash_def ModularForm.slash_def instance subgroupAction (Γ : Subgroup SL(2, ℤ)) : SlashAction ℤ Γ (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (MonoidHom.comp (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ)) (Subgroup.subtype Γ))) #align modular_form.subgroup_action ModularForm.subgroupAction @[simp] theorem subgroup_slash (Γ : Subgroup SL(2, ℤ)) (γ : Γ) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl #align modular_form.subgroup_slash ModularForm.subgroup_slash instance SLAction : SlashAction ℤ SL(2, ℤ) (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ))) set_option linter.uppercaseLean3 false in #align modular_form.SL_action ModularForm.SLAction @[simp] theorem SL_slash (γ : SL(2, ℤ)) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl set_option linter.uppercaseLean3 false in #align modular_form.SL_slash ModularForm.SL_slash /-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by have : ((↑ₘ(A : GL(2, ℝ)⁺)).det : ℝ) = 1 := det_coe' funext rw [SL_slash, slash_def, slash, zero_sub, this] simp #align modular_form.is_invariant_one ModularForm.is_invariant_one /-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by simp only [subgroup_slash, slash_def, ModularForm.slash] convert inv_mul_eq_iff_eq_mul₀ (G₀ := ℂ) _ using 2 · rw [mul_comm] simp only [denom, zpow_neg, det_coe', ofReal_one, one_zpow, mul_one, subgroup_to_sl_moeb, sl_moeb] rfl · convert zpow_ne_zero k (denom_ne_zero γ z) #align modular_form.slash_action_eq'_iff ModularForm.slash_action_eq'_iff theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by ext1 x
simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply, Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul]
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by ext1 x
Mathlib.NumberTheory.ModularForms.SlashActions.202_0.3orIHeXinm1hkfX
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A
Mathlib_NumberTheory_ModularForms_SlashActions
case h Γ : Subgroup SL(2, ℤ) k : ℤ f✝ : ℍ → ℂ k1 k2 : ℤ A : ↥GL(2, ℝ)⁺ f g : ℍ → ℂ x : ℍ ⊢ f (A • x) * g (A • x) * ↑(Matrix.det ↑↑A) ^ (k1 + k2 - 1) * denom A x ^ (-(k1 + k2)) = ↑(Matrix.det ↑↑A) * (f (A • x) * ↑(Matrix.det ↑↑A) ^ (k1 - 1) * denom A x ^ (-k1)) * (g (A • x) * ↑(Matrix.det ↑↑A) ^ (k2 - 1) * denom A x ^ (-k2))
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg] ring private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by simp [slash, denom] variable {α : Type*} [SMul α ℂ] [IsScalarTower α ℂ ℂ] private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)] ext1 simp_rw [slash] simp only [slash, Algebra.id.smul_eq_mul, Matrix.GeneralLinearGroup.val_det_apply, Pi.smul_apply] ring private theorem zero_slash (k : ℤ) (A : GL(2, ℝ)⁺) : (0 : ℍ → ℂ) ∣[k]A = 0 := funext fun _ => by simp only [slash, Pi.zero_apply, zero_mul] instance : SlashAction ℤ GL(2, ℝ)⁺ (ℍ → ℂ) ℂ where map := slash zero_slash := zero_slash slash_one := slash_one slash_mul := slash_mul smul_slash := smul_slash add_slash := add_slash end theorem slash_def (A : GL(2, ℝ)⁺) : f ∣[k] A = slash k A f := rfl #align modular_form.slash_def ModularForm.slash_def instance subgroupAction (Γ : Subgroup SL(2, ℤ)) : SlashAction ℤ Γ (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (MonoidHom.comp (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ)) (Subgroup.subtype Γ))) #align modular_form.subgroup_action ModularForm.subgroupAction @[simp] theorem subgroup_slash (Γ : Subgroup SL(2, ℤ)) (γ : Γ) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl #align modular_form.subgroup_slash ModularForm.subgroup_slash instance SLAction : SlashAction ℤ SL(2, ℤ) (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ))) set_option linter.uppercaseLean3 false in #align modular_form.SL_action ModularForm.SLAction @[simp] theorem SL_slash (γ : SL(2, ℤ)) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl set_option linter.uppercaseLean3 false in #align modular_form.SL_slash ModularForm.SL_slash /-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by have : ((↑ₘ(A : GL(2, ℝ)⁺)).det : ℝ) = 1 := det_coe' funext rw [SL_slash, slash_def, slash, zero_sub, this] simp #align modular_form.is_invariant_one ModularForm.is_invariant_one /-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by simp only [subgroup_slash, slash_def, ModularForm.slash] convert inv_mul_eq_iff_eq_mul₀ (G₀ := ℂ) _ using 2 · rw [mul_comm] simp only [denom, zpow_neg, det_coe', ofReal_one, one_zpow, mul_one, subgroup_to_sl_moeb, sl_moeb] rfl · convert zpow_ne_zero k (denom_ne_zero γ z) #align modular_form.slash_action_eq'_iff ModularForm.slash_action_eq'_iff theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by ext1 x simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply, Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul]
set d : ℂ := ↑((↑ₘA).det : ℝ)
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by ext1 x simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply, Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul]
Mathlib.NumberTheory.ModularForms.SlashActions.202_0.3orIHeXinm1hkfX
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A
Mathlib_NumberTheory_ModularForms_SlashActions
case h Γ : Subgroup SL(2, ℤ) k : ℤ f✝ : ℍ → ℂ k1 k2 : ℤ A : ↥GL(2, ℝ)⁺ f g : ℍ → ℂ x : ℍ d : ℂ := ↑(Matrix.det ↑↑A) ⊢ f (A • x) * g (A • x) * d ^ (k1 + k2 - 1) * denom A x ^ (-(k1 + k2)) = d * (f (A • x) * d ^ (k1 - 1) * denom A x ^ (-k1)) * (g (A • x) * d ^ (k2 - 1) * denom A x ^ (-k2))
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg] ring private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by simp [slash, denom] variable {α : Type*} [SMul α ℂ] [IsScalarTower α ℂ ℂ] private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)] ext1 simp_rw [slash] simp only [slash, Algebra.id.smul_eq_mul, Matrix.GeneralLinearGroup.val_det_apply, Pi.smul_apply] ring private theorem zero_slash (k : ℤ) (A : GL(2, ℝ)⁺) : (0 : ℍ → ℂ) ∣[k]A = 0 := funext fun _ => by simp only [slash, Pi.zero_apply, zero_mul] instance : SlashAction ℤ GL(2, ℝ)⁺ (ℍ → ℂ) ℂ where map := slash zero_slash := zero_slash slash_one := slash_one slash_mul := slash_mul smul_slash := smul_slash add_slash := add_slash end theorem slash_def (A : GL(2, ℝ)⁺) : f ∣[k] A = slash k A f := rfl #align modular_form.slash_def ModularForm.slash_def instance subgroupAction (Γ : Subgroup SL(2, ℤ)) : SlashAction ℤ Γ (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (MonoidHom.comp (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ)) (Subgroup.subtype Γ))) #align modular_form.subgroup_action ModularForm.subgroupAction @[simp] theorem subgroup_slash (Γ : Subgroup SL(2, ℤ)) (γ : Γ) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl #align modular_form.subgroup_slash ModularForm.subgroup_slash instance SLAction : SlashAction ℤ SL(2, ℤ) (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ))) set_option linter.uppercaseLean3 false in #align modular_form.SL_action ModularForm.SLAction @[simp] theorem SL_slash (γ : SL(2, ℤ)) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl set_option linter.uppercaseLean3 false in #align modular_form.SL_slash ModularForm.SL_slash /-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by have : ((↑ₘ(A : GL(2, ℝ)⁺)).det : ℝ) = 1 := det_coe' funext rw [SL_slash, slash_def, slash, zero_sub, this] simp #align modular_form.is_invariant_one ModularForm.is_invariant_one /-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by simp only [subgroup_slash, slash_def, ModularForm.slash] convert inv_mul_eq_iff_eq_mul₀ (G₀ := ℂ) _ using 2 · rw [mul_comm] simp only [denom, zpow_neg, det_coe', ofReal_one, one_zpow, mul_one, subgroup_to_sl_moeb, sl_moeb] rfl · convert zpow_ne_zero k (denom_ne_zero γ z) #align modular_form.slash_action_eq'_iff ModularForm.slash_action_eq'_iff theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by ext1 x simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply, Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul] set d : ℂ := ↑((↑ₘA).det : ℝ)
have h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) := by have : d ≠ 0 := by dsimp norm_cast exact Matrix.GLPos.det_ne_zero A rw [← zpow_one_add₀ this, ← zpow_add₀ this] congr; ring
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by ext1 x simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply, Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul] set d : ℂ := ↑((↑ₘA).det : ℝ)
Mathlib.NumberTheory.ModularForms.SlashActions.202_0.3orIHeXinm1hkfX
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A
Mathlib_NumberTheory_ModularForms_SlashActions
Γ : Subgroup SL(2, ℤ) k : ℤ f✝ : ℍ → ℂ k1 k2 : ℤ A : ↥GL(2, ℝ)⁺ f g : ℍ → ℂ x : ℍ d : ℂ := ↑(Matrix.det ↑↑A) ⊢ d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1)
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg] ring private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by simp [slash, denom] variable {α : Type*} [SMul α ℂ] [IsScalarTower α ℂ ℂ] private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)] ext1 simp_rw [slash] simp only [slash, Algebra.id.smul_eq_mul, Matrix.GeneralLinearGroup.val_det_apply, Pi.smul_apply] ring private theorem zero_slash (k : ℤ) (A : GL(2, ℝ)⁺) : (0 : ℍ → ℂ) ∣[k]A = 0 := funext fun _ => by simp only [slash, Pi.zero_apply, zero_mul] instance : SlashAction ℤ GL(2, ℝ)⁺ (ℍ → ℂ) ℂ where map := slash zero_slash := zero_slash slash_one := slash_one slash_mul := slash_mul smul_slash := smul_slash add_slash := add_slash end theorem slash_def (A : GL(2, ℝ)⁺) : f ∣[k] A = slash k A f := rfl #align modular_form.slash_def ModularForm.slash_def instance subgroupAction (Γ : Subgroup SL(2, ℤ)) : SlashAction ℤ Γ (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (MonoidHom.comp (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ)) (Subgroup.subtype Γ))) #align modular_form.subgroup_action ModularForm.subgroupAction @[simp] theorem subgroup_slash (Γ : Subgroup SL(2, ℤ)) (γ : Γ) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl #align modular_form.subgroup_slash ModularForm.subgroup_slash instance SLAction : SlashAction ℤ SL(2, ℤ) (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ))) set_option linter.uppercaseLean3 false in #align modular_form.SL_action ModularForm.SLAction @[simp] theorem SL_slash (γ : SL(2, ℤ)) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl set_option linter.uppercaseLean3 false in #align modular_form.SL_slash ModularForm.SL_slash /-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by have : ((↑ₘ(A : GL(2, ℝ)⁺)).det : ℝ) = 1 := det_coe' funext rw [SL_slash, slash_def, slash, zero_sub, this] simp #align modular_form.is_invariant_one ModularForm.is_invariant_one /-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by simp only [subgroup_slash, slash_def, ModularForm.slash] convert inv_mul_eq_iff_eq_mul₀ (G₀ := ℂ) _ using 2 · rw [mul_comm] simp only [denom, zpow_neg, det_coe', ofReal_one, one_zpow, mul_one, subgroup_to_sl_moeb, sl_moeb] rfl · convert zpow_ne_zero k (denom_ne_zero γ z) #align modular_form.slash_action_eq'_iff ModularForm.slash_action_eq'_iff theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by ext1 x simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply, Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul] set d : ℂ := ↑((↑ₘA).det : ℝ) have h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) := by
have : d ≠ 0 := by dsimp norm_cast exact Matrix.GLPos.det_ne_zero A
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by ext1 x simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply, Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul] set d : ℂ := ↑((↑ₘA).det : ℝ) have h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) := by
Mathlib.NumberTheory.ModularForms.SlashActions.202_0.3orIHeXinm1hkfX
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A
Mathlib_NumberTheory_ModularForms_SlashActions
Γ : Subgroup SL(2, ℤ) k : ℤ f✝ : ℍ → ℂ k1 k2 : ℤ A : ↥GL(2, ℝ)⁺ f g : ℍ → ℂ x : ℍ d : ℂ := ↑(Matrix.det ↑↑A) ⊢ d ≠ 0
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg] ring private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by simp [slash, denom] variable {α : Type*} [SMul α ℂ] [IsScalarTower α ℂ ℂ] private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)] ext1 simp_rw [slash] simp only [slash, Algebra.id.smul_eq_mul, Matrix.GeneralLinearGroup.val_det_apply, Pi.smul_apply] ring private theorem zero_slash (k : ℤ) (A : GL(2, ℝ)⁺) : (0 : ℍ → ℂ) ∣[k]A = 0 := funext fun _ => by simp only [slash, Pi.zero_apply, zero_mul] instance : SlashAction ℤ GL(2, ℝ)⁺ (ℍ → ℂ) ℂ where map := slash zero_slash := zero_slash slash_one := slash_one slash_mul := slash_mul smul_slash := smul_slash add_slash := add_slash end theorem slash_def (A : GL(2, ℝ)⁺) : f ∣[k] A = slash k A f := rfl #align modular_form.slash_def ModularForm.slash_def instance subgroupAction (Γ : Subgroup SL(2, ℤ)) : SlashAction ℤ Γ (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (MonoidHom.comp (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ)) (Subgroup.subtype Γ))) #align modular_form.subgroup_action ModularForm.subgroupAction @[simp] theorem subgroup_slash (Γ : Subgroup SL(2, ℤ)) (γ : Γ) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl #align modular_form.subgroup_slash ModularForm.subgroup_slash instance SLAction : SlashAction ℤ SL(2, ℤ) (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ))) set_option linter.uppercaseLean3 false in #align modular_form.SL_action ModularForm.SLAction @[simp] theorem SL_slash (γ : SL(2, ℤ)) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl set_option linter.uppercaseLean3 false in #align modular_form.SL_slash ModularForm.SL_slash /-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by have : ((↑ₘ(A : GL(2, ℝ)⁺)).det : ℝ) = 1 := det_coe' funext rw [SL_slash, slash_def, slash, zero_sub, this] simp #align modular_form.is_invariant_one ModularForm.is_invariant_one /-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by simp only [subgroup_slash, slash_def, ModularForm.slash] convert inv_mul_eq_iff_eq_mul₀ (G₀ := ℂ) _ using 2 · rw [mul_comm] simp only [denom, zpow_neg, det_coe', ofReal_one, one_zpow, mul_one, subgroup_to_sl_moeb, sl_moeb] rfl · convert zpow_ne_zero k (denom_ne_zero γ z) #align modular_form.slash_action_eq'_iff ModularForm.slash_action_eq'_iff theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by ext1 x simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply, Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul] set d : ℂ := ↑((↑ₘA).det : ℝ) have h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) := by have : d ≠ 0 := by
dsimp
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by ext1 x simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply, Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul] set d : ℂ := ↑((↑ₘA).det : ℝ) have h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) := by have : d ≠ 0 := by
Mathlib.NumberTheory.ModularForms.SlashActions.202_0.3orIHeXinm1hkfX
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A
Mathlib_NumberTheory_ModularForms_SlashActions
Γ : Subgroup SL(2, ℤ) k : ℤ f✝ : ℍ → ℂ k1 k2 : ℤ A : ↥GL(2, ℝ)⁺ f g : ℍ → ℂ x : ℍ d : ℂ := ↑(Matrix.det ↑↑A) ⊢ ¬↑(Matrix.det ↑↑A) = 0
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg] ring private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by simp [slash, denom] variable {α : Type*} [SMul α ℂ] [IsScalarTower α ℂ ℂ] private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)] ext1 simp_rw [slash] simp only [slash, Algebra.id.smul_eq_mul, Matrix.GeneralLinearGroup.val_det_apply, Pi.smul_apply] ring private theorem zero_slash (k : ℤ) (A : GL(2, ℝ)⁺) : (0 : ℍ → ℂ) ∣[k]A = 0 := funext fun _ => by simp only [slash, Pi.zero_apply, zero_mul] instance : SlashAction ℤ GL(2, ℝ)⁺ (ℍ → ℂ) ℂ where map := slash zero_slash := zero_slash slash_one := slash_one slash_mul := slash_mul smul_slash := smul_slash add_slash := add_slash end theorem slash_def (A : GL(2, ℝ)⁺) : f ∣[k] A = slash k A f := rfl #align modular_form.slash_def ModularForm.slash_def instance subgroupAction (Γ : Subgroup SL(2, ℤ)) : SlashAction ℤ Γ (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (MonoidHom.comp (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ)) (Subgroup.subtype Γ))) #align modular_form.subgroup_action ModularForm.subgroupAction @[simp] theorem subgroup_slash (Γ : Subgroup SL(2, ℤ)) (γ : Γ) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl #align modular_form.subgroup_slash ModularForm.subgroup_slash instance SLAction : SlashAction ℤ SL(2, ℤ) (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ))) set_option linter.uppercaseLean3 false in #align modular_form.SL_action ModularForm.SLAction @[simp] theorem SL_slash (γ : SL(2, ℤ)) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl set_option linter.uppercaseLean3 false in #align modular_form.SL_slash ModularForm.SL_slash /-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by have : ((↑ₘ(A : GL(2, ℝ)⁺)).det : ℝ) = 1 := det_coe' funext rw [SL_slash, slash_def, slash, zero_sub, this] simp #align modular_form.is_invariant_one ModularForm.is_invariant_one /-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by simp only [subgroup_slash, slash_def, ModularForm.slash] convert inv_mul_eq_iff_eq_mul₀ (G₀ := ℂ) _ using 2 · rw [mul_comm] simp only [denom, zpow_neg, det_coe', ofReal_one, one_zpow, mul_one, subgroup_to_sl_moeb, sl_moeb] rfl · convert zpow_ne_zero k (denom_ne_zero γ z) #align modular_form.slash_action_eq'_iff ModularForm.slash_action_eq'_iff theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by ext1 x simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply, Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul] set d : ℂ := ↑((↑ₘA).det : ℝ) have h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) := by have : d ≠ 0 := by dsimp
norm_cast
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by ext1 x simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply, Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul] set d : ℂ := ↑((↑ₘA).det : ℝ) have h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) := by have : d ≠ 0 := by dsimp
Mathlib.NumberTheory.ModularForms.SlashActions.202_0.3orIHeXinm1hkfX
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A
Mathlib_NumberTheory_ModularForms_SlashActions
Γ : Subgroup SL(2, ℤ) k : ℤ f✝ : ℍ → ℂ k1 k2 : ℤ A : ↥GL(2, ℝ)⁺ f g : ℍ → ℂ x : ℍ d : ℂ := ↑(Matrix.det ↑↑A) ⊢ ¬Matrix.det ↑↑A = 0
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg] ring private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by simp [slash, denom] variable {α : Type*} [SMul α ℂ] [IsScalarTower α ℂ ℂ] private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)] ext1 simp_rw [slash] simp only [slash, Algebra.id.smul_eq_mul, Matrix.GeneralLinearGroup.val_det_apply, Pi.smul_apply] ring private theorem zero_slash (k : ℤ) (A : GL(2, ℝ)⁺) : (0 : ℍ → ℂ) ∣[k]A = 0 := funext fun _ => by simp only [slash, Pi.zero_apply, zero_mul] instance : SlashAction ℤ GL(2, ℝ)⁺ (ℍ → ℂ) ℂ where map := slash zero_slash := zero_slash slash_one := slash_one slash_mul := slash_mul smul_slash := smul_slash add_slash := add_slash end theorem slash_def (A : GL(2, ℝ)⁺) : f ∣[k] A = slash k A f := rfl #align modular_form.slash_def ModularForm.slash_def instance subgroupAction (Γ : Subgroup SL(2, ℤ)) : SlashAction ℤ Γ (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (MonoidHom.comp (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ)) (Subgroup.subtype Γ))) #align modular_form.subgroup_action ModularForm.subgroupAction @[simp] theorem subgroup_slash (Γ : Subgroup SL(2, ℤ)) (γ : Γ) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl #align modular_form.subgroup_slash ModularForm.subgroup_slash instance SLAction : SlashAction ℤ SL(2, ℤ) (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ))) set_option linter.uppercaseLean3 false in #align modular_form.SL_action ModularForm.SLAction @[simp] theorem SL_slash (γ : SL(2, ℤ)) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl set_option linter.uppercaseLean3 false in #align modular_form.SL_slash ModularForm.SL_slash /-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by have : ((↑ₘ(A : GL(2, ℝ)⁺)).det : ℝ) = 1 := det_coe' funext rw [SL_slash, slash_def, slash, zero_sub, this] simp #align modular_form.is_invariant_one ModularForm.is_invariant_one /-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by simp only [subgroup_slash, slash_def, ModularForm.slash] convert inv_mul_eq_iff_eq_mul₀ (G₀ := ℂ) _ using 2 · rw [mul_comm] simp only [denom, zpow_neg, det_coe', ofReal_one, one_zpow, mul_one, subgroup_to_sl_moeb, sl_moeb] rfl · convert zpow_ne_zero k (denom_ne_zero γ z) #align modular_form.slash_action_eq'_iff ModularForm.slash_action_eq'_iff theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by ext1 x simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply, Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul] set d : ℂ := ↑((↑ₘA).det : ℝ) have h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) := by have : d ≠ 0 := by dsimp norm_cast
exact Matrix.GLPos.det_ne_zero A
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by ext1 x simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply, Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul] set d : ℂ := ↑((↑ₘA).det : ℝ) have h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) := by have : d ≠ 0 := by dsimp norm_cast
Mathlib.NumberTheory.ModularForms.SlashActions.202_0.3orIHeXinm1hkfX
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A
Mathlib_NumberTheory_ModularForms_SlashActions
Γ : Subgroup SL(2, ℤ) k : ℤ f✝ : ℍ → ℂ k1 k2 : ℤ A : ↥GL(2, ℝ)⁺ f g : ℍ → ℂ x : ℍ d : ℂ := ↑(Matrix.det ↑↑A) this : d ≠ 0 ⊢ d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1)
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg] ring private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by simp [slash, denom] variable {α : Type*} [SMul α ℂ] [IsScalarTower α ℂ ℂ] private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)] ext1 simp_rw [slash] simp only [slash, Algebra.id.smul_eq_mul, Matrix.GeneralLinearGroup.val_det_apply, Pi.smul_apply] ring private theorem zero_slash (k : ℤ) (A : GL(2, ℝ)⁺) : (0 : ℍ → ℂ) ∣[k]A = 0 := funext fun _ => by simp only [slash, Pi.zero_apply, zero_mul] instance : SlashAction ℤ GL(2, ℝ)⁺ (ℍ → ℂ) ℂ where map := slash zero_slash := zero_slash slash_one := slash_one slash_mul := slash_mul smul_slash := smul_slash add_slash := add_slash end theorem slash_def (A : GL(2, ℝ)⁺) : f ∣[k] A = slash k A f := rfl #align modular_form.slash_def ModularForm.slash_def instance subgroupAction (Γ : Subgroup SL(2, ℤ)) : SlashAction ℤ Γ (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (MonoidHom.comp (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ)) (Subgroup.subtype Γ))) #align modular_form.subgroup_action ModularForm.subgroupAction @[simp] theorem subgroup_slash (Γ : Subgroup SL(2, ℤ)) (γ : Γ) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl #align modular_form.subgroup_slash ModularForm.subgroup_slash instance SLAction : SlashAction ℤ SL(2, ℤ) (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ))) set_option linter.uppercaseLean3 false in #align modular_form.SL_action ModularForm.SLAction @[simp] theorem SL_slash (γ : SL(2, ℤ)) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl set_option linter.uppercaseLean3 false in #align modular_form.SL_slash ModularForm.SL_slash /-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by have : ((↑ₘ(A : GL(2, ℝ)⁺)).det : ℝ) = 1 := det_coe' funext rw [SL_slash, slash_def, slash, zero_sub, this] simp #align modular_form.is_invariant_one ModularForm.is_invariant_one /-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by simp only [subgroup_slash, slash_def, ModularForm.slash] convert inv_mul_eq_iff_eq_mul₀ (G₀ := ℂ) _ using 2 · rw [mul_comm] simp only [denom, zpow_neg, det_coe', ofReal_one, one_zpow, mul_one, subgroup_to_sl_moeb, sl_moeb] rfl · convert zpow_ne_zero k (denom_ne_zero γ z) #align modular_form.slash_action_eq'_iff ModularForm.slash_action_eq'_iff theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by ext1 x simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply, Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul] set d : ℂ := ↑((↑ₘA).det : ℝ) have h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) := by have : d ≠ 0 := by dsimp norm_cast exact Matrix.GLPos.det_ne_zero A
rw [← zpow_one_add₀ this, ← zpow_add₀ this]
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by ext1 x simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply, Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul] set d : ℂ := ↑((↑ₘA).det : ℝ) have h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) := by have : d ≠ 0 := by dsimp norm_cast exact Matrix.GLPos.det_ne_zero A
Mathlib.NumberTheory.ModularForms.SlashActions.202_0.3orIHeXinm1hkfX
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A
Mathlib_NumberTheory_ModularForms_SlashActions
Γ : Subgroup SL(2, ℤ) k : ℤ f✝ : ℍ → ℂ k1 k2 : ℤ A : ↥GL(2, ℝ)⁺ f g : ℍ → ℂ x : ℍ d : ℂ := ↑(Matrix.det ↑↑A) this : d ≠ 0 ⊢ d ^ (k1 + k2 - 1) = d ^ (1 + (k1 - 1) + (k2 - 1))
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg] ring private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by simp [slash, denom] variable {α : Type*} [SMul α ℂ] [IsScalarTower α ℂ ℂ] private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)] ext1 simp_rw [slash] simp only [slash, Algebra.id.smul_eq_mul, Matrix.GeneralLinearGroup.val_det_apply, Pi.smul_apply] ring private theorem zero_slash (k : ℤ) (A : GL(2, ℝ)⁺) : (0 : ℍ → ℂ) ∣[k]A = 0 := funext fun _ => by simp only [slash, Pi.zero_apply, zero_mul] instance : SlashAction ℤ GL(2, ℝ)⁺ (ℍ → ℂ) ℂ where map := slash zero_slash := zero_slash slash_one := slash_one slash_mul := slash_mul smul_slash := smul_slash add_slash := add_slash end theorem slash_def (A : GL(2, ℝ)⁺) : f ∣[k] A = slash k A f := rfl #align modular_form.slash_def ModularForm.slash_def instance subgroupAction (Γ : Subgroup SL(2, ℤ)) : SlashAction ℤ Γ (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (MonoidHom.comp (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ)) (Subgroup.subtype Γ))) #align modular_form.subgroup_action ModularForm.subgroupAction @[simp] theorem subgroup_slash (Γ : Subgroup SL(2, ℤ)) (γ : Γ) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl #align modular_form.subgroup_slash ModularForm.subgroup_slash instance SLAction : SlashAction ℤ SL(2, ℤ) (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ))) set_option linter.uppercaseLean3 false in #align modular_form.SL_action ModularForm.SLAction @[simp] theorem SL_slash (γ : SL(2, ℤ)) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl set_option linter.uppercaseLean3 false in #align modular_form.SL_slash ModularForm.SL_slash /-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by have : ((↑ₘ(A : GL(2, ℝ)⁺)).det : ℝ) = 1 := det_coe' funext rw [SL_slash, slash_def, slash, zero_sub, this] simp #align modular_form.is_invariant_one ModularForm.is_invariant_one /-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by simp only [subgroup_slash, slash_def, ModularForm.slash] convert inv_mul_eq_iff_eq_mul₀ (G₀ := ℂ) _ using 2 · rw [mul_comm] simp only [denom, zpow_neg, det_coe', ofReal_one, one_zpow, mul_one, subgroup_to_sl_moeb, sl_moeb] rfl · convert zpow_ne_zero k (denom_ne_zero γ z) #align modular_form.slash_action_eq'_iff ModularForm.slash_action_eq'_iff theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by ext1 x simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply, Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul] set d : ℂ := ↑((↑ₘA).det : ℝ) have h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) := by have : d ≠ 0 := by dsimp norm_cast exact Matrix.GLPos.det_ne_zero A rw [← zpow_one_add₀ this, ← zpow_add₀ this]
congr
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by ext1 x simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply, Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul] set d : ℂ := ↑((↑ₘA).det : ℝ) have h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) := by have : d ≠ 0 := by dsimp norm_cast exact Matrix.GLPos.det_ne_zero A rw [← zpow_one_add₀ this, ← zpow_add₀ this]
Mathlib.NumberTheory.ModularForms.SlashActions.202_0.3orIHeXinm1hkfX
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A
Mathlib_NumberTheory_ModularForms_SlashActions
case e_a Γ : Subgroup SL(2, ℤ) k : ℤ f✝ : ℍ → ℂ k1 k2 : ℤ A : ↥GL(2, ℝ)⁺ f g : ℍ → ℂ x : ℍ d : ℂ := ↑(Matrix.det ↑↑A) this : d ≠ 0 ⊢ k1 + k2 - 1 = 1 + (k1 - 1) + (k2 - 1)
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg] ring private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by simp [slash, denom] variable {α : Type*} [SMul α ℂ] [IsScalarTower α ℂ ℂ] private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)] ext1 simp_rw [slash] simp only [slash, Algebra.id.smul_eq_mul, Matrix.GeneralLinearGroup.val_det_apply, Pi.smul_apply] ring private theorem zero_slash (k : ℤ) (A : GL(2, ℝ)⁺) : (0 : ℍ → ℂ) ∣[k]A = 0 := funext fun _ => by simp only [slash, Pi.zero_apply, zero_mul] instance : SlashAction ℤ GL(2, ℝ)⁺ (ℍ → ℂ) ℂ where map := slash zero_slash := zero_slash slash_one := slash_one slash_mul := slash_mul smul_slash := smul_slash add_slash := add_slash end theorem slash_def (A : GL(2, ℝ)⁺) : f ∣[k] A = slash k A f := rfl #align modular_form.slash_def ModularForm.slash_def instance subgroupAction (Γ : Subgroup SL(2, ℤ)) : SlashAction ℤ Γ (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (MonoidHom.comp (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ)) (Subgroup.subtype Γ))) #align modular_form.subgroup_action ModularForm.subgroupAction @[simp] theorem subgroup_slash (Γ : Subgroup SL(2, ℤ)) (γ : Γ) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl #align modular_form.subgroup_slash ModularForm.subgroup_slash instance SLAction : SlashAction ℤ SL(2, ℤ) (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ))) set_option linter.uppercaseLean3 false in #align modular_form.SL_action ModularForm.SLAction @[simp] theorem SL_slash (γ : SL(2, ℤ)) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl set_option linter.uppercaseLean3 false in #align modular_form.SL_slash ModularForm.SL_slash /-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by have : ((↑ₘ(A : GL(2, ℝ)⁺)).det : ℝ) = 1 := det_coe' funext rw [SL_slash, slash_def, slash, zero_sub, this] simp #align modular_form.is_invariant_one ModularForm.is_invariant_one /-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by simp only [subgroup_slash, slash_def, ModularForm.slash] convert inv_mul_eq_iff_eq_mul₀ (G₀ := ℂ) _ using 2 · rw [mul_comm] simp only [denom, zpow_neg, det_coe', ofReal_one, one_zpow, mul_one, subgroup_to_sl_moeb, sl_moeb] rfl · convert zpow_ne_zero k (denom_ne_zero γ z) #align modular_form.slash_action_eq'_iff ModularForm.slash_action_eq'_iff theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by ext1 x simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply, Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul] set d : ℂ := ↑((↑ₘA).det : ℝ) have h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) := by have : d ≠ 0 := by dsimp norm_cast exact Matrix.GLPos.det_ne_zero A rw [← zpow_one_add₀ this, ← zpow_add₀ this] congr;
ring
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by ext1 x simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply, Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul] set d : ℂ := ↑((↑ₘA).det : ℝ) have h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) := by have : d ≠ 0 := by dsimp norm_cast exact Matrix.GLPos.det_ne_zero A rw [← zpow_one_add₀ this, ← zpow_add₀ this] congr;
Mathlib.NumberTheory.ModularForms.SlashActions.202_0.3orIHeXinm1hkfX
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A
Mathlib_NumberTheory_ModularForms_SlashActions
case h Γ : Subgroup SL(2, ℤ) k : ℤ f✝ : ℍ → ℂ k1 k2 : ℤ A : ↥GL(2, ℝ)⁺ f g : ℍ → ℂ x : ℍ d : ℂ := ↑(Matrix.det ↑↑A) h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) ⊢ f (A • x) * g (A • x) * d ^ (k1 + k2 - 1) * denom A x ^ (-(k1 + k2)) = d * (f (A • x) * d ^ (k1 - 1) * denom A x ^ (-k1)) * (g (A • x) * d ^ (k2 - 1) * denom A x ^ (-k2))
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg] ring private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by simp [slash, denom] variable {α : Type*} [SMul α ℂ] [IsScalarTower α ℂ ℂ] private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)] ext1 simp_rw [slash] simp only [slash, Algebra.id.smul_eq_mul, Matrix.GeneralLinearGroup.val_det_apply, Pi.smul_apply] ring private theorem zero_slash (k : ℤ) (A : GL(2, ℝ)⁺) : (0 : ℍ → ℂ) ∣[k]A = 0 := funext fun _ => by simp only [slash, Pi.zero_apply, zero_mul] instance : SlashAction ℤ GL(2, ℝ)⁺ (ℍ → ℂ) ℂ where map := slash zero_slash := zero_slash slash_one := slash_one slash_mul := slash_mul smul_slash := smul_slash add_slash := add_slash end theorem slash_def (A : GL(2, ℝ)⁺) : f ∣[k] A = slash k A f := rfl #align modular_form.slash_def ModularForm.slash_def instance subgroupAction (Γ : Subgroup SL(2, ℤ)) : SlashAction ℤ Γ (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (MonoidHom.comp (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ)) (Subgroup.subtype Γ))) #align modular_form.subgroup_action ModularForm.subgroupAction @[simp] theorem subgroup_slash (Γ : Subgroup SL(2, ℤ)) (γ : Γ) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl #align modular_form.subgroup_slash ModularForm.subgroup_slash instance SLAction : SlashAction ℤ SL(2, ℤ) (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ))) set_option linter.uppercaseLean3 false in #align modular_form.SL_action ModularForm.SLAction @[simp] theorem SL_slash (γ : SL(2, ℤ)) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl set_option linter.uppercaseLean3 false in #align modular_form.SL_slash ModularForm.SL_slash /-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by have : ((↑ₘ(A : GL(2, ℝ)⁺)).det : ℝ) = 1 := det_coe' funext rw [SL_slash, slash_def, slash, zero_sub, this] simp #align modular_form.is_invariant_one ModularForm.is_invariant_one /-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by simp only [subgroup_slash, slash_def, ModularForm.slash] convert inv_mul_eq_iff_eq_mul₀ (G₀ := ℂ) _ using 2 · rw [mul_comm] simp only [denom, zpow_neg, det_coe', ofReal_one, one_zpow, mul_one, subgroup_to_sl_moeb, sl_moeb] rfl · convert zpow_ne_zero k (denom_ne_zero γ z) #align modular_form.slash_action_eq'_iff ModularForm.slash_action_eq'_iff theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by ext1 x simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply, Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul] set d : ℂ := ↑((↑ₘA).det : ℝ) have h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) := by have : d ≠ 0 := by dsimp norm_cast exact Matrix.GLPos.det_ne_zero A rw [← zpow_one_add₀ this, ← zpow_add₀ this] congr; ring
have h22 : denom A x ^ (-(k1 + k2)) = denom A x ^ (-k1) * denom A x ^ (-k2) := by rw [Int.neg_add, zpow_add₀] exact UpperHalfPlane.denom_ne_zero A x
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by ext1 x simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply, Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul] set d : ℂ := ↑((↑ₘA).det : ℝ) have h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) := by have : d ≠ 0 := by dsimp norm_cast exact Matrix.GLPos.det_ne_zero A rw [← zpow_one_add₀ this, ← zpow_add₀ this] congr; ring
Mathlib.NumberTheory.ModularForms.SlashActions.202_0.3orIHeXinm1hkfX
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A
Mathlib_NumberTheory_ModularForms_SlashActions
Γ : Subgroup SL(2, ℤ) k : ℤ f✝ : ℍ → ℂ k1 k2 : ℤ A : ↥GL(2, ℝ)⁺ f g : ℍ → ℂ x : ℍ d : ℂ := ↑(Matrix.det ↑↑A) h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) ⊢ denom A x ^ (-(k1 + k2)) = denom A x ^ (-k1) * denom A x ^ (-k2)
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg] ring private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by simp [slash, denom] variable {α : Type*} [SMul α ℂ] [IsScalarTower α ℂ ℂ] private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)] ext1 simp_rw [slash] simp only [slash, Algebra.id.smul_eq_mul, Matrix.GeneralLinearGroup.val_det_apply, Pi.smul_apply] ring private theorem zero_slash (k : ℤ) (A : GL(2, ℝ)⁺) : (0 : ℍ → ℂ) ∣[k]A = 0 := funext fun _ => by simp only [slash, Pi.zero_apply, zero_mul] instance : SlashAction ℤ GL(2, ℝ)⁺ (ℍ → ℂ) ℂ where map := slash zero_slash := zero_slash slash_one := slash_one slash_mul := slash_mul smul_slash := smul_slash add_slash := add_slash end theorem slash_def (A : GL(2, ℝ)⁺) : f ∣[k] A = slash k A f := rfl #align modular_form.slash_def ModularForm.slash_def instance subgroupAction (Γ : Subgroup SL(2, ℤ)) : SlashAction ℤ Γ (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (MonoidHom.comp (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ)) (Subgroup.subtype Γ))) #align modular_form.subgroup_action ModularForm.subgroupAction @[simp] theorem subgroup_slash (Γ : Subgroup SL(2, ℤ)) (γ : Γ) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl #align modular_form.subgroup_slash ModularForm.subgroup_slash instance SLAction : SlashAction ℤ SL(2, ℤ) (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ))) set_option linter.uppercaseLean3 false in #align modular_form.SL_action ModularForm.SLAction @[simp] theorem SL_slash (γ : SL(2, ℤ)) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl set_option linter.uppercaseLean3 false in #align modular_form.SL_slash ModularForm.SL_slash /-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by have : ((↑ₘ(A : GL(2, ℝ)⁺)).det : ℝ) = 1 := det_coe' funext rw [SL_slash, slash_def, slash, zero_sub, this] simp #align modular_form.is_invariant_one ModularForm.is_invariant_one /-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by simp only [subgroup_slash, slash_def, ModularForm.slash] convert inv_mul_eq_iff_eq_mul₀ (G₀ := ℂ) _ using 2 · rw [mul_comm] simp only [denom, zpow_neg, det_coe', ofReal_one, one_zpow, mul_one, subgroup_to_sl_moeb, sl_moeb] rfl · convert zpow_ne_zero k (denom_ne_zero γ z) #align modular_form.slash_action_eq'_iff ModularForm.slash_action_eq'_iff theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by ext1 x simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply, Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul] set d : ℂ := ↑((↑ₘA).det : ℝ) have h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) := by have : d ≠ 0 := by dsimp norm_cast exact Matrix.GLPos.det_ne_zero A rw [← zpow_one_add₀ this, ← zpow_add₀ this] congr; ring have h22 : denom A x ^ (-(k1 + k2)) = denom A x ^ (-k1) * denom A x ^ (-k2) := by
rw [Int.neg_add, zpow_add₀]
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by ext1 x simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply, Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul] set d : ℂ := ↑((↑ₘA).det : ℝ) have h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) := by have : d ≠ 0 := by dsimp norm_cast exact Matrix.GLPos.det_ne_zero A rw [← zpow_one_add₀ this, ← zpow_add₀ this] congr; ring have h22 : denom A x ^ (-(k1 + k2)) = denom A x ^ (-k1) * denom A x ^ (-k2) := by
Mathlib.NumberTheory.ModularForms.SlashActions.202_0.3orIHeXinm1hkfX
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A
Mathlib_NumberTheory_ModularForms_SlashActions
case ha Γ : Subgroup SL(2, ℤ) k : ℤ f✝ : ℍ → ℂ k1 k2 : ℤ A : ↥GL(2, ℝ)⁺ f g : ℍ → ℂ x : ℍ d : ℂ := ↑(Matrix.det ↑↑A) h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) ⊢ denom A x ≠ 0
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg] ring private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by simp [slash, denom] variable {α : Type*} [SMul α ℂ] [IsScalarTower α ℂ ℂ] private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)] ext1 simp_rw [slash] simp only [slash, Algebra.id.smul_eq_mul, Matrix.GeneralLinearGroup.val_det_apply, Pi.smul_apply] ring private theorem zero_slash (k : ℤ) (A : GL(2, ℝ)⁺) : (0 : ℍ → ℂ) ∣[k]A = 0 := funext fun _ => by simp only [slash, Pi.zero_apply, zero_mul] instance : SlashAction ℤ GL(2, ℝ)⁺ (ℍ → ℂ) ℂ where map := slash zero_slash := zero_slash slash_one := slash_one slash_mul := slash_mul smul_slash := smul_slash add_slash := add_slash end theorem slash_def (A : GL(2, ℝ)⁺) : f ∣[k] A = slash k A f := rfl #align modular_form.slash_def ModularForm.slash_def instance subgroupAction (Γ : Subgroup SL(2, ℤ)) : SlashAction ℤ Γ (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (MonoidHom.comp (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ)) (Subgroup.subtype Γ))) #align modular_form.subgroup_action ModularForm.subgroupAction @[simp] theorem subgroup_slash (Γ : Subgroup SL(2, ℤ)) (γ : Γ) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl #align modular_form.subgroup_slash ModularForm.subgroup_slash instance SLAction : SlashAction ℤ SL(2, ℤ) (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ))) set_option linter.uppercaseLean3 false in #align modular_form.SL_action ModularForm.SLAction @[simp] theorem SL_slash (γ : SL(2, ℤ)) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl set_option linter.uppercaseLean3 false in #align modular_form.SL_slash ModularForm.SL_slash /-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by have : ((↑ₘ(A : GL(2, ℝ)⁺)).det : ℝ) = 1 := det_coe' funext rw [SL_slash, slash_def, slash, zero_sub, this] simp #align modular_form.is_invariant_one ModularForm.is_invariant_one /-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by simp only [subgroup_slash, slash_def, ModularForm.slash] convert inv_mul_eq_iff_eq_mul₀ (G₀ := ℂ) _ using 2 · rw [mul_comm] simp only [denom, zpow_neg, det_coe', ofReal_one, one_zpow, mul_one, subgroup_to_sl_moeb, sl_moeb] rfl · convert zpow_ne_zero k (denom_ne_zero γ z) #align modular_form.slash_action_eq'_iff ModularForm.slash_action_eq'_iff theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by ext1 x simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply, Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul] set d : ℂ := ↑((↑ₘA).det : ℝ) have h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) := by have : d ≠ 0 := by dsimp norm_cast exact Matrix.GLPos.det_ne_zero A rw [← zpow_one_add₀ this, ← zpow_add₀ this] congr; ring have h22 : denom A x ^ (-(k1 + k2)) = denom A x ^ (-k1) * denom A x ^ (-k2) := by rw [Int.neg_add, zpow_add₀]
exact UpperHalfPlane.denom_ne_zero A x
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by ext1 x simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply, Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul] set d : ℂ := ↑((↑ₘA).det : ℝ) have h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) := by have : d ≠ 0 := by dsimp norm_cast exact Matrix.GLPos.det_ne_zero A rw [← zpow_one_add₀ this, ← zpow_add₀ this] congr; ring have h22 : denom A x ^ (-(k1 + k2)) = denom A x ^ (-k1) * denom A x ^ (-k2) := by rw [Int.neg_add, zpow_add₀]
Mathlib.NumberTheory.ModularForms.SlashActions.202_0.3orIHeXinm1hkfX
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A
Mathlib_NumberTheory_ModularForms_SlashActions
case h Γ : Subgroup SL(2, ℤ) k : ℤ f✝ : ℍ → ℂ k1 k2 : ℤ A : ↥GL(2, ℝ)⁺ f g : ℍ → ℂ x : ℍ d : ℂ := ↑(Matrix.det ↑↑A) h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) h22 : denom A x ^ (-(k1 + k2)) = denom A x ^ (-k1) * denom A x ^ (-k2) ⊢ f (A • x) * g (A • x) * d ^ (k1 + k2 - 1) * denom A x ^ (-(k1 + k2)) = d * (f (A • x) * d ^ (k1 - 1) * denom A x ^ (-k1)) * (g (A • x) * d ^ (k2 - 1) * denom A x ^ (-k2))
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg] ring private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by simp [slash, denom] variable {α : Type*} [SMul α ℂ] [IsScalarTower α ℂ ℂ] private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)] ext1 simp_rw [slash] simp only [slash, Algebra.id.smul_eq_mul, Matrix.GeneralLinearGroup.val_det_apply, Pi.smul_apply] ring private theorem zero_slash (k : ℤ) (A : GL(2, ℝ)⁺) : (0 : ℍ → ℂ) ∣[k]A = 0 := funext fun _ => by simp only [slash, Pi.zero_apply, zero_mul] instance : SlashAction ℤ GL(2, ℝ)⁺ (ℍ → ℂ) ℂ where map := slash zero_slash := zero_slash slash_one := slash_one slash_mul := slash_mul smul_slash := smul_slash add_slash := add_slash end theorem slash_def (A : GL(2, ℝ)⁺) : f ∣[k] A = slash k A f := rfl #align modular_form.slash_def ModularForm.slash_def instance subgroupAction (Γ : Subgroup SL(2, ℤ)) : SlashAction ℤ Γ (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (MonoidHom.comp (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ)) (Subgroup.subtype Γ))) #align modular_form.subgroup_action ModularForm.subgroupAction @[simp] theorem subgroup_slash (Γ : Subgroup SL(2, ℤ)) (γ : Γ) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl #align modular_form.subgroup_slash ModularForm.subgroup_slash instance SLAction : SlashAction ℤ SL(2, ℤ) (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ))) set_option linter.uppercaseLean3 false in #align modular_form.SL_action ModularForm.SLAction @[simp] theorem SL_slash (γ : SL(2, ℤ)) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl set_option linter.uppercaseLean3 false in #align modular_form.SL_slash ModularForm.SL_slash /-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by have : ((↑ₘ(A : GL(2, ℝ)⁺)).det : ℝ) = 1 := det_coe' funext rw [SL_slash, slash_def, slash, zero_sub, this] simp #align modular_form.is_invariant_one ModularForm.is_invariant_one /-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by simp only [subgroup_slash, slash_def, ModularForm.slash] convert inv_mul_eq_iff_eq_mul₀ (G₀ := ℂ) _ using 2 · rw [mul_comm] simp only [denom, zpow_neg, det_coe', ofReal_one, one_zpow, mul_one, subgroup_to_sl_moeb, sl_moeb] rfl · convert zpow_ne_zero k (denom_ne_zero γ z) #align modular_form.slash_action_eq'_iff ModularForm.slash_action_eq'_iff theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by ext1 x simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply, Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul] set d : ℂ := ↑((↑ₘA).det : ℝ) have h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) := by have : d ≠ 0 := by dsimp norm_cast exact Matrix.GLPos.det_ne_zero A rw [← zpow_one_add₀ this, ← zpow_add₀ this] congr; ring have h22 : denom A x ^ (-(k1 + k2)) = denom A x ^ (-k1) * denom A x ^ (-k2) := by rw [Int.neg_add, zpow_add₀] exact UpperHalfPlane.denom_ne_zero A x
rw [h1, h22]
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by ext1 x simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply, Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul] set d : ℂ := ↑((↑ₘA).det : ℝ) have h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) := by have : d ≠ 0 := by dsimp norm_cast exact Matrix.GLPos.det_ne_zero A rw [← zpow_one_add₀ this, ← zpow_add₀ this] congr; ring have h22 : denom A x ^ (-(k1 + k2)) = denom A x ^ (-k1) * denom A x ^ (-k2) := by rw [Int.neg_add, zpow_add₀] exact UpperHalfPlane.denom_ne_zero A x
Mathlib.NumberTheory.ModularForms.SlashActions.202_0.3orIHeXinm1hkfX
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A
Mathlib_NumberTheory_ModularForms_SlashActions
case h Γ : Subgroup SL(2, ℤ) k : ℤ f✝ : ℍ → ℂ k1 k2 : ℤ A : ↥GL(2, ℝ)⁺ f g : ℍ → ℂ x : ℍ d : ℂ := ↑(Matrix.det ↑↑A) h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) h22 : denom A x ^ (-(k1 + k2)) = denom A x ^ (-k1) * denom A x ^ (-k2) ⊢ f (A • x) * g (A • x) * (d * d ^ (k1 - 1) * d ^ (k2 - 1)) * (denom A x ^ (-k1) * denom A x ^ (-k2)) = d * (f (A • x) * d ^ (k1 - 1) * denom A x ^ (-k1)) * (g (A • x) * d ^ (k2 - 1) * denom A x ^ (-k2))
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg] ring private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by simp [slash, denom] variable {α : Type*} [SMul α ℂ] [IsScalarTower α ℂ ℂ] private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)] ext1 simp_rw [slash] simp only [slash, Algebra.id.smul_eq_mul, Matrix.GeneralLinearGroup.val_det_apply, Pi.smul_apply] ring private theorem zero_slash (k : ℤ) (A : GL(2, ℝ)⁺) : (0 : ℍ → ℂ) ∣[k]A = 0 := funext fun _ => by simp only [slash, Pi.zero_apply, zero_mul] instance : SlashAction ℤ GL(2, ℝ)⁺ (ℍ → ℂ) ℂ where map := slash zero_slash := zero_slash slash_one := slash_one slash_mul := slash_mul smul_slash := smul_slash add_slash := add_slash end theorem slash_def (A : GL(2, ℝ)⁺) : f ∣[k] A = slash k A f := rfl #align modular_form.slash_def ModularForm.slash_def instance subgroupAction (Γ : Subgroup SL(2, ℤ)) : SlashAction ℤ Γ (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (MonoidHom.comp (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ)) (Subgroup.subtype Γ))) #align modular_form.subgroup_action ModularForm.subgroupAction @[simp] theorem subgroup_slash (Γ : Subgroup SL(2, ℤ)) (γ : Γ) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl #align modular_form.subgroup_slash ModularForm.subgroup_slash instance SLAction : SlashAction ℤ SL(2, ℤ) (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ))) set_option linter.uppercaseLean3 false in #align modular_form.SL_action ModularForm.SLAction @[simp] theorem SL_slash (γ : SL(2, ℤ)) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl set_option linter.uppercaseLean3 false in #align modular_form.SL_slash ModularForm.SL_slash /-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by have : ((↑ₘ(A : GL(2, ℝ)⁺)).det : ℝ) = 1 := det_coe' funext rw [SL_slash, slash_def, slash, zero_sub, this] simp #align modular_form.is_invariant_one ModularForm.is_invariant_one /-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by simp only [subgroup_slash, slash_def, ModularForm.slash] convert inv_mul_eq_iff_eq_mul₀ (G₀ := ℂ) _ using 2 · rw [mul_comm] simp only [denom, zpow_neg, det_coe', ofReal_one, one_zpow, mul_one, subgroup_to_sl_moeb, sl_moeb] rfl · convert zpow_ne_zero k (denom_ne_zero γ z) #align modular_form.slash_action_eq'_iff ModularForm.slash_action_eq'_iff theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by ext1 x simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply, Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul] set d : ℂ := ↑((↑ₘA).det : ℝ) have h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) := by have : d ≠ 0 := by dsimp norm_cast exact Matrix.GLPos.det_ne_zero A rw [← zpow_one_add₀ this, ← zpow_add₀ this] congr; ring have h22 : denom A x ^ (-(k1 + k2)) = denom A x ^ (-k1) * denom A x ^ (-k2) := by rw [Int.neg_add, zpow_add₀] exact UpperHalfPlane.denom_ne_zero A x rw [h1, h22]
ring
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by ext1 x simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply, Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul] set d : ℂ := ↑((↑ₘA).det : ℝ) have h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) := by have : d ≠ 0 := by dsimp norm_cast exact Matrix.GLPos.det_ne_zero A rw [← zpow_one_add₀ this, ← zpow_add₀ this] congr; ring have h22 : denom A x ^ (-(k1 + k2)) = denom A x ^ (-k1) * denom A x ^ (-k2) := by rw [Int.neg_add, zpow_add₀] exact UpperHalfPlane.denom_ne_zero A x rw [h1, h22]
Mathlib.NumberTheory.ModularForms.SlashActions.202_0.3orIHeXinm1hkfX
theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A
Mathlib_NumberTheory_ModularForms_SlashActions
Γ : Subgroup SL(2, ℤ) k : ℤ f✝ : ℍ → ℂ k1 k2 : ℤ A : SL(2, ℤ) f g : ℍ → ℂ ⊢ (f * g) ∣[k1 + k2] ↑A = Matrix.det ↑↑↑A • f ∣[k1] A * g ∣[k2] A
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg] ring private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by simp [slash, denom] variable {α : Type*} [SMul α ℂ] [IsScalarTower α ℂ ℂ] private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)] ext1 simp_rw [slash] simp only [slash, Algebra.id.smul_eq_mul, Matrix.GeneralLinearGroup.val_det_apply, Pi.smul_apply] ring private theorem zero_slash (k : ℤ) (A : GL(2, ℝ)⁺) : (0 : ℍ → ℂ) ∣[k]A = 0 := funext fun _ => by simp only [slash, Pi.zero_apply, zero_mul] instance : SlashAction ℤ GL(2, ℝ)⁺ (ℍ → ℂ) ℂ where map := slash zero_slash := zero_slash slash_one := slash_one slash_mul := slash_mul smul_slash := smul_slash add_slash := add_slash end theorem slash_def (A : GL(2, ℝ)⁺) : f ∣[k] A = slash k A f := rfl #align modular_form.slash_def ModularForm.slash_def instance subgroupAction (Γ : Subgroup SL(2, ℤ)) : SlashAction ℤ Γ (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (MonoidHom.comp (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ)) (Subgroup.subtype Γ))) #align modular_form.subgroup_action ModularForm.subgroupAction @[simp] theorem subgroup_slash (Γ : Subgroup SL(2, ℤ)) (γ : Γ) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl #align modular_form.subgroup_slash ModularForm.subgroup_slash instance SLAction : SlashAction ℤ SL(2, ℤ) (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ))) set_option linter.uppercaseLean3 false in #align modular_form.SL_action ModularForm.SLAction @[simp] theorem SL_slash (γ : SL(2, ℤ)) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl set_option linter.uppercaseLean3 false in #align modular_form.SL_slash ModularForm.SL_slash /-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by have : ((↑ₘ(A : GL(2, ℝ)⁺)).det : ℝ) = 1 := det_coe' funext rw [SL_slash, slash_def, slash, zero_sub, this] simp #align modular_form.is_invariant_one ModularForm.is_invariant_one /-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by simp only [subgroup_slash, slash_def, ModularForm.slash] convert inv_mul_eq_iff_eq_mul₀ (G₀ := ℂ) _ using 2 · rw [mul_comm] simp only [denom, zpow_neg, det_coe', ofReal_one, one_zpow, mul_one, subgroup_to_sl_moeb, sl_moeb] rfl · convert zpow_ne_zero k (denom_ne_zero γ z) #align modular_form.slash_action_eq'_iff ModularForm.slash_action_eq'_iff theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by ext1 x simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply, Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul] set d : ℂ := ↑((↑ₘA).det : ℝ) have h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) := by have : d ≠ 0 := by dsimp norm_cast exact Matrix.GLPos.det_ne_zero A rw [← zpow_one_add₀ this, ← zpow_add₀ this] congr; ring have h22 : denom A x ^ (-(k1 + k2)) = denom A x ^ (-k1) * denom A x ^ (-k2) := by rw [Int.neg_add, zpow_add₀] exact UpperHalfPlane.denom_ne_zero A x rw [h1, h22] ring #align modular_form.mul_slash ModularForm.mul_slash -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem mul_slash_SL2 (k1 k2 : ℤ) (A : SL(2, ℤ)) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = f ∣[k1] A * g ∣[k2] A := calc (f * g) ∣[k1 + k2] (A : GL(2, ℝ)⁺) = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by
apply mul_slash
theorem mul_slash_SL2 (k1 k2 : ℤ) (A : SL(2, ℤ)) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = f ∣[k1] A * g ∣[k2] A := calc (f * g) ∣[k1 + k2] (A : GL(2, ℝ)⁺) = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by
Mathlib.NumberTheory.ModularForms.SlashActions.223_0.3orIHeXinm1hkfX
theorem mul_slash_SL2 (k1 k2 : ℤ) (A : SL(2, ℤ)) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = f ∣[k1] A * g ∣[k2] A
Mathlib_NumberTheory_ModularForms_SlashActions
Γ : Subgroup SL(2, ℤ) k : ℤ f✝ : ℍ → ℂ k1 k2 : ℤ A : SL(2, ℤ) f g : ℍ → ℂ ⊢ Matrix.det ↑↑↑A • f ∣[k1] A * g ∣[k2] A = 1 • f ∣[k1] A * g ∣[k2] A
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg] ring private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by simp [slash, denom] variable {α : Type*} [SMul α ℂ] [IsScalarTower α ℂ ℂ] private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)] ext1 simp_rw [slash] simp only [slash, Algebra.id.smul_eq_mul, Matrix.GeneralLinearGroup.val_det_apply, Pi.smul_apply] ring private theorem zero_slash (k : ℤ) (A : GL(2, ℝ)⁺) : (0 : ℍ → ℂ) ∣[k]A = 0 := funext fun _ => by simp only [slash, Pi.zero_apply, zero_mul] instance : SlashAction ℤ GL(2, ℝ)⁺ (ℍ → ℂ) ℂ where map := slash zero_slash := zero_slash slash_one := slash_one slash_mul := slash_mul smul_slash := smul_slash add_slash := add_slash end theorem slash_def (A : GL(2, ℝ)⁺) : f ∣[k] A = slash k A f := rfl #align modular_form.slash_def ModularForm.slash_def instance subgroupAction (Γ : Subgroup SL(2, ℤ)) : SlashAction ℤ Γ (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (MonoidHom.comp (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ)) (Subgroup.subtype Γ))) #align modular_form.subgroup_action ModularForm.subgroupAction @[simp] theorem subgroup_slash (Γ : Subgroup SL(2, ℤ)) (γ : Γ) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl #align modular_form.subgroup_slash ModularForm.subgroup_slash instance SLAction : SlashAction ℤ SL(2, ℤ) (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ))) set_option linter.uppercaseLean3 false in #align modular_form.SL_action ModularForm.SLAction @[simp] theorem SL_slash (γ : SL(2, ℤ)) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl set_option linter.uppercaseLean3 false in #align modular_form.SL_slash ModularForm.SL_slash /-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by have : ((↑ₘ(A : GL(2, ℝ)⁺)).det : ℝ) = 1 := det_coe' funext rw [SL_slash, slash_def, slash, zero_sub, this] simp #align modular_form.is_invariant_one ModularForm.is_invariant_one /-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by simp only [subgroup_slash, slash_def, ModularForm.slash] convert inv_mul_eq_iff_eq_mul₀ (G₀ := ℂ) _ using 2 · rw [mul_comm] simp only [denom, zpow_neg, det_coe', ofReal_one, one_zpow, mul_one, subgroup_to_sl_moeb, sl_moeb] rfl · convert zpow_ne_zero k (denom_ne_zero γ z) #align modular_form.slash_action_eq'_iff ModularForm.slash_action_eq'_iff theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by ext1 x simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply, Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul] set d : ℂ := ↑((↑ₘA).det : ℝ) have h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) := by have : d ≠ 0 := by dsimp norm_cast exact Matrix.GLPos.det_ne_zero A rw [← zpow_one_add₀ this, ← zpow_add₀ this] congr; ring have h22 : denom A x ^ (-(k1 + k2)) = denom A x ^ (-k1) * denom A x ^ (-k2) := by rw [Int.neg_add, zpow_add₀] exact UpperHalfPlane.denom_ne_zero A x rw [h1, h22] ring #align modular_form.mul_slash ModularForm.mul_slash -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem mul_slash_SL2 (k1 k2 : ℤ) (A : SL(2, ℤ)) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = f ∣[k1] A * g ∣[k2] A := calc (f * g) ∣[k1 + k2] (A : GL(2, ℝ)⁺) = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by apply mul_slash _ = (1 : ℝ) • f ∣[k1] A * g ∣[k2] A := by
rw [det_coe']
theorem mul_slash_SL2 (k1 k2 : ℤ) (A : SL(2, ℤ)) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = f ∣[k1] A * g ∣[k2] A := calc (f * g) ∣[k1 + k2] (A : GL(2, ℝ)⁺) = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by apply mul_slash _ = (1 : ℝ) • f ∣[k1] A * g ∣[k2] A := by
Mathlib.NumberTheory.ModularForms.SlashActions.223_0.3orIHeXinm1hkfX
theorem mul_slash_SL2 (k1 k2 : ℤ) (A : SL(2, ℤ)) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = f ∣[k1] A * g ∣[k2] A
Mathlib_NumberTheory_ModularForms_SlashActions
Γ : Subgroup SL(2, ℤ) k : ℤ f✝ : ℍ → ℂ k1 k2 : ℤ A : SL(2, ℤ) f g : ℍ → ℂ ⊢ 1 • f ∣[k1] A * g ∣[k2] A = f ∣[k1] A * g ∣[k2] A
/- 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.Analysis.Complex.UpperHalfPlane.Basic import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup import Mathlib.LinearAlgebra.Matrix.SpecialLinearGroup #align_import number_theory.modular_forms.slash_actions from "leanprover-community/mathlib"@"738054fa93d43512da144ec45ce799d18fd44248" /-! # Slash actions This file defines a class of slash actions, which are families of right actions of a given group parametrized by some Type. This is modeled on the slash action of `GLPos (Fin 2) ℝ` on the space of modular forms. ## Notation In the `ModularForm` locale, this provides * `f ∣[k;γ] A`: the `k`th `γ`-compatible slash action by `A` on `f` * `f ∣[k] A`: the `k`th `ℂ`-compatible slash action by `A` on `f`; a shorthand for `f ∣[k;ℂ] A` -/ open Complex UpperHalfPlane open scoped UpperHalfPlane local notation "GL(" n ", " R ")" "⁺" => Matrix.GLPos (Fin n) R local notation "SL(" n ", " R ")" => Matrix.SpecialLinearGroup (Fin n) R local notation:1024 "↑ₘ" A:1024 => (((A : GL(2, ℝ)⁺) : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) _) -- like `↑ₘ`, but allows the user to specify the ring `R`. Useful to help Lean elaborate. local notation:1024 "↑ₘ[" R "]" A:1024 => ((A : GL (Fin 2) R) : Matrix (Fin 2) (Fin 2) R) /-- A general version of the slash action of the space of modular forms.-/ class SlashAction (β G α γ : Type*) [Group G] [AddMonoid α] [SMul γ α] where map : β → G → α → α zero_slash : ∀ (k : β) (g : G), map k g 0 = 0 slash_one : ∀ (k : β) (a : α), map k 1 a = a slash_mul : ∀ (k : β) (g h : G) (a : α), map k (g * h) a = map k h (map k g a) smul_slash : ∀ (k : β) (g : G) (a : α) (z : γ), map k g (z • a) = z • map k g a add_slash : ∀ (k : β) (g : G) (a b : α), map k g (a + b) = map k g a + map k g b #align slash_action SlashAction scoped[ModularForm] notation:100 f " ∣[" k ";" γ "] " a:100 => SlashAction.map γ k a f scoped[ModularForm] notation:100 f " ∣[" k "] " a:100 => SlashAction.map ℂ k a f open scoped ModularForm @[simp] theorem SlashAction.neg_slash {β G α γ : Type*} [Group G] [AddGroup α] [SMul γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) : (-a) ∣[k;γ] g = -a ∣[k;γ] g := eq_neg_of_add_eq_zero_left <| by rw [← SlashAction.add_slash, add_left_neg, SlashAction.zero_slash] #align slash_action.neg_slash SlashAction.neg_slash @[simp] theorem SlashAction.smul_slash_of_tower {R β G α : Type*} (γ : Type*) [Group G] [AddGroup α] [Monoid γ] [MulAction γ α] [SMul R γ] [SMul R α] [IsScalarTower R γ α] [SlashAction β G α γ] (k : β) (g : G) (a : α) (r : R) : (r • a) ∣[k;γ] g = r • a ∣[k;γ] g := by rw [← smul_one_smul γ r a, SlashAction.smul_slash, smul_one_smul] #align slash_action.smul_slash_of_tower SlashAction.smul_slash_of_tower attribute [simp] SlashAction.zero_slash SlashAction.slash_one SlashAction.smul_slash SlashAction.add_slash /-- Slash_action induced by a monoid homomorphism.-/ def monoidHomSlashAction {β G H α γ : Type*} [Group G] [AddMonoid α] [SMul γ α] [Group H] [SlashAction β G α γ] (h : H →* G) : SlashAction β H α γ where map k g := SlashAction.map γ k (h g) zero_slash k g := SlashAction.zero_slash k (h g) slash_one k a := by simp only [map_one, SlashAction.slash_one] slash_mul k g gg a := by simp only [map_mul, SlashAction.slash_mul] smul_slash _ _ := SlashAction.smul_slash _ _ add_slash _ g _ _ := SlashAction.add_slash _ (h g) _ _ #align monoid_hom_slash_action monoidHomSlashAction namespace ModularForm noncomputable section /-- The weight `k` action of `GL(2, ℝ)⁺` on functions `f : ℍ → ℂ`. -/ def slash (k : ℤ) (γ : GL(2, ℝ)⁺) (f : ℍ → ℂ) (x : ℍ) : ℂ := f (γ • x) * (((↑ₘγ).det : ℝ) : ℂ) ^ (k - 1) * UpperHalfPlane.denom γ x ^ (-k) #align modular_form.slash ModularForm.slash variable {Γ : Subgroup SL(2, ℤ)} {k : ℤ} (f : ℍ → ℂ) section -- temporary notation until the instance is built local notation:100 f " ∣[" k "]" γ:100 => ModularForm.slash k γ f private theorem slash_mul (k : ℤ) (A B : GL(2, ℝ)⁺) (f : ℍ → ℂ) : f ∣[k](A * B) = (f ∣[k]A) ∣[k]B := by ext1 x simp_rw [slash, UpperHalfPlane.denom_cocycle A B x] have e3 : (A * B) • x = A • B • x := by convert UpperHalfPlane.mul_smul' A B x rw [e3] simp only [UpperHalfPlane.num, UpperHalfPlane.denom, ofReal_mul, Subgroup.coe_mul, UpperHalfPlane.coe_smul, Units.val_mul, Matrix.det_mul, UpperHalfPlane.smulAux, UpperHalfPlane.smulAux', UpperHalfPlane.coe_mk] at * field_simp have : (((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ)) ^ (k - 1) = ((↑(↑A : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) * ((↑(↑B : GL (Fin 2) ℝ) : Matrix (Fin 2) (Fin 2) ℝ).det : ℂ) ^ (k - 1) := by simp_rw [← mul_zpow] simp_rw [this, ← mul_assoc, ← mul_zpow] private theorem add_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f + g) ∣[k]A = f ∣[k]A + g ∣[k]A := by ext1 simp only [slash, Pi.add_apply, denom, zpow_neg] ring private theorem slash_one (k : ℤ) (f : ℍ → ℂ) : f ∣[k]1 = f := funext <| by simp [slash, denom] variable {α : Type*} [SMul α ℂ] [IsScalarTower α ℂ ℂ] private theorem smul_slash (k : ℤ) (A : GL(2, ℝ)⁺) (f : ℍ → ℂ) (c : α) : (c • f) ∣[k]A = c • f ∣[k]A := by simp_rw [← smul_one_smul ℂ c f, ← smul_one_smul ℂ c (f ∣[k]A)] ext1 simp_rw [slash] simp only [slash, Algebra.id.smul_eq_mul, Matrix.GeneralLinearGroup.val_det_apply, Pi.smul_apply] ring private theorem zero_slash (k : ℤ) (A : GL(2, ℝ)⁺) : (0 : ℍ → ℂ) ∣[k]A = 0 := funext fun _ => by simp only [slash, Pi.zero_apply, zero_mul] instance : SlashAction ℤ GL(2, ℝ)⁺ (ℍ → ℂ) ℂ where map := slash zero_slash := zero_slash slash_one := slash_one slash_mul := slash_mul smul_slash := smul_slash add_slash := add_slash end theorem slash_def (A : GL(2, ℝ)⁺) : f ∣[k] A = slash k A f := rfl #align modular_form.slash_def ModularForm.slash_def instance subgroupAction (Γ : Subgroup SL(2, ℤ)) : SlashAction ℤ Γ (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (MonoidHom.comp (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ)) (Subgroup.subtype Γ))) #align modular_form.subgroup_action ModularForm.subgroupAction @[simp] theorem subgroup_slash (Γ : Subgroup SL(2, ℤ)) (γ : Γ) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl #align modular_form.subgroup_slash ModularForm.subgroup_slash instance SLAction : SlashAction ℤ SL(2, ℤ) (ℍ → ℂ) ℂ := monoidHomSlashAction (MonoidHom.comp Matrix.SpecialLinearGroup.toGLPos (Matrix.SpecialLinearGroup.map (Int.castRingHom ℝ))) set_option linter.uppercaseLean3 false in #align modular_form.SL_action ModularForm.SLAction @[simp] theorem SL_slash (γ : SL(2, ℤ)) : f ∣[k] γ = f ∣[k] (γ : GL(2, ℝ)⁺) := rfl set_option linter.uppercaseLean3 false in #align modular_form.SL_slash ModularForm.SL_slash /-- The constant function 1 is invariant under any element of `SL(2, ℤ)`. -/ -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem is_invariant_one (A : SL(2, ℤ)) : (1 : ℍ → ℂ) ∣[(0 : ℤ)] A = (1 : ℍ → ℂ) := by have : ((↑ₘ(A : GL(2, ℝ)⁺)).det : ℝ) = 1 := det_coe' funext rw [SL_slash, slash_def, slash, zero_sub, this] simp #align modular_form.is_invariant_one ModularForm.is_invariant_one /-- A function `f : ℍ → ℂ` is slash-invariant, of weight `k ∈ ℤ` and level `Γ`, if for every matrix `γ ∈ Γ` we have `f(γ • z)= (c*z+d)^k f(z)` where `γ= ![![a, b], ![c, d]]`, and it acts on `ℍ` via Möbius transformations. -/ theorem slash_action_eq'_iff (k : ℤ) (Γ : Subgroup SL(2, ℤ)) (f : ℍ → ℂ) (γ : Γ) (z : ℍ) : (f ∣[k] γ) z = f z ↔ f (γ • z) = ((↑ₘ[ℤ] γ 1 0 : ℂ) * z + (↑ₘ[ℤ] γ 1 1 : ℂ)) ^ k * f z := by simp only [subgroup_slash, slash_def, ModularForm.slash] convert inv_mul_eq_iff_eq_mul₀ (G₀ := ℂ) _ using 2 · rw [mul_comm] simp only [denom, zpow_neg, det_coe', ofReal_one, one_zpow, mul_one, subgroup_to_sl_moeb, sl_moeb] rfl · convert zpow_ne_zero k (denom_ne_zero γ z) #align modular_form.slash_action_eq'_iff ModularForm.slash_action_eq'_iff theorem mul_slash (k1 k2 : ℤ) (A : GL(2, ℝ)⁺) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by ext1 x simp only [slash_def, slash, Matrix.GeneralLinearGroup.val_det_apply, Pi.mul_apply, Pi.smul_apply, Algebra.smul_mul_assoc, real_smul] set d : ℂ := ↑((↑ₘA).det : ℝ) have h1 : d ^ (k1 + k2 - 1) = d * d ^ (k1 - 1) * d ^ (k2 - 1) := by have : d ≠ 0 := by dsimp norm_cast exact Matrix.GLPos.det_ne_zero A rw [← zpow_one_add₀ this, ← zpow_add₀ this] congr; ring have h22 : denom A x ^ (-(k1 + k2)) = denom A x ^ (-k1) * denom A x ^ (-k2) := by rw [Int.neg_add, zpow_add₀] exact UpperHalfPlane.denom_ne_zero A x rw [h1, h22] ring #align modular_form.mul_slash ModularForm.mul_slash -- @[simp] -- Porting note: simpNF says LHS simplifies to something more complex theorem mul_slash_SL2 (k1 k2 : ℤ) (A : SL(2, ℤ)) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = f ∣[k1] A * g ∣[k2] A := calc (f * g) ∣[k1 + k2] (A : GL(2, ℝ)⁺) = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by apply mul_slash _ = (1 : ℝ) • f ∣[k1] A * g ∣[k2] A := by rw [det_coe'] _ = f ∣[k1] A * g ∣[k2] A := by
rw [one_smul]
theorem mul_slash_SL2 (k1 k2 : ℤ) (A : SL(2, ℤ)) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = f ∣[k1] A * g ∣[k2] A := calc (f * g) ∣[k1 + k2] (A : GL(2, ℝ)⁺) = ((↑ₘA).det : ℝ) • f ∣[k1] A * g ∣[k2] A := by apply mul_slash _ = (1 : ℝ) • f ∣[k1] A * g ∣[k2] A := by rw [det_coe'] _ = f ∣[k1] A * g ∣[k2] A := by
Mathlib.NumberTheory.ModularForms.SlashActions.223_0.3orIHeXinm1hkfX
theorem mul_slash_SL2 (k1 k2 : ℤ) (A : SL(2, ℤ)) (f g : ℍ → ℂ) : (f * g) ∣[k1 + k2] A = f ∣[k1] A * g ∣[k2] A
Mathlib_NumberTheory_ModularForms_SlashActions
R : Type u_1 inst✝³ : CommSemiring R M : Submonoid R S : Type u_2 inst✝² : CommSemiring S inst✝¹ : Algebra R S P✝ : Type u_3 inst✝ : CommSemiring P✝ P : Ideal R hp : IsPrime P ⊢ 1 ∈ { carrier := (↑P)ᶜ, mul_mem' := (_ : ∀ {x y : R}, x ∈ (↑P)ᶜ → y ∈ (↑P)ᶜ → x * y ∈ ↑P → False) }.carrier
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen -/ import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.Localization.Ideal #align_import ring_theory.localization.at_prime from "leanprover-community/mathlib"@"b86c528d08a52a1fdb50d999232408e1c7e85d7d" /-! # Localizations of commutative rings at the complement of a prime ideal ## Main definitions * `IsLocalization.AtPrime (P : Ideal R) [IsPrime P] (S : Type*)` expresses that `S` is a localization at (the complement of) a prime ideal `P`, as an abbreviation of `IsLocalization P.prime_compl S` ## Main results * `IsLocalization.AtPrime.localRing`: a theorem (not an instance) stating a localization at the complement of a prime ideal is a local ring ## Implementation notes See `RingTheory.Localization.Basic` for a design overview. ## Tags localization, ring localization, commutative ring localization, characteristic predicate, commutative ring, field of fractions -/ variable {R : Type*} [CommSemiring R] (M : Submonoid R) (S : Type*) [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] section AtPrime variable (P : Ideal R) [hp : P.IsPrime] namespace Ideal /-- The complement of a prime ideal `P ⊆ R` is a submonoid of `R`. -/ def primeCompl : Submonoid R where carrier := (Pᶜ : Set R) one_mem' := by
convert P.ne_top_iff_one.1 hp.1
/-- The complement of a prime ideal `P ⊆ R` is a submonoid of `R`. -/ def primeCompl : Submonoid R where carrier := (Pᶜ : Set R) one_mem' := by
Mathlib.RingTheory.Localization.AtPrime.45_0.QSwWrbtcZl7L7lq
/-- The complement of a prime ideal `P ⊆ R` is a submonoid of `R`. -/ def primeCompl : Submonoid R where carrier
Mathlib_RingTheory_Localization_AtPrime
R : Type u_1 inst✝⁴ : CommSemiring R M : Submonoid R S : Type u_2 inst✝³ : CommSemiring S inst✝² : Algebra R S P✝ : Type u_3 inst✝¹ : CommSemiring P✝ P : Ideal R hp : Ideal.IsPrime P inst✝ : IsLocalization.AtPrime S P hze : 0 = 1 ⊢ False
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen -/ import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.Localization.Ideal #align_import ring_theory.localization.at_prime from "leanprover-community/mathlib"@"b86c528d08a52a1fdb50d999232408e1c7e85d7d" /-! # Localizations of commutative rings at the complement of a prime ideal ## Main definitions * `IsLocalization.AtPrime (P : Ideal R) [IsPrime P] (S : Type*)` expresses that `S` is a localization at (the complement of) a prime ideal `P`, as an abbreviation of `IsLocalization P.prime_compl S` ## Main results * `IsLocalization.AtPrime.localRing`: a theorem (not an instance) stating a localization at the complement of a prime ideal is a local ring ## Implementation notes See `RingTheory.Localization.Basic` for a design overview. ## Tags localization, ring localization, commutative ring localization, characteristic predicate, commutative ring, field of fractions -/ variable {R : Type*} [CommSemiring R] (M : Submonoid R) (S : Type*) [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] section AtPrime variable (P : Ideal R) [hp : P.IsPrime] namespace Ideal /-- The complement of a prime ideal `P ⊆ R` is a submonoid of `R`. -/ def primeCompl : Submonoid R where carrier := (Pᶜ : Set R) one_mem' := by convert P.ne_top_iff_one.1 hp.1 mul_mem' {x y} hnx hny hxy := Or.casesOn (hp.mem_or_mem hxy) hnx hny #align ideal.prime_compl Ideal.primeCompl theorem primeCompl_le_nonZeroDivisors [NoZeroDivisors R] : P.primeCompl ≤ nonZeroDivisors R := le_nonZeroDivisors_of_noZeroDivisors <| not_not_intro P.zero_mem #align ideal.prime_compl_le_non_zero_divisors Ideal.primeCompl_le_nonZeroDivisors end Ideal /-- Given a prime ideal `P`, the typeclass `IsLocalization.AtPrime S P` states that `S` is isomorphic to the localization of `R` at the complement of `P`. -/ protected abbrev IsLocalization.AtPrime := IsLocalization P.primeCompl S #align is_localization.at_prime IsLocalization.AtPrime /-- Given a prime ideal `P`, `Localization.AtPrime P` is a localization of `R` at the complement of `P`, as a quotient type. -/ protected abbrev Localization.AtPrime := Localization P.primeCompl #align localization.at_prime Localization.AtPrime namespace IsLocalization theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by
rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze
theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by
Mathlib.RingTheory.Localization.AtPrime.72_0.QSwWrbtcZl7L7lq
theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S
Mathlib_RingTheory_Localization_AtPrime
R : Type u_1 inst✝⁴ : CommSemiring R M : Submonoid R S : Type u_2 inst✝³ : CommSemiring S inst✝² : Algebra R S P✝ : Type u_3 inst✝¹ : CommSemiring P✝ P : Ideal R hp : Ideal.IsPrime P inst✝ : IsLocalization.AtPrime S P hze : (algebraMap R S) 0 = (algebraMap R S) 1 ⊢ False
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen -/ import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.Localization.Ideal #align_import ring_theory.localization.at_prime from "leanprover-community/mathlib"@"b86c528d08a52a1fdb50d999232408e1c7e85d7d" /-! # Localizations of commutative rings at the complement of a prime ideal ## Main definitions * `IsLocalization.AtPrime (P : Ideal R) [IsPrime P] (S : Type*)` expresses that `S` is a localization at (the complement of) a prime ideal `P`, as an abbreviation of `IsLocalization P.prime_compl S` ## Main results * `IsLocalization.AtPrime.localRing`: a theorem (not an instance) stating a localization at the complement of a prime ideal is a local ring ## Implementation notes See `RingTheory.Localization.Basic` for a design overview. ## Tags localization, ring localization, commutative ring localization, characteristic predicate, commutative ring, field of fractions -/ variable {R : Type*} [CommSemiring R] (M : Submonoid R) (S : Type*) [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] section AtPrime variable (P : Ideal R) [hp : P.IsPrime] namespace Ideal /-- The complement of a prime ideal `P ⊆ R` is a submonoid of `R`. -/ def primeCompl : Submonoid R where carrier := (Pᶜ : Set R) one_mem' := by convert P.ne_top_iff_one.1 hp.1 mul_mem' {x y} hnx hny hxy := Or.casesOn (hp.mem_or_mem hxy) hnx hny #align ideal.prime_compl Ideal.primeCompl theorem primeCompl_le_nonZeroDivisors [NoZeroDivisors R] : P.primeCompl ≤ nonZeroDivisors R := le_nonZeroDivisors_of_noZeroDivisors <| not_not_intro P.zero_mem #align ideal.prime_compl_le_non_zero_divisors Ideal.primeCompl_le_nonZeroDivisors end Ideal /-- Given a prime ideal `P`, the typeclass `IsLocalization.AtPrime S P` states that `S` is isomorphic to the localization of `R` at the complement of `P`. -/ protected abbrev IsLocalization.AtPrime := IsLocalization P.primeCompl S #align is_localization.at_prime IsLocalization.AtPrime /-- Given a prime ideal `P`, `Localization.AtPrime P` is a localization of `R` at the complement of `P`, as a quotient type. -/ protected abbrev Localization.AtPrime := Localization P.primeCompl #align localization.at_prime Localization.AtPrime namespace IsLocalization theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze
obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze
theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze
Mathlib.RingTheory.Localization.AtPrime.72_0.QSwWrbtcZl7L7lq
theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S
Mathlib_RingTheory_Localization_AtPrime
case intro R : Type u_1 inst✝⁴ : CommSemiring R M : Submonoid R S : Type u_2 inst✝³ : CommSemiring S inst✝² : Algebra R S P✝ : Type u_3 inst✝¹ : CommSemiring P✝ P : Ideal R hp : Ideal.IsPrime P inst✝ : IsLocalization.AtPrime S P hze : (algebraMap R S) 0 = (algebraMap R S) 1 t : ↥(Ideal.primeCompl P) ht : ↑t * 0 = ↑t * 1 ⊢ False
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen -/ import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.Localization.Ideal #align_import ring_theory.localization.at_prime from "leanprover-community/mathlib"@"b86c528d08a52a1fdb50d999232408e1c7e85d7d" /-! # Localizations of commutative rings at the complement of a prime ideal ## Main definitions * `IsLocalization.AtPrime (P : Ideal R) [IsPrime P] (S : Type*)` expresses that `S` is a localization at (the complement of) a prime ideal `P`, as an abbreviation of `IsLocalization P.prime_compl S` ## Main results * `IsLocalization.AtPrime.localRing`: a theorem (not an instance) stating a localization at the complement of a prime ideal is a local ring ## Implementation notes See `RingTheory.Localization.Basic` for a design overview. ## Tags localization, ring localization, commutative ring localization, characteristic predicate, commutative ring, field of fractions -/ variable {R : Type*} [CommSemiring R] (M : Submonoid R) (S : Type*) [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] section AtPrime variable (P : Ideal R) [hp : P.IsPrime] namespace Ideal /-- The complement of a prime ideal `P ⊆ R` is a submonoid of `R`. -/ def primeCompl : Submonoid R where carrier := (Pᶜ : Set R) one_mem' := by convert P.ne_top_iff_one.1 hp.1 mul_mem' {x y} hnx hny hxy := Or.casesOn (hp.mem_or_mem hxy) hnx hny #align ideal.prime_compl Ideal.primeCompl theorem primeCompl_le_nonZeroDivisors [NoZeroDivisors R] : P.primeCompl ≤ nonZeroDivisors R := le_nonZeroDivisors_of_noZeroDivisors <| not_not_intro P.zero_mem #align ideal.prime_compl_le_non_zero_divisors Ideal.primeCompl_le_nonZeroDivisors end Ideal /-- Given a prime ideal `P`, the typeclass `IsLocalization.AtPrime S P` states that `S` is isomorphic to the localization of `R` at the complement of `P`. -/ protected abbrev IsLocalization.AtPrime := IsLocalization P.primeCompl S #align is_localization.at_prime IsLocalization.AtPrime /-- Given a prime ideal `P`, `Localization.AtPrime P` is a localization of `R` at the complement of `P`, as a quotient type. -/ protected abbrev Localization.AtPrime := Localization P.primeCompl #align localization.at_prime Localization.AtPrime namespace IsLocalization theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze
have htz : (t : R) = 0 := by simpa using ht.symm
theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze
Mathlib.RingTheory.Localization.AtPrime.72_0.QSwWrbtcZl7L7lq
theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S
Mathlib_RingTheory_Localization_AtPrime
R : Type u_1 inst✝⁴ : CommSemiring R M : Submonoid R S : Type u_2 inst✝³ : CommSemiring S inst✝² : Algebra R S P✝ : Type u_3 inst✝¹ : CommSemiring P✝ P : Ideal R hp : Ideal.IsPrime P inst✝ : IsLocalization.AtPrime S P hze : (algebraMap R S) 0 = (algebraMap R S) 1 t : ↥(Ideal.primeCompl P) ht : ↑t * 0 = ↑t * 1 ⊢ ↑t = 0
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen -/ import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.Localization.Ideal #align_import ring_theory.localization.at_prime from "leanprover-community/mathlib"@"b86c528d08a52a1fdb50d999232408e1c7e85d7d" /-! # Localizations of commutative rings at the complement of a prime ideal ## Main definitions * `IsLocalization.AtPrime (P : Ideal R) [IsPrime P] (S : Type*)` expresses that `S` is a localization at (the complement of) a prime ideal `P`, as an abbreviation of `IsLocalization P.prime_compl S` ## Main results * `IsLocalization.AtPrime.localRing`: a theorem (not an instance) stating a localization at the complement of a prime ideal is a local ring ## Implementation notes See `RingTheory.Localization.Basic` for a design overview. ## Tags localization, ring localization, commutative ring localization, characteristic predicate, commutative ring, field of fractions -/ variable {R : Type*} [CommSemiring R] (M : Submonoid R) (S : Type*) [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] section AtPrime variable (P : Ideal R) [hp : P.IsPrime] namespace Ideal /-- The complement of a prime ideal `P ⊆ R` is a submonoid of `R`. -/ def primeCompl : Submonoid R where carrier := (Pᶜ : Set R) one_mem' := by convert P.ne_top_iff_one.1 hp.1 mul_mem' {x y} hnx hny hxy := Or.casesOn (hp.mem_or_mem hxy) hnx hny #align ideal.prime_compl Ideal.primeCompl theorem primeCompl_le_nonZeroDivisors [NoZeroDivisors R] : P.primeCompl ≤ nonZeroDivisors R := le_nonZeroDivisors_of_noZeroDivisors <| not_not_intro P.zero_mem #align ideal.prime_compl_le_non_zero_divisors Ideal.primeCompl_le_nonZeroDivisors end Ideal /-- Given a prime ideal `P`, the typeclass `IsLocalization.AtPrime S P` states that `S` is isomorphic to the localization of `R` at the complement of `P`. -/ protected abbrev IsLocalization.AtPrime := IsLocalization P.primeCompl S #align is_localization.at_prime IsLocalization.AtPrime /-- Given a prime ideal `P`, `Localization.AtPrime P` is a localization of `R` at the complement of `P`, as a quotient type. -/ protected abbrev Localization.AtPrime := Localization P.primeCompl #align localization.at_prime Localization.AtPrime namespace IsLocalization theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze have htz : (t : R) = 0 := by
simpa using ht.symm
theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze have htz : (t : R) = 0 := by
Mathlib.RingTheory.Localization.AtPrime.72_0.QSwWrbtcZl7L7lq
theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S
Mathlib_RingTheory_Localization_AtPrime
case intro R : Type u_1 inst✝⁴ : CommSemiring R M : Submonoid R S : Type u_2 inst✝³ : CommSemiring S inst✝² : Algebra R S P✝ : Type u_3 inst✝¹ : CommSemiring P✝ P : Ideal R hp : Ideal.IsPrime P inst✝ : IsLocalization.AtPrime S P hze : (algebraMap R S) 0 = (algebraMap R S) 1 t : ↥(Ideal.primeCompl P) ht : ↑t * 0 = ↑t * 1 htz : ↑t = 0 ⊢ False
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen -/ import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.Localization.Ideal #align_import ring_theory.localization.at_prime from "leanprover-community/mathlib"@"b86c528d08a52a1fdb50d999232408e1c7e85d7d" /-! # Localizations of commutative rings at the complement of a prime ideal ## Main definitions * `IsLocalization.AtPrime (P : Ideal R) [IsPrime P] (S : Type*)` expresses that `S` is a localization at (the complement of) a prime ideal `P`, as an abbreviation of `IsLocalization P.prime_compl S` ## Main results * `IsLocalization.AtPrime.localRing`: a theorem (not an instance) stating a localization at the complement of a prime ideal is a local ring ## Implementation notes See `RingTheory.Localization.Basic` for a design overview. ## Tags localization, ring localization, commutative ring localization, characteristic predicate, commutative ring, field of fractions -/ variable {R : Type*} [CommSemiring R] (M : Submonoid R) (S : Type*) [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] section AtPrime variable (P : Ideal R) [hp : P.IsPrime] namespace Ideal /-- The complement of a prime ideal `P ⊆ R` is a submonoid of `R`. -/ def primeCompl : Submonoid R where carrier := (Pᶜ : Set R) one_mem' := by convert P.ne_top_iff_one.1 hp.1 mul_mem' {x y} hnx hny hxy := Or.casesOn (hp.mem_or_mem hxy) hnx hny #align ideal.prime_compl Ideal.primeCompl theorem primeCompl_le_nonZeroDivisors [NoZeroDivisors R] : P.primeCompl ≤ nonZeroDivisors R := le_nonZeroDivisors_of_noZeroDivisors <| not_not_intro P.zero_mem #align ideal.prime_compl_le_non_zero_divisors Ideal.primeCompl_le_nonZeroDivisors end Ideal /-- Given a prime ideal `P`, the typeclass `IsLocalization.AtPrime S P` states that `S` is isomorphic to the localization of `R` at the complement of `P`. -/ protected abbrev IsLocalization.AtPrime := IsLocalization P.primeCompl S #align is_localization.at_prime IsLocalization.AtPrime /-- Given a prime ideal `P`, `Localization.AtPrime P` is a localization of `R` at the complement of `P`, as a quotient type. -/ protected abbrev Localization.AtPrime := Localization P.primeCompl #align localization.at_prime Localization.AtPrime namespace IsLocalization theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze have htz : (t : R) = 0 := by simpa using ht.symm
exact t.2 (htz.symm ▸ P.zero_mem : ↑t ∈ P)
theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze have htz : (t : R) = 0 := by simpa using ht.symm
Mathlib.RingTheory.Localization.AtPrime.72_0.QSwWrbtcZl7L7lq
theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S
Mathlib_RingTheory_Localization_AtPrime
R : Type u_1 inst✝⁴ : CommSemiring R M : Submonoid R S : Type u_2 inst✝³ : CommSemiring S inst✝² : Algebra R S P✝ : Type u_3 inst✝¹ : CommSemiring P✝ P : Ideal R hp : Ideal.IsPrime P inst✝ : IsLocalization.AtPrime S P this : _root_.Nontrivial S := Nontrivial S P ⊢ ∀ (a b : S), a ∈ nonunits S → b ∈ nonunits S → a + b ∈ nonunits S
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen -/ import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.Localization.Ideal #align_import ring_theory.localization.at_prime from "leanprover-community/mathlib"@"b86c528d08a52a1fdb50d999232408e1c7e85d7d" /-! # Localizations of commutative rings at the complement of a prime ideal ## Main definitions * `IsLocalization.AtPrime (P : Ideal R) [IsPrime P] (S : Type*)` expresses that `S` is a localization at (the complement of) a prime ideal `P`, as an abbreviation of `IsLocalization P.prime_compl S` ## Main results * `IsLocalization.AtPrime.localRing`: a theorem (not an instance) stating a localization at the complement of a prime ideal is a local ring ## Implementation notes See `RingTheory.Localization.Basic` for a design overview. ## Tags localization, ring localization, commutative ring localization, characteristic predicate, commutative ring, field of fractions -/ variable {R : Type*} [CommSemiring R] (M : Submonoid R) (S : Type*) [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] section AtPrime variable (P : Ideal R) [hp : P.IsPrime] namespace Ideal /-- The complement of a prime ideal `P ⊆ R` is a submonoid of `R`. -/ def primeCompl : Submonoid R where carrier := (Pᶜ : Set R) one_mem' := by convert P.ne_top_iff_one.1 hp.1 mul_mem' {x y} hnx hny hxy := Or.casesOn (hp.mem_or_mem hxy) hnx hny #align ideal.prime_compl Ideal.primeCompl theorem primeCompl_le_nonZeroDivisors [NoZeroDivisors R] : P.primeCompl ≤ nonZeroDivisors R := le_nonZeroDivisors_of_noZeroDivisors <| not_not_intro P.zero_mem #align ideal.prime_compl_le_non_zero_divisors Ideal.primeCompl_le_nonZeroDivisors end Ideal /-- Given a prime ideal `P`, the typeclass `IsLocalization.AtPrime S P` states that `S` is isomorphic to the localization of `R` at the complement of `P`. -/ protected abbrev IsLocalization.AtPrime := IsLocalization P.primeCompl S #align is_localization.at_prime IsLocalization.AtPrime /-- Given a prime ideal `P`, `Localization.AtPrime P` is a localization of `R` at the complement of `P`, as a quotient type. -/ protected abbrev Localization.AtPrime := Localization P.primeCompl #align localization.at_prime Localization.AtPrime namespace IsLocalization theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze have htz : (t : R) = 0 := by simpa using ht.symm exact t.2 (htz.symm ▸ P.zero_mem : ↑t ∈ P) #align is_localization.at_prime.nontrivial IsLocalization.AtPrime.Nontrivial theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by
intro x y hx hy hu
theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by
Mathlib.RingTheory.Localization.AtPrime.80_0.QSwWrbtcZl7L7lq
theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S
Mathlib_RingTheory_Localization_AtPrime
R : Type u_1 inst✝⁴ : CommSemiring R M : Submonoid R S : Type u_2 inst✝³ : CommSemiring S inst✝² : Algebra R S P✝ : Type u_3 inst✝¹ : CommSemiring P✝ P : Ideal R hp : Ideal.IsPrime P inst✝ : IsLocalization.AtPrime S P this : _root_.Nontrivial S := Nontrivial S P x y : S hx : x ∈ nonunits S hy : y ∈ nonunits S hu : IsUnit (x + y) ⊢ False
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen -/ import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.Localization.Ideal #align_import ring_theory.localization.at_prime from "leanprover-community/mathlib"@"b86c528d08a52a1fdb50d999232408e1c7e85d7d" /-! # Localizations of commutative rings at the complement of a prime ideal ## Main definitions * `IsLocalization.AtPrime (P : Ideal R) [IsPrime P] (S : Type*)` expresses that `S` is a localization at (the complement of) a prime ideal `P`, as an abbreviation of `IsLocalization P.prime_compl S` ## Main results * `IsLocalization.AtPrime.localRing`: a theorem (not an instance) stating a localization at the complement of a prime ideal is a local ring ## Implementation notes See `RingTheory.Localization.Basic` for a design overview. ## Tags localization, ring localization, commutative ring localization, characteristic predicate, commutative ring, field of fractions -/ variable {R : Type*} [CommSemiring R] (M : Submonoid R) (S : Type*) [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] section AtPrime variable (P : Ideal R) [hp : P.IsPrime] namespace Ideal /-- The complement of a prime ideal `P ⊆ R` is a submonoid of `R`. -/ def primeCompl : Submonoid R where carrier := (Pᶜ : Set R) one_mem' := by convert P.ne_top_iff_one.1 hp.1 mul_mem' {x y} hnx hny hxy := Or.casesOn (hp.mem_or_mem hxy) hnx hny #align ideal.prime_compl Ideal.primeCompl theorem primeCompl_le_nonZeroDivisors [NoZeroDivisors R] : P.primeCompl ≤ nonZeroDivisors R := le_nonZeroDivisors_of_noZeroDivisors <| not_not_intro P.zero_mem #align ideal.prime_compl_le_non_zero_divisors Ideal.primeCompl_le_nonZeroDivisors end Ideal /-- Given a prime ideal `P`, the typeclass `IsLocalization.AtPrime S P` states that `S` is isomorphic to the localization of `R` at the complement of `P`. -/ protected abbrev IsLocalization.AtPrime := IsLocalization P.primeCompl S #align is_localization.at_prime IsLocalization.AtPrime /-- Given a prime ideal `P`, `Localization.AtPrime P` is a localization of `R` at the complement of `P`, as a quotient type. -/ protected abbrev Localization.AtPrime := Localization P.primeCompl #align localization.at_prime Localization.AtPrime namespace IsLocalization theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze have htz : (t : R) = 0 := by simpa using ht.symm exact t.2 (htz.symm ▸ P.zero_mem : ↑t ∈ P) #align is_localization.at_prime.nontrivial IsLocalization.AtPrime.Nontrivial theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu
cases' isUnit_iff_exists_inv.1 hu with z hxyz
theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu
Mathlib.RingTheory.Localization.AtPrime.80_0.QSwWrbtcZl7L7lq
theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S
Mathlib_RingTheory_Localization_AtPrime
case intro R : Type u_1 inst✝⁴ : CommSemiring R M : Submonoid R S : Type u_2 inst✝³ : CommSemiring S inst✝² : Algebra R S P✝ : Type u_3 inst✝¹ : CommSemiring P✝ P : Ideal R hp : Ideal.IsPrime P inst✝ : IsLocalization.AtPrime S P this : _root_.Nontrivial S := Nontrivial S P x y : S hx : x ∈ nonunits S hy : y ∈ nonunits S hu : IsUnit (x + y) z : S hxyz : (x + y) * z = 1 ⊢ False
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen -/ import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.Localization.Ideal #align_import ring_theory.localization.at_prime from "leanprover-community/mathlib"@"b86c528d08a52a1fdb50d999232408e1c7e85d7d" /-! # Localizations of commutative rings at the complement of a prime ideal ## Main definitions * `IsLocalization.AtPrime (P : Ideal R) [IsPrime P] (S : Type*)` expresses that `S` is a localization at (the complement of) a prime ideal `P`, as an abbreviation of `IsLocalization P.prime_compl S` ## Main results * `IsLocalization.AtPrime.localRing`: a theorem (not an instance) stating a localization at the complement of a prime ideal is a local ring ## Implementation notes See `RingTheory.Localization.Basic` for a design overview. ## Tags localization, ring localization, commutative ring localization, characteristic predicate, commutative ring, field of fractions -/ variable {R : Type*} [CommSemiring R] (M : Submonoid R) (S : Type*) [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] section AtPrime variable (P : Ideal R) [hp : P.IsPrime] namespace Ideal /-- The complement of a prime ideal `P ⊆ R` is a submonoid of `R`. -/ def primeCompl : Submonoid R where carrier := (Pᶜ : Set R) one_mem' := by convert P.ne_top_iff_one.1 hp.1 mul_mem' {x y} hnx hny hxy := Or.casesOn (hp.mem_or_mem hxy) hnx hny #align ideal.prime_compl Ideal.primeCompl theorem primeCompl_le_nonZeroDivisors [NoZeroDivisors R] : P.primeCompl ≤ nonZeroDivisors R := le_nonZeroDivisors_of_noZeroDivisors <| not_not_intro P.zero_mem #align ideal.prime_compl_le_non_zero_divisors Ideal.primeCompl_le_nonZeroDivisors end Ideal /-- Given a prime ideal `P`, the typeclass `IsLocalization.AtPrime S P` states that `S` is isomorphic to the localization of `R` at the complement of `P`. -/ protected abbrev IsLocalization.AtPrime := IsLocalization P.primeCompl S #align is_localization.at_prime IsLocalization.AtPrime /-- Given a prime ideal `P`, `Localization.AtPrime P` is a localization of `R` at the complement of `P`, as a quotient type. -/ protected abbrev Localization.AtPrime := Localization P.primeCompl #align localization.at_prime Localization.AtPrime namespace IsLocalization theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze have htz : (t : R) = 0 := by simpa using ht.symm exact t.2 (htz.symm ▸ P.zero_mem : ↑t ∈ P) #align is_localization.at_prime.nontrivial IsLocalization.AtPrime.Nontrivial theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz
have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩
theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz
Mathlib.RingTheory.Localization.AtPrime.80_0.QSwWrbtcZl7L7lq
theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S
Mathlib_RingTheory_Localization_AtPrime
case intro R : Type u_1 inst✝⁴ : CommSemiring R M : Submonoid R S : Type u_2 inst✝³ : CommSemiring S inst✝² : Algebra R S P✝ : Type u_3 inst✝¹ : CommSemiring P✝ P : Ideal R hp : Ideal.IsPrime P inst✝ : IsLocalization.AtPrime S P this✝ : _root_.Nontrivial S := Nontrivial S P x y : S hx : x ∈ nonunits S hy : y ∈ nonunits S hu : IsUnit (x + y) z : S hxyz : (x + y) * z = 1 this : ∀ {r : R} {s : ↥(Ideal.primeCompl P)}, mk' S r s ∈ nonunits S → r ∈ P ⊢ False
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen -/ import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.Localization.Ideal #align_import ring_theory.localization.at_prime from "leanprover-community/mathlib"@"b86c528d08a52a1fdb50d999232408e1c7e85d7d" /-! # Localizations of commutative rings at the complement of a prime ideal ## Main definitions * `IsLocalization.AtPrime (P : Ideal R) [IsPrime P] (S : Type*)` expresses that `S` is a localization at (the complement of) a prime ideal `P`, as an abbreviation of `IsLocalization P.prime_compl S` ## Main results * `IsLocalization.AtPrime.localRing`: a theorem (not an instance) stating a localization at the complement of a prime ideal is a local ring ## Implementation notes See `RingTheory.Localization.Basic` for a design overview. ## Tags localization, ring localization, commutative ring localization, characteristic predicate, commutative ring, field of fractions -/ variable {R : Type*} [CommSemiring R] (M : Submonoid R) (S : Type*) [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] section AtPrime variable (P : Ideal R) [hp : P.IsPrime] namespace Ideal /-- The complement of a prime ideal `P ⊆ R` is a submonoid of `R`. -/ def primeCompl : Submonoid R where carrier := (Pᶜ : Set R) one_mem' := by convert P.ne_top_iff_one.1 hp.1 mul_mem' {x y} hnx hny hxy := Or.casesOn (hp.mem_or_mem hxy) hnx hny #align ideal.prime_compl Ideal.primeCompl theorem primeCompl_le_nonZeroDivisors [NoZeroDivisors R] : P.primeCompl ≤ nonZeroDivisors R := le_nonZeroDivisors_of_noZeroDivisors <| not_not_intro P.zero_mem #align ideal.prime_compl_le_non_zero_divisors Ideal.primeCompl_le_nonZeroDivisors end Ideal /-- Given a prime ideal `P`, the typeclass `IsLocalization.AtPrime S P` states that `S` is isomorphic to the localization of `R` at the complement of `P`. -/ protected abbrev IsLocalization.AtPrime := IsLocalization P.primeCompl S #align is_localization.at_prime IsLocalization.AtPrime /-- Given a prime ideal `P`, `Localization.AtPrime P` is a localization of `R` at the complement of `P`, as a quotient type. -/ protected abbrev Localization.AtPrime := Localization P.primeCompl #align localization.at_prime Localization.AtPrime namespace IsLocalization theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze have htz : (t : R) = 0 := by simpa using ht.symm exact t.2 (htz.symm ▸ P.zero_mem : ↑t ∈ P) #align is_localization.at_prime.nontrivial IsLocalization.AtPrime.Nontrivial theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩
rcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩
theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩
Mathlib.RingTheory.Localization.AtPrime.80_0.QSwWrbtcZl7L7lq
theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S
Mathlib_RingTheory_Localization_AtPrime
case intro.intro.intro R : Type u_1 inst✝⁴ : CommSemiring R M : Submonoid R S : Type u_2 inst✝³ : CommSemiring S inst✝² : Algebra R S P✝ : Type u_3 inst✝¹ : CommSemiring P✝ P : Ideal R hp : Ideal.IsPrime P inst✝ : IsLocalization.AtPrime S P this✝ : _root_.Nontrivial S := Nontrivial S P x y : S hx : x ∈ nonunits S hy : y ∈ nonunits S hu : IsUnit (x + y) z : S hxyz : (x + y) * z = 1 this : ∀ {r : R} {s : ↥(Ideal.primeCompl P)}, mk' S r s ∈ nonunits S → r ∈ P rx : R sx : ↥(Ideal.primeCompl P) hrx : mk' S rx sx = x ⊢ False
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen -/ import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.Localization.Ideal #align_import ring_theory.localization.at_prime from "leanprover-community/mathlib"@"b86c528d08a52a1fdb50d999232408e1c7e85d7d" /-! # Localizations of commutative rings at the complement of a prime ideal ## Main definitions * `IsLocalization.AtPrime (P : Ideal R) [IsPrime P] (S : Type*)` expresses that `S` is a localization at (the complement of) a prime ideal `P`, as an abbreviation of `IsLocalization P.prime_compl S` ## Main results * `IsLocalization.AtPrime.localRing`: a theorem (not an instance) stating a localization at the complement of a prime ideal is a local ring ## Implementation notes See `RingTheory.Localization.Basic` for a design overview. ## Tags localization, ring localization, commutative ring localization, characteristic predicate, commutative ring, field of fractions -/ variable {R : Type*} [CommSemiring R] (M : Submonoid R) (S : Type*) [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] section AtPrime variable (P : Ideal R) [hp : P.IsPrime] namespace Ideal /-- The complement of a prime ideal `P ⊆ R` is a submonoid of `R`. -/ def primeCompl : Submonoid R where carrier := (Pᶜ : Set R) one_mem' := by convert P.ne_top_iff_one.1 hp.1 mul_mem' {x y} hnx hny hxy := Or.casesOn (hp.mem_or_mem hxy) hnx hny #align ideal.prime_compl Ideal.primeCompl theorem primeCompl_le_nonZeroDivisors [NoZeroDivisors R] : P.primeCompl ≤ nonZeroDivisors R := le_nonZeroDivisors_of_noZeroDivisors <| not_not_intro P.zero_mem #align ideal.prime_compl_le_non_zero_divisors Ideal.primeCompl_le_nonZeroDivisors end Ideal /-- Given a prime ideal `P`, the typeclass `IsLocalization.AtPrime S P` states that `S` is isomorphic to the localization of `R` at the complement of `P`. -/ protected abbrev IsLocalization.AtPrime := IsLocalization P.primeCompl S #align is_localization.at_prime IsLocalization.AtPrime /-- Given a prime ideal `P`, `Localization.AtPrime P` is a localization of `R` at the complement of `P`, as a quotient type. -/ protected abbrev Localization.AtPrime := Localization P.primeCompl #align localization.at_prime Localization.AtPrime namespace IsLocalization theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze have htz : (t : R) = 0 := by simpa using ht.symm exact t.2 (htz.symm ▸ P.zero_mem : ↑t ∈ P) #align is_localization.at_prime.nontrivial IsLocalization.AtPrime.Nontrivial theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩ rcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩
rcases mk'_surjective P.primeCompl y with ⟨ry, sy, hry⟩
theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩ rcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩
Mathlib.RingTheory.Localization.AtPrime.80_0.QSwWrbtcZl7L7lq
theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S
Mathlib_RingTheory_Localization_AtPrime
case intro.intro.intro.intro.intro R : Type u_1 inst✝⁴ : CommSemiring R M : Submonoid R S : Type u_2 inst✝³ : CommSemiring S inst✝² : Algebra R S P✝ : Type u_3 inst✝¹ : CommSemiring P✝ P : Ideal R hp : Ideal.IsPrime P inst✝ : IsLocalization.AtPrime S P this✝ : _root_.Nontrivial S := Nontrivial S P x y : S hx : x ∈ nonunits S hy : y ∈ nonunits S hu : IsUnit (x + y) z : S hxyz : (x + y) * z = 1 this : ∀ {r : R} {s : ↥(Ideal.primeCompl P)}, mk' S r s ∈ nonunits S → r ∈ P rx : R sx : ↥(Ideal.primeCompl P) hrx : mk' S rx sx = x ry : R sy : ↥(Ideal.primeCompl P) hry : mk' S ry sy = y ⊢ False
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen -/ import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.Localization.Ideal #align_import ring_theory.localization.at_prime from "leanprover-community/mathlib"@"b86c528d08a52a1fdb50d999232408e1c7e85d7d" /-! # Localizations of commutative rings at the complement of a prime ideal ## Main definitions * `IsLocalization.AtPrime (P : Ideal R) [IsPrime P] (S : Type*)` expresses that `S` is a localization at (the complement of) a prime ideal `P`, as an abbreviation of `IsLocalization P.prime_compl S` ## Main results * `IsLocalization.AtPrime.localRing`: a theorem (not an instance) stating a localization at the complement of a prime ideal is a local ring ## Implementation notes See `RingTheory.Localization.Basic` for a design overview. ## Tags localization, ring localization, commutative ring localization, characteristic predicate, commutative ring, field of fractions -/ variable {R : Type*} [CommSemiring R] (M : Submonoid R) (S : Type*) [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] section AtPrime variable (P : Ideal R) [hp : P.IsPrime] namespace Ideal /-- The complement of a prime ideal `P ⊆ R` is a submonoid of `R`. -/ def primeCompl : Submonoid R where carrier := (Pᶜ : Set R) one_mem' := by convert P.ne_top_iff_one.1 hp.1 mul_mem' {x y} hnx hny hxy := Or.casesOn (hp.mem_or_mem hxy) hnx hny #align ideal.prime_compl Ideal.primeCompl theorem primeCompl_le_nonZeroDivisors [NoZeroDivisors R] : P.primeCompl ≤ nonZeroDivisors R := le_nonZeroDivisors_of_noZeroDivisors <| not_not_intro P.zero_mem #align ideal.prime_compl_le_non_zero_divisors Ideal.primeCompl_le_nonZeroDivisors end Ideal /-- Given a prime ideal `P`, the typeclass `IsLocalization.AtPrime S P` states that `S` is isomorphic to the localization of `R` at the complement of `P`. -/ protected abbrev IsLocalization.AtPrime := IsLocalization P.primeCompl S #align is_localization.at_prime IsLocalization.AtPrime /-- Given a prime ideal `P`, `Localization.AtPrime P` is a localization of `R` at the complement of `P`, as a quotient type. -/ protected abbrev Localization.AtPrime := Localization P.primeCompl #align localization.at_prime Localization.AtPrime namespace IsLocalization theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze have htz : (t : R) = 0 := by simpa using ht.symm exact t.2 (htz.symm ▸ P.zero_mem : ↑t ∈ P) #align is_localization.at_prime.nontrivial IsLocalization.AtPrime.Nontrivial theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩ rcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩ rcases mk'_surjective P.primeCompl y with ⟨ry, sy, hry⟩
rcases mk'_surjective P.primeCompl z with ⟨rz, sz, hrz⟩
theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩ rcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩ rcases mk'_surjective P.primeCompl y with ⟨ry, sy, hry⟩
Mathlib.RingTheory.Localization.AtPrime.80_0.QSwWrbtcZl7L7lq
theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S
Mathlib_RingTheory_Localization_AtPrime
case intro.intro.intro.intro.intro.intro.intro R : Type u_1 inst✝⁴ : CommSemiring R M : Submonoid R S : Type u_2 inst✝³ : CommSemiring S inst✝² : Algebra R S P✝ : Type u_3 inst✝¹ : CommSemiring P✝ P : Ideal R hp : Ideal.IsPrime P inst✝ : IsLocalization.AtPrime S P this✝ : _root_.Nontrivial S := Nontrivial S P x y : S hx : x ∈ nonunits S hy : y ∈ nonunits S hu : IsUnit (x + y) z : S hxyz : (x + y) * z = 1 this : ∀ {r : R} {s : ↥(Ideal.primeCompl P)}, mk' S r s ∈ nonunits S → r ∈ P rx : R sx : ↥(Ideal.primeCompl P) hrx : mk' S rx sx = x ry : R sy : ↥(Ideal.primeCompl P) hry : mk' S ry sy = y rz : R sz : ↥(Ideal.primeCompl P) hrz : mk' S rz sz = z ⊢ False
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen -/ import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.Localization.Ideal #align_import ring_theory.localization.at_prime from "leanprover-community/mathlib"@"b86c528d08a52a1fdb50d999232408e1c7e85d7d" /-! # Localizations of commutative rings at the complement of a prime ideal ## Main definitions * `IsLocalization.AtPrime (P : Ideal R) [IsPrime P] (S : Type*)` expresses that `S` is a localization at (the complement of) a prime ideal `P`, as an abbreviation of `IsLocalization P.prime_compl S` ## Main results * `IsLocalization.AtPrime.localRing`: a theorem (not an instance) stating a localization at the complement of a prime ideal is a local ring ## Implementation notes See `RingTheory.Localization.Basic` for a design overview. ## Tags localization, ring localization, commutative ring localization, characteristic predicate, commutative ring, field of fractions -/ variable {R : Type*} [CommSemiring R] (M : Submonoid R) (S : Type*) [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] section AtPrime variable (P : Ideal R) [hp : P.IsPrime] namespace Ideal /-- The complement of a prime ideal `P ⊆ R` is a submonoid of `R`. -/ def primeCompl : Submonoid R where carrier := (Pᶜ : Set R) one_mem' := by convert P.ne_top_iff_one.1 hp.1 mul_mem' {x y} hnx hny hxy := Or.casesOn (hp.mem_or_mem hxy) hnx hny #align ideal.prime_compl Ideal.primeCompl theorem primeCompl_le_nonZeroDivisors [NoZeroDivisors R] : P.primeCompl ≤ nonZeroDivisors R := le_nonZeroDivisors_of_noZeroDivisors <| not_not_intro P.zero_mem #align ideal.prime_compl_le_non_zero_divisors Ideal.primeCompl_le_nonZeroDivisors end Ideal /-- Given a prime ideal `P`, the typeclass `IsLocalization.AtPrime S P` states that `S` is isomorphic to the localization of `R` at the complement of `P`. -/ protected abbrev IsLocalization.AtPrime := IsLocalization P.primeCompl S #align is_localization.at_prime IsLocalization.AtPrime /-- Given a prime ideal `P`, `Localization.AtPrime P` is a localization of `R` at the complement of `P`, as a quotient type. -/ protected abbrev Localization.AtPrime := Localization P.primeCompl #align localization.at_prime Localization.AtPrime namespace IsLocalization theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze have htz : (t : R) = 0 := by simpa using ht.symm exact t.2 (htz.symm ▸ P.zero_mem : ↑t ∈ P) #align is_localization.at_prime.nontrivial IsLocalization.AtPrime.Nontrivial theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩ rcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩ rcases mk'_surjective P.primeCompl y with ⟨ry, sy, hry⟩ rcases mk'_surjective P.primeCompl z with ⟨rz, sz, hrz⟩
rw [← hrx, ← hry, ← hrz, ← mk'_add, ← mk'_mul, ← mk'_self S P.primeCompl.one_mem] at hxyz
theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩ rcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩ rcases mk'_surjective P.primeCompl y with ⟨ry, sy, hry⟩ rcases mk'_surjective P.primeCompl z with ⟨rz, sz, hrz⟩
Mathlib.RingTheory.Localization.AtPrime.80_0.QSwWrbtcZl7L7lq
theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S
Mathlib_RingTheory_Localization_AtPrime
case intro.intro.intro.intro.intro.intro.intro R : Type u_1 inst✝⁴ : CommSemiring R M : Submonoid R S : Type u_2 inst✝³ : CommSemiring S inst✝² : Algebra R S P✝ : Type u_3 inst✝¹ : CommSemiring P✝ P : Ideal R hp : Ideal.IsPrime P inst✝ : IsLocalization.AtPrime S P this✝ : _root_.Nontrivial S := Nontrivial S P x y : S hx : x ∈ nonunits S hy : y ∈ nonunits S hu : IsUnit (x + y) z : S this : ∀ {r : R} {s : ↥(Ideal.primeCompl P)}, mk' S r s ∈ nonunits S → r ∈ P rx : R sx : ↥(Ideal.primeCompl P) hrx : mk' S rx sx = x ry : R sy : ↥(Ideal.primeCompl P) hry : mk' S ry sy = y rz : R sz : ↥(Ideal.primeCompl P) hxyz : mk' S ((rx * ↑sy + ry * ↑sx) * rz) (sx * sy * sz) = mk' S 1 { val := 1, property := (_ : 1 ∈ Ideal.primeCompl P) } hrz : mk' S rz sz = z ⊢ False
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen -/ import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.Localization.Ideal #align_import ring_theory.localization.at_prime from "leanprover-community/mathlib"@"b86c528d08a52a1fdb50d999232408e1c7e85d7d" /-! # Localizations of commutative rings at the complement of a prime ideal ## Main definitions * `IsLocalization.AtPrime (P : Ideal R) [IsPrime P] (S : Type*)` expresses that `S` is a localization at (the complement of) a prime ideal `P`, as an abbreviation of `IsLocalization P.prime_compl S` ## Main results * `IsLocalization.AtPrime.localRing`: a theorem (not an instance) stating a localization at the complement of a prime ideal is a local ring ## Implementation notes See `RingTheory.Localization.Basic` for a design overview. ## Tags localization, ring localization, commutative ring localization, characteristic predicate, commutative ring, field of fractions -/ variable {R : Type*} [CommSemiring R] (M : Submonoid R) (S : Type*) [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] section AtPrime variable (P : Ideal R) [hp : P.IsPrime] namespace Ideal /-- The complement of a prime ideal `P ⊆ R` is a submonoid of `R`. -/ def primeCompl : Submonoid R where carrier := (Pᶜ : Set R) one_mem' := by convert P.ne_top_iff_one.1 hp.1 mul_mem' {x y} hnx hny hxy := Or.casesOn (hp.mem_or_mem hxy) hnx hny #align ideal.prime_compl Ideal.primeCompl theorem primeCompl_le_nonZeroDivisors [NoZeroDivisors R] : P.primeCompl ≤ nonZeroDivisors R := le_nonZeroDivisors_of_noZeroDivisors <| not_not_intro P.zero_mem #align ideal.prime_compl_le_non_zero_divisors Ideal.primeCompl_le_nonZeroDivisors end Ideal /-- Given a prime ideal `P`, the typeclass `IsLocalization.AtPrime S P` states that `S` is isomorphic to the localization of `R` at the complement of `P`. -/ protected abbrev IsLocalization.AtPrime := IsLocalization P.primeCompl S #align is_localization.at_prime IsLocalization.AtPrime /-- Given a prime ideal `P`, `Localization.AtPrime P` is a localization of `R` at the complement of `P`, as a quotient type. -/ protected abbrev Localization.AtPrime := Localization P.primeCompl #align localization.at_prime Localization.AtPrime namespace IsLocalization theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze have htz : (t : R) = 0 := by simpa using ht.symm exact t.2 (htz.symm ▸ P.zero_mem : ↑t ∈ P) #align is_localization.at_prime.nontrivial IsLocalization.AtPrime.Nontrivial theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩ rcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩ rcases mk'_surjective P.primeCompl y with ⟨ry, sy, hry⟩ rcases mk'_surjective P.primeCompl z with ⟨rz, sz, hrz⟩ rw [← hrx, ← hry, ← hrz, ← mk'_add, ← mk'_mul, ← mk'_self S P.primeCompl.one_mem] at hxyz
rw [← hrx] at hx
theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩ rcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩ rcases mk'_surjective P.primeCompl y with ⟨ry, sy, hry⟩ rcases mk'_surjective P.primeCompl z with ⟨rz, sz, hrz⟩ rw [← hrx, ← hry, ← hrz, ← mk'_add, ← mk'_mul, ← mk'_self S P.primeCompl.one_mem] at hxyz
Mathlib.RingTheory.Localization.AtPrime.80_0.QSwWrbtcZl7L7lq
theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S
Mathlib_RingTheory_Localization_AtPrime
case intro.intro.intro.intro.intro.intro.intro R : Type u_1 inst✝⁴ : CommSemiring R M : Submonoid R S : Type u_2 inst✝³ : CommSemiring S inst✝² : Algebra R S P✝ : Type u_3 inst✝¹ : CommSemiring P✝ P : Ideal R hp : Ideal.IsPrime P inst✝ : IsLocalization.AtPrime S P this✝ : _root_.Nontrivial S := Nontrivial S P x y : S hy : y ∈ nonunits S hu : IsUnit (x + y) z : S this : ∀ {r : R} {s : ↥(Ideal.primeCompl P)}, mk' S r s ∈ nonunits S → r ∈ P rx : R sx : ↥(Ideal.primeCompl P) hx : mk' S rx sx ∈ nonunits S hrx : mk' S rx sx = x ry : R sy : ↥(Ideal.primeCompl P) hry : mk' S ry sy = y rz : R sz : ↥(Ideal.primeCompl P) hxyz : mk' S ((rx * ↑sy + ry * ↑sx) * rz) (sx * sy * sz) = mk' S 1 { val := 1, property := (_ : 1 ∈ Ideal.primeCompl P) } hrz : mk' S rz sz = z ⊢ False
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen -/ import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.Localization.Ideal #align_import ring_theory.localization.at_prime from "leanprover-community/mathlib"@"b86c528d08a52a1fdb50d999232408e1c7e85d7d" /-! # Localizations of commutative rings at the complement of a prime ideal ## Main definitions * `IsLocalization.AtPrime (P : Ideal R) [IsPrime P] (S : Type*)` expresses that `S` is a localization at (the complement of) a prime ideal `P`, as an abbreviation of `IsLocalization P.prime_compl S` ## Main results * `IsLocalization.AtPrime.localRing`: a theorem (not an instance) stating a localization at the complement of a prime ideal is a local ring ## Implementation notes See `RingTheory.Localization.Basic` for a design overview. ## Tags localization, ring localization, commutative ring localization, characteristic predicate, commutative ring, field of fractions -/ variable {R : Type*} [CommSemiring R] (M : Submonoid R) (S : Type*) [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] section AtPrime variable (P : Ideal R) [hp : P.IsPrime] namespace Ideal /-- The complement of a prime ideal `P ⊆ R` is a submonoid of `R`. -/ def primeCompl : Submonoid R where carrier := (Pᶜ : Set R) one_mem' := by convert P.ne_top_iff_one.1 hp.1 mul_mem' {x y} hnx hny hxy := Or.casesOn (hp.mem_or_mem hxy) hnx hny #align ideal.prime_compl Ideal.primeCompl theorem primeCompl_le_nonZeroDivisors [NoZeroDivisors R] : P.primeCompl ≤ nonZeroDivisors R := le_nonZeroDivisors_of_noZeroDivisors <| not_not_intro P.zero_mem #align ideal.prime_compl_le_non_zero_divisors Ideal.primeCompl_le_nonZeroDivisors end Ideal /-- Given a prime ideal `P`, the typeclass `IsLocalization.AtPrime S P` states that `S` is isomorphic to the localization of `R` at the complement of `P`. -/ protected abbrev IsLocalization.AtPrime := IsLocalization P.primeCompl S #align is_localization.at_prime IsLocalization.AtPrime /-- Given a prime ideal `P`, `Localization.AtPrime P` is a localization of `R` at the complement of `P`, as a quotient type. -/ protected abbrev Localization.AtPrime := Localization P.primeCompl #align localization.at_prime Localization.AtPrime namespace IsLocalization theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze have htz : (t : R) = 0 := by simpa using ht.symm exact t.2 (htz.symm ▸ P.zero_mem : ↑t ∈ P) #align is_localization.at_prime.nontrivial IsLocalization.AtPrime.Nontrivial theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩ rcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩ rcases mk'_surjective P.primeCompl y with ⟨ry, sy, hry⟩ rcases mk'_surjective P.primeCompl z with ⟨rz, sz, hrz⟩ rw [← hrx, ← hry, ← hrz, ← mk'_add, ← mk'_mul, ← mk'_self S P.primeCompl.one_mem] at hxyz rw [← hrx] at hx
rw [← hry] at hy
theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩ rcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩ rcases mk'_surjective P.primeCompl y with ⟨ry, sy, hry⟩ rcases mk'_surjective P.primeCompl z with ⟨rz, sz, hrz⟩ rw [← hrx, ← hry, ← hrz, ← mk'_add, ← mk'_mul, ← mk'_self S P.primeCompl.one_mem] at hxyz rw [← hrx] at hx
Mathlib.RingTheory.Localization.AtPrime.80_0.QSwWrbtcZl7L7lq
theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S
Mathlib_RingTheory_Localization_AtPrime
case intro.intro.intro.intro.intro.intro.intro R : Type u_1 inst✝⁴ : CommSemiring R M : Submonoid R S : Type u_2 inst✝³ : CommSemiring S inst✝² : Algebra R S P✝ : Type u_3 inst✝¹ : CommSemiring P✝ P : Ideal R hp : Ideal.IsPrime P inst✝ : IsLocalization.AtPrime S P this✝ : _root_.Nontrivial S := Nontrivial S P x y : S hu : IsUnit (x + y) z : S this : ∀ {r : R} {s : ↥(Ideal.primeCompl P)}, mk' S r s ∈ nonunits S → r ∈ P rx : R sx : ↥(Ideal.primeCompl P) hx : mk' S rx sx ∈ nonunits S hrx : mk' S rx sx = x ry : R sy : ↥(Ideal.primeCompl P) hy : mk' S ry sy ∈ nonunits S hry : mk' S ry sy = y rz : R sz : ↥(Ideal.primeCompl P) hxyz : mk' S ((rx * ↑sy + ry * ↑sx) * rz) (sx * sy * sz) = mk' S 1 { val := 1, property := (_ : 1 ∈ Ideal.primeCompl P) } hrz : mk' S rz sz = z ⊢ False
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen -/ import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.Localization.Ideal #align_import ring_theory.localization.at_prime from "leanprover-community/mathlib"@"b86c528d08a52a1fdb50d999232408e1c7e85d7d" /-! # Localizations of commutative rings at the complement of a prime ideal ## Main definitions * `IsLocalization.AtPrime (P : Ideal R) [IsPrime P] (S : Type*)` expresses that `S` is a localization at (the complement of) a prime ideal `P`, as an abbreviation of `IsLocalization P.prime_compl S` ## Main results * `IsLocalization.AtPrime.localRing`: a theorem (not an instance) stating a localization at the complement of a prime ideal is a local ring ## Implementation notes See `RingTheory.Localization.Basic` for a design overview. ## Tags localization, ring localization, commutative ring localization, characteristic predicate, commutative ring, field of fractions -/ variable {R : Type*} [CommSemiring R] (M : Submonoid R) (S : Type*) [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] section AtPrime variable (P : Ideal R) [hp : P.IsPrime] namespace Ideal /-- The complement of a prime ideal `P ⊆ R` is a submonoid of `R`. -/ def primeCompl : Submonoid R where carrier := (Pᶜ : Set R) one_mem' := by convert P.ne_top_iff_one.1 hp.1 mul_mem' {x y} hnx hny hxy := Or.casesOn (hp.mem_or_mem hxy) hnx hny #align ideal.prime_compl Ideal.primeCompl theorem primeCompl_le_nonZeroDivisors [NoZeroDivisors R] : P.primeCompl ≤ nonZeroDivisors R := le_nonZeroDivisors_of_noZeroDivisors <| not_not_intro P.zero_mem #align ideal.prime_compl_le_non_zero_divisors Ideal.primeCompl_le_nonZeroDivisors end Ideal /-- Given a prime ideal `P`, the typeclass `IsLocalization.AtPrime S P` states that `S` is isomorphic to the localization of `R` at the complement of `P`. -/ protected abbrev IsLocalization.AtPrime := IsLocalization P.primeCompl S #align is_localization.at_prime IsLocalization.AtPrime /-- Given a prime ideal `P`, `Localization.AtPrime P` is a localization of `R` at the complement of `P`, as a quotient type. -/ protected abbrev Localization.AtPrime := Localization P.primeCompl #align localization.at_prime Localization.AtPrime namespace IsLocalization theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze have htz : (t : R) = 0 := by simpa using ht.symm exact t.2 (htz.symm ▸ P.zero_mem : ↑t ∈ P) #align is_localization.at_prime.nontrivial IsLocalization.AtPrime.Nontrivial theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩ rcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩ rcases mk'_surjective P.primeCompl y with ⟨ry, sy, hry⟩ rcases mk'_surjective P.primeCompl z with ⟨rz, sz, hrz⟩ rw [← hrx, ← hry, ← hrz, ← mk'_add, ← mk'_mul, ← mk'_self S P.primeCompl.one_mem] at hxyz rw [← hrx] at hx rw [← hry] at hy
obtain ⟨t, ht⟩ := IsLocalization.eq.1 hxyz
theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩ rcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩ rcases mk'_surjective P.primeCompl y with ⟨ry, sy, hry⟩ rcases mk'_surjective P.primeCompl z with ⟨rz, sz, hrz⟩ rw [← hrx, ← hry, ← hrz, ← mk'_add, ← mk'_mul, ← mk'_self S P.primeCompl.one_mem] at hxyz rw [← hrx] at hx rw [← hry] at hy
Mathlib.RingTheory.Localization.AtPrime.80_0.QSwWrbtcZl7L7lq
theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S
Mathlib_RingTheory_Localization_AtPrime
case intro.intro.intro.intro.intro.intro.intro.intro R : Type u_1 inst✝⁴ : CommSemiring R M : Submonoid R S : Type u_2 inst✝³ : CommSemiring S inst✝² : Algebra R S P✝ : Type u_3 inst✝¹ : CommSemiring P✝ P : Ideal R hp : Ideal.IsPrime P inst✝ : IsLocalization.AtPrime S P this✝ : _root_.Nontrivial S := Nontrivial S P x y : S hu : IsUnit (x + y) z : S this : ∀ {r : R} {s : ↥(Ideal.primeCompl P)}, mk' S r s ∈ nonunits S → r ∈ P rx : R sx : ↥(Ideal.primeCompl P) hx : mk' S rx sx ∈ nonunits S hrx : mk' S rx sx = x ry : R sy : ↥(Ideal.primeCompl P) hy : mk' S ry sy ∈ nonunits S hry : mk' S ry sy = y rz : R sz : ↥(Ideal.primeCompl P) hxyz : mk' S ((rx * ↑sy + ry * ↑sx) * rz) (sx * sy * sz) = mk' S 1 { val := 1, property := (_ : 1 ∈ Ideal.primeCompl P) } hrz : mk' S rz sz = z t : ↥(Ideal.primeCompl P) ht : ↑t * (↑{ val := 1, property := (_ : 1 ∈ Ideal.primeCompl P) } * ((rx * ↑sy + ry * ↑sx) * rz)) = ↑t * (↑(sx * sy * sz) * 1) ⊢ False
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen -/ import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.Localization.Ideal #align_import ring_theory.localization.at_prime from "leanprover-community/mathlib"@"b86c528d08a52a1fdb50d999232408e1c7e85d7d" /-! # Localizations of commutative rings at the complement of a prime ideal ## Main definitions * `IsLocalization.AtPrime (P : Ideal R) [IsPrime P] (S : Type*)` expresses that `S` is a localization at (the complement of) a prime ideal `P`, as an abbreviation of `IsLocalization P.prime_compl S` ## Main results * `IsLocalization.AtPrime.localRing`: a theorem (not an instance) stating a localization at the complement of a prime ideal is a local ring ## Implementation notes See `RingTheory.Localization.Basic` for a design overview. ## Tags localization, ring localization, commutative ring localization, characteristic predicate, commutative ring, field of fractions -/ variable {R : Type*} [CommSemiring R] (M : Submonoid R) (S : Type*) [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] section AtPrime variable (P : Ideal R) [hp : P.IsPrime] namespace Ideal /-- The complement of a prime ideal `P ⊆ R` is a submonoid of `R`. -/ def primeCompl : Submonoid R where carrier := (Pᶜ : Set R) one_mem' := by convert P.ne_top_iff_one.1 hp.1 mul_mem' {x y} hnx hny hxy := Or.casesOn (hp.mem_or_mem hxy) hnx hny #align ideal.prime_compl Ideal.primeCompl theorem primeCompl_le_nonZeroDivisors [NoZeroDivisors R] : P.primeCompl ≤ nonZeroDivisors R := le_nonZeroDivisors_of_noZeroDivisors <| not_not_intro P.zero_mem #align ideal.prime_compl_le_non_zero_divisors Ideal.primeCompl_le_nonZeroDivisors end Ideal /-- Given a prime ideal `P`, the typeclass `IsLocalization.AtPrime S P` states that `S` is isomorphic to the localization of `R` at the complement of `P`. -/ protected abbrev IsLocalization.AtPrime := IsLocalization P.primeCompl S #align is_localization.at_prime IsLocalization.AtPrime /-- Given a prime ideal `P`, `Localization.AtPrime P` is a localization of `R` at the complement of `P`, as a quotient type. -/ protected abbrev Localization.AtPrime := Localization P.primeCompl #align localization.at_prime Localization.AtPrime namespace IsLocalization theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze have htz : (t : R) = 0 := by simpa using ht.symm exact t.2 (htz.symm ▸ P.zero_mem : ↑t ∈ P) #align is_localization.at_prime.nontrivial IsLocalization.AtPrime.Nontrivial theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩ rcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩ rcases mk'_surjective P.primeCompl y with ⟨ry, sy, hry⟩ rcases mk'_surjective P.primeCompl z with ⟨rz, sz, hrz⟩ rw [← hrx, ← hry, ← hrz, ← mk'_add, ← mk'_mul, ← mk'_self S P.primeCompl.one_mem] at hxyz rw [← hrx] at hx rw [← hry] at hy obtain ⟨t, ht⟩ := IsLocalization.eq.1 hxyz
simp only [mul_one, one_mul, Submonoid.coe_mul, Subtype.coe_mk] at ht
theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩ rcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩ rcases mk'_surjective P.primeCompl y with ⟨ry, sy, hry⟩ rcases mk'_surjective P.primeCompl z with ⟨rz, sz, hrz⟩ rw [← hrx, ← hry, ← hrz, ← mk'_add, ← mk'_mul, ← mk'_self S P.primeCompl.one_mem] at hxyz rw [← hrx] at hx rw [← hry] at hy obtain ⟨t, ht⟩ := IsLocalization.eq.1 hxyz
Mathlib.RingTheory.Localization.AtPrime.80_0.QSwWrbtcZl7L7lq
theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S
Mathlib_RingTheory_Localization_AtPrime
case intro.intro.intro.intro.intro.intro.intro.intro R : Type u_1 inst✝⁴ : CommSemiring R M : Submonoid R S : Type u_2 inst✝³ : CommSemiring S inst✝² : Algebra R S P✝ : Type u_3 inst✝¹ : CommSemiring P✝ P : Ideal R hp : Ideal.IsPrime P inst✝ : IsLocalization.AtPrime S P this✝ : _root_.Nontrivial S := Nontrivial S P x y : S hu : IsUnit (x + y) z : S this : ∀ {r : R} {s : ↥(Ideal.primeCompl P)}, mk' S r s ∈ nonunits S → r ∈ P rx : R sx : ↥(Ideal.primeCompl P) hx : mk' S rx sx ∈ nonunits S hrx : mk' S rx sx = x ry : R sy : ↥(Ideal.primeCompl P) hy : mk' S ry sy ∈ nonunits S hry : mk' S ry sy = y rz : R sz : ↥(Ideal.primeCompl P) hxyz : mk' S ((rx * ↑sy + ry * ↑sx) * rz) (sx * sy * sz) = mk' S 1 { val := 1, property := (_ : 1 ∈ Ideal.primeCompl P) } hrz : mk' S rz sz = z t : ↥(Ideal.primeCompl P) ht : ↑t * ((rx * ↑sy + ry * ↑sx) * rz) = ↑t * (↑sx * ↑sy * ↑sz) ⊢ False
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen -/ import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.Localization.Ideal #align_import ring_theory.localization.at_prime from "leanprover-community/mathlib"@"b86c528d08a52a1fdb50d999232408e1c7e85d7d" /-! # Localizations of commutative rings at the complement of a prime ideal ## Main definitions * `IsLocalization.AtPrime (P : Ideal R) [IsPrime P] (S : Type*)` expresses that `S` is a localization at (the complement of) a prime ideal `P`, as an abbreviation of `IsLocalization P.prime_compl S` ## Main results * `IsLocalization.AtPrime.localRing`: a theorem (not an instance) stating a localization at the complement of a prime ideal is a local ring ## Implementation notes See `RingTheory.Localization.Basic` for a design overview. ## Tags localization, ring localization, commutative ring localization, characteristic predicate, commutative ring, field of fractions -/ variable {R : Type*} [CommSemiring R] (M : Submonoid R) (S : Type*) [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] section AtPrime variable (P : Ideal R) [hp : P.IsPrime] namespace Ideal /-- The complement of a prime ideal `P ⊆ R` is a submonoid of `R`. -/ def primeCompl : Submonoid R where carrier := (Pᶜ : Set R) one_mem' := by convert P.ne_top_iff_one.1 hp.1 mul_mem' {x y} hnx hny hxy := Or.casesOn (hp.mem_or_mem hxy) hnx hny #align ideal.prime_compl Ideal.primeCompl theorem primeCompl_le_nonZeroDivisors [NoZeroDivisors R] : P.primeCompl ≤ nonZeroDivisors R := le_nonZeroDivisors_of_noZeroDivisors <| not_not_intro P.zero_mem #align ideal.prime_compl_le_non_zero_divisors Ideal.primeCompl_le_nonZeroDivisors end Ideal /-- Given a prime ideal `P`, the typeclass `IsLocalization.AtPrime S P` states that `S` is isomorphic to the localization of `R` at the complement of `P`. -/ protected abbrev IsLocalization.AtPrime := IsLocalization P.primeCompl S #align is_localization.at_prime IsLocalization.AtPrime /-- Given a prime ideal `P`, `Localization.AtPrime P` is a localization of `R` at the complement of `P`, as a quotient type. -/ protected abbrev Localization.AtPrime := Localization P.primeCompl #align localization.at_prime Localization.AtPrime namespace IsLocalization theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze have htz : (t : R) = 0 := by simpa using ht.symm exact t.2 (htz.symm ▸ P.zero_mem : ↑t ∈ P) #align is_localization.at_prime.nontrivial IsLocalization.AtPrime.Nontrivial theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩ rcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩ rcases mk'_surjective P.primeCompl y with ⟨ry, sy, hry⟩ rcases mk'_surjective P.primeCompl z with ⟨rz, sz, hrz⟩ rw [← hrx, ← hry, ← hrz, ← mk'_add, ← mk'_mul, ← mk'_self S P.primeCompl.one_mem] at hxyz rw [← hrx] at hx rw [← hry] at hy obtain ⟨t, ht⟩ := IsLocalization.eq.1 hxyz simp only [mul_one, one_mul, Submonoid.coe_mul, Subtype.coe_mk] at ht
suffices : (t : R) * (sx * sy * sz) ∈ P
theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩ rcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩ rcases mk'_surjective P.primeCompl y with ⟨ry, sy, hry⟩ rcases mk'_surjective P.primeCompl z with ⟨rz, sz, hrz⟩ rw [← hrx, ← hry, ← hrz, ← mk'_add, ← mk'_mul, ← mk'_self S P.primeCompl.one_mem] at hxyz rw [← hrx] at hx rw [← hry] at hy obtain ⟨t, ht⟩ := IsLocalization.eq.1 hxyz simp only [mul_one, one_mul, Submonoid.coe_mul, Subtype.coe_mk] at ht
Mathlib.RingTheory.Localization.AtPrime.80_0.QSwWrbtcZl7L7lq
theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S
Mathlib_RingTheory_Localization_AtPrime
case intro.intro.intro.intro.intro.intro.intro.intro R : Type u_1 inst✝⁴ : CommSemiring R M : Submonoid R S : Type u_2 inst✝³ : CommSemiring S inst✝² : Algebra R S P✝ : Type u_3 inst✝¹ : CommSemiring P✝ P : Ideal R hp : Ideal.IsPrime P inst✝ : IsLocalization.AtPrime S P this✝¹ : _root_.Nontrivial S := Nontrivial S P x y : S hu : IsUnit (x + y) z : S this✝ : ∀ {r : R} {s : ↥(Ideal.primeCompl P)}, mk' S r s ∈ nonunits S → r ∈ P rx : R sx : ↥(Ideal.primeCompl P) hx : mk' S rx sx ∈ nonunits S hrx : mk' S rx sx = x ry : R sy : ↥(Ideal.primeCompl P) hy : mk' S ry sy ∈ nonunits S hry : mk' S ry sy = y rz : R sz : ↥(Ideal.primeCompl P) hxyz : mk' S ((rx * ↑sy + ry * ↑sx) * rz) (sx * sy * sz) = mk' S 1 { val := 1, property := (_ : 1 ∈ Ideal.primeCompl P) } hrz : mk' S rz sz = z t : ↥(Ideal.primeCompl P) ht : ↑t * ((rx * ↑sy + ry * ↑sx) * rz) = ↑t * (↑sx * ↑sy * ↑sz) this : ↑t * (↑sx * ↑sy * ↑sz) ∈ P ⊢ False case this R : Type u_1 inst✝⁴ : CommSemiring R M : Submonoid R S : Type u_2 inst✝³ : CommSemiring S inst✝² : Algebra R S P✝ : Type u_3 inst✝¹ : CommSemiring P✝ P : Ideal R hp : Ideal.IsPrime P inst✝ : IsLocalization.AtPrime S P this✝ : _root_.Nontrivial S := Nontrivial S P x y : S hu : IsUnit (x + y) z : S this : ∀ {r : R} {s : ↥(Ideal.primeCompl P)}, mk' S r s ∈ nonunits S → r ∈ P rx : R sx : ↥(Ideal.primeCompl P) hx : mk' S rx sx ∈ nonunits S hrx : mk' S rx sx = x ry : R sy : ↥(Ideal.primeCompl P) hy : mk' S ry sy ∈ nonunits S hry : mk' S ry sy = y rz : R sz : ↥(Ideal.primeCompl P) hxyz : mk' S ((rx * ↑sy + ry * ↑sx) * rz) (sx * sy * sz) = mk' S 1 { val := 1, property := (_ : 1 ∈ Ideal.primeCompl P) } hrz : mk' S rz sz = z t : ↥(Ideal.primeCompl P) ht : ↑t * ((rx * ↑sy + ry * ↑sx) * rz) = ↑t * (↑sx * ↑sy * ↑sz) ⊢ ↑t * (↑sx * ↑sy * ↑sz) ∈ P
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen -/ import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.Localization.Ideal #align_import ring_theory.localization.at_prime from "leanprover-community/mathlib"@"b86c528d08a52a1fdb50d999232408e1c7e85d7d" /-! # Localizations of commutative rings at the complement of a prime ideal ## Main definitions * `IsLocalization.AtPrime (P : Ideal R) [IsPrime P] (S : Type*)` expresses that `S` is a localization at (the complement of) a prime ideal `P`, as an abbreviation of `IsLocalization P.prime_compl S` ## Main results * `IsLocalization.AtPrime.localRing`: a theorem (not an instance) stating a localization at the complement of a prime ideal is a local ring ## Implementation notes See `RingTheory.Localization.Basic` for a design overview. ## Tags localization, ring localization, commutative ring localization, characteristic predicate, commutative ring, field of fractions -/ variable {R : Type*} [CommSemiring R] (M : Submonoid R) (S : Type*) [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] section AtPrime variable (P : Ideal R) [hp : P.IsPrime] namespace Ideal /-- The complement of a prime ideal `P ⊆ R` is a submonoid of `R`. -/ def primeCompl : Submonoid R where carrier := (Pᶜ : Set R) one_mem' := by convert P.ne_top_iff_one.1 hp.1 mul_mem' {x y} hnx hny hxy := Or.casesOn (hp.mem_or_mem hxy) hnx hny #align ideal.prime_compl Ideal.primeCompl theorem primeCompl_le_nonZeroDivisors [NoZeroDivisors R] : P.primeCompl ≤ nonZeroDivisors R := le_nonZeroDivisors_of_noZeroDivisors <| not_not_intro P.zero_mem #align ideal.prime_compl_le_non_zero_divisors Ideal.primeCompl_le_nonZeroDivisors end Ideal /-- Given a prime ideal `P`, the typeclass `IsLocalization.AtPrime S P` states that `S` is isomorphic to the localization of `R` at the complement of `P`. -/ protected abbrev IsLocalization.AtPrime := IsLocalization P.primeCompl S #align is_localization.at_prime IsLocalization.AtPrime /-- Given a prime ideal `P`, `Localization.AtPrime P` is a localization of `R` at the complement of `P`, as a quotient type. -/ protected abbrev Localization.AtPrime := Localization P.primeCompl #align localization.at_prime Localization.AtPrime namespace IsLocalization theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze have htz : (t : R) = 0 := by simpa using ht.symm exact t.2 (htz.symm ▸ P.zero_mem : ↑t ∈ P) #align is_localization.at_prime.nontrivial IsLocalization.AtPrime.Nontrivial theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩ rcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩ rcases mk'_surjective P.primeCompl y with ⟨ry, sy, hry⟩ rcases mk'_surjective P.primeCompl z with ⟨rz, sz, hrz⟩ rw [← hrx, ← hry, ← hrz, ← mk'_add, ← mk'_mul, ← mk'_self S P.primeCompl.one_mem] at hxyz rw [← hrx] at hx rw [← hry] at hy obtain ⟨t, ht⟩ := IsLocalization.eq.1 hxyz simp only [mul_one, one_mul, Submonoid.coe_mul, Subtype.coe_mk] at ht suffices : (t : R) * (sx * sy * sz) ∈ P
exact not_or_of_not (mt hp.mem_or_mem <| not_or_of_not sx.2 sy.2) sz.2 (hp.mem_or_mem <| (hp.mem_or_mem this).resolve_left t.2)
theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩ rcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩ rcases mk'_surjective P.primeCompl y with ⟨ry, sy, hry⟩ rcases mk'_surjective P.primeCompl z with ⟨rz, sz, hrz⟩ rw [← hrx, ← hry, ← hrz, ← mk'_add, ← mk'_mul, ← mk'_self S P.primeCompl.one_mem] at hxyz rw [← hrx] at hx rw [← hry] at hy obtain ⟨t, ht⟩ := IsLocalization.eq.1 hxyz simp only [mul_one, one_mul, Submonoid.coe_mul, Subtype.coe_mk] at ht suffices : (t : R) * (sx * sy * sz) ∈ P
Mathlib.RingTheory.Localization.AtPrime.80_0.QSwWrbtcZl7L7lq
theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S
Mathlib_RingTheory_Localization_AtPrime
case this R : Type u_1 inst✝⁴ : CommSemiring R M : Submonoid R S : Type u_2 inst✝³ : CommSemiring S inst✝² : Algebra R S P✝ : Type u_3 inst✝¹ : CommSemiring P✝ P : Ideal R hp : Ideal.IsPrime P inst✝ : IsLocalization.AtPrime S P this✝ : _root_.Nontrivial S := Nontrivial S P x y : S hu : IsUnit (x + y) z : S this : ∀ {r : R} {s : ↥(Ideal.primeCompl P)}, mk' S r s ∈ nonunits S → r ∈ P rx : R sx : ↥(Ideal.primeCompl P) hx : mk' S rx sx ∈ nonunits S hrx : mk' S rx sx = x ry : R sy : ↥(Ideal.primeCompl P) hy : mk' S ry sy ∈ nonunits S hry : mk' S ry sy = y rz : R sz : ↥(Ideal.primeCompl P) hxyz : mk' S ((rx * ↑sy + ry * ↑sx) * rz) (sx * sy * sz) = mk' S 1 { val := 1, property := (_ : 1 ∈ Ideal.primeCompl P) } hrz : mk' S rz sz = z t : ↥(Ideal.primeCompl P) ht : ↑t * ((rx * ↑sy + ry * ↑sx) * rz) = ↑t * (↑sx * ↑sy * ↑sz) ⊢ ↑t * (↑sx * ↑sy * ↑sz) ∈ P
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen -/ import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.Localization.Ideal #align_import ring_theory.localization.at_prime from "leanprover-community/mathlib"@"b86c528d08a52a1fdb50d999232408e1c7e85d7d" /-! # Localizations of commutative rings at the complement of a prime ideal ## Main definitions * `IsLocalization.AtPrime (P : Ideal R) [IsPrime P] (S : Type*)` expresses that `S` is a localization at (the complement of) a prime ideal `P`, as an abbreviation of `IsLocalization P.prime_compl S` ## Main results * `IsLocalization.AtPrime.localRing`: a theorem (not an instance) stating a localization at the complement of a prime ideal is a local ring ## Implementation notes See `RingTheory.Localization.Basic` for a design overview. ## Tags localization, ring localization, commutative ring localization, characteristic predicate, commutative ring, field of fractions -/ variable {R : Type*} [CommSemiring R] (M : Submonoid R) (S : Type*) [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] section AtPrime variable (P : Ideal R) [hp : P.IsPrime] namespace Ideal /-- The complement of a prime ideal `P ⊆ R` is a submonoid of `R`. -/ def primeCompl : Submonoid R where carrier := (Pᶜ : Set R) one_mem' := by convert P.ne_top_iff_one.1 hp.1 mul_mem' {x y} hnx hny hxy := Or.casesOn (hp.mem_or_mem hxy) hnx hny #align ideal.prime_compl Ideal.primeCompl theorem primeCompl_le_nonZeroDivisors [NoZeroDivisors R] : P.primeCompl ≤ nonZeroDivisors R := le_nonZeroDivisors_of_noZeroDivisors <| not_not_intro P.zero_mem #align ideal.prime_compl_le_non_zero_divisors Ideal.primeCompl_le_nonZeroDivisors end Ideal /-- Given a prime ideal `P`, the typeclass `IsLocalization.AtPrime S P` states that `S` is isomorphic to the localization of `R` at the complement of `P`. -/ protected abbrev IsLocalization.AtPrime := IsLocalization P.primeCompl S #align is_localization.at_prime IsLocalization.AtPrime /-- Given a prime ideal `P`, `Localization.AtPrime P` is a localization of `R` at the complement of `P`, as a quotient type. -/ protected abbrev Localization.AtPrime := Localization P.primeCompl #align localization.at_prime Localization.AtPrime namespace IsLocalization theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze have htz : (t : R) = 0 := by simpa using ht.symm exact t.2 (htz.symm ▸ P.zero_mem : ↑t ∈ P) #align is_localization.at_prime.nontrivial IsLocalization.AtPrime.Nontrivial theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩ rcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩ rcases mk'_surjective P.primeCompl y with ⟨ry, sy, hry⟩ rcases mk'_surjective P.primeCompl z with ⟨rz, sz, hrz⟩ rw [← hrx, ← hry, ← hrz, ← mk'_add, ← mk'_mul, ← mk'_self S P.primeCompl.one_mem] at hxyz rw [← hrx] at hx rw [← hry] at hy obtain ⟨t, ht⟩ := IsLocalization.eq.1 hxyz simp only [mul_one, one_mul, Submonoid.coe_mul, Subtype.coe_mk] at ht suffices : (t : R) * (sx * sy * sz) ∈ P exact not_or_of_not (mt hp.mem_or_mem <| not_or_of_not sx.2 sy.2) sz.2 (hp.mem_or_mem <| (hp.mem_or_mem this).resolve_left t.2)
rw [← ht]
theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩ rcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩ rcases mk'_surjective P.primeCompl y with ⟨ry, sy, hry⟩ rcases mk'_surjective P.primeCompl z with ⟨rz, sz, hrz⟩ rw [← hrx, ← hry, ← hrz, ← mk'_add, ← mk'_mul, ← mk'_self S P.primeCompl.one_mem] at hxyz rw [← hrx] at hx rw [← hry] at hy obtain ⟨t, ht⟩ := IsLocalization.eq.1 hxyz simp only [mul_one, one_mul, Submonoid.coe_mul, Subtype.coe_mk] at ht suffices : (t : R) * (sx * sy * sz) ∈ P exact not_or_of_not (mt hp.mem_or_mem <| not_or_of_not sx.2 sy.2) sz.2 (hp.mem_or_mem <| (hp.mem_or_mem this).resolve_left t.2)
Mathlib.RingTheory.Localization.AtPrime.80_0.QSwWrbtcZl7L7lq
theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S
Mathlib_RingTheory_Localization_AtPrime
case this R : Type u_1 inst✝⁴ : CommSemiring R M : Submonoid R S : Type u_2 inst✝³ : CommSemiring S inst✝² : Algebra R S P✝ : Type u_3 inst✝¹ : CommSemiring P✝ P : Ideal R hp : Ideal.IsPrime P inst✝ : IsLocalization.AtPrime S P this✝ : _root_.Nontrivial S := Nontrivial S P x y : S hu : IsUnit (x + y) z : S this : ∀ {r : R} {s : ↥(Ideal.primeCompl P)}, mk' S r s ∈ nonunits S → r ∈ P rx : R sx : ↥(Ideal.primeCompl P) hx : mk' S rx sx ∈ nonunits S hrx : mk' S rx sx = x ry : R sy : ↥(Ideal.primeCompl P) hy : mk' S ry sy ∈ nonunits S hry : mk' S ry sy = y rz : R sz : ↥(Ideal.primeCompl P) hxyz : mk' S ((rx * ↑sy + ry * ↑sx) * rz) (sx * sy * sz) = mk' S 1 { val := 1, property := (_ : 1 ∈ Ideal.primeCompl P) } hrz : mk' S rz sz = z t : ↥(Ideal.primeCompl P) ht : ↑t * ((rx * ↑sy + ry * ↑sx) * rz) = ↑t * (↑sx * ↑sy * ↑sz) ⊢ ↑t * ((rx * ↑sy + ry * ↑sx) * rz) ∈ P
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen -/ import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.Localization.Ideal #align_import ring_theory.localization.at_prime from "leanprover-community/mathlib"@"b86c528d08a52a1fdb50d999232408e1c7e85d7d" /-! # Localizations of commutative rings at the complement of a prime ideal ## Main definitions * `IsLocalization.AtPrime (P : Ideal R) [IsPrime P] (S : Type*)` expresses that `S` is a localization at (the complement of) a prime ideal `P`, as an abbreviation of `IsLocalization P.prime_compl S` ## Main results * `IsLocalization.AtPrime.localRing`: a theorem (not an instance) stating a localization at the complement of a prime ideal is a local ring ## Implementation notes See `RingTheory.Localization.Basic` for a design overview. ## Tags localization, ring localization, commutative ring localization, characteristic predicate, commutative ring, field of fractions -/ variable {R : Type*} [CommSemiring R] (M : Submonoid R) (S : Type*) [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] section AtPrime variable (P : Ideal R) [hp : P.IsPrime] namespace Ideal /-- The complement of a prime ideal `P ⊆ R` is a submonoid of `R`. -/ def primeCompl : Submonoid R where carrier := (Pᶜ : Set R) one_mem' := by convert P.ne_top_iff_one.1 hp.1 mul_mem' {x y} hnx hny hxy := Or.casesOn (hp.mem_or_mem hxy) hnx hny #align ideal.prime_compl Ideal.primeCompl theorem primeCompl_le_nonZeroDivisors [NoZeroDivisors R] : P.primeCompl ≤ nonZeroDivisors R := le_nonZeroDivisors_of_noZeroDivisors <| not_not_intro P.zero_mem #align ideal.prime_compl_le_non_zero_divisors Ideal.primeCompl_le_nonZeroDivisors end Ideal /-- Given a prime ideal `P`, the typeclass `IsLocalization.AtPrime S P` states that `S` is isomorphic to the localization of `R` at the complement of `P`. -/ protected abbrev IsLocalization.AtPrime := IsLocalization P.primeCompl S #align is_localization.at_prime IsLocalization.AtPrime /-- Given a prime ideal `P`, `Localization.AtPrime P` is a localization of `R` at the complement of `P`, as a quotient type. -/ protected abbrev Localization.AtPrime := Localization P.primeCompl #align localization.at_prime Localization.AtPrime namespace IsLocalization theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze have htz : (t : R) = 0 := by simpa using ht.symm exact t.2 (htz.symm ▸ P.zero_mem : ↑t ∈ P) #align is_localization.at_prime.nontrivial IsLocalization.AtPrime.Nontrivial theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩ rcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩ rcases mk'_surjective P.primeCompl y with ⟨ry, sy, hry⟩ rcases mk'_surjective P.primeCompl z with ⟨rz, sz, hrz⟩ rw [← hrx, ← hry, ← hrz, ← mk'_add, ← mk'_mul, ← mk'_self S P.primeCompl.one_mem] at hxyz rw [← hrx] at hx rw [← hry] at hy obtain ⟨t, ht⟩ := IsLocalization.eq.1 hxyz simp only [mul_one, one_mul, Submonoid.coe_mul, Subtype.coe_mk] at ht suffices : (t : R) * (sx * sy * sz) ∈ P exact not_or_of_not (mt hp.mem_or_mem <| not_or_of_not sx.2 sy.2) sz.2 (hp.mem_or_mem <| (hp.mem_or_mem this).resolve_left t.2) rw [← ht]
exact P.mul_mem_left _ <| P.mul_mem_right _ <| P.add_mem (P.mul_mem_right _ <| this hx) <| P.mul_mem_right _ <| this hy
theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩ rcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩ rcases mk'_surjective P.primeCompl y with ⟨ry, sy, hry⟩ rcases mk'_surjective P.primeCompl z with ⟨rz, sz, hrz⟩ rw [← hrx, ← hry, ← hrz, ← mk'_add, ← mk'_mul, ← mk'_self S P.primeCompl.one_mem] at hxyz rw [← hrx] at hx rw [← hry] at hy obtain ⟨t, ht⟩ := IsLocalization.eq.1 hxyz simp only [mul_one, one_mul, Submonoid.coe_mul, Subtype.coe_mk] at ht suffices : (t : R) * (sx * sy * sz) ∈ P exact not_or_of_not (mt hp.mem_or_mem <| not_or_of_not sx.2 sy.2) sz.2 (hp.mem_or_mem <| (hp.mem_or_mem this).resolve_left t.2) rw [← ht]
Mathlib.RingTheory.Localization.AtPrime.80_0.QSwWrbtcZl7L7lq
theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S
Mathlib_RingTheory_Localization_AtPrime
R : Type u_1 inst✝⁶ : CommSemiring R M : Submonoid R S : Type u_2 inst✝⁵ : CommSemiring S inst✝⁴ : Algebra R S P : Type u_3 inst✝³ : CommSemiring P A : Type u_4 inst✝² : CommRing A inst✝¹ : IsDomain A I : Ideal R hI : Ideal.IsPrime I inst✝ : IsLocalization.AtPrime S I x : R h : optParam (LocalRing S) (_ : LocalRing S) ⊢ (algebraMap R S) x ∉ LocalRing.maximalIdeal S ↔ x ∉ I
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen -/ import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.Localization.Ideal #align_import ring_theory.localization.at_prime from "leanprover-community/mathlib"@"b86c528d08a52a1fdb50d999232408e1c7e85d7d" /-! # Localizations of commutative rings at the complement of a prime ideal ## Main definitions * `IsLocalization.AtPrime (P : Ideal R) [IsPrime P] (S : Type*)` expresses that `S` is a localization at (the complement of) a prime ideal `P`, as an abbreviation of `IsLocalization P.prime_compl S` ## Main results * `IsLocalization.AtPrime.localRing`: a theorem (not an instance) stating a localization at the complement of a prime ideal is a local ring ## Implementation notes See `RingTheory.Localization.Basic` for a design overview. ## Tags localization, ring localization, commutative ring localization, characteristic predicate, commutative ring, field of fractions -/ variable {R : Type*} [CommSemiring R] (M : Submonoid R) (S : Type*) [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] section AtPrime variable (P : Ideal R) [hp : P.IsPrime] namespace Ideal /-- The complement of a prime ideal `P ⊆ R` is a submonoid of `R`. -/ def primeCompl : Submonoid R where carrier := (Pᶜ : Set R) one_mem' := by convert P.ne_top_iff_one.1 hp.1 mul_mem' {x y} hnx hny hxy := Or.casesOn (hp.mem_or_mem hxy) hnx hny #align ideal.prime_compl Ideal.primeCompl theorem primeCompl_le_nonZeroDivisors [NoZeroDivisors R] : P.primeCompl ≤ nonZeroDivisors R := le_nonZeroDivisors_of_noZeroDivisors <| not_not_intro P.zero_mem #align ideal.prime_compl_le_non_zero_divisors Ideal.primeCompl_le_nonZeroDivisors end Ideal /-- Given a prime ideal `P`, the typeclass `IsLocalization.AtPrime S P` states that `S` is isomorphic to the localization of `R` at the complement of `P`. -/ protected abbrev IsLocalization.AtPrime := IsLocalization P.primeCompl S #align is_localization.at_prime IsLocalization.AtPrime /-- Given a prime ideal `P`, `Localization.AtPrime P` is a localization of `R` at the complement of `P`, as a quotient type. -/ protected abbrev Localization.AtPrime := Localization P.primeCompl #align localization.at_prime Localization.AtPrime namespace IsLocalization theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze have htz : (t : R) = 0 := by simpa using ht.symm exact t.2 (htz.symm ▸ P.zero_mem : ↑t ∈ P) #align is_localization.at_prime.nontrivial IsLocalization.AtPrime.Nontrivial theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩ rcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩ rcases mk'_surjective P.primeCompl y with ⟨ry, sy, hry⟩ rcases mk'_surjective P.primeCompl z with ⟨rz, sz, hrz⟩ rw [← hrx, ← hry, ← hrz, ← mk'_add, ← mk'_mul, ← mk'_self S P.primeCompl.one_mem] at hxyz rw [← hrx] at hx rw [← hry] at hy obtain ⟨t, ht⟩ := IsLocalization.eq.1 hxyz simp only [mul_one, one_mul, Submonoid.coe_mul, Subtype.coe_mk] at ht suffices : (t : R) * (sx * sy * sz) ∈ P exact not_or_of_not (mt hp.mem_or_mem <| not_or_of_not sx.2 sy.2) sz.2 (hp.mem_or_mem <| (hp.mem_or_mem this).resolve_left t.2) rw [← ht] exact P.mul_mem_left _ <| P.mul_mem_right _ <| P.add_mem (P.mul_mem_right _ <| this hx) <| P.mul_mem_right _ <| this hy) #align is_localization.at_prime.local_ring IsLocalization.AtPrime.localRing end IsLocalization namespace Localization /-- The localization of `R` at the complement of a prime ideal is a local ring. -/ instance AtPrime.localRing : LocalRing (Localization P.primeCompl) := IsLocalization.AtPrime.localRing (Localization P.primeCompl) P #align localization.at_prime.local_ring Localization.AtPrime.localRing end Localization end AtPrime namespace IsLocalization variable {A : Type*} [CommRing A] [IsDomain A] /-- The localization of an integral domain at the complement of a prime ideal is an integral domain. -/ instance isDomain_of_local_atPrime {P : Ideal A} (_ : P.IsPrime) : IsDomain (Localization.AtPrime P) := isDomain_localization P.primeCompl_le_nonZeroDivisors #align is_localization.is_domain_of_local_at_prime IsLocalization.isDomain_of_local_atPrime namespace AtPrime variable (I : Ideal R) [hI : I.IsPrime] [IsLocalization.AtPrime S I] theorem isUnit_to_map_iff (x : R) : IsUnit ((algebraMap R S) x) ↔ x ∈ I.primeCompl := ⟨fun h hx => (isPrime_of_isPrime_disjoint I.primeCompl S I hI disjoint_compl_left).ne_top <| (Ideal.map (algebraMap R S) I).eq_top_of_isUnit_mem (Ideal.mem_map_of_mem _ hx) h, fun h => map_units S ⟨x, h⟩⟩ #align is_localization.at_prime.is_unit_to_map_iff IsLocalization.AtPrime.isUnit_to_map_iff -- Can't use typeclasses to infer the `LocalRing` instance, so use an `optParam` instead -- (since `LocalRing` is a `Prop`, there should be no unification issues.) theorem to_map_mem_maximal_iff (x : R) (h : LocalRing S := localRing S I) : algebraMap R S x ∈ LocalRing.maximalIdeal S ↔ x ∈ I := not_iff_not.mp <| by
simpa only [LocalRing.mem_maximalIdeal, mem_nonunits_iff, Classical.not_not] using isUnit_to_map_iff S I x
theorem to_map_mem_maximal_iff (x : R) (h : LocalRing S := localRing S I) : algebraMap R S x ∈ LocalRing.maximalIdeal S ↔ x ∈ I := not_iff_not.mp <| by
Mathlib.RingTheory.Localization.AtPrime.145_0.QSwWrbtcZl7L7lq
theorem to_map_mem_maximal_iff (x : R) (h : LocalRing S
Mathlib_RingTheory_Localization_AtPrime
R : Type u_1 inst✝⁶ : CommSemiring R M : Submonoid R S : Type u_2 inst✝⁵ : CommSemiring S inst✝⁴ : Algebra R S P : Type u_3 inst✝³ : CommSemiring P A : Type u_4 inst✝² : CommRing A inst✝¹ : IsDomain A I : Ideal R hI : Ideal.IsPrime I inst✝ : IsLocalization.AtPrime S I h : optParam (LocalRing S) (_ : LocalRing S) x : R ⊢ x ∈ Ideal.comap (algebraMap R S) (LocalRing.maximalIdeal S) ↔ x ∈ I
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen -/ import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.Localization.Ideal #align_import ring_theory.localization.at_prime from "leanprover-community/mathlib"@"b86c528d08a52a1fdb50d999232408e1c7e85d7d" /-! # Localizations of commutative rings at the complement of a prime ideal ## Main definitions * `IsLocalization.AtPrime (P : Ideal R) [IsPrime P] (S : Type*)` expresses that `S` is a localization at (the complement of) a prime ideal `P`, as an abbreviation of `IsLocalization P.prime_compl S` ## Main results * `IsLocalization.AtPrime.localRing`: a theorem (not an instance) stating a localization at the complement of a prime ideal is a local ring ## Implementation notes See `RingTheory.Localization.Basic` for a design overview. ## Tags localization, ring localization, commutative ring localization, characteristic predicate, commutative ring, field of fractions -/ variable {R : Type*} [CommSemiring R] (M : Submonoid R) (S : Type*) [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] section AtPrime variable (P : Ideal R) [hp : P.IsPrime] namespace Ideal /-- The complement of a prime ideal `P ⊆ R` is a submonoid of `R`. -/ def primeCompl : Submonoid R where carrier := (Pᶜ : Set R) one_mem' := by convert P.ne_top_iff_one.1 hp.1 mul_mem' {x y} hnx hny hxy := Or.casesOn (hp.mem_or_mem hxy) hnx hny #align ideal.prime_compl Ideal.primeCompl theorem primeCompl_le_nonZeroDivisors [NoZeroDivisors R] : P.primeCompl ≤ nonZeroDivisors R := le_nonZeroDivisors_of_noZeroDivisors <| not_not_intro P.zero_mem #align ideal.prime_compl_le_non_zero_divisors Ideal.primeCompl_le_nonZeroDivisors end Ideal /-- Given a prime ideal `P`, the typeclass `IsLocalization.AtPrime S P` states that `S` is isomorphic to the localization of `R` at the complement of `P`. -/ protected abbrev IsLocalization.AtPrime := IsLocalization P.primeCompl S #align is_localization.at_prime IsLocalization.AtPrime /-- Given a prime ideal `P`, `Localization.AtPrime P` is a localization of `R` at the complement of `P`, as a quotient type. -/ protected abbrev Localization.AtPrime := Localization P.primeCompl #align localization.at_prime Localization.AtPrime namespace IsLocalization theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze have htz : (t : R) = 0 := by simpa using ht.symm exact t.2 (htz.symm ▸ P.zero_mem : ↑t ∈ P) #align is_localization.at_prime.nontrivial IsLocalization.AtPrime.Nontrivial theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩ rcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩ rcases mk'_surjective P.primeCompl y with ⟨ry, sy, hry⟩ rcases mk'_surjective P.primeCompl z with ⟨rz, sz, hrz⟩ rw [← hrx, ← hry, ← hrz, ← mk'_add, ← mk'_mul, ← mk'_self S P.primeCompl.one_mem] at hxyz rw [← hrx] at hx rw [← hry] at hy obtain ⟨t, ht⟩ := IsLocalization.eq.1 hxyz simp only [mul_one, one_mul, Submonoid.coe_mul, Subtype.coe_mk] at ht suffices : (t : R) * (sx * sy * sz) ∈ P exact not_or_of_not (mt hp.mem_or_mem <| not_or_of_not sx.2 sy.2) sz.2 (hp.mem_or_mem <| (hp.mem_or_mem this).resolve_left t.2) rw [← ht] exact P.mul_mem_left _ <| P.mul_mem_right _ <| P.add_mem (P.mul_mem_right _ <| this hx) <| P.mul_mem_right _ <| this hy) #align is_localization.at_prime.local_ring IsLocalization.AtPrime.localRing end IsLocalization namespace Localization /-- The localization of `R` at the complement of a prime ideal is a local ring. -/ instance AtPrime.localRing : LocalRing (Localization P.primeCompl) := IsLocalization.AtPrime.localRing (Localization P.primeCompl) P #align localization.at_prime.local_ring Localization.AtPrime.localRing end Localization end AtPrime namespace IsLocalization variable {A : Type*} [CommRing A] [IsDomain A] /-- The localization of an integral domain at the complement of a prime ideal is an integral domain. -/ instance isDomain_of_local_atPrime {P : Ideal A} (_ : P.IsPrime) : IsDomain (Localization.AtPrime P) := isDomain_localization P.primeCompl_le_nonZeroDivisors #align is_localization.is_domain_of_local_at_prime IsLocalization.isDomain_of_local_atPrime namespace AtPrime variable (I : Ideal R) [hI : I.IsPrime] [IsLocalization.AtPrime S I] theorem isUnit_to_map_iff (x : R) : IsUnit ((algebraMap R S) x) ↔ x ∈ I.primeCompl := ⟨fun h hx => (isPrime_of_isPrime_disjoint I.primeCompl S I hI disjoint_compl_left).ne_top <| (Ideal.map (algebraMap R S) I).eq_top_of_isUnit_mem (Ideal.mem_map_of_mem _ hx) h, fun h => map_units S ⟨x, h⟩⟩ #align is_localization.at_prime.is_unit_to_map_iff IsLocalization.AtPrime.isUnit_to_map_iff -- Can't use typeclasses to infer the `LocalRing` instance, so use an `optParam` instead -- (since `LocalRing` is a `Prop`, there should be no unification issues.) theorem to_map_mem_maximal_iff (x : R) (h : LocalRing S := localRing S I) : algebraMap R S x ∈ LocalRing.maximalIdeal S ↔ x ∈ I := not_iff_not.mp <| by simpa only [LocalRing.mem_maximalIdeal, mem_nonunits_iff, Classical.not_not] using isUnit_to_map_iff S I x #align is_localization.at_prime.to_map_mem_maximal_iff IsLocalization.AtPrime.to_map_mem_maximal_iff theorem comap_maximalIdeal (h : LocalRing S := localRing S I) : (LocalRing.maximalIdeal S).comap (algebraMap R S) = I := Ideal.ext fun x => by
simpa only [Ideal.mem_comap] using to_map_mem_maximal_iff _ I x
theorem comap_maximalIdeal (h : LocalRing S := localRing S I) : (LocalRing.maximalIdeal S).comap (algebraMap R S) = I := Ideal.ext fun x => by
Mathlib.RingTheory.Localization.AtPrime.152_0.QSwWrbtcZl7L7lq
theorem comap_maximalIdeal (h : LocalRing S
Mathlib_RingTheory_Localization_AtPrime
R : Type u_1 inst✝⁶ : CommSemiring R M : Submonoid R S : Type u_2 inst✝⁵ : CommSemiring S inst✝⁴ : Algebra R S P : Type u_3 inst✝³ : CommSemiring P A : Type u_4 inst✝² : CommRing A inst✝¹ : IsDomain A I : Ideal R hI : Ideal.IsPrime I inst✝ : IsLocalization.AtPrime S I x : R y : ↥(Ideal.primeCompl I) h : optParam (LocalRing S) (_ : LocalRing S) ⊢ mk' S x y ∉ LocalRing.maximalIdeal S ↔ x ∉ I
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen -/ import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.Localization.Ideal #align_import ring_theory.localization.at_prime from "leanprover-community/mathlib"@"b86c528d08a52a1fdb50d999232408e1c7e85d7d" /-! # Localizations of commutative rings at the complement of a prime ideal ## Main definitions * `IsLocalization.AtPrime (P : Ideal R) [IsPrime P] (S : Type*)` expresses that `S` is a localization at (the complement of) a prime ideal `P`, as an abbreviation of `IsLocalization P.prime_compl S` ## Main results * `IsLocalization.AtPrime.localRing`: a theorem (not an instance) stating a localization at the complement of a prime ideal is a local ring ## Implementation notes See `RingTheory.Localization.Basic` for a design overview. ## Tags localization, ring localization, commutative ring localization, characteristic predicate, commutative ring, field of fractions -/ variable {R : Type*} [CommSemiring R] (M : Submonoid R) (S : Type*) [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] section AtPrime variable (P : Ideal R) [hp : P.IsPrime] namespace Ideal /-- The complement of a prime ideal `P ⊆ R` is a submonoid of `R`. -/ def primeCompl : Submonoid R where carrier := (Pᶜ : Set R) one_mem' := by convert P.ne_top_iff_one.1 hp.1 mul_mem' {x y} hnx hny hxy := Or.casesOn (hp.mem_or_mem hxy) hnx hny #align ideal.prime_compl Ideal.primeCompl theorem primeCompl_le_nonZeroDivisors [NoZeroDivisors R] : P.primeCompl ≤ nonZeroDivisors R := le_nonZeroDivisors_of_noZeroDivisors <| not_not_intro P.zero_mem #align ideal.prime_compl_le_non_zero_divisors Ideal.primeCompl_le_nonZeroDivisors end Ideal /-- Given a prime ideal `P`, the typeclass `IsLocalization.AtPrime S P` states that `S` is isomorphic to the localization of `R` at the complement of `P`. -/ protected abbrev IsLocalization.AtPrime := IsLocalization P.primeCompl S #align is_localization.at_prime IsLocalization.AtPrime /-- Given a prime ideal `P`, `Localization.AtPrime P` is a localization of `R` at the complement of `P`, as a quotient type. -/ protected abbrev Localization.AtPrime := Localization P.primeCompl #align localization.at_prime Localization.AtPrime namespace IsLocalization theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze have htz : (t : R) = 0 := by simpa using ht.symm exact t.2 (htz.symm ▸ P.zero_mem : ↑t ∈ P) #align is_localization.at_prime.nontrivial IsLocalization.AtPrime.Nontrivial theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩ rcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩ rcases mk'_surjective P.primeCompl y with ⟨ry, sy, hry⟩ rcases mk'_surjective P.primeCompl z with ⟨rz, sz, hrz⟩ rw [← hrx, ← hry, ← hrz, ← mk'_add, ← mk'_mul, ← mk'_self S P.primeCompl.one_mem] at hxyz rw [← hrx] at hx rw [← hry] at hy obtain ⟨t, ht⟩ := IsLocalization.eq.1 hxyz simp only [mul_one, one_mul, Submonoid.coe_mul, Subtype.coe_mk] at ht suffices : (t : R) * (sx * sy * sz) ∈ P exact not_or_of_not (mt hp.mem_or_mem <| not_or_of_not sx.2 sy.2) sz.2 (hp.mem_or_mem <| (hp.mem_or_mem this).resolve_left t.2) rw [← ht] exact P.mul_mem_left _ <| P.mul_mem_right _ <| P.add_mem (P.mul_mem_right _ <| this hx) <| P.mul_mem_right _ <| this hy) #align is_localization.at_prime.local_ring IsLocalization.AtPrime.localRing end IsLocalization namespace Localization /-- The localization of `R` at the complement of a prime ideal is a local ring. -/ instance AtPrime.localRing : LocalRing (Localization P.primeCompl) := IsLocalization.AtPrime.localRing (Localization P.primeCompl) P #align localization.at_prime.local_ring Localization.AtPrime.localRing end Localization end AtPrime namespace IsLocalization variable {A : Type*} [CommRing A] [IsDomain A] /-- The localization of an integral domain at the complement of a prime ideal is an integral domain. -/ instance isDomain_of_local_atPrime {P : Ideal A} (_ : P.IsPrime) : IsDomain (Localization.AtPrime P) := isDomain_localization P.primeCompl_le_nonZeroDivisors #align is_localization.is_domain_of_local_at_prime IsLocalization.isDomain_of_local_atPrime namespace AtPrime variable (I : Ideal R) [hI : I.IsPrime] [IsLocalization.AtPrime S I] theorem isUnit_to_map_iff (x : R) : IsUnit ((algebraMap R S) x) ↔ x ∈ I.primeCompl := ⟨fun h hx => (isPrime_of_isPrime_disjoint I.primeCompl S I hI disjoint_compl_left).ne_top <| (Ideal.map (algebraMap R S) I).eq_top_of_isUnit_mem (Ideal.mem_map_of_mem _ hx) h, fun h => map_units S ⟨x, h⟩⟩ #align is_localization.at_prime.is_unit_to_map_iff IsLocalization.AtPrime.isUnit_to_map_iff -- Can't use typeclasses to infer the `LocalRing` instance, so use an `optParam` instead -- (since `LocalRing` is a `Prop`, there should be no unification issues.) theorem to_map_mem_maximal_iff (x : R) (h : LocalRing S := localRing S I) : algebraMap R S x ∈ LocalRing.maximalIdeal S ↔ x ∈ I := not_iff_not.mp <| by simpa only [LocalRing.mem_maximalIdeal, mem_nonunits_iff, Classical.not_not] using isUnit_to_map_iff S I x #align is_localization.at_prime.to_map_mem_maximal_iff IsLocalization.AtPrime.to_map_mem_maximal_iff theorem comap_maximalIdeal (h : LocalRing S := localRing S I) : (LocalRing.maximalIdeal S).comap (algebraMap R S) = I := Ideal.ext fun x => by simpa only [Ideal.mem_comap] using to_map_mem_maximal_iff _ I x #align is_localization.at_prime.comap_maximal_ideal IsLocalization.AtPrime.comap_maximalIdeal theorem isUnit_mk'_iff (x : R) (y : I.primeCompl) : IsUnit (mk' S x y) ↔ x ∈ I.primeCompl := ⟨fun h hx => mk'_mem_iff.mpr ((to_map_mem_maximal_iff S I x).mpr hx) h, fun h => isUnit_iff_exists_inv.mpr ⟨mk' S ↑y ⟨x, h⟩, mk'_mul_mk'_eq_one ⟨x, h⟩ y⟩⟩ #align is_localization.at_prime.is_unit_mk'_iff IsLocalization.AtPrime.isUnit_mk'_iff theorem mk'_mem_maximal_iff (x : R) (y : I.primeCompl) (h : LocalRing S := localRing S I) : mk' S x y ∈ LocalRing.maximalIdeal S ↔ x ∈ I := not_iff_not.mp <| by
simpa only [LocalRing.mem_maximalIdeal, mem_nonunits_iff, Classical.not_not] using isUnit_mk'_iff S I x y
theorem mk'_mem_maximal_iff (x : R) (y : I.primeCompl) (h : LocalRing S := localRing S I) : mk' S x y ∈ LocalRing.maximalIdeal S ↔ x ∈ I := not_iff_not.mp <| by
Mathlib.RingTheory.Localization.AtPrime.162_0.QSwWrbtcZl7L7lq
theorem mk'_mem_maximal_iff (x : R) (y : I.primeCompl) (h : LocalRing S
Mathlib_RingTheory_Localization_AtPrime
R : Type u_1 inst✝³ : CommSemiring R M : Submonoid R S : Type u_2 inst✝² : CommSemiring S inst✝¹ : Algebra R S P : Type u_3 inst✝ : CommSemiring P I : Ideal R hI : Ideal.IsPrime I ⊢ Ideal.map (algebraMap R (Localization.AtPrime I)) I = LocalRing.maximalIdeal (Localization (Ideal.primeCompl I))
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen -/ import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.Localization.Ideal #align_import ring_theory.localization.at_prime from "leanprover-community/mathlib"@"b86c528d08a52a1fdb50d999232408e1c7e85d7d" /-! # Localizations of commutative rings at the complement of a prime ideal ## Main definitions * `IsLocalization.AtPrime (P : Ideal R) [IsPrime P] (S : Type*)` expresses that `S` is a localization at (the complement of) a prime ideal `P`, as an abbreviation of `IsLocalization P.prime_compl S` ## Main results * `IsLocalization.AtPrime.localRing`: a theorem (not an instance) stating a localization at the complement of a prime ideal is a local ring ## Implementation notes See `RingTheory.Localization.Basic` for a design overview. ## Tags localization, ring localization, commutative ring localization, characteristic predicate, commutative ring, field of fractions -/ variable {R : Type*} [CommSemiring R] (M : Submonoid R) (S : Type*) [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] section AtPrime variable (P : Ideal R) [hp : P.IsPrime] namespace Ideal /-- The complement of a prime ideal `P ⊆ R` is a submonoid of `R`. -/ def primeCompl : Submonoid R where carrier := (Pᶜ : Set R) one_mem' := by convert P.ne_top_iff_one.1 hp.1 mul_mem' {x y} hnx hny hxy := Or.casesOn (hp.mem_or_mem hxy) hnx hny #align ideal.prime_compl Ideal.primeCompl theorem primeCompl_le_nonZeroDivisors [NoZeroDivisors R] : P.primeCompl ≤ nonZeroDivisors R := le_nonZeroDivisors_of_noZeroDivisors <| not_not_intro P.zero_mem #align ideal.prime_compl_le_non_zero_divisors Ideal.primeCompl_le_nonZeroDivisors end Ideal /-- Given a prime ideal `P`, the typeclass `IsLocalization.AtPrime S P` states that `S` is isomorphic to the localization of `R` at the complement of `P`. -/ protected abbrev IsLocalization.AtPrime := IsLocalization P.primeCompl S #align is_localization.at_prime IsLocalization.AtPrime /-- Given a prime ideal `P`, `Localization.AtPrime P` is a localization of `R` at the complement of `P`, as a quotient type. -/ protected abbrev Localization.AtPrime := Localization P.primeCompl #align localization.at_prime Localization.AtPrime namespace IsLocalization theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze have htz : (t : R) = 0 := by simpa using ht.symm exact t.2 (htz.symm ▸ P.zero_mem : ↑t ∈ P) #align is_localization.at_prime.nontrivial IsLocalization.AtPrime.Nontrivial theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩ rcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩ rcases mk'_surjective P.primeCompl y with ⟨ry, sy, hry⟩ rcases mk'_surjective P.primeCompl z with ⟨rz, sz, hrz⟩ rw [← hrx, ← hry, ← hrz, ← mk'_add, ← mk'_mul, ← mk'_self S P.primeCompl.one_mem] at hxyz rw [← hrx] at hx rw [← hry] at hy obtain ⟨t, ht⟩ := IsLocalization.eq.1 hxyz simp only [mul_one, one_mul, Submonoid.coe_mul, Subtype.coe_mk] at ht suffices : (t : R) * (sx * sy * sz) ∈ P exact not_or_of_not (mt hp.mem_or_mem <| not_or_of_not sx.2 sy.2) sz.2 (hp.mem_or_mem <| (hp.mem_or_mem this).resolve_left t.2) rw [← ht] exact P.mul_mem_left _ <| P.mul_mem_right _ <| P.add_mem (P.mul_mem_right _ <| this hx) <| P.mul_mem_right _ <| this hy) #align is_localization.at_prime.local_ring IsLocalization.AtPrime.localRing end IsLocalization namespace Localization /-- The localization of `R` at the complement of a prime ideal is a local ring. -/ instance AtPrime.localRing : LocalRing (Localization P.primeCompl) := IsLocalization.AtPrime.localRing (Localization P.primeCompl) P #align localization.at_prime.local_ring Localization.AtPrime.localRing end Localization end AtPrime namespace IsLocalization variable {A : Type*} [CommRing A] [IsDomain A] /-- The localization of an integral domain at the complement of a prime ideal is an integral domain. -/ instance isDomain_of_local_atPrime {P : Ideal A} (_ : P.IsPrime) : IsDomain (Localization.AtPrime P) := isDomain_localization P.primeCompl_le_nonZeroDivisors #align is_localization.is_domain_of_local_at_prime IsLocalization.isDomain_of_local_atPrime namespace AtPrime variable (I : Ideal R) [hI : I.IsPrime] [IsLocalization.AtPrime S I] theorem isUnit_to_map_iff (x : R) : IsUnit ((algebraMap R S) x) ↔ x ∈ I.primeCompl := ⟨fun h hx => (isPrime_of_isPrime_disjoint I.primeCompl S I hI disjoint_compl_left).ne_top <| (Ideal.map (algebraMap R S) I).eq_top_of_isUnit_mem (Ideal.mem_map_of_mem _ hx) h, fun h => map_units S ⟨x, h⟩⟩ #align is_localization.at_prime.is_unit_to_map_iff IsLocalization.AtPrime.isUnit_to_map_iff -- Can't use typeclasses to infer the `LocalRing` instance, so use an `optParam` instead -- (since `LocalRing` is a `Prop`, there should be no unification issues.) theorem to_map_mem_maximal_iff (x : R) (h : LocalRing S := localRing S I) : algebraMap R S x ∈ LocalRing.maximalIdeal S ↔ x ∈ I := not_iff_not.mp <| by simpa only [LocalRing.mem_maximalIdeal, mem_nonunits_iff, Classical.not_not] using isUnit_to_map_iff S I x #align is_localization.at_prime.to_map_mem_maximal_iff IsLocalization.AtPrime.to_map_mem_maximal_iff theorem comap_maximalIdeal (h : LocalRing S := localRing S I) : (LocalRing.maximalIdeal S).comap (algebraMap R S) = I := Ideal.ext fun x => by simpa only [Ideal.mem_comap] using to_map_mem_maximal_iff _ I x #align is_localization.at_prime.comap_maximal_ideal IsLocalization.AtPrime.comap_maximalIdeal theorem isUnit_mk'_iff (x : R) (y : I.primeCompl) : IsUnit (mk' S x y) ↔ x ∈ I.primeCompl := ⟨fun h hx => mk'_mem_iff.mpr ((to_map_mem_maximal_iff S I x).mpr hx) h, fun h => isUnit_iff_exists_inv.mpr ⟨mk' S ↑y ⟨x, h⟩, mk'_mul_mk'_eq_one ⟨x, h⟩ y⟩⟩ #align is_localization.at_prime.is_unit_mk'_iff IsLocalization.AtPrime.isUnit_mk'_iff theorem mk'_mem_maximal_iff (x : R) (y : I.primeCompl) (h : LocalRing S := localRing S I) : mk' S x y ∈ LocalRing.maximalIdeal S ↔ x ∈ I := not_iff_not.mp <| by simpa only [LocalRing.mem_maximalIdeal, mem_nonunits_iff, Classical.not_not] using isUnit_mk'_iff S I x y #align is_localization.at_prime.mk'_mem_maximal_iff IsLocalization.AtPrime.mk'_mem_maximal_iff end AtPrime end IsLocalization namespace Localization open IsLocalization attribute [local instance] Classical.propDecidable variable (I : Ideal R) [hI : I.IsPrime] variable {I} /-- The unique maximal ideal of the localization at `I.primeCompl` lies over the ideal `I`. -/ theorem AtPrime.comap_maximalIdeal : Ideal.comap (algebraMap R (Localization.AtPrime I)) (LocalRing.maximalIdeal (Localization I.primeCompl)) = I := -- Porting Note : need to provide full name IsLocalization.AtPrime.comap_maximalIdeal _ _ #align localization.at_prime.comap_maximal_ideal Localization.AtPrime.comap_maximalIdeal /-- The image of `I` in the localization at `I.primeCompl` is a maximal ideal, and in particular it is the unique maximal ideal given by the local ring structure `AtPrime.localRing` -/ theorem AtPrime.map_eq_maximalIdeal : Ideal.map (algebraMap R (Localization.AtPrime I)) I = LocalRing.maximalIdeal (Localization I.primeCompl) := by
convert congr_arg (Ideal.map (algebraMap R (Localization.AtPrime I))) -- Porting Note : `algebraMap R ...` can not be solve by unification (AtPrime.comap_maximalIdeal (hI := hI)).symm
/-- The image of `I` in the localization at `I.primeCompl` is a maximal ideal, and in particular it is the unique maximal ideal given by the local ring structure `AtPrime.localRing` -/ theorem AtPrime.map_eq_maximalIdeal : Ideal.map (algebraMap R (Localization.AtPrime I)) I = LocalRing.maximalIdeal (Localization I.primeCompl) := by
Mathlib.RingTheory.Localization.AtPrime.192_0.QSwWrbtcZl7L7lq
/-- The image of `I` in the localization at `I.primeCompl` is a maximal ideal, and in particular it is the unique maximal ideal given by the local ring structure `AtPrime.localRing` -/ theorem AtPrime.map_eq_maximalIdeal : Ideal.map (algebraMap R (Localization.AtPrime I)) I = LocalRing.maximalIdeal (Localization I.primeCompl)
Mathlib_RingTheory_Localization_AtPrime
case h.e'_3 R : Type u_1 inst✝³ : CommSemiring R M : Submonoid R S : Type u_2 inst✝² : CommSemiring S inst✝¹ : Algebra R S P : Type u_3 inst✝ : CommSemiring P I : Ideal R hI : Ideal.IsPrime I ⊢ LocalRing.maximalIdeal (Localization (Ideal.primeCompl I)) = Ideal.map (algebraMap R (Localization.AtPrime I)) (Ideal.comap (algebraMap R (Localization.AtPrime I)) (LocalRing.maximalIdeal (Localization (Ideal.primeCompl I))))
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen -/ import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.Localization.Ideal #align_import ring_theory.localization.at_prime from "leanprover-community/mathlib"@"b86c528d08a52a1fdb50d999232408e1c7e85d7d" /-! # Localizations of commutative rings at the complement of a prime ideal ## Main definitions * `IsLocalization.AtPrime (P : Ideal R) [IsPrime P] (S : Type*)` expresses that `S` is a localization at (the complement of) a prime ideal `P`, as an abbreviation of `IsLocalization P.prime_compl S` ## Main results * `IsLocalization.AtPrime.localRing`: a theorem (not an instance) stating a localization at the complement of a prime ideal is a local ring ## Implementation notes See `RingTheory.Localization.Basic` for a design overview. ## Tags localization, ring localization, commutative ring localization, characteristic predicate, commutative ring, field of fractions -/ variable {R : Type*} [CommSemiring R] (M : Submonoid R) (S : Type*) [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] section AtPrime variable (P : Ideal R) [hp : P.IsPrime] namespace Ideal /-- The complement of a prime ideal `P ⊆ R` is a submonoid of `R`. -/ def primeCompl : Submonoid R where carrier := (Pᶜ : Set R) one_mem' := by convert P.ne_top_iff_one.1 hp.1 mul_mem' {x y} hnx hny hxy := Or.casesOn (hp.mem_or_mem hxy) hnx hny #align ideal.prime_compl Ideal.primeCompl theorem primeCompl_le_nonZeroDivisors [NoZeroDivisors R] : P.primeCompl ≤ nonZeroDivisors R := le_nonZeroDivisors_of_noZeroDivisors <| not_not_intro P.zero_mem #align ideal.prime_compl_le_non_zero_divisors Ideal.primeCompl_le_nonZeroDivisors end Ideal /-- Given a prime ideal `P`, the typeclass `IsLocalization.AtPrime S P` states that `S` is isomorphic to the localization of `R` at the complement of `P`. -/ protected abbrev IsLocalization.AtPrime := IsLocalization P.primeCompl S #align is_localization.at_prime IsLocalization.AtPrime /-- Given a prime ideal `P`, `Localization.AtPrime P` is a localization of `R` at the complement of `P`, as a quotient type. -/ protected abbrev Localization.AtPrime := Localization P.primeCompl #align localization.at_prime Localization.AtPrime namespace IsLocalization theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze have htz : (t : R) = 0 := by simpa using ht.symm exact t.2 (htz.symm ▸ P.zero_mem : ↑t ∈ P) #align is_localization.at_prime.nontrivial IsLocalization.AtPrime.Nontrivial theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩ rcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩ rcases mk'_surjective P.primeCompl y with ⟨ry, sy, hry⟩ rcases mk'_surjective P.primeCompl z with ⟨rz, sz, hrz⟩ rw [← hrx, ← hry, ← hrz, ← mk'_add, ← mk'_mul, ← mk'_self S P.primeCompl.one_mem] at hxyz rw [← hrx] at hx rw [← hry] at hy obtain ⟨t, ht⟩ := IsLocalization.eq.1 hxyz simp only [mul_one, one_mul, Submonoid.coe_mul, Subtype.coe_mk] at ht suffices : (t : R) * (sx * sy * sz) ∈ P exact not_or_of_not (mt hp.mem_or_mem <| not_or_of_not sx.2 sy.2) sz.2 (hp.mem_or_mem <| (hp.mem_or_mem this).resolve_left t.2) rw [← ht] exact P.mul_mem_left _ <| P.mul_mem_right _ <| P.add_mem (P.mul_mem_right _ <| this hx) <| P.mul_mem_right _ <| this hy) #align is_localization.at_prime.local_ring IsLocalization.AtPrime.localRing end IsLocalization namespace Localization /-- The localization of `R` at the complement of a prime ideal is a local ring. -/ instance AtPrime.localRing : LocalRing (Localization P.primeCompl) := IsLocalization.AtPrime.localRing (Localization P.primeCompl) P #align localization.at_prime.local_ring Localization.AtPrime.localRing end Localization end AtPrime namespace IsLocalization variable {A : Type*} [CommRing A] [IsDomain A] /-- The localization of an integral domain at the complement of a prime ideal is an integral domain. -/ instance isDomain_of_local_atPrime {P : Ideal A} (_ : P.IsPrime) : IsDomain (Localization.AtPrime P) := isDomain_localization P.primeCompl_le_nonZeroDivisors #align is_localization.is_domain_of_local_at_prime IsLocalization.isDomain_of_local_atPrime namespace AtPrime variable (I : Ideal R) [hI : I.IsPrime] [IsLocalization.AtPrime S I] theorem isUnit_to_map_iff (x : R) : IsUnit ((algebraMap R S) x) ↔ x ∈ I.primeCompl := ⟨fun h hx => (isPrime_of_isPrime_disjoint I.primeCompl S I hI disjoint_compl_left).ne_top <| (Ideal.map (algebraMap R S) I).eq_top_of_isUnit_mem (Ideal.mem_map_of_mem _ hx) h, fun h => map_units S ⟨x, h⟩⟩ #align is_localization.at_prime.is_unit_to_map_iff IsLocalization.AtPrime.isUnit_to_map_iff -- Can't use typeclasses to infer the `LocalRing` instance, so use an `optParam` instead -- (since `LocalRing` is a `Prop`, there should be no unification issues.) theorem to_map_mem_maximal_iff (x : R) (h : LocalRing S := localRing S I) : algebraMap R S x ∈ LocalRing.maximalIdeal S ↔ x ∈ I := not_iff_not.mp <| by simpa only [LocalRing.mem_maximalIdeal, mem_nonunits_iff, Classical.not_not] using isUnit_to_map_iff S I x #align is_localization.at_prime.to_map_mem_maximal_iff IsLocalization.AtPrime.to_map_mem_maximal_iff theorem comap_maximalIdeal (h : LocalRing S := localRing S I) : (LocalRing.maximalIdeal S).comap (algebraMap R S) = I := Ideal.ext fun x => by simpa only [Ideal.mem_comap] using to_map_mem_maximal_iff _ I x #align is_localization.at_prime.comap_maximal_ideal IsLocalization.AtPrime.comap_maximalIdeal theorem isUnit_mk'_iff (x : R) (y : I.primeCompl) : IsUnit (mk' S x y) ↔ x ∈ I.primeCompl := ⟨fun h hx => mk'_mem_iff.mpr ((to_map_mem_maximal_iff S I x).mpr hx) h, fun h => isUnit_iff_exists_inv.mpr ⟨mk' S ↑y ⟨x, h⟩, mk'_mul_mk'_eq_one ⟨x, h⟩ y⟩⟩ #align is_localization.at_prime.is_unit_mk'_iff IsLocalization.AtPrime.isUnit_mk'_iff theorem mk'_mem_maximal_iff (x : R) (y : I.primeCompl) (h : LocalRing S := localRing S I) : mk' S x y ∈ LocalRing.maximalIdeal S ↔ x ∈ I := not_iff_not.mp <| by simpa only [LocalRing.mem_maximalIdeal, mem_nonunits_iff, Classical.not_not] using isUnit_mk'_iff S I x y #align is_localization.at_prime.mk'_mem_maximal_iff IsLocalization.AtPrime.mk'_mem_maximal_iff end AtPrime end IsLocalization namespace Localization open IsLocalization attribute [local instance] Classical.propDecidable variable (I : Ideal R) [hI : I.IsPrime] variable {I} /-- The unique maximal ideal of the localization at `I.primeCompl` lies over the ideal `I`. -/ theorem AtPrime.comap_maximalIdeal : Ideal.comap (algebraMap R (Localization.AtPrime I)) (LocalRing.maximalIdeal (Localization I.primeCompl)) = I := -- Porting Note : need to provide full name IsLocalization.AtPrime.comap_maximalIdeal _ _ #align localization.at_prime.comap_maximal_ideal Localization.AtPrime.comap_maximalIdeal /-- The image of `I` in the localization at `I.primeCompl` is a maximal ideal, and in particular it is the unique maximal ideal given by the local ring structure `AtPrime.localRing` -/ theorem AtPrime.map_eq_maximalIdeal : Ideal.map (algebraMap R (Localization.AtPrime I)) I = LocalRing.maximalIdeal (Localization I.primeCompl) := by convert congr_arg (Ideal.map (algebraMap R (Localization.AtPrime I))) -- Porting Note : `algebraMap R ...` can not be solve by unification (AtPrime.comap_maximalIdeal (hI := hI)).symm -- Porting Note : can not find `hI`
rw [map_comap I.primeCompl]
/-- The image of `I` in the localization at `I.primeCompl` is a maximal ideal, and in particular it is the unique maximal ideal given by the local ring structure `AtPrime.localRing` -/ theorem AtPrime.map_eq_maximalIdeal : Ideal.map (algebraMap R (Localization.AtPrime I)) I = LocalRing.maximalIdeal (Localization I.primeCompl) := by convert congr_arg (Ideal.map (algebraMap R (Localization.AtPrime I))) -- Porting Note : `algebraMap R ...` can not be solve by unification (AtPrime.comap_maximalIdeal (hI := hI)).symm -- Porting Note : can not find `hI`
Mathlib.RingTheory.Localization.AtPrime.192_0.QSwWrbtcZl7L7lq
/-- The image of `I` in the localization at `I.primeCompl` is a maximal ideal, and in particular it is the unique maximal ideal given by the local ring structure `AtPrime.localRing` -/ theorem AtPrime.map_eq_maximalIdeal : Ideal.map (algebraMap R (Localization.AtPrime I)) I = LocalRing.maximalIdeal (Localization I.primeCompl)
Mathlib_RingTheory_Localization_AtPrime
R : Type u_1 inst✝³ : CommSemiring R M : Submonoid R S : Type u_2 inst✝² : CommSemiring S inst✝¹ : Algebra R S P : Type u_3 inst✝ : CommSemiring P I : Ideal R hI : Ideal.IsPrime I J : Ideal P hJ : Ideal.IsPrime J f : R →+* P h : Ideal.primeCompl I ≤ Submonoid.comap f (Ideal.primeCompl J) x : R hx : x ∈ Ideal.comap f J ⊢ x ∈ I
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen -/ import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.Localization.Ideal #align_import ring_theory.localization.at_prime from "leanprover-community/mathlib"@"b86c528d08a52a1fdb50d999232408e1c7e85d7d" /-! # Localizations of commutative rings at the complement of a prime ideal ## Main definitions * `IsLocalization.AtPrime (P : Ideal R) [IsPrime P] (S : Type*)` expresses that `S` is a localization at (the complement of) a prime ideal `P`, as an abbreviation of `IsLocalization P.prime_compl S` ## Main results * `IsLocalization.AtPrime.localRing`: a theorem (not an instance) stating a localization at the complement of a prime ideal is a local ring ## Implementation notes See `RingTheory.Localization.Basic` for a design overview. ## Tags localization, ring localization, commutative ring localization, characteristic predicate, commutative ring, field of fractions -/ variable {R : Type*} [CommSemiring R] (M : Submonoid R) (S : Type*) [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] section AtPrime variable (P : Ideal R) [hp : P.IsPrime] namespace Ideal /-- The complement of a prime ideal `P ⊆ R` is a submonoid of `R`. -/ def primeCompl : Submonoid R where carrier := (Pᶜ : Set R) one_mem' := by convert P.ne_top_iff_one.1 hp.1 mul_mem' {x y} hnx hny hxy := Or.casesOn (hp.mem_or_mem hxy) hnx hny #align ideal.prime_compl Ideal.primeCompl theorem primeCompl_le_nonZeroDivisors [NoZeroDivisors R] : P.primeCompl ≤ nonZeroDivisors R := le_nonZeroDivisors_of_noZeroDivisors <| not_not_intro P.zero_mem #align ideal.prime_compl_le_non_zero_divisors Ideal.primeCompl_le_nonZeroDivisors end Ideal /-- Given a prime ideal `P`, the typeclass `IsLocalization.AtPrime S P` states that `S` is isomorphic to the localization of `R` at the complement of `P`. -/ protected abbrev IsLocalization.AtPrime := IsLocalization P.primeCompl S #align is_localization.at_prime IsLocalization.AtPrime /-- Given a prime ideal `P`, `Localization.AtPrime P` is a localization of `R` at the complement of `P`, as a quotient type. -/ protected abbrev Localization.AtPrime := Localization P.primeCompl #align localization.at_prime Localization.AtPrime namespace IsLocalization theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze have htz : (t : R) = 0 := by simpa using ht.symm exact t.2 (htz.symm ▸ P.zero_mem : ↑t ∈ P) #align is_localization.at_prime.nontrivial IsLocalization.AtPrime.Nontrivial theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩ rcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩ rcases mk'_surjective P.primeCompl y with ⟨ry, sy, hry⟩ rcases mk'_surjective P.primeCompl z with ⟨rz, sz, hrz⟩ rw [← hrx, ← hry, ← hrz, ← mk'_add, ← mk'_mul, ← mk'_self S P.primeCompl.one_mem] at hxyz rw [← hrx] at hx rw [← hry] at hy obtain ⟨t, ht⟩ := IsLocalization.eq.1 hxyz simp only [mul_one, one_mul, Submonoid.coe_mul, Subtype.coe_mk] at ht suffices : (t : R) * (sx * sy * sz) ∈ P exact not_or_of_not (mt hp.mem_or_mem <| not_or_of_not sx.2 sy.2) sz.2 (hp.mem_or_mem <| (hp.mem_or_mem this).resolve_left t.2) rw [← ht] exact P.mul_mem_left _ <| P.mul_mem_right _ <| P.add_mem (P.mul_mem_right _ <| this hx) <| P.mul_mem_right _ <| this hy) #align is_localization.at_prime.local_ring IsLocalization.AtPrime.localRing end IsLocalization namespace Localization /-- The localization of `R` at the complement of a prime ideal is a local ring. -/ instance AtPrime.localRing : LocalRing (Localization P.primeCompl) := IsLocalization.AtPrime.localRing (Localization P.primeCompl) P #align localization.at_prime.local_ring Localization.AtPrime.localRing end Localization end AtPrime namespace IsLocalization variable {A : Type*} [CommRing A] [IsDomain A] /-- The localization of an integral domain at the complement of a prime ideal is an integral domain. -/ instance isDomain_of_local_atPrime {P : Ideal A} (_ : P.IsPrime) : IsDomain (Localization.AtPrime P) := isDomain_localization P.primeCompl_le_nonZeroDivisors #align is_localization.is_domain_of_local_at_prime IsLocalization.isDomain_of_local_atPrime namespace AtPrime variable (I : Ideal R) [hI : I.IsPrime] [IsLocalization.AtPrime S I] theorem isUnit_to_map_iff (x : R) : IsUnit ((algebraMap R S) x) ↔ x ∈ I.primeCompl := ⟨fun h hx => (isPrime_of_isPrime_disjoint I.primeCompl S I hI disjoint_compl_left).ne_top <| (Ideal.map (algebraMap R S) I).eq_top_of_isUnit_mem (Ideal.mem_map_of_mem _ hx) h, fun h => map_units S ⟨x, h⟩⟩ #align is_localization.at_prime.is_unit_to_map_iff IsLocalization.AtPrime.isUnit_to_map_iff -- Can't use typeclasses to infer the `LocalRing` instance, so use an `optParam` instead -- (since `LocalRing` is a `Prop`, there should be no unification issues.) theorem to_map_mem_maximal_iff (x : R) (h : LocalRing S := localRing S I) : algebraMap R S x ∈ LocalRing.maximalIdeal S ↔ x ∈ I := not_iff_not.mp <| by simpa only [LocalRing.mem_maximalIdeal, mem_nonunits_iff, Classical.not_not] using isUnit_to_map_iff S I x #align is_localization.at_prime.to_map_mem_maximal_iff IsLocalization.AtPrime.to_map_mem_maximal_iff theorem comap_maximalIdeal (h : LocalRing S := localRing S I) : (LocalRing.maximalIdeal S).comap (algebraMap R S) = I := Ideal.ext fun x => by simpa only [Ideal.mem_comap] using to_map_mem_maximal_iff _ I x #align is_localization.at_prime.comap_maximal_ideal IsLocalization.AtPrime.comap_maximalIdeal theorem isUnit_mk'_iff (x : R) (y : I.primeCompl) : IsUnit (mk' S x y) ↔ x ∈ I.primeCompl := ⟨fun h hx => mk'_mem_iff.mpr ((to_map_mem_maximal_iff S I x).mpr hx) h, fun h => isUnit_iff_exists_inv.mpr ⟨mk' S ↑y ⟨x, h⟩, mk'_mul_mk'_eq_one ⟨x, h⟩ y⟩⟩ #align is_localization.at_prime.is_unit_mk'_iff IsLocalization.AtPrime.isUnit_mk'_iff theorem mk'_mem_maximal_iff (x : R) (y : I.primeCompl) (h : LocalRing S := localRing S I) : mk' S x y ∈ LocalRing.maximalIdeal S ↔ x ∈ I := not_iff_not.mp <| by simpa only [LocalRing.mem_maximalIdeal, mem_nonunits_iff, Classical.not_not] using isUnit_mk'_iff S I x y #align is_localization.at_prime.mk'_mem_maximal_iff IsLocalization.AtPrime.mk'_mem_maximal_iff end AtPrime end IsLocalization namespace Localization open IsLocalization attribute [local instance] Classical.propDecidable variable (I : Ideal R) [hI : I.IsPrime] variable {I} /-- The unique maximal ideal of the localization at `I.primeCompl` lies over the ideal `I`. -/ theorem AtPrime.comap_maximalIdeal : Ideal.comap (algebraMap R (Localization.AtPrime I)) (LocalRing.maximalIdeal (Localization I.primeCompl)) = I := -- Porting Note : need to provide full name IsLocalization.AtPrime.comap_maximalIdeal _ _ #align localization.at_prime.comap_maximal_ideal Localization.AtPrime.comap_maximalIdeal /-- The image of `I` in the localization at `I.primeCompl` is a maximal ideal, and in particular it is the unique maximal ideal given by the local ring structure `AtPrime.localRing` -/ theorem AtPrime.map_eq_maximalIdeal : Ideal.map (algebraMap R (Localization.AtPrime I)) I = LocalRing.maximalIdeal (Localization I.primeCompl) := by convert congr_arg (Ideal.map (algebraMap R (Localization.AtPrime I))) -- Porting Note : `algebraMap R ...` can not be solve by unification (AtPrime.comap_maximalIdeal (hI := hI)).symm -- Porting Note : can not find `hI` rw [map_comap I.primeCompl] #align localization.at_prime.map_eq_maximal_ideal Localization.AtPrime.map_eq_maximalIdeal theorem le_comap_primeCompl_iff {J : Ideal P} [hJ : J.IsPrime] {f : R →+* P} : I.primeCompl ≤ J.primeCompl.comap f ↔ J.comap f ≤ I := ⟨fun h x hx => by
contrapose! hx
theorem le_comap_primeCompl_iff {J : Ideal P} [hJ : J.IsPrime] {f : R →+* P} : I.primeCompl ≤ J.primeCompl.comap f ↔ J.comap f ≤ I := ⟨fun h x hx => by
Mathlib.RingTheory.Localization.AtPrime.204_0.QSwWrbtcZl7L7lq
theorem le_comap_primeCompl_iff {J : Ideal P} [hJ : J.IsPrime] {f : R →+* P} : I.primeCompl ≤ J.primeCompl.comap f ↔ J.comap f ≤ I
Mathlib_RingTheory_Localization_AtPrime
R : Type u_1 inst✝³ : CommSemiring R M : Submonoid R S : Type u_2 inst✝² : CommSemiring S inst✝¹ : Algebra R S P : Type u_3 inst✝ : CommSemiring P I : Ideal R hI : Ideal.IsPrime I J : Ideal P hJ : Ideal.IsPrime J f : R →+* P h : Ideal.primeCompl I ≤ Submonoid.comap f (Ideal.primeCompl J) x : R hx : x ∉ I ⊢ x ∉ Ideal.comap f J
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen -/ import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.Localization.Ideal #align_import ring_theory.localization.at_prime from "leanprover-community/mathlib"@"b86c528d08a52a1fdb50d999232408e1c7e85d7d" /-! # Localizations of commutative rings at the complement of a prime ideal ## Main definitions * `IsLocalization.AtPrime (P : Ideal R) [IsPrime P] (S : Type*)` expresses that `S` is a localization at (the complement of) a prime ideal `P`, as an abbreviation of `IsLocalization P.prime_compl S` ## Main results * `IsLocalization.AtPrime.localRing`: a theorem (not an instance) stating a localization at the complement of a prime ideal is a local ring ## Implementation notes See `RingTheory.Localization.Basic` for a design overview. ## Tags localization, ring localization, commutative ring localization, characteristic predicate, commutative ring, field of fractions -/ variable {R : Type*} [CommSemiring R] (M : Submonoid R) (S : Type*) [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] section AtPrime variable (P : Ideal R) [hp : P.IsPrime] namespace Ideal /-- The complement of a prime ideal `P ⊆ R` is a submonoid of `R`. -/ def primeCompl : Submonoid R where carrier := (Pᶜ : Set R) one_mem' := by convert P.ne_top_iff_one.1 hp.1 mul_mem' {x y} hnx hny hxy := Or.casesOn (hp.mem_or_mem hxy) hnx hny #align ideal.prime_compl Ideal.primeCompl theorem primeCompl_le_nonZeroDivisors [NoZeroDivisors R] : P.primeCompl ≤ nonZeroDivisors R := le_nonZeroDivisors_of_noZeroDivisors <| not_not_intro P.zero_mem #align ideal.prime_compl_le_non_zero_divisors Ideal.primeCompl_le_nonZeroDivisors end Ideal /-- Given a prime ideal `P`, the typeclass `IsLocalization.AtPrime S P` states that `S` is isomorphic to the localization of `R` at the complement of `P`. -/ protected abbrev IsLocalization.AtPrime := IsLocalization P.primeCompl S #align is_localization.at_prime IsLocalization.AtPrime /-- Given a prime ideal `P`, `Localization.AtPrime P` is a localization of `R` at the complement of `P`, as a quotient type. -/ protected abbrev Localization.AtPrime := Localization P.primeCompl #align localization.at_prime Localization.AtPrime namespace IsLocalization theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze have htz : (t : R) = 0 := by simpa using ht.symm exact t.2 (htz.symm ▸ P.zero_mem : ↑t ∈ P) #align is_localization.at_prime.nontrivial IsLocalization.AtPrime.Nontrivial theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩ rcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩ rcases mk'_surjective P.primeCompl y with ⟨ry, sy, hry⟩ rcases mk'_surjective P.primeCompl z with ⟨rz, sz, hrz⟩ rw [← hrx, ← hry, ← hrz, ← mk'_add, ← mk'_mul, ← mk'_self S P.primeCompl.one_mem] at hxyz rw [← hrx] at hx rw [← hry] at hy obtain ⟨t, ht⟩ := IsLocalization.eq.1 hxyz simp only [mul_one, one_mul, Submonoid.coe_mul, Subtype.coe_mk] at ht suffices : (t : R) * (sx * sy * sz) ∈ P exact not_or_of_not (mt hp.mem_or_mem <| not_or_of_not sx.2 sy.2) sz.2 (hp.mem_or_mem <| (hp.mem_or_mem this).resolve_left t.2) rw [← ht] exact P.mul_mem_left _ <| P.mul_mem_right _ <| P.add_mem (P.mul_mem_right _ <| this hx) <| P.mul_mem_right _ <| this hy) #align is_localization.at_prime.local_ring IsLocalization.AtPrime.localRing end IsLocalization namespace Localization /-- The localization of `R` at the complement of a prime ideal is a local ring. -/ instance AtPrime.localRing : LocalRing (Localization P.primeCompl) := IsLocalization.AtPrime.localRing (Localization P.primeCompl) P #align localization.at_prime.local_ring Localization.AtPrime.localRing end Localization end AtPrime namespace IsLocalization variable {A : Type*} [CommRing A] [IsDomain A] /-- The localization of an integral domain at the complement of a prime ideal is an integral domain. -/ instance isDomain_of_local_atPrime {P : Ideal A} (_ : P.IsPrime) : IsDomain (Localization.AtPrime P) := isDomain_localization P.primeCompl_le_nonZeroDivisors #align is_localization.is_domain_of_local_at_prime IsLocalization.isDomain_of_local_atPrime namespace AtPrime variable (I : Ideal R) [hI : I.IsPrime] [IsLocalization.AtPrime S I] theorem isUnit_to_map_iff (x : R) : IsUnit ((algebraMap R S) x) ↔ x ∈ I.primeCompl := ⟨fun h hx => (isPrime_of_isPrime_disjoint I.primeCompl S I hI disjoint_compl_left).ne_top <| (Ideal.map (algebraMap R S) I).eq_top_of_isUnit_mem (Ideal.mem_map_of_mem _ hx) h, fun h => map_units S ⟨x, h⟩⟩ #align is_localization.at_prime.is_unit_to_map_iff IsLocalization.AtPrime.isUnit_to_map_iff -- Can't use typeclasses to infer the `LocalRing` instance, so use an `optParam` instead -- (since `LocalRing` is a `Prop`, there should be no unification issues.) theorem to_map_mem_maximal_iff (x : R) (h : LocalRing S := localRing S I) : algebraMap R S x ∈ LocalRing.maximalIdeal S ↔ x ∈ I := not_iff_not.mp <| by simpa only [LocalRing.mem_maximalIdeal, mem_nonunits_iff, Classical.not_not] using isUnit_to_map_iff S I x #align is_localization.at_prime.to_map_mem_maximal_iff IsLocalization.AtPrime.to_map_mem_maximal_iff theorem comap_maximalIdeal (h : LocalRing S := localRing S I) : (LocalRing.maximalIdeal S).comap (algebraMap R S) = I := Ideal.ext fun x => by simpa only [Ideal.mem_comap] using to_map_mem_maximal_iff _ I x #align is_localization.at_prime.comap_maximal_ideal IsLocalization.AtPrime.comap_maximalIdeal theorem isUnit_mk'_iff (x : R) (y : I.primeCompl) : IsUnit (mk' S x y) ↔ x ∈ I.primeCompl := ⟨fun h hx => mk'_mem_iff.mpr ((to_map_mem_maximal_iff S I x).mpr hx) h, fun h => isUnit_iff_exists_inv.mpr ⟨mk' S ↑y ⟨x, h⟩, mk'_mul_mk'_eq_one ⟨x, h⟩ y⟩⟩ #align is_localization.at_prime.is_unit_mk'_iff IsLocalization.AtPrime.isUnit_mk'_iff theorem mk'_mem_maximal_iff (x : R) (y : I.primeCompl) (h : LocalRing S := localRing S I) : mk' S x y ∈ LocalRing.maximalIdeal S ↔ x ∈ I := not_iff_not.mp <| by simpa only [LocalRing.mem_maximalIdeal, mem_nonunits_iff, Classical.not_not] using isUnit_mk'_iff S I x y #align is_localization.at_prime.mk'_mem_maximal_iff IsLocalization.AtPrime.mk'_mem_maximal_iff end AtPrime end IsLocalization namespace Localization open IsLocalization attribute [local instance] Classical.propDecidable variable (I : Ideal R) [hI : I.IsPrime] variable {I} /-- The unique maximal ideal of the localization at `I.primeCompl` lies over the ideal `I`. -/ theorem AtPrime.comap_maximalIdeal : Ideal.comap (algebraMap R (Localization.AtPrime I)) (LocalRing.maximalIdeal (Localization I.primeCompl)) = I := -- Porting Note : need to provide full name IsLocalization.AtPrime.comap_maximalIdeal _ _ #align localization.at_prime.comap_maximal_ideal Localization.AtPrime.comap_maximalIdeal /-- The image of `I` in the localization at `I.primeCompl` is a maximal ideal, and in particular it is the unique maximal ideal given by the local ring structure `AtPrime.localRing` -/ theorem AtPrime.map_eq_maximalIdeal : Ideal.map (algebraMap R (Localization.AtPrime I)) I = LocalRing.maximalIdeal (Localization I.primeCompl) := by convert congr_arg (Ideal.map (algebraMap R (Localization.AtPrime I))) -- Porting Note : `algebraMap R ...` can not be solve by unification (AtPrime.comap_maximalIdeal (hI := hI)).symm -- Porting Note : can not find `hI` rw [map_comap I.primeCompl] #align localization.at_prime.map_eq_maximal_ideal Localization.AtPrime.map_eq_maximalIdeal theorem le_comap_primeCompl_iff {J : Ideal P} [hJ : J.IsPrime] {f : R →+* P} : I.primeCompl ≤ J.primeCompl.comap f ↔ J.comap f ≤ I := ⟨fun h x hx => by contrapose! hx
exact h hx
theorem le_comap_primeCompl_iff {J : Ideal P} [hJ : J.IsPrime] {f : R →+* P} : I.primeCompl ≤ J.primeCompl.comap f ↔ J.comap f ≤ I := ⟨fun h x hx => by contrapose! hx
Mathlib.RingTheory.Localization.AtPrime.204_0.QSwWrbtcZl7L7lq
theorem le_comap_primeCompl_iff {J : Ideal P} [hJ : J.IsPrime] {f : R →+* P} : I.primeCompl ≤ J.primeCompl.comap f ↔ J.comap f ≤ I
Mathlib_RingTheory_Localization_AtPrime
R : Type u_1 inst✝³ : CommSemiring R M : Submonoid R S : Type u_2 inst✝² : CommSemiring S inst✝¹ : Algebra R S P : Type u_3 inst✝ : CommSemiring P I : Ideal R hI : Ideal.IsPrime I J : Ideal P hJ : Ideal.IsPrime J f : R →+* P hIJ : I = Ideal.comap f J x : Localization.AtPrime I hx : IsUnit ((localRingHom I J f hIJ) x) ⊢ IsUnit x
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen -/ import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.Localization.Ideal #align_import ring_theory.localization.at_prime from "leanprover-community/mathlib"@"b86c528d08a52a1fdb50d999232408e1c7e85d7d" /-! # Localizations of commutative rings at the complement of a prime ideal ## Main definitions * `IsLocalization.AtPrime (P : Ideal R) [IsPrime P] (S : Type*)` expresses that `S` is a localization at (the complement of) a prime ideal `P`, as an abbreviation of `IsLocalization P.prime_compl S` ## Main results * `IsLocalization.AtPrime.localRing`: a theorem (not an instance) stating a localization at the complement of a prime ideal is a local ring ## Implementation notes See `RingTheory.Localization.Basic` for a design overview. ## Tags localization, ring localization, commutative ring localization, characteristic predicate, commutative ring, field of fractions -/ variable {R : Type*} [CommSemiring R] (M : Submonoid R) (S : Type*) [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] section AtPrime variable (P : Ideal R) [hp : P.IsPrime] namespace Ideal /-- The complement of a prime ideal `P ⊆ R` is a submonoid of `R`. -/ def primeCompl : Submonoid R where carrier := (Pᶜ : Set R) one_mem' := by convert P.ne_top_iff_one.1 hp.1 mul_mem' {x y} hnx hny hxy := Or.casesOn (hp.mem_or_mem hxy) hnx hny #align ideal.prime_compl Ideal.primeCompl theorem primeCompl_le_nonZeroDivisors [NoZeroDivisors R] : P.primeCompl ≤ nonZeroDivisors R := le_nonZeroDivisors_of_noZeroDivisors <| not_not_intro P.zero_mem #align ideal.prime_compl_le_non_zero_divisors Ideal.primeCompl_le_nonZeroDivisors end Ideal /-- Given a prime ideal `P`, the typeclass `IsLocalization.AtPrime S P` states that `S` is isomorphic to the localization of `R` at the complement of `P`. -/ protected abbrev IsLocalization.AtPrime := IsLocalization P.primeCompl S #align is_localization.at_prime IsLocalization.AtPrime /-- Given a prime ideal `P`, `Localization.AtPrime P` is a localization of `R` at the complement of `P`, as a quotient type. -/ protected abbrev Localization.AtPrime := Localization P.primeCompl #align localization.at_prime Localization.AtPrime namespace IsLocalization theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze have htz : (t : R) = 0 := by simpa using ht.symm exact t.2 (htz.symm ▸ P.zero_mem : ↑t ∈ P) #align is_localization.at_prime.nontrivial IsLocalization.AtPrime.Nontrivial theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩ rcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩ rcases mk'_surjective P.primeCompl y with ⟨ry, sy, hry⟩ rcases mk'_surjective P.primeCompl z with ⟨rz, sz, hrz⟩ rw [← hrx, ← hry, ← hrz, ← mk'_add, ← mk'_mul, ← mk'_self S P.primeCompl.one_mem] at hxyz rw [← hrx] at hx rw [← hry] at hy obtain ⟨t, ht⟩ := IsLocalization.eq.1 hxyz simp only [mul_one, one_mul, Submonoid.coe_mul, Subtype.coe_mk] at ht suffices : (t : R) * (sx * sy * sz) ∈ P exact not_or_of_not (mt hp.mem_or_mem <| not_or_of_not sx.2 sy.2) sz.2 (hp.mem_or_mem <| (hp.mem_or_mem this).resolve_left t.2) rw [← ht] exact P.mul_mem_left _ <| P.mul_mem_right _ <| P.add_mem (P.mul_mem_right _ <| this hx) <| P.mul_mem_right _ <| this hy) #align is_localization.at_prime.local_ring IsLocalization.AtPrime.localRing end IsLocalization namespace Localization /-- The localization of `R` at the complement of a prime ideal is a local ring. -/ instance AtPrime.localRing : LocalRing (Localization P.primeCompl) := IsLocalization.AtPrime.localRing (Localization P.primeCompl) P #align localization.at_prime.local_ring Localization.AtPrime.localRing end Localization end AtPrime namespace IsLocalization variable {A : Type*} [CommRing A] [IsDomain A] /-- The localization of an integral domain at the complement of a prime ideal is an integral domain. -/ instance isDomain_of_local_atPrime {P : Ideal A} (_ : P.IsPrime) : IsDomain (Localization.AtPrime P) := isDomain_localization P.primeCompl_le_nonZeroDivisors #align is_localization.is_domain_of_local_at_prime IsLocalization.isDomain_of_local_atPrime namespace AtPrime variable (I : Ideal R) [hI : I.IsPrime] [IsLocalization.AtPrime S I] theorem isUnit_to_map_iff (x : R) : IsUnit ((algebraMap R S) x) ↔ x ∈ I.primeCompl := ⟨fun h hx => (isPrime_of_isPrime_disjoint I.primeCompl S I hI disjoint_compl_left).ne_top <| (Ideal.map (algebraMap R S) I).eq_top_of_isUnit_mem (Ideal.mem_map_of_mem _ hx) h, fun h => map_units S ⟨x, h⟩⟩ #align is_localization.at_prime.is_unit_to_map_iff IsLocalization.AtPrime.isUnit_to_map_iff -- Can't use typeclasses to infer the `LocalRing` instance, so use an `optParam` instead -- (since `LocalRing` is a `Prop`, there should be no unification issues.) theorem to_map_mem_maximal_iff (x : R) (h : LocalRing S := localRing S I) : algebraMap R S x ∈ LocalRing.maximalIdeal S ↔ x ∈ I := not_iff_not.mp <| by simpa only [LocalRing.mem_maximalIdeal, mem_nonunits_iff, Classical.not_not] using isUnit_to_map_iff S I x #align is_localization.at_prime.to_map_mem_maximal_iff IsLocalization.AtPrime.to_map_mem_maximal_iff theorem comap_maximalIdeal (h : LocalRing S := localRing S I) : (LocalRing.maximalIdeal S).comap (algebraMap R S) = I := Ideal.ext fun x => by simpa only [Ideal.mem_comap] using to_map_mem_maximal_iff _ I x #align is_localization.at_prime.comap_maximal_ideal IsLocalization.AtPrime.comap_maximalIdeal theorem isUnit_mk'_iff (x : R) (y : I.primeCompl) : IsUnit (mk' S x y) ↔ x ∈ I.primeCompl := ⟨fun h hx => mk'_mem_iff.mpr ((to_map_mem_maximal_iff S I x).mpr hx) h, fun h => isUnit_iff_exists_inv.mpr ⟨mk' S ↑y ⟨x, h⟩, mk'_mul_mk'_eq_one ⟨x, h⟩ y⟩⟩ #align is_localization.at_prime.is_unit_mk'_iff IsLocalization.AtPrime.isUnit_mk'_iff theorem mk'_mem_maximal_iff (x : R) (y : I.primeCompl) (h : LocalRing S := localRing S I) : mk' S x y ∈ LocalRing.maximalIdeal S ↔ x ∈ I := not_iff_not.mp <| by simpa only [LocalRing.mem_maximalIdeal, mem_nonunits_iff, Classical.not_not] using isUnit_mk'_iff S I x y #align is_localization.at_prime.mk'_mem_maximal_iff IsLocalization.AtPrime.mk'_mem_maximal_iff end AtPrime end IsLocalization namespace Localization open IsLocalization attribute [local instance] Classical.propDecidable variable (I : Ideal R) [hI : I.IsPrime] variable {I} /-- The unique maximal ideal of the localization at `I.primeCompl` lies over the ideal `I`. -/ theorem AtPrime.comap_maximalIdeal : Ideal.comap (algebraMap R (Localization.AtPrime I)) (LocalRing.maximalIdeal (Localization I.primeCompl)) = I := -- Porting Note : need to provide full name IsLocalization.AtPrime.comap_maximalIdeal _ _ #align localization.at_prime.comap_maximal_ideal Localization.AtPrime.comap_maximalIdeal /-- The image of `I` in the localization at `I.primeCompl` is a maximal ideal, and in particular it is the unique maximal ideal given by the local ring structure `AtPrime.localRing` -/ theorem AtPrime.map_eq_maximalIdeal : Ideal.map (algebraMap R (Localization.AtPrime I)) I = LocalRing.maximalIdeal (Localization I.primeCompl) := by convert congr_arg (Ideal.map (algebraMap R (Localization.AtPrime I))) -- Porting Note : `algebraMap R ...` can not be solve by unification (AtPrime.comap_maximalIdeal (hI := hI)).symm -- Porting Note : can not find `hI` rw [map_comap I.primeCompl] #align localization.at_prime.map_eq_maximal_ideal Localization.AtPrime.map_eq_maximalIdeal theorem le_comap_primeCompl_iff {J : Ideal P} [hJ : J.IsPrime] {f : R →+* P} : I.primeCompl ≤ J.primeCompl.comap f ↔ J.comap f ≤ I := ⟨fun h x hx => by contrapose! hx exact h hx, fun h x hx hfxJ => hx (h hfxJ)⟩ #align localization.le_comap_prime_compl_iff Localization.le_comap_primeCompl_iff variable (I) /-- For a ring hom `f : R →+* S` and a prime ideal `J` in `S`, the induced ring hom from the localization of `R` at `J.comap f` to the localization of `S` at `J`. To make this definition more flexible, we allow any ideal `I` of `R` as input, together with a proof that `I = J.comap f`. This can be useful when `I` is not definitionally equal to `J.comap f`. -/ noncomputable def localRingHom (J : Ideal P) [J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) : Localization.AtPrime I →+* Localization.AtPrime J := IsLocalization.map (Localization.AtPrime J) f (le_comap_primeCompl_iff.mpr (ge_of_eq hIJ)) #align localization.local_ring_hom Localization.localRingHom theorem localRingHom_to_map (J : Ideal P) [J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) (x : R) : localRingHom I J f hIJ (algebraMap _ _ x) = algebraMap _ _ (f x) := map_eq _ _ #align localization.local_ring_hom_to_map Localization.localRingHom_to_map theorem localRingHom_mk' (J : Ideal P) [J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) (x : R) (y : I.primeCompl) : localRingHom I J f hIJ (IsLocalization.mk' _ x y) = IsLocalization.mk' (Localization.AtPrime J) (f x) (⟨f y, le_comap_primeCompl_iff.mpr (ge_of_eq hIJ) y.2⟩ : J.primeCompl) := map_mk' _ _ _ #align localization.local_ring_hom_mk' Localization.localRingHom_mk' instance isLocalRingHom_localRingHom (J : Ideal P) [hJ : J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) : IsLocalRingHom (localRingHom I J f hIJ) := IsLocalRingHom.mk fun x hx => by
rcases IsLocalization.mk'_surjective I.primeCompl x with ⟨r, s, rfl⟩
instance isLocalRingHom_localRingHom (J : Ideal P) [hJ : J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) : IsLocalRingHom (localRingHom I J f hIJ) := IsLocalRingHom.mk fun x hx => by
Mathlib.RingTheory.Localization.AtPrime.238_0.QSwWrbtcZl7L7lq
instance isLocalRingHom_localRingHom (J : Ideal P) [hJ : J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) : IsLocalRingHom (localRingHom I J f hIJ)
Mathlib_RingTheory_Localization_AtPrime
case intro.intro R : Type u_1 inst✝³ : CommSemiring R M : Submonoid R S : Type u_2 inst✝² : CommSemiring S inst✝¹ : Algebra R S P : Type u_3 inst✝ : CommSemiring P I : Ideal R hI : Ideal.IsPrime I J : Ideal P hJ : Ideal.IsPrime J f : R →+* P hIJ : I = Ideal.comap f J r : R s : ↥(Ideal.primeCompl I) hx : IsUnit ((localRingHom I J f hIJ) (mk' (Localization.AtPrime I) r s)) ⊢ IsUnit (mk' (Localization.AtPrime I) r s)
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen -/ import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.Localization.Ideal #align_import ring_theory.localization.at_prime from "leanprover-community/mathlib"@"b86c528d08a52a1fdb50d999232408e1c7e85d7d" /-! # Localizations of commutative rings at the complement of a prime ideal ## Main definitions * `IsLocalization.AtPrime (P : Ideal R) [IsPrime P] (S : Type*)` expresses that `S` is a localization at (the complement of) a prime ideal `P`, as an abbreviation of `IsLocalization P.prime_compl S` ## Main results * `IsLocalization.AtPrime.localRing`: a theorem (not an instance) stating a localization at the complement of a prime ideal is a local ring ## Implementation notes See `RingTheory.Localization.Basic` for a design overview. ## Tags localization, ring localization, commutative ring localization, characteristic predicate, commutative ring, field of fractions -/ variable {R : Type*} [CommSemiring R] (M : Submonoid R) (S : Type*) [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] section AtPrime variable (P : Ideal R) [hp : P.IsPrime] namespace Ideal /-- The complement of a prime ideal `P ⊆ R` is a submonoid of `R`. -/ def primeCompl : Submonoid R where carrier := (Pᶜ : Set R) one_mem' := by convert P.ne_top_iff_one.1 hp.1 mul_mem' {x y} hnx hny hxy := Or.casesOn (hp.mem_or_mem hxy) hnx hny #align ideal.prime_compl Ideal.primeCompl theorem primeCompl_le_nonZeroDivisors [NoZeroDivisors R] : P.primeCompl ≤ nonZeroDivisors R := le_nonZeroDivisors_of_noZeroDivisors <| not_not_intro P.zero_mem #align ideal.prime_compl_le_non_zero_divisors Ideal.primeCompl_le_nonZeroDivisors end Ideal /-- Given a prime ideal `P`, the typeclass `IsLocalization.AtPrime S P` states that `S` is isomorphic to the localization of `R` at the complement of `P`. -/ protected abbrev IsLocalization.AtPrime := IsLocalization P.primeCompl S #align is_localization.at_prime IsLocalization.AtPrime /-- Given a prime ideal `P`, `Localization.AtPrime P` is a localization of `R` at the complement of `P`, as a quotient type. -/ protected abbrev Localization.AtPrime := Localization P.primeCompl #align localization.at_prime Localization.AtPrime namespace IsLocalization theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze have htz : (t : R) = 0 := by simpa using ht.symm exact t.2 (htz.symm ▸ P.zero_mem : ↑t ∈ P) #align is_localization.at_prime.nontrivial IsLocalization.AtPrime.Nontrivial theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩ rcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩ rcases mk'_surjective P.primeCompl y with ⟨ry, sy, hry⟩ rcases mk'_surjective P.primeCompl z with ⟨rz, sz, hrz⟩ rw [← hrx, ← hry, ← hrz, ← mk'_add, ← mk'_mul, ← mk'_self S P.primeCompl.one_mem] at hxyz rw [← hrx] at hx rw [← hry] at hy obtain ⟨t, ht⟩ := IsLocalization.eq.1 hxyz simp only [mul_one, one_mul, Submonoid.coe_mul, Subtype.coe_mk] at ht suffices : (t : R) * (sx * sy * sz) ∈ P exact not_or_of_not (mt hp.mem_or_mem <| not_or_of_not sx.2 sy.2) sz.2 (hp.mem_or_mem <| (hp.mem_or_mem this).resolve_left t.2) rw [← ht] exact P.mul_mem_left _ <| P.mul_mem_right _ <| P.add_mem (P.mul_mem_right _ <| this hx) <| P.mul_mem_right _ <| this hy) #align is_localization.at_prime.local_ring IsLocalization.AtPrime.localRing end IsLocalization namespace Localization /-- The localization of `R` at the complement of a prime ideal is a local ring. -/ instance AtPrime.localRing : LocalRing (Localization P.primeCompl) := IsLocalization.AtPrime.localRing (Localization P.primeCompl) P #align localization.at_prime.local_ring Localization.AtPrime.localRing end Localization end AtPrime namespace IsLocalization variable {A : Type*} [CommRing A] [IsDomain A] /-- The localization of an integral domain at the complement of a prime ideal is an integral domain. -/ instance isDomain_of_local_atPrime {P : Ideal A} (_ : P.IsPrime) : IsDomain (Localization.AtPrime P) := isDomain_localization P.primeCompl_le_nonZeroDivisors #align is_localization.is_domain_of_local_at_prime IsLocalization.isDomain_of_local_atPrime namespace AtPrime variable (I : Ideal R) [hI : I.IsPrime] [IsLocalization.AtPrime S I] theorem isUnit_to_map_iff (x : R) : IsUnit ((algebraMap R S) x) ↔ x ∈ I.primeCompl := ⟨fun h hx => (isPrime_of_isPrime_disjoint I.primeCompl S I hI disjoint_compl_left).ne_top <| (Ideal.map (algebraMap R S) I).eq_top_of_isUnit_mem (Ideal.mem_map_of_mem _ hx) h, fun h => map_units S ⟨x, h⟩⟩ #align is_localization.at_prime.is_unit_to_map_iff IsLocalization.AtPrime.isUnit_to_map_iff -- Can't use typeclasses to infer the `LocalRing` instance, so use an `optParam` instead -- (since `LocalRing` is a `Prop`, there should be no unification issues.) theorem to_map_mem_maximal_iff (x : R) (h : LocalRing S := localRing S I) : algebraMap R S x ∈ LocalRing.maximalIdeal S ↔ x ∈ I := not_iff_not.mp <| by simpa only [LocalRing.mem_maximalIdeal, mem_nonunits_iff, Classical.not_not] using isUnit_to_map_iff S I x #align is_localization.at_prime.to_map_mem_maximal_iff IsLocalization.AtPrime.to_map_mem_maximal_iff theorem comap_maximalIdeal (h : LocalRing S := localRing S I) : (LocalRing.maximalIdeal S).comap (algebraMap R S) = I := Ideal.ext fun x => by simpa only [Ideal.mem_comap] using to_map_mem_maximal_iff _ I x #align is_localization.at_prime.comap_maximal_ideal IsLocalization.AtPrime.comap_maximalIdeal theorem isUnit_mk'_iff (x : R) (y : I.primeCompl) : IsUnit (mk' S x y) ↔ x ∈ I.primeCompl := ⟨fun h hx => mk'_mem_iff.mpr ((to_map_mem_maximal_iff S I x).mpr hx) h, fun h => isUnit_iff_exists_inv.mpr ⟨mk' S ↑y ⟨x, h⟩, mk'_mul_mk'_eq_one ⟨x, h⟩ y⟩⟩ #align is_localization.at_prime.is_unit_mk'_iff IsLocalization.AtPrime.isUnit_mk'_iff theorem mk'_mem_maximal_iff (x : R) (y : I.primeCompl) (h : LocalRing S := localRing S I) : mk' S x y ∈ LocalRing.maximalIdeal S ↔ x ∈ I := not_iff_not.mp <| by simpa only [LocalRing.mem_maximalIdeal, mem_nonunits_iff, Classical.not_not] using isUnit_mk'_iff S I x y #align is_localization.at_prime.mk'_mem_maximal_iff IsLocalization.AtPrime.mk'_mem_maximal_iff end AtPrime end IsLocalization namespace Localization open IsLocalization attribute [local instance] Classical.propDecidable variable (I : Ideal R) [hI : I.IsPrime] variable {I} /-- The unique maximal ideal of the localization at `I.primeCompl` lies over the ideal `I`. -/ theorem AtPrime.comap_maximalIdeal : Ideal.comap (algebraMap R (Localization.AtPrime I)) (LocalRing.maximalIdeal (Localization I.primeCompl)) = I := -- Porting Note : need to provide full name IsLocalization.AtPrime.comap_maximalIdeal _ _ #align localization.at_prime.comap_maximal_ideal Localization.AtPrime.comap_maximalIdeal /-- The image of `I` in the localization at `I.primeCompl` is a maximal ideal, and in particular it is the unique maximal ideal given by the local ring structure `AtPrime.localRing` -/ theorem AtPrime.map_eq_maximalIdeal : Ideal.map (algebraMap R (Localization.AtPrime I)) I = LocalRing.maximalIdeal (Localization I.primeCompl) := by convert congr_arg (Ideal.map (algebraMap R (Localization.AtPrime I))) -- Porting Note : `algebraMap R ...` can not be solve by unification (AtPrime.comap_maximalIdeal (hI := hI)).symm -- Porting Note : can not find `hI` rw [map_comap I.primeCompl] #align localization.at_prime.map_eq_maximal_ideal Localization.AtPrime.map_eq_maximalIdeal theorem le_comap_primeCompl_iff {J : Ideal P} [hJ : J.IsPrime] {f : R →+* P} : I.primeCompl ≤ J.primeCompl.comap f ↔ J.comap f ≤ I := ⟨fun h x hx => by contrapose! hx exact h hx, fun h x hx hfxJ => hx (h hfxJ)⟩ #align localization.le_comap_prime_compl_iff Localization.le_comap_primeCompl_iff variable (I) /-- For a ring hom `f : R →+* S` and a prime ideal `J` in `S`, the induced ring hom from the localization of `R` at `J.comap f` to the localization of `S` at `J`. To make this definition more flexible, we allow any ideal `I` of `R` as input, together with a proof that `I = J.comap f`. This can be useful when `I` is not definitionally equal to `J.comap f`. -/ noncomputable def localRingHom (J : Ideal P) [J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) : Localization.AtPrime I →+* Localization.AtPrime J := IsLocalization.map (Localization.AtPrime J) f (le_comap_primeCompl_iff.mpr (ge_of_eq hIJ)) #align localization.local_ring_hom Localization.localRingHom theorem localRingHom_to_map (J : Ideal P) [J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) (x : R) : localRingHom I J f hIJ (algebraMap _ _ x) = algebraMap _ _ (f x) := map_eq _ _ #align localization.local_ring_hom_to_map Localization.localRingHom_to_map theorem localRingHom_mk' (J : Ideal P) [J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) (x : R) (y : I.primeCompl) : localRingHom I J f hIJ (IsLocalization.mk' _ x y) = IsLocalization.mk' (Localization.AtPrime J) (f x) (⟨f y, le_comap_primeCompl_iff.mpr (ge_of_eq hIJ) y.2⟩ : J.primeCompl) := map_mk' _ _ _ #align localization.local_ring_hom_mk' Localization.localRingHom_mk' instance isLocalRingHom_localRingHom (J : Ideal P) [hJ : J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) : IsLocalRingHom (localRingHom I J f hIJ) := IsLocalRingHom.mk fun x hx => by rcases IsLocalization.mk'_surjective I.primeCompl x with ⟨r, s, rfl⟩
rw [localRingHom_mk'] at hx
instance isLocalRingHom_localRingHom (J : Ideal P) [hJ : J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) : IsLocalRingHom (localRingHom I J f hIJ) := IsLocalRingHom.mk fun x hx => by rcases IsLocalization.mk'_surjective I.primeCompl x with ⟨r, s, rfl⟩
Mathlib.RingTheory.Localization.AtPrime.238_0.QSwWrbtcZl7L7lq
instance isLocalRingHom_localRingHom (J : Ideal P) [hJ : J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) : IsLocalRingHom (localRingHom I J f hIJ)
Mathlib_RingTheory_Localization_AtPrime
case intro.intro R : Type u_1 inst✝³ : CommSemiring R M : Submonoid R S : Type u_2 inst✝² : CommSemiring S inst✝¹ : Algebra R S P : Type u_3 inst✝ : CommSemiring P I : Ideal R hI : Ideal.IsPrime I J : Ideal P hJ : Ideal.IsPrime J f : R →+* P hIJ : I = Ideal.comap f J r : R s : ↥(Ideal.primeCompl I) hx : IsUnit (mk' (Localization.AtPrime J) (f r) { val := f ↑s, property := (_ : ↑s ∈ Submonoid.comap f (Ideal.primeCompl J)) }) ⊢ IsUnit (mk' (Localization.AtPrime I) r s)
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen -/ import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.Localization.Ideal #align_import ring_theory.localization.at_prime from "leanprover-community/mathlib"@"b86c528d08a52a1fdb50d999232408e1c7e85d7d" /-! # Localizations of commutative rings at the complement of a prime ideal ## Main definitions * `IsLocalization.AtPrime (P : Ideal R) [IsPrime P] (S : Type*)` expresses that `S` is a localization at (the complement of) a prime ideal `P`, as an abbreviation of `IsLocalization P.prime_compl S` ## Main results * `IsLocalization.AtPrime.localRing`: a theorem (not an instance) stating a localization at the complement of a prime ideal is a local ring ## Implementation notes See `RingTheory.Localization.Basic` for a design overview. ## Tags localization, ring localization, commutative ring localization, characteristic predicate, commutative ring, field of fractions -/ variable {R : Type*} [CommSemiring R] (M : Submonoid R) (S : Type*) [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] section AtPrime variable (P : Ideal R) [hp : P.IsPrime] namespace Ideal /-- The complement of a prime ideal `P ⊆ R` is a submonoid of `R`. -/ def primeCompl : Submonoid R where carrier := (Pᶜ : Set R) one_mem' := by convert P.ne_top_iff_one.1 hp.1 mul_mem' {x y} hnx hny hxy := Or.casesOn (hp.mem_or_mem hxy) hnx hny #align ideal.prime_compl Ideal.primeCompl theorem primeCompl_le_nonZeroDivisors [NoZeroDivisors R] : P.primeCompl ≤ nonZeroDivisors R := le_nonZeroDivisors_of_noZeroDivisors <| not_not_intro P.zero_mem #align ideal.prime_compl_le_non_zero_divisors Ideal.primeCompl_le_nonZeroDivisors end Ideal /-- Given a prime ideal `P`, the typeclass `IsLocalization.AtPrime S P` states that `S` is isomorphic to the localization of `R` at the complement of `P`. -/ protected abbrev IsLocalization.AtPrime := IsLocalization P.primeCompl S #align is_localization.at_prime IsLocalization.AtPrime /-- Given a prime ideal `P`, `Localization.AtPrime P` is a localization of `R` at the complement of `P`, as a quotient type. -/ protected abbrev Localization.AtPrime := Localization P.primeCompl #align localization.at_prime Localization.AtPrime namespace IsLocalization theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze have htz : (t : R) = 0 := by simpa using ht.symm exact t.2 (htz.symm ▸ P.zero_mem : ↑t ∈ P) #align is_localization.at_prime.nontrivial IsLocalization.AtPrime.Nontrivial theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩ rcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩ rcases mk'_surjective P.primeCompl y with ⟨ry, sy, hry⟩ rcases mk'_surjective P.primeCompl z with ⟨rz, sz, hrz⟩ rw [← hrx, ← hry, ← hrz, ← mk'_add, ← mk'_mul, ← mk'_self S P.primeCompl.one_mem] at hxyz rw [← hrx] at hx rw [← hry] at hy obtain ⟨t, ht⟩ := IsLocalization.eq.1 hxyz simp only [mul_one, one_mul, Submonoid.coe_mul, Subtype.coe_mk] at ht suffices : (t : R) * (sx * sy * sz) ∈ P exact not_or_of_not (mt hp.mem_or_mem <| not_or_of_not sx.2 sy.2) sz.2 (hp.mem_or_mem <| (hp.mem_or_mem this).resolve_left t.2) rw [← ht] exact P.mul_mem_left _ <| P.mul_mem_right _ <| P.add_mem (P.mul_mem_right _ <| this hx) <| P.mul_mem_right _ <| this hy) #align is_localization.at_prime.local_ring IsLocalization.AtPrime.localRing end IsLocalization namespace Localization /-- The localization of `R` at the complement of a prime ideal is a local ring. -/ instance AtPrime.localRing : LocalRing (Localization P.primeCompl) := IsLocalization.AtPrime.localRing (Localization P.primeCompl) P #align localization.at_prime.local_ring Localization.AtPrime.localRing end Localization end AtPrime namespace IsLocalization variable {A : Type*} [CommRing A] [IsDomain A] /-- The localization of an integral domain at the complement of a prime ideal is an integral domain. -/ instance isDomain_of_local_atPrime {P : Ideal A} (_ : P.IsPrime) : IsDomain (Localization.AtPrime P) := isDomain_localization P.primeCompl_le_nonZeroDivisors #align is_localization.is_domain_of_local_at_prime IsLocalization.isDomain_of_local_atPrime namespace AtPrime variable (I : Ideal R) [hI : I.IsPrime] [IsLocalization.AtPrime S I] theorem isUnit_to_map_iff (x : R) : IsUnit ((algebraMap R S) x) ↔ x ∈ I.primeCompl := ⟨fun h hx => (isPrime_of_isPrime_disjoint I.primeCompl S I hI disjoint_compl_left).ne_top <| (Ideal.map (algebraMap R S) I).eq_top_of_isUnit_mem (Ideal.mem_map_of_mem _ hx) h, fun h => map_units S ⟨x, h⟩⟩ #align is_localization.at_prime.is_unit_to_map_iff IsLocalization.AtPrime.isUnit_to_map_iff -- Can't use typeclasses to infer the `LocalRing` instance, so use an `optParam` instead -- (since `LocalRing` is a `Prop`, there should be no unification issues.) theorem to_map_mem_maximal_iff (x : R) (h : LocalRing S := localRing S I) : algebraMap R S x ∈ LocalRing.maximalIdeal S ↔ x ∈ I := not_iff_not.mp <| by simpa only [LocalRing.mem_maximalIdeal, mem_nonunits_iff, Classical.not_not] using isUnit_to_map_iff S I x #align is_localization.at_prime.to_map_mem_maximal_iff IsLocalization.AtPrime.to_map_mem_maximal_iff theorem comap_maximalIdeal (h : LocalRing S := localRing S I) : (LocalRing.maximalIdeal S).comap (algebraMap R S) = I := Ideal.ext fun x => by simpa only [Ideal.mem_comap] using to_map_mem_maximal_iff _ I x #align is_localization.at_prime.comap_maximal_ideal IsLocalization.AtPrime.comap_maximalIdeal theorem isUnit_mk'_iff (x : R) (y : I.primeCompl) : IsUnit (mk' S x y) ↔ x ∈ I.primeCompl := ⟨fun h hx => mk'_mem_iff.mpr ((to_map_mem_maximal_iff S I x).mpr hx) h, fun h => isUnit_iff_exists_inv.mpr ⟨mk' S ↑y ⟨x, h⟩, mk'_mul_mk'_eq_one ⟨x, h⟩ y⟩⟩ #align is_localization.at_prime.is_unit_mk'_iff IsLocalization.AtPrime.isUnit_mk'_iff theorem mk'_mem_maximal_iff (x : R) (y : I.primeCompl) (h : LocalRing S := localRing S I) : mk' S x y ∈ LocalRing.maximalIdeal S ↔ x ∈ I := not_iff_not.mp <| by simpa only [LocalRing.mem_maximalIdeal, mem_nonunits_iff, Classical.not_not] using isUnit_mk'_iff S I x y #align is_localization.at_prime.mk'_mem_maximal_iff IsLocalization.AtPrime.mk'_mem_maximal_iff end AtPrime end IsLocalization namespace Localization open IsLocalization attribute [local instance] Classical.propDecidable variable (I : Ideal R) [hI : I.IsPrime] variable {I} /-- The unique maximal ideal of the localization at `I.primeCompl` lies over the ideal `I`. -/ theorem AtPrime.comap_maximalIdeal : Ideal.comap (algebraMap R (Localization.AtPrime I)) (LocalRing.maximalIdeal (Localization I.primeCompl)) = I := -- Porting Note : need to provide full name IsLocalization.AtPrime.comap_maximalIdeal _ _ #align localization.at_prime.comap_maximal_ideal Localization.AtPrime.comap_maximalIdeal /-- The image of `I` in the localization at `I.primeCompl` is a maximal ideal, and in particular it is the unique maximal ideal given by the local ring structure `AtPrime.localRing` -/ theorem AtPrime.map_eq_maximalIdeal : Ideal.map (algebraMap R (Localization.AtPrime I)) I = LocalRing.maximalIdeal (Localization I.primeCompl) := by convert congr_arg (Ideal.map (algebraMap R (Localization.AtPrime I))) -- Porting Note : `algebraMap R ...` can not be solve by unification (AtPrime.comap_maximalIdeal (hI := hI)).symm -- Porting Note : can not find `hI` rw [map_comap I.primeCompl] #align localization.at_prime.map_eq_maximal_ideal Localization.AtPrime.map_eq_maximalIdeal theorem le_comap_primeCompl_iff {J : Ideal P} [hJ : J.IsPrime] {f : R →+* P} : I.primeCompl ≤ J.primeCompl.comap f ↔ J.comap f ≤ I := ⟨fun h x hx => by contrapose! hx exact h hx, fun h x hx hfxJ => hx (h hfxJ)⟩ #align localization.le_comap_prime_compl_iff Localization.le_comap_primeCompl_iff variable (I) /-- For a ring hom `f : R →+* S` and a prime ideal `J` in `S`, the induced ring hom from the localization of `R` at `J.comap f` to the localization of `S` at `J`. To make this definition more flexible, we allow any ideal `I` of `R` as input, together with a proof that `I = J.comap f`. This can be useful when `I` is not definitionally equal to `J.comap f`. -/ noncomputable def localRingHom (J : Ideal P) [J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) : Localization.AtPrime I →+* Localization.AtPrime J := IsLocalization.map (Localization.AtPrime J) f (le_comap_primeCompl_iff.mpr (ge_of_eq hIJ)) #align localization.local_ring_hom Localization.localRingHom theorem localRingHom_to_map (J : Ideal P) [J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) (x : R) : localRingHom I J f hIJ (algebraMap _ _ x) = algebraMap _ _ (f x) := map_eq _ _ #align localization.local_ring_hom_to_map Localization.localRingHom_to_map theorem localRingHom_mk' (J : Ideal P) [J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) (x : R) (y : I.primeCompl) : localRingHom I J f hIJ (IsLocalization.mk' _ x y) = IsLocalization.mk' (Localization.AtPrime J) (f x) (⟨f y, le_comap_primeCompl_iff.mpr (ge_of_eq hIJ) y.2⟩ : J.primeCompl) := map_mk' _ _ _ #align localization.local_ring_hom_mk' Localization.localRingHom_mk' instance isLocalRingHom_localRingHom (J : Ideal P) [hJ : J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) : IsLocalRingHom (localRingHom I J f hIJ) := IsLocalRingHom.mk fun x hx => by rcases IsLocalization.mk'_surjective I.primeCompl x with ⟨r, s, rfl⟩ rw [localRingHom_mk'] at hx
rw [AtPrime.isUnit_mk'_iff] at hx ⊢
instance isLocalRingHom_localRingHom (J : Ideal P) [hJ : J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) : IsLocalRingHom (localRingHom I J f hIJ) := IsLocalRingHom.mk fun x hx => by rcases IsLocalization.mk'_surjective I.primeCompl x with ⟨r, s, rfl⟩ rw [localRingHom_mk'] at hx
Mathlib.RingTheory.Localization.AtPrime.238_0.QSwWrbtcZl7L7lq
instance isLocalRingHom_localRingHom (J : Ideal P) [hJ : J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) : IsLocalRingHom (localRingHom I J f hIJ)
Mathlib_RingTheory_Localization_AtPrime
case intro.intro R : Type u_1 inst✝³ : CommSemiring R M : Submonoid R S : Type u_2 inst✝² : CommSemiring S inst✝¹ : Algebra R S P : Type u_3 inst✝ : CommSemiring P I : Ideal R hI : Ideal.IsPrime I J : Ideal P hJ : Ideal.IsPrime J f : R →+* P hIJ : I = Ideal.comap f J r : R s : ↥(Ideal.primeCompl I) hx : f r ∈ Ideal.primeCompl J ⊢ r ∈ Ideal.primeCompl I
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen -/ import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.Localization.Ideal #align_import ring_theory.localization.at_prime from "leanprover-community/mathlib"@"b86c528d08a52a1fdb50d999232408e1c7e85d7d" /-! # Localizations of commutative rings at the complement of a prime ideal ## Main definitions * `IsLocalization.AtPrime (P : Ideal R) [IsPrime P] (S : Type*)` expresses that `S` is a localization at (the complement of) a prime ideal `P`, as an abbreviation of `IsLocalization P.prime_compl S` ## Main results * `IsLocalization.AtPrime.localRing`: a theorem (not an instance) stating a localization at the complement of a prime ideal is a local ring ## Implementation notes See `RingTheory.Localization.Basic` for a design overview. ## Tags localization, ring localization, commutative ring localization, characteristic predicate, commutative ring, field of fractions -/ variable {R : Type*} [CommSemiring R] (M : Submonoid R) (S : Type*) [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] section AtPrime variable (P : Ideal R) [hp : P.IsPrime] namespace Ideal /-- The complement of a prime ideal `P ⊆ R` is a submonoid of `R`. -/ def primeCompl : Submonoid R where carrier := (Pᶜ : Set R) one_mem' := by convert P.ne_top_iff_one.1 hp.1 mul_mem' {x y} hnx hny hxy := Or.casesOn (hp.mem_or_mem hxy) hnx hny #align ideal.prime_compl Ideal.primeCompl theorem primeCompl_le_nonZeroDivisors [NoZeroDivisors R] : P.primeCompl ≤ nonZeroDivisors R := le_nonZeroDivisors_of_noZeroDivisors <| not_not_intro P.zero_mem #align ideal.prime_compl_le_non_zero_divisors Ideal.primeCompl_le_nonZeroDivisors end Ideal /-- Given a prime ideal `P`, the typeclass `IsLocalization.AtPrime S P` states that `S` is isomorphic to the localization of `R` at the complement of `P`. -/ protected abbrev IsLocalization.AtPrime := IsLocalization P.primeCompl S #align is_localization.at_prime IsLocalization.AtPrime /-- Given a prime ideal `P`, `Localization.AtPrime P` is a localization of `R` at the complement of `P`, as a quotient type. -/ protected abbrev Localization.AtPrime := Localization P.primeCompl #align localization.at_prime Localization.AtPrime namespace IsLocalization theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze have htz : (t : R) = 0 := by simpa using ht.symm exact t.2 (htz.symm ▸ P.zero_mem : ↑t ∈ P) #align is_localization.at_prime.nontrivial IsLocalization.AtPrime.Nontrivial theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩ rcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩ rcases mk'_surjective P.primeCompl y with ⟨ry, sy, hry⟩ rcases mk'_surjective P.primeCompl z with ⟨rz, sz, hrz⟩ rw [← hrx, ← hry, ← hrz, ← mk'_add, ← mk'_mul, ← mk'_self S P.primeCompl.one_mem] at hxyz rw [← hrx] at hx rw [← hry] at hy obtain ⟨t, ht⟩ := IsLocalization.eq.1 hxyz simp only [mul_one, one_mul, Submonoid.coe_mul, Subtype.coe_mk] at ht suffices : (t : R) * (sx * sy * sz) ∈ P exact not_or_of_not (mt hp.mem_or_mem <| not_or_of_not sx.2 sy.2) sz.2 (hp.mem_or_mem <| (hp.mem_or_mem this).resolve_left t.2) rw [← ht] exact P.mul_mem_left _ <| P.mul_mem_right _ <| P.add_mem (P.mul_mem_right _ <| this hx) <| P.mul_mem_right _ <| this hy) #align is_localization.at_prime.local_ring IsLocalization.AtPrime.localRing end IsLocalization namespace Localization /-- The localization of `R` at the complement of a prime ideal is a local ring. -/ instance AtPrime.localRing : LocalRing (Localization P.primeCompl) := IsLocalization.AtPrime.localRing (Localization P.primeCompl) P #align localization.at_prime.local_ring Localization.AtPrime.localRing end Localization end AtPrime namespace IsLocalization variable {A : Type*} [CommRing A] [IsDomain A] /-- The localization of an integral domain at the complement of a prime ideal is an integral domain. -/ instance isDomain_of_local_atPrime {P : Ideal A} (_ : P.IsPrime) : IsDomain (Localization.AtPrime P) := isDomain_localization P.primeCompl_le_nonZeroDivisors #align is_localization.is_domain_of_local_at_prime IsLocalization.isDomain_of_local_atPrime namespace AtPrime variable (I : Ideal R) [hI : I.IsPrime] [IsLocalization.AtPrime S I] theorem isUnit_to_map_iff (x : R) : IsUnit ((algebraMap R S) x) ↔ x ∈ I.primeCompl := ⟨fun h hx => (isPrime_of_isPrime_disjoint I.primeCompl S I hI disjoint_compl_left).ne_top <| (Ideal.map (algebraMap R S) I).eq_top_of_isUnit_mem (Ideal.mem_map_of_mem _ hx) h, fun h => map_units S ⟨x, h⟩⟩ #align is_localization.at_prime.is_unit_to_map_iff IsLocalization.AtPrime.isUnit_to_map_iff -- Can't use typeclasses to infer the `LocalRing` instance, so use an `optParam` instead -- (since `LocalRing` is a `Prop`, there should be no unification issues.) theorem to_map_mem_maximal_iff (x : R) (h : LocalRing S := localRing S I) : algebraMap R S x ∈ LocalRing.maximalIdeal S ↔ x ∈ I := not_iff_not.mp <| by simpa only [LocalRing.mem_maximalIdeal, mem_nonunits_iff, Classical.not_not] using isUnit_to_map_iff S I x #align is_localization.at_prime.to_map_mem_maximal_iff IsLocalization.AtPrime.to_map_mem_maximal_iff theorem comap_maximalIdeal (h : LocalRing S := localRing S I) : (LocalRing.maximalIdeal S).comap (algebraMap R S) = I := Ideal.ext fun x => by simpa only [Ideal.mem_comap] using to_map_mem_maximal_iff _ I x #align is_localization.at_prime.comap_maximal_ideal IsLocalization.AtPrime.comap_maximalIdeal theorem isUnit_mk'_iff (x : R) (y : I.primeCompl) : IsUnit (mk' S x y) ↔ x ∈ I.primeCompl := ⟨fun h hx => mk'_mem_iff.mpr ((to_map_mem_maximal_iff S I x).mpr hx) h, fun h => isUnit_iff_exists_inv.mpr ⟨mk' S ↑y ⟨x, h⟩, mk'_mul_mk'_eq_one ⟨x, h⟩ y⟩⟩ #align is_localization.at_prime.is_unit_mk'_iff IsLocalization.AtPrime.isUnit_mk'_iff theorem mk'_mem_maximal_iff (x : R) (y : I.primeCompl) (h : LocalRing S := localRing S I) : mk' S x y ∈ LocalRing.maximalIdeal S ↔ x ∈ I := not_iff_not.mp <| by simpa only [LocalRing.mem_maximalIdeal, mem_nonunits_iff, Classical.not_not] using isUnit_mk'_iff S I x y #align is_localization.at_prime.mk'_mem_maximal_iff IsLocalization.AtPrime.mk'_mem_maximal_iff end AtPrime end IsLocalization namespace Localization open IsLocalization attribute [local instance] Classical.propDecidable variable (I : Ideal R) [hI : I.IsPrime] variable {I} /-- The unique maximal ideal of the localization at `I.primeCompl` lies over the ideal `I`. -/ theorem AtPrime.comap_maximalIdeal : Ideal.comap (algebraMap R (Localization.AtPrime I)) (LocalRing.maximalIdeal (Localization I.primeCompl)) = I := -- Porting Note : need to provide full name IsLocalization.AtPrime.comap_maximalIdeal _ _ #align localization.at_prime.comap_maximal_ideal Localization.AtPrime.comap_maximalIdeal /-- The image of `I` in the localization at `I.primeCompl` is a maximal ideal, and in particular it is the unique maximal ideal given by the local ring structure `AtPrime.localRing` -/ theorem AtPrime.map_eq_maximalIdeal : Ideal.map (algebraMap R (Localization.AtPrime I)) I = LocalRing.maximalIdeal (Localization I.primeCompl) := by convert congr_arg (Ideal.map (algebraMap R (Localization.AtPrime I))) -- Porting Note : `algebraMap R ...` can not be solve by unification (AtPrime.comap_maximalIdeal (hI := hI)).symm -- Porting Note : can not find `hI` rw [map_comap I.primeCompl] #align localization.at_prime.map_eq_maximal_ideal Localization.AtPrime.map_eq_maximalIdeal theorem le_comap_primeCompl_iff {J : Ideal P} [hJ : J.IsPrime] {f : R →+* P} : I.primeCompl ≤ J.primeCompl.comap f ↔ J.comap f ≤ I := ⟨fun h x hx => by contrapose! hx exact h hx, fun h x hx hfxJ => hx (h hfxJ)⟩ #align localization.le_comap_prime_compl_iff Localization.le_comap_primeCompl_iff variable (I) /-- For a ring hom `f : R →+* S` and a prime ideal `J` in `S`, the induced ring hom from the localization of `R` at `J.comap f` to the localization of `S` at `J`. To make this definition more flexible, we allow any ideal `I` of `R` as input, together with a proof that `I = J.comap f`. This can be useful when `I` is not definitionally equal to `J.comap f`. -/ noncomputable def localRingHom (J : Ideal P) [J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) : Localization.AtPrime I →+* Localization.AtPrime J := IsLocalization.map (Localization.AtPrime J) f (le_comap_primeCompl_iff.mpr (ge_of_eq hIJ)) #align localization.local_ring_hom Localization.localRingHom theorem localRingHom_to_map (J : Ideal P) [J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) (x : R) : localRingHom I J f hIJ (algebraMap _ _ x) = algebraMap _ _ (f x) := map_eq _ _ #align localization.local_ring_hom_to_map Localization.localRingHom_to_map theorem localRingHom_mk' (J : Ideal P) [J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) (x : R) (y : I.primeCompl) : localRingHom I J f hIJ (IsLocalization.mk' _ x y) = IsLocalization.mk' (Localization.AtPrime J) (f x) (⟨f y, le_comap_primeCompl_iff.mpr (ge_of_eq hIJ) y.2⟩ : J.primeCompl) := map_mk' _ _ _ #align localization.local_ring_hom_mk' Localization.localRingHom_mk' instance isLocalRingHom_localRingHom (J : Ideal P) [hJ : J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) : IsLocalRingHom (localRingHom I J f hIJ) := IsLocalRingHom.mk fun x hx => by rcases IsLocalization.mk'_surjective I.primeCompl x with ⟨r, s, rfl⟩ rw [localRingHom_mk'] at hx rw [AtPrime.isUnit_mk'_iff] at hx ⊢
exact fun hr => hx ((SetLike.ext_iff.mp hIJ r).mp hr)
instance isLocalRingHom_localRingHom (J : Ideal P) [hJ : J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) : IsLocalRingHom (localRingHom I J f hIJ) := IsLocalRingHom.mk fun x hx => by rcases IsLocalization.mk'_surjective I.primeCompl x with ⟨r, s, rfl⟩ rw [localRingHom_mk'] at hx rw [AtPrime.isUnit_mk'_iff] at hx ⊢
Mathlib.RingTheory.Localization.AtPrime.238_0.QSwWrbtcZl7L7lq
instance isLocalRingHom_localRingHom (J : Ideal P) [hJ : J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) : IsLocalRingHom (localRingHom I J f hIJ)
Mathlib_RingTheory_Localization_AtPrime
R : Type u_1 inst✝⁴ : CommSemiring R M : Submonoid R S✝ : Type u_2 inst✝³ : CommSemiring S✝ inst✝² : Algebra R S✝ P : Type u_3 inst✝¹ : CommSemiring P I : Ideal R hI : Ideal.IsPrime I S : Type u_4 inst✝ : CommSemiring S J : Ideal S hJ : Ideal.IsPrime J K : Ideal P hK : Ideal.IsPrime K f : R →+* S hIJ : I = Ideal.comap f J g : S →+* P hJK : J = Ideal.comap g K ⊢ I = Ideal.comap (RingHom.comp g f) K
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen -/ import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.Localization.Ideal #align_import ring_theory.localization.at_prime from "leanprover-community/mathlib"@"b86c528d08a52a1fdb50d999232408e1c7e85d7d" /-! # Localizations of commutative rings at the complement of a prime ideal ## Main definitions * `IsLocalization.AtPrime (P : Ideal R) [IsPrime P] (S : Type*)` expresses that `S` is a localization at (the complement of) a prime ideal `P`, as an abbreviation of `IsLocalization P.prime_compl S` ## Main results * `IsLocalization.AtPrime.localRing`: a theorem (not an instance) stating a localization at the complement of a prime ideal is a local ring ## Implementation notes See `RingTheory.Localization.Basic` for a design overview. ## Tags localization, ring localization, commutative ring localization, characteristic predicate, commutative ring, field of fractions -/ variable {R : Type*} [CommSemiring R] (M : Submonoid R) (S : Type*) [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] section AtPrime variable (P : Ideal R) [hp : P.IsPrime] namespace Ideal /-- The complement of a prime ideal `P ⊆ R` is a submonoid of `R`. -/ def primeCompl : Submonoid R where carrier := (Pᶜ : Set R) one_mem' := by convert P.ne_top_iff_one.1 hp.1 mul_mem' {x y} hnx hny hxy := Or.casesOn (hp.mem_or_mem hxy) hnx hny #align ideal.prime_compl Ideal.primeCompl theorem primeCompl_le_nonZeroDivisors [NoZeroDivisors R] : P.primeCompl ≤ nonZeroDivisors R := le_nonZeroDivisors_of_noZeroDivisors <| not_not_intro P.zero_mem #align ideal.prime_compl_le_non_zero_divisors Ideal.primeCompl_le_nonZeroDivisors end Ideal /-- Given a prime ideal `P`, the typeclass `IsLocalization.AtPrime S P` states that `S` is isomorphic to the localization of `R` at the complement of `P`. -/ protected abbrev IsLocalization.AtPrime := IsLocalization P.primeCompl S #align is_localization.at_prime IsLocalization.AtPrime /-- Given a prime ideal `P`, `Localization.AtPrime P` is a localization of `R` at the complement of `P`, as a quotient type. -/ protected abbrev Localization.AtPrime := Localization P.primeCompl #align localization.at_prime Localization.AtPrime namespace IsLocalization theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze have htz : (t : R) = 0 := by simpa using ht.symm exact t.2 (htz.symm ▸ P.zero_mem : ↑t ∈ P) #align is_localization.at_prime.nontrivial IsLocalization.AtPrime.Nontrivial theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩ rcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩ rcases mk'_surjective P.primeCompl y with ⟨ry, sy, hry⟩ rcases mk'_surjective P.primeCompl z with ⟨rz, sz, hrz⟩ rw [← hrx, ← hry, ← hrz, ← mk'_add, ← mk'_mul, ← mk'_self S P.primeCompl.one_mem] at hxyz rw [← hrx] at hx rw [← hry] at hy obtain ⟨t, ht⟩ := IsLocalization.eq.1 hxyz simp only [mul_one, one_mul, Submonoid.coe_mul, Subtype.coe_mk] at ht suffices : (t : R) * (sx * sy * sz) ∈ P exact not_or_of_not (mt hp.mem_or_mem <| not_or_of_not sx.2 sy.2) sz.2 (hp.mem_or_mem <| (hp.mem_or_mem this).resolve_left t.2) rw [← ht] exact P.mul_mem_left _ <| P.mul_mem_right _ <| P.add_mem (P.mul_mem_right _ <| this hx) <| P.mul_mem_right _ <| this hy) #align is_localization.at_prime.local_ring IsLocalization.AtPrime.localRing end IsLocalization namespace Localization /-- The localization of `R` at the complement of a prime ideal is a local ring. -/ instance AtPrime.localRing : LocalRing (Localization P.primeCompl) := IsLocalization.AtPrime.localRing (Localization P.primeCompl) P #align localization.at_prime.local_ring Localization.AtPrime.localRing end Localization end AtPrime namespace IsLocalization variable {A : Type*} [CommRing A] [IsDomain A] /-- The localization of an integral domain at the complement of a prime ideal is an integral domain. -/ instance isDomain_of_local_atPrime {P : Ideal A} (_ : P.IsPrime) : IsDomain (Localization.AtPrime P) := isDomain_localization P.primeCompl_le_nonZeroDivisors #align is_localization.is_domain_of_local_at_prime IsLocalization.isDomain_of_local_atPrime namespace AtPrime variable (I : Ideal R) [hI : I.IsPrime] [IsLocalization.AtPrime S I] theorem isUnit_to_map_iff (x : R) : IsUnit ((algebraMap R S) x) ↔ x ∈ I.primeCompl := ⟨fun h hx => (isPrime_of_isPrime_disjoint I.primeCompl S I hI disjoint_compl_left).ne_top <| (Ideal.map (algebraMap R S) I).eq_top_of_isUnit_mem (Ideal.mem_map_of_mem _ hx) h, fun h => map_units S ⟨x, h⟩⟩ #align is_localization.at_prime.is_unit_to_map_iff IsLocalization.AtPrime.isUnit_to_map_iff -- Can't use typeclasses to infer the `LocalRing` instance, so use an `optParam` instead -- (since `LocalRing` is a `Prop`, there should be no unification issues.) theorem to_map_mem_maximal_iff (x : R) (h : LocalRing S := localRing S I) : algebraMap R S x ∈ LocalRing.maximalIdeal S ↔ x ∈ I := not_iff_not.mp <| by simpa only [LocalRing.mem_maximalIdeal, mem_nonunits_iff, Classical.not_not] using isUnit_to_map_iff S I x #align is_localization.at_prime.to_map_mem_maximal_iff IsLocalization.AtPrime.to_map_mem_maximal_iff theorem comap_maximalIdeal (h : LocalRing S := localRing S I) : (LocalRing.maximalIdeal S).comap (algebraMap R S) = I := Ideal.ext fun x => by simpa only [Ideal.mem_comap] using to_map_mem_maximal_iff _ I x #align is_localization.at_prime.comap_maximal_ideal IsLocalization.AtPrime.comap_maximalIdeal theorem isUnit_mk'_iff (x : R) (y : I.primeCompl) : IsUnit (mk' S x y) ↔ x ∈ I.primeCompl := ⟨fun h hx => mk'_mem_iff.mpr ((to_map_mem_maximal_iff S I x).mpr hx) h, fun h => isUnit_iff_exists_inv.mpr ⟨mk' S ↑y ⟨x, h⟩, mk'_mul_mk'_eq_one ⟨x, h⟩ y⟩⟩ #align is_localization.at_prime.is_unit_mk'_iff IsLocalization.AtPrime.isUnit_mk'_iff theorem mk'_mem_maximal_iff (x : R) (y : I.primeCompl) (h : LocalRing S := localRing S I) : mk' S x y ∈ LocalRing.maximalIdeal S ↔ x ∈ I := not_iff_not.mp <| by simpa only [LocalRing.mem_maximalIdeal, mem_nonunits_iff, Classical.not_not] using isUnit_mk'_iff S I x y #align is_localization.at_prime.mk'_mem_maximal_iff IsLocalization.AtPrime.mk'_mem_maximal_iff end AtPrime end IsLocalization namespace Localization open IsLocalization attribute [local instance] Classical.propDecidable variable (I : Ideal R) [hI : I.IsPrime] variable {I} /-- The unique maximal ideal of the localization at `I.primeCompl` lies over the ideal `I`. -/ theorem AtPrime.comap_maximalIdeal : Ideal.comap (algebraMap R (Localization.AtPrime I)) (LocalRing.maximalIdeal (Localization I.primeCompl)) = I := -- Porting Note : need to provide full name IsLocalization.AtPrime.comap_maximalIdeal _ _ #align localization.at_prime.comap_maximal_ideal Localization.AtPrime.comap_maximalIdeal /-- The image of `I` in the localization at `I.primeCompl` is a maximal ideal, and in particular it is the unique maximal ideal given by the local ring structure `AtPrime.localRing` -/ theorem AtPrime.map_eq_maximalIdeal : Ideal.map (algebraMap R (Localization.AtPrime I)) I = LocalRing.maximalIdeal (Localization I.primeCompl) := by convert congr_arg (Ideal.map (algebraMap R (Localization.AtPrime I))) -- Porting Note : `algebraMap R ...` can not be solve by unification (AtPrime.comap_maximalIdeal (hI := hI)).symm -- Porting Note : can not find `hI` rw [map_comap I.primeCompl] #align localization.at_prime.map_eq_maximal_ideal Localization.AtPrime.map_eq_maximalIdeal theorem le_comap_primeCompl_iff {J : Ideal P} [hJ : J.IsPrime] {f : R →+* P} : I.primeCompl ≤ J.primeCompl.comap f ↔ J.comap f ≤ I := ⟨fun h x hx => by contrapose! hx exact h hx, fun h x hx hfxJ => hx (h hfxJ)⟩ #align localization.le_comap_prime_compl_iff Localization.le_comap_primeCompl_iff variable (I) /-- For a ring hom `f : R →+* S` and a prime ideal `J` in `S`, the induced ring hom from the localization of `R` at `J.comap f` to the localization of `S` at `J`. To make this definition more flexible, we allow any ideal `I` of `R` as input, together with a proof that `I = J.comap f`. This can be useful when `I` is not definitionally equal to `J.comap f`. -/ noncomputable def localRingHom (J : Ideal P) [J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) : Localization.AtPrime I →+* Localization.AtPrime J := IsLocalization.map (Localization.AtPrime J) f (le_comap_primeCompl_iff.mpr (ge_of_eq hIJ)) #align localization.local_ring_hom Localization.localRingHom theorem localRingHom_to_map (J : Ideal P) [J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) (x : R) : localRingHom I J f hIJ (algebraMap _ _ x) = algebraMap _ _ (f x) := map_eq _ _ #align localization.local_ring_hom_to_map Localization.localRingHom_to_map theorem localRingHom_mk' (J : Ideal P) [J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) (x : R) (y : I.primeCompl) : localRingHom I J f hIJ (IsLocalization.mk' _ x y) = IsLocalization.mk' (Localization.AtPrime J) (f x) (⟨f y, le_comap_primeCompl_iff.mpr (ge_of_eq hIJ) y.2⟩ : J.primeCompl) := map_mk' _ _ _ #align localization.local_ring_hom_mk' Localization.localRingHom_mk' instance isLocalRingHom_localRingHom (J : Ideal P) [hJ : J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) : IsLocalRingHom (localRingHom I J f hIJ) := IsLocalRingHom.mk fun x hx => by rcases IsLocalization.mk'_surjective I.primeCompl x with ⟨r, s, rfl⟩ rw [localRingHom_mk'] at hx rw [AtPrime.isUnit_mk'_iff] at hx ⊢ exact fun hr => hx ((SetLike.ext_iff.mp hIJ r).mp hr) #align localization.is_local_ring_hom_local_ring_hom Localization.isLocalRingHom_localRingHom theorem localRingHom_unique (J : Ideal P) [J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) {j : Localization.AtPrime I →+* Localization.AtPrime J} (hj : ∀ x : R, j (algebraMap _ _ x) = algebraMap _ _ (f x)) : localRingHom I J f hIJ = j := map_unique _ _ hj #align localization.local_ring_hom_unique Localization.localRingHom_unique @[simp] theorem localRingHom_id : localRingHom I I (RingHom.id R) (Ideal.comap_id I).symm = RingHom.id _ := localRingHom_unique _ _ _ _ fun _ => rfl #align localization.local_ring_hom_id Localization.localRingHom_id -- Porting note : simplifier won't pick up this lemma, so deleted @[simp] theorem localRingHom_comp {S : Type*} [CommSemiring S] (J : Ideal S) [hJ : J.IsPrime] (K : Ideal P) [hK : K.IsPrime] (f : R →+* S) (hIJ : I = J.comap f) (g : S →+* P) (hJK : J = K.comap g) : localRingHom I K (g.comp f) (by
rw [hIJ, hJK, Ideal.comap_comap f g]
theorem localRingHom_comp {S : Type*} [CommSemiring S] (J : Ideal S) [hJ : J.IsPrime] (K : Ideal P) [hK : K.IsPrime] (f : R →+* S) (hIJ : I = J.comap f) (g : S →+* P) (hJK : J = K.comap g) : localRingHom I K (g.comp f) (by
Mathlib.RingTheory.Localization.AtPrime.259_0.QSwWrbtcZl7L7lq
theorem localRingHom_comp {S : Type*} [CommSemiring S] (J : Ideal S) [hJ : J.IsPrime] (K : Ideal P) [hK : K.IsPrime] (f : R →+* S) (hIJ : I = J.comap f) (g : S →+* P) (hJK : J = K.comap g) : localRingHom I K (g.comp f) (by rw [hIJ, hJK, Ideal.comap_comap f g]) = (localRingHom J K g hJK).comp (localRingHom I J f hIJ)
Mathlib_RingTheory_Localization_AtPrime
R : Type u_1 inst✝⁴ : CommSemiring R M : Submonoid R S✝ : Type u_2 inst✝³ : CommSemiring S✝ inst✝² : Algebra R S✝ P : Type u_3 inst✝¹ : CommSemiring P I : Ideal R hI : Ideal.IsPrime I S : Type u_4 inst✝ : CommSemiring S J : Ideal S hJ : Ideal.IsPrime J K : Ideal P hK : Ideal.IsPrime K f : R →+* S hIJ : I = Ideal.comap f J g : S →+* P hJK : J = Ideal.comap g K r : R ⊢ (RingHom.comp (localRingHom J K g hJK) (localRingHom I J f hIJ)) ((algebraMap R (Localization.AtPrime I)) r) = (algebraMap P (Localization.AtPrime K)) ((RingHom.comp g f) r)
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baanen -/ import Mathlib.RingTheory.Ideal.LocalRing import Mathlib.RingTheory.Localization.Ideal #align_import ring_theory.localization.at_prime from "leanprover-community/mathlib"@"b86c528d08a52a1fdb50d999232408e1c7e85d7d" /-! # Localizations of commutative rings at the complement of a prime ideal ## Main definitions * `IsLocalization.AtPrime (P : Ideal R) [IsPrime P] (S : Type*)` expresses that `S` is a localization at (the complement of) a prime ideal `P`, as an abbreviation of `IsLocalization P.prime_compl S` ## Main results * `IsLocalization.AtPrime.localRing`: a theorem (not an instance) stating a localization at the complement of a prime ideal is a local ring ## Implementation notes See `RingTheory.Localization.Basic` for a design overview. ## Tags localization, ring localization, commutative ring localization, characteristic predicate, commutative ring, field of fractions -/ variable {R : Type*} [CommSemiring R] (M : Submonoid R) (S : Type*) [CommSemiring S] variable [Algebra R S] {P : Type*} [CommSemiring P] section AtPrime variable (P : Ideal R) [hp : P.IsPrime] namespace Ideal /-- The complement of a prime ideal `P ⊆ R` is a submonoid of `R`. -/ def primeCompl : Submonoid R where carrier := (Pᶜ : Set R) one_mem' := by convert P.ne_top_iff_one.1 hp.1 mul_mem' {x y} hnx hny hxy := Or.casesOn (hp.mem_or_mem hxy) hnx hny #align ideal.prime_compl Ideal.primeCompl theorem primeCompl_le_nonZeroDivisors [NoZeroDivisors R] : P.primeCompl ≤ nonZeroDivisors R := le_nonZeroDivisors_of_noZeroDivisors <| not_not_intro P.zero_mem #align ideal.prime_compl_le_non_zero_divisors Ideal.primeCompl_le_nonZeroDivisors end Ideal /-- Given a prime ideal `P`, the typeclass `IsLocalization.AtPrime S P` states that `S` is isomorphic to the localization of `R` at the complement of `P`. -/ protected abbrev IsLocalization.AtPrime := IsLocalization P.primeCompl S #align is_localization.at_prime IsLocalization.AtPrime /-- Given a prime ideal `P`, `Localization.AtPrime P` is a localization of `R` at the complement of `P`, as a quotient type. -/ protected abbrev Localization.AtPrime := Localization P.primeCompl #align localization.at_prime Localization.AtPrime namespace IsLocalization theorem AtPrime.Nontrivial [IsLocalization.AtPrime S P] : Nontrivial S := nontrivial_of_ne (0 : S) 1 fun hze => by rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze obtain ⟨t, ht⟩ := (eq_iff_exists P.primeCompl S).1 hze have htz : (t : R) = 0 := by simpa using ht.symm exact t.2 (htz.symm ▸ P.zero_mem : ↑t ∈ P) #align is_localization.at_prime.nontrivial IsLocalization.AtPrime.Nontrivial theorem AtPrime.localRing [IsLocalization.AtPrime S P] : LocalRing S := -- Porting Note : since I couldn't get local instance running, I just specify it manually letI := AtPrime.Nontrivial S P LocalRing.of_nonunits_add (by intro x y hx hy hu cases' isUnit_iff_exists_inv.1 hu with z hxyz have : ∀ {r : R} {s : P.primeCompl}, mk' S r s ∈ nonunits S → r ∈ P := fun {r s} => not_imp_comm.1 fun nr => isUnit_iff_exists_inv.2 ⟨mk' S ↑s (⟨r, nr⟩ : P.primeCompl), mk'_mul_mk'_eq_one' _ _ <| show r ∈ P.primeCompl from nr⟩ rcases mk'_surjective P.primeCompl x with ⟨rx, sx, hrx⟩ rcases mk'_surjective P.primeCompl y with ⟨ry, sy, hry⟩ rcases mk'_surjective P.primeCompl z with ⟨rz, sz, hrz⟩ rw [← hrx, ← hry, ← hrz, ← mk'_add, ← mk'_mul, ← mk'_self S P.primeCompl.one_mem] at hxyz rw [← hrx] at hx rw [← hry] at hy obtain ⟨t, ht⟩ := IsLocalization.eq.1 hxyz simp only [mul_one, one_mul, Submonoid.coe_mul, Subtype.coe_mk] at ht suffices : (t : R) * (sx * sy * sz) ∈ P exact not_or_of_not (mt hp.mem_or_mem <| not_or_of_not sx.2 sy.2) sz.2 (hp.mem_or_mem <| (hp.mem_or_mem this).resolve_left t.2) rw [← ht] exact P.mul_mem_left _ <| P.mul_mem_right _ <| P.add_mem (P.mul_mem_right _ <| this hx) <| P.mul_mem_right _ <| this hy) #align is_localization.at_prime.local_ring IsLocalization.AtPrime.localRing end IsLocalization namespace Localization /-- The localization of `R` at the complement of a prime ideal is a local ring. -/ instance AtPrime.localRing : LocalRing (Localization P.primeCompl) := IsLocalization.AtPrime.localRing (Localization P.primeCompl) P #align localization.at_prime.local_ring Localization.AtPrime.localRing end Localization end AtPrime namespace IsLocalization variable {A : Type*} [CommRing A] [IsDomain A] /-- The localization of an integral domain at the complement of a prime ideal is an integral domain. -/ instance isDomain_of_local_atPrime {P : Ideal A} (_ : P.IsPrime) : IsDomain (Localization.AtPrime P) := isDomain_localization P.primeCompl_le_nonZeroDivisors #align is_localization.is_domain_of_local_at_prime IsLocalization.isDomain_of_local_atPrime namespace AtPrime variable (I : Ideal R) [hI : I.IsPrime] [IsLocalization.AtPrime S I] theorem isUnit_to_map_iff (x : R) : IsUnit ((algebraMap R S) x) ↔ x ∈ I.primeCompl := ⟨fun h hx => (isPrime_of_isPrime_disjoint I.primeCompl S I hI disjoint_compl_left).ne_top <| (Ideal.map (algebraMap R S) I).eq_top_of_isUnit_mem (Ideal.mem_map_of_mem _ hx) h, fun h => map_units S ⟨x, h⟩⟩ #align is_localization.at_prime.is_unit_to_map_iff IsLocalization.AtPrime.isUnit_to_map_iff -- Can't use typeclasses to infer the `LocalRing` instance, so use an `optParam` instead -- (since `LocalRing` is a `Prop`, there should be no unification issues.) theorem to_map_mem_maximal_iff (x : R) (h : LocalRing S := localRing S I) : algebraMap R S x ∈ LocalRing.maximalIdeal S ↔ x ∈ I := not_iff_not.mp <| by simpa only [LocalRing.mem_maximalIdeal, mem_nonunits_iff, Classical.not_not] using isUnit_to_map_iff S I x #align is_localization.at_prime.to_map_mem_maximal_iff IsLocalization.AtPrime.to_map_mem_maximal_iff theorem comap_maximalIdeal (h : LocalRing S := localRing S I) : (LocalRing.maximalIdeal S).comap (algebraMap R S) = I := Ideal.ext fun x => by simpa only [Ideal.mem_comap] using to_map_mem_maximal_iff _ I x #align is_localization.at_prime.comap_maximal_ideal IsLocalization.AtPrime.comap_maximalIdeal theorem isUnit_mk'_iff (x : R) (y : I.primeCompl) : IsUnit (mk' S x y) ↔ x ∈ I.primeCompl := ⟨fun h hx => mk'_mem_iff.mpr ((to_map_mem_maximal_iff S I x).mpr hx) h, fun h => isUnit_iff_exists_inv.mpr ⟨mk' S ↑y ⟨x, h⟩, mk'_mul_mk'_eq_one ⟨x, h⟩ y⟩⟩ #align is_localization.at_prime.is_unit_mk'_iff IsLocalization.AtPrime.isUnit_mk'_iff theorem mk'_mem_maximal_iff (x : R) (y : I.primeCompl) (h : LocalRing S := localRing S I) : mk' S x y ∈ LocalRing.maximalIdeal S ↔ x ∈ I := not_iff_not.mp <| by simpa only [LocalRing.mem_maximalIdeal, mem_nonunits_iff, Classical.not_not] using isUnit_mk'_iff S I x y #align is_localization.at_prime.mk'_mem_maximal_iff IsLocalization.AtPrime.mk'_mem_maximal_iff end AtPrime end IsLocalization namespace Localization open IsLocalization attribute [local instance] Classical.propDecidable variable (I : Ideal R) [hI : I.IsPrime] variable {I} /-- The unique maximal ideal of the localization at `I.primeCompl` lies over the ideal `I`. -/ theorem AtPrime.comap_maximalIdeal : Ideal.comap (algebraMap R (Localization.AtPrime I)) (LocalRing.maximalIdeal (Localization I.primeCompl)) = I := -- Porting Note : need to provide full name IsLocalization.AtPrime.comap_maximalIdeal _ _ #align localization.at_prime.comap_maximal_ideal Localization.AtPrime.comap_maximalIdeal /-- The image of `I` in the localization at `I.primeCompl` is a maximal ideal, and in particular it is the unique maximal ideal given by the local ring structure `AtPrime.localRing` -/ theorem AtPrime.map_eq_maximalIdeal : Ideal.map (algebraMap R (Localization.AtPrime I)) I = LocalRing.maximalIdeal (Localization I.primeCompl) := by convert congr_arg (Ideal.map (algebraMap R (Localization.AtPrime I))) -- Porting Note : `algebraMap R ...` can not be solve by unification (AtPrime.comap_maximalIdeal (hI := hI)).symm -- Porting Note : can not find `hI` rw [map_comap I.primeCompl] #align localization.at_prime.map_eq_maximal_ideal Localization.AtPrime.map_eq_maximalIdeal theorem le_comap_primeCompl_iff {J : Ideal P} [hJ : J.IsPrime] {f : R →+* P} : I.primeCompl ≤ J.primeCompl.comap f ↔ J.comap f ≤ I := ⟨fun h x hx => by contrapose! hx exact h hx, fun h x hx hfxJ => hx (h hfxJ)⟩ #align localization.le_comap_prime_compl_iff Localization.le_comap_primeCompl_iff variable (I) /-- For a ring hom `f : R →+* S` and a prime ideal `J` in `S`, the induced ring hom from the localization of `R` at `J.comap f` to the localization of `S` at `J`. To make this definition more flexible, we allow any ideal `I` of `R` as input, together with a proof that `I = J.comap f`. This can be useful when `I` is not definitionally equal to `J.comap f`. -/ noncomputable def localRingHom (J : Ideal P) [J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) : Localization.AtPrime I →+* Localization.AtPrime J := IsLocalization.map (Localization.AtPrime J) f (le_comap_primeCompl_iff.mpr (ge_of_eq hIJ)) #align localization.local_ring_hom Localization.localRingHom theorem localRingHom_to_map (J : Ideal P) [J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) (x : R) : localRingHom I J f hIJ (algebraMap _ _ x) = algebraMap _ _ (f x) := map_eq _ _ #align localization.local_ring_hom_to_map Localization.localRingHom_to_map theorem localRingHom_mk' (J : Ideal P) [J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) (x : R) (y : I.primeCompl) : localRingHom I J f hIJ (IsLocalization.mk' _ x y) = IsLocalization.mk' (Localization.AtPrime J) (f x) (⟨f y, le_comap_primeCompl_iff.mpr (ge_of_eq hIJ) y.2⟩ : J.primeCompl) := map_mk' _ _ _ #align localization.local_ring_hom_mk' Localization.localRingHom_mk' instance isLocalRingHom_localRingHom (J : Ideal P) [hJ : J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) : IsLocalRingHom (localRingHom I J f hIJ) := IsLocalRingHom.mk fun x hx => by rcases IsLocalization.mk'_surjective I.primeCompl x with ⟨r, s, rfl⟩ rw [localRingHom_mk'] at hx rw [AtPrime.isUnit_mk'_iff] at hx ⊢ exact fun hr => hx ((SetLike.ext_iff.mp hIJ r).mp hr) #align localization.is_local_ring_hom_local_ring_hom Localization.isLocalRingHom_localRingHom theorem localRingHom_unique (J : Ideal P) [J.IsPrime] (f : R →+* P) (hIJ : I = J.comap f) {j : Localization.AtPrime I →+* Localization.AtPrime J} (hj : ∀ x : R, j (algebraMap _ _ x) = algebraMap _ _ (f x)) : localRingHom I J f hIJ = j := map_unique _ _ hj #align localization.local_ring_hom_unique Localization.localRingHom_unique @[simp] theorem localRingHom_id : localRingHom I I (RingHom.id R) (Ideal.comap_id I).symm = RingHom.id _ := localRingHom_unique _ _ _ _ fun _ => rfl #align localization.local_ring_hom_id Localization.localRingHom_id -- Porting note : simplifier won't pick up this lemma, so deleted @[simp] theorem localRingHom_comp {S : Type*} [CommSemiring S] (J : Ideal S) [hJ : J.IsPrime] (K : Ideal P) [hK : K.IsPrime] (f : R →+* S) (hIJ : I = J.comap f) (g : S →+* P) (hJK : J = K.comap g) : localRingHom I K (g.comp f) (by rw [hIJ, hJK, Ideal.comap_comap f g]) = (localRingHom J K g hJK).comp (localRingHom I J f hIJ) := localRingHom_unique _ _ _ _ fun r => by
simp only [Function.comp_apply, RingHom.coe_comp, localRingHom_to_map]
theorem localRingHom_comp {S : Type*} [CommSemiring S] (J : Ideal S) [hJ : J.IsPrime] (K : Ideal P) [hK : K.IsPrime] (f : R →+* S) (hIJ : I = J.comap f) (g : S →+* P) (hJK : J = K.comap g) : localRingHom I K (g.comp f) (by rw [hIJ, hJK, Ideal.comap_comap f g]) = (localRingHom J K g hJK).comp (localRingHom I J f hIJ) := localRingHom_unique _ _ _ _ fun r => by
Mathlib.RingTheory.Localization.AtPrime.259_0.QSwWrbtcZl7L7lq
theorem localRingHom_comp {S : Type*} [CommSemiring S] (J : Ideal S) [hJ : J.IsPrime] (K : Ideal P) [hK : K.IsPrime] (f : R →+* S) (hIJ : I = J.comap f) (g : S →+* P) (hJK : J = K.comap g) : localRingHom I K (g.comp f) (by rw [hIJ, hJK, Ideal.comap_comap f g]) = (localRingHom J K g hJK).comp (localRingHom I J f hIJ)
Mathlib_RingTheory_Localization_AtPrime
V : Type u inst✝² : Category.{v, u} V inst✝¹ : HasZeroMorphisms V ι : Type u_1 c : ComplexShape ι T : Type u_2 inst✝ : Category.{?u.78, u_2} T C : HomologicalComplex (T ⥤ V) c t : T i j : ι h : ¬ComplexShape.Rel c i j ⊢ (fun i j => (d C i j).app t) i j = 0
/- Copyright (c) 2021 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin -/ import Mathlib.Algebra.Homology.HomologicalComplex #align_import algebra.homology.functor from "leanprover-community/mathlib"@"8e25bb6c1645bb80670e13848b79a54aa45cb84f" /-! # Complexes in functor categories We can view a complex valued in a functor category `T ⥤ V` as a functor from `T` to complexes valued in `V`. ## Future work In fact this is an equivalence of categories. -/ universe v u open CategoryTheory open CategoryTheory.Limits namespace HomologicalComplex variable {V : Type u} [Category.{v} V] [HasZeroMorphisms V] variable {ι : Type*} {c : ComplexShape ι} /-- A complex of functors gives a functor to complexes. -/ @[simps obj map] def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) : T ⥤ HomologicalComplex V c where obj t := { X := fun i => (C.X i).obj t d := fun i j => (C.d i j).app t d_comp_d' := fun i j k _ _ => by have := C.d_comp_d i j k rw [NatTrans.ext_iff, Function.funext_iff] at this exact this t shape := fun i j h => by
have := C.shape _ _ h
/-- A complex of functors gives a functor to complexes. -/ @[simps obj map] def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) : T ⥤ HomologicalComplex V c where obj t := { X := fun i => (C.X i).obj t d := fun i j => (C.d i j).app t d_comp_d' := fun i j k _ _ => by have := C.d_comp_d i j k rw [NatTrans.ext_iff, Function.funext_iff] at this exact this t shape := fun i j h => by
Mathlib.Algebra.Homology.Functor.34_0.DFL0Z3rvWsk3pdU
/-- A complex of functors gives a functor to complexes. -/ @[simps obj map] def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) : T ⥤ HomologicalComplex V c where obj t
Mathlib_Algebra_Homology_Functor
V : Type u inst✝² : Category.{v, u} V inst✝¹ : HasZeroMorphisms V ι : Type u_1 c : ComplexShape ι T : Type u_2 inst✝ : Category.{?u.78, u_2} T C : HomologicalComplex (T ⥤ V) c t : T i j : ι h : ¬ComplexShape.Rel c i j this : d C i j = 0 ⊢ (fun i j => (d C i j).app t) i j = 0
/- Copyright (c) 2021 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin -/ import Mathlib.Algebra.Homology.HomologicalComplex #align_import algebra.homology.functor from "leanprover-community/mathlib"@"8e25bb6c1645bb80670e13848b79a54aa45cb84f" /-! # Complexes in functor categories We can view a complex valued in a functor category `T ⥤ V` as a functor from `T` to complexes valued in `V`. ## Future work In fact this is an equivalence of categories. -/ universe v u open CategoryTheory open CategoryTheory.Limits namespace HomologicalComplex variable {V : Type u} [Category.{v} V] [HasZeroMorphisms V] variable {ι : Type*} {c : ComplexShape ι} /-- A complex of functors gives a functor to complexes. -/ @[simps obj map] def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) : T ⥤ HomologicalComplex V c where obj t := { X := fun i => (C.X i).obj t d := fun i j => (C.d i j).app t d_comp_d' := fun i j k _ _ => by have := C.d_comp_d i j k rw [NatTrans.ext_iff, Function.funext_iff] at this exact this t shape := fun i j h => by have := C.shape _ _ h
rw [NatTrans.ext_iff, Function.funext_iff] at this
/-- A complex of functors gives a functor to complexes. -/ @[simps obj map] def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) : T ⥤ HomologicalComplex V c where obj t := { X := fun i => (C.X i).obj t d := fun i j => (C.d i j).app t d_comp_d' := fun i j k _ _ => by have := C.d_comp_d i j k rw [NatTrans.ext_iff, Function.funext_iff] at this exact this t shape := fun i j h => by have := C.shape _ _ h
Mathlib.Algebra.Homology.Functor.34_0.DFL0Z3rvWsk3pdU
/-- A complex of functors gives a functor to complexes. -/ @[simps obj map] def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) : T ⥤ HomologicalComplex V c where obj t
Mathlib_Algebra_Homology_Functor
V : Type u inst✝² : Category.{v, u} V inst✝¹ : HasZeroMorphisms V ι : Type u_1 c : ComplexShape ι T : Type u_2 inst✝ : Category.{?u.78, u_2} T C : HomologicalComplex (T ⥤ V) c t : T i j : ι h : ¬ComplexShape.Rel c i j this : ∀ (a : T), (d C i j).app a = 0.app a ⊢ (fun i j => (d C i j).app t) i j = 0
/- Copyright (c) 2021 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin -/ import Mathlib.Algebra.Homology.HomologicalComplex #align_import algebra.homology.functor from "leanprover-community/mathlib"@"8e25bb6c1645bb80670e13848b79a54aa45cb84f" /-! # Complexes in functor categories We can view a complex valued in a functor category `T ⥤ V` as a functor from `T` to complexes valued in `V`. ## Future work In fact this is an equivalence of categories. -/ universe v u open CategoryTheory open CategoryTheory.Limits namespace HomologicalComplex variable {V : Type u} [Category.{v} V] [HasZeroMorphisms V] variable {ι : Type*} {c : ComplexShape ι} /-- A complex of functors gives a functor to complexes. -/ @[simps obj map] def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) : T ⥤ HomologicalComplex V c where obj t := { X := fun i => (C.X i).obj t d := fun i j => (C.d i j).app t d_comp_d' := fun i j k _ _ => by have := C.d_comp_d i j k rw [NatTrans.ext_iff, Function.funext_iff] at this exact this t shape := fun i j h => by have := C.shape _ _ h rw [NatTrans.ext_iff, Function.funext_iff] at this
exact this t
/-- A complex of functors gives a functor to complexes. -/ @[simps obj map] def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) : T ⥤ HomologicalComplex V c where obj t := { X := fun i => (C.X i).obj t d := fun i j => (C.d i j).app t d_comp_d' := fun i j k _ _ => by have := C.d_comp_d i j k rw [NatTrans.ext_iff, Function.funext_iff] at this exact this t shape := fun i j h => by have := C.shape _ _ h rw [NatTrans.ext_iff, Function.funext_iff] at this
Mathlib.Algebra.Homology.Functor.34_0.DFL0Z3rvWsk3pdU
/-- A complex of functors gives a functor to complexes. -/ @[simps obj map] def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) : T ⥤ HomologicalComplex V c where obj t
Mathlib_Algebra_Homology_Functor
V : Type u inst✝² : Category.{v, u} V inst✝¹ : HasZeroMorphisms V ι : Type u_1 c : ComplexShape ι T : Type u_2 inst✝ : Category.{?u.78, u_2} T C : HomologicalComplex (T ⥤ V) c t : T i j k : ι x✝¹ : ComplexShape.Rel c i j x✝ : ComplexShape.Rel c j k ⊢ (fun i j => (d C i j).app t) i j ≫ (fun i j => (d C i j).app t) j k = 0
/- Copyright (c) 2021 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin -/ import Mathlib.Algebra.Homology.HomologicalComplex #align_import algebra.homology.functor from "leanprover-community/mathlib"@"8e25bb6c1645bb80670e13848b79a54aa45cb84f" /-! # Complexes in functor categories We can view a complex valued in a functor category `T ⥤ V` as a functor from `T` to complexes valued in `V`. ## Future work In fact this is an equivalence of categories. -/ universe v u open CategoryTheory open CategoryTheory.Limits namespace HomologicalComplex variable {V : Type u} [Category.{v} V] [HasZeroMorphisms V] variable {ι : Type*} {c : ComplexShape ι} /-- A complex of functors gives a functor to complexes. -/ @[simps obj map] def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) : T ⥤ HomologicalComplex V c where obj t := { X := fun i => (C.X i).obj t d := fun i j => (C.d i j).app t d_comp_d' := fun i j k _ _ => by
have := C.d_comp_d i j k
/-- A complex of functors gives a functor to complexes. -/ @[simps obj map] def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) : T ⥤ HomologicalComplex V c where obj t := { X := fun i => (C.X i).obj t d := fun i j => (C.d i j).app t d_comp_d' := fun i j k _ _ => by
Mathlib.Algebra.Homology.Functor.34_0.DFL0Z3rvWsk3pdU
/-- A complex of functors gives a functor to complexes. -/ @[simps obj map] def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) : T ⥤ HomologicalComplex V c where obj t
Mathlib_Algebra_Homology_Functor
V : Type u inst✝² : Category.{v, u} V inst✝¹ : HasZeroMorphisms V ι : Type u_1 c : ComplexShape ι T : Type u_2 inst✝ : Category.{?u.78, u_2} T C : HomologicalComplex (T ⥤ V) c t : T i j k : ι x✝¹ : ComplexShape.Rel c i j x✝ : ComplexShape.Rel c j k this : d C i j ≫ d C j k = 0 ⊢ (fun i j => (d C i j).app t) i j ≫ (fun i j => (d C i j).app t) j k = 0
/- Copyright (c) 2021 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin -/ import Mathlib.Algebra.Homology.HomologicalComplex #align_import algebra.homology.functor from "leanprover-community/mathlib"@"8e25bb6c1645bb80670e13848b79a54aa45cb84f" /-! # Complexes in functor categories We can view a complex valued in a functor category `T ⥤ V` as a functor from `T` to complexes valued in `V`. ## Future work In fact this is an equivalence of categories. -/ universe v u open CategoryTheory open CategoryTheory.Limits namespace HomologicalComplex variable {V : Type u} [Category.{v} V] [HasZeroMorphisms V] variable {ι : Type*} {c : ComplexShape ι} /-- A complex of functors gives a functor to complexes. -/ @[simps obj map] def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) : T ⥤ HomologicalComplex V c where obj t := { X := fun i => (C.X i).obj t d := fun i j => (C.d i j).app t d_comp_d' := fun i j k _ _ => by have := C.d_comp_d i j k
rw [NatTrans.ext_iff, Function.funext_iff] at this
/-- A complex of functors gives a functor to complexes. -/ @[simps obj map] def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) : T ⥤ HomologicalComplex V c where obj t := { X := fun i => (C.X i).obj t d := fun i j => (C.d i j).app t d_comp_d' := fun i j k _ _ => by have := C.d_comp_d i j k
Mathlib.Algebra.Homology.Functor.34_0.DFL0Z3rvWsk3pdU
/-- A complex of functors gives a functor to complexes. -/ @[simps obj map] def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) : T ⥤ HomologicalComplex V c where obj t
Mathlib_Algebra_Homology_Functor
V : Type u inst✝² : Category.{v, u} V inst✝¹ : HasZeroMorphisms V ι : Type u_1 c : ComplexShape ι T : Type u_2 inst✝ : Category.{?u.78, u_2} T C : HomologicalComplex (T ⥤ V) c t : T i j k : ι x✝¹ : ComplexShape.Rel c i j x✝ : ComplexShape.Rel c j k this : ∀ (a : T), (d C i j ≫ d C j k).app a = 0.app a ⊢ (fun i j => (d C i j).app t) i j ≫ (fun i j => (d C i j).app t) j k = 0
/- Copyright (c) 2021 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin -/ import Mathlib.Algebra.Homology.HomologicalComplex #align_import algebra.homology.functor from "leanprover-community/mathlib"@"8e25bb6c1645bb80670e13848b79a54aa45cb84f" /-! # Complexes in functor categories We can view a complex valued in a functor category `T ⥤ V` as a functor from `T` to complexes valued in `V`. ## Future work In fact this is an equivalence of categories. -/ universe v u open CategoryTheory open CategoryTheory.Limits namespace HomologicalComplex variable {V : Type u} [Category.{v} V] [HasZeroMorphisms V] variable {ι : Type*} {c : ComplexShape ι} /-- A complex of functors gives a functor to complexes. -/ @[simps obj map] def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) : T ⥤ HomologicalComplex V c where obj t := { X := fun i => (C.X i).obj t d := fun i j => (C.d i j).app t d_comp_d' := fun i j k _ _ => by have := C.d_comp_d i j k rw [NatTrans.ext_iff, Function.funext_iff] at this
exact this t
/-- A complex of functors gives a functor to complexes. -/ @[simps obj map] def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) : T ⥤ HomologicalComplex V c where obj t := { X := fun i => (C.X i).obj t d := fun i j => (C.d i j).app t d_comp_d' := fun i j k _ _ => by have := C.d_comp_d i j k rw [NatTrans.ext_iff, Function.funext_iff] at this
Mathlib.Algebra.Homology.Functor.34_0.DFL0Z3rvWsk3pdU
/-- A complex of functors gives a functor to complexes. -/ @[simps obj map] def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) : T ⥤ HomologicalComplex V c where obj t
Mathlib_Algebra_Homology_Functor
V : Type u inst✝² : Category.{v, u} V inst✝¹ : HasZeroMorphisms V ι : Type u_1 c : ComplexShape ι T : Type u_2 inst✝ : Category.{?u.78, u_2} T C : HomologicalComplex (T ⥤ V) c t : T ⊢ { obj := fun t => mk (fun i => (X C i).obj t) fun i j => (d C i j).app t, map := fun {X Y} h => Hom.mk fun i => (HomologicalComplex.X C i).map h }.map (𝟙 t) = 𝟙 ({ obj := fun t => mk (fun i => (X C i).obj t) fun i j => (d C i j).app t, map := fun {X Y} h => Hom.mk fun i => (HomologicalComplex.X C i).map h }.obj t)
/- Copyright (c) 2021 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin -/ import Mathlib.Algebra.Homology.HomologicalComplex #align_import algebra.homology.functor from "leanprover-community/mathlib"@"8e25bb6c1645bb80670e13848b79a54aa45cb84f" /-! # Complexes in functor categories We can view a complex valued in a functor category `T ⥤ V` as a functor from `T` to complexes valued in `V`. ## Future work In fact this is an equivalence of categories. -/ universe v u open CategoryTheory open CategoryTheory.Limits namespace HomologicalComplex variable {V : Type u} [Category.{v} V] [HasZeroMorphisms V] variable {ι : Type*} {c : ComplexShape ι} /-- A complex of functors gives a functor to complexes. -/ @[simps obj map] def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) : T ⥤ HomologicalComplex V c where obj t := { X := fun i => (C.X i).obj t d := fun i j => (C.d i j).app t d_comp_d' := fun i j k _ _ => by have := C.d_comp_d i j k rw [NatTrans.ext_iff, Function.funext_iff] at this exact this t shape := fun i j h => by have := C.shape _ _ h rw [NatTrans.ext_iff, Function.funext_iff] at this exact this t } map h := { f := fun i => (C.X i).map h comm' := fun i j _ => NatTrans.naturality _ _ } map_id t := by
ext i
/-- A complex of functors gives a functor to complexes. -/ @[simps obj map] def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) : T ⥤ HomologicalComplex V c where obj t := { X := fun i => (C.X i).obj t d := fun i j => (C.d i j).app t d_comp_d' := fun i j k _ _ => by have := C.d_comp_d i j k rw [NatTrans.ext_iff, Function.funext_iff] at this exact this t shape := fun i j h => by have := C.shape _ _ h rw [NatTrans.ext_iff, Function.funext_iff] at this exact this t } map h := { f := fun i => (C.X i).map h comm' := fun i j _ => NatTrans.naturality _ _ } map_id t := by
Mathlib.Algebra.Homology.Functor.34_0.DFL0Z3rvWsk3pdU
/-- A complex of functors gives a functor to complexes. -/ @[simps obj map] def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) : T ⥤ HomologicalComplex V c where obj t
Mathlib_Algebra_Homology_Functor
case h V : Type u inst✝² : Category.{v, u} V inst✝¹ : HasZeroMorphisms V ι : Type u_1 c : ComplexShape ι T : Type u_2 inst✝ : Category.{?u.78, u_2} T C : HomologicalComplex (T ⥤ V) c t : T i : ι ⊢ Hom.f ({ obj := fun t => mk (fun i => (X C i).obj t) fun i j => (d C i j).app t, map := fun {X Y} h => Hom.mk fun i => (HomologicalComplex.X C i).map h }.map (𝟙 t)) i = Hom.f (𝟙 ({ obj := fun t => mk (fun i => (X C i).obj t) fun i j => (d C i j).app t, map := fun {X Y} h => Hom.mk fun i => (HomologicalComplex.X C i).map h }.obj t)) i
/- Copyright (c) 2021 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin -/ import Mathlib.Algebra.Homology.HomologicalComplex #align_import algebra.homology.functor from "leanprover-community/mathlib"@"8e25bb6c1645bb80670e13848b79a54aa45cb84f" /-! # Complexes in functor categories We can view a complex valued in a functor category `T ⥤ V` as a functor from `T` to complexes valued in `V`. ## Future work In fact this is an equivalence of categories. -/ universe v u open CategoryTheory open CategoryTheory.Limits namespace HomologicalComplex variable {V : Type u} [Category.{v} V] [HasZeroMorphisms V] variable {ι : Type*} {c : ComplexShape ι} /-- A complex of functors gives a functor to complexes. -/ @[simps obj map] def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) : T ⥤ HomologicalComplex V c where obj t := { X := fun i => (C.X i).obj t d := fun i j => (C.d i j).app t d_comp_d' := fun i j k _ _ => by have := C.d_comp_d i j k rw [NatTrans.ext_iff, Function.funext_iff] at this exact this t shape := fun i j h => by have := C.shape _ _ h rw [NatTrans.ext_iff, Function.funext_iff] at this exact this t } map h := { f := fun i => (C.X i).map h comm' := fun i j _ => NatTrans.naturality _ _ } map_id t := by ext i
dsimp
/-- A complex of functors gives a functor to complexes. -/ @[simps obj map] def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) : T ⥤ HomologicalComplex V c where obj t := { X := fun i => (C.X i).obj t d := fun i j => (C.d i j).app t d_comp_d' := fun i j k _ _ => by have := C.d_comp_d i j k rw [NatTrans.ext_iff, Function.funext_iff] at this exact this t shape := fun i j h => by have := C.shape _ _ h rw [NatTrans.ext_iff, Function.funext_iff] at this exact this t } map h := { f := fun i => (C.X i).map h comm' := fun i j _ => NatTrans.naturality _ _ } map_id t := by ext i
Mathlib.Algebra.Homology.Functor.34_0.DFL0Z3rvWsk3pdU
/-- A complex of functors gives a functor to complexes. -/ @[simps obj map] def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) : T ⥤ HomologicalComplex V c where obj t
Mathlib_Algebra_Homology_Functor
case h V : Type u inst✝² : Category.{v, u} V inst✝¹ : HasZeroMorphisms V ι : Type u_1 c : ComplexShape ι T : Type u_2 inst✝ : Category.{?u.78, u_2} T C : HomologicalComplex (T ⥤ V) c t : T i : ι ⊢ (X C i).map (𝟙 t) = 𝟙 ((X C i).obj t)
/- Copyright (c) 2021 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin -/ import Mathlib.Algebra.Homology.HomologicalComplex #align_import algebra.homology.functor from "leanprover-community/mathlib"@"8e25bb6c1645bb80670e13848b79a54aa45cb84f" /-! # Complexes in functor categories We can view a complex valued in a functor category `T ⥤ V` as a functor from `T` to complexes valued in `V`. ## Future work In fact this is an equivalence of categories. -/ universe v u open CategoryTheory open CategoryTheory.Limits namespace HomologicalComplex variable {V : Type u} [Category.{v} V] [HasZeroMorphisms V] variable {ι : Type*} {c : ComplexShape ι} /-- A complex of functors gives a functor to complexes. -/ @[simps obj map] def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) : T ⥤ HomologicalComplex V c where obj t := { X := fun i => (C.X i).obj t d := fun i j => (C.d i j).app t d_comp_d' := fun i j k _ _ => by have := C.d_comp_d i j k rw [NatTrans.ext_iff, Function.funext_iff] at this exact this t shape := fun i j h => by have := C.shape _ _ h rw [NatTrans.ext_iff, Function.funext_iff] at this exact this t } map h := { f := fun i => (C.X i).map h comm' := fun i j _ => NatTrans.naturality _ _ } map_id t := by ext i dsimp
rw [(C.X i).map_id]
/-- A complex of functors gives a functor to complexes. -/ @[simps obj map] def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) : T ⥤ HomologicalComplex V c where obj t := { X := fun i => (C.X i).obj t d := fun i j => (C.d i j).app t d_comp_d' := fun i j k _ _ => by have := C.d_comp_d i j k rw [NatTrans.ext_iff, Function.funext_iff] at this exact this t shape := fun i j h => by have := C.shape _ _ h rw [NatTrans.ext_iff, Function.funext_iff] at this exact this t } map h := { f := fun i => (C.X i).map h comm' := fun i j _ => NatTrans.naturality _ _ } map_id t := by ext i dsimp
Mathlib.Algebra.Homology.Functor.34_0.DFL0Z3rvWsk3pdU
/-- A complex of functors gives a functor to complexes. -/ @[simps obj map] def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) : T ⥤ HomologicalComplex V c where obj t
Mathlib_Algebra_Homology_Functor