Skip to content

Commit 1e483c8

Browse files
chore(RepresentationTheory/FiniteIndex): generalize universes (#37271)
Co-authored-by: Riccardo Brasca <riccardo.brasca@gmail.com>
1 parent 90290fc commit 1e483c8

File tree

1 file changed

+41
-39
lines changed

1 file changed

+41
-39
lines changed

Mathlib/RepresentationTheory/FiniteIndex.lean

Lines changed: 41 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ TODO : Fix the universe constraint
2929

3030
@[expose] public section
3131

32-
universe u
32+
universe t w u u' v v'
3333

3434
namespace Rep
3535

3636
open CategoryTheory Finsupp TensorProduct Representation
3737

38-
variable {k G : Type u} [CommRing k] [Group G] {S : Subgroup G}
39-
[DecidableRel (QuotientGroup.rightRel S)] (A : Rep.{u} k S)
38+
variable {k : Type u} {G : Type v} [CommRing k] [Group G] {S : Subgroup G}
39+
[DecidableRel (QuotientGroup.rightRel S)] (A : Rep.{w} k S)
4040

4141
/-- Let `S ≤ G` be a subgroup and `(A, ρ)` a `k`-linear `S`-representation. Then given `g : G` and
4242
`a : A`, this is the function `G → A` sending `sg` to `ρ(s)(a)` for all `s : S` and everything else
@@ -170,7 +170,7 @@ lemma indToCoind_coindToInd : A.coindToInd ∘ₗ A.indToCoind = LinearMap.id :=
170170
The forward map sends `(⟦g ⊗ₜ[k] a⟧, sg) ↦ ρ(s)(a)`, and the inverse sends `f : G → A` to
171171
`∑ᵢ ⟦gᵢ ⊗ₜ[k] f(gᵢ)⟧` for `1 ≤ i ≤ n`. -/
172172
@[simps! hom_hom_toLinearMap inv_hom_toLinearMap]
173-
noncomputable def indCoindIso (A : Rep.{u} k S) :
173+
noncomputable def indCoindIso (A : Rep.{max w u} k S) :
174174
ind S.subtype A ≅ coind S.subtype A :=
175175
mkIso (.mk (.ofLinear (indToCoind A) (coindToInd A)
176176
(coindToInd_indToCoind A) (indToCoind_coindToInd A)) <| fun g ↦ by ext; simp)
@@ -181,91 +181,93 @@ variable (k S)
181181
`Coind_G^S` functors `Rep k S ⥤ Rep k G`. -/
182182
@[simps! hom_app inv_app]
183183
noncomputable def indCoindNatIso :
184-
indFunctor k S.subtype ≅ coindFunctor k S.subtype :=
185-
NatIso.ofComponents (fun (A : Rep.{u} k S) => indCoindIso A) fun f => by
184+
indFunctor k S.subtype ≅ coindFunctor.{max w u} k S.subtype :=
185+
NatIso.ofComponents (fun (A : Rep k S) => indCoindIso A) fun f => by
186186
simp only [indFunctor_obj, coindFunctor_obj];
187187
ext g1 x g2
188188
simp [indToCoind, indMap, indToCoindAux_comm]
189189

190190
/-- Given a finite index subgroup `S ≤ G`, `Ind_S^G` is right adjoint to the restriction functor
191191
`Res k G ⥤ Res k S`, since it is naturally isomorphic to `Coind_S^G`. -/
192192
noncomputable def resIndAdjunction :
193-
resFunctor.{u} S.subtype ⊣ indFunctor k S.subtype :=
194-
(resCoindAdjunction k S.subtype).ofNatIsoRight (indCoindNatIso k S).symm
193+
resFunctor.{max w u v} S.subtype ⊣ indFunctor.{max w u v} k S.subtype :=
194+
(resCoindAdjunction.{max w u v} k S.subtype).ofNatIsoRight (indCoindNatIso.{max w u v} k S).symm
195+
195196

196197
omit [DecidableRel (QuotientGroup.rightRel S)] in
197198
@[instance] -- Note: we must use `@[instance] theorem` here due to [lean4#5595](https://github.com/leanprover/lean4/issues/5595).
198199
theorem instIsRightAdjointSubtypeMemSubgroupIndFunctorSubtype :
199-
(indFunctor.{u} k S.subtype).IsRightAdjoint :=
200+
(indFunctor.{max w u v} k S.subtype).IsRightAdjoint :=
200201
open scoped Classical in (resIndAdjunction k S).isRightAdjoint
201202

202203
variable {k S}
203204

204205
@[simp]
205-
lemma resIndAdjunction_counit_app (A : Rep.{u} k S) :
206-
(resIndAdjunction k S).counit.app A =
207-
(resFunctor S.subtype).map (indCoindIso A).hom ≫
208-
(resCoindAdjunction k S.subtype).counit.app A := rfl
206+
lemma resIndAdjunction_counit_app (A : Rep.{max w u v} k S) :
207+
(resIndAdjunction.{w, u, v} k S).counit.app A =
208+
(resFunctor S.subtype).map (indCoindIso.{max w (max u v)} A).hom ≫
209+
(resCoindAdjunction.{max w u} k S.subtype).counit.app A := rfl
209210

210211
@[simp]
211-
lemma resIndAdjunction_unit_app (B : Rep.{u} k G) :
212-
(resIndAdjunction k S).unit.app B = (resCoindAdjunction k S.subtype).unit.app B ≫
213-
(indCoindIso (res S.subtype B)).inv := rfl
212+
lemma resIndAdjunction_unit_app (B : Rep.{max w u v} k G) :
213+
(resIndAdjunction.{w, u, v} k S).unit.app B =
214+
(resCoindAdjunction.{max w u} k S.subtype).unit.app B ≫
215+
(indCoindIso.{max w (max u v)} (res S.subtype B)).inv := rfl
214216

215217
set_option backward.isDefEq.respectTransparency false in
216-
lemma resIndAdjunction_homEquiv_apply (A : Rep.{u} k S)
217-
{B : Rep.{u} k G} (f : res S.subtype B ⟶ A) :
218-
(resIndAdjunction k S).homEquiv _ _ f =
219-
resCoindHomEquiv S.subtype B A f ≫ (indCoindIso A).inv := by
218+
lemma resIndAdjunction_homEquiv_apply (A : Rep.{max w u v} k S)
219+
{B : Rep.{max w u v} k G} (f : res S.subtype B ⟶ A) :
220+
(resIndAdjunction.{w, u, v} k S).homEquiv _ _ f =
221+
resCoindHomEquiv.{max w u v} S.subtype B A f ≫ (indCoindIso.{max w u v} A).inv := by
220222
rw [resIndAdjunction, Adjunction.homEquiv_ofNatIsoRight_apply]
221223
simp [resCoindHomEquiv]
222224

223-
lemma resIndAdjunction_homEquiv_symm_apply (A : Rep.{u} k S)
224-
{B : Rep.{u} k G}
225-
(f : B ⟶ (indFunctor.{u} k S.subtype).obj A) :
225+
lemma resIndAdjunction_homEquiv_symm_apply (A : Rep.{max w u v} k S)
226+
{B : Rep.{max w u v} k G}
227+
(f : B ⟶ (indFunctor k S.subtype).obj A) :
226228
((resIndAdjunction k S).homEquiv _ _).symm f =
227-
(resCoindHomEquiv S.subtype B A).symm (f ≫ (indCoindIso A).hom) := by
229+
(resCoindHomEquiv.{max w u v} S.subtype B A).symm (f ≫ (indCoindIso.{max w u v} A).hom) := by
228230
rfl
229231

230232
variable (k S) in
231233
/-- Given a finite index subgroup `S ≤ G`, `Coind_S^G` is left adjoint to the restriction functor
232234
`Res k G ⥤ Res k S`, since it is naturally isomorphic to `Ind_S^G`. -/
233235
noncomputable def coindResAdjunction :
234-
coindFunctor.{u} k S.subtype ⊣ resFunctor S.subtype :=
235-
(indResAdjunction k S.subtype).ofNatIsoLeft (indCoindNatIso k S)
236+
coindFunctor k S.subtype ⊣ resFunctor.{max w u v} S.subtype :=
237+
(indResAdjunction k S.subtype).ofNatIsoLeft (indCoindNatIso.{max w u v} k S)
236238

237239
omit [DecidableRel (QuotientGroup.rightRel S)] in
238240
@[instance] -- Note: we must use `@[instance] theorem` here due to [lean4#5595](https://github.com/leanprover/lean4/issues/5595).
239241
theorem instIsLeftAdjointSubtypeMemSubgroupCoindFunctorSubtype :
240-
(coindFunctor.{u} k S.subtype).IsLeftAdjoint :=
242+
(coindFunctor.{max w u v} k S.subtype).IsLeftAdjoint :=
241243
open scoped Classical in (coindResAdjunction k S).isLeftAdjoint
242244

243245
@[simp]
244-
lemma coindResAdjunction_counit_app (B : Rep.{u} k G) :
245-
(coindResAdjunction k S).counit.app B =
246-
(indCoindIso (res S.subtype B)).inv ≫
246+
lemma coindResAdjunction_counit_app (B : Rep.{max w u v} k G) :
247+
(coindResAdjunction.{w, u, v} k S).counit.app B =
248+
(indCoindIso.{max w u v} (res S.subtype B)).inv ≫
247249
(indResAdjunction k S.subtype).counit.app B := by
248250
rfl
249251

250252
set_option backward.isDefEq.respectTransparency false in
251253
@[simp]
252-
lemma coindResAdjunction_unit_app (A : Rep k S) :
254+
lemma coindResAdjunction_unit_app (A : Rep.{max w u v} k S) :
253255
(coindResAdjunction k S).unit.app A = (indResAdjunction k S.subtype).unit.app A ≫
254-
(resFunctor S.subtype).map (indCoindIso A).hom := by
256+
(resFunctor S.subtype).map (indCoindIso.{max w u v} A).hom := by
255257
ext
256258
simp [coindResAdjunction, Adjunction.ofNatIsoLeft,
257259
indResAdjunction, indCoindIso]
258260

259-
lemma coindResAdjunction_homEquiv_apply (A : Rep.{u} k S)
260-
{B : Rep.{u} k G} (f : coind S.subtype A ⟶ B) :
261+
lemma coindResAdjunction_homEquiv_apply (A : Rep.{max w u v} k S)
262+
{B : Rep k G} (f : coind S.subtype A ⟶ B) :
261263
(coindResAdjunction k S).homEquiv _ _ f =
262-
indResHomEquiv S.subtype A B ((indCoindIso A).hom ≫ f) := by
264+
indResHomEquiv S.subtype A B ((indCoindIso.{max w u v} A).hom ≫ f) := by
263265
rfl
264266

265-
lemma coindResAdjunction_homEquiv_symm_apply (A : Rep.{u} k S)
266-
{B : Rep.{u} k G} (f : A ⟶ res S.subtype B) :
267-
((coindResAdjunction k S).homEquiv _ _).symm f =
268-
(indCoindIso A).inv ≫ (indResHomEquiv S.subtype A B).symm f := by
267+
lemma coindResAdjunction_homEquiv_symm_apply (A : Rep.{max w u v} k S)
268+
{B : Rep k G} (f : A ⟶ res S.subtype B) :
269+
((coindResAdjunction.{max w u v} k S).homEquiv _ _).symm f =
270+
(indCoindIso.{max w u v} A).inv ≫ (indResHomEquiv S.subtype A B).symm f := by
269271
simp only [coindResAdjunction, indResAdjunction,
270272
Adjunction.homEquiv_ofNatIsoLeft_symm_apply _]
271273
simp

0 commit comments

Comments
 (0)