sym-0.9: Permutations, patterns, and statistics

Maintainer Anders Claesson None

Math.Perm.D8

Description

Synopsis

# The group elements

r0 :: Perm -> PermSource

Ration by 0 degrees, i.e. the identity map.

r1 :: Perm -> PermSource

Ration by 90 degrees clockwise.

r2 :: Perm -> PermSource

Ration by 2*90 = 180 degrees clockwise.

r3 :: Perm -> PermSource

Ration by 3*90 = 270 degrees clockwise.

s0 :: Perm -> PermSource

Reflection through a horizontal axis (also called `complement`).

s1 :: Perm -> PermSource

Reflection through a vertical axis (also called `reverse`).

s2 :: Perm -> PermSource

Reflection through the main diagonal (also called `inverse`).

s3 :: Perm -> PermSource

Reflection through the anti-diagonal.

# D8, the klein four-group, and orbits

d8 :: [Perm -> Perm]Source

The dihedral group of order 8 (the symmetries of a square); that is,

``` d8 = [r0, r1, r2, r3, s0, s1, s2, s3]
```

klein4 :: [Perm -> Perm]Source

The Klein four-group (the symmetries of a non-equilateral rectangle); that is,

``` klein4 = [r0, r2, s0, s1]
```

orbit :: [Perm -> Perm] -> Perm -> [Perm]Source

`orbit fs x` is the orbit of `x` under the group of function `fs`. E.g.,

``` orbit klein4 "2314" == ["1423","2314","3241","4132"]
```

symmetryClasses :: [Perm -> Perm] -> [Perm] -> [[Perm]]Source

`symmetryClasses fs xs` is the list of equivalence classes under the action of the group of functions `fs`.

d8Classes :: [Perm] -> [[Perm]]Source

Symmetry classes with respect to D8.

klein4Classes :: [Perm] -> [[Perm]]Source

Symmetry classes with respect to Klein4

# Aliases

`rotate = r1 = inverse . reverse`

The complement of the given permutation: if `v = complement u` then `v `at` i = n - 1 - u `at` i`.

The reverse of the given permutation: if `v = reverse u` then `v `at` i = u `at` (n-1-i)`.

The group theoretical inverse: if `v = inverse u` then `v `at` (u `at` i) = i`.