Quantum Mechanics: position and the separability of Hilbert space? I would be pleased if someone could point out to me where I go wrong in the following sequence of statements:


*

*One model of quantum mechanics identifies states of a particle with normalized vectors (up to a "phase factor") in a separable complex Hilbert space. 

*In a separable space any any orthonormal basis is countable

*$\psi(x)$, the wave function for the position of a particle on a line seems to treat $x \in R$ as a basis for the space.

*If a particle is at $x_1$ it is there with probability 1, and it is not at $x_2$, so $\langle x_1|x_2\rangle  = 1$ if $x_1 = x_2$ and zero otherwise. 

*So, $\{x: x \in R\}$ is orthonormal and a basis, but it isn't countable which contradicts (2)..

 A: The "basis" you imply in 4. and 5. is the set of all shifted delta distributions $\{\delta_x (f) = f(x)\,\forall\,f\in \mathscr{S}(\mathbb{R}^N)\}$ where $\mathscr{S}(\mathbb{R}^N)\subset L^2(\mathbb{R}^N)$ is the Schwartz Space of bounded smooth functions $f:\mathbb{R}^N\to\mathbb{R}^N$ such that any derivative $D^\alpha (p\,f)$ of any multiple $f p$ of $f$ by a polynomial $p$ is also a bounded smooth function with this property. Roughly, they are infinitely differentiable functions all of whose derivatives approach zero at least as fast as the reciprocal of any polynomial as their argument approaches infinity.
So the $\delta_x$ objects are continuous linear functionals defined on a subspace $\mathscr{S}(\mathbb{R}^N)$ of $L^2(\mathbb{R}^N)$ - the latter being the wonted function space used for quantum mechanical states; they are therefore not functions and not members of $L^2(\mathbb{R}^N)$ themselves. $L^2(\mathbb{R}^N)$ is most often the space chosen in step 1. of your sequence; spanned, for example, by the countable number states of the quantum harmonic oscillator ($\psi_n(x)\equiv \left\langle x \mid n \right\rangle = {1 \over \sqrt{2^n n!}}~ \pi^{-1/4} \exp(-x^2 / 2)\, H_n(x)$ where $H_n$ are the Hermite polynomials).
However, and this is the root of a great deal of confusion, in many discussions of quantum mechanics, particularly nonrigorous or introductory ones, one is actually discussing (although this is never stated)  tempered distributions. Tempered distributions are the dual space $\mathscr{S}(\mathbb{R}^N)^*$ of the Schwarz space, not $L^2(\mathbb{R}^N)$ (which, as a Hilbert space, is isomorphic to its own dual). Since $L^2(\mathbb{R}^N)$ is a Hilbert space, by definition of Hilbert space $L^2(\mathbb{R}^N)\cong L^2(\mathbb{R}^N)^*$ and so ordinary" functions can then be thought of as the subset $L^2(\mathbb{R}^N)^* \subset \mathscr{S}(\mathbb{R}^N)^*$ of the tempered distributions. The tempered distributions are thus a broadening of the notion of state that allows us to think of totally "localized" states $\delta_x$ as in step 4 of your sequence and also totally delocalized ones such as $\exp(i\,k\,x)$ being the Fourier transform of $\delta_x$. One of the properties of tempered distributions that is especially important for quantum mechanics is that the Fourier transform is a bijection $\mathscr{S}(\mathbb{R}^N)^*\to\mathscr{S}(\mathbb{R}^N)^*$, and so we can change our co-ordinates freely between position and momentum co-ordinates.  
For more discussion on these points, see my answer here.
A very readable account of tempered distributions suitable for refreshing the memory of lapsed mathematics students such as the author of this post and the question OP is to be found in:
M. J. Lighthill, "An Introduction to Fourier Analysis and Generalised Functions"
although some somewhat kooky and nonstandard terminology is used in this one, for example "Good Functions" for the Schwartz Space. The term "Tempered Distribution" is never used; it is what Lighthill calls a "Generalised Function".
A: The `basis' you described in 3 is given by the Dirac measures, and it is not in $L^2$, meaning that $\langle x|x\rangle$ is not defined. In other words, states concentrated at a single point is not allowed in the theory from a strict mathematical point of view. So 4 is not true. If you want to include states like $|x\rangle$ there is a formalism called rigged Hilbert space (or Gelfand triple) formalism specifically invented for this purpose.
