From 523ba0227915169ad2423caf21d80c0252f26165 Mon Sep 17 00:00:00 2001 From: Jeshiba Date: Wed, 12 Jul 2017 16:03:31 -0400 Subject: revised longestElement --- Math/Combinatorics/RootSystem.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Math/Combinatorics/RootSystem.hs b/Math/Combinatorics/RootSystem.hs index 53cf65c..e388a23 100644 --- a/Math/Combinatorics/RootSystem.hs +++ b/Math/Combinatorics/RootSystem.hs @@ -76,7 +76,7 @@ longestElement ss = longestElement' [] posRoots posRoots = positiveRoots ss longestElement' :: [[Q]] -> [[Q]] -> [[Q]] longestElement' xs rs = - let ys = (S.fromList ss) S.\\ (S.fromList $ negateM rs) in + let ys = (S.fromList ss) S.\\ (S.fromList $ negateM rs) S.\\ (if null xs then S.empty else S.singleton (head xs)) in if S.null ys then xs else let alpha = (head (S.toList ys)) in -- cgit v1.2.3