## `Dom::PermutationGroup` -- permutation groups

#### Introduction

`Dom::PermutationGroup``(n)` creates the domain of all permutations of n elements.

#### Domain

`Dom::PermutationGroup(n)`

#### Parameters

`n` | - | positive integer

#### Details

- A permutation of n elements is a bijective mapping of the set {1, ..., n } onto itself.

#### Introduction

The domain element `Dom::PermutationGroup``(n)(l)` represents the bijective mapping of the first n positive integers that maps the integer i to `l[i]`, for 1 ≤i ≤n.

#### Creating Elements

``Dom::PermutationGroup`(n)(l)`

#### Parameters

`l` | - | list or array consisting of the first n integers in some order.

#### Categories

`Cat::Group`

#### Related Domains

`Dom::DihedralGroup`

#### Entries

one

  the identical mapping of the set {1, ..., n } to itself.

#### Method _mult: product of permutations

- `_mult(dom a1...)`
- - The product `a1*a2*...*ak` of permutations is defined to be the mapping that assigns, to every integer `i` between 1 and n, the integer `a1(a2(...ak(i) ...))`.
  - This method overloads the function `_mult`.

#### Method _invert: inverse of a permutation

- `_invert(dom a)`
- - This method computes a permutation `b` such that `a*b` is the identity mapping.
  - This method overloads the function `_invert`.

#### Method func_call: function value of a permutation at a point

- `func_call(dom a, integer i)`
- - This method overloads the round brackets `(...)`, i.e. it may be called in the form `a(i)`.
  - It computes the function value of `a` at `i`, i.e., the integer that `i` is mapped to by the permutation `a`; `i` must be an integer between 1 and n.

#### Method cycles: cycle representation of a permutation

- `cycles(dom a)`
- - This method computes a cycle representation of `a`. A cycle representation is a list `[orbit1, ..., orbitk]`; each of the orbits is a list of integers of the form `[i, a(i), a(a(i)), ...]` with just as many elements such that `i` does not occur in it for a second time; and each integer between 1 and n appears in exactly one of the orbits.

#### Method order: order of a permutation

- `order(dom a)`
- - The order of `a` is defined to be the least positive integer `k` for which ak is the identity.

#### Method inversions: number of inversions

- `inversions(dom a)`
- - This method computes the number of all pairs i,j of integers for which i<j but a(i) > a(j).

#### Method random: random permutation

- `random()`
- - This method returns a random element of the permutation group.

#### Method convert: conversion of an object into a permutation

- `convert(any x)`
- - This method tries to convert `x` into a permutation. This is only possible if `x` is a list or an array in which each of the integers 1 through n occurs exactly once.

#### Method convert_to: conversion of a permutation into another type

- `convert_to(dom a, any T)`
- - Tries to convert `a` into type `T`. Currently, only a conversion into a list of type `DOM_LIST` is possible.

#### Method expr: convert a permutation into a list

- `expr(dom a)`
- - This method returns a list such that generating a permutation from that list would result in `a`.

#### Example 1

Consider the group of permutations of the first seven positive integers:

    >> G:=Dom::PermutationGroup(7)

                             Dom::PermutationGroup(7)

We enter an element by providing the image of 1, 2, etc. under the permutation.

    >> a:=G([2,4,6,1,3,5,7])

                               [2, 4, 6, 1, 3, 5, 7]

    >> a(3)

                                         6

#### Super-Domain

`Dom::BaseDomain`

#### Axioms

`Ax::canonicalRep`

#### Changes

- no changes

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000