On Tue, Dec 28, 2010 at 11:49 PM, Simon King <simon.k...@uni-jena.de> wrote: > Hi Robert, > > On 28 Dez., 23:41, Robert Bradshaw <rober...@math.washington.edu> > wrote: >> > According to your post, it should be "A group action G x S rightarrow >> > S is a functor from G (considered as a category) to the category of >> > Morphisms of Sets", and in the code it should be >> > Functor.__init__(self, Groupoid(G), S.category().hom_category()). >> >> Not quite. It is G considered as a category where the elements of G >> are the morphisms and there only one object, so it is actually a >> functor to the categories of sets. > > I see. But is that category actually implemented in Sage? Apparently > it is not Groupoid(G) (as one might expect from the code snippet > above): > sage: G = SymmetricGroup(5) > sage: C = Groupoid(G) > sage: G.random_element() in C.hom_category() > False > > Shouldn't the last line return "True"?
Hmm... Groupoid is the wrong category here. Or, rather, the category we want is a groupoid, but not this one. > I'd like to provide both the categorical approach towards actions and > the other approach: It would be up to the user what approach to use > for a new action, and there should be a way to consider any action > both as a functor and as a map, regardless how it was defined (see my > post on sage-algebra). I'd say it would make sense to implement Actions as a mapping G x S -> S', which is essentially what the implementation is now. There should be functions provided to view this as a map G -> Hom(S, S') and as a functor, but the inheritance is certainly odd and wrong the way it is now. > But before that is possible, it seems that one needs to provide a > proper HomCategory for groupoids with a __contains__ method that > relies on containment in the underlying set. Should containment be for morphisms, objects, or both? - Robert -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org