\begin{lemma}[On-normal partial lexical certificate and consumed length]
Let $s$ be any nonempty byte slice with $|s|\le A=3458764513820540928$.
Suppose the actual partial-number function returns $\texttt{ok}(o)$.
For every $o=\texttt{some}(d,k)$ there are an unsigned valid numeric
lexeme $x$ and a byte list $R$ such that
\[
\texttt{bytes}(s)=\texttt{renderNumeric}(x)++\operatorname{map}(\mathit{val},R),
\qquad k.\mathit{val}=|\texttt{renderNumeric}(x)|.
\]
The residual $R$ is empty or nondigit-headed. If $x$ has no exponent,
its residual head, if present, is neither 69 nor 101, and is also not
46 when $x$ has no fractional part. Conversely, for every $x,R$
satisfying exactly these conditions, the given normal result is
$\texttt{some}(d,k)$ for some $d,k$, with that same consumed-length
equation. Validity and rendering here are those of
\noderef{DecimalGoalVocabularyDefault}, and unsigned means no leading
sign. This is a prefix certificate, including its maximality guards,
not a normality theorem and not a claim about the Decimal's numerical
fields. In particular, after an exponent is present the residual may
start with another marker or point, provided it is a nondigit.
\end{lemma}
\begin{proof}
We first identify the source's lexical path independently of the
Decimal record it eventually selects. Apply
\noderef{P364_T1_NumberHelperDigitPrefix} to the source contents to
obtain their maximal integer digit run $I$ and remaining list $T_1$.
If $T_1$ starts with 46, remove that head and apply the same theorem
to the remaining list to obtain $F,T_2$; mark the fraction present.
Otherwise set $F=[]$, $T_2=T_1$, and mark the fraction absent.
In this latter case a nonempty $T_2$ has head different from 46.
These lists satisfy every hypothesis of
\noderef{P435_T1_SignificandScanA}: the source decomposition,
integer/fraction digit ranges, nondigit-headed $T_2$, the absent-point
guard, and the original A bound. That theorem gives the actual
normal scan and optional-fraction-block equations, the saved integer
end, the significand end with contents $T_2$, and exact count
$D=|I|+|F|$. It also gives the base exponent $-|F|$.
The initial nonempty assertion succeeds because of the hypothesis
$s.\mathit{val}\ne[]$; it imposes no grammar condition.

Substitute these equations in
\noderef{num_imp_dec2flt_parse_parse_partial_number}. If $D=0$, the
source returns None, so a given Some output is impossible. Otherwise
\noderef{ModelSliceSplitFirst} either finds an empty $T_2$, exposes a
head other than 69 and 101, or exposes one of those markers. In the
first two cases choose no exponent and final residual $R=T_2$.
In the marker case remove the marker and apply
\noderef{P367_T1_NumberHelperScientificScan} to its actual suffix
slice. It provides optional sign $\sigma$, maximal digit run $J$,
final residual $R$, and a normal optional exponent. The exponent is
None exactly when $J=[]$. By \noderef{ModelOptionBranch} and
\noderef{ModelOptionFromResidual}, this case returns None from the
partial parser; otherwise it continues with the returned exponent.
The scientific theorem validates the entire maximal digit run, with
no digit-count restriction, even after the pre-update $2^{59}$ fold
stops changing its value. These steps describe both and only the
syntactic None exits of the partial source: zero significand count
and a present marker without any exponent digit.

Every remaining source arm computes the offset of its final residual
from the original $s$, casts that offset to Usize, and then selects a
record. The residual is a suffix by the decompositions just obtained,
so its length is at most $|s|\le A<2^{63}-1$.
\noderef{P364_T1_NumberHelperOffsetSourceLength} supplies the actual
offset with value $|s|-|R|$. This lies between zero and $A$.
The selected 64-bit binding in \noderef{Assumptions} identifies
Usize's maximum as $2^{64}-1$; therefore the signed-to-unsigned
reinterpreting cast is exact on this nonnegative in-range value.
Consequently every continued record has $k.\mathit{val}=|s|-|R|$.
Inspection of all four source suffix arms (empty, lowercase marker,
uppercase marker, other head) shows the same saved length in each
retained and retry constructor. Adjustment and retry only select and
compute record fields. They have Result-valued outputs, not optional
outputs, and do not supply an additional None constructor.

This last observation uses the given normal result correctly: if a
reached checked arithmetic operation, adjustment, or retry failed or
diverged, the Result bind would propagate that outcome, contradicting
$\texttt{ok}(o)$. On any normal continuation, their outputs lead to
one of the explicit Some constructors, preserving the saved length.
We do not infer normality from valid grammar, nor assume a mantissa
bound. Normality is a separate obligation; here it is the premise
that makes this purely lexical, on-normal certificate applicable.

For the forward assertion, a Some output therefore has $D>0$ and
a nonempty $J$ whenever a marker was scanned. Use
\noderef{P435_T1_DigitDecoding} on $I,F,J$. Their decoded natural
lists have digits below ten, and reencoding recovers exactly their
byte-value maps. Construct $x$ from those lists, with no leading
sign, fraction present exactly when the point was consumed, and
exponent present exactly when a marker was consumed, retaining its
upper/lower case and optional sign. The positive count makes at
least one of $I,F$ nonempty; their decoded lengths are unchanged.
The exponent list, when present, is nonempty. Thus all four validity
clauses in \noderef{DecimalGoalVocabularyDefault} hold, including
the allowed empty integer or empty fraction alternatives.
Map the source decomposition to values and use the reencoding
equations to obtain $\texttt{bytes}(s)=\texttt{renderNumeric}(x)++
\operatorname{map}(\mathit{val},R)$. Its length equation gives
$|\texttt{renderNumeric}(x)|=|s|-|R|=k.\mathit{val}$.
The residual is nondigit-headed by the scan theorems. With no exponent,
its marker guards are exactly the source's nonmarker branch conditions;
with neither exponent nor fraction its point guard is the earlier
absent-point branch condition. This proves every forward clause.

For the reverse assertion, take any stated $x,R$. Apply
\noderef{P435_T1_RenderedDigitBlocks} to the given prefix-rendering
equality, with $B=s.\mathit{val}$ and remainder $R$, to obtain actual
byte blocks for its integer, fraction, and exponent digits. Its
integer block is maximal: the next byte is 46 when a fraction is
present, 69 or 101 when only an exponent follows, or the nondigit
head of $R$ or end otherwise. By
\noderef{P435_T1_DigitPrefixUnique} it is exactly the actual $I$.
When the fraction is absent there cannot be a guarded point: an
exponent marker is not 46, and with no exponent the hypothesized
residual point guard excludes 46. When present, the forced 46 is
consumed and its fractional block is maximal, since its following
byte is an exponent marker or the nondigit head of $R$ or end.
The uniqueness lemma identifies that block with the actual $F$.
Thus the actual point-presence choice and both digit runs match $x$.
Validity gives $D>0$, so the zero-count None exit is excluded.

If $x$ has no exponent, the identified significand end has contents
$T_2=R$. By \noderef{ModelSliceSplitFirst}, an empty $R$ takes the
empty arm; otherwise its head is neither 101 nor 69 by the given
residual marker guards, so it takes the other-head arm. Neither arm
makes a scientific call, and both use that same residual slice.

If $x$ has an exponent, write $c$ for its rendered marker and
$\sigma_x$ for its rendered optional sign. The byte-block equation
from \noderef{P435_T1_RenderedDigitBlocks}, together with the
integer and fraction identifications above, gives the actual
significand-end contents
\[
T_2=[c]++\operatorname{signBytes}(\sigma_x)++J++R.
\]
Here $c=101$ for lower case and $c=69$ for upper case. Applying
\noderef{ModelSliceSplitFirst} to this actual slice returns precisely
$c$ and a suffix slice $u$ with
\[
u.\mathit{val}=\operatorname{signBytes}(\sigma_x)++J++R.
\]
Thus the lowercase branch of
\noderef{num_imp_dec2flt_parse_parse_partial_number} calls the
scientific parser on $u$ when $c=101$; when $c=69$, the first
comparison fails and the uppercase branch makes the identical call
on $u$. The sign bytes in this equation are empty, [43], or [45]
for absent, plus, or minus respectively, exactly as rendered in
\noderef{DecimalGoalVocabularyDefault}.

We check the scientific-prefix hypotheses on these specified bytes.
Every byte of $J$ lies in $[48,57]$, by the digit-range conclusion of
\noderef{P435_T1_RenderedDigitBlocks}. Its value-map equation is
the encoding of the exponent digits of $x$. Taking lengths of that
equation gives $|J|$ equal to their length; validity in
\noderef{DecimalGoalVocabularyDefault} makes this length positive,
so $J\ne[]$. The assumed condition on $R$ says separately that its
head, if present, lies outside $[48,57]$. Consequently $J$ is a
maximal digit prefix of $J++R$, including when $R$ is nonempty.
Finally the displayed equation for $u.\mathit{val}$ is the required
exact slice decomposition, not just an equality of byte values or
lengths. Apply \noderef{NumberHelperScientificPrefixSafeLength} to
this actual $u$, sign $\sigma_x$, digit list $J$, and tail $R$.
Its statement supplies an I64 exponent $e$ and slice $r$ such that
\[
\texttt{parse\_scientific}(u)=\texttt{ok}(\texttt{some}(e),r),
\qquad r.\mathit{val}=R.
\]
This application covers both leading signs and every allowed
nondigit-headed $R$; no empty-tail or exponent-digit-count restriction
has been added, and no unbounded exponent-fold exactness is used.
If the earlier application of
\noderef{P367_T1_NumberHelperScientificScan} names its result
$(v,r_0)$, equate its normal-return equation for this same $u$ with
the displayed equation. Injectivity of \texttt{ok} and of pairs gives
$v=\texttt{some}(e)$ and $r_0=r$. The None alternative is impossible
by disjointness of option constructors; in the Some alternative,
injectivity of Some identifies its exponent with $e$. Thus its
residual contents are also exactly $R$; we need not identify its
existential sign witness.
By \noderef{ModelOptionBranch}, the actual Some exponent takes
Continue with $e$, not Break, so the marker-without-digits None exit
is excluded in both marker cases.

We already have $D>0$, so neither syntactic None exit remains.
Keep the original premise $\texttt{parse\_partial\_number}(s)
=\texttt{ok}(o)$: any reached checked exponent addition, adjustment,
or retry must return normally, since failure or divergence would
propagate through its Result bind and contradict that premise.
Every normal continuation in the exhaustive source arms returns
Some $(d,k)$ with the saved length; it does not introduce another
optional rejection. In all cases its final residual has contents
$R$, whose length is at most $|s|\le A$. Applying
\noderef{P364_T1_NumberHelperOffsetSourceLength} to the original
slice and this residual gives offset value $|s|-|R|$. The exact
in-range Usize cast justified above therefore gives
$k.\mathit{val}=|s|-|R|$, and the given normal result is this Some.
Taking lengths of the original prefix-rendering equality yields
$|s|=|\texttt{renderNumeric}(x)|+|R|$ because both value maps preserve
length. Hence $k.\mathit{val}=|\texttt{renderNumeric}(x)|$, proving
the reverse assertion without asserting termination of the partial parser.
\end{proof}
