Ask Your Question

Problem with AbelianGroup.cayley_graph ()

asked 2013-08-31 10:09:18 -0500

Questors gravatar image

updated 2013-08-31 10:11:06 -0500

Am I misunderstanding something here? AbelianGroup.cayley_graph() fails with the default generators and but is ok if generators=AbelianGroup.gens(). It also fails with .gens_small().
We have:
sage: ag2=(AbelianGroup([3,3])) sage: ag2.cayley_graph(generators=ag2.gens())) Digraph on 9 vertices


sage: ag2.cayley_graph() --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-42-b5555c6dc56f> in <module>() ----> 1 ag2.cayley_graph()

/home/martin/sage-5.9/local/lib/python2.7/site-packages/sage/categories/semigroups.pyc in cayley_graph(self, side, simple, elements, generators, connecting_set) 283 generators = connecting_set 284 if generators is None: --> 285 generators = self.semigroup_generators() 286 if isinstance(generators, (list, tuple)): 287 generators = dict((self(g), self(g)) for g in generators)

/home/martin/sage-5.9/local/lib/python2.7/site-packages/sage/structure/ in sage.structure.parent.Parent.__getattr__ (sage/structure/parent.c:6585)()

/home/martin/sage-5.9/local/lib/python2.7/site-packages/sage/structure/ in sage.structure.misc.getattr_from_other_class (sage/structure/misc.c:1606)()

AttributeError: 'AbelianGroup_class_with_category' object has no attribute 'semigroup_generators'

But ag2 is a semi_group:

sage: ag2.categories() [Category of groups, Category of monoids, Category of semigroups, Category of magmas, Category of sets, Category of sets with partial maps, Category of objects]

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2013-09-01 20:53:11 -0500

Nicolas M Thiéry gravatar image

updated 2013-09-01 20:54:52 -0500

Thanks for the report! That's a trivial not implemented feature: this abelian group should be in the finite group category. It would then take advantage of the "semigroup_genrators" implemented there which uses the fact that, for a finite group, the group generators are also semigroup generators.

I have made this #15140.

In the mean time, you can do:

ag2.semigroup_generators = ag2.group_generators
edit flag offensive delete link more


Thanks for the tip Nicolas. Regards Martin

Questors gravatar imageQuestors ( 2013-09-02 06:25:49 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-08-31 10:09:18 -0500

Seen: 163 times

Last updated: Sep 01 '13