Let $\mathcal{P}$ be the set of permutations over a finite set $\mathcal{S}$, with $|\mathcal{P}|$=$|\mathcal{S}|!$
$(\mathcal{P},\circ)$ is a finite group, where $\circ$ is composition.
A subset $\mathcal{Q}$ of $\mathcal{P}$ is defined as pure when $\forall (a,b,c)\in\mathcal{Q}^3, a\circ b^{-1}\circ c\in \mathcal{Q}$ (update: and $\mathcal{Q}$ is non-empty).
Any (update: non-empty) subset $\mathcal{Q}$ of $\mathcal{P}$ that is closed under $\circ$ is a (finite, sub)group, and is thus pure.
Is every pure set of permutations a group? If not except for trivial $|\mathcal{S}|$, what's a minimal counterexample? (Solved, see update below).
Any idea to determine if the set $\mathcal{Q}$ of permutations resulting from the cryptographic function DES is pure, with application to the security of 3DES, as asked in this question?
Update: a minimal counterexample occurs when $\mathcal{P}$ is the set of the 2 permutations of 2 elements; and $\mathcal{Q}$ is the set consisting of the single non-identity permutation, which is pure, but not a group.
Marc van Leeuwen states in his answer that a pure subset $\mathcal{Q}$ of $\mathcal{P}$ (assumed finite) is a group iff it contains the identity. Proof in the not-quite-trivial direction: if $\mathcal{Q}$ is pure and contains the identity $e$, then
- by setting $a=c=e$, $\mathcal{Q}$ contains the inverse of each of its element $b$;
- by setting $b=e$, $\mathcal{Q}$ is closed under $\circ$;
- thus $\mathcal{Q}$ obeys all the properties of a group.
Even combined with the established fact that DES is not a group, and that it would be possible to test/prove that DES does not contains identity, that does not seem to prove that DES is not pure.
The empty set and all one-element subsets of $\mathcal P$ are pure.