# Riemann sum of completeness relation in continuous basis

Suppose I have a wave function $$\psi$$ we express it in a continous states as

$$\psi= \int_{-\infty}^{\infty} dxC (x)\rvert x\rangle = \int_{-\infty}^{\infty} dx\rvert x\rangle \langle x \rvert \psi (x)$$

This can be expanded in Riemann sum as

$$\psi= \lim_{\Delta x\to 0} \sum_{i=-\infty}^{\infty} \Delta xC (x_i)\rvert x_i\rangle.$$

This is not symmetric with the expression for $$\psi$$ in other discrete Hilbert spaces.

Which is

$$\psi= \sum_{i=-\infty}^{\infty} C (\phi_i)\rvert \phi_i\rangle,$$ where this $$i$$ takes discrete values.

Symmetry is lost due to the appearance of the factor $$\Delta x$$.

There is no paradox. If you have the continuous relation as $$| \psi \rangle = \int_{-\infty}^\infty dx \ \psi(x) |x \rangle = \lim_{\Delta x \rightarrow 0} \sum_i \Delta x \psi(x_i) |x_i \rangle,$$ to draw an analogy with the discrete basis expansion $$\sum_i C_i |e_i \rangle$$, you need to realize that the analogy goes as $$C_i \leftrightarrow \Delta x \psi(x_i)$$, not $$C_i \leftrightarrow \psi(x_i)$$.
For a better intuition, think of it this way, the continuous basis has infinitely many more basis vectors than a discrete basis, meaning that the component of any state $$|\psi \rangle$$ along any of these basis vectors $$|x\rangle$$ has to be infinitesimal for the expansion to make sense. So $$\psi(x) =\langle x | \psi \rangle$$ is more of a component density (for lack of a better term).
This is similar to any other part of physics where densities are involved. For example, the total mass of a system of discrete point masses is: $$M = \sum_i m_i,$$ whereas for a continuous mass distribution it's $$M = \int_\mathcal D d^3\mathbf x \rho(\mathbf x) = \lim_{\Delta V \rightarrow 0} \sum _{i} \Delta V \rho(\mathbf{x}_i).$$ Here you can make the analogy $$m_i \leftrightarrow \Delta V \rho(\mathbf x_i)$$, i.e. the mass of an infinitesimal volume element in the continuous distribution is $$\Delta V \rho(\mathbf x_i)$$ (and not $$\rho$$ itself).
Similarly, the component of $$|\psi \rangle$$ along the basis vector $$|x \rangle$$ is $$\Delta x \psi(x)$$, with $$\psi(x)$$ playing the role of a "density".
There is no paradox. You're comparing two different formulas: one is an approximation that applies to a continuous basis of states $$|x\rangle$$, the other is an exact formula that applies to a discrete Hilbert space. Just because two formulas look different doesn't mean one of them is wrong.