I am new to quantum mechanics. I have been trying to understand why when we want to represent a function $$\psi(x)$$ as a ket in continuous basis |x> we us the integral:
$$\vert \psi(x)\rangle =\int\psi(x)\vert x\rangle dx$$
where in non-continuous basis it is :
$$\sum\psi(x)\vert x\rangle $$ clearly the $dx$ gives different units here so I am not sure if integrals make sense to use to expand the vector in these basis. Also, I have heard that continuous means uncountable which I am not sure how that is uncountable, can't we just index all the basis with natural numbers since last time I checked we have infinity of them?