Definition and explanation
This explanation was written alongside the formalization to describe the statement and its reasoning.
Definition
Lean definition
Trellis authored this Lean model for an operation outside the mechanical extraction. Modeling choices explains its behavior and review.
import Tablet.Binary64ModelDefault
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: ModelF64Div]
def ModelF64Div : F64 -> F64 -> Result F64 :=
-- BODY
Binary64ModelDefault.div
end dec2flt_model
Preservation and explanation
Natural-language argument
The status above describes the Lean proof. Its explanatory prose may remain a sketch after that proof closes.
Explanatory prose status
Prose retained as authored. The explanatory prose is preserved as it stood when captured.
Preservation argument
Claim
Proof
Requirement: assembly correspondence
biased_fp_to_float, whose source body only casts the
biased exponent, shifts it, ORs it with the mantissa, and calls
from_u64_bits; it never invokes binary64 division, as recorded in
reference/model-evidence/binary64-boundary.txt. This binding
therefore cannot affect the claimed assembled word.Requirement: classification determinism
Requirement: classification significand digit
Requirement: classification totality
Requirement: dispatch abstract composition
Requirement: dispatch component compliance
try_fast_path. Its source guards, recorded in
reference/model-evidence/binary64-boundary.txt, establish
\mathit{mantissa}\leq2^{53} and a power-table index
-\mathit{exponent} in 1,\ldots,22. By
Binary64NativeCallDomain, the numerator is finite and non-NaN and
the divisor is finite, non-NaN, and nonzero. The exact non-NaN division
clause above therefore preserves the native component return and hence its
agreement with the contract instance; all other component paths make no
division call.Requirement: exponent value agreement
Requirement: integer correct or defer
compute_float. Its source body performs integer
table arithmetic and returns a raw BiasedFp; the exact source excerpt
in reference/model-evidence/binary64-boundary.txt records that it
contains no primitive float division. This binding therefore cannot change
either deferral or the returned raw pair.Requirement: native correct or defer
can_use_fast_path guards in
reference/model-evidence/binary64-boundary.txt then give
\mathit{mantissa}\leq2^{53} and
1\leq-\mathit{exponent}\leq22. By
Binary64NativeCallDomain, conversion of the mantissa produces a
finite non-NaN operand and the power-table lookup produces a finite non-NaN,
nonzero divisor. The exact non-NaN division clause above therefore agrees
with the source on every executed division; the nonnegative-exponent and
disguised arms multiply instead.Requirement: number helper acceptance
parse_number. Its recorded source body only
accepts a complete Decimal returned by
parse_partial_number; it has no float type parameter and executes no
float operation, including division
(reference/model-evidence/binary64-boundary.txt).Requirement: number helper accumulated value
Decimal record returned by
parse_number. The recorded source boundary shows that this helper
has no float type parameter or float operation, so no binary64 division can
affect the record or its represented interval
(reference/model-evidence/binary64-boundary.txt).Requirement: number helper record bounds
parse_number returns its
Decimal record. As its exact source body in
reference/model-evidence/binary64-boundary.txt shows, it invokes
no float conversion or arithmetic, hence no binary64 division can affect the
record's sign or mantissa bound.Requirement: number helper rejection
parse_number: the helper
returns None unless parse_partial_number consumed the
entire slice. The recorded body has no float type parameter or float
operation, so this division binding is not reached
(reference/model-evidence/binary64-boundary.txt).Requirement: parser accumulated rounding
Requirement: parser equal target rounding
Requirement: parser exact rounding
Requirement: parser infinity
None and the
dispatcher takes the special-helper branch. The source excerpt in
reference/model-evidence/binary64-boundary.txt shows that this
branch selects the infinity constant and conditionally negates it; it never
calls try_fast_path or binary64 division.Requirement: parser invalid rejection
parse_number and then
parse_inf_nan both return None, after which the dispatcher
returns the parsing error. The former has no float operation and the latter
only selects a special constant and conditionally negates on success, as
recorded in reference/model-evidence/binary64-boundary.txt; this
branch never reaches try_fast_path or division.Requirement: parser nan acceptance
None and the dispatcher
takes the special-helper branch. That branch selects the NaN constant and
conditionally negates it, as recorded in
reference/model-evidence/binary64-boundary.txt; it does not call
try_fast_path or division, and no raw-word identity for an
arithmetic NaN is asserted.Requirement: parser non nan results
Requirement: parser numeric acceptance
Requirement: parser numeric sign
Requirement: parser selected exponent
Assembled trace. The source dispatcher
records such a trace only after try_fast_path returned
None; an executed negative-exponent division belongs to the ordinary
native arm and returns directly as Some. Thus no execution relevant
to the selected-pair exponent observation executes binary64 division, as the
dispatcher excerpt in
reference/model-evidence/binary64-boundary.txt records.Requirement: parser selected magnitude sign
Assembled route, reached after the native shortcut returned
None. The only division is in the ordinary negative-exponent native
arm, which returns its value directly rather than selecting or assembling a
raw pair. Consequently this binding cannot affect the selected pair or its
clear sign bit
(reference/model-evidence/binary64-boundary.txt).Requirement: parser signed zero
Requirement: parser totality
Requirement: rounding determinism
Requirement: rounding totality
Requirement: slow accumulated rounding
parse_long_mantissa. Its recorded source body uses
decimal-sequence shifts and integer rounding and returns a raw
BiasedFp; it contains no primitive float division or other float
arithmetic (reference/model-evidence/binary64-boundary.txt).
Thus this binding cannot affect its returned pair.Requirement: special helper infinity
parse_inf_nan. For an infinity keyword its exact
source path selects the infinity constant and conditionally applies negation;
it contains no division call, as recorded in
reference/model-evidence/binary64-boundary.txt.Requirement: special helper nan
parse_inf_nan. For a NaN keyword its exact source
path selects the NaN constant and conditionally applies negation; it contains
no division call, as recorded in
reference/model-evidence/binary64-boundary.txt. This application
asserts only the NaN category, not equality of any arithmetic NaN raw word.Requirement: special helper rejection
parse_inf_nan; an unrecognized keyword takes its
None branch before any special constant or negation is returned. The
recorded source body contains no binary64 division on either success or
rejection
(reference/model-evidence/binary64-boundary.txt).Proof structure
Follow the declared dependencies to read the supporting statements and proofs.
Used by
Inspect related source (2)
- div · core/src/ops/arith.rs:515 Rust library
- FpCategory · core/src/num/mod.rs:1522 Rust library
Related source and models come from the extraction records and declared dependencies.
Proof assumptions and review
Lean checks the formal proof. Trellis also reviews how the statement corresponds to the intended requirement.
Transitive assumptions
- Classical.choice
- Quot.sound
- propext
This list combines the assumptions recorded for this declaration and its dependencies. It may include assumptions used by auxiliary declarations in those modules.
Helper theorems included
Technical checking records
Local closure summary
{
"node": "ModelF64Div",
"closure_version": "patch_c_v1",
"active_decl_hash": "0c948ac9bf01c866651ba1387d8a45f1f14c0ea412262fa7db522286e4ea43e4",
"active_statement_hash": "3ab9296c58d0bfdb06c8341d7d869514b59a5b1ab139ef7eeb299b9f05df0d27",
"kernel_axioms": [],
"toolchain_hash": "ce4c4e3d87434b9663f46de25ce34b48a0cf0d392e0a320a0787b4674a2d7b61",
"lean_executable_hash": "3e0d0d3d801675359f2d4cf9815bfdb417b20b92fdd9d48b3b14c95bbae28bbf",
"checker_script_hash": "c8e4a03273e23b9a8f2e141020652a4e0b7b0a8ab0883366ea9d031ca3f37aa1",
"approved_axioms_hash": "d5c04ffa333d9b33b238a527f5beaa2be82e021d3e9c0bbe01b1310280f7f55a",
"axcheck_status": "Agreed",
"accepted_at_snapshot_id": "worker-result-local-closure-issuance-cycle-20",
"boundary_theorems": {},
"strict_theorem_deps": {},
"strict_definition_deps": {
"Binary64Model": "11d6f0ac18a2ac43",
"Binary64ModelDefault": "47013ebe5c83894c",
"F64": "ec4e25fbaf4e11d4"
}
}Prose assessment
{
"label": "Recorded Sound: VerifierPass",
"assessment_status": "VerifierPass",
"fingerprint_relation": "matches current fingerprint",
"assessment_fingerprint": "preservation-v1:2646a67d8825a19e90644cbbc3e4b63ea029b1e6c176696d17da12c578acd396",
"current_fingerprint": "preservation-v1:2646a67d8825a19e90644cbbc3e4b63ea029b1e6c176696d17da12c578acd396",
"superseded_for_theorem_closure": false
}Review verdicts
{
"corr_status": "Pass",
"sound_status": "Pass",
"substantiveness_status": "Pass"
}