Bases: sage.structure.list_clone.ClonableArray
An affine permutation, representated in the window notation, and
considered as a bijection from to
.
EXAMPLES:
sage: A=AffinePermutationGroup(['A',7,1])
sage: p=A([3, -1, 0, 6, 5, 4, 10, 9])
sage: p
Type A affine permutation with window [3, -1, 0, 6, 5, 4, 10, 9]
Applies a simple reflection.
INPUT:
EXAMPLES:
sage: p=AffinePermutationGroup(['A',7,1])([3, -1, 0, 6, 5, 4, 10, 9])
sage: p.apply_simple_reflection(3)
Type A affine permutation with window [3, -1, 6, 0, 5, 4, 10, 9]
sage: p.apply_simple_reflection(11)
Type A affine permutation with window [3, -1, 6, 0, 5, 4, 10, 9]
sage: p.apply_simple_reflection(3, 'left')
Type A affine permutation with window [4, -1, 0, 6, 5, 3, 10, 9]
sage: p.apply_simple_reflection(11, 'left')
Type A affine permutation with window [4, -1, 0, 6, 5, 3, 10, 9]
Return Grassmannian quotient.
Factors self into a unique product of a Grassmannian and a finite-type element. Returns a tuple containing the Grassmannain and finite elements, in order according to side.
INPUT:
EXAMPLES:
sage: A=AffinePermutationGroup(['A',7,1])
sage: p=A([3, -1, 0, 6, 5, 4, 10, 9])
sage: gq=p.grassmannian_quotient()
sage: gq
(Type A affine permutation with window [-1, 0, 3, 4, 5, 6, 9, 10], Type A affine permutation with window [3, 1, 2, 6, 5, 4, 8, 7])
sage: gq[0].is_i_grassmannian()
True
sage: 0 not in gq[1].reduced_word()
True
sage: prod(gq)==p
True
sage: gqLeft=p.grassmannian_quotient(side='left')
sage: 0 not in gqLeft[0].reduced_word()
True
sage: gqLeft[1].is_i_grassmannian(side='left')
True
sage: prod(gqLeft)==p
True
Index set of the affine permutation group.
EXAMPLES:
sage: A=AffinePermutationGroup(['A',7,1])
sage: A.index_set()
(0, 1, 2, 3, 4, 5, 6, 7)
Finds the inverse affine permutation.
EXAMPLES:
sage: p=AffinePermutationGroup(['A',7,1])([3, -1, 0, 6, 5, 4, 10, 9])
sage: p.inverse()
Type A affine permutation with window [0, -1, 1, 6, 5, 4, 10, 11]
Test whether self is -grassmannian, ie, either is the identity or has
i as the sole descent.
INPUT:
EXAMPLES:
sage: A=AffinePermutationGroup(['A',7,1])
sage: p=A([3, -1, 0, 6, 5, 4, 10, 9])
sage: p.is_i_grassmannian()
False
sage: q=A.from_word([3,2,1,0])
sage: q.is_i_grassmannian()
True
sage: q=A.from_word([2,3,4,5])
sage: q.is_i_grassmannian(5)
True
sage: q.is_i_grassmannian(2, side='left')
True
Tests whether the affine permutation is the identity.
EXAMPLES:
sage: A=AffinePermutationGroup(['A',7,1])
sage: p=A([3, -1, 0, 6, 5, 4, 10, 9])
sage: p.is_one()
False
sage: q=A.one()
sage: q.is_one()
True
Return lower covers of self.
The set of affine permutations of one less length related by multiplication by a simple transposition on the indicated side. These are the elements that self covers in weak order.
EXAMPLES:
sage: A=AffinePermutationGroup(['A',7,1])
sage: p=A([3, -1, 0, 6, 5, 4, 10, 9])
sage: p.lower_covers()
[Type A affine permutation with window [-1, 3, 0, 6, 5, 4, 10, 9], Type A affine permutation with window [3, -1, 0, 5, 6, 4, 10, 9], Type A affine permutation with window [3, -1, 0, 6, 4, 5, 10, 9], Type A affine permutation with window [3, -1, 0, 6, 5, 4, 9, 10]]
Returns a reduced word for the affine permutation.
EXAMPLES:
sage: A=AffinePermutationGroup(['A',7,1])
sage: p=A([3, -1, 0, 6, 5, 4, 10, 9])
sage: p.reduced_word()
[0, 7, 4, 1, 0, 7, 5, 4, 2, 1]
Signature of the affine permutation, , where
is the length of the permutation.
EXAMPLES:
sage: A=AffinePermutationGroup(['A',7,1])
sage: p=A([3, -1, 0, 6, 5, 4, 10, 9])
sage: p.signature()
1
The affine Weyl group element corresponding to the affine permutation.
EXAMPLES:
sage: A=AffinePermutationGroup(['A',7,1])
sage: p=A([3, -1, 0, 6, 5, 4, 10, 9])
sage: p.to_weyl_group_element()
[ 0 -1 0 1 0 0 1 0]
[ 1 -1 0 1 0 0 1 -1]
[ 1 -1 0 1 0 0 0 0]
[ 0 0 0 1 0 0 0 0]
[ 0 0 0 1 0 -1 1 0]
[ 0 0 0 1 -1 0 1 0]
[ 0 0 0 0 0 0 1 0]
[ 0 -1 1 0 0 0 1 0]
Wrapper function for specific affine permutation groups.
These are combinatorial implmentations of the affine Weyl groups of
types ,
,
,
, and
as permutations of the set of all integers.
the basic algorithms are derived from [BjBr] and [Erik].
REFERENCES:
[BjBr] | Bjorner and Brenti. Combinatorics of Coxeter Groups. Springer, 2005. |
[Erik] | H. Erikson. Computational and Combinatorial Aspects of Coxeter Groups. Thesis, 1995. |
EXAMPLES:
sage: ct=CartanType(['A',7,1])
sage: A=AffinePermutationGroup(ct)
sage: A
The group of affine permutations of type ['A', 7, 1]
We define an element of A:
sage: p=A([3, -1, 0, 6, 5, 4, 10, 9])
sage: p
Type A affine permutation with window [3, -1, 0, 6, 5, 4, 10, 9]
We find the value , considering
as a bijection on the integers. This
is the same as calling the ‘value’ method:
sage: p.value(1)
3
sage: p(1)==p.value(1)
True
We can also find the position of the integer 3 in considered as a sequence,
equivalent to finding
:
sage: p.position(3)
1
sage: (p^-1)(3)
1
Since the affine permutation group is a group, we demonstrate its group properties:
sage: A.one()
Type A affine permutation with window [1, 2, 3, 4, 5, 6, 7, 8]
sage: q=A([0, 2, 3, 4, 5, 6, 7, 9])
sage: p*q
Type A affine permutation with window [1, -1, 0, 6, 5, 4, 10, 11]
sage: q*p
Type A affine permutation with window [3, -1, 1, 6, 5, 4, 10, 8]
sage: p^-1
Type A affine permutation with window [0, -1, 1, 6, 5, 4, 10, 11]
sage: p^-1*p==A.one()
True
sage: p*p^-1==A.one()
True
If we decide we prefer the Weyl Group implementation of the affine Weyl group, we can easily get it:
sage: p.to_weyl_group_element()
[ 0 -1 0 1 0 0 1 0]
[ 1 -1 0 1 0 0 1 -1]
[ 1 -1 0 1 0 0 0 0]
[ 0 0 0 1 0 0 0 0]
[ 0 0 0 1 0 -1 1 0]
[ 0 0 0 1 -1 0 1 0]
[ 0 0 0 0 0 0 1 0]
[ 0 -1 1 0 0 0 1 0]
We can find a reduced word and do all of the other things one expects in a Coxeter group:
sage: p.has_right_descent(1)
True
sage: p.apply_simple_reflection(1)
Type A affine permutation with window [-1, 3, 0, 6, 5, 4, 10, 9]
sage: p.apply_simple_reflection(0)
Type A affine permutation with window [1, -1, 0, 6, 5, 4, 10, 11]
sage: p.reduced_word()
[0, 7, 4, 1, 0, 7, 5, 4, 2, 1]
sage: p.length()
10
The following methods are particular to Type .
We can check if the element is fully commutative:
sage: p.is_fully_commutative()
False
sage: q.is_fully_commutative()
True
And we can also compute the affine Lehmer code of the permutation, a weak
composition with entries:
sage: p.to_lehmer_code()
[0, 3, 3, 0, 1, 2, 0, 1]
Once we have the Lehmer code, we can obtain a -bounded partition by
sorting the Lehmer code, and then reading the row lengths.
There is a unique 0-Grassmanian (dominant) affine permutation associated
to this
-bounded partition, and a
-core as well.
sage: p.to_bounded_partition()
[5, 3, 2]
sage: p.to_dominant()
Type A affine permutation with window [-2, -1, 1, 3, 4, 8, 10, 13]
sage: p.to_core()
[5, 3, 2]
Finally, we can take a reduced word for and insert it to find a
standard composition tableau associated uniquely to that word.
sage: p.tableau_of_word(p.reduced_word())
[[], [1, 6, 9], [2, 7, 10], [], [3], [4, 8], [], [5]]
We can also form affine permutation groups in types ,
,
, and
.
sage: B=AffinePermutationGroup(['B',4,1])
sage: B.an_element()
Type B affine permutation with window [-1, 3, 4, 11]
sage: C=AffinePermutationGroup(['C',4,1])
sage: C.an_element()
Type C affine permutation with window [2, 3, 4, 10]
sage: D=AffinePermutationGroup(['D',4,1])
sage: D.an_element()
Type D affine permutation with window [-1, 3, 11, 5]
sage: G=AffinePermutationGroup(['G',2,1])
sage: G.an_element()
Type G affine permutation with window [0, 4, -1, 8, 3, 7]
Bases: sage.structure.unique_representation.UniqueRepresentation, sage.structure.parent.Parent
The generic affine permutation group class, in which we define all type-free methods for the specific affine permutation groups.
Returns the Cartan matrix of self.
EXAMPLES:
sage: AffinePermutationGroup(['A',7,1]).cartan_matrix()
[ 2 -1 0 0 0 0 0 -1]
[-1 2 -1 0 0 0 0 0]
[ 0 -1 2 -1 0 0 0 0]
[ 0 0 -1 2 -1 0 0 0]
[ 0 0 0 -1 2 -1 0 0]
[ 0 0 0 0 -1 2 -1 0]
[ 0 0 0 0 0 -1 2 -1]
[-1 0 0 0 0 0 -1 2]
Returns the Cartan type of self.
EXAMPLES:
sage: AffinePermutationGroup(['A',7,1]).cartan_type()
['A', 7, 1]
Returns the finite permutation group.
EXAMPLES:
sage: A=AffinePermutationGroup(['A',7,1])
sage: A.classical()
Symmetric group of order 8! as a permutation group
Builds an affine permutation from a given word. Note: Already in category as from_reduced_word, but this is less typing!
EXAMPLES:
sage: A=AffinePermutationGroup(['A',7,1])
sage: p=A([3, -1, 0, 6, 5, 4, 10, 9])
sage: A.from_word([0, 7, 4, 1, 0, 7, 5, 4, 2, 1])
Type A affine permutation with window [3, -1, 0, 6, 5, 4, 10, 9]
EXAMPLES:
sage: AffinePermutationGroup(['A',7,1]).index_set()
(0, 1, 2, 3, 4, 5, 6, 7)
Tells whether the affine permutation group is crystallographic.
EXAMPLES:
sage: AffinePermutationGroup(['A',7,1]).is_crystallographic()
True
Return a random affine permutation of length n.
If n is not specified, then n is chosen as a random
non-negative integer in .
Starts at the identity, then chooses an upper cover at random.
Not very uniform: actually constructs a uniformly random reduced word
of length . Thus we most likely get elements with lots of reduced
words!
For the actual code, see sage.categories.coxeter_group.random_element_of_length().
EXAMPLES:
sage: A = AffinePermutationGroup(['A',7,1])
sage: A.random_element() # random
Type A affine permutation with window [-12, 16, 19, -1, -2, 10, -3, 9]
sage: p = A.random_element(10)
sage: p.length() == 10
True
Rank of the affine permutation group, equal to .
EXAMPLES:
sage: AffinePermutationGroup(['A',7,1]).rank()
8
EXAMPLES:
sage: AffinePermutationGroup(['A',7,1]).index_set()
(0, 1, 2, 3, 4, 5, 6, 7)
Returns the Weyl Group of the same type as self.
EXAMPLES:
sage: A=AffinePermutationGroup(['A',7,1])
sage: A.weyl_group()
Weyl Group of type ['A', 7, 1] (as a matrix group acting on the root space)
Bases: sage.combinat.affine_permutation.AffinePermutationGroupGeneric
TESTS:
sage: AffinePermutationGroup(['A',7,1])
The group of affine permutations of type ['A', 7, 1]
alias of AffinePermutationTypeA
Returns the affine permutation with the supplied Lehmer code (a weak
composition with parts, at least one of which is 0).
INPUT:
(default: ‘decreasing’.)
the right or left. (default: ‘right’.)
EXAMPLES:
sage: A=AffinePermutationGroup(['A',7,1])
sage: p=A([3, -1, 0, 6, 5, 4, 10, 9])
sage: p.to_lehmer_code()
[0, 3, 3, 0, 1, 2, 0, 1]
sage: A.from_lehmer_code(p.to_lehmer_code())==p
True
sage: CP=CartesianProduct( ('increasing','decreasing'),('left','right') )
sage: for a in CP:
....: A.from_lehmer_code(p.to_lehmer_code(a[0],a[1]),a[0],a[1])==p
True
True
True
True
Returns the identity element.
EXAMPLES:
sage: AffinePermutationGroup(['A',7,1]).one()
Type A affine permutation with window [1, 2, 3, 4, 5, 6, 7, 8]
TESTS:
sage: A=AffinePermutationGroup(['A',5,1])
sage: A==loads(dumps(A))
True
sage: TestSuite(A).run()
Bases: sage.combinat.affine_permutation.AffinePermutationGroupTypeC
TESTS:
sage: AffinePermutationGroup(['A',7,1])
The group of affine permutations of type ['A', 7, 1]
alias of AffinePermutationTypeB
Bases: sage.combinat.affine_permutation.AffinePermutationGroupTypeC
TESTS:
sage: AffinePermutationGroup(['A',7,1])
The group of affine permutations of type ['A', 7, 1]
alias of AffinePermutationTypeC
Bases: sage.combinat.affine_permutation.AffinePermutationGroupTypeC
TESTS:
sage: AffinePermutationGroup(['A',7,1])
The group of affine permutations of type ['A', 7, 1]
alias of AffinePermutationTypeD
Bases: sage.combinat.affine_permutation.AffinePermutationGroupGeneric
TESTS:
sage: AffinePermutationGroup(['A',7,1])
The group of affine permutations of type ['A', 7, 1]
alias of AffinePermutationTypeG
Returns the identity element.
EXAMPLES:
sage: AffinePermutationGroup(['G',2,1]).one()
Type G affine permutation with window [1, 2, 3, 4, 5, 6]
TESTS:
sage: G=AffinePermutationGroup(['G',2,1])
sage: G==loads(dumps(G))
True
sage: TestSuite(G).run()
Bases: sage.combinat.affine_permutation.AffinePermutation
Initialize self
INPUT:
EXAMPLES:
sage: A=AffinePermutationGroup(['A',7,1])
sage: p=A([3, -1, 0, 6, 5, 4, 10, 9]) #indirect doctest
sage: p
Type A affine permutation with window [3, -1, 0, 6, 5, 4, 10, 9]
Applies simple reflection to the values ,
.
EXAMPLES:
sage: p=AffinePermutationGroup(['A',7,1])([3, -1, 0, 6, 5, 4, 10, 9])
sage: p.apply_simple_reflection_left(3)
Type A affine permutation with window [4, -1, 0, 6, 5, 3, 10, 9]
sage: p.apply_simple_reflection_left(11)
Type A affine permutation with window [4, -1, 0, 6, 5, 3, 10, 9]
Applies the simple reflection to positions ,
.
is allowed to be any integer.
EXAMPLES:
sage: p=AffinePermutationGroup(['A',7,1])([3, -1, 0, 6, 5, 4, 10, 9])
sage: p.apply_simple_reflection_right(3)
Type A affine permutation with window [3, -1, 6, 0, 5, 4, 10, 9]
sage: p.apply_simple_reflection_right(11)
Type A affine permutation with window [3, -1, 6, 0, 5, 4, 10, 9]
Check that self is an affine permutation.
EXAMPLES:
sage: A=AffinePermutationGroup(['A',7,1])
sage: p=A([3, -1, 0, 6, 5, 4, 10, 9])
sage: p
Type A affine permutation with window [3, -1, 0, 6, 5, 4, 10, 9]
sage: q=A([1,2,3])
Traceback (most recent call last):
...
ValueError: Length of list must be k+1=8.
sage: q=A([1,2,3,4,5,6,7,0])
Traceback (most recent call last):
...
ValueError: Window does not sum to 36.
sage: q=A([1,1,3,4,5,6,7,9])
Traceback (most recent call last):
...
ValueError: Entries must have distinct residues.
The Dynkin diagram automorphism which fixes and reverses all
other indices.
EXAMPLES:
sage: A=AffinePermutationGroup(['A',7,1])
sage: p=A([3, -1, 0, 6, 5, 4, 10, 9])
sage: p.flip_automorphism()
Type A affine permutation with window [0, -1, 5, 4, 3, 9, 10, 6]
Determines whether there is a descent at .
INPUT:
EXAMPLES:
sage: p=AffinePermutationGroup(['A',7,1])([3, -1, 0, 6, 5, 4, 10, 9])
sage: p.has_left_descent(1)
True
sage: p.has_left_descent(9)
True
sage: p.has_left_descent(0)
True
Determines whether there is a descent at .
INPUT:
EXAMPLES:
sage: p=AffinePermutationGroup(['A',7,1])([3, -1, 0, 6, 5, 4, 10, 9])
sage: p.has_right_descent(1)
True
sage: p.has_right_descent(9)
True
sage: p.has_right_descent(0)
False
Determines whether self is fully commutative, ie, has no reduced words with a braid.
EXAMPLES:
sage: A=AffinePermutationGroup(['A',7,1])
sage: p=A([3, -1, 0, 6, 5, 4, 10, 9])
sage: p.is_fully_commutative()
False
sage: q=A([-3, -2, 0, 7, 9, 2, 11, 12])
sage: q.is_fully_commutative()
True
Finds the unique maximal decomposition of self into cyclically decreasing/increasing elements.
INPUT:
EXAMPLES:
sage: p=AffinePermutationGroup(['A',7,1])([3, -1, 0, 6, 5, 4, 10, 9])
sage: p.maximal_cyclic_decomposition()
[[0, 7], [4, 1, 0], [7, 5, 4, 2, 1]]
sage: p.maximal_cyclic_decomposition(side='left')
[[1, 0, 7, 5, 4], [1, 0, 5], [2, 1]]
sage: p.maximal_cyclic_decomposition(typ='increasing', side='right')
[[1], [5, 0, 1, 2], [4, 5, 7, 0, 1]]
sage: p.maximal_cyclic_decomposition(typ='increasing', side='left')
[[0, 1, 2, 4, 5], [4, 7, 0, 1], [7]]
TESTS:
sage: A=AffinePermutationGroup(['A',7,1])
sage: p=A([3, -1, 0, 6, 5, 4, 10, 9])
sage: S=p.maximal_cyclic_decomposition()
sage: p==prod(A.from_word(l) for l in S)
True
sage: S=p.maximal_cyclic_decomposition(typ='increasing', side='left')
sage: p==prod(A.from_word(l) for l in S)
True
sage: S=p.maximal_cyclic_decomposition(typ='increasing', side='right')
sage: p==prod(A.from_word(l) for l in S)
True
sage: S=p.maximal_cyclic_decomposition(typ='decreasing', side='right')
sage: p==prod(A.from_word(l) for l in S)
True
For an affine permutation , finds the unique maximal subset
of the index set such that
is a reduced product.
INPUT:
EXAMPLES:
sage: p=AffinePermutationGroup(['A',7,1])([3, -1, 0, 6, 5, 4, 10, 9])
sage: p.maximal_cyclic_factor()
[7, 5, 4, 2, 1]
sage: p.maximal_cyclic_factor(side='left')
[1, 0, 7, 5, 4]
sage: p.maximal_cyclic_factor('increasing','right')
[4, 5, 7, 0, 1]
sage: p.maximal_cyclic_factor('increasing','left')
[0, 1, 2, 4, 5]
Find the position such the self.value(j)=i
EXAMPLES:
sage: A=AffinePermutationGroup(['A',7,1])
sage: p=A([3, -1, 0, 6, 5, 4, 10, 9])
sage: p.position(3)
1
sage: p.position(11)
9
The Dynkin diagram automorphism which sends to
.
EXAMPLES:
sage: A=AffinePermutationGroup(['A',7,1])
sage: p=A([3, -1, 0, 6, 5, 4, 10, 9])
sage: p.promotion()
Type A affine permutation with window [2, 4, 0, 1, 7, 6, 5, 11]
Finds a tableau on the Lehmer code of self corresponding to the given reduced word.
For a full description of this algorithm, see [D2012].
INPUT:
REFERENCES:
[D2012] | tom denton. Canonical Decompositions of Affine Permutations,
Affine Codes, and Split ![]() |
EXAMPLES:
sage: A=AffinePermutationGroup(['A',7,1])
sage: p=A([3, -1, 0, 6, 5, 4, 10, 9])
sage: p.tableau_of_word(p.reduced_word())
[[], [1, 6, 9], [2, 7, 10], [], [3], [4, 8], [], [5]]
sage: A=AffinePermutationGroup(['A',7,1])
sage: p=A([3, -1, 0, 6, 5, 4, 10, 9])
sage: w=p.reduced_word()
sage: w
[0, 7, 4, 1, 0, 7, 5, 4, 2, 1]
sage: alpha=[5,3,2]
sage: p.tableau_of_word(p.reduced_word(), alpha=alpha)
[[], [1, 2, 3], [1, 2, 3], [], [1], [1, 2], [], [1]]
sage: p.tableau_of_word(p.reduced_word(), side='left')
[[1, 4, 9], [6], [], [], [3, 7], [8], [], [2, 5, 10]]
sage: p.tableau_of_word(p.reduced_word(), typ='increasing', side='right')
[[9, 10], [1, 2], [], [], [3, 4], [8], [], [5, 6, 7]]
sage: p.tableau_of_word(p.reduced_word(), typ='increasing', side='left')
[[1, 2], [4, 5, 6], [9, 10], [], [3], [7, 8], [], []]
Returns the -bounded partition associated to the dominant element
obtained by sorting the Lehmer code.
INPUT:
EXAMPLES:
sage: A=AffinePermutationGroup(['A',2,1])
sage: p=A.from_lehmer_code([4,1,0])
sage: p.to_bounded_partition()
[2, 1, 1, 1]
Returns the core associated to the dominant element obtained by sorting the Lehmer code.
INPUT:
EXAMPLES:
sage: A=AffinePermutationGroup(['A',2,1])
sage: p=A.from_lehmer_code([4,1,0])
sage: p.to_bounded_partition()
[2, 1, 1, 1]
sage: p.to_core()
[4, 2, 1, 1]
Finds the Lehmer code and then sorts it. Returns the affine permutation with the given sorted Lehmer code; this element is 0-dominant.
INPUT:
EXAMPLES:
sage: A=AffinePermutationGroup(['A',7,1])
sage: p=A([3, -1, 0, 6, 5, 4, 10, 9])
sage: p.to_dominant()
Type A affine permutation with window [-2, -1, 1, 3, 4, 8, 10, 13]
sage: p.to_dominant(typ='increasing', side='left')
Type A affine permutation with window [3, 4, -1, 5, 0, 9, 6, 10]
Returns the affine Lehmer code.
There are four such codes; the options typ and side determine which code is generated. The codes generated are the shape of the maximal cyclic decompositions of self according to the given typ and side options.
INPUT:
EXAMPLES:
sage: A=AffinePermutationGroup(['A',7,1])
sage: p=A([3, -1, 0, 6, 5, 4, 10, 9])
sage: CP=CartesianProduct( ('increasing','decreasing'),('left','right') )
sage: for a in CP:
....: p.to_lehmer_code(a[0],a[1])
[2, 3, 2, 0, 1, 2, 0, 0]
[2, 2, 0, 0, 2, 1, 0, 3]
[3, 1, 0, 0, 2, 1, 0, 3]
[0, 3, 3, 0, 1, 2, 0, 1]
sage: for a in CP:
....: A.from_lehmer_code(p.to_lehmer_code(a[0],a[1]), a[0],a[1])==p
True
True
True
True
Returns an embedding of self into the affine permutation group of
type A. (For Type , just returns self.)
EXAMPLES:
sage: p=AffinePermutationGroup(['A',7,1])([3, -1, 0, 6, 5, 4, 10, 9])
sage: p.to_type_a()==p
True
Return the image of the integer i under this permutation.
INPUT:
EXAMPLES:
sage: A=AffinePermutationGroup(['A',7,1])
sage: p=A([3, -1, 0, 6, 5, 4, 10, 9])
sage: p.value(1)
3
sage: p.value(9)
11
Bases: sage.combinat.affine_permutation.AffinePermutationTypeC
Initialize self
INPUT:
EXAMPLES:
sage: A=AffinePermutationGroup(['A',7,1])
sage: p=A([3, -1, 0, 6, 5, 4, 10, 9]) #indirect doctest
sage: p
Type A affine permutation with window [3, -1, 0, 6, 5, 4, 10, 9]
Applies simple reflection indexed by on values.
EXAMPLES:
sage: B=AffinePermutationGroup(['B',4,1])
sage: p=B([-5,1,6,-2])
sage: p.apply_simple_reflection_left(0)
Type B affine permutation with window [-5, -2, 6, 1]
sage: p.apply_simple_reflection_left(2)
Type B affine permutation with window [-5, 1, 7, -3]
sage: p.apply_simple_reflection_left(4)
Type B affine permutation with window [-4, 1, 6, -2]
Applies the simple reflection indexed by on positions.
EXAMPLES:
sage: B=AffinePermutationGroup(['B',4,1])
sage: p=B([-5,1,6,-2])
sage: p.apply_simple_reflection_right(1)
Type B affine permutation with window [1, -5, 6, -2]
sage: p.apply_simple_reflection_right(0)
Type B affine permutation with window [-1, 5, 6, -2]
sage: p.apply_simple_reflection_right(4)
Type B affine permutation with window [-5, 1, 6, 11]
Check that self is an affine permutation.
EXAMPLES:
sage: B=AffinePermutationGroup(['B',4,1])
sage: x=B([-5,1,6,-2])
sage: x
Type B affine permutation with window [-5, 1, 6, -2]
Determines whether there is a descent at .
INPUT:
EXAMPLES:
sage: B=AffinePermutationGroup(['B',4,1])
sage: p=B([-5,1,6,-2])
sage: [p.has_left_descent(i) for i in B.index_set()]
[True, True, False, False, True]
Determines whether there is a descent at index .
INPUT:
EXAMPLES:
sage: B=AffinePermutationGroup(['B',4,1])
sage: p=B([-5,1,6,-2])
sage: [p.has_right_descent(i) for i in B.index_set()]
[True, False, False, True, False]
Bases: sage.combinat.affine_permutation.AffinePermutation
Initialize self
INPUT:
EXAMPLES:
sage: A=AffinePermutationGroup(['A',7,1])
sage: p=A([3, -1, 0, 6, 5, 4, 10, 9]) #indirect doctest
sage: p
Type A affine permutation with window [3, -1, 0, 6, 5, 4, 10, 9]
Applies simple reflection indexed by on values.
EXAMPLES:
sage: C=AffinePermutationGroup(['C',4,1])
sage: x=C([-1,5,3,7])
sage: for i in C.index_set(): x.apply_simple_reflection_left(i)
Type C affine permutation with window [1, 5, 3, 7]
Type C affine permutation with window [-2, 5, 3, 8]
Type C affine permutation with window [-1, 5, 2, 6]
Type C affine permutation with window [-1, 6, 4, 7]
Type C affine permutation with window [-1, 4, 3, 7]
Applies the simple reflection indexed by on positions.
EXAMPLES:
sage: C=AffinePermutationGroup(['C',4,1])
sage: x=C([-1,5,3,7])
sage: for i in C.index_set(): x.apply_simple_reflection_right(i)
Type C affine permutation with window [1, 5, 3, 7]
Type C affine permutation with window [5, -1, 3, 7]
Type C affine permutation with window [-1, 3, 5, 7]
Type C affine permutation with window [-1, 5, 7, 3]
Type C affine permutation with window [-1, 5, 3, 2]
Check that self is an affine permutation.
EXAMPLES:
sage: C=AffinePermutationGroup(['C',4,1])
sage: x=C([-1,5,3,7])
sage: x
Type C affine permutation with window [-1, 5, 3, 7]
Determines whether there is a descent at .
INPUT:
EXAMPLES:
sage: C=AffinePermutationGroup(['C',4,1])
sage: x=C([-1,5,3,7])
sage: for i in C.index_set(): x.has_left_descent(i)
True
False
True
False
True
Determines whether there is a descent at index .
INPUT:
EXAMPLES:
sage: C=AffinePermutationGroup(['C',4,1])
sage: x=C([-1,5,3,7])
sage: for i in C.index_set(): x.has_right_descent(i)
True
False
True
False
True
Find the position such the self.value(j)=i
EXAMPLES:
sage: C=AffinePermutationGroup(['C',4,1])
sage: x=C.one()
sage: [x.position(i) for i in range(-10,10)]==range(-10,10)
True
Returns an embedding of self into the affine permutation group of
type .
EXAMPLES:
sage: C=AffinePermutationGroup(['C',4,1])
sage: x=C([-1,5,3,7])
sage: x.to_type_a()
Type A affine permutation with window [-1, 5, 3, 7, 2, 6, 4, 10, 9]
Returns the image of the integer under this permutation.
EXAMPLES:
sage: C=AffinePermutationGroup(['C',4,1])
sage: x=C.one()
sage: [x.value(i) for i in range(-10,10)]==range(-10,10)
True
Bases: sage.combinat.affine_permutation.AffinePermutationTypeC
Initialize self
INPUT:
EXAMPLES:
sage: A=AffinePermutationGroup(['A',7,1])
sage: p=A([3, -1, 0, 6, 5, 4, 10, 9]) #indirect doctest
sage: p
Type A affine permutation with window [3, -1, 0, 6, 5, 4, 10, 9]
Applies simple reflection indexed by on values.
EXAMPLES:
sage: D=AffinePermutationGroup(['D',4,1])
sage: p=D([1,-6,5,-2])
sage: p.apply_simple_reflection_left(0)
Type D affine permutation with window [-2, -6, 5, 1]
sage: p.apply_simple_reflection_left(1)
Type D affine permutation with window [2, -6, 5, -1]
sage: p.apply_simple_reflection_left(4)
Type D affine permutation with window [1, -4, 3, -2]
Applies the simple reflection indexed by on positions.
EXAMPLES:
sage: D=AffinePermutationGroup(['D',4,1])
sage: p=D([1,-6,5,-2])
sage: p.apply_simple_reflection_right(0)
Type D affine permutation with window [6, -1, 5, -2]
sage: p.apply_simple_reflection_right(1)
Type D affine permutation with window [-6, 1, 5, -2]
sage: p.apply_simple_reflection_right(4)
Type D affine permutation with window [1, -6, 11, 4]
Check that self is an affine permutation.
EXAMPLES:
sage: D=AffinePermutationGroup(['D',4,1])
sage: p=D([1,-6,5,-2])
sage: p
Type D affine permutation with window [1, -6, 5, -2]
Determines whether there is a descent at .
INPUT:
EXAMPLES:
sage: D=AffinePermutationGroup(['D',4,1])
sage: p=D([1,-6,5,-2])
sage: [p.has_left_descent(i) for i in D.index_set()]
[True, True, False, True, True]
Determines whether there is a descent at index .
INPUT:
EXAMPLES:
sage: D=AffinePermutationGroup(['D',4,1])
sage: p=D([1,-6,5,-2])
sage: [p.has_right_descent(i) for i in D.index_set()]
[True, True, False, True, False]
Bases: sage.combinat.affine_permutation.AffinePermutation
Initialize self
INPUT:
EXAMPLES:
sage: A=AffinePermutationGroup(['A',7,1])
sage: p=A([3, -1, 0, 6, 5, 4, 10, 9]) #indirect doctest
sage: p
Type A affine permutation with window [3, -1, 0, 6, 5, 4, 10, 9]
Applies simple reflection indexed by on values.
EXAMPLES:
sage: G=AffinePermutationGroup(['G',2,1])
sage: p=G([2, 10, -5, 12, -3, 5])
sage: p.apply_simple_reflection_left(0)
Type G affine permutation with window [0, 10, -7, 14, -3, 7]
sage: p.apply_simple_reflection_left(1)
Type G affine permutation with window [1, 9, -4, 11, -2, 6]
sage: p.apply_simple_reflection_left(2)
Type G affine permutation with window [3, 11, -5, 12, -4, 4]
Applies the simple reflection indexed by on positions.
EXAMPLES:
sage: G=AffinePermutationGroup(['G',2,1])
sage: p=G([2, 10, -5, 12, -3, 5])
sage: p.apply_simple_reflection_right(0)
Type G affine permutation with window [-9, -1, -5, 12, 8, 16]
sage: p.apply_simple_reflection_right(1)
Type G affine permutation with window [10, 2, 12, -5, 5, -3]
sage: p.apply_simple_reflection_right(2)
Type G affine permutation with window [2, -5, 10, -3, 12, 5]
Check that self is an affine permutation.
EXAMPLES:
sage: G=AffinePermutationGroup(['G',2,1])
sage: p=G([2, 10, -5, 12, -3, 5])
sage: p
Type G affine permutation with window [2, 10, -5, 12, -3, 5]
Determines whether there is a descent at .
INPUT:
EXAMPLES:
sage: G=AffinePermutationGroup(['G',2,1])
sage: p=G([2, 10, -5, 12, -3, 5])
sage: [p.has_left_descent(i) for i in G.index_set()]
[False, True, False]
Determines whether there is a descent at index .
INPUT:
EXAMPLES:
sage: G=AffinePermutationGroup(['G',2,1])
sage: p=G([2, 10, -5, 12, -3, 5])
sage: [p.has_right_descent(i) for i in G.index_set()]
[False, False, True]
Find the position such the self.value(j)=i
EXAMPLES:
sage: G=AffinePermutationGroup(['G',2,1])
sage: p=G([2, 10, -5, 12, -3, 5])
sage: [p.position(i) for i in p._lst]
[1, 2, 3, 4, 5, 6]
Returns an embedding of self into the affine permutation group of type A.
EXAMPLES:
sage: G=AffinePermutationGroup(['G',2,1])
sage: p=G([2, 10, -5, 12, -3, 5])
sage: p.to_type_a()
Type A affine permutation with window [2, 10, -5, 12, -3, 5]
Returns the image of the integer under this permutation.
INPUT:
EXAMPLES:
sage: G=AffinePermutationGroup(['G',2,1])
sage: p=G([2, 10, -5, 12, -3, 5])
sage: [p.value(i) for i in [1..12]]
[2, 10, -5, 12, -3, 5, 8, 16, 1, 18, 3, 11]