Skip to content

Commit 68d6c11

Browse files
committed
Fixing the definition and updating a doctest.
1 parent 9089a1c commit 68d6c11

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

src/sage/combinat/colored_permutations.py

+14-6
Original file line numberDiff line numberDiff line change
@@ -1195,8 +1195,7 @@ def to_cycles(self, singletons=True, use_min=True, negative_cycles=True):
11951195
11961196
The cycles are returned in the order of increasing smallest
11971197
elements, and each cycle is returned as a tuple which starts
1198-
with its smallest positive element. We do not include the
1199-
corresponding negative cycles.
1198+
with its smallest positive element.
12001199
12011200
INPUT:
12021201
@@ -1269,13 +1268,22 @@ def cycle_type(self):
12691268
Return a pair of partitions of ``len(self)`` corresponding to the
12701269
signed cycle type of ``self``.
12711270
1272-
A *negative cycle* is a cycle `C = (c_0, \ldots, c_{2k-1})` such that
1273-
`c_0 = c_k`. Any other cycle is positive. For any cycle `C`, we
1274-
ignore the cycle `-C` (provided this is a different cycle).
1271+
A *cycle* is a tuple `C = (c_0, \ldots, c_k)` with `\pi(c_i) = c_{i+1}`
1272+
for `0 \leq i < k` and `\pi(c_k) = c_0`. If `C` is a cycle,
1273+
`\overline{C} = (-c_0, \ldots, -c_k)` is also a cycle. A cycle is
1274+
*negative*, if `C = \overline{C}` up to cyclic reordering. In this
1275+
case, `k` is necessarily even and the length of `C` is `k/2`.
1276+
A *positive cycle* is a pair `C \overline{C}`, its length is `k`.
1277+
1278+
Let `\alpha` be the partition whose parts are the lengths of the
1279+
positive cycles and let `\beta` be the partition whose parts are
1280+
the lengths of the negative cycles. Then `(\alpha, \beta)` is
1281+
the cycle type of `\pi`.
12751282
12761283
EXAMPLES::
12771284
1278-
sage: pi = SignedPermutations(7)([2,-1,4,-6,-5,-3,7])
1285+
sage: G = SignedPermutations(7)
1286+
sage: pi = G([2, -1, 4, -6, -5, -3, 7])
12791287
sage: pi.cycle_type()
12801288
([3, 1], [2, 1])
12811289

0 commit comments

Comments
 (0)