Skip to content

Commit 7d6ecd3

Browse files
refactor(RepresentationTheory/Rep/Res): refactor resFunctor (leanprover-community#41054)
This PR refactors the definition of `resFunctor`, in the current master since the whole definition is an `abbrev`, everything is exposed and if one does `ext; simp` one of the possible outcome in the infoview would be ``` ofHom { toLinearMap := (Hom.hom ..).toLinearMap, isIntertwining' := ⋯ } ``` which is not helpful unfolds too much, this PR seals the `map` part of the functor to make it less transparent while keep the definition of `resFunctor` as an `abbrev` to maintain the full transparency on the underlying type.
1 parent 23fb79f commit 7d6ecd3

5 files changed

Lines changed: 27 additions & 24 deletions

File tree

Mathlib/RepresentationTheory/Homological/GroupCohomology/Functoriality.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ noncomputable def resNatTrans (n : ℕ) :
551551
simp only [functor_map, Functor.comp_map,
552552
← cancel_epi (groupCohomology.π _ n), HomologicalComplex.homologyπ_naturality_assoc,
553553
HomologicalComplex.homologyπ_naturality, ← HomologicalComplex.cyclesMap_comp_assoc,
554-
← cochainsMap_comp, res_obj_ρ, Category.comp_id, Rep.hom_id]
554+
← cochainsMap_comp, res_obj_ρ, Category.comp_id]
555555
rfl
556556

557557
set_option backward.isDefEq.respectTransparency false in

Mathlib/RepresentationTheory/Homological/GroupHomology/Functoriality.lean

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -853,11 +853,9 @@ noncomputable def coresNatTrans (n : ℕ) :
853853
simp only [← cancel_epi (groupHomology.π _ n), Functor.comp_map,
854854
functor_map, HomologicalComplex.homologyπ_naturality_assoc,
855855
HomologicalComplex.homologyπ_naturality, ← HomologicalComplex.cyclesMap_comp_assoc,
856-
← chainsMap_comp, res_obj_ρ, Rep.hom_id, Category.id_comp]
856+
← chainsMap_comp, Category.id_comp]
857857
rfl
858858

859-
860-
861859
set_option backward.isDefEq.respectTransparency false in
862860
/-- Given a normal subgroup `S ≤ G`, this sends `A : Rep k G` to the `n`th "coinflation" map
863861
`Hₙ(G, A) ⟶ Hₙ(G ⧸ S, A_S)` induced by the quotient maps `G →* G ⧸ S` and `A →ₗ A_S`. -/

Mathlib/RepresentationTheory/Induced.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,7 @@ noncomputable def coinvariantsTensorIndNatIso :
260260
(coinvariantsTensor k H).obj (ind φ A) ≅ resFunctor φ ⋙ (coinvariantsTensor k G).obj A :=
261261
NatIso.ofComponents (fun B => coinvariantsTensorIndIso φ A B) fun {X Y} f => by
262262
ext
263-
simp [coinvariantsTensorIndHom, coinvariantsTensorMk,
264-
hom_comm_apply, Representation.IntertwiningMap.toLinearMap_apply]
263+
simp [coinvariantsTensorIndHom, coinvariantsTensorMk, hom_comm_apply]
265264

266265
end
267266
end Rep

Mathlib/RepresentationTheory/Invariants.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ noncomputable def quotientToInvariantsFunctor (S : Subgroup G) [S.Normal] :
265265
Rep.{w} k G ⥤ Rep k (G ⧸ S) where
266266
obj X := X.quotientToInvariants S
267267
map {X Y} f := Rep.ofHom ⟨((invariantsFunctor k S).map ((Rep.resFunctor S.subtype).map f)).hom,
268-
fun g ↦ QuotientGroup.induction_on g fun g ↦ by ext x; simp [hom_comm_apply]⟩
268+
fun g ↦ QuotientGroup.induction_on g fun g ↦ by ext; simp [hom_comm_apply]⟩
269269

270270
set_option backward.isDefEq.respectTransparency false in
271271
/-- The adjunction between the functor equipping a module with the trivial representation, and

Mathlib/RepresentationTheory/Rep/Res.lean

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,17 @@ open CategoryTheory
2525

2626
namespace Rep
2727

28+
/-- The map induced by a monoid homomorphism `f : H →* G` on morphisms between
29+
`G`-representations. -/
30+
@[expose, implicit_reducible]
31+
def resMap {X Y : Rep k G} (f : H →* G) (p : X ⟶ Y) :
32+
of (X := X.V) (X.ρ.comp f) ⟶ of (X := Y.V) (Y.ρ.comp f) :=
33+
ofHom ⟨p.hom, fun h ↦ by simpa using p.hom.2 (f h)⟩
34+
2835
/-- The restriction functor `Rep R G ⥤ Rep R H` for a subgroup `H` of `G`. -/
2936
abbrev resFunctor (f : H →* G) : Rep.{t} k G ⥤ Rep k H where
3037
obj A := of (X := A.V) (A.ρ.comp f)
31-
map f' := ofHom ⟨f'.hom, fun h ↦ by simpa using f'.hom.2 (f h)⟩
38+
map f' := resMap f f'
3239

3340
/-- The restriction of `X : Rep k G` associated to a monoid homomorphism `f : H →* G` -/
3441
abbrev res (f : H →* G) (M : Rep k G) := (resFunctor f).obj M
@@ -43,16 +50,23 @@ lemma coe_res_obj_ρ' (h : H) : (res f M).ρ h = M.ρ (f h) := rfl
4350

4451
lemma res_obj_V : (res f M).V = M.V := rfl
4552

46-
lemma res_map_hom_toLinearMap {M N : Rep k G} (p : M ⟶ N) :
47-
((resFunctor f).map p).hom.toLinearMap = p.hom.toLinearMap := rfl
53+
@[simp]
54+
lemma resMap_hom_toLinearMap {M N : Rep k G} (p : M ⟶ N) :
55+
(resMap f p).hom.toLinearMap = p.hom.toLinearMap := rfl
56+
57+
@[deprecated (since := "26/06/2026")]
58+
alias res_map_hom_toLinearMap := resMap_hom_toLinearMap
59+
60+
@[simp]
61+
lemma resMap_hom_apply {M N : Rep k G} (p : M ⟶ N) (x : M.V) :
62+
@DFunLike.coe (Representation.IntertwiningMap (M.ρ.comp f) (N.ρ.comp f)) _ _ _
63+
(resMap f p).hom x = p.hom x := rfl
4864

4965
section
5066

5167
instance : (resFunctor (k := k) f).Faithful where
5268
map_injective h := by
53-
ext : 2
54-
rw [Rep.hom_ext_iff, Representation.IntertwiningMap.ext_iff] at h
55-
simpa using h
69+
simpa [Rep.hom_ext_iff, Representation.IntertwiningMap.ext_iff] using h
5670

5771
/-- Morphism between `X Y : Rep k G` can be lifted from restrictions associated with `f : H →* G`
5872
when `f` is surjective. -/
@@ -65,21 +79,13 @@ lemma liftHomOfSurj_toLinearMap {X Y : Rep k G} (hf : Function.Surjective f)
6579
f'.hom.toLinearMap := rfl
6680

6781
lemma full_res (hf : (⇑f).Surjective) : (resFunctor (k := k) f).Full where
68-
map_surjective {X Y} f' := ⟨liftHomOfSurj f hf f', by
69-
ext : 2; rw [res_map_hom_toLinearMap, liftHomOfSurj_toLinearMap]⟩
82+
map_surjective {X Y} f' := ⟨liftHomOfSurj f hf f', by ext; simp⟩
7083

7184
instance : (resFunctor (k := k) f).Additive where
72-
map_add {_ _} _ _ := by
73-
ext : 2;
74-
simp only [add_hom, Representation.IntertwiningMap.add_toLinearMap]
75-
rfl
85+
map_add {_ _} _ _ := by ext : 2; simp [add_hom]
7686

7787
instance {k : Type u} [CommSemiring k] : (resFunctor (k := k) f).Linear k where
78-
map_smul {X Y} l r := by
79-
ext : 2;
80-
rw [smul_hom, Representation.IntertwiningMap.toLinearMap_smul,
81-
res_map_hom_toLinearMap, smul_hom, Representation.IntertwiningMap.toLinearMap_smul,
82-
res_map_hom_toLinearMap]
88+
map_smul {_ _} _ _ := by ext : 2; simp [smul_hom]
8389

8490
noncomputable section
8591

0 commit comments

Comments
 (0)