Home Overview Documents Content Dictionaries Software & Tools The OpenMath Society OpenMath Projects OpenMath Discussion Lists OpenMath Meetings Links

OpenMath Content Dictionary: permutation1

Canonical URL:
http://www.win.tue.nl/~amc/oz/om/cds/permutation1.ocd
CD File:
permutation1.ocd
CD as XML Encoded OpenMath:
permutation1.omcd
Defines:
are_distinct, cycle, cycle_type, is_perm, length, listperm, order, perm, permutation, sign, support
Date:
2002-10-21
Version:
1.3
Review Date:
2003-07-27
Status:
experimental
Uses CD:
arith1, fns1, fns2, list1, logic1, multiset1, nums1, quant1, relation1, set1

This CD defines permutations with finite support.

In order to make available permutations of arbitrary objects, permutations are defined as sets of cycles.

The set on which the permutation acts is not specified. To this end, cycles of length 0 or 1 do not occur in permutations.

When viewed as the set of cycles which are its arguments, the symbol permutation has a normal form constructor.


cycle

Description:

This symbol is an n-ary function, with n at least 1. It marks a relation on the set of its arguments a_1, a_2,...,a_n consisting of the pairs (a_i,a_{i+1}) for i=1,...,n-1 and the pair (a_n,a_1). The arguments a_i should all be distinct. The number n is referred to as the length of the cycle.

Commented Mathematical property (CMP):
for i = 1,..., n cycle(a_i, a_{i+1},...,a_n,a_1,...,a_{i-1}) = cycle(a_1, a_2,...,a_n).
Example:
The following expression represents the relation on the set {"jan","piet","klaas"} whose members are ("jan","piet"), ("piet","klaas"), and ("klaas","jan").
  
cycle ( jan , piet , klaas )
Signatures:
sts


[Next: length] [Last: sign] [Top]

length

Description:

This symbol is a function with one argument, which must be a cycle. When applied to cycle(a_1,a_2,...,a_n), it returns the number n. This number is referred to as the length of the cycle.

Example:
The following expression should evaluate to 3.
  
length ( cycle ( 2 , 4 , 3 ) )
Signatures:
sts


[Next: permutation] [Previous: cycle] [Top]

permutation

Description:

This symbols is an n-ary function whose arguments are cycles of length at least 2 with the property that all entries of all cycles are mutually distinct. The permutation symbol constructs a bijective map from the set X of entries of the cycles to X. The map is defined as follows: if E occurs as an entry of a cycle, then the permutation maps E to the entry following E in the same cycle if it exists and to the first entry in the same cycle otherwise.

Commented Mathematical property (CMP):
For valid arguments A and B both left_compose and right compose of permutation(A) and permutation(B) are permutations again (that is, evaluate to permutation(C) and permutation(D), respectively, for suitable C and D).
Commented Mathematical property (CMP):
For a valid argument A the inverse of permutation(A) is a permutation again (that is, evaluates to permutation(C) for suitable argument C).
Commented Mathematical property (CMP):
permutation() is the identity.
Formal Mathematical property (FMP):
  
permutation ( ) = Id
Example:
The permutation (1,5,4,2)(6,7) sending 1 to 5, 5 to 4, 4 to 2, 2 to 1, 6 to 7, 7 to 6, is given by
  
permutation ( cycle ( 1 , 5 , 4 , 2 ) , cycle ( 6 , 7 ) )
Example:
The following two expressions represent the same permutation of {1,2,3,4,5}.
  
permutation ( cycle ( 1 , 3 , 2 ) , cycle ( 4 , 5 ) ) -1
  
permutation ( cycle ( 1 , 2 , 3 ) , cycle ( 4 , 5 ) )
Example:
Left and right composition of two permutations may lead to distinct results:
  
permutation ( cycle ( 1 , 2 ) ) o permutation ( cycle ( 1 , 2 , 3 ) ) = permutation ( cycle ( 2 , 3 ) )
  
right_compose ( permutation ( cycle ( 1 , 2 ) ) , permutation ( cycle ( 1 , 2 , 3 ) ) ) = permutation ( cycle ( 1 , 3 ) )
Signatures:
sts


[Next: is_perm] [Previous: length] [Top]

is_perm

Description:

This symbol is a boolean function with one argument. If the argument is not a set of cycles of length at least 2, the boolean value is false. Otherwise it is true if and only if the cycles are disjoint (that is, all entries of all cycles in the argument are mutually distinct.

Commented Mathematical property (CMP):
If is_perm(A) is true then permutation(A) is well defined.
Example:
The following value is the boolean false
  
is_perm ( { cycle ( 5 , 4 , 4 , 2 , 1 ) } )
whereas the following value is true
  
is_perm ( { cycle ( 5 , 4 , 3 , 2 , 1 ) } )
Signatures:
sts


[Next: support] [Previous: permutation] [Top]

support

Description:

This symbol is a function with one argument which is a permutation. When applied to a permutation P whose arguments are the cycles A1,...,An, it represents the set A which is the union of the entries of all Ai for i=1,...,n.

Example:
The following expression represents the set {jan,piet,klaas,4,5}.
  
permutation ( cycle ( jan , 4 , klaas ) , cycle ( 3 , klaas ) , cycle ( piet , 5 ) )
Signatures:
sts


[Next: perm] [Previous: is_perm] [Top]

perm

Description:

This symbol is an n-ary function. Its arguments should be positive integers. When applied to arguments a_1,...,a_n, the resulting value is the permutation mapping i to a_i.

Example:
The following two expressions represent the same permutation of {1,2,3,4,5}.
  
perm ( 2 , 3 , 1 , 5 , 4 )
  
permutation ( cycle ( 1 , 2 , 3 ) , cycle ( 4 , 5 ) )
Example:
The following expression evaluates to true.
  
( perm ( 5 , 1 , 3 , 2 , 4 ) ) ( 4 ) = 2
Signatures:
sts


[Next: listperm] [Previous: support] [Top]

listperm

Description:

This symbol is a function with one argument which is a permutation whose support consists of positive integers. When applied to such a permutation P, it represents the list of length n whose i-th entry is the image of i under P. Here n is at least the maximum of the support of P.

Example:
The following two expressions represent the same list.
  
listperm ( permutation ( cycle ( 1 , 5 , 4 , 2 ) , cycle ( 6 , 7 ) ) )
  
( 5 , 1 , 3 , 2 , 4 , 7 , 6 )
Signatures:
sts


[Next: cycle_type] [Previous: perm] [Top]

cycle_type

Description:

This symbol is a function with one argument, which is a permutation. When applied to a permutation P, it represents the multiset of lengths of cycles occurring as arguments of P.

Formal Mathematical property (FMP):
  
P , Q . is_perm ( P ) is_perm ( Q ) cycle_type ( apply_to_list ( o , ( Q , P , Q -1 ) ) ) = cycle_type ( P )
Example:
The cycle type of the permutation (4,3,2,1)(5,6)("jan","piet") equals {4,2,2}:
  
cycle_type ( permutation ( cycle ( 4 , 3 , 2 , 1 ) , cycle ( 5 , 6 ) , cycle ( jan , piet ) ) ) = multiset ( 4 , 2 , 2 )
Signatures:
sts


[Next: order] [Previous: listperm] [Top]

order

Description:

This symbol is a function with one argument which should be a permutation. When applied to a permutation P, it represents the least positive integer n for which composition of n copies of P represents the identity (that is, a permutation with empty support). Note: in this definition of the order, it does not matter whether left_compose or right_compose is being used.

Commented Mathematical property (CMP):
The order of a permutation is the least common multiple of the elements of its cycle type.
Formal Mathematical property (FMP):
  
P . is_perm ( P ) order ( P ) = apply_to_list ( lcm , cycle_type ( P ) )
Example:
The order of the permutation (4,3,2,1)(5,6)("jan","piet") equals 4:
  
order ( permutation ( cycle ( 4 , 3 , 2 , 1 ) , cycle ( 5 , 6 ) , cycle ( jan , piet ) ) ) = 4
Signatures:
sts


[Next: are_distinct] [Previous: cycle_type] [Top]

are_distinct

Description:

This symbol is an n-ary boolean function. When applied to a_1, ..., a_n, it is true if and only if the arguments are mutually distinct (that is, a_i and a_j are equal only if i=j).

Commented Mathematical property (CMP):
If are_distinct(a_1,...,a_n) is true then a_1,...,a_n is a valid argument sequence of cycle.
Example:
The following expression evaluates to false.
  
are_distinct ( 1 , 3 , 2 , 3 )
Signatures:
sts


[Next: sign] [Previous: order] [Top]

sign

Description:

This symbol is a function with one argument which should be a permutation. When applied to a permutation P, it represents the sign of P, which is equal to -1 if P is an odd permutation and equal to 1 otherwise.

Commented Mathematical property (CMP):
If the cycle type of a permutation P equals [a_1,...,a_m], then the sign is equal to (-1)^(s-m) where b = a_1+...+a_m.
Formal Mathematical property (FMP):
  
P . sign ( permutation ( P ) ) = -1 apply_to_list ( list ( x + 1 | x ) + cycle_type ( permutation ( P ) ) )
Example:
The sign of the permutation (4,3,2,1)(5,6)("jan","piet") equals -1:
  
sign ( permutation ( cycle ( 4 , 3 , 2 , 1 ) , cycle ( 5 , 6 ) , cycle ( jan , piet ) ) ) = -1
Signatures:
sts


[First: cycle] [Previous: are_distinct] [Top]

Home Overview Documents Content Dictionaries Software & Tools The OpenMath Society OpenMath Projects OpenMath Discussion Lists OpenMath Meetings Links