Ask Your Question
0

Problem with AbelianGroup.cayley_graph ()

asked 2013-08-31 17:09:18 +0100

Questors gravatar image

updated 2013-08-31 17:11:06 +0100

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

While:

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/parent.so in sage.structure.parent.Parent.__getattr__ (sage/structure/parent.c:6585)()

/home/martin/sage-5.9/local/lib/python2.7/site-packages/sage/structure/misc.so 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
2

answered 2013-09-02 03:53:11 +0100

Nicolas M Thiéry gravatar image

updated 2013-09-02 03:54:52 +0100

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
ag2.cayley_graph()
edit flag offensive delete link more

Comments

Thanks for the tip Nicolas. Regards Martin

Questors gravatar imageQuestors ( 2013-09-02 13:25:49 +0100 )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

Stats

Asked: 2013-08-31 17:09:18 +0100

Seen: 451 times

Last updated: Sep 02 '13