Derivation of canonical position-momentum commutator relation We know that the position-momentum commutator is fundamental in quantum mechanics, but would it be possible to derive it starting from a different set of first principles, more specifically starting (in Dirac notation) from 
1) Closure relations $ \int|x\rangle  \, \langle x|  dx $ (both momentum and position bases) 
2) $ \left\langle \left.x'\right|x\right\rangle = \delta  \left(x-x'\right) $  Orthonormality relations for both bases 
3)  $ \left\langle \left.x\right|p\right\rangle = e^{\text{ipx}} $ the assumption that momentum eigenstates are plane waves in the position representation 
 A: Implicit in the assumption of "position" and "momentum" bases should be the eigenvalue eqs. for the corresponding observables, $\hat x\; |x\rangle = x |x\rangle$ and $\hat p\; |p\rangle = p |p\rangle$, although the expression of $\hat p$ in the position basis is not necessary. With this understood, consider the matrix element
$$\langle x |(\hat x \hat p - \hat p \hat x | x' \rangle = (x-x')\langle x |\hat p | x' \rangle =\\
= (x-x')\int{dp_1 \int{dp_2 \langle x |p_1\rangle \langle p_1|\hat p |p_2\rangle \langle p_2 | x'\rangle }}= \\
= (x-x')\int{dp_1 \int{dp_2 e^{ip_1x}\delta(p_1-p_2)p_2e^{-ip_2x'}}} = \\
= (x-x')\int{dp_1 \;p_1 e^{i(x-x')p_1}} = -i(x-x')\frac{\partial}{\partial x}\int{dp_1 \; e^{i(x-x')p_1}}=\\
= -i(x-x')\frac{\partial}{\partial x}\delta(x-x') = i\delta(x-x') = i\langle x|x'\rangle
$$
where use was made of the identity $(x-a)\delta'(x-a) = -\delta(x-a)$. Since $|x\rangle$, $|x'\rangle$ are arbitrary, 
$$
[\hat x, \hat p] = i
$$
follows necessarily.
A: The only ingredient that one needs to prove the commutation relations back is the action of either of the two operators on the other basis; namely one must assume that $\langle x|\hat{p}| \psi\rangle = i \partial_x \psi(x)$, i. e. the momentum operator acts as derivative on the position (or viceversa). From there the commutation relations follow automatically via the Stone theorem, or, equivalently restated, the derivative is the only operator whose commutator with the position is the identity.
3) follows automatically and 1) & 2) are unnecessary.
