The Heisenberg Uncertainty Principle and the 1D particle in a box This question and its answers, Do linear momentum eigenstates exist?, very recently asked has me a bit stumped.
The OP basically states that the HUP:
$$\Delta x\cdot \Delta p\geq \frac{\hbar}{2}\tag{1}$$
implies that $p\neq 0$, always.
Or as one commenter ('Sebastian Riese') stated:

The uncertainty conundrum is seen to be solved when looking at the
approximations: The position uncertainty goes appropriately to
infinity as we approach zero momentum uncertainty.

Now if we look at the very (teachable and) useful example of the $\text{1D}$ particle in a box with $\text{zero}$ potential energy $V(x)=0$ inside and infinitely high potential walls, we know that the ground state energy $E_1$ is non-$\text{zero}$, $E_1>0$.
Since as $V=0$, then:
$$E_1=V+K=K$$
This clearly implies that there is kinetic energy and thus motion and momentum, i.e. $p>0$.
Many, many moons ago I was taught (perhaps badly!) that this non-zero ground state energy is an illustration of the HUP, as it shows $p\neq 0$, in accordance with $(1)$. Because if $p=0$ then it is exactly known, so $\Delta p=0$, which violates the HUP.
And from this answer:

A simple way would be to realise that when $n=0$, the magnitude of the
momentum is 0, and thus there are no 'positive' and 'negative' values
it could take: it most definitely has a momentum of exactly zero, with
no uncertainty. This would be allowed, if you were not in a box.
However, placing yourself in a box, meaning that $Δx<∞$, means that you
necessarily have a minimal non-zero momentum, using the argument you
mentioned earlier.

That seems to confirm the role of HUP in explaining why non-zero ground energy is required.
Is this reasoning wrong?
 A: Well, here is the thing: For a particle in a box, the naïve application of the HUP leads to an apparent contradiction. Here is the naïve properly formulated treatment:

For the momentum operator $p:=-i\hbar \frac{d}{dx}$ the countable set of
functions $\psi_n (x) :=\frac{1}{\sqrt 2} \exp\left(\pi i n x \right),~ n\in\mathbb{Z}$,
form an orthonormal basis in the Hilbert space $L^2[-1,1]$.
Pick any of the eigenvectors and you will find that $\Delta p=0$,
thus, because $x$ in $L^2 [-1,1]$ is bounded and selfadjoint (therefore with a finite "uncertainty"), you are obliged to conclude that $\Delta x \Delta p =0$, apparently violating the HUP.

Is is a paradox? No, it is not. To render the momentum operator self-adjoint, you need to define its proper (maximal) domain as:
$$D(p) =\{\psi (x)\in L^2 [-1,1]~ \vert ~  \psi (-1) = \psi (1)\}.$$
Is is obvious that any eigenfunction $\psi_n $ of $p$ belongs to this domain and moreover $p~\psi_n \in D(p)$.
Now the trick is that for any $\psi (x)\in D(p)$, $x\psi (x) \notin D(p)$, therefore the commutator in the right hand side of the HUP is not defined, because the $px$ part of it does not exist as a linear operator.
So the HUP "survives" in the 1D infinite well, simply because the confinement (which accounts for the well-definiteness of momentum and ultimately Hamiltonian) precludes its application.
A: This is a slightly tangential answer but I think it is relevant. In my experience, the assertion that a non-zero energy eigenvalue for the ground-state is associated with the HUP comes from the example of a simple harmonic oscillator much more naturally than from the case of a potential well. In the latter case, the domain of definition of the commutator does not include the energy eigenstates to begin with -- as explained in the wonderful answer by @DanielC. Also, see @ACuriousMind's answer to a similar question about the case of a particle on a ring.
In the case of the harmonic oscillator, however, this assertion seems to follow straightforwardly. We have
\begin{align}
H 
&=\frac{1}{2m}(p^2+m^2\omega^2x^2)\\
&=\frac{1}{2m}(p+im\omega x)(p-i\omega x) -\frac{i\omega}{2}[x,p]\\
&=\omega a^\dagger a -\frac{i\omega}{2}[x,p]
\end{align}
where the ladder operators have the usual meaning so that $a\vert 0\rangle=0$ and one can verify that such a $\vert 0\rangle$ exists (by just showing that there is a solution to the equation $a\vert\psi\rangle = 0$ where $a$ is the usual lowering operator).
Now, we see that $H\vert 0\rangle = -\frac{i\omega}{2}[x,p]\vert 0\rangle = \frac{\omega}{2}\vert 0\rangle$. In other words, the ground state energy being non-zero is synonymous with the commutator $[x,p]$ not being zero.
However, I think this is not as important as people make it out to be because a constant shift in the Hamiltonian is entirely meaningless in quantum mechanics. The same physical system can be described by the Hamiltonian $H=\omega a^\dagger a$ and then the energy eigenvalue for the ground state would be zero.
Edit
A constant shift in the energy is completely irrelevant for the simple reason because it amounts to the overall phase of the state which is known to be unphysical.
Let's consider a generic state $\vert \psi \rangle = \sum_n \vert E_n\rangle \langle E_n\vert \psi\rangle$. Now, its time evolution would be given by \begin{align}
\vert \psi(t)\rangle &= \sum_n e^{-iE_nt}\vert E_n\rangle \langle E_n\vert \psi\rangle\\
&= \sum_n e^{-i(\tilde{E}_n+E_0)t}\vert E_n\rangle \langle E_n\vert \psi\rangle\\
&= e^{-iE_0t}\sum_n e^{-i\tilde{E}_nt}\vert E_n\rangle \langle E_n\vert \psi\rangle
\end{align}
where $\tilde{E}_n\equiv E_n - E_0$ is the redefined energy. Thus, we see can always redefine the energy up to constant and it only adds to an overall phase -- not just in the case of energy eigenstates but also for a generic state.
A: The topic of the exact measure is discussed in the Quantum Mechanics Feymann's Lectures on physics :

[...] The question is whether the ideas of the exact position of a particle
and the exact momentum of a particle are valid or not. The classical
theory admits the ideas; the quantum theory does not. [...]

Thus, when you make a measurement the energy is not exactly defined, therefore, if you are in the case of the particle in a box, you cannot say for sure (when you make the measurement) that the particle is in the eigenstate with that energy eigenvalue.
