Skip to content

Commit

Permalink
gh-35574: details on complex reflection groups
Browse files Browse the repository at this point in the history
    
<!-- Please provide a concise, informative and self-explanatory title.
-->
<!-- Don't put issue numbers in the title. Put it in the Description
below. -->
<!-- For example, instead of "Fixes #12345", use "Add a new method to
multiply two integers" -->

### 📚 Description

Remove a deprecated method in the category of complex reflection groups

Also one little code enhancement

and some pep8 cleanups.

<!-- Describe your changes here in detail. -->
<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes #12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. It should be `[x]` not `[x
]`. -->

- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- #12345: short description why this is a dependency
- #34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: #35574
Reported by: Frédéric Chapoton
Reviewer(s): Matthias Köppe
  • Loading branch information
Release Manager committed May 27, 2023
2 parents 39619d4 + 679fc1a commit 18a217e
Showing 1 changed file with 9 additions and 29 deletions.
38 changes: 9 additions & 29 deletions src/sage/categories/finite_complex_reflection_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def example(self):
Reducible real reflection group of rank 4 and type A2 x B2
"""
from sage.combinat.root_system.reflection_group_real import ReflectionGroup
return ReflectionGroup((1,1,3), (2,1,2))
return ReflectionGroup((1, 1, 3), (2, 1, 2))

class SubcategoryMethods:

Expand Down Expand Up @@ -417,7 +417,7 @@ def cardinality(self):
from sage.rings.integer_ring import ZZ
return ZZ.prod(self.degrees())

def is_well_generated(self):
def is_well_generated(self) -> bool:
r"""
Return whether ``self`` is well-generated.
Expand Down Expand Up @@ -662,7 +662,7 @@ def example(self):
Irreducible complex reflection group of rank 3 and type G(4,2,3)
"""
from sage.combinat.root_system.reflection_group_real import ReflectionGroup
return ReflectionGroup((4,2,3))
return ReflectionGroup((4, 2, 3))

class ParentMethods:
def coxeter_number(self):
Expand Down Expand Up @@ -787,28 +787,8 @@ def succ(seed):
structure='graded',
enumeration='breadth')
if return_lengths:
return (x for x in step)
else:
return (x[0] for x in step)

def elements_below_coxeter_element(self, c=None):
r"""
Deprecated method.
Superseded by :meth:`absolute_order_ideal`
TESTS::
sage: W = CoxeterGroup(['A', 3]) # optional - sage.combinat sage.groups
sage: len(list(W.elements_below_coxeter_element())) # optional - sage.combinat sage.groups
doctest:...: DeprecationWarning: The method elements_below_coxeter_element
is deprecated. Please use absolute_order_ideal instead.
See https://github.com/sagemath/sage/issues/27924 for details.
14
"""
from sage.misc.superseded import deprecation
deprecation(27924, "The method elements_below_coxeter_element is deprecated. Please use absolute_order_ideal instead.")
return self.absolute_order_ideal(gens=c)
return step
return (x[0] for x in step)

# TODO: have a cached and an uncached version
@cached_method
Expand Down Expand Up @@ -877,11 +857,11 @@ def noncrossing_partition_lattice(self, c=None, L=None,
else:
L = [(pi, pi.reflection_length()) for pi in L]
rels = []
ref_lens = {pi:l for (pi, l) in L}
ref_lens = {pi: l for (pi, l) in L}
for (pi, l) in L:
for t in R:
tau = pi * t
if tau in ref_lens and l+1 == ref_lens[tau]:
if tau in ref_lens and l + 1 == ref_lens[tau]:
rels.append((pi, tau))

P = Poset(([], rels), cover_relations=True, facade=True)
Expand Down Expand Up @@ -1028,7 +1008,7 @@ def example(self):
Reducible complex reflection group of rank 4 and type A2 x G(3,1,2)
"""
from sage.combinat.root_system.reflection_group_real import ReflectionGroup
return ReflectionGroup((1,1,3), (3,1,2))
return ReflectionGroup((1, 1, 3), (3, 1, 2))

class ParentMethods:
def _test_well_generated(self, **options):
Expand Down Expand Up @@ -1213,7 +1193,7 @@ def rational_catalan_number(self, p, polynomial=False):
from sage.combinat.q_analogues import q_int

h = self.coxeter_number()
if not gcd(h,p) == 1:
if not gcd(h, p) == 1:
raise ValueError("parameter p = %s is not coprime to the Coxeter number %s" % (p, h))

if polynomial:
Expand Down

0 comments on commit 18a217e

Please sign in to comment.