F16

Lean checked

Definition and explanation

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

Definition

The model carrier \mathsf{F16} is the set of unsigned 16-bit words. A word records the complete IEEE-754 binary16 representation, including its sign bit, exponent, significand, signed-zero distinction, infinities, and NaN payload.

Lean definition

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

import Aeneas

open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false

namespace dec2flt_model

-- [TABLET NODE: F16]
abbrev F16 : Type :=
-- BODY
  Std.U16

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

Representing a Rust f16 by its complete to_bits word loses no source value or bit-level observation: from_bits supplies the inverse interpretation of every 16-bit word.

Proof

The source declares the float width and its unsigned companion, exposes to_bits, and constructs values from exact bit patterns. The Aeneas unsigned scalar used here contains exactly a 16-bit vector. Thus the carrier retains every source bit, including distinctions that numerical equality does not retain. The relevant source excerpts and the Aeneas representation are recorded in reference/model-evidence/float-carriers.txt.

Requirement: parser totality

This goal concerns only the f64 specialization, so the binary16 carrier is noninterfering.

Requirement: parser numeric acceptance

This goal concerns only the f64 specialization, so the binary16 carrier is noninterfering.

Requirement: parser invalid rejection

This goal concerns only the f64 specialization, so the binary16 carrier is noninterfering.

Requirement: parser nan acceptance

This goal concerns only binary64 NaNs, so the binary16 carrier is noninterfering.

Requirement: parser infinity

This goal concerns only binary64 infinities, so the binary16 carrier is noninterfering.

Requirement: parser non nan results

This goal concerns only binary64 results, so the binary16 carrier is noninterfering.

Requirement: parser numeric sign

This goal observes only the binary64 result sign, so the binary16 carrier is noninterfering.

Requirement: parser signed zero

This goal observes only binary64 signed zero, so the binary16 carrier is noninterfering.

Requirement: parser exact rounding

This goal concerns only binary64 rounding, so the binary16 carrier is noninterfering.

Requirement: parser selected exponent

The selected pairs are from the f64 dispatcher instance, so the binary16 carrier is noninterfering.

Requirement: parser selected magnitude sign

The assembled words are from the f64 dispatcher instance, so the binary16 carrier is noninterfering.

Requirement: dispatch abstract composition

The pursued dispatcher composition is specialized to f64; binary16 is retained only for root elaboration.

Requirement: dispatch component compliance

The actual components in this goal are the f64 instances, so binary16 is noninterfering.

Requirement: parser accumulated rounding

This goal concerns only binary64 rounding, so the binary16 carrier is noninterfering.

Requirement: parser equal target rounding

This bridge concerns only binary64 targets, so the binary16 carrier is noninterfering.

Requirement: number helper acceptance

The byte parser does not consume or produce an f16; this carrier is noninterfering.

Requirement: number helper rejection

The byte parser does not consume or produce an f16; this carrier is noninterfering.

Requirement: number helper record bounds

The decimal record has integer fields and no f16; this carrier is noninterfering.

Requirement: number helper accumulated value

The decimal record and diagnostic value do not use f16; this carrier is noninterfering.

Requirement: special helper infinity

The pursued special helper is instantiated at f64, so binary16 is noninterfering.

Requirement: special helper nan

The pursued special helper is instantiated at f64, so binary16 is noninterfering.

Requirement: special helper rejection

The pursued special helper is instantiated at f64, so binary16 is noninterfering.

Requirement: native correct or defer

The pursued native shortcut is instantiated at f64, so binary16 is noninterfering.

Requirement: integer correct or defer

The pursued integer tier is instantiated at f64, so binary16 is noninterfering.

Requirement: slow accumulated rounding

The pursued slow path is instantiated at f64, so binary16 is noninterfering.

Requirement: assembly correspondence

The pursued assembly function is instantiated at f64, so binary16 is noninterfering.

Requirement: classification totality

Literal classification is over byte strings and does not use this carrier.

Requirement: classification determinism

Literal classification is over byte strings and does not use this carrier.

Requirement: classification significand digit

The grammar property is over byte strings and does not use this carrier.

Requirement: rounding totality

The pursued rounding target is binary64, so the binary16 carrier is noninterfering.

Requirement: rounding determinism

The pursued rounding target is binary64, so the binary16 carrier is noninterfering.

Requirement: exponent value agreement

The compared rounding targets are binary64, so the binary16 carrier is noninterfering.

Download Lean source · Download TeX source

Proof structure

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

Uses

Dependency links are unavailable for this declaration.

Used by

Explore this dependency tree

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": "F16",
  "closure_version": "patch_c_v1",
  "active_decl_hash": "8b48cf75284b6801afcb59c16835db10cd8afe9de1a55addf75b69e2886073d0",
  "active_statement_hash": "49a3c9c60def04e1521030b4b01dde221923006d7824f8a558d0a5dcea410fd1",
  "kernel_axioms": [],
  "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": {}
}
Prose assessment
{
  "label": "Prose review has no verdict in this snapshot",
  "assessment_status": null,
  "fingerprint_relation": "unknown",
  "assessment_fingerprint": null,
  "current_fingerprint": "preservation-v1:44616460a42b82a850f5f97de4b29464158c7cb7885ce9b3eb611800fdf8aee6",
  "superseded_for_theorem_closure": false
}
Review verdicts
{
  "corr_status": "Pass",
  "substantiveness_status": "Pass"
}