Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Merge branch 'public/11187' of git://trac.sagemath.org/sage into u/st…
Browse files Browse the repository at this point in the history
…umpc5/20396
  • Loading branch information
stumpc5 committed Apr 12, 2016
2 parents bf2ea92 + c09cd4d commit 0becba3
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/sage/categories/coxeter_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def coxeter_element(self):
element.
In this context, this is an element having a regular
eigenvector (a vector not contained in any reflecting
eigenvector (a vector not contained in any reflection
hyperplane of ``self``).
EXAMPLES::
Expand Down
30 changes: 22 additions & 8 deletions src/sage/categories/finite_complex_reflection_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,11 @@ def _test_degrees(self, **options):
Reducible real reflection group of rank 4 and type A2 x B2
sage: W._test_degrees()
sage: SymmetricGroup(3)._test_degrees()
sage: W = SymmetricGroup(5)
sage: W._test_degrees()
We now break the implementation of W.degrees and check that this is caught::
sage: W = SymmetricGroup(5)
sage: W.degrees = lambda: (1/1,5)
sage: W._test_degrees()
Traceback (most recent call last):
Expand All @@ -211,6 +212,11 @@ def _test_degrees(self, **options):
...
AssertionError: the degrees should be larger than 2
We restore W to its normal state::
sage: del W.degrees
sage: W._test_degrees()
See the documentation for :class:`TestSuite` for more information.
"""
from sage.structure.element import parent
Expand Down Expand Up @@ -244,9 +250,11 @@ def _test_codegrees(self, **options):
Reducible real reflection group of rank 4 and type A2 x B2
sage: W._test_codegrees()
sage: SymmetricGroup(3)._test_codegrees()
sage: W = SymmetricGroup(5)
sage: W._test_codegrees()
We now break the implementation of W.degrees and check that this is caught::
sage: W.codegrees = lambda: (1/1,5)
sage: W._test_codegrees()
Traceback (most recent call last):
Expand All @@ -259,6 +267,11 @@ def _test_codegrees(self, **options):
...
AssertionError: the codegrees should be nonnegative
We restore W to its normal state::
sage: del W.codegrees
sage: W._test_codegrees()
See the documentation for :class:`TestSuite` for more information.
"""
from sage.structure.element import parent
Expand All @@ -279,7 +292,7 @@ def _test_codegrees(self, **options):

def number_of_reflection_hyperplanes(self):
r"""
Return the number of reflecting hyperplanes of ``self``.
Return the number of reflection hyperplanes of ``self``.
This is also the number of distinguished reflections. For
real groups, this coincides with the number of
Expand All @@ -306,14 +319,15 @@ def number_of_reflection_hyperplanes(self):
sage: W.number_of_reflection_hyperplanes()
15
"""
return sum(self.codegrees()) + self.rank()
from sage.rings.all import ZZ
return ZZ.sum(self.codegrees()) + self.rank()

def number_of_reflections(self):
r"""
Return the number of reflections of ``self``.
For real groups, this coincides with the number of
reflecting hyperplanes.
reflection hyperplanes.
This implementation uses that it is given by the sum of
the degrees of ``self`` minus its rank.
Expand Down Expand Up @@ -571,7 +585,7 @@ def coxeter_number(self):
This is defined as `\frac{N + N^*}{n}` where
`N` is the number of reflections, `N^*` is the
number of reflecting hyperplanes, and `n` is the
number of reflection hyperplanes, and `n` is the
rank of ``self``.
EXAMPLES::
Expand Down
10 changes: 5 additions & 5 deletions src/sage/combinat/root_system/reflection_group_complex.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ def distinguished_reflection(self, i):
@cached_method
def reflection_hyperplanes(self, as_linear_functionals=False):
r"""
Return the list of all reflecting hyperplanes of ``self``,
Return the list of all reflection hyperplanes of ``self``,
either as a codimension 1 space, or as its linear functional.
INPUT:
Expand Down Expand Up @@ -601,9 +601,9 @@ def reflection_hyperplanes(self, as_linear_functionals=False):

def reflection_hyperplane(self, i, as_linear_functional=False):
r"""
Return the ``i``-th reflecting hyperplane of ``self``.
Return the ``i``-th reflection hyperplane of ``self``.
The ``i``-th reflecting hyperplane corresponds to the ``i``
The ``i``-th reflection hyperplane corresponds to the ``i``
distinguished reflection.
INPUT:
Expand Down Expand Up @@ -2280,7 +2280,7 @@ def is_h_regular(self, is_class_representative=False):
Return whether ``self`` is regular.
This is if ``self`` has an eigenvector with eigenvalue `h`
and which does not lie in any reflecting hyperplane.
and which does not lie in any reflection hyperplane.
Here, `h` denotes the Coxeter number.
EXAMPLES::
Expand Down Expand Up @@ -2308,7 +2308,7 @@ def is_regular(self, h, is_class_representative=False):
Return whether ``self`` is regular.
This is, if ``self`` has an eigenvector with eigenvalue
``h`` and which does not lie in any reflecting hyperplane.
``h`` and which does not lie in any reflection hyperplane.
- ``is_class_representative`` -- boolean (default ``True``) whether to
compute instead on the conjugacy class representative.
Expand Down

0 comments on commit 0becba3

Please sign in to comment.