\begin{lemma}[Dyadic shift semantics and error transport]
For a decimal sequence $d$, let $V(d)$ be the real value of its stored prefix:
fold its first \texttt{num\_digits} cells in base ten and scale the result by
$10^{d.\mathit{decimal\_point}-d.\mathit{num\_digits}}$.

For every successful left shift by $k\le60$ of a record with $V(d)>0$ whose
stored cells are decimal digits, if
\[
 X=V(d)+\eta,\quad0\le\eta<u,\quad
 (d.\mathit{truncated}=\mathrm{true}\iff0<\eta),
\]
then there are $\eta',u'$ satisfying
\[
 2^kX=V(d')+\eta',\quad0\le\eta'<u',\quad
 d'.\mathit{truncated}\iff0<\eta',\quad
 V(d')+u'=2^k(V(d)+u).
\]
Moreover multiplication by $2^k$ preserves and reflects each of $<,=,>$
between $X$ and every exact boundary $H$.  For every successful right shift
under the same hypotheses, either the result has zero count and point and
false sticky (the range-reset case), or the analogous four relations and
three exact comparison equivalences hold with division by $2^k$.  This is the
conjunction stated in Lean.
\end{lemma}
\begin{proof}
For the successful left shift, apply
\noderef{DecimalSeqLeftShiftRecordSemantics}.  It supplies $\rho_L\ge0$ with
\[
 V(d')=2^kV(d)-\rho_L,\qquad
 d'.\mathit{truncated}\Longleftrightarrow
 d.\mathit{truncated}\ \text{or}\ \rho_L>0.              \tag{1}
\]
Apply \noderef{PositiveScaleErrorTransport} with
\[
 s=2^k,\quad V'=2^kV(d)-\rho_L,\quad
 \eta'=\rho_L+2^k\eta,\quad u'=\rho_L+2^ku.
\]
The scale is positive.  The cited transport lemma gives
\[
 2^kX=V(d')+\eta',\quad0\le\eta'<u',\quad
 V(d')+u'=2^k(V(d)+u),                                   \tag{2}
\]
as well as
\[
 \eta'>0\Longleftrightarrow \rho_L>0\ \text{or}\ \eta>0.\tag{3}
\]
By the input hypothesis,
$d.\mathit{truncated}\Longleftrightarrow\eta>0$.
Commuting the two disjuncts in (3) and using (1) therefore gives
$d'.\mathit{truncated}\Longleftrightarrow\eta'>0$.
The transport lemma also says, for each real $H$, that multiplication by
$2^k$ preserves and reflects $X<H$, $X=H$, and $H<X$.  These are exactly
all clauses of the left-shift conclusion.

For the right shift, apply
\noderef{DecimalSeqRightShiftRecordSemantics}.  If its reset alternative
holds, its three record equalities are literally the first disjunct required
by the theorem.  Otherwise it supplies $\rho_R\ge0$ with
\[
 V(d')=V(d)/2^k-\rho_R,\qquad
 d'.\mathit{truncated}\Longleftrightarrow
 d.\mathit{truncated}\ \text{or}\ \rho_R>0.              \tag{4}
\]
Now apply \noderef{PositiveScaleErrorTransport} with the positive scale
$s=1/2^k$ and define
\[
 \eta'=\rho_R+\eta/2^k,\qquad u'=\rho_R+u/2^k.
\]
It yields
\[
 X/2^k=V(d')+\eta',\quad0\le\eta'<u',\quad
 V(d')+u'=(V(d)+u)/2^k,                                  \tag{5}
\]
and $\eta'>0$ iff $\rho_R>0$ or $\eta>0$.  Combining this equivalence with
(4) and the input truncation equivalence proves the required returned
truncation clause.  Finally, the three comparison equivalences furnished by
the same transport lemma are, after rewriting multiplication by $1/2^k$ as
division by $2^k$, precisely the right-shift equivalences displayed in the
statement.  Thus (5) and those equivalences complete the nonreset disjunct.
\end{proof}
