From 14d6f6191190904f92728e00989de7ec1b7ff180 Mon Sep 17 00:00:00 2001 From: Travis Scrimshaw Date: Thu, 26 Jan 2023 16:39:54 +0900 Subject: [PATCH] Adding some systematic doctests and one detail. --- .../root_system/reflection_group_complex.py | 2 -- .../root_system/reflection_group_element.pyx | 18 +++++++++++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/sage/combinat/root_system/reflection_group_complex.py b/src/sage/combinat/root_system/reflection_group_complex.py index 0e057dad6bc..a3b7003f1ec 100644 --- a/src/sage/combinat/root_system/reflection_group_complex.py +++ b/src/sage/combinat/root_system/reflection_group_complex.py @@ -299,8 +299,6 @@ def __init__(self, W_types, index_set=None, hyperplane_index_set=None, reflectio canonicalize=False, category=category) - self._length_of_permutation_representation = len(Permutation(self.gens()[0])) - l_set = list(range(1, len(self.gens()) + 1)) if self._index_set is None: self._index_set = tuple(l_set) diff --git a/src/sage/combinat/root_system/reflection_group_element.pyx b/src/sage/combinat/root_system/reflection_group_element.pyx index acf54867a5d..02761726799 100644 --- a/src/sage/combinat/root_system/reflection_group_element.pyx +++ b/src/sage/combinat/root_system/reflection_group_element.pyx @@ -175,6 +175,11 @@ cdef class ComplexReflectionGroupElement(PermutationGroupElement): [1, 2, 2, 1, 1] 5 [1, 1, 2, 1, 1, 2] 6 [1, 1, 2, 2, 1, 1] 6 + + sage: data = {w: (len(w.reduced_word()), w.length()) # optional - gap3 + ....: for w in W.iteration_tracking_words()} + sage: for w in W: # optional - gap3 + ....: assert data[w] == (w.length(), w.length()), w """ return ZZ(len(self.reduced_word())) @@ -192,9 +197,12 @@ cdef class ComplexReflectionGroupElement(PermutationGroupElement): EXAMPLES:: sage: W = ReflectionGroup((3,1,2)) # optional - gap3 + sage: data = {w: [w.to_matrix(), w.to_matrix(on_space="dual")] for w in W} # optional - gap3 sage: for w in W.iteration_tracking_words(): # optional - gap3 ....: w.reduced_word() # optional - gap3 - ....: [w.to_matrix(), w.to_matrix(on_space="dual")] # optional - gap3 + ....: mats = [w.to_matrix(), w.to_matrix(on_space="dual")] # optional - gap3 + ....: mats + ....: assert data[w] == mats [] [ [1 0] [1 0] @@ -564,6 +572,10 @@ cdef class ComplexReflectionGroupElement(PermutationGroupElement): [2/3, 0] [1/2, 1/2] [1/4, 3/4] + + sage: data = {w: w.reflection_eigenvalues() for w in W} # optional - gap3 + sage: all(w.reflection_eigenvalues() == data[w] for w in W.iteration_tracking_words()) # optional - gap3 + True """ return self._parent.reflection_eigenvalues(self, is_class_representative=is_class_representative) @@ -665,6 +677,10 @@ cdef class ComplexReflectionGroupElement(PermutationGroupElement): [ 2/3*E(3) - 2/3*E(3)^2 1/3*E(3) - 1/3*E(3)^2], [ 1/3*E(3) - 1/3*E(3)^2 -1/3*E(3) + 1/3*E(3)^2] [-2/3*E(3) + 2/3*E(3)^2 -1/3*E(3) + 1/3*E(3)^2]] + + sage: data = {w: w.galois_conjugates() for w in W} # optional - gap3 + sage: all(w.galois_conjugates() == data[w] for w in W.iteration_tracking_words()) # optional - gap3 + True """ rk = self._parent.rank() M = self.to_matrix().list()