I am wondering about the meaning of the scalar product and its relation with the wave function. In the Hilbert space, the scalar product is defined as
$$\langle \phi \rvert \psi \rangle = \int \phi^*\psi dx.$$
This defines the $\rvert \psi \rangle$ as a vector from the Hilbert vector space. Now, the wave function is defined from the scalar product
$$\psi (x,t) = \langle x \rvert \psi \rangle = \int x^*\psi dx.$$
First question: Is the last equality true? If so, which function $\psi$ has to be integrated? Isn't it a kind of recursive definition?
Let's now assume a Fock space. Let's expand the wave-vector in this basis, i.e., $\rvert \psi \rangle = \sum_m a_m\rvert m \rangle$. Now, the probability to find the system in a state $\rvert k \rangle$ is given by $P(k|\psi) = |a_k|^2 = |\langle k \rvert \psi \rangle|^2$. This makes sense since $\langle k \rvert \psi \rangle$ is a wave function.
Question 2: How is this wave function? Could I write it as $\psi(m,t) = \langle m \rvert \psi \rangle = \int m^*\psi dm$? I guess that somehow this integral should actually be a sum.
Thank you very much.