<?xml version="1.0" encoding="utf-8" ?> <!-- for emacs: -*- coding: utf-8 -*- --> <!-- Apache may like this line in the file .htaccess: AddCharset utf-8 .html --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd" > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head><title>inversePermutation -- inverse permutation</title> <link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/> </head> <body> <table class="buttons"> <tr> <td><div><a href="___Inverses.html">next</a> | <a href="___Inverse__Method.html">previous</a> | <a href="___Inverses.html">forward</a> | <a href="___Inverse__Method.html">backward</a> | up | <a href="index.html">top</a> | <a href="master.html">index</a> | <a href="toc.html">toc</a> | <a href="http://www.math.uiuc.edu/Macaulay2/">Macaulay2 web site</a></div> </td> </tr> </table> <hr/> <div><h1>inversePermutation -- inverse permutation</h1> <div class="single"><h2>Synopsis</h2> <ul><li><div class="list"><dl class="element"><dt class="heading">Usage: </dt><dd class="value"><div><tt>y = inversePermutation x</tt></div> </dd></dl> </div> </li> <li><div class="single">Inputs:<ul><li><span><tt>x</tt>, <span>a <a href="___List.html">list</a></span>, a list of length <tt>n</tt> whose elements are the numbers 0, 1, 2, ..., <tt>n-1</tt>, in some order, representing the permutation defined by sending <tt>i</tt> to <tt>x#i</tt></span></li> </ul> </div> </li> <li><div class="single">Outputs:<ul><li><span><tt>y</tt>, <span>a <a href="___List.html">list</a></span>, the list representing the inverse permutation of <tt>x</tt></span></li> </ul> </div> </li> </ul> </div> <div class="single"><h2>Description</h2> <div><table class="examples"><tr><td><pre>i1 : x = {1,2,3,4,5,0} o1 = {1, 2, 3, 4, 5, 0} o1 : List</pre> </td></tr> <tr><td><pre>i2 : y = inversePermutation x o2 = {5, 0, 1, 2, 3, 4} o2 : List</pre> </td></tr> <tr><td><pre>i3 : all(#x, i -> x#(y#i) == i) o3 = true</pre> </td></tr> <tr><td><pre>i4 : all(#x, i -> y#(x#i) == i) o4 = true</pre> </td></tr> </table> <p>We compose permutations with <tt>_</tt>; see <tt>(symbol _, VisibleList, List)</tt> (missing documentation<!-- tag: (symbol _, VisibleList, List) -->).</p> <table class="examples"><tr><td><pre>i5 : x_x_x o5 = {3, 4, 5, 0, 1, 2} o5 : List</pre> </td></tr> <tr><td><pre>i6 : x_x_x_x_x_x o6 = {0, 1, 2, 3, 4, 5} o6 : List</pre> </td></tr> <tr><td><pre>i7 : x_y o7 = {0, 1, 2, 3, 4, 5} o7 : List</pre> </td></tr> <tr><td><pre>i8 : y_x o8 = {0, 1, 2, 3, 4, 5} o8 : List</pre> </td></tr> </table> </div> </div> </div> </body> </html>