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

Commit

Permalink
Adding some systematic doctests and one detail.
Browse files Browse the repository at this point in the history
  • Loading branch information
tscrim committed Jan 26, 2023
1 parent 3a1a03a commit 14d6f61
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
2 changes: 0 additions & 2 deletions src/sage/combinat/root_system/reflection_group_complex.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
18 changes: 17 additions & 1 deletion src/sage/combinat/root_system/reflection_group_element.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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()))

Expand All @@ -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]
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 14d6f61

Please sign in to comment.