Skip to content

Commit

Permalink
Fixing the definition and updating a doctest.
Browse files Browse the repository at this point in the history
  • Loading branch information
tscrim committed Sep 10, 2023
1 parent 9089a1c commit 68d6c11
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions src/sage/combinat/colored_permutations.py
Original file line number Diff line number Diff line change
Expand Up @@ -1195,8 +1195,7 @@ def to_cycles(self, singletons=True, use_min=True, negative_cycles=True):
The cycles are returned in the order of increasing smallest
elements, and each cycle is returned as a tuple which starts
with its smallest positive element. We do not include the
corresponding negative cycles.
with its smallest positive element.
INPUT:
Expand Down Expand Up @@ -1269,13 +1268,22 @@ def cycle_type(self):
Return a pair of partitions of ``len(self)`` corresponding to the
signed cycle type of ``self``.
A *negative cycle* is a cycle `C = (c_0, \ldots, c_{2k-1})` such that
`c_0 = c_k`. Any other cycle is positive. For any cycle `C`, we
ignore the cycle `-C` (provided this is a different cycle).
A *cycle* is a tuple `C = (c_0, \ldots, c_k)` with `\pi(c_i) = c_{i+1}`
for `0 \leq i < k` and `\pi(c_k) = c_0`. If `C` is a cycle,
`\overline{C} = (-c_0, \ldots, -c_k)` is also a cycle. A cycle is
*negative*, if `C = \overline{C}` up to cyclic reordering. In this
case, `k` is necessarily even and the length of `C` is `k/2`.
A *positive cycle* is a pair `C \overline{C}`, its length is `k`.
Let `\alpha` be the partition whose parts are the lengths of the
positive cycles and let `\beta` be the partition whose parts are
the lengths of the negative cycles. Then `(\alpha, \beta)` is
the cycle type of `\pi`.
EXAMPLES::
sage: pi = SignedPermutations(7)([2,-1,4,-6,-5,-3,7])
sage: G = SignedPermutations(7)
sage: pi = G([2, -1, 4, -6, -5, -3, 7])
sage: pi.cycle_type()
([3, 1], [2, 1])
Expand Down

0 comments on commit 68d6c11

Please sign in to comment.