Skip to content

Commit aaedc74

Browse files
chore(RepresentationTheory): remove some set_option backwards (leanprover-community#41057)
Removes several `set_option backward.defeqAttrib.useBackward true` / `set_option backward.isDefEq.respectTransparency false` workarounds in `Mathlib/RepresentationTheory`, replacing them with the `@[implicit_reducible]` attribute on the relevant functor definitions and simplifying a few proofs accordingly.
1 parent a730529 commit aaedc74

6 files changed

Lines changed: 11 additions & 30 deletions

File tree

Mathlib/RepresentationTheory/Coinduced.lean

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,11 @@ noncomputable abbrev coindMap {A B : Rep k G} (f : A ⟶ B) : coind φ A ⟶ coi
128128
variable (k) in
129129
/-- Given a monoid homomorphism `φ : G →* H`, this is the functor sending a `G`-representation `A`
130130
to the coinduced `H`-representation `coind φ A`, with action on maps given by postcomposition. -/
131-
@[simps obj map]
131+
@[implicit_reducible, simps obj map]
132132
noncomputable def coindFunctor : Rep.{t} k G ⥤ Rep k H where
133133
obj A := coind φ A
134134
map f := coindMap φ f
135135

136-
set_option backward.defeqAttrib.useBackward true in
137-
set_option backward.isDefEq.respectTransparency false in
138136
instance {G : Type v'} [Group G] (S : Subgroup G) :
139137
(coindFunctor k S.subtype).PreservesEpimorphisms where
140138
preserves {X Y} f := (epi_iff_surjective _).2 fun y => by
@@ -199,7 +197,7 @@ noncomputable def coindMap' {A B : Rep k G} (f : A ⟶ B) : coind' φ A ⟶ coin
199197
variable (k) in
200198
/-- Given a monoid homomorphism `φ : G →* H`, this is the functor sending a `G`-representation `A`
201199
to the coinduced `H`-representation `coind' φ A`, with action on maps given by postcomposition. -/
202-
@[simps obj map]
200+
@[implicit_reducible, simps obj map]
203201
noncomputable def coindFunctor' : Rep k G ⥤ Rep k H where
204202
obj A := coind' φ A
205203
map f := coindMap' φ f
@@ -228,8 +226,6 @@ noncomputable def coindVEquiv :
228226
noncomputable def coindIso : coind φ A ≅ coind' φ A :=
229227
Rep.mkIso <| .mk (coindVEquiv φ A) fun h => by ext; simp [homEquiv]
230228

231-
set_option backward.defeqAttrib.useBackward true in
232-
set_option backward.isDefEq.respectTransparency false in
233229
/-- Given a monoid homomorphism `φ : G →* H`, the coinduction functors `Rep k G ⥤ Rep k H` given by
234230
`coindFunctor k φ` and `coindFunctor' k φ` are naturally isomorphic, with isomorphism on objects
235231
given by `coindIso φ`. -/

Mathlib/RepresentationTheory/Coinvariants.lean

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ end
343343
variable (k G) [Monoid G] (A B : Rep.{w} k G)
344344

345345
/-- The functor sending a representation to its coinvariants. -/
346-
@[simps! obj_carrier map_hom]
346+
@[implicit_reducible, simps! obj_carrier map_hom]
347347
noncomputable def coinvariantsFunctor : Rep.{w} k G ⥤ ModuleCat k where
348348
obj A := ModuleCat.of k A.ρ.Coinvariants
349349
map f := ModuleCat.ofHom (Representation.Coinvariants.map _ _ f.hom)
@@ -378,7 +378,6 @@ instance : (coinvariantsFunctor k G).Additive where
378378
instance : (coinvariantsFunctor k G).Linear k where
379379

380380
set_option backward.defeqAttrib.useBackward true in
381-
set_option backward.isDefEq.respectTransparency false in
382381
/-- The adjunction between the functor sending a representation to its coinvariants and the functor
383382
equipping a module with the trivial representation. -/
384383
@[simps]
@@ -394,7 +393,6 @@ theorem coinvariantsAdjunction_homEquiv_apply_hom {X : Rep.{w} k G} {Y : ModuleC
394393
rfl
395394

396395
set_option backward.defeqAttrib.useBackward true in
397-
set_option backward.isDefEq.respectTransparency false in
398396
@[simp]
399397
theorem coinvariantsAdjunction_homEquiv_symm_apply_hom {X : Rep.{w} k G} {Y : ModuleCat k}
400398
(f : X ⟶ (trivialFunctor k G).obj Y) :
@@ -437,7 +435,6 @@ section
437435

438436
variable (k : Type u) {G : Type v} [CommRing k] [Group G]
439437

440-
set_option backward.isDefEq.respectTransparency false in
441438
/-- Given a normal subgroup `S ≤ G`, this is the functor sending a `G`-representation `A` to the
442439
`G ⧸ S`-representation it induces on `A_S`. -/
443440
@[simps! obj_V map_hom_toLinearMap]
@@ -466,7 +463,6 @@ noncomputable def coinvariantsTensorFreeToFinsupp :
466463

467464
variable {α}
468465

469-
set_option backward.isDefEq.respectTransparency false in
470466
@[simp]
471467
lemma coinvariantsTensorFreeToFinsupp_mk_tmul_single (x : A) (i : α) (g : G) (r : k) :
472468
DFunLike.coe (F := (A.ρ.tprod (Representation.free k G α)).Coinvariants →ₗ[k] α →₀ A.V)
@@ -487,7 +483,6 @@ noncomputable def finsuppToCoinvariantsTensorFree :
487483
variable {A α}
488484

489485
set_option backward.defeqAttrib.useBackward true in
490-
set_option backward.isDefEq.respectTransparency false in
491486
@[simp]
492487
lemma finsuppToCoinvariantsTensorFree_single (i : α) (x : A) :
493488
DFunLike.coe (F := (α →₀ A.V) →ₗ[k] (A.ρ.tprod (Representation.free k G α)).Coinvariants)

Mathlib/RepresentationTheory/FiniteIndex.lean

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,9 @@ noncomputable def indCoindIso (A : Rep.{max w u} k S) :
177177

178178
variable (k S)
179179

180-
set_option backward.defeqAttrib.useBackward true in
181180
/-- Given a finite index subgroup `S ≤ G`, this is a natural isomorphism between the `Ind_S^G` and
182181
`Coind_G^S` functors `Rep k S ⥤ Rep k G`. -/
183-
@[simps! hom_app inv_app]
182+
@[implicit_reducible, simps! hom_app inv_app]
184183
noncomputable def indCoindNatIso :
185184
indFunctor k S.subtype ≅ coindFunctor.{max w u} k S.subtype :=
186185
NatIso.ofComponents (fun (A : Rep k S) => indCoindIso A) fun f => by
@@ -194,7 +193,6 @@ noncomputable def resIndAdjunction :
194193
resFunctor.{max w u v} S.subtype ⊣ indFunctor.{max w u v} k S.subtype :=
195194
(resCoindAdjunction.{max w u v} k S.subtype).ofNatIsoRight (indCoindNatIso.{max w u v} k S).symm
196195

197-
198196
omit [DecidableRel (QuotientGroup.rightRel S)] in
199197
@[instance] -- Note: we must use `@[instance] theorem` here due to [lean4#5595](https://github.com/leanprover/lean4/issues/5595).
200198
theorem instIsRightAdjointSubtypeMemSubgroupIndFunctorSubtype :
@@ -215,8 +213,6 @@ lemma resIndAdjunction_unit_app (B : Rep.{max w u v} k G) :
215213
(resCoindAdjunction.{max w u} k S.subtype).unit.app B ≫
216214
(indCoindIso.{max w (max u v)} (res S.subtype B)).inv := rfl
217215

218-
set_option backward.defeqAttrib.useBackward true in
219-
set_option backward.isDefEq.respectTransparency false in
220216
lemma resIndAdjunction_homEquiv_apply (A : Rep.{max w u v} k S)
221217
{B : Rep.{max w u v} k G} (f : res S.subtype B ⟶ A) :
222218
(resIndAdjunction.{w, u, v} k S).homEquiv _ _ f =
@@ -228,7 +224,7 @@ lemma resIndAdjunction_homEquiv_symm_apply (A : Rep.{max w u v} k S)
228224
{B : Rep.{max w u v} k G}
229225
(f : B ⟶ (indFunctor k S.subtype).obj A) :
230226
((resIndAdjunction k S).homEquiv _ _).symm f =
231-
(resCoindHomEquiv.{max w u v} S.subtype B A).symm (f ≫ (indCoindIso.{max w u v} A).hom) := by
227+
(resCoindHomEquiv.{max w u v} S.subtype B A).symm (f ≫ (indCoindIso.{max w u v} A).hom) :=
232228
rfl
233229

234230
variable (k S) in
@@ -248,7 +244,7 @@ theorem instIsLeftAdjointSubtypeMemSubgroupCoindFunctorSubtype :
248244
lemma coindResAdjunction_counit_app (B : Rep.{max w u v} k G) :
249245
(coindResAdjunction.{w, u, v} k S).counit.app B =
250246
(indCoindIso.{max w u v} (res S.subtype B)).inv ≫
251-
(indResAdjunction k S.subtype).counit.app B := by
247+
(indResAdjunction k S.subtype).counit.app B :=
252248
rfl
253249

254250
set_option backward.isDefEq.respectTransparency false in
@@ -257,8 +253,7 @@ lemma coindResAdjunction_unit_app (A : Rep.{max w u v} k S) :
257253
(coindResAdjunction k S).unit.app A = (indResAdjunction k S.subtype).unit.app A ≫
258254
(resFunctor S.subtype).map (indCoindIso.{max w u v} A).hom := by
259255
ext
260-
simp [coindResAdjunction, Adjunction.ofNatIsoLeft,
261-
indResAdjunction, indCoindIso]
256+
simp [coindResAdjunction]
262257

263258
lemma coindResAdjunction_homEquiv_apply (A : Rep.{max w u v} k S)
264259
{B : Rep k G} (f : coind S.subtype A ⟶ B) :
@@ -270,9 +265,7 @@ lemma coindResAdjunction_homEquiv_symm_apply (A : Rep.{max w u v} k S)
270265
{B : Rep k G} (f : A ⟶ res S.subtype B) :
271266
((coindResAdjunction.{max w u v} k S).homEquiv _ _).symm f =
272267
(indCoindIso.{max w u v} A).inv ≫ (indResHomEquiv S.subtype A B).symm f := by
273-
simp only [coindResAdjunction, indResAdjunction,
268+
simp [coindResAdjunction, indResHomEquiv, indResAdjunction,
274269
Adjunction.homEquiv_ofNatIsoLeft_symm_apply _]
275-
simp
276-
rfl
277270

278271
end Rep

Mathlib/RepresentationTheory/Induced.lean

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ noncomputable def indMap {A B : Rep k G} (f : A ⟶ B) : ind φ A ⟶ ind φ B :
110110
variable (k) in
111111
/-- Given a group homomorphism `φ : G →* H`, this is the functor sending a `G`-representation `A`
112112
to the induced `H`-representation `ind φ A`, with action on maps induced by left tensoring. -/
113-
@[simps obj map]
113+
@[implicit_reducible, simps obj map]
114114
noncomputable def indFunctor : Rep.{w} k G ⥤ Rep k H where
115115
obj A := ind φ A
116116
map f := indMap φ f
@@ -152,8 +152,6 @@ noncomputable def indResHomEquiv (A : Rep.{max w v' u} k G) (B : Rep.{max w v' u
152152
simpa using (hom_comm_apply f h⁻¹ (IndV.mk φ A.ρ 1 a)).symm
153153
right_inv _ := by ext; simp
154154

155-
set_option backward.defeqAttrib.useBackward true in
156-
set_option backward.isDefEq.respectTransparency false in
157155
variable (k) in
158156
/-- Given a group homomorphism `φ : G →* H`, the induction functor `Rep k G ⥤ Rep k H` is left
159157
adjoint to the restriction functor along `φ`. -/

Mathlib/RepresentationTheory/Invariants.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ abbrev quotientToInvariants : Rep k (G ⧸ S) := Rep.of (A.ρ.quotientToInvarian
246246
variable (k G)
247247

248248
/-- The functor sending a representation to its submodule of invariants. -/
249-
@[simps! obj_carrier map_hom]
249+
@[implicit_reducible, simps! obj_carrier map_hom]
250250
noncomputable def invariantsFunctor : Rep.{w} k G ⥤ ModuleCat k where
251251
obj A := ModuleCat.of k A.ρ.invariants
252252
map {A B} f := ModuleCat.ofHom <| (f.hom ∘ₗ A.ρ.invariants.subtype).codRestrict
@@ -258,7 +258,6 @@ instance : (invariantsFunctor k G).PreservesZeroMorphisms where
258258
instance : (invariantsFunctor k G).Additive where
259259
instance : (invariantsFunctor k G).Linear k where
260260

261-
set_option backward.isDefEq.respectTransparency false in
262261
variable {G} in
263262
/-- Given a normal subgroup S ≤ G, this is the functor sending a `G`-representation `A` to the
264263
`G ⧸ S`-representation it induces on `A^S`. -/

Mathlib/RepresentationTheory/Rep/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ end setup
436436

437437
variable (k G) in
438438
/-- The functor equipping a module with the trivial representation. -/
439-
@[simps! obj_V map_hom]
439+
@[implicit_reducible, simps! obj_V map_hom]
440440
def trivialFunctor : ModuleCat.{w} k ⥤ Rep.{w} k G where
441441
obj V := trivial k G V
442442
map f := ofHom ⟨f.hom, fun _ ↦ rfl⟩

0 commit comments

Comments
 (0)