Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Naive (very inefficient) algorithm to generate the irreducible (Dynkin) root systems
Synopsis
- newtype HalfInt = HalfInt Int
- half :: HalfInt
- divByTwo :: Int -> HalfInt
- mulByTwo :: HalfInt -> Int
- scaleBy :: Int -> HalfInt -> HalfInt
- type HalfVec = [HalfInt]
- scaleVec :: Int -> HalfVec -> HalfVec
- negateVec :: HalfVec -> HalfVec
- safeZip :: (a -> b -> c) -> [a] -> [b] -> [c]
- data Dynkin
- ambientDim :: Dynkin -> Int
- simpleRootsOf :: Dynkin -> [HalfVec]
- positiveRootsOf :: Dynkin -> Set HalfVec
- negativeRootsOf :: Dynkin -> Set HalfVec
- allRootsOf :: Dynkin -> Set HalfVec
- findPositiveHyperplane :: [HalfVec] -> [Double]
- positiveRoots :: [HalfVec] -> Set HalfVec
- basisOfPositives :: Set HalfVec -> [HalfVec]
- bracket :: HalfVec -> HalfVec -> HalfInt
- mirror :: HalfVec -> HalfVec -> HalfVec
- cartanMatrix :: [HalfVec] -> Array (Int, Int) Int
- printMatrix :: Show a => Array (Int, Int) a -> IO ()
- mirrorClosure :: [HalfVec] -> Set HalfVec
- mirrorStep :: Set HalfVec -> Set HalfVec
- simpleRootsE6_123 :: [HalfVec]
- simpleRootsE7_12 :: [HalfVec]
- simpleRootsE7_diag :: [HalfVec]
- simpleRootsE8_even :: [HalfVec]
- simpleRootsE8_odd :: [HalfVec]
Half-integers
The type of half-integers (internally represented by their double)
TODO: refactor this into its own module
Vectors of half-integers
Dynkin diagrams
The roots of root systems
ambientDim :: Dynkin -> Int Source #
The ambient dimension of (our representation of the) system (length of the vector)
simpleRootsOf :: Dynkin -> [HalfVec] Source #
Positive roots
findPositiveHyperplane :: [HalfVec] -> [Double] Source #
Finds a vector, which is hopefully not orthognal to any root (generated by the given simple roots), and has positive dot product with each of them.
Operations on half-integer vectors
Mirroring
mirrorClosure :: [HalfVec] -> Set HalfVec Source #
We mirror stuff until there is no more things happening (very naive algorithm, but seems to work)
E6, E7 and E8
simpleRootsE6_123 :: [HalfVec] Source #
This is a basis of E6 as the subset of the even E8 root system where the first three coordinates agree (they are consolidated into the first coordinate here)
simpleRootsE7_12 :: [HalfVec] Source #
This is a basis of E8 as the subset of the even E8 root system where the first two coordinates agree (they are consolidated into the first coordinate here)
simpleRootsE7_diag :: [HalfVec] Source #
This is a basis of E7 as the subset of the even E8 root system for which the sum of coordinates sum to zero
simpleRootsE8_even :: [HalfVec] Source #
simpleRootsE8_odd :: [HalfVec] Source #