P9_T1_ActualDispatchFrameEquality

Lean checked

Statement

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

Lemma

For every Aeneas string, the fixed dispatcher frame instantiated with ActualDispatchOperations equals the frozen extracted dec2flt_with_trace::<f64> computation, including its outer failure or divergence and, on normal return, its Rust result and complete trace. No source-validity, length, component-correctness or termination premise is used.

Lean statement

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

import Tablet.P9_T1_DispatchFrame
import Tablet.P9_T1_ActualDispatchOperations
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: P9_T1_ActualDispatchFrameEquality]
theorem P9_T1_ActualDispatchFrameEquality (s : Str) :
    P9_T1_DispatchFrame P9_T1_ActualDispatchOperations s =
      num.imp.dec2flt.dec2flt_with_trace
        F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64
        F64.Insts.CoreOpsArithDivF64F64 F64.Insts.CoreOpsArithMulF64F64
        F64.Insts.CoreOpsArithNegF64 s := 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 retained as authored. The explanatory prose is preserved as it stood when captured.

Proof

Expand DispatchFrame and the operation record. Each of its seven operation fields is the corresponding extracted call with the same f64 trait instances. The frame uses the same f64 instance's significand-width computation, whose value is 52. All remaining bytes, guards, checked arithmetic, matches, trace fields and monadic binds are literally the extracted body. Unfolding these expressions proves equality. In particular no failure is replaced by a value, and the equality requires no correctness law for any call.

Lean proof


  unfold P9_T1_DispatchFrame P9_T1_ActualDispatchOperations
    num.imp.dec2flt.dec2flt_with_trace
  repeat' (first
    | rfl
    | (intro _)
    | rw [bind_eq_iff]
    | split)
end dec2flt_model

Download Lean source · Download TeX source

Complete Lean module
import Tablet.P9_T1_DispatchFrame
import Tablet.P9_T1_ActualDispatchOperations
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: P9_T1_ActualDispatchFrameEquality]
theorem P9_T1_ActualDispatchFrameEquality (s : Str) :
    P9_T1_DispatchFrame P9_T1_ActualDispatchOperations s =
      num.imp.dec2flt.dec2flt_with_trace
        F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64
        F64.Insts.CoreOpsArithDivF64F64 F64.Insts.CoreOpsArithMulF64F64
        F64.Insts.CoreOpsArithNegF64 s := by
-- BODY
  unfold P9_T1_DispatchFrame P9_T1_ActualDispatchOperations
    num.imp.dec2flt.dec2flt_with_trace
  repeat' (first
    | rfl
    | (intro _)
    | rw [bind_eq_iff]
    | split)
end dec2flt_model

Proof structure

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

Explore this dependency tree

Inspect related source (198)
More program dependencies (156)
Standard-library dependencies (39)

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
All 149 entries
Technical checking records
Local closure summary
{
  "node": "P9_T1_ActualDispatchFrameEquality",
  "closure_version": "patch_c_v1",
  "active_decl_hash": "3fcba38964503c59c5a9e5801f0f6699d50405dfccddd94f09c4eeba25d73e00",
  "active_statement_hash": "a6c55536fa264df7525d89b725153b565c5dd030d99f2c4b3a99f914e91a6233",
  "kernel_axioms": [
    "Classical.choice",
    "Quot.sound",
    "propext"
  ],
  "toolchain_hash": "ce4c4e3d87434b9663f46de25ce34b48a0cf0d392e0a320a0787b4674a2d7b61",
  "lean_executable_hash": "3e0d0d3d801675359f2d4cf9815bfdb417b20b92fdd9d48b3b14c95bbae28bbf",
  "checker_script_hash": "c8e4a03273e23b9a8f2e141020652a4e0b7b0a8ab0883366ea9d031ca3f37aa1",
  "approved_axioms_hash": "576e6bf9480cfd32f53c309c7ac8fb115c1ba6e413f299ed5ff9fa7c647e6769",
  "axcheck_status": "Agreed",
  "accepted_at_snapshot_id": "worker-result-local-closure-issuance-cycle-181",
  "boundary_theorems": {},
  "strict_theorem_deps": {
    "P9_T1_DispatchFrame": "f3e7d4ffbf9b4d68",
    "num_imp_dec2flt_dec2flt_with_trace": "faf0081b4c91301b"
  },
  "strict_definition_deps": {
    "F64": "ec4e25fbaf4e11d4",
    "F64_Insts_CoreOpsArithDivF64F64": "dc44e13a99fc6bed",
    "F64_Insts_CoreOpsArithMulF64F64": "1ae1a9021a654abd",
    "F64_Insts_CoreOpsArithNegF64": "2d9be310c546ea2e",
    "F64_Insts_Dec2flt_modelNumImpDec2fltLemireU64": "30963b4ef656cc79",
    "P9_T1_ActualDispatchOperations": "d8bf51ebbbf153ac",
    "P9_T1_DispatchFrame": "20ad2431db4aaf28",
    "P9_T1_DispatchOperations": "c21271de368c461b",
    "Preamble": "7a79218b23bce03e",
    "core_ops_arith_Neg": "0ff07135a60bcbf9",
    "num_float_parse_ParseFloatError": "c43614ff2149ecf2",
    "num_imp_dec2flt_Dec2FltAssemblyTrace": "7bda5de02611ad76",
    "num_imp_dec2flt_Dec2FltTrace": "51a72ca46ca811cd",
    "num_imp_dec2flt_Lemire": "1923f90c53d323e6",
    "num_imp_dec2flt_biased_fp_to_float": "acdde060e8d35ca7",
    "num_imp_dec2flt_common_BiasedFp": "31d81cf1cf22709f",
    "num_imp_dec2flt_common_BiasedFp_Insts_CoreCmpPartialEqBiasedFp_eq": "fbbf553e3c502a05",
    "num_imp_dec2flt_dec2flt_with_trace": "5665189e0304a27e",
    "num_imp_dec2flt_decimal_Decimal": "fe99f3f976739f2d",
    "num_imp_dec2flt_decimal_Decimal_try_fast_path": "2e4888f65a06b49f",
    "num_imp_dec2flt_lemire_compute_float": "39d89e3f0a8a9d4c",
    "num_imp_dec2flt_parse_parse_inf_nan": "85655c19a8791b54",
    "num_imp_dec2flt_parse_parse_number": "f73f8bc11faa6db3",
    "num_imp_dec2flt_pfe_empty": "89046d1da5ac1ce2",
    "num_imp_dec2flt_pfe_invalid": "21db875427d92c6d",
    "num_imp_dec2flt_slow_parse_long_mantissa": "cd8af64c3688b60f",
    "num_imp_traits_Float": "02acccb9db3e30f2",
    "num_imp_traits_FloatExt": "f996e5400649797d"
  }
}
Prose assessment
{
  "label": "Lean proof closed; predictive prose review no longer required",
  "assessment_status": null,
  "fingerprint_relation": "unknown",
  "assessment_fingerprint": null,
  "current_fingerprint": "sound-v2:eab96fc2fe548614c14d36698bef275d5d25f505d16e50cb120775027bf19c57",
  "superseded_for_theorem_closure": false
}
Review verdicts
{
  "corr_status": "Pass",
  "substantiveness_status": "Pass"
}