- newtype Permutation a = P (Map a a)
- (.^) :: Ord k => k -> Permutation k -> k
- p :: Ord a => [[a]] -> Permutation a
- (^-) :: (Ord k, Show k) => Permutation k -> Int -> Permutation k
- (~^) :: (Ord t, Show t) => Permutation t -> Permutation t -> Permutation t
- (-^) :: Ord t => [t] -> Permutation t -> [t]
- _C :: Integral a => a -> [Permutation a]
- _S :: Integral a => a -> [Permutation a]
- _A :: Integral a => a -> [Permutation a]
- elts :: (Num a, Ord a) => [a] -> [a]
- order :: (Num a, Ord a) => [a] -> Int

# Documentation

newtype Permutation a Source

Type for permutations, considered as group elements.

Eq a => Eq (Permutation a) | |

(Ord a, Show a) => Fractional (Permutation a) | |

(Ord a, Show a) => Num (Permutation a) | |

Ord a => Ord (Permutation a) | |

(Ord a, Show a) => Show (Permutation a) |

(.^) :: Ord k => k -> Permutation k -> kSource

x .^ g returns the image of a vertex or point x under the action of the permutation g

p :: Ord a => [[a]] -> Permutation aSource

Construct a permutation from a list of cycles |For example, p [[1,2,3],[4,5]] returns the permutation that sends 1 to 2, 2 to 3, 3 to 1, 4 to 5, 5 to 4

(^-) :: (Ord k, Show k) => Permutation k -> Int -> Permutation kSource

A trick: g^-1 returns the inverse of g

(~^) :: (Ord t, Show t) => Permutation t -> Permutation t -> Permutation tSource

g ~^ h returns the conjugate of g by h

(-^) :: Ord t => [t] -> Permutation t -> [t]Source

b -^ g returns the image of an edge or block b under the action of g

_C :: Integral a => a -> [Permutation a]Source

_C n returns generators for Cn, the cyclic group of order n

_S :: Integral a => a -> [Permutation a]Source

_S n returns generators for Sn, the symmetric group on [1..n]

_A :: Integral a => a -> [Permutation a]Source

_A n returns generators for An, the alternating group on [1..n]