\begin{definition}
A \emph{dispatcher contract package} consists of operations for sign stripping,
numeric and special lexical parsing, the native shortcut, checked increment of
the truncated mantissa, integer-tier conversion, raw-pair comparison and forced
deferral, the slow fallback, raw-pair assembly, and lexical-sign application.
It also has a relation saying when a parsed decimal record represents an
unsigned numeric lexeme and an explicit dispatcher-flow relation.  Source-valid
Rust strings, their byte lists, numeric and special grammars and classification,
decimal magnitudes, rounding targets, NaN and infinity predicates, raw-pair
assembly, and signed magnitudes have exactly the meanings in
\noderef{DecimalGoalVocabularyDefault}; source-valid byte-slice carriers have
the meaning in \noderef{SourceValidByteSlice}.

On the bytes of every source-valid Rust string, sign stripping has the following
exact behavior.  The empty byte list returns none.  A leading ASCII
\texttt{+} is removed and records the optional Boolean sign
$\operatorname{some}(\mathit{false})$, while a leading ASCII \texttt{-} is
removed and records $\operatorname{some}(\mathit{true})$; either case returns
none when the remainder is empty and otherwise returns that exact nonempty
remainder as the body.  Every other nonempty byte list is returned unchanged as
the body with no leading sign.  Failed sign stripping classifies the input as
invalid.  Successful sign stripping produces a nonempty body, the same optional
leading sign, and a source-valid Rust byte-slice carrier for exactly that body.
The original string's bytes are classified by a numeric lexeme $x$ exactly
when there is a valid unsigned lexeme whose rendering is the body and whose
complete record becomes $x$ upon replacing its absent leading sign by that
exact optional sign.  They are classified by a special kind with an optional
sign exactly when that sign is the stripped sign and the body is the
corresponding unsigned special literal.  Thus sign stripping preserves the
complete numeric, special, and invalid classification on precisely the
source-string domain: empty and sign-only inputs cannot invent a helper body,
whereas every other nonempty invalid input reaches the lexical helpers on the
exact body just described.

On every nonempty source-valid Rust byte slice, with no UTF-8 premise, numeric
completeness says that each valid unsigned numeric lexeme rendering the slice
has some returned record that represents it.  On that same nonempty domain,
per-result correctness says that a particular record is returned exactly when
it represents some such lexeme.  Special parsing is instead split into three
clauses on every source-valid Rust byte slice, including the empty slice.  Every
returned value is supported by an
unsigned special literal and is a NaN for \texttt{nan} or the infinity selected
by the separate sign argument for \texttt{inf} and \texttt{infinity}.
Conversely, each unsigned special literal has some returned value satisfying
its corresponding predicate; this existential does not choose one NaN
representation and equate it with all NaNs.  When there is no unsigned special
literal, the parser returns none.  A represented record is nonnegative,
has mantissa below $10^{19}$, and either denotes the input's accumulated-
exponent magnitude when no digits were truncated or brackets that diagnostic
magnitude between the values obtained from its mantissa and from mantissa plus
one.  A distinct target-preservation clause says that a nontruncated record has
the same rounding targets as the exact input and that agreement of the two
many-digit endpoint pairs gives an exact-input rounding target.

The native contract says that a successful shortcut is possible only without
truncated digits and is obtained by applying the package's sign operation to a
clear-sign binary64 magnitude rounding the record's value.  The integer-tier
contract says that its raw pair either has a negative biased exponent, denoting
deferral, or has biased exponent in $0\ldots2047$ and assembles to a clear-sign
rounding of the supplied $w10^q$.  Increment succeeds on every parser-bounded
mantissa and produces its mathematical successor.  Pair comparison is exact;
forced deferral preserves the mantissa and sets the biased exponent to $-1$.
On each source-valid byte slice, the slow contract assembles to a clear-sign
accumulated-value rounding of the full unsigned numeric lexeme; its distinct
target-preservation clause records the exact-input target required by
dispatcher composition.  Assembly has
exactly the specified raw-pair word, while the sign operation alone applies the
requested sign to a clear-sign magnitude.

On bytes of a source-valid Rust string, the flow relation is fixed, not chosen
independently.  It strips the optional leading sign and parses the nonempty
source-valid byte-slice body.  Numeric records have their sign
field overwritten by the lexical sign and first try the native shortcut.  On
deferral it calls the integer tier on the record exponent and mantissa.  Exactly
when digits were truncated and the first pair is nondeferred, it safely
increments the mantissa and makes the second integer-tier call; unequal pairs
force deferral and equal pairs retain the first.  A negative post-comparison
exponent selects the slow result on the unchanged body, otherwise the
post-comparison pair is retained.  The selected pair is assembled and only then
is the lexical sign applied.  Failure of numeric parsing instead invokes the
special parser, and failure of both lexical helpers is the invalid result.
\end{definition}
\begin{preservation}
\begin{claim}
The dispatcher contract package is an abstract interface whose laws use the
source-valid Rust-string domain for sign stripping and whole-dispatch flow,
the nonempty source-valid Rust byte-slice domain for the numeric helper, and
the full source-valid Rust byte-slice domain, including the empty slice, for
the special helper.  The slow-helper laws retain their stated source-valid
slice plus valid unsigned-numeric-rendering premises, which already entail
nonemptiness and are not strengthened here.
Its sign/body equation, flow equation, and separate helper operations have the
same branch order, call boundaries, and intermediate observations as the
frozen \texttt{f64} dispatcher.  The laws distinguish numeric completeness from
per-result correctness; special per-result soundness from existential
completeness and rejection; and record, target, native, integer, fallback,
assembly, and sign properties from one another.  These are conditions on every
package value, not claims already established for the extracted helpers.
Agreement of the actual helpers with a package, their normal returns, and their
satisfaction of all those laws remain precisely the separate
\texttt{dispatch\_component\_compliance} obligation.
\end{claim}
\begin{proof}
The meanings of source-valid strings and their bytes, grammar and
classification, decimal magnitudes, rounding observations, special values,
raw-pair assembly, and signed magnitudes are fixed independently by
\noderef{DecimalGoalVocabularyDefault}.  A Rust \texttt{str} is UTF-8 and has
length at most \texttt{isize::MAX}; after removal of at most one leading byte,
the remaining source subslice still satisfies the length bound.  Helper inputs
need not themselves be UTF-8.  This is exactly the distinction expressed by
\noderef{SourceValidByteSlice}.

The frozen source checks emptiness, removes at most one leading ASCII sign,
rejects a resulting empty body, calls the numeric parser before the special
parser, and then orders the native, integer, comparison/deferral, slow,
assembly, and sign stages as stated.  The adapted dispatcher records the same
body, guards, calls, and results, and the public function is the first
projection of that single traced computation.  The extracted body retains
those matches and calls and its assembly-trace structure retains the named
observations.  The exact excerpts, hashes, and reproduction commands are in
\evidenceref{reference/model-evidence/dispatch-contracts.txt}.  This evidence
justifies the interface's decomposition and the trace-preserving adaptation.
It does not establish any lexical or conversion helper specification merely
from the fact that a call occurs.

The invalid branch illustrates what follows from the abstract laws themselves.
Fix any package satisfying the displayed fields, a source-valid string $s$
classified as invalid, and suppose sign stripping succeeds with sign
$\mathit{sign}$ and body $\mathit{body}$.  The package's
\texttt{stripSign\_some} law supplies both $\mathit{body}\ne[]$ and a
source-valid body-slice witness whose bytes are exactly $\mathit{body}$,
together with the two classification equivalences.  The byte observation in
\noderef{DecimalGoalVocabularyDefault} maps every represented slice element
and therefore preserves list length.  Thus equality of the witness's observed
bytes with the nonempty $\mathit{body}$ implies that the witness's carrier list
is nonempty.  Because invalid classification in
\noderef{DecimalGoalVocabularyDefault} excludes every numeric and special
classification, those equivalences exclude both a valid unsigned numeric
lexeme rendering $\mathit{body}$ and an unsigned special-literal witness on
$\mathit{body}$.

Now case-split the package operation \texttt{parseNumber} on that body.  If it
were \texttt{some} of a record, \texttt{parseNumber\_spec}, applied to the
body-slice witness with the just-established nonemptiness premise, would
produce a valid unsigned numeric lexeme rendering that body, contradicting the
preceding exclusion.  Hence it is \texttt{none}.
The absence of an unsigned special witness and
\texttt{parseSpecial\_reject} then give \texttt{none} for the special parser at
the Boolean sign determined from $\mathit{sign}$.  Substitution in
\texttt{flow\_spec} gives the abstract invalid result.  If sign stripping is
\texttt{none}, \texttt{stripSign\_none} gives invalid classification and
\texttt{flow\_spec} gives the same abstract result directly.  Thus this
derivation holds for every package satisfying its laws; it neither proves a
normal return by the extracted dispatcher nor proves that the extracted
helpers satisfy those laws.

All remaining semantic clauses have the same status.  Numeric completeness is
separate from the per-result equivalence, and both range over exactly the
nonempty source-valid slice domain; special returned-value soundness,
per-literal existential completeness, and rejection are separate; and record,
exact-target, native, integer, slow, assembly, and sign facts are separate
package laws.  Consequently the package does not assume either dispatcher's
combined conclusion.  Establishing these laws for the concrete extracted
operations, and connecting their normal returns and trace observations to this
abstract flow, remains the unresolved concrete-compliance theorem.
\end{proof}
\begin{goalproof}{parser_totality}For a package satisfying the laws, \texttt{flow\_spec} exposes an output in every abstract branch on the full source-string domain.  This relational totality does not establish normal termination of the extracted dispatcher; that requires the separate concrete-compliance argument.
\end{goalproof}
\begin{goalproof}{parser_numeric_acceptance}For any law-satisfying package, successful sign stripping supplies a nonempty source-valid body-slice witness, so the sign/body classification equivalence and \texttt{parseNumber\_complete} place a valid numeric body in the numeric arm of the explicit flow.  Agreement and normal return of the extracted numeric parser and dispatcher remain concrete-compliance obligations.
\end{goalproof}
\begin{goalproof}{parser_invalid_rejection}For every package satisfying the laws, failed stripping selects the abstract invalid result directly.  After successful stripping, the explicit argument above obtains the numeric contract's nonempty body-slice premise from \texttt{stripSign\_some}, then uses invalid classification, the two classification equivalences, a case split on \texttt{parseNumber}, \texttt{parseNumber\_spec}, \texttt{parseSpecial\_reject} on its unchanged all-slices domain, and \texttt{flow\_spec} to obtain that same abstract result.  It does not assume that the concrete helpers comply or that the extracted dispatcher returns normally with \texttt{Err}.
\end{goalproof}
\begin{goalproof}{parser_nan_acceptance}Within a law-satisfying package, special completeness supplies some NaN result and \texttt{flow\_spec} returns it directly, without selecting a NaN representation in advance or invoking raw-pair assembly.  Concrete parser agreement is not supplied by this definition.
\end{goalproof}
\begin{goalproof}{parser_infinity}Within a law-satisfying package, special completeness supplies a directly returned infinity satisfying the separate lexical sign argument.  The corresponding behavior of the extracted helper remains to be established by concrete compliance.
\end{goalproof}
\begin{goalproof}{parser_non_nan_results}Special per-result soundness in a law-satisfying package distinguishes NaN from the two infinity spellings, while numeric results pass through separate conversion clauses.  Deriving the no-spurious-NaN conclusion and transferring it to the extracted dispatcher are not assumptions of this interface.
\end{goalproof}
\begin{goalproof}{parser_numeric_sign}The package interface gives the native helper the sign-overwritten record and separates all assembled magnitudes from the final sign operation exactly as the flow requires.  Its sign law is conditional package data, and concrete agreement remains a separate obligation.
\end{goalproof}
\begin{goalproof}{parser_signed_zero}The magnitude bounds and separate sign law of any satisfying package retain the distinction between positive and negative zero.  The interface does not assert that the extracted conversion tiers or negation satisfy those laws.
\end{goalproof}
\begin{goalproof}{parser_exact_rounding}For a law-satisfying package, exact rounding must be derived by composing record-target preservation with the selected native, endpoint, or slow tier; it is not a premise about the whole dispatcher.  Concrete helper satisfaction is left to compliance.
\end{goalproof}
\begin{goalproof}{parser_selected_exponent}The integer and slow laws retain each abstract selected pair and its biased exponent before assembly.  Whether the extracted helpers return matching pairs is not established here.
\end{goalproof}
\begin{goalproof}{parser_selected_magnitude_sign}The package's assembly and sign clauses are separate, so abstract composition can establish the clear sign bit before lexical sign application.  The corresponding concrete assembly behavior remains a compliance obligation.
\end{goalproof}
\begin{goalproof}{dispatch_abstract_composition}This is precisely the interface quantified over by the abstract-composition obligation: its conclusion concerns arbitrary packages satisfying all displayed laws.  The exact sign/body equation establishes nonemptiness before every numeric call and supplies the corresponding source-valid slice witness; numeric completeness on that domain and the explicit flow make the conditional composition nonvacuous without claiming that the extracted helpers already instantiate the interface.  Special parsing remains specified on every source-valid slice.
\end{goalproof}
\begin{goalproof}{dispatch_component_compliance}This definition states the package that concrete compliance must instantiate.  The source and extraction evidence fixes the numeric helper's nonempty source-valid domain, the special helper's all-source-valid-slices domain, the slow helper's valid-rendering domain, and the relevant branches, calls, and trace observations; every numeric call follows the dispatcher's empty-body rejection.  Normal returns, equality with the package operations, and satisfaction of every semantic law by the actual extracted helpers remain the unresolved positive obligation.
\end{goalproof}
\begin{goalproof}{parser_accumulated_rounding}For a satisfying package, the record interval and slow-path clauses refer to the accumulated target independently of the exact-target clauses.  Applying them to concrete extracted results still requires compliance.
\end{goalproof}
\begin{goalproof}{parser_equal_target_rounding}A satisfying package keeps component magnitudes and lexical sign separate, allowing an independently established equality of targets to be transported through the abstract selected tier.  No equality for the concrete result is assumed.
\end{goalproof}
\begin{goalproof}{number_helper_acceptance}On the exact nonempty source-valid byte-slice domain stated by the GOAL, \texttt{parseNumber\_complete} requires the abstract operation to return some record for every unsigned numeric body.  It identifies the applicable contract clause but does not establish normal return or that \texttt{parse\_number} equals that operation.
\end{goalproof}
\begin{goalproof}{number_helper_rejection}For a satisfying package, case-splitting \texttt{parseNumber} and applying \texttt{parseNumber\_spec} rules out a \texttt{some} result on a nonnumeric nonempty source-valid slice, without adding UTF-8.  Equality and normal return of the extracted numeric helper remain concrete-compliance obligations.
\end{goalproof}
\begin{goalproof}{number_helper_record_bounds}For a satisfying package and every nonempty source-valid slice, \texttt{parseNumber\_spec} turns an abstract returned record into a representation witness and \texttt{recordRepresents\_spec} gives false sign and the strict $10^{19}$ bound.  Applying this chain to an extracted return requires the separate equality promised by compliance.
\end{goalproof}
\begin{goalproof}{number_helper_accumulated_value}Every valid unsigned numeric rendering is nonempty, so it lies in the numeric parser contract's nonempty source-valid domain.  The representation law of a satisfying package keeps the nontruncated accumulated-value equality and truncated half-open interval distinct.  It is a clause to be proved for, not inferred from, the concrete parser call.
\end{goalproof}
\begin{goalproof}{special_helper_infinity}On every source-valid byte slice, \texttt{parseSpecial\_complete} requires an abstract returned infinity with the separate sign argument, while soundness constrains abstract successful results.  This identifies the package clauses; it does not prove the extracted special helper's normal return or agreement.
\end{goalproof}
\begin{goalproof}{special_helper_nan}On every source-valid byte slice, \texttt{parseSpecial\_complete} requires some abstract NaN result and soundness constrains returned values without equating all NaN representations.  Concrete helper satisfaction remains separate.
\end{goalproof}
\begin{goalproof}{special_helper_rejection}The rejection law requires the abstract special operation to be \texttt{none} outside all three unsigned keywords on the source-valid byte-slice domain.  It does not itself establish that result for the extracted helper.
\end{goalproof}
\begin{goalproof}{native_correct_or_defer}The native law constrains every abstract \texttt{some} result to a nontruncated record-value rounding with sign factored through \texttt{applySign}; \texttt{none} remains deferral.  Its application to a normal extracted native return depends on concrete compliance.
\end{goalproof}
\begin{goalproof}{integer_correct_or_defer}The integer law covers all abstract machine exponent and mantissa inputs and retains the negative-exponent deferral alternative.  It is the corresponding contract clause, not evidence that the extracted integer helper satisfies it.
\end{goalproof}
\begin{goalproof}{slow_accumulated_rounding}On source-valid unsigned-numeric slices, \texttt{slow\_spec} constrains the abstract slow operation on the unchanged full body to the accumulated-value target and a separately assembled magnitude.  Normal return and equality for the extracted slow helper remain concrete-compliance obligations.
\end{goalproof}
\begin{goalproof}{assembly_correspondence}The assembly law applies to every abstract raw pair without a well-formedness precondition and is independent of later sign application.  The actual extracted assembly operation must still be shown equal to this package operation.
\end{goalproof}
\begin{goalproof}{classification_totality}The package reuses the standalone classification relation on every finite byte string.  Restricting source-facing package laws to representable Rust values neither proves nor narrows the separate classification-totality obligation.
\end{goalproof}
\begin{goalproof}{classification_determinism}The package uses the existing unrestricted classification relation and adds no competing grammar or uniqueness premise.  The standalone determinism conclusion remains to be proved independently.
\end{goalproof}
\begin{goalproof}{classification_significand_digit}Abstract numeric-parser clauses use the existing valid-lexeme predicate, so they do not change its significand-digit condition or assume the separate theorem's conclusion.
\end{goalproof}
\begin{goalproof}{rounding_totality}The package consumes the existing rounding relation and does not change its real-number domain or binary64 targets; existence of targets remains the separate mathematical obligation.
\end{goalproof}
\begin{goalproof}{rounding_determinism}Endpoint and tier laws use the same existing rounding relation, introducing neither an alternative target notion nor an assumed uniqueness result.
\end{goalproof}
\begin{goalproof}{exponent_value_agreement}The package keeps mathematical and accumulated explicit exponents distinct.  Any agreement and its rounding consequence remain independent of the component laws.
\end{goalproof}
\end{preservation}
