We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bc24677 commit 113d2d9Copy full SHA for 113d2d9
src/LieTheory/WeylGroup.jl
@@ -526,11 +526,11 @@ function reflection(beta::RootSpaceElem)
526
W = weyl_group(R)
527
rk = number_of_simple_roots(R)
528
529
- b, index_of_beta = is_positive_root_with_index(beta)
530
- if !b
531
- b, index_of_beta = is_negative_root_with_index(beta)
532
- end
+ b, index_of_beta = is_root_with_index(beta)
533
@req b "Not a root"
+ if index_of_beta > rk # for a negative root we want the index of the corresponding positive root
+ index_of_beta -= rk
+ end
534
535
found_simple_root = index_of_beta <= rk
536
current_index = index_of_beta
0 commit comments