Skip to content

Commit 14d6f61

Browse files
committed
Adding some systematic doctests and one detail.
1 parent 3a1a03a commit 14d6f61

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

src/sage/combinat/root_system/reflection_group_complex.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,6 @@ def __init__(self, W_types, index_set=None, hyperplane_index_set=None, reflectio
299299
canonicalize=False,
300300
category=category)
301301

302-
self._length_of_permutation_representation = len(Permutation(self.gens()[0]))
303-
304302
l_set = list(range(1, len(self.gens()) + 1))
305303
if self._index_set is None:
306304
self._index_set = tuple(l_set)

src/sage/combinat/root_system/reflection_group_element.pyx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,11 @@ cdef class ComplexReflectionGroupElement(PermutationGroupElement):
175175
[1, 2, 2, 1, 1] 5
176176
[1, 1, 2, 1, 1, 2] 6
177177
[1, 1, 2, 2, 1, 1] 6
178+
179+
sage: data = {w: (len(w.reduced_word()), w.length()) # optional - gap3
180+
....: for w in W.iteration_tracking_words()}
181+
sage: for w in W: # optional - gap3
182+
....: assert data[w] == (w.length(), w.length()), w
178183
"""
179184
return ZZ(len(self.reduced_word()))
180185

@@ -192,9 +197,12 @@ cdef class ComplexReflectionGroupElement(PermutationGroupElement):
192197
EXAMPLES::
193198
194199
sage: W = ReflectionGroup((3,1,2)) # optional - gap3
200+
sage: data = {w: [w.to_matrix(), w.to_matrix(on_space="dual")] for w in W} # optional - gap3
195201
sage: for w in W.iteration_tracking_words(): # optional - gap3
196202
....: w.reduced_word() # optional - gap3
197-
....: [w.to_matrix(), w.to_matrix(on_space="dual")] # optional - gap3
203+
....: mats = [w.to_matrix(), w.to_matrix(on_space="dual")] # optional - gap3
204+
....: mats
205+
....: assert data[w] == mats
198206
[]
199207
[
200208
[1 0] [1 0]
@@ -564,6 +572,10 @@ cdef class ComplexReflectionGroupElement(PermutationGroupElement):
564572
[2/3, 0]
565573
[1/2, 1/2]
566574
[1/4, 3/4]
575+
576+
sage: data = {w: w.reflection_eigenvalues() for w in W} # optional - gap3
577+
sage: all(w.reflection_eigenvalues() == data[w] for w in W.iteration_tracking_words()) # optional - gap3
578+
True
567579
"""
568580
return self._parent.reflection_eigenvalues(self, is_class_representative=is_class_representative)
569581

@@ -665,6 +677,10 @@ cdef class ComplexReflectionGroupElement(PermutationGroupElement):
665677
[ 2/3*E(3) - 2/3*E(3)^2 1/3*E(3) - 1/3*E(3)^2],
666678
[ 1/3*E(3) - 1/3*E(3)^2 -1/3*E(3) + 1/3*E(3)^2]
667679
[-2/3*E(3) + 2/3*E(3)^2 -1/3*E(3) + 1/3*E(3)^2]]
680+
681+
sage: data = {w: w.galois_conjugates() for w in W} # optional - gap3
682+
sage: all(w.galois_conjugates() == data[w] for w in W.iteration_tracking_words()) # optional - gap3
683+
True
668684
"""
669685
rk = self._parent.rank()
670686
M = self.to_matrix().list()

0 commit comments

Comments
 (0)