Skip to content

Commit 7cd7d2c

Browse files
committed
feat: if F is fully faithful, then so is F.mapGrp (#27580)
Follow up to #23874. Also remove the corresponding `noncomputable` as they are now unnecessary. From Toric
1 parent e33f463 commit 7cd7d2c

File tree

4 files changed

+74
-33
lines changed

4 files changed

+74
-33
lines changed

Mathlib/CategoryTheory/Monoidal/CommGrp_.lean

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ variable (F) in
176176
/-- A finite-product-preserving functor takes commutative group objects to commutative group
177177
objects. -/
178178
@[simps!]
179-
noncomputable def mapCommGrp : CommGrp_ C ⥤ CommGrp_ D where
179+
def mapCommGrp : CommGrp_ C ⥤ CommGrp_ D where
180180
obj A :=
181181
{ F.mapGrp.obj A.toGrp_ with
182182
comm :=
@@ -186,6 +186,18 @@ noncomputable def mapCommGrp : CommGrp_ C ⥤ CommGrp_ D where
186186
map f := F.mapMon.map f
187187
map_id X := show F.mapMon.map (𝟙 X.toGrp_.toMon_) = _ by aesop_cat
188188

189+
protected instance Faithful.mapCommGrp [F.Faithful] : F.mapCommGrp.Faithful where
190+
map_injective hfg := F.mapMon.map_injective hfg
191+
192+
protected instance Full.mapCommGrp [F.Full] [F.Faithful] : F.mapCommGrp.Full where
193+
map_surjective := F.mapMon.map_surjective
194+
195+
/-- If `F : C ⥤ D` is a fully faithful monoidal functor, then `Grp(F) : Grp C ⥤ Grp D` is fully
196+
faithful too. -/
197+
@[simps]
198+
protected def FullyFaithful.mapCommGrp (hF : F.FullyFaithful) : F.mapGrp.FullyFaithful where
199+
preimage f := .mk <| hF.preimage f.hom
200+
189201
@[simp]
190202
theorem mapCommGrp_id_one (A : CommGrp_ C) :
191203
η[((𝟭 C).mapCommGrp.obj A).X] = 𝟙 _ ≫ η[A.X] :=
@@ -208,24 +220,23 @@ theorem comp_mapCommGrp_mul (A : CommGrp_ C) :
208220

209221
/-- The identity functor is also the identity on commutative group objects. -/
210222
@[simps!]
211-
noncomputable def mapCommGrpIdIso : mapCommGrp (𝟭 C) ≅ 𝟭 (CommGrp_ C) :=
223+
def mapCommGrpIdIso : mapCommGrp (𝟭 C) ≅ 𝟭 (CommGrp_ C) :=
212224
NatIso.ofComponents (fun X ↦ CommGrp_.mkIso (.refl _) (by simp)
213225
(by simp))
214226

215227
/-- The composition functor is also the composition on commutative group objects. -/
216228
@[simps!]
217-
noncomputable def mapCommGrpCompIso : (F ⋙ G).mapCommGrp ≅ F.mapCommGrp ⋙ G.mapCommGrp :=
218-
NatIso.ofComponents (fun X ↦ CommGrp_.mkIso (.refl _) (by simp [ε_of_cartesianMonoidalCategory])
219-
(by simp [μ_of_cartesianMonoidalCategory]))
229+
def mapCommGrpCompIso : (F ⋙ G).mapCommGrp ≅ F.mapCommGrp ⋙ G.mapCommGrp :=
230+
NatIso.ofComponents fun X ↦ CommGrp_.mkIso (.refl _)
220231

221232
/-- Natural transformations between functors lift to commutative group objects. -/
222233
@[simps!]
223-
noncomputable def mapCommGrpNatTrans (f : F ⟶ F') : F.mapCommGrp ⟶ F'.mapCommGrp where
234+
def mapCommGrpNatTrans (f : F ⟶ F') : F.mapCommGrp ⟶ F'.mapCommGrp where
224235
app X := .mk' (f.app _)
225236

226237
/-- Natural isomorphisms between functors lift to commutative group objects. -/
227238
@[simps!]
228-
noncomputable def mapCommGrpNatIso (e : F ≅ F') : F.mapCommGrp ≅ F'.mapCommGrp :=
239+
def mapCommGrpNatIso (e : F ≅ F') : F.mapCommGrp ≅ F'.mapCommGrp :=
229240
NatIso.ofComponents fun X ↦ CommGrp_.mkIso (e.app _)
230241

231242
attribute [local instance] Functor.Braided.ofChosenFiniteProducts in

Mathlib/CategoryTheory/Monoidal/CommMon_.lean

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,11 @@ namespace CategoryTheory
145145
variable
146146
{D : Type u₂} [Category.{v₂} D] [MonoidalCategory D] [BraidedCategory D]
147147
{E : Type u₃} [Category.{v₃} E] [MonoidalCategory E] [BraidedCategory E]
148-
{F F' : C ⥤ D} [F.LaxBraided] [F'.LaxBraided] {G : D ⥤ E} [G.LaxBraided]
148+
{F F' : C ⥤ D} {G : D ⥤ E}
149149

150150
namespace Functor
151+
section LaxBraided
152+
variable [F.LaxBraided] [F'.LaxBraided] [G.LaxBraided]
151153

152154
open scoped Obj
153155

@@ -192,12 +194,12 @@ theorem comp_mapCommMon_mul (A : CommMon_ C) :
192194

193195
/-- The identity functor is also the identity on commutative monoid objects. -/
194196
@[simps!]
195-
noncomputable def mapCommMonIdIso : mapCommMon (𝟭 C) ≅ 𝟭 (CommMon_ C) :=
197+
def mapCommMonIdIso : mapCommMon (𝟭 C) ≅ 𝟭 (CommMon_ C) :=
196198
NatIso.ofComponents fun X ↦ CommMon_.mkIso (.refl _)
197199

198200
/-- The composition functor is also the composition on commutative monoid objects. -/
199201
@[simps!]
200-
noncomputable def mapCommMonCompIso : (F ⋙ G).mapCommMon ≅ F.mapCommMon ⋙ G.mapCommMon :=
202+
def mapCommMonCompIso : (F ⋙ G).mapCommMon ≅ F.mapCommMon ⋙ G.mapCommMon :=
201203
NatIso.ofComponents fun X ↦ CommMon_.mkIso (.refl _)
202204

203205
variable (C D) in
@@ -208,18 +210,35 @@ def mapCommMonFunctor : LaxBraidedFunctor C D ⥤ CommMon_ C ⥤ CommMon_ D wher
208210
map α := { app A := .mk' (α.hom.app A.X) }
209211
map_comp _ _ := rfl
210212

213+
protected instance Faithful.mapCommMon [F.Faithful] : F.mapCommMon.Faithful where
214+
map_injective hfg := F.mapMon.map_injective hfg
215+
211216
/-- Natural transformations between functors lift to monoid objects. -/
212217
@[simps!]
213-
noncomputable def mapCommMonNatTrans (f : F ⟶ F') [NatTrans.IsMonoidal f] :
214-
F.mapCommMon ⟶ F'.mapCommMon where
218+
def mapCommMonNatTrans (f : F ⟶ F') [NatTrans.IsMonoidal f] : F.mapCommMon ⟶ F'.mapCommMon where
215219
app X := .mk' (f.app _)
216220

217221
/-- Natural isomorphisms between functors lift to monoid objects. -/
218222
@[simps!]
219-
noncomputable def mapCommMonNatIso (e : F ≅ F') [NatTrans.IsMonoidal e.hom] :
220-
F.mapCommMon ≅ F'.mapCommMon :=
223+
def mapCommMonNatIso (e : F ≅ F') [NatTrans.IsMonoidal e.hom] : F.mapCommMon ≅ F'.mapCommMon :=
221224
NatIso.ofComponents fun X ↦ CommMon_.mkIso (e.app _)
222225

226+
end LaxBraided
227+
228+
section Braided
229+
variable [F.Braided]
230+
231+
protected instance Full.mapCommMon [F.Full] [F.Faithful] : F.mapCommMon.Full where
232+
map_surjective := F.mapMon.map_surjective
233+
234+
/-- If `F : C ⥤ D` is a fully faithful monoidal functor, then `Grp(F) : Grp C ⥤ Grp D` is fully
235+
faithful too. -/
236+
@[simps]
237+
protected def FullyFaithful.mapCommMon (hF : F.FullyFaithful) : F.mapCommMon.FullyFaithful where
238+
preimage f := .mk <| hF.preimage f.hom
239+
240+
end Braided
241+
223242
end Functor
224243

225244
open Functor
@@ -229,7 +248,7 @@ variable {F : C ⥤ D} {G : D ⥤ C} (a : F ⊣ G) [F.Braided] [G.LaxBraided] [a
229248

230249
/-- An adjunction of braided functors lifts to an adjunction of their lifts to commutative monoid
231250
objects. -/
232-
@[simps] noncomputable def mapCommMon : F.mapCommMon ⊣ G.mapCommMon where
251+
@[simps] def mapCommMon : F.mapCommMon ⊣ G.mapCommMon where
233252
unit := mapCommMonIdIso.inv ≫ mapCommMonNatTrans a.unit ≫ mapCommMonCompIso.hom
234253
counit := mapCommMonCompIso.inv ≫ mapCommMonNatTrans a.counit ≫ mapCommMonIdIso.hom
235254

@@ -239,7 +258,7 @@ namespace Equivalence
239258

240259
/-- An equivalence of categories lifts to an equivalence of their commutative monoid objects. -/
241260
@[simps]
242-
noncomputable def mapCommMon (e : C ≌ D) [e.functor.Braided] [e.inverse.Braided] [e.IsMonoidal] :
261+
def mapCommMon (e : C ≌ D) [e.functor.Braided] [e.inverse.Braided] [e.IsMonoidal] :
243262
CommMon_ C ≌ CommMon_ D where
244263
functor := e.functor.mapCommMon
245264
inverse := e.inverse.mapCommMon

Mathlib/CategoryTheory/Monoidal/Grp_.lean

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ open Monoidal
338338
variable (F) in
339339
/-- A finite-product-preserving functor takes group objects to group objects. -/
340340
@[simps!]
341-
noncomputable def mapGrp : Grp_ C ⥤ Grp_ D where
341+
def mapGrp : Grp_ C ⥤ Grp_ D where
342342
obj A :=
343343
{ F.mapMon.obj A.toMon_ with
344344
grp :=
@@ -351,6 +351,18 @@ noncomputable def mapGrp : Grp_ C ⥤ Grp_ D where
351351
Functor.Monoidal.toUnit_ε_assoc, ← Functor.map_comp] } }
352352
map f := F.mapMon.map f
353353

354+
protected instance Faithful.mapGrp [F.Faithful] : F.mapGrp.Faithful where
355+
map_injective hfg := F.mapMon.map_injective hfg
356+
357+
protected instance Full.mapGrp [F.Full] [F.Faithful] : F.mapGrp.Full where
358+
map_surjective := F.mapMon.map_surjective
359+
360+
/-- If `F : C ⥤ D` is a fully faithful monoidal functor, then `Grp(F) : Grp C ⥤ Grp D` is fully
361+
faithful too. -/
362+
@[simps]
363+
protected def FullyFaithful.mapGrp (hF : F.FullyFaithful) : F.mapGrp.FullyFaithful where
364+
preimage f := .mk <| hF.preimage f.hom
365+
354366
@[simp]
355367
theorem mapGrp_id_one (A : Grp_ C) :
356368
η[((𝟭 C).mapGrp.obj A).X] = 𝟙 _ ≫ η[A.X] :=
@@ -373,24 +385,22 @@ theorem comp_mapGrp_mul (A : Grp_ C) :
373385

374386
/-- The identity functor is also the identity on group objects. -/
375387
@[simps!]
376-
noncomputable def mapGrpIdIso : mapGrp (𝟭 C) ≅ 𝟭 (Grp_ C) :=
377-
NatIso.ofComponents (fun X ↦ Grp_.mkIso (.refl _) (by simp)
378-
(by simp))
388+
def mapGrpIdIso : mapGrp (𝟭 C) ≅ 𝟭 (Grp_ C) :=
389+
NatIso.ofComponents fun X ↦ Grp_.mkIso (.refl _)
379390

380391
/-- The composition functor is also the composition on group objects. -/
381392
@[simps!]
382-
noncomputable def mapGrpCompIso : (F ⋙ G).mapGrp ≅ F.mapGrp ⋙ G.mapGrp :=
383-
NatIso.ofComponents (fun X ↦ Grp_.mkIso (.refl _) (by simp [ε_of_cartesianMonoidalCategory])
384-
(by simp [μ_of_cartesianMonoidalCategory]))
393+
def mapGrpCompIso : (F ⋙ G).mapGrp ≅ F.mapGrp ⋙ G.mapGrp :=
394+
NatIso.ofComponents fun X ↦ Grp_.mkIso (.refl _)
385395

386396
/-- Natural transformations between functors lift to group objects. -/
387397
@[simps!]
388-
noncomputable def mapGrpNatTrans (f : F ⟶ F') : F.mapGrp ⟶ F'.mapGrp where
398+
def mapGrpNatTrans (f : F ⟶ F') : F.mapGrp ⟶ F'.mapGrp where
389399
app X := .mk' (f.app _)
390400

391401
/-- Natural isomorphisms between functors lift to group objects. -/
392402
@[simps!]
393-
noncomputable def mapGrpNatIso (e : F ≅ F') : F.mapGrp ≅ F'.mapGrp :=
403+
def mapGrpNatIso (e : F ≅ F') : F.mapGrp ≅ F'.mapGrp :=
394404
NatIso.ofComponents fun X ↦ Grp_.mkIso (e.app _)
395405

396406
attribute [local instance] Monoidal.ofChosenFiniteProducts in
@@ -408,7 +418,7 @@ namespace Adjunction
408418
variable {F : C ⥤ D} {G : D ⥤ C} (a : F ⊣ G) [F.Monoidal] [G.Monoidal]
409419

410420
/-- An adjunction of monoidal functors lifts to an adjunction of their lifts to group objects. -/
411-
@[simps] noncomputable def mapGrp : F.mapGrp ⊣ G.mapGrp where
421+
@[simps] def mapGrp : F.mapGrp ⊣ G.mapGrp where
412422
unit := mapGrpIdIso.inv ≫ mapGrpNatTrans a.unit ≫ mapGrpCompIso.hom
413423
counit := mapGrpCompIso.inv ≫ mapGrpNatTrans a.counit ≫ mapGrpIdIso.hom
414424

@@ -418,7 +428,7 @@ namespace Equivalence
418428
variable (e : C ≌ D) [e.functor.Monoidal] [e.inverse.Monoidal]
419429

420430
/-- An equivalence of categories lifts to an equivalence of their group objects. -/
421-
@[simps] noncomputable def mapGrp : Grp_ C ≌ Grp_ D where
431+
@[simps] def mapGrp : Grp_ C ≌ Grp_ D where
422432
functor := e.functor.mapGrp
423433
inverse := e.inverse.mapGrp
424434
unitIso := mapGrpIdIso.symm ≪≫ mapGrpNatIso e.unitIso ≪≫ mapGrpCompIso

Mathlib/CategoryTheory/Monoidal/Mon_.lean

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -304,25 +304,25 @@ theorem comp_mapMon_mul (X : Mon_ C) :
304304

305305
/-- The identity functor is also the identity on monoid objects. -/
306306
@[simps!]
307-
noncomputable def mapMonIdIso : mapMon (𝟭 C) ≅ 𝟭 (Mon_ C) :=
307+
def mapMonIdIso : mapMon (𝟭 C) ≅ 𝟭 (Mon_ C) :=
308308
NatIso.ofComponents fun X ↦ Mon_.mkIso (.refl _)
309309

310310
/-- The composition functor is also the composition on monoid objects. -/
311311
@[simps!]
312-
noncomputable def mapMonCompIso : (F ⋙ G).mapMon ≅ F.mapMon ⋙ G.mapMon :=
312+
def mapMonCompIso : (F ⋙ G).mapMon ≅ F.mapMon ⋙ G.mapMon :=
313313
NatIso.ofComponents fun X ↦ Mon_.mkIso (.refl _)
314314

315315
protected instance Faithful.mapMon [F.Faithful] : F.mapMon.Faithful where
316316
map_injective {_X _Y} _f _g hfg := Mon_.Hom.ext <| map_injective congr(($hfg).hom)
317317

318318
/-- Natural transformations between functors lift to monoid objects. -/
319319
@[simps!]
320-
noncomputable def mapMonNatTrans (f : F ⟶ F') [NatTrans.IsMonoidal f] : F.mapMon ⟶ F'.mapMon where
320+
def mapMonNatTrans (f : F ⟶ F') [NatTrans.IsMonoidal f] : F.mapMon ⟶ F'.mapMon where
321321
app X := .mk' (f.app _)
322322

323323
/-- Natural isomorphisms between functors lift to monoid objects. -/
324324
@[simps!]
325-
noncomputable def mapMonNatIso (e : F ≅ F') [NatTrans.IsMonoidal e.hom] : F.mapMon ≅ F'.mapMon :=
325+
def mapMonNatIso (e : F ≅ F') [NatTrans.IsMonoidal e.hom] : F.mapMon ≅ F'.mapMon :=
326326
NatIso.ofComponents fun X ↦ Mon_.mkIso (e.app _)
327327

328328
end LaxMonoidal
@@ -351,6 +351,7 @@ instance FullyFaithful.isMon_Hom_preimage (hF : F.FullyFaithful) {X Y : C}
351351

352352
/-- If `F : C ⥤ D` is a fully faithful monoidal functor, then `Mon(F) : Mon C ⥤ Mon D` is fully
353353
faithful too. -/
354+
@[simps]
354355
protected def FullyFaithful.mapMon (hF : F.FullyFaithful) : F.mapMon.FullyFaithful where
355356
preimage {X Y} f := .mk' <| hF.preimage f.hom
356357

@@ -372,7 +373,7 @@ namespace Adjunction
372373
variable {F : C ⥤ D} {G : D ⥤ C} (a : F ⊣ G) [F.Monoidal] [G.LaxMonoidal] [a.IsMonoidal]
373374

374375
/-- An adjunction of monoidal functors lifts to an adjunction of their lifts to monoid objects. -/
375-
@[simps] noncomputable def mapMon : F.mapMon ⊣ G.mapMon where
376+
@[simps] def mapMon : F.mapMon ⊣ G.mapMon where
376377
unit := mapMonIdIso.inv ≫ mapMonNatTrans a.unit ≫ mapMonCompIso.hom
377378
counit := mapMonCompIso.inv ≫ mapMonNatTrans a.counit ≫ mapMonIdIso.hom
378379

@@ -382,7 +383,7 @@ namespace Equivalence
382383

383384
/-- An equivalence of categories lifts to an equivalence of their monoid objects. -/
384385
@[simps]
385-
noncomputable def mapMon (e : C ≌ D) [e.functor.Monoidal] [e.inverse.Monoidal] [e.IsMonoidal] :
386+
def mapMon (e : C ≌ D) [e.functor.Monoidal] [e.inverse.Monoidal] [e.IsMonoidal] :
386387
Mon_ C ≌ Mon_ D where
387388
functor := e.functor.mapMon
388389
inverse := e.inverse.mapMon

0 commit comments

Comments
 (0)