diff --git a/src/sage/categories/coxeter_groups.py b/src/sage/categories/coxeter_groups.py index 3579487bcb1..94d7824949f 100644 --- a/src/sage/categories/coxeter_groups.py +++ b/src/sage/categories/coxeter_groups.py @@ -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:: diff --git a/src/sage/categories/finite_complex_reflection_groups.py b/src/sage/categories/finite_complex_reflection_groups.py index 82b80c9d5da..8416f75a926 100644 --- a/src/sage/categories/finite_complex_reflection_groups.py +++ b/src/sage/categories/finite_complex_reflection_groups.py @@ -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): @@ -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 @@ -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): @@ -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 @@ -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 @@ -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. @@ -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:: diff --git a/src/sage/combinat/root_system/reflection_group_complex.py b/src/sage/combinat/root_system/reflection_group_complex.py index 5f1bf63d016..db121290c75 100644 --- a/src/sage/combinat/root_system/reflection_group_complex.py +++ b/src/sage/combinat/root_system/reflection_group_complex.py @@ -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: @@ -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: @@ -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:: @@ -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.