\begin{helper}[Exact maximal scalar digit scan]
Let a slice render a decimal digit list $D$ followed by a residual value list
$T$, where every digit of $D$ is below ten and $T$ is empty or begins with
point, lowercase exponent, or uppercase exponent.  Let $d$ be an input
decimal-sequence record and assume $d.\mathtt{num\_digits}+|D|$ is
Usize-representable.  Then the extracted scalar digit parser returns a slice
whose values are exactly $T$ and a record $d'$ such that:
\[
 d'.\mathtt{num\_digits}=d.\mathtt{num\_digits}+|D|,
\]
its point and truncation fields are unchanged, the stored cells below the old
count are unchanged, every cell from the old count up to the lesser of the new
count and 768 contains the corresponding member of $D$, and every cell at or
above that lesser count remains unchanged.
\end{helper}
\begin{proof}
Use the extracted scalar loop in
\noderef{num_imp_dec2flt_decimal_seq_parse_digits_into_seq} and the one-digit
record semantics of \noderef{DecimalSeqPrimitiveSemantics}.  At cursor $k$
maintain: $0\le k\le|D|$; the logical count is the old count plus $k$; point
and truncation equal their input values; the old stored prefix is unchanged;
the interval from the old count to
$\min(d.\mathtt{num\_digits}+k,768)$ contains exactly
\texttt{take $k$ $D$}; and all later cells below 768 retain their input
values.  The decreasing measure is $|D|-k$.

If $k<|D|$, the byte-list equation puts the cursor inside the rendered digit
prefix, so the checked slice index reads exactly $48+D[k]$.  The bound
$D[k]<10$ makes wrapping subtraction by 48 ordinary subtraction and makes
the digit test true.  The extracted \texttt{try\_add\_digit} increments the
logical count in all cases; below 768 its in-bounds array update writes
$D[k]$, while at or above 768 it leaves the array unchanged and sets
truncation exactly as stated by
\noderef{DecimalSeqPrimitiveSemantics}.  The assumed Usize sum justifies both
the record-count and cursor increments.  The list update law then establishes
each of the three cell regions for $k+1$.

When $k=|D|$, the cursor is at the end of the slice if $T$ is empty.  Otherwise
it reads the first residual byte.  The four allowed residual forms have value
46, 69, or 101; subtracting 48 modulo 256 produces a U8 value outside
$0,\ldots,9$, so the loop stops without consuming it.  In both cases the
range-from-$k$ wrapper returns exactly the residual slice.  Instantiating the
invariant at $k=|D|$ proves the count, field, exact-write, and outside-cell
claims.
\end{proof}
