Derivation of the Pauli exchange principle