\begin{theorem}
For every source-valid nonempty Rust byte slice in the sense of
\noderef{SourceValidByteSlice}, if \texttt{parse_number} returns normally with
\texttt{Some} record $d$, then $d.\mathit{negative}=\texttt{false}$ and
$d.\mathit{mantissa}<10^{19}$.
\end{theorem}
\begin{proof}
The strict endpoint required by \texttt{GOAL.md} is $10^{19}$.  Put
$L=|s|$.  By \noderef{SourceValidByteSlice}, $L\leq2^{63}-1$, and
\noderef{Assumptions} fixes both modeled pointer-sized widths at 64 bits;
the nonemptiness premise also discharges the initial nonempty assertion in the
partial parser.  First unfold
\noderef{num_imp_dec2flt_parse_parse_number}.  Its only route to
\texttt{ok (some }$d$\texttt{)} is that
\noderef{num_imp_dec2flt_parse_parse_partial_number} returned
\texttt{ok (some }$(d,\ell)$\texttt{)} and that the final test established
$\ell=L$.  The former definition constructs $d$, and the latter definition
only tests $\ell$ and returns the same record.  It therefore suffices to bound
every record literal in \texttt{parse\_partial\_number}.

We first establish the exact invariant of the digit scanner
\noderef{num_imp_dec2flt_parse_try_parse_digits}.  This requires checking its
eight-byte decoder rather than assuming that its wrapping accumulator denotes
base-ten arithmetic.

Suppose the eight-byte loop is on its continuing branch.  Its length guard is
$8\leq|t|$.  Thus the prefix operation in
\noderef{SliceU8_Insts_Dec2flt_modelNumImpDec2fltCommonByteSlice_read_u64}
is in bounds, the source and destination of \texttt{copy\_from\_slice} both
have length eight, and \texttt{from\_le\_bytes} returns
\[
 v=\sum_{j=0}^{7} b_j2^{8j}
\]
for the next bytes $b_0,\ldots,b_7$ in source order.  The loop later takes the
suffix at index eight under the same guard, so it removes exactly these bytes.

The test \noderef{num_imp_dec2flt_common_is_8digits} has constants
\texttt{0x4646464646464646}, \texttt{0x3030303030303030}, and
\texttt{0x8080808080808080}; its conjunction and disjunction have the bounded
word meanings in \noderef{U64_Insts_CoreOpsBitBitAndU64U64},
\noderef{U64_Insts_CoreOpsBitBitOrU64U64},
\noderef{ModelU64BitAnd}, and \noderef{ModelU64BitOr}.  To rule out false
positives, let $c_j$ be the carry into byte $j$ of the wrapping addition by
\texttt{0x46} in every byte, and let $r_j$ be the borrow into byte $j$ of the
wrapping subtraction by \texttt{0x30} in every byte.  Both initial values are
zero.  Acceptance says that every result byte of both words has zero high bit,
because the high-bit mask of their OR is zero.  Inducting from the low byte in
the subtraction, if $r_j=0$ and $b_j<48$, its result is
$b_j-48+256\in[208,255]$, a contradiction.  Hence $b_j\geq48$, the outgoing
borrow is zero, and the zero high bit of $b_j-48$ also gives $b_j\leq175$.
Inducting through the addition next, if $c_j=0$ and $b_j\geq58$, then the
established upper bound gives $b_j+70\in[128,245]$, again a contradiction.
Thus $b_j\leq57$, and $b_j+70\leq127$ gives zero outgoing carry.  Consequently
the test returns true only if
\[
 b_j=48+d_j\quad\hbox{with}\quad0\leq d_j\leq9
 \qquad(0\leq j<8).
\]
Conversely these inequalities make all carries and borrows zero and both
high-bit tests zero, so every eight-digit block is accepted.

Now unfold \noderef{num_imp_dec2flt_parse_parse_8digits}.  Its checked
subtraction of $3472328296227680304=\texttt{0x3030303030303030}$ has no
borrow and gives
$v'=\sum_jd_j2^{8j}$.  In particular
$v'\leq\texttt{0x0909090909090909}<2^{60}$.  Hence the checked product
$10v'<10\cdot2^{60}<2^{64}$, the signed-count shift by eight is defined
because $0\leq8<64$, and the checked sum
\[
 q=10v'+(v'\mathbin{\mathtt{>>>}}8)
   <10\cdot2^{60}+2^{52}<2^{64}
\]
succeeds.  There is no byte carry in this displayed sum: byte $j$ is
$10d_j+d_{j+1}$ for $0\leq j<7$, and byte seven is $10d_7$; all are at most
$99$.

The three extracted constants are, by
\noderef{num_imp_dec2flt_parse_parse_8digits_MASK},
\noderef{num_imp_dec2flt_parse_parse_8digits_MUL1}, and
\noderef{num_imp_dec2flt_parse_parse_8digits_MUL2},
\[
 \begin{split}
 M&=1095216660735=\texttt{0x000000ff000000ff},\\
 M_1&=4294967296000100=100+10^6 2^{32},\\
 M_2&=42949672960001=1+10^4 2^{32}.
 \end{split}
\]
The signed-count shift by sixteen is defined for the same reason as the shift
by eight.  Therefore the two masked words are
\[
 a=A+B2^{32},\quad b=C+D2^{32},
\]
where
\[
 A=10d_0+d_1,\ B=10d_4+d_5,\quad
 C=10d_2+d_3,\ D=10d_6+d_7.
\]
The next operations are deliberately wrapping.  Reduction modulo $2^{64}$
of their complete products, including the discarded multiples of $2^{64}$,
gives
\[
 \begin{split}
 aM_1&\equiv100A+(10^6A+100B)2^{32}\pmod {2^{64}},\\
 bM_2&\equiv C+(10^4C+D)2^{32}\pmod {2^{64}}.
 \end{split}
\]
Here $A,B,C,D\leq99$.  The low-word sum is
$100A+C\leq9999<2^{32}$ and the high-word coefficient is at most
$10^6\cdot99+100\cdot99+10^4\cdot99+99=99999999<2^{32}$.
Thus their wrapping addition has no further wrap.  The signed-count shift by
$32$ is defined, and its result is exactly
\[
 10^6A+10^4C+100B+D
 =10^7d_0+10^6d_1+\cdots+10d_6+d_7<10^8.
\]
This lies below $2^{32}$, so the checked cast to \texttt{u32} succeeds and
the final widening cast to \texttt{u64} preserves it.  We have proved that
\texttt{parse\_8digits} returns the ordinary base-ten value of every guarded
accepted block, with all checked products, sums, shifts, and casts accounted
for.

It follows by induction on the two loops of
\noderef{num_imp_dec2flt_parse_try_parse_digits} that, as long as the
ordinary value obtained by appending all consumed digits is below $10^{19}$,
the returned accumulator is that ordinary value and the returned slice is the
suffix beginning at the first nondigit.  For the eight-byte step just proved,
the new ideal value is $10^8x+B$ with $0\leq B<10^8$; for the scalar step,
wrapping subtraction classifies a byte as a digit exactly when it is
$48+e$, $0\leq e<10$, the byte-to-\texttt{u64} cast is exact, and the new
ideal value is $10x+e$.  Every intermediate ideal prefix is no larger than
the final nonnegative value.  Since
\[
 10^{19}=10000000000000000000<2^{64}=18446744073709551616,
\]
the wrapping multiplications and additions in both loop bodies coincide with
these ordinary updates.  The bulk suffix at eight and each scalar index and
count increment are guarded by the current length; the final scalar suffix is
taken at a count no greater than that length.  This proves the invariant and
all its slice obligations.

Apply that invariant to the two calls made by
\texttt{parse\_partial\_number}.  Let $I$ be the consecutive initial digit
sequence, let $F$ be the consecutive sequence after byte $46$ if that byte
immediately follows $I$ (and the empty sequence otherwise), and put
$D=|I|+|F|$.  Here the optional-point test uses the exact empty-versus-head/tail
decomposition of \noderef{ModelSliceSplitFirst}.  The two returned slices and
\noderef{SliceU8_Insts_Dec2flt_modelNumImpDec2fltCommonByteSlice_offset_from}
show that \texttt{n\_digits1} is exactly $D$: both suffix lengths are at most
$L\leq2^{63}-1$, and the 64-bit widths from \noderef{Assumptions} show that the
\texttt{usize}-to-\texttt{isize} casts and their
nonnegative differences are in range; the optional fractional negation and
cast to \texttt{i64} are also in range.  The two digit runs are disjoint
subranges of the input, so $D\leq L$ and the checked addition forming
\texttt{n\_digits1} also succeeds.  If $D\leq19$, the concatenation
$IF$ has at most nineteen digit positions, so its ordinary value is at most
$10^D-1\leq10^{19}-1$.  The scanner invariant proves
\texttt{mantissa1}$<10^{19}$ in every such branch.

Suppose instead that $D>19$.  In
\noderef{num_imp_dec2flt_parse_adjust_many_digit_count}, start from $D-19$.
While its scanning flag is true, byte $46$ subtracts
$\operatorname{sat}(46-47)=0$, byte $48$ subtracts
$\operatorname{sat}(48-47)=1$, and the scan index advances by one; the first
other byte changes the flag to false without changing either the count or
index, and the next loop step returns.  Let $z$ be the number of leading zero
digits of $IF$, taking $z=D$ if every digit is zero.  Ignoring the optional
point, if $IF$ has a nonzero digit, the scan visits exactly those $z$ zeros
and the intervening optional point, then stops at that first nonzero; its
result is exactly $D-19-z$.  If every digit of $IF$ is zero, the scanner has
already accumulated the value zero.  It may continue over later zero or point
bytes that the partial parser did not include in $IF$, but each such step can
only decrease the adjustment further and cannot alter \texttt{mantissa1}.
All accesses and increments are guarded by $L$.  Since $D>19$, the initial
count is at least one and at most $L-19$; at most $L$ zero bytes can be
subtracted, so every count is at least $1-L\geq1-(2^{63}-1)$ and at most
$2^{63}-1$.  By the 64-bit signed range supplied by
\noderef{Assumptions}, every checked signed subtraction succeeds.

If this adjusted value is nonpositive and all digits of $IF$ are zero, then
\texttt{mantissa1}$=0$ immediately.  Otherwise the exact formula above gives
$D-z\leq19$.  Before the first nonzero digit, every scalar or eight-byte
update appends only zeros to accumulator zero.  From that digit onward there
are at most nineteen positions, including internal and trailing zeros.  Hence
the full ordinary value of $IF$ is at most $10^{19}-1$, and the same scanner
invariant gives \texttt{mantissa1}$<10^{19}$ even though $D$ itself exceeds
nineteen.  Conversely, an adjusted-positive outcome is impossible in the
all-zero case; in the other case its exact value $D-19-z>0$ gives
$D-z\geq20$.

It remains to bound the adjusted-positive retry.  By
\noderef{num_imp_dec2flt_parse_MIN_19DIGIT_INT}, the guard in
\noderef{num_imp_dec2flt_parse_try_parse_19digits} is exactly $10^{18}$.
At a loop head with $x<10^{18}$, \noderef{ModelSliceSplitFirst} says that
splitting an empty slice yields no head and stops, while a nonempty slice is
decomposed into exactly its head and tail; a
nondigit stops after the total wrapping byte subtraction.  For a digit
$e\in[0,9]$, the checked operations satisfy
\[
 x\cdot10\leq(10^{18}-1)10<2^{64},\qquad
 x\cdot10+e\leq10^{19}-1<2^{64}.
\]
The byte cast is exact.  After this update the next guard either permits
another such step or stops because the value has reached $10^{18}$.  Thus a
scan begun with any $x<10^{18}$ returns a value below $10^{19}$; all guarded
splits, checked multiplications, additions, and casts in the loop have been
discharged.

Unfold \noderef{num_imp_dec2flt_parse_parse_many_digits}.  Its first
nineteen-digit scan starts at zero, so it returns $m<10^{19}$.  If
$m\geq10^{18}$, the function retains $m$; its offset operation can affect only
the exponent.  Both involved suffix lengths are at most $L$, so their casts
are in range by \noderef{Assumptions}, and their checked difference lies
between $-(2^{63}-1)$ and
$2^{63}-1$.  If $m<10^{18}$, the function takes the suffix at index one and
scans again from initial value $m$.  As just proved, the positive-adjustment
condition implies $D-z\geq20$.  If the first scan returned below $10^{18}$,
it cannot have
reached nineteen positions beginning with the first nonzero digit: after
exactly nineteen such positions their decimal value is at least $10^{18}$.
Nor can it have reached the final nondigit or end before those positions,
because $D-z\geq20$.  It must therefore have stopped at the optional point;
the saved integer-end slice begins with that point, so taking its suffix at
one is in bounds and starts exactly at the fractional digits.  The second
scan begins with $m<10^{18}$ and therefore returns $m'<10^{19}$ by the
preceding invariant.  Its suffix offset is nonnegative and at most $L$, its
negation lies in $[-(2^{63}-1),0]$, and the \texttt{isize}-to-\texttt{i64}
cast is exact.  The later checked addition of the explicit scientific
exponent may fail on very long inputs, but a record-producing execution is by
hypothesis successful; that addition changes only the exponent and cannot
change $m'$.  Consequently either return route of
\texttt{parse\_many\_digits} has mantissa below $10^{19}$, including the
initial scan, the one-byte-skip retry, and every offset, slice, cast, and
checked arithmetic operation relevant to reaching its result.

We can now exhaust the syntax of
\noderef{num_imp_dec2flt_parse_parse_partial_number}.  By the exact
empty-versus-head/tail semantics of \noderef{ModelSliceSplitFirst}, both its
optional-point handling and its later scientific-suffix inspection preserve
the actual first byte and remaining suffix.  Consequently, after the optional
point handling, splitting the remaining suffix has exactly four cases:
no byte; byte $101$; byte $69$; or a byte different from both.  The middle
two invoke \noderef{num_imp_dec2flt_parse_parse_scientific}.  At the ensuing
try-control-flow step, \noderef{ModelOptionBranch} maps \texttt{some val} to
successful \texttt{Continue val}, which can reach a record literal, whereas it
maps \texttt{none} to successful \texttt{Break none}; then
\noderef{ModelOptionFromResidual} converts that sole residual to successful
\texttt{none}.  Thus the Break route cannot produce the hypothesized $d$, and
the continued value is used only in exponent arithmetic.  In each of the four
cases the definition then
has exactly these three record-producing alternatives:
\[
\begin{array}{c|c|c}
\text{digit-count alternative}&\text{mantissa field}&\text{negative field}\\ \hline
D\leq19&\texttt{mantissa1}&\texttt{false}\\
D>19,\ \text{adjusted count}>0&\texttt{parse\_many\_digits result}&\texttt{false}\\
D>19,\ \text{adjusted count}\leq0&\texttt{mantissa1}&\texttt{false}.
\end{array}
\]
This table applies separately to the no-suffix, lower-case scientific,
upper-case scientific, and other-suffix branches, so it covers all twelve
displayed record literals.  The first and third mantissas are below
$10^{19}$ by the scanner arguments; the middle mantissa is below $10^{19}$ by
the retry argument.  Every literal visibly assigns
\texttt{negative := false}.  By the extracted structure type
\noderef{num_imp_dec2flt_decimal_Decimal}, each displayed literal's
\texttt{negative} and \texttt{mantissa} fields are exactly the projections
$d.\mathit{negative}$ and $d.\mathit{mantissa}$ in the theorem.  Final
consumed-length offsets and casts may
affect only the paired length, and scientific parsing and exponent additions
may affect only the exponent.  Therefore the record $d$ passed unchanged
through \texttt{parse\_number} satisfies both asserted conjuncts.
\end{proof}
