\begin{lemma}[Safe bounded many-digit adjustment]
Let \(s\) be an Aeneas byte slice of length at most
\(9223372036854775807\), and let \(n\) be a nonnegative
\texttt{isize} whose value is at most \(|s|\).  The extracted
\texttt{adjust\_many\_digit\_count} operation returns normally.
\end{lemma}
\begin{proof}
Unfold the loop in
\noderef{num_imp_dec2flt_parse_adjust_many_digit_count}.  At a loop head
with count \(c\) and scan index \(j\), maintain
\[
 0\leq j\leq |s|,\qquad n-j\leq c\leq n.
\]
Use the lexicographic natural measure encoded by
\(2(|s|-j)+1\) while scanning and \(2(|s|-j)\) after scanning stops.

Every byte access is guarded by \(j<|s|\).  A point byte advances the
index and subtracts zero, because \(48-1=47\) and saturating subtraction
of 47 from 46 is zero.  A zero digit advances the index and subtracts one,
because saturating subtraction of 47 from 48 is one.  Both byte values cast
exactly to \texttt{isize}.  In the first branch the new count remains above
\(n-(j+1)\); in the second it is exactly one less and again remains above
that lower bound.  A different byte changes the scanning flag from true to
false without changing the index, which decreases the parity part of the
measure; the next iteration returns.  Reaching the end also returns.

Throughout the loop, \(-|s|\leq c\leq n\leq |s|\).  By
\noderef{Assumptions}, the configured \texttt{isize} and \texttt{usize}
widths are 64 bits, and the assumed length is at most \(2^{63}-1\).
Consequently both possible signed subtractions and every guarded index
increment succeed.  The measure decreases on every continuing branch, so
the loop terminates normally and supplies the claimed result.
\end{proof}
