__/\\\\\\\\\\\\\\\___________________________________________________________________________________________________________________/\\\\\_______________________________        
 _\///////\\\/////__________________________________________________________________________________________________________________/\\\///\\\__________/\\\_______________       
  _______\/\\\___________________________________________/\\\_____/\\\________________________/\\\__/\\\___________________________/\\\/__\///\\\_______\///________________      
   _______\/\\\___________/\\\\\\\\_____/\\\\\__/\\\\\___\///___/\\\\\\\\\\\__/\\\\\\\\\______\//\\\/\\\______/\\\\\_______________/\\\______\//\\\_______/\\\_____/\\\\\____     
    _______\/\\\_________/\\\/////\\\__/\\\///\\\\\///\\\__/\\\_\////\\\////__\////////\\\______\//\\\\\_____/\\\///\\\____________\/\\\_______\/\\\______\/\\\___/\\\///\\\__    
     _______\/\\\________/\\\\\\\\\\\__\/\\\_\//\\\__\/\\\_\/\\\____\/\\\________/\\\\\\\\\\______\//\\\_____/\\\__\//\\\___________\//\\\______/\\\_______\/\\\__/\\\__\//\\\_   
      _______\/\\\_______\//\\///////___\/\\\__\/\\\__\/\\\_\/\\\____\/\\\_/\\___/\\\/////\\\___/\\_/\\\_____\//\\\__/\\\_____________\///\\\__/\\\_____/\\_\/\\\_\//\\\__/\\\__  
       _______\/\\\________\//\\\\\\\\\\_\/\\\__\/\\\__\/\\\_\/\\\____\//\\\\\___\//\\\\\\\\/\\_\//\\\\/_______\///\\\\\/________________\///\\\\\/_____\//\\\\\\___\///\\\\\/___ 
        _______\///__________\//////////__\///___\///___\///__\///______\/////_____\////////\//___\////___________\/////____________________\/////________\//////______\/////_____
    

# Permutations \(S_n\)

A permutation of the set `X` is a bijection `sigma : X to X`. The set of all permutations on `X` is denoted `S_X` or Perm`(X)`.


We turn `S_X` into a group by adjoining the binary operation of function composition (that is `@ : S_X times S_X to S_X`). We call this group the symmetric group on `X`.


We specially refer to `S_(NN_(n))` where `NN_n = {1,...,n}` as the symmetric group on `n` elements and we denote this `S_n`.

Consider the element `sigma in NN_5` defined by $$ \sigma : \mathbb{N}_5 \to \mathbb{N}_5 \\ 1 \mapsto 3 \\ 2 \mapsto 1 \\ 3 \mapsto 2 \\ 4 \mapsto 5 \\ 5 \mapsto 4 \\ $$

We notice that we have the following cycles in our permutation $$ 1 \mapsto 3 \mapsto 2 \mapsto 1 \\ \text{and} \\ 4 \mapsto 5 \mapsto 4 $$

We can concisely more precisely represent each cycle. For our example, we can use a notation called cycle notation

in which `(132) in S_5` is the permutation which takes 1 to 2, 2 to 3, and 3 to 1, and maps every other element to itself. Similarly, `(45) in S_5` maps 4 to 5, 5 to 4, and every other element to itself. Then our `sigma` can be written as $$ \sigma = (132)(45) $$