Bounded operator with an inverse on a dense invariant subspace Let $X$ and $Y$ be two Banach spaces such that $X$ is continuously embedded in $Y$. We suppose also that $X$ is dense in $Y$. Let $A\, \colon \, Y \to Y$ be a bounded operator that maps $X$ into itself such that the restriction $A_{|X} \colon X \to X$ is a bounded operator.
Do we have: $A_{|X}$ invertible $\implies$ $A$ invertible ?
If $X$ is not supposed to be endowed with a Banach structure, a counter-example is given in Wikipedia.

This is a nice question because everybody should rather immediately think that the answer must be negative (such a theorem would look much too good) -- and nevertheless it is far from obvious (at least for me) how to find a counterexample. 
I believe that an example is contained in the paper https://doi.org/10.1007/BF01174563 of K. Dayanithy from 1978: For the finite measure $\mu$ on $\mathbb N$ with $\mu(\{n\})=1/(n!)^2$ he caculates the spectral radii of the operators $T_p$ on $L^p(\mu)$ defined by $(x_n)_n\mapsto (x_{n+1}/(n+1))_n$, namely $r(T_p)=0$ for $p>2$ and $r(T_2)=1$. There is thus an element $\lambda$ of the spectrum of $T_2$ with $|\lambda|=1$. Since the spectrum of $T_p$ for $p>0$ is $\{0\}$ we thus get for every $p>2$ that $A= \lambda -T_2$ is not invertible on $L^2(\mu)$ but its restriction to $L^p(\mu)$ is invertible. 
Note finally that $L^p(\mu)$ is contained in $L^2(\mu)$ because the measure is finite and it is dense because even the space of finite sequences (i.e., with only finitely many non-zero coordinates) is dense.

I would like very much to see a simpler example! 
