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: ModelU64Shr]
def ModelU64Shr (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
Shr<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 logical
u64 right 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.shiftRight_UScalar to a branch on
the count's full unsigned value. Below 64 it returns ok of
BitVec.ushiftRight; the pinned scalar specification and bit-vector
lemmas identify its value as the mathematical unsigned right shift and its bits
as the exact lowward shift with zero-filled high bits. 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 logical 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.
Inspect related source (1)
- shr · core/src/ops/bit.rs:612 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
- 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": "ModelU64Shr",
"closure_version": "patch_c_v1",
"active_decl_hash": "54cdf7bf335c60688d0b21060cda7f6bd638e6b2f3a9fc54d2ab4e32b61c6a7b",
"active_statement_hash": "371b032e1e242735e327ecbd2effd6fc6c18a50f6890edb3c8aa561e8266d14d",
"kernel_axioms": [
"propext"
],
"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:38b5619bb6f0073414fcc3fe0c08a1066ea04d1de1b04f0fd280b37204ef3417",
"current_fingerprint": "preservation-v1:38b5619bb6f0073414fcc3fe0c08a1066ea04d1de1b04f0fd280b37204ef3417",
"superseded_for_theorem_closure": false
}Review verdicts
{
"corr_status": "Pass",
"sound_status": "Pass",
"substantiveness_status": "Pass"
}