# HG changeset patch
# User Dmitrii Pasechnik <dimpase@gmail.com>
# Date 1353749112 -28800
# Node ID dcc8a27af2fc32fa2df2cd71538cae2baeac3a6c
# Parent c4ce3d430b7064e2d2b2353abbdf3c42c0c2e696
in some cases permutations with cycles of form (x,x) were created. This is now fixed
diff --git a/sage/groups/perm_gps/permgroup_named.py b/sage/groups/perm_gps/permgroup_named.py
a
|
b
|
|
914 | 914 | sage: GeneralDihedralGroup([3, 1.5]) |
915 | 915 | Traceback (most recent call last): |
916 | 916 | ... |
917 | | TypeError: the input list must contain all Integers |
| 917 | TypeError: the input list must consist of Integers |
918 | 918 | |
919 | 919 | sage: GeneralDihedralGroup([4, -8]) |
920 | 920 | Traceback (most recent call last): |
… |
… |
|
951 | 951 | raise ValueError, 'there must be at least one direct factor in the abelian group being dihedralized' |
952 | 952 | |
953 | 953 | if not all(isinstance(x, Integer) for x in factors): |
954 | | raise TypeError, 'the input list must contain all Integers' |
| 954 | raise TypeError, 'the input list must consist of Integers' |
955 | 955 | |
956 | 956 | if not all(x >= 2 for x in factors): |
957 | 957 | s = 'all direct factors must be greater than 1' |
… |
… |
|
976 | 976 | # make contribution to the generator that dihedralizes the |
977 | 977 | # abelian group |
978 | 978 | for i in range(1, (a//2)+1): |
979 | | genx.append(tuple((jumppoint+i, jumppoint+a-i))) |
| 979 | if i != a-i: |
| 980 | genx.append(tuple((jumppoint+i, jumppoint+a-i))) |
980 | 981 | jumppoint = jumppoint + a |
981 | 982 | # If all of the direct factors are C2, then the action turning |
982 | 983 | # each element into its inverse is trivial, and the |