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 Aeneas
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: ModelU64Shl]
def ModelU64Shl (x : Std.U64) (y : Std.U32) : Result Std.U64 :=
-- BODY
x <<< y
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
inspect-native run identifies this exact external as
Shl<u32> for u64, with signature
Std.U64 -> Std.U32 -> Result Std.U64, its Rust source span, and its
raw declaration hash. At that span the approved rust-src defines the method as
self << other, instantiates it for u64/u32, and
marks it rustc_inherit_overflow_checks. The frozen Cargo profiles
enable overflow checks and use unwinding panics; a same-toolchain probe and MIR
show the general dynamic-count guard n < 64, followed by the bounded
u64 shift on success and the checked-overflow unwind edge otherwise.Std.U64 and Std.U32 are
respectively 64- and 32-bit unsigned scalar carriers. The <<<
instance resolves through UScalar.shiftLeft_UScalar to a branch on
the count's full unsigned value. Below 64 it returns ok of
BitVec.shiftLeft; the pinned scalar specification and bit-vector
lemmas identify its value as the mathematical left shift modulo 2^{64} and
its bits as the exact zero-filled, high-bit-truncated 64-bit shift. At 64 or
above it returns fail integerOverflow. Thus, case by case over every
32-bit count, the binding and Rust both produce the same bounded 64-bit result
below 64, while the Rust checked-shift panic and the extracted Aeneas
integerOverflow failure correspond at 64 and above. No
source-reachability restriction is used.Requirement: assembly correspondence
Requirement: classification determinism
Requirement: classification significand digit
Requirement: classification totality
Requirement: dispatch abstract composition
Requirement: dispatch component compliance
Requirement: exponent value agreement
Requirement: integer correct or defer
Requirement: native correct or defer
Requirement: number helper acceptance
Requirement: number helper accumulated value
Requirement: number helper record bounds
Requirement: number helper rejection
Requirement: parser accumulated rounding
Requirement: parser equal target rounding
Requirement: parser exact rounding
Requirement: parser infinity
Requirement: parser invalid rejection
Requirement: parser nan acceptance
Requirement: parser non nan results
Requirement: parser numeric acceptance
Requirement: parser numeric sign
Requirement: parser selected exponent
Requirement: parser selected magnitude sign
Requirement: parser signed zero
Requirement: parser totality
Requirement: rounding determinism
Requirement: rounding totality
Requirement: slow accumulated rounding
Requirement: special helper infinity
Requirement: special helper nan
Requirement: special helper rejection
Proof structure
Follow the declared dependencies to read the supporting statements and proofs.
Uses
No declared dependencies.
Used by
- AssemblyCorrespondence
- DecimalRightShiftU64DyadicBridge
- IntegerCoreRounding
- IntegerCorrectOrDefer
- NativeCorrectOrDefer
- ParserAccumulatedRounding
All 19 entries
- AssemblyCorrespondence
- DecimalRightShiftU64DyadicBridge
- IntegerCoreRounding
- IntegerCorrectOrDefer
- NativeCorrectOrDefer
- ParserAccumulatedRounding
- ParserComputeFloatMantissaBound
- ParserExactRounding Refutation
- ParserInvalidRejectionSafeLength
- ParserNonNanResults
- ParserReachableSlowMagnitudeRounding
- ParserSelectedExponent
- ParserSelectedMagnitudeSign
- ParserSelectedMantissaBound
- ParserSignedZero
- ParserSlowFinalEncoding
- ParserSlowMantissaBound
- ParserSlowReachableDecimalSeq
- Preamble
Inspect related source (1)
- shl · core/src/ops/bit.rs:489 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
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": "ModelU64Shl",
"closure_version": "patch_c_v1",
"active_decl_hash": "af3e1ddec0b1b5d69f2bf89e1dec00f75c043e894b228aaea868964ca597e2ad",
"active_statement_hash": "73dfede1469c6ce88823f354249a828aa534d05edda5aef5d1604ca2364b6887",
"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-1",
"boundary_theorems": {},
"strict_theorem_deps": {},
"strict_definition_deps": {}
}Prose assessment
{
"label": "Recorded Sound: VerifierPass",
"assessment_status": "VerifierPass",
"fingerprint_relation": "matches current fingerprint",
"assessment_fingerprint": "preservation-v1:4fb4381366862f4b70450f0e8c40ca40cdb21ea07f1ac48de4c0bceae5923502",
"current_fingerprint": "preservation-v1:4fb4381366862f4b70450f0e8c40ca40cdb21ea07f1ac48de4c0bceae5923502",
"superseded_for_theorem_closure": false
}Review verdicts
{
"corr_status": "Pass",
"sound_status": "Pass",
"substantiveness_status": "Pass"
}