\begin{lemma}[Exact significand word after an independently bounded fold]
Let $s,s_1,s_2$ be byte slices, $m_0,m$ U64 words, $f$ an Isize
and $e$ an I64. Let $I,F,T,p$ satisfy the same significand shape as
in the Lean statement: $s=I++[46]++F++T$ and $s_1=[46]++F++T$
when $p$ is true; $s=I++T$, $s_1=T$, and $F=[]$ otherwise.
Require digit ranges $[48,57]$ for $I,F$, a nondigit head for $T$,
and, when $p$ is false, a head different from 46 for $T$.
Assume $|s|\le2^{63}-1$, the natural byte-decimal fold
$v(I++F)\le\texttt{U64.max}$, and these two actual normal equations:
the integer digit scan from zero returns $(s_1,m_0)$; the extracted
optional-fraction block starting from $(s_1,m_0)$ returns
$(s_2,m,f,e)$. That block is the split-first, optional digit scan,
offset, checked negation and I64 cast displayed in Lean.
Then $m.\mathit{val}=v(I++F)$.
\end{lemma}
\begin{proof}
Write $K(a,b)=10a+(b.\mathit{val}-48)$.
Every update satisfies $a\le K(a,b)$ in the naturals, independently
of the byte range. Induction on a list proves
$a\le\operatorname{foldl}(K,a,L)$. In particular
$v(I)\le v(I++F)\le\texttt{U64.max}$ by the fold-over-append identity.
The tail after $I$ is nondigit-headed: either it starts with 46, or
it is $T$. Apply \noderef{NumberHelperDigitScanExact} to $s$, initial
word zero, run $I$ and that tail. Its length premise is assumed and
its fold bound is the one just proved. It returns a normal scan whose
word has value $v(I)$. Equality with the assumed actual scan and
injectivity of Result and pairs identify this word with $m_0$.

If $p$ is false, \noderef{ModelSliceSplitFirst} on $s_1=T$ either
returns None or exposes a non-46 head. Thus the optional-fraction
block takes its unchanged branch and returns
$(s_1,m_0,0,0)$. Equality with the assumed normal block result gives
$m=m_0$. Since $F=[]$, the desired fold is $v(I)$.

If $p$ is true, the split-first equation in
\noderef{ModelSliceSplitFirst} removes its 46 head and gives the
slice $u$ with contents $F++T$. This slice is legitimate and has
length at most $|s|$, by the assumed decomposition. Apply
\noderef{NumberHelperDigitScanExact} to $u$, initial word $m_0$,
run $F$ and tail $T$. Its final natural fold is
$\operatorname{foldl}(K,v(I),F)=v(I++F)$, already bounded by U64.max;
the digit and stopping conditions are assumed and the source-length
bound follows from $|u|\le|s|$.
Substitute this exact normal scan into the optional-fraction block.
It only measures an offset, negates it and casts it after the scan;
none of these operations changes its word. Inverting the assumed
normal block equation excludes failure or divergence at each of
these binds and identifies its returned word with the exact scan
word. This proves the desired value equation. No no-fail claim for
these later operations is needed independently of their given normal
block result, and no wrapping-scan equality was used before its fold
bound was established.
\end{proof}
