Solution (source code)

= Solution

The <Lumer-Phillips theorem> says that a densely defined operator on a Hilbert space generates a contraction $C_0$-semigroup exactly when it is <maximal dissipative>:
$$
\operatorname{Re}(Ax,x)\leq0
$$
and $\operatorname{Ran}(\lambda I-A)$ is the whole space for some, equivalently every, $\lambda>0$.

For $Z=(u,v)\in D(A)$, self-adjointness of $B$ gives
$$
(AZ,Z)_{\mathcal H}
=(Bv,Bu)+(-B^2u,v)=0.
$$
Thus both $A$ and $-A$ are dissipative. To check maximality, solve
$$
(\lambda I-A)(u,v)=(f,g).
$$
The equations give
$$
v=\lambda u-f,
\qquad
(B^2+\lambda^2)u=g+\lambda f.
$$
On Fourier mode $n$, the last operator has multiplier $1+n^2+\lambda^2>0$, so it gives a unique $u\in H^2$ and then $v\in H^1$ whenever $(f,g)\in\mathcal H$. Hence $\lambda I-A$ is onto; the same calculation applies to $-A$.

The two contraction semigroups generated by $A$ and $-A$ are inverses. They form a <strongly continuous unitary group> $U(t)$ on the complexification of $\mathcal H$, or an orthogonal group on the real space, and
$$
\boxed{\|U(t)Z\|_{\mathcal H}=\|Z\|_{\mathcal H}}
$$
for every $t\in\mathbb R$.