Do continuous wavefunction form a Hilbert space? In quantum mechanics we are told that

*

*the wavefunctions live in Hilbert space.


*the wavefunctions are continuous.
It recently came to my notice that in Mathematics, there is a theorem which says that the  $\textit{continuous functions}$, for example $C[0,1]$ do not form a Hilbert space (see this). Now I wonder whether this is in contradiction with 1 and 2 or not?
 A: Item 2 is false. The Hilbert space $\mathcal H=L^2(\mathbb R)$ consists of all square integrable functions, including discontinuous ones. Even though the Hamilton operator $H=-\Delta+V$ is a differential operator, which isn't defined on all of $\mathcal H$, the time evolution operator $e^{-i t H}$ is a densely defined bounded linear operator and can thus be extended to all of $\mathcal H$ by the BLT theorem (bounded linear transformation theorem), so the time evolution of all square integrable functions is well defined, even if they are discontinuous.
(As Valter pointed out in the comments, one needs to take a bit more care when defining $e^{-i t H}$. In order to apply the measurable functional calculus, $H$ needs to be self-adjoint. The differential operator version of $H$ is only symmetric, but possesses a unique self-adjoint extension if one starts out with a suitable initial domain of definition, such as the space of Schwartz functions.)
A: Some say that item 1 is also false. Basically a rigged Hilbert space is more appropriate. See e.g. https://arxiv.org/abs/quant-ph/0502053
or https://doi.org/10.1007/3-540-088431-1.
A: Item 2 is simply false if wavefunction is understood as a generic state vector of the system.
This is compatible with the answer NO to your question.
With the above interpretation wavefunctions are not "functions" in usual sense, since  they are elements of $L^2(\mathbb{R}, dx)$ ($\mathbb{R}$ can be replaced by an interval $[a,b]$). That Hilbert space includes objects which are functions "up to arbitrary re-definition on zero-measure sets". For instance The set of (signed) rational numbers in $\mathbb{R}$ has zero measure. You see that, as a consequence,  $L^2(\mathbb{R}, dx)$ contains true monsters.
On the other hand several wavefunctions must belong to the domain of some operators, usually differential operators, so it is convenient to deal (when requested and possible) with "monsters" which can be made differentiable (up to the requested order) by redefining them on zero measure set. That is the reason why one usually does not see monsters. However they are necessary for guaranteeing  completeness of $L^2(\mathbb{R}, dx)$ as a Hilbert space. Completeness, in turn, guarantees the validity of some mathematical machinery of great relevance in Quantum Theory, as the spectral decomposition of selfadjoint operators.
There is nothing horrible for instance, dealing with a particle in an infinite potential box in $[0,1]$ to consider a discontinuous initial (unnormalized) state $\psi(x) = 0$ for $x\in [0,1/2]$ and $\psi(x)= 1$ for $x\in (1/2,1]$.
This state is not a mathematical chimera: it can be prepared in the practice by removing at $t=0$ a separator wall placed at $x=1/2$ after having inserted a particle in the portion $[1/2,1]$.
That function is discontinuous but its evolution is well defined. It is sufficient to decompose the function on the basis of the Hamiltonian in the box made of smooth functions $\psi_n(x)$ with eigenvalue $E_n$ (we can find then in every elementary textbook on QM)
$$\psi(x) = \sum_{n=1}^{+\infty} c_n \psi_n(x)$$
That series converges in the $L^2$ sense, as it does, since every $L^2$ function can be expanded that way with respect to a Hilbert basis as $\{\psi_n\}_{n=1,2,\ldots}$. This is a basic fact of spectral decomposition. Our function $\psi$ is $L^2$ trivailly.
Its time evolution is
$$\psi(t,x) = \sum_{n=1}^{+\infty} c_n e^{-it E_n/\hbar}\psi_n(x)\:.$$
We can equivalently rewrite this identity as
$$\psi(t,x) = e^{-itH/\hbar}\psi(x)$$
where $H$ is the Himiltonian operator. The evolutor $e^{-itH/\hbar}$ is defined in whole Hilbert space. If $\psi$ belongs to the domain of $H$, and this is not the case for our $\psi$ we can differentiate in the $L^2$ topology obtaining the Schroedinger equation
$$i\frac{d}{dt} \psi(t,x) = H \psi(t,x)\:.$$
(that is not the whole story because the topology used in computing the derivative is not the pointwise one, but it is possible to prove that, if the function is sufficiently regular the Schroedinger equation above turns out to be the standard one in the sense of PDE)
If for wavefunction we intend a solution of the Schroedinger equation viewed as a classic PDE, then we should add some regularity hypotheses to the functions. However, that is a too restrictive viewpoint in my opinion, because it suggests that only these "wavefunctions" have time evolution (solutions of the Schroedinger equation). Instead, every state has time evolution regardless its regularity as function as I pointed out above as an example.
