AssemblyCorrespondence

Open

Statement

This explanation was written alongside the formalization to describe the statement and its reasoning.

Theorem · Assembly correspondence

For every raw pair x with mantissa word x.m and signed biased exponent x.p_{\mathrm{biased}}, the binary64 specialization of biased_fp_to_float returns normally. The complete bit word of its result is
x.m\mathbin{\mathrm{OR}} \bigl((x.p_{\mathrm{biased}}\mathbin{\texttt{ as }}\texttt{u64}) \mathbin{\texttt{<<}}52\bigr),
where the cast and shift have Rust's fixed-width wrapping bit semantics. No well-formedness condition is imposed on either field of x.

Lean statement

Trellis authored these statements and proofs. Lean checks the formal proofs; the assumptions used by each proof are listed below.

import Tablet.F64
import Tablet.F64_Insts_Dec2flt_modelNumImpTraitsFloatExtU64
import Tablet.num_imp_dec2flt_biased_fp_to_float

open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
noncomputable section

namespace dec2flt_model

-- [TABLET NODE: AssemblyCorrespondence]
theorem AssemblyCorrespondence
    (x : num.imp.dec2flt.common.BiasedFp) :
    num.imp.dec2flt.biased_fp_to_float
        F64.Insts.Dec2flt_modelNumImpTraitsFloatExtU64 x =
      .ok (⟨x.m.bv ||| (x.p_biased.bv.signExtend 64 <<< 52)⟩ : F64) := by
Proof

Natural-language proof

The status above describes the Lean proof. Its explanatory prose may remain a sketch after that proof closes.

Explanatory prose status

Prose proof: SKETCH. The explanatory prose is preserved as it stood when captured.

Proof

SKETCH: Unfold the extracted assembly function. The binary64 significand width makes the extracted shift count equal to 52. Casting the signed 32-bit exponent to an unsigned 64-bit word sign-extends its two's-complement bit vector, exactly as the displayed Lean signExtend expression does. The extracted shift and OR operations then form the displayed word. Finally, the binary64 from_u64_bits support operation is raw reinterpretation, so under the carrier correspondence of F64 its returned carrier is that word. The remaining work is to install and unfold the primitive support bindings.

Lean proof


  sorry

end dec2flt_model

Download Lean source · Download TeX source

Complete Lean module
import Tablet.F64
import Tablet.F64_Insts_Dec2flt_modelNumImpTraitsFloatExtU64
import Tablet.num_imp_dec2flt_biased_fp_to_float

open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
noncomputable section

namespace dec2flt_model

-- [TABLET NODE: AssemblyCorrespondence]
theorem AssemblyCorrespondence
    (x : num.imp.dec2flt.common.BiasedFp) :
    num.imp.dec2flt.biased_fp_to_float
        F64.Insts.Dec2flt_modelNumImpTraitsFloatExtU64 x =
      .ok (⟨x.m.bv ||| (x.p_biased.bv.signExtend 64 <<< 52)⟩ : F64) := by
-- BODY
  sorry

end dec2flt_model

Proof structure

Follow the declared dependencies to read the supporting statements and proofs.

Used by

No incoming link is available in the captured dependency list.

Explore this dependency tree

Inspect related source (64)
More program dependencies (40)
Standard-library dependencies (21)

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.

Evidence gap: Incomplete inventory: open dependency: AssemblyCorrespondence

Helper theorems included
All 57 entries
Technical checking records
Local closure summary
{
  "node": "AssemblyCorrespondence",
  "closure_version": "patch_c_v1",
  "active_decl_hash": "fbcd89746a6b9069c5bf5d91b441a692bd0a5e2cd0db1d26faf48c89d2fa5fb9",
  "active_statement_hash": "e3a34ab84ac3c6eba86e01f718bea0e6396014a228cafdd1ac5e7cc5f8fdfd23",
  "kernel_axioms": [
    "Quot.sound",
    "propext",
    "sorryAx"
  ],
  "toolchain_hash": "ce4c4e3d87434b9663f46de25ce34b48a0cf0d392e0a320a0787b4674a2d7b61",
  "lean_executable_hash": "3e0d0d3d801675359f2d4cf9815bfdb417b20b92fdd9d48b3b14c95bbae28bbf",
  "checker_script_hash": "c8e4a03273e23b9a8f2e141020652a4e0b7b0a8ab0883366ea9d031ca3f37aa1",
  "approved_axioms_hash": "b3d2e5a7a57ad9d2abdfb1c60bd76050a5cafa6a2be969c219d3ae71b2a8ade5",
  "axcheck_status": "Agreed",
  "accepted_at_snapshot_id": "worker-result-local-closure-issuance-cycle-1",
  "boundary_theorems": {},
  "strict_theorem_deps": {},
  "strict_definition_deps": {
    "F64": "ec4e25fbaf4e11d4",
    "F64_Insts_Dec2flt_modelNumImpTraitsFloatExtU64": "60afe26c6a80cf0f",
    "num_imp_dec2flt_biased_fp_to_float": "acdde060e8d35ca7",
    "num_imp_dec2flt_common_BiasedFp": "31d81cf1cf22709f"
  }
}
Prose assessment
{
  "label": "Prose review has no verdict in this snapshot",
  "assessment_status": null,
  "fingerprint_relation": "unknown",
  "assessment_fingerprint": null,
  "current_fingerprint": "sound-v2:30bef6d76d5f083cb0a90c8a55f376fa9fa7eb8a48f72deadc5ab4c49316d3a7",
  "superseded_for_theorem_closure": false
}
Review verdicts
{
  "corr_status": "Fail",
  "substantiveness_status": "Pass"
}