Equality-pattern orbits of ordered pairs (source code)

= Equality-pattern orbits of ordered pairs
{title2=$S_n\backslash(\{1,\ldots,n\}^2)=\{\text{equal},\text{distinct}\}\quad(n\geq2)$}

The diagonal <group action> of the <symmetric group> on ordered pairs has two <orbits of a group action> when $n\geq2$: equal pairs, of size $n$, and distinct pairs, of size $n(n-1)$. Equality is preserved by a <bijection>, and a prescribed bijection on one or two distinct letters extends to a <permutation> of all letters. At $n=1$ only the equal-pair orbit remains.