Skip to content

PermutationProduct ​

The product of permutations, applying the left factor first. (p q)(i)=q(p(i))(p\,q)(i) = q(p(i)).

✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram LanguagePermutationProduct✓
PermutationProduct(p, q, ...)the permutation that applies p, then q, and so on
SageMathenumeratio_permutation_product(p, q, ...)
Typed signatures
TypePackageApplies
((expression<Cycles> | list<integer> | permutation)*) -> expression<Cycles> | list<integer> | permutationcombinatoricsreplaces groupalgebraalways
((expression<Cycles> | list<integer>)*) -> expression<Cycles> | list<integer>groupalgebraalways

Domain: Permutations

Details
  • Either notation, as Permute and InversePermutation read them: a one-line word {v1, ..., vn} or Cycles, or a Permutation
  • The result is Cycles when any argument is, else a one-line word (a Permutation when given one); shorter words are padded with fixed points
  • Wolfram multiplies left to right, so PermutationProduct(p, q) is not p∘qp \circ q; it is q∘pq \circ p
  • With no arguments it is the identity, Cycles({})

Examples

Basic #

1→2→11 \to 2 \to 1, 2→3→32 \to 3 \to 3, 3→1→23 \to 1 \to 2

live ↗
InPermutationProduct(Cycles([[1,2,3]]),Cycles([[1,2]]))\mathrm{PermutationProduct}(\mathrm{Cycles}(\bigl\lbrack\bigl\lbrack1, 2, 3\bigr\rbrack\bigr\rbrack), \mathrm{Cycles}(\bigl\lbrack\bigl\lbrack1, 2\bigr\rbrack\bigr\rbrack))OutCycles([[2,3]])\mathrm{Cycles}(\bigl\lbrack\bigl\lbrack2, 3\bigr\rbrack\bigr\rbrack)

Known value · wolframscript 15.0

Scope #

swapping the factors gives a different permutation

live ↗
InPermutationProduct(Cycles([[1,2]]),Cycles([[1,2,3]]))\mathrm{PermutationProduct}(\mathrm{Cycles}(\bigl\lbrack\bigl\lbrack1, 2\bigr\rbrack\bigr\rbrack), \mathrm{Cycles}(\bigl\lbrack\bigl\lbrack1, 2, 3\bigr\rbrack\bigr\rbrack))OutCycles([[1,3]])\mathrm{Cycles}(\bigl\lbrack\bigl\lbrack1, 3\bigr\rbrack\bigr\rbrack)

Known value · wolframscript 15.0

live ↗
InPermutationProduct(Cycles([[1,2,3]]),Cycles([[1,2]]),Cycles([[1,2,3]]))\mathrm{PermutationProduct}(\mathrm{Cycles}(\bigl\lbrack\bigl\lbrack1, 2, 3\bigr\rbrack\bigr\rbrack), \mathrm{Cycles}(\bigl\lbrack\bigl\lbrack1, 2\bigr\rbrack\bigr\rbrack), \mathrm{Cycles}(\bigl\lbrack\bigl\lbrack1, 2, 3\bigr\rbrack\bigr\rbrack))OutCycles([[1,2]])\mathrm{Cycles}(\bigl\lbrack\bigl\lbrack1, 2\bigr\rbrack\bigr\rbrack)

Known value · wolframscript 15.0

two one-line words give a one-line word

live ↗
InPermutationProduct([2,3,1],[2,1,3])\mathrm{PermutationProduct}(\bigl\lbrack2, 3, 1\bigr\rbrack, \bigl\lbrack2, 1, 3\bigr\rbrack)Out[1,3,2]\bigl\lbrack1, 3, 2\bigr\rbrack

Known value · wolframscript 15.0

the shorter word is padded with fixed points

live ↗
InPermutationProduct([2,1],[1,3,2])\mathrm{PermutationProduct}(\bigl\lbrack2, 1\bigr\rbrack, \bigl\lbrack1, 3, 2\bigr\rbrack)Out[3,1,2]\bigl\lbrack3, 1, 2\bigr\rbrack

Known value · wolframscript 15.0

any Cycles argument makes the result Cycles

live ↗
InPermutationProduct(Cycles([[1,2]]),[2,3,1])\mathrm{PermutationProduct}(\mathrm{Cycles}(\bigl\lbrack\bigl\lbrack1, 2\bigr\rbrack\bigr\rbrack), \bigl\lbrack2, 3, 1\bigr\rbrack)OutCycles([[1,3]])\mathrm{Cycles}(\bigl\lbrack\bigl\lbrack1, 3\bigr\rbrack\bigr\rbrack)

Known value · wolframscript 15.0

Permutation values give a Permutation

live ↗
InPermutationProduct(Permutation⁡([2,3,1]),Permutation⁡([2,1,3]))\mathrm{PermutationProduct}({\operatorname{Permutation}}([2, 3, 1]), {\operatorname{Permutation}}([2, 1, 3]))OutPermutation⁡([1,3,2]){\operatorname{Permutation}}([1, 3, 2])

Known value · wolframscript 15.0, on the one-line word

the smaller degree is padded with fixed points

live ↗
InPermutationProduct(Permutation⁡([2,1]),Permutation⁡([1,3,2]))\mathrm{PermutationProduct}({\operatorname{Permutation}}([2, 1]), {\operatorname{Permutation}}([1, 3, 2]))OutPermutation⁡([3,1,2]){\operatorname{Permutation}}([3, 1, 2])

Known value · wolframscript 15.0, on the one-line word

any Cycles argument makes the result Cycles

live ↗
InPermutationProduct(Permutation⁡([2,3,1]),Cycles([[1,2]]))\mathrm{PermutationProduct}({\operatorname{Permutation}}([2, 3, 1]), \mathrm{Cycles}(\bigl\lbrack\bigl\lbrack1, 2\bigr\rbrack\bigr\rbrack))OutCycles([[2,3]])\mathrm{Cycles}(\bigl\lbrack\bigl\lbrack2, 3\bigr\rbrack\bigr\rbrack)

Known value · wolframscript 15.0, on the one-line word

Properties #

the empty product is the identity

live ↗
InPermutationProduct()\mathrm{PermutationProduct}()OutCycles([])\mathrm{Cycles}(\bigl\lbrack\bigr\rbrack)

Known value · wolframscript 15.0

About
Examples10
Checked againstWolfram Language 10 agreeSageMath 9 agree
CrosswalkWolfram LanguageSageMath ×2

Implementation

mappedsagepackages/oracle/src/mappings.ts

Sage multiplies left to right by default, applying the left factor first, as Wolfram and ours do.

mappedsagepackages/oracle/src/mappings.ts

See also: PermutationPower, InversePermutation, Permute