Def/Permutation

 

=Counting Permutations= When $X$ is a finite set, and $\vert X \vert = n$, there are exactly $n!$ permutations of $X$. {{DirectProof {{InductiveProof {{DirectProof }} Now, we claim that the function $\pi$ is surjective: {{DirectProof Indeed, this function $\tilde g$ is surjective, since $X = X' \cup \{ x \}$, and $X' \in Im(g) \subset Im(\tilde g)$ and $x \in Im(\tilde g)$. Since $X$ is finite, $\tilde g$ is also injective. Thus $\tilde g \in Perm(X)$. Furthermore, $\sigma_{\tilde g} = (x,x) = Id_X$. It follows that $\pi(\tilde g) = g$. }} Next, we claim that the function $\pi$ is an $n$ to $1$ function: {{DirectProof $$\tilde \pi(f) = \sigma_f \circ f = \tilde \pi(\tilde g) = \tilde g, \mbox{ so } f = \sigma_f \circ \tilde g.$$ (Here, we use the fact that $\sigma_f$ is its own inverse). Hence, $f$ is uniquely determined by $g$ and the permutation $\sigma_f = (x, f(x))$. There are precisely $n$ possible values for $f(x)$, and hence there are at most $n$ possible permutations $f \in Perm(X)$, such that $\pi(f) = g$.
 * Hyp= Let $X$ be a finite set, and let $n = \vert X \vert$.
 * Bod= Let $Perm(X)$ be the set of permutations of $X$. We prove that $\vert Perm(X) \vert = n!$ by induction on $n$:
 * BaseCase= $n=0$
 * BaseBod= If $n = 0$, then $X = \emptyset$. A function from $X$ to $X$ must be subset of $X \times X = \emptyset \times \emptyset = \emptyset$; there is only one such subset, namely $\emptyset$.  The subset $\emptyset \subset X \times X$ does indeed describe a permutation of $X$:  the sentence $\forall x \in X, \exists ! y \in X, (x,y) \in \emptyset$ is true, by  false premise (universal quantification over an empty set).  It can be checked that $\emptyset$ is its own inverse function; in fact, $\emptyset = Id_X$.  Thus, the only function from $X$ to $X$ is $\emptyset$, and $\emptyset \in Perm(X)$.  Thus $\vert Perm(X) \vert = 1$.  Since $0! = 1$, the base case is verified.
 * IndCase= $n > 0$
 * IndBod= Suppose that $n > 0$, and that the result has been proven for all smaller values of $n$. Since $\vert X \vert = n > 0$, we may choose an element $x \in X$.  Let $X' = X - \{ x \}$ be the set of all other elements of $X$.  We define a function $\pi \colon Perm(X) \rightarrow Perm(X')$ as follows:
 * Hyp= For all $f \in Perm(X)$, let $\sigma_f = (x, f(x)) \in Perm(X)$ be the transposition which exchanges $x$ and $f(x)$, and define $\tilde \pi(f) = \sigma_f \circ f.$
 * Bod= Then, $[\tilde \pi(f)](x) = \sigma_f(f(x)) = x$. Since $\sigma_f \in Perm(X)$, and $f \in Perm(X)$, we find that $\tilde \pi(f) \in Perm(X)$.  Furthermore, if $y \in X'$, then $[\tilde \pi(f)](y) \neq x$, since $\tilde \pi(f)$ is injective.  Hence, if $y \in X'$, $[\tilde \pi(f)](y) \in X'$.  Therefore, $\tilde \pi(f)$ restricts to a function $\pi(f)$ from $X'$ to $X'$.  As the restriction of an injective function, $\pi(f)$ is injective.  Since $X'$ is finite, $\pi(f)$ is also surjective.
 * Con= Hence $\pi(f) \in Perm(X')$.
 * Hyp= Suppose that $g \in Perm(X')$.
 * Bod= Then, $g$ extends to a permutation $\tilde g$ of $X$, defined by:
 * $\tilde g(y) = g(y)$, for all $y \in X'$.
 * $\tilde g(x) = x$.
 * Con= Hence $\pi$ is surjective.
 * Hyp= Suppose that $g \in Perm(X')$.
 * Bod= Let $\tilde g$ be the element of $Perm(X)$ constructed previously, so that $\pi(\tilde g) = g$. Observe that if $f \in Perm(X)$, and $\pi(f) = \pi(\tilde g) = g$, then we find that:

Conversely, if $y \in X$, then $\pi( (x,y) \circ \tilde g) = g$. This produces $n$ distinct permutations $(x,y) \circ \tilde g$, which map to $g$ via $\pi$. }}
 * Con= Hence, for every $g \in Perm(X')$, the preimage $\pi^{-1}(g)$ has cardinality $n$.

Since $\pi$ is an $n$ to $1$, surjective function from $Perm(X)$ to $Perm(X')$, and by the inductive hypothesis, $\vert Perm(X') \vert = (n-1)!$, we find that $$\vert Perm(X) \vert = n \cdot \vert Perm(X') \vert = n \cdot (n-1)! = n!.$$ }} =Metadata= {{Written by|Person=User:Marty}}
 * Con= By induction, we find that $\vert Perm(X) \vert = n!$.