group-theory-0.1.0.0: The theory of groups
Copyright (c) 2020 Emily Pillmore BSD-style Reed Mullanix , Emily Pillmore stable non-portable Safe Haskell2010

Data.Group.Permutation

Description

This module provides definitions for Permutations along with useful combinators.

Synopsis

# Permutation groups

data Permutation a Source #

Isomorphism of a finite set onto itself. Each entry consists of one half of the isomorphism.

Note: It is the responsibility of the user to provide inverse proofs for to and from. Be responsible!

Constructors

 Permutation Fieldsto :: a -> aThe forward half of the bijectionfrom :: a -> aThe inverse half of the bijection

#### Instances

Instances details
 Source # Instance detailsDefined in Data.Group.Permutation Methods(<>) :: Permutation a -> Permutation a -> Permutation a #stimes :: Integral b => b -> Permutation a -> Permutation a # Monoid a => Monoid (Permutation a) Source # Instance detailsDefined in Data.Group.Permutation Methodsmappend :: Permutation a -> Permutation a -> Permutation a #mconcat :: [Permutation a] -> Permutation a # Source # Instance detailsDefined in Data.Group.Permutation Group a => Group (Permutation a) Source # Instance detailsDefined in Data.Group.Permutation Methodsgtimes :: Integral n => n -> Permutation a -> Permutation a Source # Source # Instance detailsDefined in Data.Group.Permutation Source # Instance detailsDefined in Data.Group.Permutation Source # Instance detailsDefined in Data.Group.Permutation

## Permutation group combinators

permute :: (a -> a) -> (a -> a) -> Permutation a Source #

Build a Permutation from a bijective pair.

pairwise :: Permutation a -> (a -> a, a -> a) Source #

Destroy a Permutation, producing the underlying pair of bijections.

(-$) :: Permutation a -> a -> a infixr 0 Source # Infix alias for the to half of Permutation bijection ($-) :: Permutation a -> a -> a infixr 0 Source #

Infix alias for the from half of Permutation bijection

embed :: Group g => g -> Permutation g Source #

Embed a Group into the Permutation group on it's underlying set.

retract :: Group g => Permutation g -> g Source #

Get a group element out of the permutation group. This is a left inverse to embed, i.e.

   retract . embed = id


## Permutation patterns

pattern Permute :: Group g => Permutation g -> g Source #

Bidirectional pattern synonym for embedding/retraction of groups into their permutation groups.