Ticket #4521 (new defect)

Opened 2 months ago

Last modified 2 months ago

Trivial permutation group enumeration bug

Reported by: kohel Assigned to: joyner
Priority: major Milestone:
Component: group_theory Keywords:
Cc: saliola

Description

1. This gives an error:

sage: G = PermutationGroup?([]) sage: G.list()

2. Permutation group should take an argument for the degree, e.g.:

sage: G = PermutationGroup?([],degree=4)

3. Permutation group should set the degree correctly:

sage: G = PermutationGroup?([[]]) sage: sage: G.list() [()] sage: G.degree() 1 sage: G = PermutationGroup?(

Error: Failed to load processor 1
No macro or processor named '1' found

) sage: G.degree() 1

The first group should have degree 0.

3. Degree 0 should really be supported or we will have difficulties with automorphism groups of boundary cases. Currently this gives an error:

sage: SymmetricGroup?(0)

Certainly these examples should go into the docstrings. Most of these can be trivially fixed, but it would be good if someone could review permutation groups with a view to catching these problems before they arise.

Change History

11/20/2008 03:49:47 PM changed by saliola

  • cc set to saliola.

I took a quick look at the code today and I've come away with a bunch of questions.

(1) Can you post the definition of degree? In the current code, degree it is set equal to largest_moved_point, which grabs the value from gap's LargestMovedPoint? if it isn't properly set. But this doesn't seem to agree with some of the things mentioned above.

(2) Which group should the following command return?

sage: G = PermutationGroup([],degree=4)

(3) The following two groups are isomorphic:

sage: G = PermutationGroup([[]]) 
sage: G = PermutationGroup([ [1] ])

This is because

sage: PermutationGroupElement([]).list()
[1]
sage: PermutationGroupElement([1]).list()
[1]

So I'm not sure why one group should have degree 0 while the other does not.

(4) What should the degrees of SymmetricGroup?(0) and SymmetricGroup?(1) be? Should SymmetricGroup?(0) == SymmetricGroup?(1)?

I think these are all my questions for now.