Hi Robert, On 29 Dez., 20:04, Robert Bradshaw <rober...@math.washington.edu> wrote: > On Tue, Dec 28, 2010 at 11:49 PM, Simon King <simon.k...@uni-jena.de> wrote: > > ... > > 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.
Yep, what I wrote was nonsense. See my post at sage-algebra, http://groups.google.com/group/sage-algebra/browse_thread/thread/3e2ca2a8be1a3a23 (I think this discussion should be moved to sage-algebra): If g is an element of G, then "g in C.hom_category()" should of course return "False", since g is not a homset (but it is contained in a homset). Note that we currently have sage: R.<x,y,z> = ZZ[] sage: f = R.hom([x^2,y^2,z^2]) sage: C = R.category() sage: f in C.hom_category() True which I think is a bug. I think one *should* test the property of being a morphism by "parent(g) in Groupoid(G).hom_category()" (which is not implemented yet) resp. "parent(f) in C.hom_category()" (which works already). > 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. OK, then let's make it so. > Should containment be for morphisms, objects, or both? See above: Not "g in C.hom_category()" but "parent(g) in C.hom_category()". Cheers, Simon -- 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