Skip to content

Commit bb577fa

Browse files
feat(RepresentationTheory/Rep): add instances and APIs (#41072)
Co-authored-by: Riccardo Brasca <riccardo.brasca@gmail.com>
1 parent faaff5e commit bb577fa

5 files changed

Lines changed: 162 additions & 21 deletions

File tree

Mathlib/RepresentationTheory/Intertwining.lean

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,84 @@ lemma comp_add (f₁ f₂ : IntertwiningMap σ τ) (g : IntertwiningMap ρ σ) :
226226
lemma add_comp (f : IntertwiningMap σ τ) (g₁ g₂ : IntertwiningMap ρ σ) :
227227
comp f (g₁ + g₂) = comp f g₁ + comp f g₂ := by ext1; simp [LinearMap.comp_add]
228228

229+
variable (A) in
230+
/-- The projection of a product representation onto its first component is an intertwining map. -/
231+
def fst : IntertwiningMap (ρ.prod σ) ρ where
232+
toLinearMap := LinearMap.fst A V W
233+
isIntertwining' _ := LinearMap.ext <| by simp
234+
235+
variable (A) in
236+
/-- The projection of a product representation onto its second component is an intertwining map. -/
237+
def snd : IntertwiningMap (ρ.prod σ) σ where
238+
toLinearMap := LinearMap.snd A V W
239+
isIntertwining' _ := LinearMap.ext <| by simp
240+
241+
@[simp]
242+
lemma fst_apply (v : V × W) : fst A ρ σ v = v.1 := rfl
243+
244+
@[simp]
245+
lemma snd_apply (v : V × W) : snd A ρ σ v = v.2 := rfl
246+
247+
@[simp, norm_cast] lemma coe_fst : ⇑(fst A ρ σ) = Prod.fst := rfl
248+
249+
@[simp, norm_cast] lemma coe_snd : ⇑(snd A ρ σ) = Prod.snd := rfl
250+
251+
lemma fst_surjective : Function.Surjective (fst A ρ σ) := LinearMap.fst_surjective
252+
253+
lemma snd_surjective : Function.Surjective (snd A ρ σ) := LinearMap.snd_surjective
254+
255+
section prod
256+
257+
variable {ρ σ τ}
258+
/-- The product of two intertwining maps is an intertwining map. -/
259+
def prod (f : IntertwiningMap ρ σ) (g : IntertwiningMap ρ τ) : IntertwiningMap ρ (σ.prod τ) where
260+
toLinearMap := f.toLinearMap.prod g.toLinearMap
261+
isIntertwining' _ := LinearMap.ext <| by simp [f.isIntertwining, g.isIntertwining]
262+
263+
@[simp]
264+
lemma fst_prod (f : IntertwiningMap ρ σ) (g : IntertwiningMap ρ τ) :
265+
(fst A σ τ).comp (prod f g) = f := IntertwiningMap.ext <| LinearMap.fst_prod _ _
266+
267+
@[simp]
268+
lemma snd_prod (f : IntertwiningMap ρ σ) (g : IntertwiningMap ρ τ) :
269+
(snd A σ τ).comp (prod f g) = g := IntertwiningMap.ext <| LinearMap.snd_prod _ _
270+
271+
lemma prod_comp (X : Type*) [AddCommMonoid X] [Module A X] {π : Representation A G X}
272+
(f : IntertwiningMap ρ σ) (g₁ : IntertwiningMap σ τ) (g₂ : IntertwiningMap σ π) :
273+
(prod g₁ g₂).comp f = prod (g₁.comp f) (g₂.comp f) :=
274+
IntertwiningMap.ext <| LinearMap.prod_comp ..
275+
276+
variable (A ρ σ) in
277+
/-- The left inclusion of a product representation is an intertwining map. -/
278+
def inl : IntertwiningMap ρ (ρ.prod σ) := prod (id ρ) 0
279+
280+
variable (A ρ σ) in
281+
/-- The right inclusion of a product representation is an intertwining map. -/
282+
def inr : IntertwiningMap σ (ρ.prod σ) := prod (0 : IntertwiningMap σ ρ) (id σ)
283+
284+
lemma range_inl : (inl A ρ σ).range = (snd A ρ σ).ker :=
285+
Subrepresentation.ext <| LinearMap.range_inl ..
286+
287+
lemma range_inr : (inr A ρ σ).range = (fst A ρ σ).ker :=
288+
Subrepresentation.ext <| LinearMap.range_inr ..
289+
290+
@[simp] lemma fst_comp_inl : (fst A ρ σ).comp (inl A ρ σ) = id ρ :=
291+
IntertwiningMap.ext <| LinearMap.fst_comp_inl ..
292+
293+
@[simp] lemma snd_comp_inl : (snd A ρ σ).comp (inl A ρ σ) = 0 :=
294+
IntertwiningMap.ext <| LinearMap.snd_comp_inl ..
295+
296+
@[simp] lemma fst_comp_inr : (fst A ρ σ).comp (inr A ρ σ) = 0 :=
297+
IntertwiningMap.ext <| LinearMap.fst_comp_inr ..
298+
299+
@[simp] lemma snd_comp_inr : (snd A ρ σ).comp (inr A ρ σ) = id σ :=
300+
IntertwiningMap.ext <| LinearMap.snd_comp_inr ..
301+
302+
@[simp] lemma coprod_inl_inr : (inl A ρ σ).comp (fst A ρ σ) + (inr A ρ σ).comp (snd A ρ σ) =
303+
.id _ := IntertwiningMap.ext <| LinearMap.coprod_inl_inr
304+
305+
end prod
306+
229307
end IntertwiningMap
230308

231309
/-- Equivalence between representations is a bijective intertwining map. -/

Mathlib/RepresentationTheory/Rep/Basic.lean

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,37 @@ instance preservesColimits_forget :
540540
Limits.PreservesColimitsOfSize.{w, w} (forget₂ (Rep.{w} k G) (ModuleCat k)) :=
541541
Limits.preservesColimits_of_natIso (forgetNatIsoActionForget k G).symm
542542

543+
instance : Limits.HasBinaryBiproducts (Rep.{w} k G) where
544+
has_binary_biproduct A B := Limits.hasBinaryBiproduct_of_total
545+
⟨Rep.of (X := A.V × B.V) (A.ρ.prod B.ρ), Rep.ofHom (.fst k A.ρ B.ρ), Rep.ofHom (.snd k A.ρ B.ρ),
546+
Rep.ofHom (.inl k A.ρ B.ρ), Rep.ofHom (.inr k A.ρ B.ρ), by ext1; simp,
547+
by ext1; simp [zero_hom], by ext1; simp [zero_hom], by ext1; simp⟩ <| by
548+
ext1; simp [Rep.add_hom]
549+
550+
instance : Limits.HasZeroObject (Rep.{w} k G) where
551+
zero := ⟨Rep.trivial k G PUnit, {
552+
unique_to X := Nonempty.intro ⟨⟨0⟩, fun f ↦ by
553+
ext x; have : x = 0 := Subsingleton.elim _ _; subst this; simp⟩
554+
unique_from X := Nonempty.intro ⟨⟨0⟩, fun f ↦ by ext⟩
555+
}⟩
556+
557+
/-- An object of `Rep k G` is zero iff the underlying `k`-module is zero. -/
558+
lemma isZero_iff (M : Rep k G) : Limits.IsZero M ↔ Subsingleton M.V := by
559+
simp [Limits.IsZero.iff_id_eq_zero, Rep.hom_ext_iff, Representation.IntertwiningMap.ext_iff,
560+
← ModuleCat.isZero_of_iff_subsingleton (R := k), ModuleCat.hom_ext_iff]
561+
562+
instance : Limits.HasLimits (Rep.{w} k G) :=
563+
Adjunction.has_limits_of_equivalence (repIsoAction k G).functor
564+
565+
instance : Limits.HasColimits (Rep.{w} k G) :=
566+
Adjunction.has_colimits_of_equivalence (repIsoAction k G).functor
567+
568+
instance : Limits.ReflectsLimitsOfSize.{w, w} (forget₂ (Rep.{w} k G) (ModuleCat k)) :=
569+
Limits.reflectsLimits_of_reflectsIsomorphisms
570+
571+
instance : Limits.ReflectsColimitsOfSize.{w, w} (forget₂ (Rep.{w} k G) (ModuleCat k)) :=
572+
Limits.reflectsColimits_of_reflectsIsomorphisms
573+
543574
variable {k G} in
544575
theorem epi_iff_surjective (f : A ⟶ B) : Epi f ↔ Function.Surjective f.hom :=
545576
fun _ => (ModuleCat.epi_iff_surjective ((forget₂ _ _).map f)).1 inferInstance,

Mathlib/RepresentationTheory/Rep/Iso.lean

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -168,25 +168,6 @@ instance : (toModuleMonoidAlgebra.{w} (k := k) (G := G)).IsEquivalence :=
168168
instance : (ofModuleMonoidAlgebra (k := k) (G := G)).IsEquivalence :=
169169
(equivalenceModuleMonoidAlgebra (k := k) (G := G)).isEquivalence_inverse
170170

171-
open MonoidalCategory in
172-
instance : Limits.HasBinaryBiproducts (Rep.{w} k G) where
173-
has_binary_biproduct A B := Limits.hasBinaryBiproduct_of_total
174-
⟨Rep.of (X := A.V × B.V) (Representation.prod A.ρ B.ρ), Rep.ofHom ⟨LinearMap.fst k _ _, by
175-
simp [LinearMap.ext_iff]⟩, Rep.ofHom ⟨LinearMap.snd k _ _, by simp [LinearMap.ext_iff]⟩,
176-
Rep.ofHom ⟨LinearMap.inl _ _ _, by simp [LinearMap.ext_iff]⟩, Rep.ofHom ⟨LinearMap.inr _ _ _,
177-
by simp [LinearMap.ext_iff]⟩, by ext : 2; simp, by ext : 2; simp [zero_hom], by
178-
ext : 2; simp [zero_hom], by ext : 2; simp⟩ <| by
179-
ext : 2; simp [← ofHom_comp, ← ofHom_add, LinearMap.ext_iff]
180-
181-
instance : Limits.HasZeroObject (Rep.{w} k G) where
182-
zero := ⟨Rep.trivial k G PUnit, {
183-
unique_to X := Nonempty.intro ⟨⟨0⟩, fun f ↦ by
184-
ext x; have : x = 0 := Subsingleton.elim _ _; subst this; simp⟩
185-
unique_from X := Nonempty.intro ⟨⟨0⟩, fun f ↦ by ext⟩
186-
}⟩
187-
188-
instance : Limits.HasFiniteProducts (Rep.{w} k G) := hasFiniteProducts_of_has_binary_and_terminal
189-
190171
instance : Abelian (Rep.{w} k G) := abelianOfEquivalence toModuleMonoidAlgebra
191172

192173
-- TODO Verify that the equivalence with `ModuleCat k[G]` is a monoidal functor.

Mathlib/RepresentationTheory/Rep/Res.lean

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ Authors: Edison Xie
55
-/
66
module
77

8-
public import Mathlib.RepresentationTheory.Rep.Basic
9-
8+
public import Mathlib.Algebra.Homology.ShortComplex.ShortExact
9+
public import Mathlib.RepresentationTheory.Rep.Iso
1010
/-!
1111
# Restriction of representations
1212
@@ -88,6 +88,56 @@ instance : (resFunctor (k := k) f).Additive where
8888
instance {k : Type u} [CommSemiring k] : (resFunctor (k := k) f).Linear k where
8989
map_smul {_ _} _ _ := by ext : 2; simp [smul_hom]
9090

91+
section ShortComplex
92+
93+
open Limits
94+
95+
variable {k : Type u} [Ring k]
96+
97+
instance : PreservesLimits (resFunctor.{w} (k := k) f) :=
98+
have : PreservesLimitsOfSize.{w, w} (resFunctor f ⋙ forget₂ (Rep.{w} k H) (ModuleCat k)) :=
99+
inferInstanceAs (PreservesLimitsOfSize.{w, w} (forget₂ (Rep.{w} k G) (ModuleCat k)))
100+
preservesLimits_of_reflects_of_preserves _ (forget₂ (Rep.{w} k H) (ModuleCat k))
101+
102+
instance : Limits.PreservesColimits (resFunctor.{w} (k := k) f) :=
103+
have : PreservesColimitsOfSize.{w, w} (resFunctor (k := k) f ⋙
104+
forget₂ (Rep.{w} k H) (ModuleCat k)) :=
105+
inferInstanceAs (PreservesColimitsOfSize.{w, w} (forget₂ (Rep.{w} k G) (ModuleCat k)))
106+
preservesColimits_of_reflects_of_preserves _ (forget₂ (Rep.{w} k H) (ModuleCat k))
107+
108+
/-- An object of `Rep k G` is zero iff its restriction to `H` is zero. -/
109+
lemma isZero_res_iff (M : Rep k G) :
110+
IsZero (res f M) ↔ IsZero M := by
111+
rw [isZero_iff, isZero_iff, Rep.res_obj_V]
112+
113+
/--
114+
The instances above show that the restriction functor `res φ : Rep R G ⥤ Rep R H`
115+
preserves and reflects exactness. -/
116+
lemma res_map_exact {k : Type u} [CommRing k]
117+
(S : ShortComplex (Rep.{w} k G)) :
118+
(S.map (resFunctor f)).Exact ↔ S.Exact := by
119+
rw [ShortComplex.exact_map_iff_of_faithful]
120+
121+
lemma shortExact_res {k : Type u} [CommRing k] (φ : H →* G) {S : ShortComplex (Rep.{w} k G)} :
122+
(S.map (resFunctor φ)).ShortExact ↔ S.ShortExact := by
123+
constructor
124+
· intro h
125+
have h₁ := h.1
126+
have h₂ := h.2
127+
have h₃ := h.3
128+
rw [ShortComplex.exact_map_iff_of_faithful] at h₁
129+
simp only [ShortComplex.map_f, mono_iff_injective, ShortComplex.map_g,
130+
epi_iff_surjective] at h₂ h₃
131+
exact {exact := h₁, mono_f := mono_iff_injective _|>.2 h₂, epi_g := epi_iff_surjective _|>.2 h₃}
132+
· rintro @⟨_, mono_f, epi_g⟩
133+
exact {
134+
exact := by rwa [ShortComplex.exact_map_iff_of_faithful]
135+
mono_f := by simpa [mono_iff_injective] using! mono_f
136+
epi_g := by simpa [epi_iff_surjective] using! epi_g
137+
}
138+
139+
end ShortComplex
140+
91141
noncomputable section
92142

93143
variable {G : Type v} [Group G] (A : Rep k G) (S : Subgroup G)

Mathlib/RepresentationTheory/Subrepresentation.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ variable [Semiring A] [Monoid G] [AddCommMonoid W] [Module A W]
2727
/-- A subrepresentation of `G` of the `A`-module `W` is a submodule of `W`
2828
which is stable under the `G`-action.
2929
-/
30+
@[ext]
3031
structure Subrepresentation where
3132
/-- A subrepresentation is a submodule. -/
3233
toSubmodule : Submodule A W

0 commit comments

Comments
 (0)