Fin-0.2.9.0: Finite totally-ordered sets
Safe HaskellNone
LanguageHaskell2010

Data.Fin.Permutation

Description

Synopsis

Documentation

data Permutation n Source #

Permutation of n elements

Any permutation can be expressed as a product of transpositions. Ergo, construct with Semigroup operations and swap.

Instances

Instances details
Eq (Permutation n) Source # 
Instance details

Defined in Data.Fin.Permutation

Show (Permutation n) Source # 
Instance details

Defined in Data.Fin.Permutation

Natural n => Semigroup (Permutation n) Source # 
Instance details

Defined in Data.Fin.Permutation

Natural n => Monoid (Permutation n) Source # 
Instance details

Defined in Data.Fin.Permutation

Natural n => Group (Permutation n) Source # 
Instance details

Defined in Data.Fin.Permutation

Methods

invert :: Permutation n -> Permutation n #

Natural n => Universe (Permutation n) Source # 
Instance details

Defined in Data.Fin.Permutation

Methods

universe :: [Permutation n] #

Natural n => Finite (Permutation n) Source # 
Instance details

Defined in Data.Fin.Permutation

Methods

universeF :: [Permutation n] #

apply :: Permutation n -> List n a -> List n a Source #

unapply :: Permutation n -> List n a -> List n a Source #

swap :: Natural n => Fin n -> Fin n -> Permutation n Source #

Transposition of the giventh elements

orbit :: Natural n => Permutation n -> Fin n -> NonEmpty (Fin n) Source #

Orbit of the given index under the given permutation

cycles :: forall n. Natural n => Permutation (Succ n) -> NonEmpty (NonEmpty (Fin (Succ n))) Source #

All the cycles of the given permutation, which are necessarily disjoint