Zulip Chat Archive
Stream: Is there code for X?
Topic: Functors out of `SingleObj G`
Christian Merten (Jan 08 2024 at 22:40):
Are there SingleObj
analogs of Discrete.functor
and Discrete.natTrans
? I.e.
import Mathlib
open CategoryTheory
def SingleObj.functor {α : Type w} [Monoid α] {X : C} (f : α →* End X) :
SingleObj α ⥤ C where
obj _ := X
map a := f a
map_id _ := by
show f 1 = 1
rw [MonoidHom.map_one]
map_comp a b := by
show f (b * a) = f b * f a
rw [MonoidHom.map_mul]
def SingleObj.natTrans {α : Type w} [Monoid α] {F G : SingleObj α ⥤ C}
(u : F.obj (SingleObj.star α) ⟶ G.obj (SingleObj.star α))
(h : ∀ a : α, F.map a ≫ u = u ≫ G.map a)
: F ⟶ G where
app _ := u
naturality _ _ a := h a
Yury G. Kudryashov (Jan 08 2024 at 22:46):
It looks like we have docs#MonoidHom.toFunctor but not this version.
Christian Merten (Jan 08 2024 at 23:03):
Should this be in the MonoidHom
namespace, i.e. MonoidHom.functor
or as in docs#CategoryTheory.Discrete SingleObj.functor
?
Johan Commelin (Jan 09 2024 at 07:08):
MonoidHom.functor
would make it possible to use dot notation, so I would go for that.
Johan Commelin (Jan 09 2024 at 07:09):
The downside is that it might be easily confused with MonoidHom.toFunctor
.
Johan Commelin (Jan 09 2024 at 07:11):
Also, your SingleObj.natTrans
doesn't really make sense in the MonoidHom
namespace. So maybe your current names are in fact the best.
Christian Merten (Jan 09 2024 at 09:18):
Johan Commelin (Jan 09 2024 at 10:53):
It looks like this file could at some point also use a little clean up, introducing some variable
lines.
Johan Commelin (Jan 09 2024 at 10:54):
Once the definition is in place, there should just be a monoid M
, a group G
, and a category C
in scope.
Christian Merten (Jan 12 2024 at 16:21):
Johan Commelin said:
It looks like this file could at some point also use a little clean up, introducing some
variable
lines.
See #9696
Last updated: May 02 2025 at 03:31 UTC