Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement absolute length fix #37001

Merged
merged 16 commits into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/doc/en/reference/references/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1380,6 +1380,9 @@ REFERENCES:
.. [Car1972] \R. W. Carter. *Simple groups of Lie type*, volume 28 of
Pure and Applied Mathematics. John Wiley and Sons, 1972.

.. [Car1972a] \R. W. Carter. *Conjugacy classes in the Weyl group*, Comp. Math.
Vol 26 (1972) 1-59.
thecaligarmo marked this conversation as resolved.
Show resolved Hide resolved

.. [Cha2005] \F. Chapoton, *Une Base Symétrique de l'algèbre des
Coinvariants Quasi-Symétriques*, Electronic Journal of
Combinatorics Vol 12(1) (2005) N16.
Expand Down Expand Up @@ -2347,6 +2350,9 @@ REFERENCES:
.. [Dy1994] \M. J. Dyer. *Bruhat intervals, polyhedral cones and
Kazhdan-Lusztig-Stanley polynomials*. Math.Z., 215(2):223-236, 1994.

.. [Dy2001] \M. J. Dyer. *On minimal lengths of expressions of Coxeter group elements as
products of reflections* Proc. Amer. Math. Soc. Vol 129 (9) (Sep 2001) 2591-2595
thecaligarmo marked this conversation as resolved.
Show resolved Hide resolved

.. _ref-E:

**E**
Expand Down
26 changes: 23 additions & 3 deletions src/sage/categories/coxeter_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -1950,7 +1950,10 @@ def absolute_length(self):
Return the absolute length of ``self``.

The absolute length is the length of the shortest expression
of the element as a product of reflections.
of the element as a product of reflections. For finite Coxeter
groups, the absolute length is the codimension of the
1-eigenspace of the element (Lemmas 1-3 in [Car1972a]_). For all
other Coxeter types, we use Theorem 1.1 in [Dy2001]_.

For permutations in the symmetric groups, the absolute
length is the size minus the number of its disjoint
Expand All @@ -1971,9 +1974,26 @@ def absolute_length(self):
sage: s = W.simple_reflections() # needs sage.groups
sage: (s[3]*s[2]*s[1]).absolute_length() # needs sage.combinat sage.groups
3

sage: W = CoxeterGroup(["A",2,1])
sage: (r, s, t) = W.simple_reflections()
sage: (r * s * r * t).absolute_length()
2
"""
M = self.canonical_matrix()
return (M - 1).image().dimension()
P = self.parent()
if P.is_finite():
M = self.canonical_matrix()
return (M - 1).image().dimension()

import itertools
w = self.reduced_word()
s = P.simple_reflections()
one = P.one()
n = self.length()
for ell in range(n - 1, -1, -1):
for wd in itertools.combinations(w, ell):
if P.prod(s[i] for i in wd) == one:
return n - ell

def absolute_le(self, other):
r"""
Expand Down
Loading