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]