\begin{lemma}[Safe complete partial-number parsing]
Every source-valid nonempty Aeneas byte slice that is exactly the rendering
of an unsigned valid numeric lexeme and has length at most
$9223372036854120458$ makes the extracted
\texttt{parse\_partial\_number} return normally with a decimal record and a
consumed length equal to the full slice length.
\end{lemma}
\begin{proof}
Put $M=2^{63}-1$, $C=9223372036854120458=M-655349$, and $L=|s|$.  The
definitions in \noderef{DecimalGoalVocabularyDefault}, together with the
validity, unsigned-sign, and rendering hypotheses, decompose the input into
an integer digit list, an optional point and fractional digit list, and an
optional exponent marker, sign, and nonempty exponent digit list.  Every
	digit byte is in $[48,57]$, and at least one significand digit is present.
	The separate premise \noderef{SourceValidByteSlice} is consistent with the
	stronger bound $L\leq C<M$.  By \noderef{Assumptions}, the configured target
	has 64-bit \texttt{usize}, \texttt{isize}, and \texttt{i64} ranges.

Apply \noderef{NumberHelperDigitScanSafeLength} first to the integer digit
prefix, taking the following point, exponent marker, or end as its tail.
The tail's first byte, if present, is not a digit, so the result is normal
and its remainder is exactly that tail.  The offset operation in
\noderef{SliceU8_Insts_Dec2flt_modelNumImpDec2fltCommonByteSlice_offset_from}
casts the lengths of the original slice and this suffix to \texttt{isize}
and subtracts.  Both lengths are between zero and $L<M$, so the casts and
nonnegative difference succeed and give the integer digit count $I$.

If a point is present, its removal is guarded by the preceding split.  Apply
\noderef{NumberHelperDigitScanSafeLength} again to the fractional digits;
its exact remainder is the exponent marker or end.  Its offset similarly
gives a fractional count $F\leq L$.  Checked negation of $F$ is safe, its
cast to \texttt{i64} is exact on this 64-bit target, and the checked addition
$I+F$ is the total significand count $D\leq L$.  Validity gives $D>0$, so
the extracted zero-digit rejection in
\noderef{num_imp_dec2flt_parse_parse_partial_number} is not taken.

If there is an exponent marker, the saved suffix is exactly an optional
sign followed by its nonempty digit list.  Applying
	\noderef{NumberHelperScientificSuffixSafeLength} yields a normal
	\texttt{Some} result $E$, empty remainder, and $|E|\leq655359$.  Let $q$ be
	the exponent digit count.  The guarded decimal recurrence in
	\noderef{num_imp_dec2flt_parse_parse_scientific} also gives
	$|E|\leq10^q-1$ when $q\leq5$.  We verify the checked addition $-F+E$.
For $E\geq0$ it lies between $-L$ and $655359$.  For $E<0,F=0$ it is at
least $-655359$.  For $E<0,F>0$, the spelling includes the point, marker,
mandatory minus, and $q$ digits, hence $F\leq L-(q+3)$.  Therefore
\[
 F+|E|\leq
 \begin{cases}
 L-(q+3)+(10^q-1)\leq L+99991,&q\leq5,\\
 L-(q+3)+655359\leq L+655350,&q\geq6.
 \end{cases}
\]
Since $C+655350=2^{63}$, the sum is never below the allowed endpoint
$-2^{63}$, and its upper side is below $2^{63}$.  The explicit-exponent
addition therefore succeeds.  With no marker, $E=0$ and no additional
operation is required.  In both cases the final suffix is empty, so its
offset from the original input casts exactly to \texttt{Slice.len s}.

For $D\leq19$ the extracted function now constructs its decimal record
directly.  Suppose $D>19$.  Its checked subtraction of $19$ is safe.  In
\noderef{num_imp_dec2flt_parse_adjust_many_digit_count}, every byte access is
index-guarded and every index increment remains at most $L$.  The constant
subtraction is $48-1=47$; saturating subtraction by $47$ yields zero for a
point and one for a zero digit, both exactly castable to \texttt{isize}.
If $z$ is the number of leading zero significand digits, ignoring the point,
induction through this scan shows its final adjusted count is $D-19-z$ and
all intermediate counts are at least $-19$ and at most $L$.  Thus all
checked signed subtractions succeed.  A positive result implies
$D-z\geq20$, so a nonzero significand digit exists and at least twenty
digits remain from it; a nonpositive result causes no retry.

In a retry, \noderef{num_imp_dec2flt_parse_MIN_19DIGIT_INT} is exactly
$10^{18}$.  The loop
\noderef{num_imp_dec2flt_parse_try_parse_19digits} updates only while its
accumulator is below this threshold, so every checked update is at most
$10(10^{18}-1)+9=10^{19}-1<2^{64}$.  All byte casts and first-byte splits
are exact or guarded.  If the first retry reaches the threshold, its offset
to the saved integer end is nonnegative and at most $L$.  If it returns
below the threshold, it cannot have consumed nineteen digits beginning at
the established nonzero digit, since their exact recurrence is then at
least $10^{18}$.  It must therefore have stopped at the saved point.  The
one-byte slice past that point is in bounds, and the second retry consumes
at most the $F$ fractional digits.  Its negated offset base is consequently
in $[-F,0]$.

It remains to audit the final additions in
\noderef{num_imp_dec2flt_parse_parse_many_digits}.  In its nonnegative
integer-offset branch, no explicit exponent leaves a base at most $L$, and
a negative exponent lowers it by at most $655359$.  For a positive
$q$-digit exponent, nineteen digits plus the marker and exponent digits lie
outside the remaining offset; the sum is at most $L+99974$ for $q\leq5$
and at most $L+655333$ for $q\geq6$, hence below $2^{63}$ at $L\leq C$.
In the fractional branch the base is in $[-F,0]$; its upper side is at most
$655359$, and its lower side is protected by the already proved
$F+|E|\leq2^{63}$.  Every retry path therefore returns normally.

All assertions, checked arithmetic, casts, offsets, slices, and parser loops
have now been discharged.  The rendering occupies the whole input, so the
exact digit-scan and scientific-suffix remainders show that the final suffix
is empty.  The partial parser consequently returns \texttt{Some} of its
constructed decimal record with consumed length exactly
\texttt{Slice.len s}, as claimed.
\end{proof}
