DispatchAbstractComposition

Open

Statement

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

Theorem · Dispatch Abstract Composition

The lexical, conversion, and operational dispatch contracts admit implementations. For any components satisfying those contracts, the dispatcher's normal results satisfy the classification, exact-rounding, sign, and selected-assembly requirements. This conclusion is obtained across the special, native, first-integer, guarded many-digit comparison, forced-deferral, slow-fallback, assembly, and lexical-sign branches.

Lean statement

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

import Tablet.Preamble
import Tablet.DispatchComponentContract

open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false

namespace dec2flt_model

-- [TABLET NODE: DispatchAbstractComposition]
theorem DispatchAbstractComposition :
    Nonempty DispatchComponentContract ∧
    ∀ (c : DispatchComponentContract) (s : Str)
      (r : core.result.Result F64 num.float_parse.ParseFloatError)
      (trace : num.imp.dec2flt.Dec2FltTrace F64),
      c.dispatch s = .ok (r, trace) →
      ((∀ n : DecimalLiteral, n.bytes = s.val →
        ∃ f, r = .Ok f ∧
          Binary64MagnitudeTarget |n.exactValue| (f.val % 2 ^ 63) ∧
          f.val / 2 ^ 63 = if n.negative then 1 else 0) ∧
       ((¬ ∃ n : DecimalLiteral, n.bytes = s.val) →
        (¬ ∃ k : SpecialLiteral, k.bytes = s.val) →
        ∃ e, r = .Err e) ∧
       (∀ k : SpecialLiteral, k.bytes = s.val →
        ∃ f, r = .Ok f ∧
          (if k.isNan then
            f.val % 2 ^ 63 / 2 ^ 52 = 2047 ∧ f.val % 2 ^ 52 ≠ 0
           else
            f.val % 2 ^ 63 = 2047 * 2 ^ 52 ∧
            f.val / 2 ^ 63 = if k.negative then 1 else 0)) ∧
       (∀ a, trace = num.imp.dec2flt.Dec2FltTrace.Assembled a →
          0 ≤ a.selected_pair.p_biased.val ∧
          a.selected_pair.p_biased.val ≤ 2047 ∧
          a.assembled_word.val < 2 ^ 63)) := 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: This is the principal theorem for supplied goal dispatch_abstract_composition. Its Lean proof is intentionally left open during Modeling; argument development will derive the displayed conclusion by trace-case analysis from DispatchComponentContract, rather than assuming that conclusion as a contract field.

Lean proof


  sorry

end dec2flt_model

Download Lean source · Download TeX source

Complete Lean module
import Tablet.Preamble
import Tablet.DispatchComponentContract

open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false

namespace dec2flt_model

-- [TABLET NODE: DispatchAbstractComposition]
theorem DispatchAbstractComposition :
    Nonempty DispatchComponentContract ∧
    ∀ (c : DispatchComponentContract) (s : Str)
      (r : core.result.Result F64 num.float_parse.ParseFloatError)
      (trace : num.imp.dec2flt.Dec2FltTrace F64),
      c.dispatch s = .ok (r, trace) →
      ((∀ n : DecimalLiteral, n.bytes = s.val →
        ∃ f, r = .Ok f ∧
          Binary64MagnitudeTarget |n.exactValue| (f.val % 2 ^ 63) ∧
          f.val / 2 ^ 63 = if n.negative then 1 else 0) ∧
       ((¬ ∃ n : DecimalLiteral, n.bytes = s.val) →
        (¬ ∃ k : SpecialLiteral, k.bytes = s.val) →
        ∃ e, r = .Err e) ∧
       (∀ k : SpecialLiteral, k.bytes = s.val →
        ∃ f, r = .Ok f ∧
          (if k.isNan then
            f.val % 2 ^ 63 / 2 ^ 52 = 2047 ∧ f.val % 2 ^ 52 ≠ 0
           else
            f.val % 2 ^ 63 = 2047 * 2 ^ 52 ∧
            f.val / 2 ^ 63 = if k.negative then 1 else 0)) ∧
       (∀ a, trace = num.imp.dec2flt.Dec2FltTrace.Assembled a →
          0 ≤ a.selected_pair.p_biased.val ∧
          a.selected_pair.p_biased.val ≤ 2047 ∧
          a.assembled_word.val < 2 ^ 63)) := 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 (21)
More program dependencies (10)
Standard-library dependencies (8)

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: DispatchAbstractComposition

Helper theorems included
All 12 entries
Technical checking records
Local closure summary
{
  "node": "DispatchAbstractComposition",
  "closure_version": "patch_c_v1",
  "active_decl_hash": "ebdeec4b8d557a8c1619fa9c38b4b5aee50ef1deaa700462676bc1778ef231c9",
  "active_statement_hash": "c316241ba518af03106b188b4c4ff223884f904776fa7e3240480912ea8dde3d",
  "kernel_axioms": [
    "Classical.choice",
    "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-4",
  "boundary_theorems": {},
  "strict_theorem_deps": {},
  "strict_definition_deps": {
    "Binary64MagnitudeTarget": "9d32ddb247d9dd24",
    "DecimalLiteral": "c43614ff2149ecf2",
    "DispatchComponentContract": "1f181342b75a7163",
    "F64": "ec4e25fbaf4e11d4",
    "SpecialLiteral": "e74f3fee44f3df42",
    "num_float_parse_ParseFloatError": "c43614ff2149ecf2",
    "num_imp_dec2flt_Dec2FltAssemblyTrace": "644abe66cec8ac98",
    "num_imp_dec2flt_Dec2FltTrace": "8fa376ebb5c489ee",
    "num_imp_dec2flt_common_BiasedFp": "5c88d5d7976c5e8f"
  }
}
Prose assessment
{
  "label": "Prose review has no verdict in this snapshot",
  "assessment_status": null,
  "fingerprint_relation": "unknown",
  "assessment_fingerprint": null,
  "current_fingerprint": "sound-v2:10440b15c6f7ba3ca2db6e5860384abc32c5b664cd52b4f0615d2ffa17ee3c1d",
  "superseded_for_theorem_closure": false
}
Review verdicts
{
  "corr_status": "Fail",
  "substantiveness_status": "FalseAsStated"
}