I am slightly confused regarding the equation $$\psi(x)=\langle x|\psi\rangle $$ Now, basically from my initial knowledge about Dirac's notation, I am able to see the expression $\langle x|\psi\rangle $ as some projection of the state vector on the position space. So, it is natural enough that it should be some function of the position variables which I can take as $\psi(x)$. But the problem is that, I like slightly more rigorous definitions with logic more than intuition. So, the confusion starts here when I consider the following two equations $$\hat H\psi(x,t)=i\hbar \frac{\partial \psi(x,t)}{\partial t}$$ $$\hat H|\psi(t)\rangle =i\hbar \frac{\partial |\psi(t)\rangle}{\partial t}$$ Suppose I solve the second equation, then I get a state vector which I can project onto the position space to get a wavefunction $\psi(x,t)$. But how can I ascertain that this map which has made on the position space exactly represents the solution of the first equation, considering that we solve both the equations separately?
Indirectly, the main question is that how can we justify on purely mathematical grounds that $\langle x|\psi\rangle =\psi(x)$ where LHS arises out of the second equation and the RHS arises from the first equation. Also, if we assume that it is a definition, how can we claim that it will not cause inconsistencies later?