Ambiguity in number of basis vectors [duplicate]

The dimension of the Hilbert space is determined by the number of independent basis vectors. There is a infinite discrete energy eigenbasis $\{|n\rangle\}$ in the problem of particle in a box which can be used to expand a general state $|\psi\rangle$ as: $$|\psi\rangle=\sum\limits_{n=0}^{\infty} C_n |n\rangle$$ Here, the basis implies that the Hilbert space has countably infinite number of basis vectors. But one could well expand $|\psi\rangle$ in any other basis as well, say the continuous position basis. Then that superposition, $$|\psi\rangle=\int dx \psi(x)|x\rangle$$ is also possible. But this basis $\{|x\rangle\}$ is continuous and uncountably infinite. Such sets cannot be equal because they have different cardinality. Then my questions is how many independent basis vectors are really there in this Hilbert space?

-

marked as duplicate by Luboš Motl, Kyle Kanos, John Rennie, Dimensio1n0, jinaweeFeb 11 '14 at 15:20

The issues of incompleteness enter through the axiomization approach developed by Von Neumann, the formalism is absolutely consistent, but the interpretation is left open and depends upon physical observation. Von Neumann was very clear on this point. "Uncertainty" is purely rooted in as part of arbitrariness in the outcome of physical observation. So there is nothing inconsistent in the math, just how we interpret what the math tells us. thefurloff.com/2014/02/12/… –  user11547 Feb 12 '14 at 11:21

The answer is that $\{|x\rangle\}$ is not a basis of $L^2(\mathbb R)$ which admits only countable basis. The point is that objects like $|x\rangle$ are not vectors in $L^2(\mathbb R)$. To provide them with a rigorous mathematical meaning one should enlarge $L^2(\mathbb R)$ into an extended (non-Hilbert) vector space structure including Schwartz distributions or adopt a viewpoint based on the so called direct integral of Hilbert spaces. These are structures quite complicated to use with respect to a standard Hilbert space. Nevertheless the practical use of formal objects like $|x\rangle$ is quite efficient in physics provided one is able to distinguish between problems arising from physics and false problems just due to a naive misuse of the formalism.
(When I was student I wasted time in discussing if identities like $A|\psi\rangle = |A\psi \rangle$ had any sense.)
My reasoning is that while you can write any function with a finite number of jump discontinuities in the basis $| n\rangle$, the position basis vectors $\delta(x - x_0) = |x\rangle$ cannot be written as such. Hence they are not in that Hilbert space.