Where modeling judgment enters
Trellis authors models for operations outside the mechanical extraction and reviews their meaning against Rust. Each item explains the choice, its evidence, and the review result.
24 hand-modeled rust operations · 9 specification vocabulary and authored definitions · 8 source adaptations
This generation was captured in Modeling at cycle 27. Later review phases were still pending. The verdicts recorded at this point appear below.
Hand-modeled Rust operations (24)
core::clone::impls::{impl core::clone::Clone for f64}::clone
Inspect related source (1)
- clone · core/src/clone.rs:698 Rust library
Related source and models come from the extraction records and declared dependencies.
| Rust item | core::clone::impls::{impl core::clone::Clone for f64}::clone |
|---|---|
| Recorded source | /rustc/library/core/src/clone.rs |
| Lines | 698:20–698:43 |
The related-source link includes this operation’s Rust standard-library implementation.
Opaque extraction signature
: F64 → Result F64Lean definition
Trellis authored this Lean model for an operation outside the mechanical extraction. Modeling choices explains its behavior and review.
import Tablet.Binary64ModelDefault
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: ModelF64Clone]
def ModelF64Clone : F64 -> Result F64 :=
-- BODY
Binary64ModelDefault.clone
end dec2flt_model
Why this model is faithful
Definition
Preservation argument
Claim
Proof
*self; see reference/model-evidence/binary64-boundary.txt.Authored arguments for individual requirements
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
Recorded review
| Correspondence | Pass |
|---|---|
| Preservation | VerifierPass |
ModelF64Clone · Lean checked
Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
reference/model-evidence/binary64-boundary.txt
Primary evidence for the binary64 boundary
==========================================
Scope and identities
--------------------
This record concerns the frozen x86_64-unknown-linux-gnu extraction, the
adapted Rust crate retained in this repository, and the installed toolchain
named by modeling-input/SETUP.md. The probe source is retained at
reference/model-evidence/binary64-probe.rs; no scratch source is required to
reproduce it.
Toolchain executable:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
Target:
x86_64-unknown-linux-gnu
rustc executable SHA-256:
162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
Probe source SHA-256:
68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
Compiled probe SHA-256:
f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
Frozen generated.lean SHA-256:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692
Frozen modeling-input/manifest.json SHA-256:
2fc182c0c7acccad30c449ca349b999759b84e8ed4ec9d590e8295e43eeec077
Approved Binary64ModelDefault.lean SHA-256 at the time of this record:
03ae48fb631e6242bd21bf95d0481b66acae05f8cab343c7ab279b3c116538a3
Exact reproduction commands
---------------------------
Run from the repository root:
R=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
P=reference/model-evidence/binary64-probe.rs
B=.trellis/scratch/binary64-probe
"$R" --version --verbose
sha256sum "$R"
sha256sum "$P"
"$R" --target x86_64-unknown-linux-gnu -C opt-level=0 "$P" -o "$B"
sha256sum "$B"
"$B"
Raw output
----------
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
rustc_sha256=162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
probe_sha256=68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
binary_sha256=f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
target_arch=x86_64
mantissa_digits=53
exponent_mask=7ff0000000000000
mantissa_mask=000fffffffffffff
nan=7ff8000000000000
infinity=7ff0000000000000
neg_infinity=fff0000000000000
nan_category=Nan
infinity_category=Infinite
zero_category=Zero
subnormal_category=Subnormal
normal_category=Normal
from_bits_to_bits=7ff0000000000001
neg_payload_nan=fff0000000000001
neg_zero=8000000000000000
subnormal_tie_to_even_zero=0000000000000000
subnormal_tie_to_even_two=0000000000000002
normal_division=3fb999999999999a
mul_negative_zero=8000000000000000
div_negative_zero=8000000000000000
div_negative_infinity=fff0000000000000
mul_overflow=7ff0000000000000
mul_zero_infinity_is_nan=true
div_zero_zero_is_nan=true
mul_nan_is_nan=true
cast_2_pow_53=4340000000000000
cast_2_pow_53_plus_1=4340000000000000
Pinned Rust library sources
---------------------------
The installed sources below belong to the same named toolchain. Their
SHA-256 identities are:
core/src/primitive_docs.rs
c4b8627dd67d5dac8f383f383a9e7ff1229ea43e7599610fc61988694cf0f3e5
core/src/num/f64.rs
84540a6a59e347c63caabe12cf895ba1239c76a50682471567007138fac1c618
core/src/clone.rs
23f9cfc80347fde6b8457d46fbf7a2b8d9f34c8c58601b0b6f714ca2f6d1976b
The exact relevant text of core/src/primitive_docs.rs is:
#[rustc_doc_primitive = "f64"]
#[doc(alias = "double")]
/// A 64-bit floating-point type (specifically, the "binary64" type defined in IEEE 754-2008).
///
/// This type is very similar to [`prim@f32`], but has increased precision by using twice as many
/// bits. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on double-precision
/// values][wikipedia] for more information.
The referenced primitive-f32 documentation supplies the common primitive
floating-point operation rules quoted next:
/// - −0.0: IEEE 754 floating-point numbers have a bit that indicates their sign, so −0.0 is a
/// possible value. For comparison −0.0 = +0.0, but floating-point operations can carry
/// the sign bit through arithmetic operations. This means −0.0 × +0.0 produces −0.0 and
/// a negative number rounded to a value smaller than a float can represent also produces −0.0.
/// - [∞](#associatedconstant.INFINITY) and
/// [−∞](#associatedconstant.NEG_INFINITY): these result from calculations
/// like `1.0 / 0.0`.
///
/// When a primitive operation (addition, subtraction, multiplication, or
/// division) is performed on this type, the result is rounded according to the
/// roundTiesToEven direction defined in IEEE 754-2008. That means:
///
/// - The result is the representable value closest to the true value, if there
/// is a unique closest representable value.
/// - If the true value is exactly half-way between two representable values,
/// the result is the one with an even least-significant binary digit.
/// - If the true value's magnitude is ≥ `f32::MAX` + 2<sup>(`f32::MAX_EXP` −
/// `f32::MANTISSA_DIGITS` − 1)</sup>, the result is ∞ or −∞ (preserving the
/// true value's sign).
The same file explicitly separates arithmetic NaN choice from exact bitwise
operations; its exact relevant text is:
/// The rules for NaN values differ between *arithmetic* and *non-arithmetic* (or "bitwise")
/// operations. The non-arithmetic operations are unary `-`, `abs`, `copysign`, `signum`,
/// `{to,from}_bits`, `{to,from}_{be,le,ne}_bytes` and `is_sign_{positive,negative}`. These
/// operations are guaranteed to exactly preserve the bit pattern of their input except for possibly
/// changing the sign bit.
///
/// The following rules apply when a NaN value is returned from an arithmetic operation:
/// - The result has a non-deterministic sign.
/// - The quiet bit and payload are non-deterministically chosen from
/// the following set of options:
///
/// - **Preferred NaN**: The quiet bit is set and the payload is all-zero.
/// - **Quieting NaN propagation**: The quiet bit is set and the payload is copied from any input
/// operand that is a NaN. If the inputs and outputs do not have the same payload size (i.e., for
/// `as` casts), then
/// - If the output is smaller than the input, low-order bits of the payload get dropped.
/// - If the output is larger than the input, the payload gets filled up with 0s in the low-order
/// bits.
/// - **Unchanged NaN propagation**: The quiet bit and payload are copied from any input operand
/// that is a NaN. If the inputs and outputs do not have the same size (i.e., for `as` casts), the
/// same rules as for "quieting NaN propagation" apply, with one caveat: if the output is smaller
/// than the input, dropping the low-order bits may result in a payload of 0; a payload of 0 is not
/// possible with a signaling NaN (the all-0 significand encodes an infinity) so unchanged NaN
/// propagation cannot occur with some inputs.
/// - **Target-specific NaN**: The quiet bit is set and the payload is picked from a target-specific
/// set of "extra" possible NaN payloads. The set can depend on the input operand values.
/// See the table below for the concrete NaNs this set contains on various targets.
///
/// | `target_arch` | Extra payloads possible on this platform |
/// |---------------|------------------------------------------|
/// | `aarch64`, `arm`, `arm64ec`, `loongarch64`, `powerpc` (except when `target_abi = "spe"`), `powerpc64`, `riscv32`, `riscv64`, `s390x`, `x86`, `x86_64` | None |
Thus the model's preferred quiet NaN is one permitted result whenever
multiplication or division returns NaN. This does not claim that arbitrary
Rust arithmetic NaNs have those exact bits. By contrast, unary negation and
bit conversion must preserve all non-sign bits exactly, including for every
NaN payload.
The exact relevant declarations in core/src/num/f64.rs are:
pub const MANTISSA_DIGITS: u32 = 53;
pub const NAN: f64 = 0.0_f64 / 0.0_f64;
pub const INFINITY: f64 = 1.0_f64 / 0.0_f64;
pub const NEG_INFINITY: f64 = -1.0_f64 / 0.0_f64;
pub const SIGN_MASK: u64 = 0x8000_0000_0000_0000;
pub const EXPONENT_MASK: u64 = 0x7ff0_0000_0000_0000;
pub const MANTISSA_MASK: u64 = 0x000f_ffff_ffff_ffff;
pub const fn classify(self) -> FpCategory {
// We used to have complicated logic here that avoids the simple bit-based tests to work
// around buggy codegen for x87 targets (see
// https://github.com/rust-lang/rust/issues/114479). However, some LLVM versions later, none
// of our tests is able to find any difference between the complicated and the naive
// version, so now we are back to the naive version.
let b = self.to_bits();
match (b & Self::MANTISSA_MASK, b & Self::EXPONENT_MASK) {
(0, Self::EXPONENT_MASK) => FpCategory::Infinite,
(_, Self::EXPONENT_MASK) => FpCategory::Nan,
(0, 0) => FpCategory::Zero,
(_, 0) => FpCategory::Subnormal,
_ => FpCategory::Normal,
}
}
pub const fn to_bits(self) -> u64 {
// SAFETY: `u64` is a plain old datatype so we can always transmute to it.
unsafe { mem::transmute(self) }
}
pub const fn from_bits(v: u64) -> Self {
// It turns out the safety issues with sNaN were overblown! Hooray!
// SAFETY: `u64` is a plain old datatype so we can always transmute from it.
unsafe { mem::transmute(v) }
}
The exact scalar clone body in core/src/clone.rs is:
impl const Clone for $t {
#[inline(always)]
fn clone(&self) -> Self {
*self
}
}
Frozen adapted source
---------------------
The relevant retained source file hashes are:
crate/traits.rs
9013270fb846edcb0bdf2abd0353f575fdd727974cba9e89bdab8bb4c2b4f0bf
crate/dec2flt/mod.rs
b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012
crate/dec2flt/parse.rs
50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f
crate/dec2flt/decimal.rs
633658be803b7369b18feb098a8aa1b5f714a933d3b79ecbc4899a1b05f35beb
crate/dec2flt/lemire.rs
fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1
crate/dec2flt/slow.rs
93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485
Exact constant and bit-conversion excerpt from crate/traits.rs:
impl Float for f64 {
type Int = u64;
const INFINITY: Self = Self::INFINITY;
const NEG_INFINITY: Self = Self::NEG_INFINITY;
const NAN: Self = Self::NAN;
// Bit-identical to the upstream `-f64::NAN`, without the unsupported
// compile-time float negation.
const NEG_NAN: Self = f64::from_bits(0xFFF8_0000_0000_0000);
const BITS: u32 = 64;
const SIG_TOTAL_BITS: u32 = Self::MANTISSA_DIGITS;
const EXP_MASK: Self::Int = Self::EXPONENT_MASK;
const SIG_MASK: Self::Int = Self::MANTISSA_MASK;
fn to_bits(self) -> Self::Int {
self.to_bits()
}
fn classify(self) -> FpCategory {
self.classify()
}
}
impl FloatExt for f64 {
#[inline]
fn from_u64_bits(v: u64) -> Self {
f64::from_bits(v)
}
Exact derived-constant defaults from crate/traits.rs:
/// The number of bits in the significand, *excluding* the hidden bit.
const SIG_BITS: u32 = Self::SIG_TOTAL_BITS - 1;
/// Number of bits in the exponent.
const EXP_BITS: u32 = Self::BITS - Self::SIG_BITS - 1;
/// The saturated (maximum bitpattern) value of the exponent, i.e. the infinite
/// representation.
///
/// This shifted fully right, use `EXP_MASK` for the shifted value.
const EXP_SAT: u32 = (1 << Self::EXP_BITS) - 1;
/// Signed version of `EXP_SAT` since we convert a lot.
const INFINITE_POWER: i32 = Self::EXP_SAT as i32;
/// The exponent bias value. This is also the maximum value of the exponent.
const EXP_BIAS: u32 = Self::EXP_SAT >> 1;
/// Minimum exponent value of normal values.
const EXP_MIN: i32 = -(Self::EXP_BIAS as i32 - 1);
Together with the f64-instance lines `BITS = 64` and
`SIG_TOTAL_BITS = Self::MANTISSA_DIGITS` in the preceding excerpt, these
defaults derive SIG_BITS, EXP_MIN, and INFINITE_POWER from the primitive
mantissa-digit constant rather than introducing independent parameters.
Exact checked cast excerpt from crate/dec2flt/mod.rs:
#[inline]
// This method is precisely the source `u64 as f64` primitive conversion.
// Aeneas cannot translate that cast; opacity is confined to the cast while
// the fast-path algorithm, its range proof obligation, and all calls stay
// visible in the extracted model.
#[charon::opaque]
fn from_u64(v: u64) -> Self {
debug_assert!(v <= Self::MAX_MANTISSA_FAST_PATH);
v as _
}
Here MAX_MANTISSA_FAST_PATH is the retained default 1 << 53. Therefore the
source succeeds only through the modeled branch v <= 2^53 in this debug
configuration; above it the debug assertion fails before the cast. On the
successful branch every integer is exactly representable, so the source cast
and the model rounder return the same word.
Exact power-table and assembly excerpts from crate/dec2flt/mod.rs:
/// Maximum mantissa for the fast-path (`1 << 53` for f64).
const MAX_MANTISSA_FAST_PATH: u64 = 1 << Self::SIG_TOTAL_BITS;
const MAX_EXPONENT_FAST_PATH: i64 = 22;
const MIN_EXPONENT_FAST_PATH: i64 = -Self::MAX_EXPONENT_FAST_PATH;
const MAX_EXPONENT_DISGUISED_FAST_PATH: i64 = 37;
fn pow10_fast_path(exponent: usize) -> Self {
// These bit patterns are exactly the source table's rounded binary64
// literals. The match is the same masked lookup; it merely keeps float
// constants out of Aeneas's unsupported constant interpreter.
match exponent & 31 {
0 => f64::from_bits(0x3FF0_0000_0000_0000),
1 => f64::from_bits(0x4024_0000_0000_0000),
2 => f64::from_bits(0x4059_0000_0000_0000),
3 => f64::from_bits(0x408F_4000_0000_0000),
4 => f64::from_bits(0x40C3_8800_0000_0000),
5 => f64::from_bits(0x40F8_6A00_0000_0000),
6 => f64::from_bits(0x412E_8480_0000_0000),
7 => f64::from_bits(0x4163_12D0_0000_0000),
8 => f64::from_bits(0x4197_D784_0000_0000),
9 => f64::from_bits(0x41CD_CD65_0000_0000),
10 => f64::from_bits(0x4202_A05F_2000_0000),
11 => f64::from_bits(0x4237_4876_E800_0000),
12 => f64::from_bits(0x426D_1A94_A200_0000),
13 => f64::from_bits(0x42A2_309C_E540_0000),
14 => f64::from_bits(0x42D6_BCC4_1E90_0000),
15 => f64::from_bits(0x430C_6BF5_2634_0000),
16 => f64::from_bits(0x4341_C379_37E0_8000),
17 => f64::from_bits(0x4376_3457_85D8_A000),
18 => f64::from_bits(0x43AB_C16D_674E_C800),
19 => f64::from_bits(0x43E1_58E4_6091_3D00),
20 => f64::from_bits(0x4415_AF1D_78B5_8C40),
21 => f64::from_bits(0x444B_1AE4_D6E2_EF50),
22 => f64::from_bits(0x4480_F0CF_064D_D592),
_ => f64::from_bits(0),
}
}
fn biased_fp_to_float<F: FloatExt>(x: BiasedFp) -> F {
let mut word = x.m;
word |= (x.p_biased as u64) << F::SIG_BITS;
F::from_u64_bits(word)
}
Exact native-call excerpt from crate/dec2flt/decimal.rs:
fn can_use_fast_path<F: Lemire>(&self) -> bool {
F::MIN_EXPONENT_FAST_PATH <= self.exponent
&& self.exponent <= F::MAX_EXPONENT_DISGUISED_FAST_PATH
&& self.mantissa <= F::MAX_MANTISSA_FAST_PATH
&& !self.many_digits
}
if !self.can_use_fast_path::<F>() {
return None;
}
let value = if self.exponent <= F::MAX_EXPONENT_FAST_PATH {
// normal fast path
let value = F::from_u64(self.mantissa);
if self.exponent < 0 {
// Explicit trait calls preserve Rust arithmetic and resolve
// the generic output type that Charon leaves ambiguous.
core::ops::Div::div(value, F::pow10_fast_path((-self.exponent) as _))
} else {
core::ops::Mul::mul(value, F::pow10_fast_path(self.exponent as _))
}
} else {
// disguised fast path
let shift = self.exponent - F::MAX_EXPONENT_FAST_PATH;
let mantissa = self.mantissa.checked_mul(INT_POW10[shift as usize])?;
if mantissa > F::MAX_MANTISSA_FAST_PATH {
return None;
}
core::ops::Mul::mul(
F::from_u64(mantissa),
F::pow10_fast_path(F::MAX_EXPONENT_FAST_PATH as _),
)
};
if self.negative {
Some(core::ops::Neg::neg(value))
} else {
Some(value)
}
The preceding can_use_fast_path body, together with
MAX_MANTISSA_FAST_PATH = 1 << SIG_TOTAL_BITS and SIG_TOTAL_BITS = 53 for f64,
requires the exponent to lie between -22 and 37, the input mantissa to be at
most 2^53, and many_digits to be false. Consequently an ordinary arithmetic
call has a from_u64 operand in 0..=2^53. In its negative-exponent arm,
`-self.exponent` lies in 1..=22; in its nonnegative arm, `self.exponent` lies
in 0..=22. The disguised branch checks its multiplied mantissa against 2^53
before from_u64 and uses table index 22. The paired statement
Binary64NativeCallDomain does not assert this source reachability. It says
conditionally that a from_u64 argument at most 2^53 succeeds with a finite,
non-NaN word and that a table index at most 22 succeeds with a positive,
nonzero, finite, non-NaN word. Applying that conditional statement to the
guards just derived establishes those properties for the actual ordinary and
disguised calls, and in particular establishes that every executed divisor is
nonzero.
Exact special-value excerpt from crate/dec2flt/parse.rs:
let float = match (register, len) {
(INF_3, 3) => F::INFINITY,
(INF_8, 8) => F::INFINITY,
(NAN, 3) => F::NAN,
_ => return None,
};
if negative { Some(-float) } else { Some(float) }
Thus the executed special route is INFINITY or NAN followed by conditional
negation; it does not select NEG_INFINITY or NEG_NAN directly.
The number helper has the exact source body
pub fn parse_number(s: &[u8]) -> Option<Decimal> {
if let Some((float, rest)) = parse_partial_number(s) {
if rest == s.len() {
return Some(float);
}
}
None
}
It returns only the Decimal produced by parse_partial_number; there is no
float type parameter or float operation at this boundary.
The integer-tier helper has the source type and exact executable excerpts
below (long explanatory comments are elided). In particular it returns a raw
BiasedFp and contains no from_u64 cast, primitive float multiplication,
division, negation, or from_bits call:
pub fn compute_float<F: Float>(q: i64, mut w: u64) -> BiasedFp {
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let fp_error = BiasedFp::zero_pow2(-1);
// Short-circuit if the value can only be a literal 0 or infinity.
if w == 0 || q < F::SMALLEST_POWER_OF_TEN as i64 {
return fp_zero;
} else if q > F::LARGEST_POWER_OF_TEN as i64 {
return fp_inf;
}
// Normalize our significant digits, so the most-significant bit is set.
let lz = w.leading_zeros();
w <<= lz;
let (lo, hi) = compute_product_approx(q, w, F::SIG_BITS as usize + 3);
if lo == 0xFFFF_FFFF_FFFF_FFFF {
let inside_safe_exponent = (q >= -27) && (q <= 55);
if !inside_safe_exponent {
return fp_error;
}
}
let upperbit = (hi >> 63) as i32;
let mut mantissa = hi >> (upperbit + 64 - F::SIG_BITS as i32 - 3);
let mut power2 = power(q as i32) + upperbit - lz as i32 - F::EXP_MIN + 1;
if power2 <= 0 {
if -power2 + 1 >= 64 {
// Have more than 64 bits below the minimum exponent, must be 0.
return fp_zero;
}
// Have a subnormal value.
mantissa >>= -power2 + 1;
mantissa += mantissa & 1;
mantissa >>= 1;
power2 = (mantissa >= (1_u64 << F::SIG_BITS)) as i32;
return BiasedFp { m: mantissa, p_biased: power2 };
}
// Need to handle rounding ties. Normally, we need to round up,
// but if we fall right in between and we have an even basis, we
// need to round down.
if lo <= 1
&& q >= F::MIN_EXPONENT_ROUND_TO_EVEN as i64
&& q <= F::MAX_EXPONENT_ROUND_TO_EVEN as i64
&& mantissa & 0b11 == 0b01
&& (mantissa << (upperbit + 64 - F::SIG_BITS as i32 - 3)) == hi
{
// Zero the lowest bit, so we don't round up.
mantissa &= !1_u64;
}
// Round-to-even, then shift the significant digits into place.
mantissa += mantissa & 1;
mantissa >>= 1;
if mantissa >= (2_u64 << F::SIG_BITS) {
// Rounding up overflowed, so the carry bit is set. Set the
// mantissa to 1 (only the implicit, hidden bit is set) and
// increase the exponent.
mantissa = 1_u64 << F::SIG_BITS;
power2 += 1;
}
// Zero out the hidden bit.
mantissa &= !(1_u64 << F::SIG_BITS);
if power2 >= F::INFINITE_POWER {
// Exponent is above largest normal value, must be infinite.
return fp_inf;
}
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact slow-tier source body from crate/dec2flt/slow.rs:
pub(crate) fn parse_long_mantissa<F: Float>(s: &[u8]) -> BiasedFp {
const MAX_SHIFT: usize = 60;
const NUM_POWERS: usize = 19;
const POWERS: [u8; 19] =
[0, 3, 6, 9, 13, 16, 19, 23, 26, 29, 33, 36, 39, 43, 46, 49, 53, 56, 59];
let get_shift = |n| {
if n < NUM_POWERS { POWERS[n] as usize } else { MAX_SHIFT }
};
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let mut d = parse_decimal_seq(s);
// Short-circuit if the value can only be a literal 0 or infinity.
if d.num_digits == 0 || d.decimal_point < -324 {
return fp_zero;
} else if d.decimal_point >= 310 {
return fp_inf;
}
let mut exp2 = 0_i32;
let mut loop_result = None;
// Shift right toward (1/2 ... 1].
while d.decimal_point > 0 && loop_result.is_none() {
let n = d.decimal_point as usize;
let shift = get_shift(n);
d.right_shift(shift);
if d.decimal_point < -DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_zero);
} else {
exp2 += shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// Shift left toward (1/2 ... 1].
while d.decimal_point <= 0 && loop_result.is_none() {
let shift = if d.decimal_point == 0 {
match d.digits[0] {
digit if digit >= 5 => break,
0 | 1 => 2,
_ => 1,
}
} else {
get_shift((-d.decimal_point) as _)
};
d.left_shift(shift);
if d.decimal_point > DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_inf);
} else {
exp2 -= shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// We are now in the range [1/2 ... 1] but the binary format uses [1 ... 2].
exp2 -= 1;
while F::EXP_MIN > exp2 {
let mut n = (F::EXP_MIN - exp2) as usize;
if n > MAX_SHIFT {
n = MAX_SHIFT;
}
d.right_shift(n);
exp2 += n as i32;
}
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
// Shift the decimal to the hidden bit, and then round the value
// to get the high mantissa+1 bits.
d.left_shift(F::SIG_BITS as usize + 1);
let mut mantissa = d.round();
if mantissa >= (1_u64 << (F::SIG_BITS + 1)) {
// Rounding up overflowed to the carry bit, need to
// shift back to the hidden bit.
d.right_shift(1);
exp2 += 1;
mantissa = d.round();
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
}
let mut power2 = exp2 - F::EXP_MIN + 1;
if mantissa < (1_u64 << F::SIG_BITS) {
power2 -= 1;
}
// Zero out all the bits above the explicit mantissa bits.
mantissa &= (1_u64 << F::SIG_BITS) - 1;
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact final numeric-sign excerpt from crate/dec2flt/mod.rs:
let assembled_word = fp.m | ((fp.p_biased as u64) << F::SIG_BITS);
let assembly_result = biased_fp_to_float::<F>(fp);
let lexical_sign_applied = num.negative;
let result = if lexical_sign_applied {
core::ops::Neg::neg(assembly_result)
} else {
assembly_result
};
Thus a numeric execution that reaches the integer/slow selection route
assembles its selected pair with from_bits through biased_fp_to_float and only
then conditionally negates it. A successful try_fast_path returns earlier and
does not perform this assembly. compute_float and parse_long_mantissa produce
raw BiasedFp pairs and do not call from_u64, primitive float multiplication,
division, negation, or from_bits; they do, however, execute constants derived
from SIG_TOTAL_BITS before producing those pairs.
Retained structural-boundary evidence
-------------------------------------
Several adjacent structural bindings cite this same evidence record. Their
pinned library source identities are:
core/src/num/mod.rs
f0820f9dfb94999440c8cb4a349736fa21df7e5668e19b6b49e016ff67c05ce3
core/src/option.rs
7cf61204b05d98a95bc2e322d5fbfc1f4f91505109971917d9a7fb47151c50e6
core/src/slice/mod.rs
354992a6a3d69a0185eef9044a07ea5180e767bdb467aef55e69ee3d44317840
core/src/str/mod.rs
284b4c147b5d0497ce9146f6b96e564f196aed10411a62cdccf5fc5243d40f78
Exact ASCII-digit body from core/src/num/mod.rs:
pub const fn is_ascii_digit(&self) -> bool {
matches!(*self, b'0'..=b'9')
}
Exact Option control-flow bodies from core/src/option.rs:
fn branch(self) -> ControlFlow<Self::Residual, Self::Output> {
match self {
Some(v) => ControlFlow::Continue(v),
None => ControlFlow::Break(None),
}
}
fn from_residual(residual: Option<convert::Infallible>) -> Self {
match residual {
None => None,
}
}
Exact slice observation bodies from core/src/slice/mod.rs:
pub const fn first(&self) -> Option<&T> {
if let [first, ..] = self { Some(first) } else { None }
}
pub const fn split_first(&self) -> Option<(&T, &[T])> {
if let [first, tail @ ..] = self { Some((first, tail)) } else { None }
}
Exact string-byte body from core/src/str/mod.rs:
pub const fn as_bytes(&self) -> &[u8] {
// SAFETY: const sound because we transmute two types with the same layout
unsafe { mem::transmute(self) }
}
reference/model-evidence/binary64-probe.rs
#![feature(float_masks)]
use std::num::FpCategory;
fn bits(label: &str, value: f64) {
println!("{label}={:016x}", value.to_bits());
}
fn main() {
println!("target_arch={}", std::env::consts::ARCH);
println!("mantissa_digits={}", f64::MANTISSA_DIGITS);
println!("exponent_mask={:016x}", f64::EXPONENT_MASK);
println!("mantissa_mask={:016x}", f64::MANTISSA_MASK);
bits("nan", f64::NAN);
bits("infinity", f64::INFINITY);
bits("neg_infinity", f64::NEG_INFINITY);
for (label, value) in [
("nan_category", f64::NAN),
("infinity_category", f64::INFINITY),
("zero_category", 0.0),
("subnormal_category", f64::from_bits(1)),
("normal_category", 1.0),
] {
let category = match value.classify() {
FpCategory::Nan => "Nan",
FpCategory::Infinite => "Infinite",
FpCategory::Zero => "Zero",
FpCategory::Subnormal => "Subnormal",
FpCategory::Normal => "Normal",
};
println!("{label}={category}");
}
let payload_nan_word = 0x7ff0_0000_0000_0001_u64;
println!(
"from_bits_to_bits={:016x}",
f64::from_bits(payload_nan_word).to_bits()
);
bits("neg_payload_nan", -f64::from_bits(payload_nan_word));
bits("neg_zero", -0.0);
bits("subnormal_tie_to_even_zero", f64::from_bits(1) * 0.5);
bits("subnormal_tie_to_even_two", f64::from_bits(3) * 0.5);
bits("normal_division", 1.0 / 10.0);
bits("mul_negative_zero", -0.0 * 2.0);
bits("div_negative_zero", -1.0 / f64::INFINITY);
bits("div_negative_infinity", 1.0 / -0.0);
bits("mul_overflow", f64::MAX * (1.0 + f64::EPSILON));
println!("mul_zero_infinity_is_nan={}", (0.0 * f64::INFINITY).is_nan());
println!("div_zero_zero_is_nan={}", (0.0_f64 / 0.0_f64).is_nan());
println!("mul_nan_is_nan={}", (f64::NAN * 1.0).is_nan());
bits("cast_2_pow_53", (1_u64 << 53) as f64);
bits("cast_2_pow_53_plus_1", ((1_u64 << 53) + 1) as f64);
}
Assumptions / kernel axioms
- Classical.choice
- Quot.sound
- propext
conservative transitive union of saved axiom observations across node dependencies
Requirements depending on this item (32)
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
All 32 entries
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
- Exponent agreement
- Correctness or defer
- Native correctness or defer
- Numeric acceptance
- Accumulated-value diagnostic
- Record bounds
- Invalid rejection
- Accumulated-value diagnostic
- Equal-target bridge
- Exact rounding
- Infinity
- Invalid rejection
- NaN acceptance
- No spurious NaNs
- Numeric acceptance
- Numeric sign
- Selected exponent range
- Selected magnitude sign
- Signed zero
- Totality
- Rounding determinism
- Rounding totality
- Full-significand diagnostic
- Infinity
- NaN
- Rejection
These requirements are linked to this item through the declared dependencies of their proofs.
Record details
| Record source | Tablet/model-support.json |
|---|---|
| Kind | opaque external binding |
| Preservation assessment origin | VerifierPanel |
| Preservation fingerprint | preservation-v1:4ee89fd2f08aa2ba3128dd47d19e89421a8d6368ea4c3a83c4098540afc921f0 |
| Preservation current fingerprint | preservation-v1:4ee89fd2f08aa2ba3128dd47d19e89421a8d6368ea4c3a83c4098540afc921f0 |
| Preservation freshness | matches current fingerprint |
| Correspondence approved fingerprint | {"own_tex":"ded9f491be3645b6ae10ebf1288579776c2387c3e73da2da65a7c225d08863c9","lean_semantic_closure":"068fedc14b4d117f34e0a8caa8b7a66c56c5ff8f94b5c41fed41524fc71c431a","lean_relevant_definition_descendants":{"Binary64Model":"d80435c56f8fcbe084ebc2fbf05989a7ddf07434d0acd161302414cac32f964d","Binary64ModelDefault":"e2475cd1caad0eef450c903f24d2dfb8ffdfadf787ccad3621a86556f41e533a","F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2"},"lean_relevant_dependencies":["Binary64Model","Binary64ModelDefault","F64","core_num_FpCategory"],"preamble_tex":""} |
| Correspondence current fingerprint | {"own_tex":"ded9f491be3645b6ae10ebf1288579776c2387c3e73da2da65a7c225d08863c9","lean_semantic_closure":"068fedc14b4d117f34e0a8caa8b7a66c56c5ff8f94b5c41fed41524fc71c431a","lean_relevant_definition_descendants":{"Binary64Model":"d80435c56f8fcbe084ebc2fbf05989a7ddf07434d0acd161302414cac32f964d","Binary64ModelDefault":"e2475cd1caad0eef450c903f24d2dfb8ffdfadf787ccad3621a86556f41e533a","F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2"},"lean_relevant_dependencies":["Binary64Model","Binary64ModelDefault","F64","core_num_FpCategory"],"preamble_tex":""} |
| Correspondence freshness | matches current fingerprint |
Exact preservation assessment
{
"status": "VerifierPass",
"origin": "VerifierPanel",
"fingerprints": {
"own_tex_hash": "926bd344b0a2cbd9904b93091ac9bc1b1e84385a2b443e355974a8dae5119ce9",
"dep_statement_hashes": {
"Binary64ModelDefault": "be5dcc4afe23616ca8fd1d15d30fbbe4ee2621d68be3341b8e74a66e6dcd736f"
},
"combined_sound_fp": "preservation-v1:4ee89fd2f08aa2ba3128dd47d19e89421a8d6368ea4c3a83c4098540afc921f0"
},
"lane_votes": {
"v1": "Pass"
},
"reviewer_action_id": null
}Exact source record
{
"name": "F64.Insts.CoreCloneClone.clone",
"extracted_signature": ": F64 → Result F64",
"rust_symbol": "core::clone::impls::{impl core::clone::Clone for f64}::clone",
"raw_declaration_sha256": "5eaad5fb9af034045cf0dafed5af85445fe4af9a78958259a15a1faddd1e8f05",
"node": "ModelF64Clone",
"declaration": "dec2flt_model.ModelF64Clone"
}Captured evidence identities
[
{
"path": "reference/model-evidence/binary64-boundary.txt",
"sha256": "a17d82e7f789ce7f1fbb3922a66ec8806999e526532d637605263882d37b7abf",
"cited_by": [
"Tablet/ModelF64Clone.tex",
"Tablet/model-support.json"
]
},
{
"path": "reference/model-evidence/binary64-probe.rs",
"sha256": "68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e",
"cited_by": [
"reference/model-evidence/binary64-boundary.txt"
]
}
]core::f64::{f64}::MANTISSA_DIGITS
Inspect related source (1)
- MANTISSA_DIGITS · core/src/num/f64.rs:412 Rust library
Related source and models come from the extraction records and declared dependencies.
| Rust item | core::f64::{f64}::MANTISSA_DIGITS |
|---|---|
| Recorded source | /rustc/library/core/src/num/f64.rs |
| Lines | 412:4–412:34 |
The related-source link includes this operation’s Rust standard-library implementation.
Opaque extraction signature
: Result Std.U32Lean definition
Trellis authored this Lean model for an operation outside the mechanical extraction. Modeling choices explains its behavior and review.
import Tablet.Binary64ModelDefault
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: ModelF64MantissaDigits]
def ModelF64MantissaDigits : Result Std.U32 :=
-- BODY
Binary64ModelDefault.mantissaDigits
end dec2flt_model
Why this model is faithful
Definition
Preservation argument
Claim
Proof
f64::MANTISSA_DIGITS declaration is 53; see reference/model-evidence/binary64-boundary.txt.Authored arguments for individual requirements
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
Recorded review
| Correspondence | Pass |
|---|---|
| Preservation | VerifierPass |
ModelF64MantissaDigits · Lean checked
Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
reference/model-evidence/binary64-boundary.txt
Primary evidence for the binary64 boundary
==========================================
Scope and identities
--------------------
This record concerns the frozen x86_64-unknown-linux-gnu extraction, the
adapted Rust crate retained in this repository, and the installed toolchain
named by modeling-input/SETUP.md. The probe source is retained at
reference/model-evidence/binary64-probe.rs; no scratch source is required to
reproduce it.
Toolchain executable:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
Target:
x86_64-unknown-linux-gnu
rustc executable SHA-256:
162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
Probe source SHA-256:
68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
Compiled probe SHA-256:
f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
Frozen generated.lean SHA-256:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692
Frozen modeling-input/manifest.json SHA-256:
2fc182c0c7acccad30c449ca349b999759b84e8ed4ec9d590e8295e43eeec077
Approved Binary64ModelDefault.lean SHA-256 at the time of this record:
03ae48fb631e6242bd21bf95d0481b66acae05f8cab343c7ab279b3c116538a3
Exact reproduction commands
---------------------------
Run from the repository root:
R=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
P=reference/model-evidence/binary64-probe.rs
B=.trellis/scratch/binary64-probe
"$R" --version --verbose
sha256sum "$R"
sha256sum "$P"
"$R" --target x86_64-unknown-linux-gnu -C opt-level=0 "$P" -o "$B"
sha256sum "$B"
"$B"
Raw output
----------
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
rustc_sha256=162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
probe_sha256=68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
binary_sha256=f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
target_arch=x86_64
mantissa_digits=53
exponent_mask=7ff0000000000000
mantissa_mask=000fffffffffffff
nan=7ff8000000000000
infinity=7ff0000000000000
neg_infinity=fff0000000000000
nan_category=Nan
infinity_category=Infinite
zero_category=Zero
subnormal_category=Subnormal
normal_category=Normal
from_bits_to_bits=7ff0000000000001
neg_payload_nan=fff0000000000001
neg_zero=8000000000000000
subnormal_tie_to_even_zero=0000000000000000
subnormal_tie_to_even_two=0000000000000002
normal_division=3fb999999999999a
mul_negative_zero=8000000000000000
div_negative_zero=8000000000000000
div_negative_infinity=fff0000000000000
mul_overflow=7ff0000000000000
mul_zero_infinity_is_nan=true
div_zero_zero_is_nan=true
mul_nan_is_nan=true
cast_2_pow_53=4340000000000000
cast_2_pow_53_plus_1=4340000000000000
Pinned Rust library sources
---------------------------
The installed sources below belong to the same named toolchain. Their
SHA-256 identities are:
core/src/primitive_docs.rs
c4b8627dd67d5dac8f383f383a9e7ff1229ea43e7599610fc61988694cf0f3e5
core/src/num/f64.rs
84540a6a59e347c63caabe12cf895ba1239c76a50682471567007138fac1c618
core/src/clone.rs
23f9cfc80347fde6b8457d46fbf7a2b8d9f34c8c58601b0b6f714ca2f6d1976b
The exact relevant text of core/src/primitive_docs.rs is:
#[rustc_doc_primitive = "f64"]
#[doc(alias = "double")]
/// A 64-bit floating-point type (specifically, the "binary64" type defined in IEEE 754-2008).
///
/// This type is very similar to [`prim@f32`], but has increased precision by using twice as many
/// bits. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on double-precision
/// values][wikipedia] for more information.
The referenced primitive-f32 documentation supplies the common primitive
floating-point operation rules quoted next:
/// - −0.0: IEEE 754 floating-point numbers have a bit that indicates their sign, so −0.0 is a
/// possible value. For comparison −0.0 = +0.0, but floating-point operations can carry
/// the sign bit through arithmetic operations. This means −0.0 × +0.0 produces −0.0 and
/// a negative number rounded to a value smaller than a float can represent also produces −0.0.
/// - [∞](#associatedconstant.INFINITY) and
/// [−∞](#associatedconstant.NEG_INFINITY): these result from calculations
/// like `1.0 / 0.0`.
///
/// When a primitive operation (addition, subtraction, multiplication, or
/// division) is performed on this type, the result is rounded according to the
/// roundTiesToEven direction defined in IEEE 754-2008. That means:
///
/// - The result is the representable value closest to the true value, if there
/// is a unique closest representable value.
/// - If the true value is exactly half-way between two representable values,
/// the result is the one with an even least-significant binary digit.
/// - If the true value's magnitude is ≥ `f32::MAX` + 2<sup>(`f32::MAX_EXP` −
/// `f32::MANTISSA_DIGITS` − 1)</sup>, the result is ∞ or −∞ (preserving the
/// true value's sign).
The same file explicitly separates arithmetic NaN choice from exact bitwise
operations; its exact relevant text is:
/// The rules for NaN values differ between *arithmetic* and *non-arithmetic* (or "bitwise")
/// operations. The non-arithmetic operations are unary `-`, `abs`, `copysign`, `signum`,
/// `{to,from}_bits`, `{to,from}_{be,le,ne}_bytes` and `is_sign_{positive,negative}`. These
/// operations are guaranteed to exactly preserve the bit pattern of their input except for possibly
/// changing the sign bit.
///
/// The following rules apply when a NaN value is returned from an arithmetic operation:
/// - The result has a non-deterministic sign.
/// - The quiet bit and payload are non-deterministically chosen from
/// the following set of options:
///
/// - **Preferred NaN**: The quiet bit is set and the payload is all-zero.
/// - **Quieting NaN propagation**: The quiet bit is set and the payload is copied from any input
/// operand that is a NaN. If the inputs and outputs do not have the same payload size (i.e., for
/// `as` casts), then
/// - If the output is smaller than the input, low-order bits of the payload get dropped.
/// - If the output is larger than the input, the payload gets filled up with 0s in the low-order
/// bits.
/// - **Unchanged NaN propagation**: The quiet bit and payload are copied from any input operand
/// that is a NaN. If the inputs and outputs do not have the same size (i.e., for `as` casts), the
/// same rules as for "quieting NaN propagation" apply, with one caveat: if the output is smaller
/// than the input, dropping the low-order bits may result in a payload of 0; a payload of 0 is not
/// possible with a signaling NaN (the all-0 significand encodes an infinity) so unchanged NaN
/// propagation cannot occur with some inputs.
/// - **Target-specific NaN**: The quiet bit is set and the payload is picked from a target-specific
/// set of "extra" possible NaN payloads. The set can depend on the input operand values.
/// See the table below for the concrete NaNs this set contains on various targets.
///
/// | `target_arch` | Extra payloads possible on this platform |
/// |---------------|------------------------------------------|
/// | `aarch64`, `arm`, `arm64ec`, `loongarch64`, `powerpc` (except when `target_abi = "spe"`), `powerpc64`, `riscv32`, `riscv64`, `s390x`, `x86`, `x86_64` | None |
Thus the model's preferred quiet NaN is one permitted result whenever
multiplication or division returns NaN. This does not claim that arbitrary
Rust arithmetic NaNs have those exact bits. By contrast, unary negation and
bit conversion must preserve all non-sign bits exactly, including for every
NaN payload.
The exact relevant declarations in core/src/num/f64.rs are:
pub const MANTISSA_DIGITS: u32 = 53;
pub const NAN: f64 = 0.0_f64 / 0.0_f64;
pub const INFINITY: f64 = 1.0_f64 / 0.0_f64;
pub const NEG_INFINITY: f64 = -1.0_f64 / 0.0_f64;
pub const SIGN_MASK: u64 = 0x8000_0000_0000_0000;
pub const EXPONENT_MASK: u64 = 0x7ff0_0000_0000_0000;
pub const MANTISSA_MASK: u64 = 0x000f_ffff_ffff_ffff;
pub const fn classify(self) -> FpCategory {
// We used to have complicated logic here that avoids the simple bit-based tests to work
// around buggy codegen for x87 targets (see
// https://github.com/rust-lang/rust/issues/114479). However, some LLVM versions later, none
// of our tests is able to find any difference between the complicated and the naive
// version, so now we are back to the naive version.
let b = self.to_bits();
match (b & Self::MANTISSA_MASK, b & Self::EXPONENT_MASK) {
(0, Self::EXPONENT_MASK) => FpCategory::Infinite,
(_, Self::EXPONENT_MASK) => FpCategory::Nan,
(0, 0) => FpCategory::Zero,
(_, 0) => FpCategory::Subnormal,
_ => FpCategory::Normal,
}
}
pub const fn to_bits(self) -> u64 {
// SAFETY: `u64` is a plain old datatype so we can always transmute to it.
unsafe { mem::transmute(self) }
}
pub const fn from_bits(v: u64) -> Self {
// It turns out the safety issues with sNaN were overblown! Hooray!
// SAFETY: `u64` is a plain old datatype so we can always transmute from it.
unsafe { mem::transmute(v) }
}
The exact scalar clone body in core/src/clone.rs is:
impl const Clone for $t {
#[inline(always)]
fn clone(&self) -> Self {
*self
}
}
Frozen adapted source
---------------------
The relevant retained source file hashes are:
crate/traits.rs
9013270fb846edcb0bdf2abd0353f575fdd727974cba9e89bdab8bb4c2b4f0bf
crate/dec2flt/mod.rs
b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012
crate/dec2flt/parse.rs
50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f
crate/dec2flt/decimal.rs
633658be803b7369b18feb098a8aa1b5f714a933d3b79ecbc4899a1b05f35beb
crate/dec2flt/lemire.rs
fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1
crate/dec2flt/slow.rs
93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485
Exact constant and bit-conversion excerpt from crate/traits.rs:
impl Float for f64 {
type Int = u64;
const INFINITY: Self = Self::INFINITY;
const NEG_INFINITY: Self = Self::NEG_INFINITY;
const NAN: Self = Self::NAN;
// Bit-identical to the upstream `-f64::NAN`, without the unsupported
// compile-time float negation.
const NEG_NAN: Self = f64::from_bits(0xFFF8_0000_0000_0000);
const BITS: u32 = 64;
const SIG_TOTAL_BITS: u32 = Self::MANTISSA_DIGITS;
const EXP_MASK: Self::Int = Self::EXPONENT_MASK;
const SIG_MASK: Self::Int = Self::MANTISSA_MASK;
fn to_bits(self) -> Self::Int {
self.to_bits()
}
fn classify(self) -> FpCategory {
self.classify()
}
}
impl FloatExt for f64 {
#[inline]
fn from_u64_bits(v: u64) -> Self {
f64::from_bits(v)
}
Exact derived-constant defaults from crate/traits.rs:
/// The number of bits in the significand, *excluding* the hidden bit.
const SIG_BITS: u32 = Self::SIG_TOTAL_BITS - 1;
/// Number of bits in the exponent.
const EXP_BITS: u32 = Self::BITS - Self::SIG_BITS - 1;
/// The saturated (maximum bitpattern) value of the exponent, i.e. the infinite
/// representation.
///
/// This shifted fully right, use `EXP_MASK` for the shifted value.
const EXP_SAT: u32 = (1 << Self::EXP_BITS) - 1;
/// Signed version of `EXP_SAT` since we convert a lot.
const INFINITE_POWER: i32 = Self::EXP_SAT as i32;
/// The exponent bias value. This is also the maximum value of the exponent.
const EXP_BIAS: u32 = Self::EXP_SAT >> 1;
/// Minimum exponent value of normal values.
const EXP_MIN: i32 = -(Self::EXP_BIAS as i32 - 1);
Together with the f64-instance lines `BITS = 64` and
`SIG_TOTAL_BITS = Self::MANTISSA_DIGITS` in the preceding excerpt, these
defaults derive SIG_BITS, EXP_MIN, and INFINITE_POWER from the primitive
mantissa-digit constant rather than introducing independent parameters.
Exact checked cast excerpt from crate/dec2flt/mod.rs:
#[inline]
// This method is precisely the source `u64 as f64` primitive conversion.
// Aeneas cannot translate that cast; opacity is confined to the cast while
// the fast-path algorithm, its range proof obligation, and all calls stay
// visible in the extracted model.
#[charon::opaque]
fn from_u64(v: u64) -> Self {
debug_assert!(v <= Self::MAX_MANTISSA_FAST_PATH);
v as _
}
Here MAX_MANTISSA_FAST_PATH is the retained default 1 << 53. Therefore the
source succeeds only through the modeled branch v <= 2^53 in this debug
configuration; above it the debug assertion fails before the cast. On the
successful branch every integer is exactly representable, so the source cast
and the model rounder return the same word.
Exact power-table and assembly excerpts from crate/dec2flt/mod.rs:
/// Maximum mantissa for the fast-path (`1 << 53` for f64).
const MAX_MANTISSA_FAST_PATH: u64 = 1 << Self::SIG_TOTAL_BITS;
const MAX_EXPONENT_FAST_PATH: i64 = 22;
const MIN_EXPONENT_FAST_PATH: i64 = -Self::MAX_EXPONENT_FAST_PATH;
const MAX_EXPONENT_DISGUISED_FAST_PATH: i64 = 37;
fn pow10_fast_path(exponent: usize) -> Self {
// These bit patterns are exactly the source table's rounded binary64
// literals. The match is the same masked lookup; it merely keeps float
// constants out of Aeneas's unsupported constant interpreter.
match exponent & 31 {
0 => f64::from_bits(0x3FF0_0000_0000_0000),
1 => f64::from_bits(0x4024_0000_0000_0000),
2 => f64::from_bits(0x4059_0000_0000_0000),
3 => f64::from_bits(0x408F_4000_0000_0000),
4 => f64::from_bits(0x40C3_8800_0000_0000),
5 => f64::from_bits(0x40F8_6A00_0000_0000),
6 => f64::from_bits(0x412E_8480_0000_0000),
7 => f64::from_bits(0x4163_12D0_0000_0000),
8 => f64::from_bits(0x4197_D784_0000_0000),
9 => f64::from_bits(0x41CD_CD65_0000_0000),
10 => f64::from_bits(0x4202_A05F_2000_0000),
11 => f64::from_bits(0x4237_4876_E800_0000),
12 => f64::from_bits(0x426D_1A94_A200_0000),
13 => f64::from_bits(0x42A2_309C_E540_0000),
14 => f64::from_bits(0x42D6_BCC4_1E90_0000),
15 => f64::from_bits(0x430C_6BF5_2634_0000),
16 => f64::from_bits(0x4341_C379_37E0_8000),
17 => f64::from_bits(0x4376_3457_85D8_A000),
18 => f64::from_bits(0x43AB_C16D_674E_C800),
19 => f64::from_bits(0x43E1_58E4_6091_3D00),
20 => f64::from_bits(0x4415_AF1D_78B5_8C40),
21 => f64::from_bits(0x444B_1AE4_D6E2_EF50),
22 => f64::from_bits(0x4480_F0CF_064D_D592),
_ => f64::from_bits(0),
}
}
fn biased_fp_to_float<F: FloatExt>(x: BiasedFp) -> F {
let mut word = x.m;
word |= (x.p_biased as u64) << F::SIG_BITS;
F::from_u64_bits(word)
}
Exact native-call excerpt from crate/dec2flt/decimal.rs:
fn can_use_fast_path<F: Lemire>(&self) -> bool {
F::MIN_EXPONENT_FAST_PATH <= self.exponent
&& self.exponent <= F::MAX_EXPONENT_DISGUISED_FAST_PATH
&& self.mantissa <= F::MAX_MANTISSA_FAST_PATH
&& !self.many_digits
}
if !self.can_use_fast_path::<F>() {
return None;
}
let value = if self.exponent <= F::MAX_EXPONENT_FAST_PATH {
// normal fast path
let value = F::from_u64(self.mantissa);
if self.exponent < 0 {
// Explicit trait calls preserve Rust arithmetic and resolve
// the generic output type that Charon leaves ambiguous.
core::ops::Div::div(value, F::pow10_fast_path((-self.exponent) as _))
} else {
core::ops::Mul::mul(value, F::pow10_fast_path(self.exponent as _))
}
} else {
// disguised fast path
let shift = self.exponent - F::MAX_EXPONENT_FAST_PATH;
let mantissa = self.mantissa.checked_mul(INT_POW10[shift as usize])?;
if mantissa > F::MAX_MANTISSA_FAST_PATH {
return None;
}
core::ops::Mul::mul(
F::from_u64(mantissa),
F::pow10_fast_path(F::MAX_EXPONENT_FAST_PATH as _),
)
};
if self.negative {
Some(core::ops::Neg::neg(value))
} else {
Some(value)
}
The preceding can_use_fast_path body, together with
MAX_MANTISSA_FAST_PATH = 1 << SIG_TOTAL_BITS and SIG_TOTAL_BITS = 53 for f64,
requires the exponent to lie between -22 and 37, the input mantissa to be at
most 2^53, and many_digits to be false. Consequently an ordinary arithmetic
call has a from_u64 operand in 0..=2^53. In its negative-exponent arm,
`-self.exponent` lies in 1..=22; in its nonnegative arm, `self.exponent` lies
in 0..=22. The disguised branch checks its multiplied mantissa against 2^53
before from_u64 and uses table index 22. The paired statement
Binary64NativeCallDomain does not assert this source reachability. It says
conditionally that a from_u64 argument at most 2^53 succeeds with a finite,
non-NaN word and that a table index at most 22 succeeds with a positive,
nonzero, finite, non-NaN word. Applying that conditional statement to the
guards just derived establishes those properties for the actual ordinary and
disguised calls, and in particular establishes that every executed divisor is
nonzero.
Exact special-value excerpt from crate/dec2flt/parse.rs:
let float = match (register, len) {
(INF_3, 3) => F::INFINITY,
(INF_8, 8) => F::INFINITY,
(NAN, 3) => F::NAN,
_ => return None,
};
if negative { Some(-float) } else { Some(float) }
Thus the executed special route is INFINITY or NAN followed by conditional
negation; it does not select NEG_INFINITY or NEG_NAN directly.
The number helper has the exact source body
pub fn parse_number(s: &[u8]) -> Option<Decimal> {
if let Some((float, rest)) = parse_partial_number(s) {
if rest == s.len() {
return Some(float);
}
}
None
}
It returns only the Decimal produced by parse_partial_number; there is no
float type parameter or float operation at this boundary.
The integer-tier helper has the source type and exact executable excerpts
below (long explanatory comments are elided). In particular it returns a raw
BiasedFp and contains no from_u64 cast, primitive float multiplication,
division, negation, or from_bits call:
pub fn compute_float<F: Float>(q: i64, mut w: u64) -> BiasedFp {
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let fp_error = BiasedFp::zero_pow2(-1);
// Short-circuit if the value can only be a literal 0 or infinity.
if w == 0 || q < F::SMALLEST_POWER_OF_TEN as i64 {
return fp_zero;
} else if q > F::LARGEST_POWER_OF_TEN as i64 {
return fp_inf;
}
// Normalize our significant digits, so the most-significant bit is set.
let lz = w.leading_zeros();
w <<= lz;
let (lo, hi) = compute_product_approx(q, w, F::SIG_BITS as usize + 3);
if lo == 0xFFFF_FFFF_FFFF_FFFF {
let inside_safe_exponent = (q >= -27) && (q <= 55);
if !inside_safe_exponent {
return fp_error;
}
}
let upperbit = (hi >> 63) as i32;
let mut mantissa = hi >> (upperbit + 64 - F::SIG_BITS as i32 - 3);
let mut power2 = power(q as i32) + upperbit - lz as i32 - F::EXP_MIN + 1;
if power2 <= 0 {
if -power2 + 1 >= 64 {
// Have more than 64 bits below the minimum exponent, must be 0.
return fp_zero;
}
// Have a subnormal value.
mantissa >>= -power2 + 1;
mantissa += mantissa & 1;
mantissa >>= 1;
power2 = (mantissa >= (1_u64 << F::SIG_BITS)) as i32;
return BiasedFp { m: mantissa, p_biased: power2 };
}
// Need to handle rounding ties. Normally, we need to round up,
// but if we fall right in between and we have an even basis, we
// need to round down.
if lo <= 1
&& q >= F::MIN_EXPONENT_ROUND_TO_EVEN as i64
&& q <= F::MAX_EXPONENT_ROUND_TO_EVEN as i64
&& mantissa & 0b11 == 0b01
&& (mantissa << (upperbit + 64 - F::SIG_BITS as i32 - 3)) == hi
{
// Zero the lowest bit, so we don't round up.
mantissa &= !1_u64;
}
// Round-to-even, then shift the significant digits into place.
mantissa += mantissa & 1;
mantissa >>= 1;
if mantissa >= (2_u64 << F::SIG_BITS) {
// Rounding up overflowed, so the carry bit is set. Set the
// mantissa to 1 (only the implicit, hidden bit is set) and
// increase the exponent.
mantissa = 1_u64 << F::SIG_BITS;
power2 += 1;
}
// Zero out the hidden bit.
mantissa &= !(1_u64 << F::SIG_BITS);
if power2 >= F::INFINITE_POWER {
// Exponent is above largest normal value, must be infinite.
return fp_inf;
}
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact slow-tier source body from crate/dec2flt/slow.rs:
pub(crate) fn parse_long_mantissa<F: Float>(s: &[u8]) -> BiasedFp {
const MAX_SHIFT: usize = 60;
const NUM_POWERS: usize = 19;
const POWERS: [u8; 19] =
[0, 3, 6, 9, 13, 16, 19, 23, 26, 29, 33, 36, 39, 43, 46, 49, 53, 56, 59];
let get_shift = |n| {
if n < NUM_POWERS { POWERS[n] as usize } else { MAX_SHIFT }
};
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let mut d = parse_decimal_seq(s);
// Short-circuit if the value can only be a literal 0 or infinity.
if d.num_digits == 0 || d.decimal_point < -324 {
return fp_zero;
} else if d.decimal_point >= 310 {
return fp_inf;
}
let mut exp2 = 0_i32;
let mut loop_result = None;
// Shift right toward (1/2 ... 1].
while d.decimal_point > 0 && loop_result.is_none() {
let n = d.decimal_point as usize;
let shift = get_shift(n);
d.right_shift(shift);
if d.decimal_point < -DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_zero);
} else {
exp2 += shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// Shift left toward (1/2 ... 1].
while d.decimal_point <= 0 && loop_result.is_none() {
let shift = if d.decimal_point == 0 {
match d.digits[0] {
digit if digit >= 5 => break,
0 | 1 => 2,
_ => 1,
}
} else {
get_shift((-d.decimal_point) as _)
};
d.left_shift(shift);
if d.decimal_point > DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_inf);
} else {
exp2 -= shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// We are now in the range [1/2 ... 1] but the binary format uses [1 ... 2].
exp2 -= 1;
while F::EXP_MIN > exp2 {
let mut n = (F::EXP_MIN - exp2) as usize;
if n > MAX_SHIFT {
n = MAX_SHIFT;
}
d.right_shift(n);
exp2 += n as i32;
}
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
// Shift the decimal to the hidden bit, and then round the value
// to get the high mantissa+1 bits.
d.left_shift(F::SIG_BITS as usize + 1);
let mut mantissa = d.round();
if mantissa >= (1_u64 << (F::SIG_BITS + 1)) {
// Rounding up overflowed to the carry bit, need to
// shift back to the hidden bit.
d.right_shift(1);
exp2 += 1;
mantissa = d.round();
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
}
let mut power2 = exp2 - F::EXP_MIN + 1;
if mantissa < (1_u64 << F::SIG_BITS) {
power2 -= 1;
}
// Zero out all the bits above the explicit mantissa bits.
mantissa &= (1_u64 << F::SIG_BITS) - 1;
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact final numeric-sign excerpt from crate/dec2flt/mod.rs:
let assembled_word = fp.m | ((fp.p_biased as u64) << F::SIG_BITS);
let assembly_result = biased_fp_to_float::<F>(fp);
let lexical_sign_applied = num.negative;
let result = if lexical_sign_applied {
core::ops::Neg::neg(assembly_result)
} else {
assembly_result
};
Thus a numeric execution that reaches the integer/slow selection route
assembles its selected pair with from_bits through biased_fp_to_float and only
then conditionally negates it. A successful try_fast_path returns earlier and
does not perform this assembly. compute_float and parse_long_mantissa produce
raw BiasedFp pairs and do not call from_u64, primitive float multiplication,
division, negation, or from_bits; they do, however, execute constants derived
from SIG_TOTAL_BITS before producing those pairs.
Retained structural-boundary evidence
-------------------------------------
Several adjacent structural bindings cite this same evidence record. Their
pinned library source identities are:
core/src/num/mod.rs
f0820f9dfb94999440c8cb4a349736fa21df7e5668e19b6b49e016ff67c05ce3
core/src/option.rs
7cf61204b05d98a95bc2e322d5fbfc1f4f91505109971917d9a7fb47151c50e6
core/src/slice/mod.rs
354992a6a3d69a0185eef9044a07ea5180e767bdb467aef55e69ee3d44317840
core/src/str/mod.rs
284b4c147b5d0497ce9146f6b96e564f196aed10411a62cdccf5fc5243d40f78
Exact ASCII-digit body from core/src/num/mod.rs:
pub const fn is_ascii_digit(&self) -> bool {
matches!(*self, b'0'..=b'9')
}
Exact Option control-flow bodies from core/src/option.rs:
fn branch(self) -> ControlFlow<Self::Residual, Self::Output> {
match self {
Some(v) => ControlFlow::Continue(v),
None => ControlFlow::Break(None),
}
}
fn from_residual(residual: Option<convert::Infallible>) -> Self {
match residual {
None => None,
}
}
Exact slice observation bodies from core/src/slice/mod.rs:
pub const fn first(&self) -> Option<&T> {
if let [first, ..] = self { Some(first) } else { None }
}
pub const fn split_first(&self) -> Option<(&T, &[T])> {
if let [first, tail @ ..] = self { Some((first, tail)) } else { None }
}
Exact string-byte body from core/src/str/mod.rs:
pub const fn as_bytes(&self) -> &[u8] {
// SAFETY: const sound because we transmute two types with the same layout
unsafe { mem::transmute(self) }
}
reference/model-evidence/binary64-probe.rs
#![feature(float_masks)]
use std::num::FpCategory;
fn bits(label: &str, value: f64) {
println!("{label}={:016x}", value.to_bits());
}
fn main() {
println!("target_arch={}", std::env::consts::ARCH);
println!("mantissa_digits={}", f64::MANTISSA_DIGITS);
println!("exponent_mask={:016x}", f64::EXPONENT_MASK);
println!("mantissa_mask={:016x}", f64::MANTISSA_MASK);
bits("nan", f64::NAN);
bits("infinity", f64::INFINITY);
bits("neg_infinity", f64::NEG_INFINITY);
for (label, value) in [
("nan_category", f64::NAN),
("infinity_category", f64::INFINITY),
("zero_category", 0.0),
("subnormal_category", f64::from_bits(1)),
("normal_category", 1.0),
] {
let category = match value.classify() {
FpCategory::Nan => "Nan",
FpCategory::Infinite => "Infinite",
FpCategory::Zero => "Zero",
FpCategory::Subnormal => "Subnormal",
FpCategory::Normal => "Normal",
};
println!("{label}={category}");
}
let payload_nan_word = 0x7ff0_0000_0000_0001_u64;
println!(
"from_bits_to_bits={:016x}",
f64::from_bits(payload_nan_word).to_bits()
);
bits("neg_payload_nan", -f64::from_bits(payload_nan_word));
bits("neg_zero", -0.0);
bits("subnormal_tie_to_even_zero", f64::from_bits(1) * 0.5);
bits("subnormal_tie_to_even_two", f64::from_bits(3) * 0.5);
bits("normal_division", 1.0 / 10.0);
bits("mul_negative_zero", -0.0 * 2.0);
bits("div_negative_zero", -1.0 / f64::INFINITY);
bits("div_negative_infinity", 1.0 / -0.0);
bits("mul_overflow", f64::MAX * (1.0 + f64::EPSILON));
println!("mul_zero_infinity_is_nan={}", (0.0 * f64::INFINITY).is_nan());
println!("div_zero_zero_is_nan={}", (0.0_f64 / 0.0_f64).is_nan());
println!("mul_nan_is_nan={}", (f64::NAN * 1.0).is_nan());
bits("cast_2_pow_53", (1_u64 << 53) as f64);
bits("cast_2_pow_53_plus_1", ((1_u64 << 53) + 1) as f64);
}
Assumptions / kernel axioms
- Classical.choice
- Quot.sound
- propext
conservative transitive union of saved axiom observations across node dependencies
Requirements depending on this item (32)
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
All 32 entries
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
- Exponent agreement
- Correctness or defer
- Native correctness or defer
- Numeric acceptance
- Accumulated-value diagnostic
- Record bounds
- Invalid rejection
- Accumulated-value diagnostic
- Equal-target bridge
- Exact rounding
- Infinity
- Invalid rejection
- NaN acceptance
- No spurious NaNs
- Numeric acceptance
- Numeric sign
- Selected exponent range
- Selected magnitude sign
- Signed zero
- Totality
- Rounding determinism
- Rounding totality
- Full-significand diagnostic
- Infinity
- NaN
- Rejection
These requirements are linked to this item through the declared dependencies of their proofs.
Record details
| Record source | Tablet/model-support.json |
|---|---|
| Kind | opaque external binding |
| Preservation assessment origin | VerifierPanel |
| Preservation fingerprint | preservation-v1:96b3c2618601509c40b319a519a99908fdb4df7ac29613ec77f07a3f42f7278c |
| Preservation current fingerprint | preservation-v1:96b3c2618601509c40b319a519a99908fdb4df7ac29613ec77f07a3f42f7278c |
| Preservation freshness | matches current fingerprint |
| Correspondence approved fingerprint | {"own_tex":"b8b7cf0690e2428d01acbbf9bf6bef6fdb3f9341df552b26b74ed6e102c32ecc","lean_semantic_closure":"02593c098e85d6df521ae27a662f7e0cccae25cbd2b0b466e6e70737ec6a8a9a","lean_relevant_definition_descendants":{"Binary64Model":"d80435c56f8fcbe084ebc2fbf05989a7ddf07434d0acd161302414cac32f964d","Binary64ModelDefault":"e2475cd1caad0eef450c903f24d2dfb8ffdfadf787ccad3621a86556f41e533a","F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2"},"lean_relevant_dependencies":["Binary64Model","Binary64ModelDefault","F64","core_num_FpCategory"],"preamble_tex":""} |
| Correspondence current fingerprint | {"own_tex":"b8b7cf0690e2428d01acbbf9bf6bef6fdb3f9341df552b26b74ed6e102c32ecc","lean_semantic_closure":"02593c098e85d6df521ae27a662f7e0cccae25cbd2b0b466e6e70737ec6a8a9a","lean_relevant_definition_descendants":{"Binary64Model":"d80435c56f8fcbe084ebc2fbf05989a7ddf07434d0acd161302414cac32f964d","Binary64ModelDefault":"e2475cd1caad0eef450c903f24d2dfb8ffdfadf787ccad3621a86556f41e533a","F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2"},"lean_relevant_dependencies":["Binary64Model","Binary64ModelDefault","F64","core_num_FpCategory"],"preamble_tex":""} |
| Correspondence freshness | matches current fingerprint |
Exact preservation assessment
{
"status": "VerifierPass",
"origin": "VerifierPanel",
"fingerprints": {
"own_tex_hash": "c666e5b8a9a528def14afe47a3a303e33c449dfe32ea101170522aec053b8361",
"dep_statement_hashes": {
"Binary64ModelDefault": "be5dcc4afe23616ca8fd1d15d30fbbe4ee2621d68be3341b8e74a66e6dcd736f"
},
"combined_sound_fp": "preservation-v1:96b3c2618601509c40b319a519a99908fdb4df7ac29613ec77f07a3f42f7278c"
},
"lane_votes": {
"v1": "Pass"
},
"reviewer_action_id": null
}Exact source record
{
"name": "core.f64.F64.MANTISSA_DIGITS",
"extracted_signature": ": Result Std.U32",
"rust_symbol": "core::f64::{f64}::MANTISSA_DIGITS",
"raw_declaration_sha256": "42b1b0c4d2c2bbc7271748fc78c518391f55bf6517c643667a6561a0ac6e771c",
"node": "ModelF64MantissaDigits",
"declaration": "dec2flt_model.ModelF64MantissaDigits"
}Captured evidence identities
[
{
"path": "reference/model-evidence/binary64-boundary.txt",
"sha256": "a17d82e7f789ce7f1fbb3922a66ec8806999e526532d637605263882d37b7abf",
"cited_by": [
"Tablet/ModelF64MantissaDigits.tex",
"Tablet/model-support.json"
]
},
{
"path": "reference/model-evidence/binary64-probe.rs",
"sha256": "68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e",
"cited_by": [
"reference/model-evidence/binary64-boundary.txt"
]
}
]core::f64::{f64}::NAN
Inspect related source (1)
- NAN · core/src/num/f64.rs:509 Rust library
Related source and models come from the extraction records and declared dependencies.
| Rust item | core::f64::{f64}::NAN |
|---|---|
| Recorded source | /rustc/library/core/src/num/f64.rs |
| Lines | 509:4–509:22 |
The related-source link includes this operation’s Rust standard-library implementation.
Opaque extraction signature
: Result F64Lean definition
Trellis authored this Lean model for an operation outside the mechanical extraction. Modeling choices explains its behavior and review.
import Tablet.Binary64ModelDefault
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: ModelF64Nan]
def ModelF64Nan : Result F64 :=
-- BODY
Binary64ModelDefault.nan
end dec2flt_model
Why this model is faithful
Definition
Preservation argument
Claim
f64::NAN on the frozen target and toolchain.Proof
7ff8000000000000; see reference/model-evidence/binary64-boundary.txt.Authored arguments for individual requirements
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
Recorded review
| Correspondence | Pass |
|---|---|
| Preservation | VerifierPass |
ModelF64Nan · Lean checked
Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
reference/model-evidence/binary64-boundary.txt
Primary evidence for the binary64 boundary
==========================================
Scope and identities
--------------------
This record concerns the frozen x86_64-unknown-linux-gnu extraction, the
adapted Rust crate retained in this repository, and the installed toolchain
named by modeling-input/SETUP.md. The probe source is retained at
reference/model-evidence/binary64-probe.rs; no scratch source is required to
reproduce it.
Toolchain executable:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
Target:
x86_64-unknown-linux-gnu
rustc executable SHA-256:
162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
Probe source SHA-256:
68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
Compiled probe SHA-256:
f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
Frozen generated.lean SHA-256:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692
Frozen modeling-input/manifest.json SHA-256:
2fc182c0c7acccad30c449ca349b999759b84e8ed4ec9d590e8295e43eeec077
Approved Binary64ModelDefault.lean SHA-256 at the time of this record:
03ae48fb631e6242bd21bf95d0481b66acae05f8cab343c7ab279b3c116538a3
Exact reproduction commands
---------------------------
Run from the repository root:
R=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
P=reference/model-evidence/binary64-probe.rs
B=.trellis/scratch/binary64-probe
"$R" --version --verbose
sha256sum "$R"
sha256sum "$P"
"$R" --target x86_64-unknown-linux-gnu -C opt-level=0 "$P" -o "$B"
sha256sum "$B"
"$B"
Raw output
----------
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
rustc_sha256=162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
probe_sha256=68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
binary_sha256=f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
target_arch=x86_64
mantissa_digits=53
exponent_mask=7ff0000000000000
mantissa_mask=000fffffffffffff
nan=7ff8000000000000
infinity=7ff0000000000000
neg_infinity=fff0000000000000
nan_category=Nan
infinity_category=Infinite
zero_category=Zero
subnormal_category=Subnormal
normal_category=Normal
from_bits_to_bits=7ff0000000000001
neg_payload_nan=fff0000000000001
neg_zero=8000000000000000
subnormal_tie_to_even_zero=0000000000000000
subnormal_tie_to_even_two=0000000000000002
normal_division=3fb999999999999a
mul_negative_zero=8000000000000000
div_negative_zero=8000000000000000
div_negative_infinity=fff0000000000000
mul_overflow=7ff0000000000000
mul_zero_infinity_is_nan=true
div_zero_zero_is_nan=true
mul_nan_is_nan=true
cast_2_pow_53=4340000000000000
cast_2_pow_53_plus_1=4340000000000000
Pinned Rust library sources
---------------------------
The installed sources below belong to the same named toolchain. Their
SHA-256 identities are:
core/src/primitive_docs.rs
c4b8627dd67d5dac8f383f383a9e7ff1229ea43e7599610fc61988694cf0f3e5
core/src/num/f64.rs
84540a6a59e347c63caabe12cf895ba1239c76a50682471567007138fac1c618
core/src/clone.rs
23f9cfc80347fde6b8457d46fbf7a2b8d9f34c8c58601b0b6f714ca2f6d1976b
The exact relevant text of core/src/primitive_docs.rs is:
#[rustc_doc_primitive = "f64"]
#[doc(alias = "double")]
/// A 64-bit floating-point type (specifically, the "binary64" type defined in IEEE 754-2008).
///
/// This type is very similar to [`prim@f32`], but has increased precision by using twice as many
/// bits. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on double-precision
/// values][wikipedia] for more information.
The referenced primitive-f32 documentation supplies the common primitive
floating-point operation rules quoted next:
/// - −0.0: IEEE 754 floating-point numbers have a bit that indicates their sign, so −0.0 is a
/// possible value. For comparison −0.0 = +0.0, but floating-point operations can carry
/// the sign bit through arithmetic operations. This means −0.0 × +0.0 produces −0.0 and
/// a negative number rounded to a value smaller than a float can represent also produces −0.0.
/// - [∞](#associatedconstant.INFINITY) and
/// [−∞](#associatedconstant.NEG_INFINITY): these result from calculations
/// like `1.0 / 0.0`.
///
/// When a primitive operation (addition, subtraction, multiplication, or
/// division) is performed on this type, the result is rounded according to the
/// roundTiesToEven direction defined in IEEE 754-2008. That means:
///
/// - The result is the representable value closest to the true value, if there
/// is a unique closest representable value.
/// - If the true value is exactly half-way between two representable values,
/// the result is the one with an even least-significant binary digit.
/// - If the true value's magnitude is ≥ `f32::MAX` + 2<sup>(`f32::MAX_EXP` −
/// `f32::MANTISSA_DIGITS` − 1)</sup>, the result is ∞ or −∞ (preserving the
/// true value's sign).
The same file explicitly separates arithmetic NaN choice from exact bitwise
operations; its exact relevant text is:
/// The rules for NaN values differ between *arithmetic* and *non-arithmetic* (or "bitwise")
/// operations. The non-arithmetic operations are unary `-`, `abs`, `copysign`, `signum`,
/// `{to,from}_bits`, `{to,from}_{be,le,ne}_bytes` and `is_sign_{positive,negative}`. These
/// operations are guaranteed to exactly preserve the bit pattern of their input except for possibly
/// changing the sign bit.
///
/// The following rules apply when a NaN value is returned from an arithmetic operation:
/// - The result has a non-deterministic sign.
/// - The quiet bit and payload are non-deterministically chosen from
/// the following set of options:
///
/// - **Preferred NaN**: The quiet bit is set and the payload is all-zero.
/// - **Quieting NaN propagation**: The quiet bit is set and the payload is copied from any input
/// operand that is a NaN. If the inputs and outputs do not have the same payload size (i.e., for
/// `as` casts), then
/// - If the output is smaller than the input, low-order bits of the payload get dropped.
/// - If the output is larger than the input, the payload gets filled up with 0s in the low-order
/// bits.
/// - **Unchanged NaN propagation**: The quiet bit and payload are copied from any input operand
/// that is a NaN. If the inputs and outputs do not have the same size (i.e., for `as` casts), the
/// same rules as for "quieting NaN propagation" apply, with one caveat: if the output is smaller
/// than the input, dropping the low-order bits may result in a payload of 0; a payload of 0 is not
/// possible with a signaling NaN (the all-0 significand encodes an infinity) so unchanged NaN
/// propagation cannot occur with some inputs.
/// - **Target-specific NaN**: The quiet bit is set and the payload is picked from a target-specific
/// set of "extra" possible NaN payloads. The set can depend on the input operand values.
/// See the table below for the concrete NaNs this set contains on various targets.
///
/// | `target_arch` | Extra payloads possible on this platform |
/// |---------------|------------------------------------------|
/// | `aarch64`, `arm`, `arm64ec`, `loongarch64`, `powerpc` (except when `target_abi = "spe"`), `powerpc64`, `riscv32`, `riscv64`, `s390x`, `x86`, `x86_64` | None |
Thus the model's preferred quiet NaN is one permitted result whenever
multiplication or division returns NaN. This does not claim that arbitrary
Rust arithmetic NaNs have those exact bits. By contrast, unary negation and
bit conversion must preserve all non-sign bits exactly, including for every
NaN payload.
The exact relevant declarations in core/src/num/f64.rs are:
pub const MANTISSA_DIGITS: u32 = 53;
pub const NAN: f64 = 0.0_f64 / 0.0_f64;
pub const INFINITY: f64 = 1.0_f64 / 0.0_f64;
pub const NEG_INFINITY: f64 = -1.0_f64 / 0.0_f64;
pub const SIGN_MASK: u64 = 0x8000_0000_0000_0000;
pub const EXPONENT_MASK: u64 = 0x7ff0_0000_0000_0000;
pub const MANTISSA_MASK: u64 = 0x000f_ffff_ffff_ffff;
pub const fn classify(self) -> FpCategory {
// We used to have complicated logic here that avoids the simple bit-based tests to work
// around buggy codegen for x87 targets (see
// https://github.com/rust-lang/rust/issues/114479). However, some LLVM versions later, none
// of our tests is able to find any difference between the complicated and the naive
// version, so now we are back to the naive version.
let b = self.to_bits();
match (b & Self::MANTISSA_MASK, b & Self::EXPONENT_MASK) {
(0, Self::EXPONENT_MASK) => FpCategory::Infinite,
(_, Self::EXPONENT_MASK) => FpCategory::Nan,
(0, 0) => FpCategory::Zero,
(_, 0) => FpCategory::Subnormal,
_ => FpCategory::Normal,
}
}
pub const fn to_bits(self) -> u64 {
// SAFETY: `u64` is a plain old datatype so we can always transmute to it.
unsafe { mem::transmute(self) }
}
pub const fn from_bits(v: u64) -> Self {
// It turns out the safety issues with sNaN were overblown! Hooray!
// SAFETY: `u64` is a plain old datatype so we can always transmute from it.
unsafe { mem::transmute(v) }
}
The exact scalar clone body in core/src/clone.rs is:
impl const Clone for $t {
#[inline(always)]
fn clone(&self) -> Self {
*self
}
}
Frozen adapted source
---------------------
The relevant retained source file hashes are:
crate/traits.rs
9013270fb846edcb0bdf2abd0353f575fdd727974cba9e89bdab8bb4c2b4f0bf
crate/dec2flt/mod.rs
b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012
crate/dec2flt/parse.rs
50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f
crate/dec2flt/decimal.rs
633658be803b7369b18feb098a8aa1b5f714a933d3b79ecbc4899a1b05f35beb
crate/dec2flt/lemire.rs
fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1
crate/dec2flt/slow.rs
93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485
Exact constant and bit-conversion excerpt from crate/traits.rs:
impl Float for f64 {
type Int = u64;
const INFINITY: Self = Self::INFINITY;
const NEG_INFINITY: Self = Self::NEG_INFINITY;
const NAN: Self = Self::NAN;
// Bit-identical to the upstream `-f64::NAN`, without the unsupported
// compile-time float negation.
const NEG_NAN: Self = f64::from_bits(0xFFF8_0000_0000_0000);
const BITS: u32 = 64;
const SIG_TOTAL_BITS: u32 = Self::MANTISSA_DIGITS;
const EXP_MASK: Self::Int = Self::EXPONENT_MASK;
const SIG_MASK: Self::Int = Self::MANTISSA_MASK;
fn to_bits(self) -> Self::Int {
self.to_bits()
}
fn classify(self) -> FpCategory {
self.classify()
}
}
impl FloatExt for f64 {
#[inline]
fn from_u64_bits(v: u64) -> Self {
f64::from_bits(v)
}
Exact derived-constant defaults from crate/traits.rs:
/// The number of bits in the significand, *excluding* the hidden bit.
const SIG_BITS: u32 = Self::SIG_TOTAL_BITS - 1;
/// Number of bits in the exponent.
const EXP_BITS: u32 = Self::BITS - Self::SIG_BITS - 1;
/// The saturated (maximum bitpattern) value of the exponent, i.e. the infinite
/// representation.
///
/// This shifted fully right, use `EXP_MASK` for the shifted value.
const EXP_SAT: u32 = (1 << Self::EXP_BITS) - 1;
/// Signed version of `EXP_SAT` since we convert a lot.
const INFINITE_POWER: i32 = Self::EXP_SAT as i32;
/// The exponent bias value. This is also the maximum value of the exponent.
const EXP_BIAS: u32 = Self::EXP_SAT >> 1;
/// Minimum exponent value of normal values.
const EXP_MIN: i32 = -(Self::EXP_BIAS as i32 - 1);
Together with the f64-instance lines `BITS = 64` and
`SIG_TOTAL_BITS = Self::MANTISSA_DIGITS` in the preceding excerpt, these
defaults derive SIG_BITS, EXP_MIN, and INFINITE_POWER from the primitive
mantissa-digit constant rather than introducing independent parameters.
Exact checked cast excerpt from crate/dec2flt/mod.rs:
#[inline]
// This method is precisely the source `u64 as f64` primitive conversion.
// Aeneas cannot translate that cast; opacity is confined to the cast while
// the fast-path algorithm, its range proof obligation, and all calls stay
// visible in the extracted model.
#[charon::opaque]
fn from_u64(v: u64) -> Self {
debug_assert!(v <= Self::MAX_MANTISSA_FAST_PATH);
v as _
}
Here MAX_MANTISSA_FAST_PATH is the retained default 1 << 53. Therefore the
source succeeds only through the modeled branch v <= 2^53 in this debug
configuration; above it the debug assertion fails before the cast. On the
successful branch every integer is exactly representable, so the source cast
and the model rounder return the same word.
Exact power-table and assembly excerpts from crate/dec2flt/mod.rs:
/// Maximum mantissa for the fast-path (`1 << 53` for f64).
const MAX_MANTISSA_FAST_PATH: u64 = 1 << Self::SIG_TOTAL_BITS;
const MAX_EXPONENT_FAST_PATH: i64 = 22;
const MIN_EXPONENT_FAST_PATH: i64 = -Self::MAX_EXPONENT_FAST_PATH;
const MAX_EXPONENT_DISGUISED_FAST_PATH: i64 = 37;
fn pow10_fast_path(exponent: usize) -> Self {
// These bit patterns are exactly the source table's rounded binary64
// literals. The match is the same masked lookup; it merely keeps float
// constants out of Aeneas's unsupported constant interpreter.
match exponent & 31 {
0 => f64::from_bits(0x3FF0_0000_0000_0000),
1 => f64::from_bits(0x4024_0000_0000_0000),
2 => f64::from_bits(0x4059_0000_0000_0000),
3 => f64::from_bits(0x408F_4000_0000_0000),
4 => f64::from_bits(0x40C3_8800_0000_0000),
5 => f64::from_bits(0x40F8_6A00_0000_0000),
6 => f64::from_bits(0x412E_8480_0000_0000),
7 => f64::from_bits(0x4163_12D0_0000_0000),
8 => f64::from_bits(0x4197_D784_0000_0000),
9 => f64::from_bits(0x41CD_CD65_0000_0000),
10 => f64::from_bits(0x4202_A05F_2000_0000),
11 => f64::from_bits(0x4237_4876_E800_0000),
12 => f64::from_bits(0x426D_1A94_A200_0000),
13 => f64::from_bits(0x42A2_309C_E540_0000),
14 => f64::from_bits(0x42D6_BCC4_1E90_0000),
15 => f64::from_bits(0x430C_6BF5_2634_0000),
16 => f64::from_bits(0x4341_C379_37E0_8000),
17 => f64::from_bits(0x4376_3457_85D8_A000),
18 => f64::from_bits(0x43AB_C16D_674E_C800),
19 => f64::from_bits(0x43E1_58E4_6091_3D00),
20 => f64::from_bits(0x4415_AF1D_78B5_8C40),
21 => f64::from_bits(0x444B_1AE4_D6E2_EF50),
22 => f64::from_bits(0x4480_F0CF_064D_D592),
_ => f64::from_bits(0),
}
}
fn biased_fp_to_float<F: FloatExt>(x: BiasedFp) -> F {
let mut word = x.m;
word |= (x.p_biased as u64) << F::SIG_BITS;
F::from_u64_bits(word)
}
Exact native-call excerpt from crate/dec2flt/decimal.rs:
fn can_use_fast_path<F: Lemire>(&self) -> bool {
F::MIN_EXPONENT_FAST_PATH <= self.exponent
&& self.exponent <= F::MAX_EXPONENT_DISGUISED_FAST_PATH
&& self.mantissa <= F::MAX_MANTISSA_FAST_PATH
&& !self.many_digits
}
if !self.can_use_fast_path::<F>() {
return None;
}
let value = if self.exponent <= F::MAX_EXPONENT_FAST_PATH {
// normal fast path
let value = F::from_u64(self.mantissa);
if self.exponent < 0 {
// Explicit trait calls preserve Rust arithmetic and resolve
// the generic output type that Charon leaves ambiguous.
core::ops::Div::div(value, F::pow10_fast_path((-self.exponent) as _))
} else {
core::ops::Mul::mul(value, F::pow10_fast_path(self.exponent as _))
}
} else {
// disguised fast path
let shift = self.exponent - F::MAX_EXPONENT_FAST_PATH;
let mantissa = self.mantissa.checked_mul(INT_POW10[shift as usize])?;
if mantissa > F::MAX_MANTISSA_FAST_PATH {
return None;
}
core::ops::Mul::mul(
F::from_u64(mantissa),
F::pow10_fast_path(F::MAX_EXPONENT_FAST_PATH as _),
)
};
if self.negative {
Some(core::ops::Neg::neg(value))
} else {
Some(value)
}
The preceding can_use_fast_path body, together with
MAX_MANTISSA_FAST_PATH = 1 << SIG_TOTAL_BITS and SIG_TOTAL_BITS = 53 for f64,
requires the exponent to lie between -22 and 37, the input mantissa to be at
most 2^53, and many_digits to be false. Consequently an ordinary arithmetic
call has a from_u64 operand in 0..=2^53. In its negative-exponent arm,
`-self.exponent` lies in 1..=22; in its nonnegative arm, `self.exponent` lies
in 0..=22. The disguised branch checks its multiplied mantissa against 2^53
before from_u64 and uses table index 22. The paired statement
Binary64NativeCallDomain does not assert this source reachability. It says
conditionally that a from_u64 argument at most 2^53 succeeds with a finite,
non-NaN word and that a table index at most 22 succeeds with a positive,
nonzero, finite, non-NaN word. Applying that conditional statement to the
guards just derived establishes those properties for the actual ordinary and
disguised calls, and in particular establishes that every executed divisor is
nonzero.
Exact special-value excerpt from crate/dec2flt/parse.rs:
let float = match (register, len) {
(INF_3, 3) => F::INFINITY,
(INF_8, 8) => F::INFINITY,
(NAN, 3) => F::NAN,
_ => return None,
};
if negative { Some(-float) } else { Some(float) }
Thus the executed special route is INFINITY or NAN followed by conditional
negation; it does not select NEG_INFINITY or NEG_NAN directly.
The number helper has the exact source body
pub fn parse_number(s: &[u8]) -> Option<Decimal> {
if let Some((float, rest)) = parse_partial_number(s) {
if rest == s.len() {
return Some(float);
}
}
None
}
It returns only the Decimal produced by parse_partial_number; there is no
float type parameter or float operation at this boundary.
The integer-tier helper has the source type and exact executable excerpts
below (long explanatory comments are elided). In particular it returns a raw
BiasedFp and contains no from_u64 cast, primitive float multiplication,
division, negation, or from_bits call:
pub fn compute_float<F: Float>(q: i64, mut w: u64) -> BiasedFp {
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let fp_error = BiasedFp::zero_pow2(-1);
// Short-circuit if the value can only be a literal 0 or infinity.
if w == 0 || q < F::SMALLEST_POWER_OF_TEN as i64 {
return fp_zero;
} else if q > F::LARGEST_POWER_OF_TEN as i64 {
return fp_inf;
}
// Normalize our significant digits, so the most-significant bit is set.
let lz = w.leading_zeros();
w <<= lz;
let (lo, hi) = compute_product_approx(q, w, F::SIG_BITS as usize + 3);
if lo == 0xFFFF_FFFF_FFFF_FFFF {
let inside_safe_exponent = (q >= -27) && (q <= 55);
if !inside_safe_exponent {
return fp_error;
}
}
let upperbit = (hi >> 63) as i32;
let mut mantissa = hi >> (upperbit + 64 - F::SIG_BITS as i32 - 3);
let mut power2 = power(q as i32) + upperbit - lz as i32 - F::EXP_MIN + 1;
if power2 <= 0 {
if -power2 + 1 >= 64 {
// Have more than 64 bits below the minimum exponent, must be 0.
return fp_zero;
}
// Have a subnormal value.
mantissa >>= -power2 + 1;
mantissa += mantissa & 1;
mantissa >>= 1;
power2 = (mantissa >= (1_u64 << F::SIG_BITS)) as i32;
return BiasedFp { m: mantissa, p_biased: power2 };
}
// Need to handle rounding ties. Normally, we need to round up,
// but if we fall right in between and we have an even basis, we
// need to round down.
if lo <= 1
&& q >= F::MIN_EXPONENT_ROUND_TO_EVEN as i64
&& q <= F::MAX_EXPONENT_ROUND_TO_EVEN as i64
&& mantissa & 0b11 == 0b01
&& (mantissa << (upperbit + 64 - F::SIG_BITS as i32 - 3)) == hi
{
// Zero the lowest bit, so we don't round up.
mantissa &= !1_u64;
}
// Round-to-even, then shift the significant digits into place.
mantissa += mantissa & 1;
mantissa >>= 1;
if mantissa >= (2_u64 << F::SIG_BITS) {
// Rounding up overflowed, so the carry bit is set. Set the
// mantissa to 1 (only the implicit, hidden bit is set) and
// increase the exponent.
mantissa = 1_u64 << F::SIG_BITS;
power2 += 1;
}
// Zero out the hidden bit.
mantissa &= !(1_u64 << F::SIG_BITS);
if power2 >= F::INFINITE_POWER {
// Exponent is above largest normal value, must be infinite.
return fp_inf;
}
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact slow-tier source body from crate/dec2flt/slow.rs:
pub(crate) fn parse_long_mantissa<F: Float>(s: &[u8]) -> BiasedFp {
const MAX_SHIFT: usize = 60;
const NUM_POWERS: usize = 19;
const POWERS: [u8; 19] =
[0, 3, 6, 9, 13, 16, 19, 23, 26, 29, 33, 36, 39, 43, 46, 49, 53, 56, 59];
let get_shift = |n| {
if n < NUM_POWERS { POWERS[n] as usize } else { MAX_SHIFT }
};
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let mut d = parse_decimal_seq(s);
// Short-circuit if the value can only be a literal 0 or infinity.
if d.num_digits == 0 || d.decimal_point < -324 {
return fp_zero;
} else if d.decimal_point >= 310 {
return fp_inf;
}
let mut exp2 = 0_i32;
let mut loop_result = None;
// Shift right toward (1/2 ... 1].
while d.decimal_point > 0 && loop_result.is_none() {
let n = d.decimal_point as usize;
let shift = get_shift(n);
d.right_shift(shift);
if d.decimal_point < -DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_zero);
} else {
exp2 += shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// Shift left toward (1/2 ... 1].
while d.decimal_point <= 0 && loop_result.is_none() {
let shift = if d.decimal_point == 0 {
match d.digits[0] {
digit if digit >= 5 => break,
0 | 1 => 2,
_ => 1,
}
} else {
get_shift((-d.decimal_point) as _)
};
d.left_shift(shift);
if d.decimal_point > DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_inf);
} else {
exp2 -= shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// We are now in the range [1/2 ... 1] but the binary format uses [1 ... 2].
exp2 -= 1;
while F::EXP_MIN > exp2 {
let mut n = (F::EXP_MIN - exp2) as usize;
if n > MAX_SHIFT {
n = MAX_SHIFT;
}
d.right_shift(n);
exp2 += n as i32;
}
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
// Shift the decimal to the hidden bit, and then round the value
// to get the high mantissa+1 bits.
d.left_shift(F::SIG_BITS as usize + 1);
let mut mantissa = d.round();
if mantissa >= (1_u64 << (F::SIG_BITS + 1)) {
// Rounding up overflowed to the carry bit, need to
// shift back to the hidden bit.
d.right_shift(1);
exp2 += 1;
mantissa = d.round();
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
}
let mut power2 = exp2 - F::EXP_MIN + 1;
if mantissa < (1_u64 << F::SIG_BITS) {
power2 -= 1;
}
// Zero out all the bits above the explicit mantissa bits.
mantissa &= (1_u64 << F::SIG_BITS) - 1;
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact final numeric-sign excerpt from crate/dec2flt/mod.rs:
let assembled_word = fp.m | ((fp.p_biased as u64) << F::SIG_BITS);
let assembly_result = biased_fp_to_float::<F>(fp);
let lexical_sign_applied = num.negative;
let result = if lexical_sign_applied {
core::ops::Neg::neg(assembly_result)
} else {
assembly_result
};
Thus a numeric execution that reaches the integer/slow selection route
assembles its selected pair with from_bits through biased_fp_to_float and only
then conditionally negates it. A successful try_fast_path returns earlier and
does not perform this assembly. compute_float and parse_long_mantissa produce
raw BiasedFp pairs and do not call from_u64, primitive float multiplication,
division, negation, or from_bits; they do, however, execute constants derived
from SIG_TOTAL_BITS before producing those pairs.
Retained structural-boundary evidence
-------------------------------------
Several adjacent structural bindings cite this same evidence record. Their
pinned library source identities are:
core/src/num/mod.rs
f0820f9dfb94999440c8cb4a349736fa21df7e5668e19b6b49e016ff67c05ce3
core/src/option.rs
7cf61204b05d98a95bc2e322d5fbfc1f4f91505109971917d9a7fb47151c50e6
core/src/slice/mod.rs
354992a6a3d69a0185eef9044a07ea5180e767bdb467aef55e69ee3d44317840
core/src/str/mod.rs
284b4c147b5d0497ce9146f6b96e564f196aed10411a62cdccf5fc5243d40f78
Exact ASCII-digit body from core/src/num/mod.rs:
pub const fn is_ascii_digit(&self) -> bool {
matches!(*self, b'0'..=b'9')
}
Exact Option control-flow bodies from core/src/option.rs:
fn branch(self) -> ControlFlow<Self::Residual, Self::Output> {
match self {
Some(v) => ControlFlow::Continue(v),
None => ControlFlow::Break(None),
}
}
fn from_residual(residual: Option<convert::Infallible>) -> Self {
match residual {
None => None,
}
}
Exact slice observation bodies from core/src/slice/mod.rs:
pub const fn first(&self) -> Option<&T> {
if let [first, ..] = self { Some(first) } else { None }
}
pub const fn split_first(&self) -> Option<(&T, &[T])> {
if let [first, tail @ ..] = self { Some((first, tail)) } else { None }
}
Exact string-byte body from core/src/str/mod.rs:
pub const fn as_bytes(&self) -> &[u8] {
// SAFETY: const sound because we transmute two types with the same layout
unsafe { mem::transmute(self) }
}
reference/model-evidence/binary64-probe.rs
#![feature(float_masks)]
use std::num::FpCategory;
fn bits(label: &str, value: f64) {
println!("{label}={:016x}", value.to_bits());
}
fn main() {
println!("target_arch={}", std::env::consts::ARCH);
println!("mantissa_digits={}", f64::MANTISSA_DIGITS);
println!("exponent_mask={:016x}", f64::EXPONENT_MASK);
println!("mantissa_mask={:016x}", f64::MANTISSA_MASK);
bits("nan", f64::NAN);
bits("infinity", f64::INFINITY);
bits("neg_infinity", f64::NEG_INFINITY);
for (label, value) in [
("nan_category", f64::NAN),
("infinity_category", f64::INFINITY),
("zero_category", 0.0),
("subnormal_category", f64::from_bits(1)),
("normal_category", 1.0),
] {
let category = match value.classify() {
FpCategory::Nan => "Nan",
FpCategory::Infinite => "Infinite",
FpCategory::Zero => "Zero",
FpCategory::Subnormal => "Subnormal",
FpCategory::Normal => "Normal",
};
println!("{label}={category}");
}
let payload_nan_word = 0x7ff0_0000_0000_0001_u64;
println!(
"from_bits_to_bits={:016x}",
f64::from_bits(payload_nan_word).to_bits()
);
bits("neg_payload_nan", -f64::from_bits(payload_nan_word));
bits("neg_zero", -0.0);
bits("subnormal_tie_to_even_zero", f64::from_bits(1) * 0.5);
bits("subnormal_tie_to_even_two", f64::from_bits(3) * 0.5);
bits("normal_division", 1.0 / 10.0);
bits("mul_negative_zero", -0.0 * 2.0);
bits("div_negative_zero", -1.0 / f64::INFINITY);
bits("div_negative_infinity", 1.0 / -0.0);
bits("mul_overflow", f64::MAX * (1.0 + f64::EPSILON));
println!("mul_zero_infinity_is_nan={}", (0.0 * f64::INFINITY).is_nan());
println!("div_zero_zero_is_nan={}", (0.0_f64 / 0.0_f64).is_nan());
println!("mul_nan_is_nan={}", (f64::NAN * 1.0).is_nan());
bits("cast_2_pow_53", (1_u64 << 53) as f64);
bits("cast_2_pow_53_plus_1", ((1_u64 << 53) + 1) as f64);
}
Assumptions / kernel axioms
- Classical.choice
- Quot.sound
- propext
conservative transitive union of saved axiom observations across node dependencies
Requirements depending on this item (32)
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
All 32 entries
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
- Exponent agreement
- Correctness or defer
- Native correctness or defer
- Numeric acceptance
- Accumulated-value diagnostic
- Record bounds
- Invalid rejection
- Accumulated-value diagnostic
- Equal-target bridge
- Exact rounding
- Infinity
- Invalid rejection
- NaN acceptance
- No spurious NaNs
- Numeric acceptance
- Numeric sign
- Selected exponent range
- Selected magnitude sign
- Signed zero
- Totality
- Rounding determinism
- Rounding totality
- Full-significand diagnostic
- Infinity
- NaN
- Rejection
These requirements are linked to this item through the declared dependencies of their proofs.
Record details
| Record source | Tablet/model-support.json |
|---|---|
| Kind | opaque external binding |
| Preservation assessment origin | VerifierPanel |
| Preservation fingerprint | preservation-v1:37e0c1a6bf1d17e9e4dbe1497665255fa4cc79554d6844dec97783238794f2d0 |
| Preservation current fingerprint | preservation-v1:37e0c1a6bf1d17e9e4dbe1497665255fa4cc79554d6844dec97783238794f2d0 |
| Preservation freshness | matches current fingerprint |
| Correspondence approved fingerprint | {"own_tex":"3f83a9cfc9a7c9ad2cff00d1d84b47ab28751d2b89c22102bfe1c1793dbb6c8f","lean_semantic_closure":"b62ab7da14ebbf932a286022eba8b264942a2ef611d3b03e9f9f9bc3ff5b78c2","lean_relevant_definition_descendants":{"Binary64Model":"d80435c56f8fcbe084ebc2fbf05989a7ddf07434d0acd161302414cac32f964d","Binary64ModelDefault":"e2475cd1caad0eef450c903f24d2dfb8ffdfadf787ccad3621a86556f41e533a","F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2"},"lean_relevant_dependencies":["Binary64Model","Binary64ModelDefault","F64","core_num_FpCategory"],"preamble_tex":""} |
| Correspondence current fingerprint | {"own_tex":"3f83a9cfc9a7c9ad2cff00d1d84b47ab28751d2b89c22102bfe1c1793dbb6c8f","lean_semantic_closure":"b62ab7da14ebbf932a286022eba8b264942a2ef611d3b03e9f9f9bc3ff5b78c2","lean_relevant_definition_descendants":{"Binary64Model":"d80435c56f8fcbe084ebc2fbf05989a7ddf07434d0acd161302414cac32f964d","Binary64ModelDefault":"e2475cd1caad0eef450c903f24d2dfb8ffdfadf787ccad3621a86556f41e533a","F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2"},"lean_relevant_dependencies":["Binary64Model","Binary64ModelDefault","F64","core_num_FpCategory"],"preamble_tex":""} |
| Correspondence freshness | matches current fingerprint |
Exact preservation assessment
{
"status": "VerifierPass",
"origin": "VerifierPanel",
"fingerprints": {
"own_tex_hash": "af6580aaa91e27e885554abf3ea1a9d40a80dacca36e32d7e8719a94531e9839",
"dep_statement_hashes": {
"Binary64ModelDefault": "be5dcc4afe23616ca8fd1d15d30fbbe4ee2621d68be3341b8e74a66e6dcd736f"
},
"combined_sound_fp": "preservation-v1:37e0c1a6bf1d17e9e4dbe1497665255fa4cc79554d6844dec97783238794f2d0"
},
"lane_votes": {
"v1": "Pass"
},
"reviewer_action_id": null
}Exact source record
{
"name": "core.f64.F64.NAN",
"extracted_signature": ": Result F64",
"rust_symbol": "core::f64::{f64}::NAN",
"raw_declaration_sha256": "a18685a80db5dbebe39151c7375a0470bb3905fe1228e5598a995a1cf017a768",
"node": "ModelF64Nan",
"declaration": "dec2flt_model.ModelF64Nan"
}Captured evidence identities
[
{
"path": "reference/model-evidence/binary64-boundary.txt",
"sha256": "a17d82e7f789ce7f1fbb3922a66ec8806999e526532d637605263882d37b7abf",
"cited_by": [
"Tablet/ModelF64Nan.tex",
"Tablet/model-support.json"
]
},
{
"path": "reference/model-evidence/binary64-probe.rs",
"sha256": "68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e",
"cited_by": [
"reference/model-evidence/binary64-boundary.txt"
]
}
]core::f64::{f64}::INFINITY
Inspect related source (1)
- INFINITY · core/src/num/f64.rs:512 Rust library
Related source and models come from the extraction records and declared dependencies.
| Rust item | core::f64::{f64}::INFINITY |
|---|---|
| Recorded source | /rustc/library/core/src/num/f64.rs |
| Lines | 512:4–512:27 |
The related-source link includes this operation’s Rust standard-library implementation.
Opaque extraction signature
: Result F64Lean definition
Trellis authored this Lean model for an operation outside the mechanical extraction. Modeling choices explains its behavior and review.
import Tablet.Binary64ModelDefault
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: ModelF64Infinity]
def ModelF64Infinity : Result F64 :=
-- BODY
Binary64ModelDefault.infinity
end dec2flt_model
Why this model is faithful
Definition
Preservation argument
Claim
Proof
7ff0000000000000, as recorded in reference/model-evidence/binary64-boundary.txt.Authored arguments for individual requirements
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
Recorded review
| Correspondence | Pass |
|---|---|
| Preservation | VerifierPass |
ModelF64Infinity · Lean checked
Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
reference/model-evidence/binary64-boundary.txt
Primary evidence for the binary64 boundary
==========================================
Scope and identities
--------------------
This record concerns the frozen x86_64-unknown-linux-gnu extraction, the
adapted Rust crate retained in this repository, and the installed toolchain
named by modeling-input/SETUP.md. The probe source is retained at
reference/model-evidence/binary64-probe.rs; no scratch source is required to
reproduce it.
Toolchain executable:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
Target:
x86_64-unknown-linux-gnu
rustc executable SHA-256:
162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
Probe source SHA-256:
68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
Compiled probe SHA-256:
f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
Frozen generated.lean SHA-256:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692
Frozen modeling-input/manifest.json SHA-256:
2fc182c0c7acccad30c449ca349b999759b84e8ed4ec9d590e8295e43eeec077
Approved Binary64ModelDefault.lean SHA-256 at the time of this record:
03ae48fb631e6242bd21bf95d0481b66acae05f8cab343c7ab279b3c116538a3
Exact reproduction commands
---------------------------
Run from the repository root:
R=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
P=reference/model-evidence/binary64-probe.rs
B=.trellis/scratch/binary64-probe
"$R" --version --verbose
sha256sum "$R"
sha256sum "$P"
"$R" --target x86_64-unknown-linux-gnu -C opt-level=0 "$P" -o "$B"
sha256sum "$B"
"$B"
Raw output
----------
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
rustc_sha256=162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
probe_sha256=68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
binary_sha256=f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
target_arch=x86_64
mantissa_digits=53
exponent_mask=7ff0000000000000
mantissa_mask=000fffffffffffff
nan=7ff8000000000000
infinity=7ff0000000000000
neg_infinity=fff0000000000000
nan_category=Nan
infinity_category=Infinite
zero_category=Zero
subnormal_category=Subnormal
normal_category=Normal
from_bits_to_bits=7ff0000000000001
neg_payload_nan=fff0000000000001
neg_zero=8000000000000000
subnormal_tie_to_even_zero=0000000000000000
subnormal_tie_to_even_two=0000000000000002
normal_division=3fb999999999999a
mul_negative_zero=8000000000000000
div_negative_zero=8000000000000000
div_negative_infinity=fff0000000000000
mul_overflow=7ff0000000000000
mul_zero_infinity_is_nan=true
div_zero_zero_is_nan=true
mul_nan_is_nan=true
cast_2_pow_53=4340000000000000
cast_2_pow_53_plus_1=4340000000000000
Pinned Rust library sources
---------------------------
The installed sources below belong to the same named toolchain. Their
SHA-256 identities are:
core/src/primitive_docs.rs
c4b8627dd67d5dac8f383f383a9e7ff1229ea43e7599610fc61988694cf0f3e5
core/src/num/f64.rs
84540a6a59e347c63caabe12cf895ba1239c76a50682471567007138fac1c618
core/src/clone.rs
23f9cfc80347fde6b8457d46fbf7a2b8d9f34c8c58601b0b6f714ca2f6d1976b
The exact relevant text of core/src/primitive_docs.rs is:
#[rustc_doc_primitive = "f64"]
#[doc(alias = "double")]
/// A 64-bit floating-point type (specifically, the "binary64" type defined in IEEE 754-2008).
///
/// This type is very similar to [`prim@f32`], but has increased precision by using twice as many
/// bits. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on double-precision
/// values][wikipedia] for more information.
The referenced primitive-f32 documentation supplies the common primitive
floating-point operation rules quoted next:
/// - −0.0: IEEE 754 floating-point numbers have a bit that indicates their sign, so −0.0 is a
/// possible value. For comparison −0.0 = +0.0, but floating-point operations can carry
/// the sign bit through arithmetic operations. This means −0.0 × +0.0 produces −0.0 and
/// a negative number rounded to a value smaller than a float can represent also produces −0.0.
/// - [∞](#associatedconstant.INFINITY) and
/// [−∞](#associatedconstant.NEG_INFINITY): these result from calculations
/// like `1.0 / 0.0`.
///
/// When a primitive operation (addition, subtraction, multiplication, or
/// division) is performed on this type, the result is rounded according to the
/// roundTiesToEven direction defined in IEEE 754-2008. That means:
///
/// - The result is the representable value closest to the true value, if there
/// is a unique closest representable value.
/// - If the true value is exactly half-way between two representable values,
/// the result is the one with an even least-significant binary digit.
/// - If the true value's magnitude is ≥ `f32::MAX` + 2<sup>(`f32::MAX_EXP` −
/// `f32::MANTISSA_DIGITS` − 1)</sup>, the result is ∞ or −∞ (preserving the
/// true value's sign).
The same file explicitly separates arithmetic NaN choice from exact bitwise
operations; its exact relevant text is:
/// The rules for NaN values differ between *arithmetic* and *non-arithmetic* (or "bitwise")
/// operations. The non-arithmetic operations are unary `-`, `abs`, `copysign`, `signum`,
/// `{to,from}_bits`, `{to,from}_{be,le,ne}_bytes` and `is_sign_{positive,negative}`. These
/// operations are guaranteed to exactly preserve the bit pattern of their input except for possibly
/// changing the sign bit.
///
/// The following rules apply when a NaN value is returned from an arithmetic operation:
/// - The result has a non-deterministic sign.
/// - The quiet bit and payload are non-deterministically chosen from
/// the following set of options:
///
/// - **Preferred NaN**: The quiet bit is set and the payload is all-zero.
/// - **Quieting NaN propagation**: The quiet bit is set and the payload is copied from any input
/// operand that is a NaN. If the inputs and outputs do not have the same payload size (i.e., for
/// `as` casts), then
/// - If the output is smaller than the input, low-order bits of the payload get dropped.
/// - If the output is larger than the input, the payload gets filled up with 0s in the low-order
/// bits.
/// - **Unchanged NaN propagation**: The quiet bit and payload are copied from any input operand
/// that is a NaN. If the inputs and outputs do not have the same size (i.e., for `as` casts), the
/// same rules as for "quieting NaN propagation" apply, with one caveat: if the output is smaller
/// than the input, dropping the low-order bits may result in a payload of 0; a payload of 0 is not
/// possible with a signaling NaN (the all-0 significand encodes an infinity) so unchanged NaN
/// propagation cannot occur with some inputs.
/// - **Target-specific NaN**: The quiet bit is set and the payload is picked from a target-specific
/// set of "extra" possible NaN payloads. The set can depend on the input operand values.
/// See the table below for the concrete NaNs this set contains on various targets.
///
/// | `target_arch` | Extra payloads possible on this platform |
/// |---------------|------------------------------------------|
/// | `aarch64`, `arm`, `arm64ec`, `loongarch64`, `powerpc` (except when `target_abi = "spe"`), `powerpc64`, `riscv32`, `riscv64`, `s390x`, `x86`, `x86_64` | None |
Thus the model's preferred quiet NaN is one permitted result whenever
multiplication or division returns NaN. This does not claim that arbitrary
Rust arithmetic NaNs have those exact bits. By contrast, unary negation and
bit conversion must preserve all non-sign bits exactly, including for every
NaN payload.
The exact relevant declarations in core/src/num/f64.rs are:
pub const MANTISSA_DIGITS: u32 = 53;
pub const NAN: f64 = 0.0_f64 / 0.0_f64;
pub const INFINITY: f64 = 1.0_f64 / 0.0_f64;
pub const NEG_INFINITY: f64 = -1.0_f64 / 0.0_f64;
pub const SIGN_MASK: u64 = 0x8000_0000_0000_0000;
pub const EXPONENT_MASK: u64 = 0x7ff0_0000_0000_0000;
pub const MANTISSA_MASK: u64 = 0x000f_ffff_ffff_ffff;
pub const fn classify(self) -> FpCategory {
// We used to have complicated logic here that avoids the simple bit-based tests to work
// around buggy codegen for x87 targets (see
// https://github.com/rust-lang/rust/issues/114479). However, some LLVM versions later, none
// of our tests is able to find any difference between the complicated and the naive
// version, so now we are back to the naive version.
let b = self.to_bits();
match (b & Self::MANTISSA_MASK, b & Self::EXPONENT_MASK) {
(0, Self::EXPONENT_MASK) => FpCategory::Infinite,
(_, Self::EXPONENT_MASK) => FpCategory::Nan,
(0, 0) => FpCategory::Zero,
(_, 0) => FpCategory::Subnormal,
_ => FpCategory::Normal,
}
}
pub const fn to_bits(self) -> u64 {
// SAFETY: `u64` is a plain old datatype so we can always transmute to it.
unsafe { mem::transmute(self) }
}
pub const fn from_bits(v: u64) -> Self {
// It turns out the safety issues with sNaN were overblown! Hooray!
// SAFETY: `u64` is a plain old datatype so we can always transmute from it.
unsafe { mem::transmute(v) }
}
The exact scalar clone body in core/src/clone.rs is:
impl const Clone for $t {
#[inline(always)]
fn clone(&self) -> Self {
*self
}
}
Frozen adapted source
---------------------
The relevant retained source file hashes are:
crate/traits.rs
9013270fb846edcb0bdf2abd0353f575fdd727974cba9e89bdab8bb4c2b4f0bf
crate/dec2flt/mod.rs
b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012
crate/dec2flt/parse.rs
50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f
crate/dec2flt/decimal.rs
633658be803b7369b18feb098a8aa1b5f714a933d3b79ecbc4899a1b05f35beb
crate/dec2flt/lemire.rs
fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1
crate/dec2flt/slow.rs
93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485
Exact constant and bit-conversion excerpt from crate/traits.rs:
impl Float for f64 {
type Int = u64;
const INFINITY: Self = Self::INFINITY;
const NEG_INFINITY: Self = Self::NEG_INFINITY;
const NAN: Self = Self::NAN;
// Bit-identical to the upstream `-f64::NAN`, without the unsupported
// compile-time float negation.
const NEG_NAN: Self = f64::from_bits(0xFFF8_0000_0000_0000);
const BITS: u32 = 64;
const SIG_TOTAL_BITS: u32 = Self::MANTISSA_DIGITS;
const EXP_MASK: Self::Int = Self::EXPONENT_MASK;
const SIG_MASK: Self::Int = Self::MANTISSA_MASK;
fn to_bits(self) -> Self::Int {
self.to_bits()
}
fn classify(self) -> FpCategory {
self.classify()
}
}
impl FloatExt for f64 {
#[inline]
fn from_u64_bits(v: u64) -> Self {
f64::from_bits(v)
}
Exact derived-constant defaults from crate/traits.rs:
/// The number of bits in the significand, *excluding* the hidden bit.
const SIG_BITS: u32 = Self::SIG_TOTAL_BITS - 1;
/// Number of bits in the exponent.
const EXP_BITS: u32 = Self::BITS - Self::SIG_BITS - 1;
/// The saturated (maximum bitpattern) value of the exponent, i.e. the infinite
/// representation.
///
/// This shifted fully right, use `EXP_MASK` for the shifted value.
const EXP_SAT: u32 = (1 << Self::EXP_BITS) - 1;
/// Signed version of `EXP_SAT` since we convert a lot.
const INFINITE_POWER: i32 = Self::EXP_SAT as i32;
/// The exponent bias value. This is also the maximum value of the exponent.
const EXP_BIAS: u32 = Self::EXP_SAT >> 1;
/// Minimum exponent value of normal values.
const EXP_MIN: i32 = -(Self::EXP_BIAS as i32 - 1);
Together with the f64-instance lines `BITS = 64` and
`SIG_TOTAL_BITS = Self::MANTISSA_DIGITS` in the preceding excerpt, these
defaults derive SIG_BITS, EXP_MIN, and INFINITE_POWER from the primitive
mantissa-digit constant rather than introducing independent parameters.
Exact checked cast excerpt from crate/dec2flt/mod.rs:
#[inline]
// This method is precisely the source `u64 as f64` primitive conversion.
// Aeneas cannot translate that cast; opacity is confined to the cast while
// the fast-path algorithm, its range proof obligation, and all calls stay
// visible in the extracted model.
#[charon::opaque]
fn from_u64(v: u64) -> Self {
debug_assert!(v <= Self::MAX_MANTISSA_FAST_PATH);
v as _
}
Here MAX_MANTISSA_FAST_PATH is the retained default 1 << 53. Therefore the
source succeeds only through the modeled branch v <= 2^53 in this debug
configuration; above it the debug assertion fails before the cast. On the
successful branch every integer is exactly representable, so the source cast
and the model rounder return the same word.
Exact power-table and assembly excerpts from crate/dec2flt/mod.rs:
/// Maximum mantissa for the fast-path (`1 << 53` for f64).
const MAX_MANTISSA_FAST_PATH: u64 = 1 << Self::SIG_TOTAL_BITS;
const MAX_EXPONENT_FAST_PATH: i64 = 22;
const MIN_EXPONENT_FAST_PATH: i64 = -Self::MAX_EXPONENT_FAST_PATH;
const MAX_EXPONENT_DISGUISED_FAST_PATH: i64 = 37;
fn pow10_fast_path(exponent: usize) -> Self {
// These bit patterns are exactly the source table's rounded binary64
// literals. The match is the same masked lookup; it merely keeps float
// constants out of Aeneas's unsupported constant interpreter.
match exponent & 31 {
0 => f64::from_bits(0x3FF0_0000_0000_0000),
1 => f64::from_bits(0x4024_0000_0000_0000),
2 => f64::from_bits(0x4059_0000_0000_0000),
3 => f64::from_bits(0x408F_4000_0000_0000),
4 => f64::from_bits(0x40C3_8800_0000_0000),
5 => f64::from_bits(0x40F8_6A00_0000_0000),
6 => f64::from_bits(0x412E_8480_0000_0000),
7 => f64::from_bits(0x4163_12D0_0000_0000),
8 => f64::from_bits(0x4197_D784_0000_0000),
9 => f64::from_bits(0x41CD_CD65_0000_0000),
10 => f64::from_bits(0x4202_A05F_2000_0000),
11 => f64::from_bits(0x4237_4876_E800_0000),
12 => f64::from_bits(0x426D_1A94_A200_0000),
13 => f64::from_bits(0x42A2_309C_E540_0000),
14 => f64::from_bits(0x42D6_BCC4_1E90_0000),
15 => f64::from_bits(0x430C_6BF5_2634_0000),
16 => f64::from_bits(0x4341_C379_37E0_8000),
17 => f64::from_bits(0x4376_3457_85D8_A000),
18 => f64::from_bits(0x43AB_C16D_674E_C800),
19 => f64::from_bits(0x43E1_58E4_6091_3D00),
20 => f64::from_bits(0x4415_AF1D_78B5_8C40),
21 => f64::from_bits(0x444B_1AE4_D6E2_EF50),
22 => f64::from_bits(0x4480_F0CF_064D_D592),
_ => f64::from_bits(0),
}
}
fn biased_fp_to_float<F: FloatExt>(x: BiasedFp) -> F {
let mut word = x.m;
word |= (x.p_biased as u64) << F::SIG_BITS;
F::from_u64_bits(word)
}
Exact native-call excerpt from crate/dec2flt/decimal.rs:
fn can_use_fast_path<F: Lemire>(&self) -> bool {
F::MIN_EXPONENT_FAST_PATH <= self.exponent
&& self.exponent <= F::MAX_EXPONENT_DISGUISED_FAST_PATH
&& self.mantissa <= F::MAX_MANTISSA_FAST_PATH
&& !self.many_digits
}
if !self.can_use_fast_path::<F>() {
return None;
}
let value = if self.exponent <= F::MAX_EXPONENT_FAST_PATH {
// normal fast path
let value = F::from_u64(self.mantissa);
if self.exponent < 0 {
// Explicit trait calls preserve Rust arithmetic and resolve
// the generic output type that Charon leaves ambiguous.
core::ops::Div::div(value, F::pow10_fast_path((-self.exponent) as _))
} else {
core::ops::Mul::mul(value, F::pow10_fast_path(self.exponent as _))
}
} else {
// disguised fast path
let shift = self.exponent - F::MAX_EXPONENT_FAST_PATH;
let mantissa = self.mantissa.checked_mul(INT_POW10[shift as usize])?;
if mantissa > F::MAX_MANTISSA_FAST_PATH {
return None;
}
core::ops::Mul::mul(
F::from_u64(mantissa),
F::pow10_fast_path(F::MAX_EXPONENT_FAST_PATH as _),
)
};
if self.negative {
Some(core::ops::Neg::neg(value))
} else {
Some(value)
}
The preceding can_use_fast_path body, together with
MAX_MANTISSA_FAST_PATH = 1 << SIG_TOTAL_BITS and SIG_TOTAL_BITS = 53 for f64,
requires the exponent to lie between -22 and 37, the input mantissa to be at
most 2^53, and many_digits to be false. Consequently an ordinary arithmetic
call has a from_u64 operand in 0..=2^53. In its negative-exponent arm,
`-self.exponent` lies in 1..=22; in its nonnegative arm, `self.exponent` lies
in 0..=22. The disguised branch checks its multiplied mantissa against 2^53
before from_u64 and uses table index 22. The paired statement
Binary64NativeCallDomain does not assert this source reachability. It says
conditionally that a from_u64 argument at most 2^53 succeeds with a finite,
non-NaN word and that a table index at most 22 succeeds with a positive,
nonzero, finite, non-NaN word. Applying that conditional statement to the
guards just derived establishes those properties for the actual ordinary and
disguised calls, and in particular establishes that every executed divisor is
nonzero.
Exact special-value excerpt from crate/dec2flt/parse.rs:
let float = match (register, len) {
(INF_3, 3) => F::INFINITY,
(INF_8, 8) => F::INFINITY,
(NAN, 3) => F::NAN,
_ => return None,
};
if negative { Some(-float) } else { Some(float) }
Thus the executed special route is INFINITY or NAN followed by conditional
negation; it does not select NEG_INFINITY or NEG_NAN directly.
The number helper has the exact source body
pub fn parse_number(s: &[u8]) -> Option<Decimal> {
if let Some((float, rest)) = parse_partial_number(s) {
if rest == s.len() {
return Some(float);
}
}
None
}
It returns only the Decimal produced by parse_partial_number; there is no
float type parameter or float operation at this boundary.
The integer-tier helper has the source type and exact executable excerpts
below (long explanatory comments are elided). In particular it returns a raw
BiasedFp and contains no from_u64 cast, primitive float multiplication,
division, negation, or from_bits call:
pub fn compute_float<F: Float>(q: i64, mut w: u64) -> BiasedFp {
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let fp_error = BiasedFp::zero_pow2(-1);
// Short-circuit if the value can only be a literal 0 or infinity.
if w == 0 || q < F::SMALLEST_POWER_OF_TEN as i64 {
return fp_zero;
} else if q > F::LARGEST_POWER_OF_TEN as i64 {
return fp_inf;
}
// Normalize our significant digits, so the most-significant bit is set.
let lz = w.leading_zeros();
w <<= lz;
let (lo, hi) = compute_product_approx(q, w, F::SIG_BITS as usize + 3);
if lo == 0xFFFF_FFFF_FFFF_FFFF {
let inside_safe_exponent = (q >= -27) && (q <= 55);
if !inside_safe_exponent {
return fp_error;
}
}
let upperbit = (hi >> 63) as i32;
let mut mantissa = hi >> (upperbit + 64 - F::SIG_BITS as i32 - 3);
let mut power2 = power(q as i32) + upperbit - lz as i32 - F::EXP_MIN + 1;
if power2 <= 0 {
if -power2 + 1 >= 64 {
// Have more than 64 bits below the minimum exponent, must be 0.
return fp_zero;
}
// Have a subnormal value.
mantissa >>= -power2 + 1;
mantissa += mantissa & 1;
mantissa >>= 1;
power2 = (mantissa >= (1_u64 << F::SIG_BITS)) as i32;
return BiasedFp { m: mantissa, p_biased: power2 };
}
// Need to handle rounding ties. Normally, we need to round up,
// but if we fall right in between and we have an even basis, we
// need to round down.
if lo <= 1
&& q >= F::MIN_EXPONENT_ROUND_TO_EVEN as i64
&& q <= F::MAX_EXPONENT_ROUND_TO_EVEN as i64
&& mantissa & 0b11 == 0b01
&& (mantissa << (upperbit + 64 - F::SIG_BITS as i32 - 3)) == hi
{
// Zero the lowest bit, so we don't round up.
mantissa &= !1_u64;
}
// Round-to-even, then shift the significant digits into place.
mantissa += mantissa & 1;
mantissa >>= 1;
if mantissa >= (2_u64 << F::SIG_BITS) {
// Rounding up overflowed, so the carry bit is set. Set the
// mantissa to 1 (only the implicit, hidden bit is set) and
// increase the exponent.
mantissa = 1_u64 << F::SIG_BITS;
power2 += 1;
}
// Zero out the hidden bit.
mantissa &= !(1_u64 << F::SIG_BITS);
if power2 >= F::INFINITE_POWER {
// Exponent is above largest normal value, must be infinite.
return fp_inf;
}
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact slow-tier source body from crate/dec2flt/slow.rs:
pub(crate) fn parse_long_mantissa<F: Float>(s: &[u8]) -> BiasedFp {
const MAX_SHIFT: usize = 60;
const NUM_POWERS: usize = 19;
const POWERS: [u8; 19] =
[0, 3, 6, 9, 13, 16, 19, 23, 26, 29, 33, 36, 39, 43, 46, 49, 53, 56, 59];
let get_shift = |n| {
if n < NUM_POWERS { POWERS[n] as usize } else { MAX_SHIFT }
};
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let mut d = parse_decimal_seq(s);
// Short-circuit if the value can only be a literal 0 or infinity.
if d.num_digits == 0 || d.decimal_point < -324 {
return fp_zero;
} else if d.decimal_point >= 310 {
return fp_inf;
}
let mut exp2 = 0_i32;
let mut loop_result = None;
// Shift right toward (1/2 ... 1].
while d.decimal_point > 0 && loop_result.is_none() {
let n = d.decimal_point as usize;
let shift = get_shift(n);
d.right_shift(shift);
if d.decimal_point < -DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_zero);
} else {
exp2 += shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// Shift left toward (1/2 ... 1].
while d.decimal_point <= 0 && loop_result.is_none() {
let shift = if d.decimal_point == 0 {
match d.digits[0] {
digit if digit >= 5 => break,
0 | 1 => 2,
_ => 1,
}
} else {
get_shift((-d.decimal_point) as _)
};
d.left_shift(shift);
if d.decimal_point > DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_inf);
} else {
exp2 -= shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// We are now in the range [1/2 ... 1] but the binary format uses [1 ... 2].
exp2 -= 1;
while F::EXP_MIN > exp2 {
let mut n = (F::EXP_MIN - exp2) as usize;
if n > MAX_SHIFT {
n = MAX_SHIFT;
}
d.right_shift(n);
exp2 += n as i32;
}
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
// Shift the decimal to the hidden bit, and then round the value
// to get the high mantissa+1 bits.
d.left_shift(F::SIG_BITS as usize + 1);
let mut mantissa = d.round();
if mantissa >= (1_u64 << (F::SIG_BITS + 1)) {
// Rounding up overflowed to the carry bit, need to
// shift back to the hidden bit.
d.right_shift(1);
exp2 += 1;
mantissa = d.round();
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
}
let mut power2 = exp2 - F::EXP_MIN + 1;
if mantissa < (1_u64 << F::SIG_BITS) {
power2 -= 1;
}
// Zero out all the bits above the explicit mantissa bits.
mantissa &= (1_u64 << F::SIG_BITS) - 1;
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact final numeric-sign excerpt from crate/dec2flt/mod.rs:
let assembled_word = fp.m | ((fp.p_biased as u64) << F::SIG_BITS);
let assembly_result = biased_fp_to_float::<F>(fp);
let lexical_sign_applied = num.negative;
let result = if lexical_sign_applied {
core::ops::Neg::neg(assembly_result)
} else {
assembly_result
};
Thus a numeric execution that reaches the integer/slow selection route
assembles its selected pair with from_bits through biased_fp_to_float and only
then conditionally negates it. A successful try_fast_path returns earlier and
does not perform this assembly. compute_float and parse_long_mantissa produce
raw BiasedFp pairs and do not call from_u64, primitive float multiplication,
division, negation, or from_bits; they do, however, execute constants derived
from SIG_TOTAL_BITS before producing those pairs.
Retained structural-boundary evidence
-------------------------------------
Several adjacent structural bindings cite this same evidence record. Their
pinned library source identities are:
core/src/num/mod.rs
f0820f9dfb94999440c8cb4a349736fa21df7e5668e19b6b49e016ff67c05ce3
core/src/option.rs
7cf61204b05d98a95bc2e322d5fbfc1f4f91505109971917d9a7fb47151c50e6
core/src/slice/mod.rs
354992a6a3d69a0185eef9044a07ea5180e767bdb467aef55e69ee3d44317840
core/src/str/mod.rs
284b4c147b5d0497ce9146f6b96e564f196aed10411a62cdccf5fc5243d40f78
Exact ASCII-digit body from core/src/num/mod.rs:
pub const fn is_ascii_digit(&self) -> bool {
matches!(*self, b'0'..=b'9')
}
Exact Option control-flow bodies from core/src/option.rs:
fn branch(self) -> ControlFlow<Self::Residual, Self::Output> {
match self {
Some(v) => ControlFlow::Continue(v),
None => ControlFlow::Break(None),
}
}
fn from_residual(residual: Option<convert::Infallible>) -> Self {
match residual {
None => None,
}
}
Exact slice observation bodies from core/src/slice/mod.rs:
pub const fn first(&self) -> Option<&T> {
if let [first, ..] = self { Some(first) } else { None }
}
pub const fn split_first(&self) -> Option<(&T, &[T])> {
if let [first, tail @ ..] = self { Some((first, tail)) } else { None }
}
Exact string-byte body from core/src/str/mod.rs:
pub const fn as_bytes(&self) -> &[u8] {
// SAFETY: const sound because we transmute two types with the same layout
unsafe { mem::transmute(self) }
}
reference/model-evidence/binary64-probe.rs
#![feature(float_masks)]
use std::num::FpCategory;
fn bits(label: &str, value: f64) {
println!("{label}={:016x}", value.to_bits());
}
fn main() {
println!("target_arch={}", std::env::consts::ARCH);
println!("mantissa_digits={}", f64::MANTISSA_DIGITS);
println!("exponent_mask={:016x}", f64::EXPONENT_MASK);
println!("mantissa_mask={:016x}", f64::MANTISSA_MASK);
bits("nan", f64::NAN);
bits("infinity", f64::INFINITY);
bits("neg_infinity", f64::NEG_INFINITY);
for (label, value) in [
("nan_category", f64::NAN),
("infinity_category", f64::INFINITY),
("zero_category", 0.0),
("subnormal_category", f64::from_bits(1)),
("normal_category", 1.0),
] {
let category = match value.classify() {
FpCategory::Nan => "Nan",
FpCategory::Infinite => "Infinite",
FpCategory::Zero => "Zero",
FpCategory::Subnormal => "Subnormal",
FpCategory::Normal => "Normal",
};
println!("{label}={category}");
}
let payload_nan_word = 0x7ff0_0000_0000_0001_u64;
println!(
"from_bits_to_bits={:016x}",
f64::from_bits(payload_nan_word).to_bits()
);
bits("neg_payload_nan", -f64::from_bits(payload_nan_word));
bits("neg_zero", -0.0);
bits("subnormal_tie_to_even_zero", f64::from_bits(1) * 0.5);
bits("subnormal_tie_to_even_two", f64::from_bits(3) * 0.5);
bits("normal_division", 1.0 / 10.0);
bits("mul_negative_zero", -0.0 * 2.0);
bits("div_negative_zero", -1.0 / f64::INFINITY);
bits("div_negative_infinity", 1.0 / -0.0);
bits("mul_overflow", f64::MAX * (1.0 + f64::EPSILON));
println!("mul_zero_infinity_is_nan={}", (0.0 * f64::INFINITY).is_nan());
println!("div_zero_zero_is_nan={}", (0.0_f64 / 0.0_f64).is_nan());
println!("mul_nan_is_nan={}", (f64::NAN * 1.0).is_nan());
bits("cast_2_pow_53", (1_u64 << 53) as f64);
bits("cast_2_pow_53_plus_1", ((1_u64 << 53) + 1) as f64);
}
Assumptions / kernel axioms
- Classical.choice
- Quot.sound
- propext
conservative transitive union of saved axiom observations across node dependencies
Requirements depending on this item (32)
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
All 32 entries
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
- Exponent agreement
- Correctness or defer
- Native correctness or defer
- Numeric acceptance
- Accumulated-value diagnostic
- Record bounds
- Invalid rejection
- Accumulated-value diagnostic
- Equal-target bridge
- Exact rounding
- Infinity
- Invalid rejection
- NaN acceptance
- No spurious NaNs
- Numeric acceptance
- Numeric sign
- Selected exponent range
- Selected magnitude sign
- Signed zero
- Totality
- Rounding determinism
- Rounding totality
- Full-significand diagnostic
- Infinity
- NaN
- Rejection
These requirements are linked to this item through the declared dependencies of their proofs.
Record details
| Record source | Tablet/model-support.json |
|---|---|
| Kind | opaque external binding |
| Preservation assessment origin | VerifierPanel |
| Preservation fingerprint | preservation-v1:a6a26f1aa8e1acedd053ae79ef05547b532ebe2fcd15815219c0fab1b1b65f56 |
| Preservation current fingerprint | preservation-v1:a6a26f1aa8e1acedd053ae79ef05547b532ebe2fcd15815219c0fab1b1b65f56 |
| Preservation freshness | matches current fingerprint |
| Correspondence approved fingerprint | {"own_tex":"3512da70d592e5cb1c4e373241f16ed70fc052e55e938a0994cafffd5cfc8a6a","lean_semantic_closure":"b9b8f49119dd7b86fe5a771433b4036b8e0edd4621ccccf7c0ae72b448df25b9","lean_relevant_definition_descendants":{"Binary64Model":"d80435c56f8fcbe084ebc2fbf05989a7ddf07434d0acd161302414cac32f964d","Binary64ModelDefault":"e2475cd1caad0eef450c903f24d2dfb8ffdfadf787ccad3621a86556f41e533a","F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2"},"lean_relevant_dependencies":["Binary64Model","Binary64ModelDefault","F64","core_num_FpCategory"],"preamble_tex":""} |
| Correspondence current fingerprint | {"own_tex":"3512da70d592e5cb1c4e373241f16ed70fc052e55e938a0994cafffd5cfc8a6a","lean_semantic_closure":"b9b8f49119dd7b86fe5a771433b4036b8e0edd4621ccccf7c0ae72b448df25b9","lean_relevant_definition_descendants":{"Binary64Model":"d80435c56f8fcbe084ebc2fbf05989a7ddf07434d0acd161302414cac32f964d","Binary64ModelDefault":"e2475cd1caad0eef450c903f24d2dfb8ffdfadf787ccad3621a86556f41e533a","F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2"},"lean_relevant_dependencies":["Binary64Model","Binary64ModelDefault","F64","core_num_FpCategory"],"preamble_tex":""} |
| Correspondence freshness | matches current fingerprint |
Exact preservation assessment
{
"status": "VerifierPass",
"origin": "VerifierPanel",
"fingerprints": {
"own_tex_hash": "ee42eb2badd959d6af4c82d968c6ca3b9c086618803a44469cf9134d8d368f0e",
"dep_statement_hashes": {
"Binary64ModelDefault": "be5dcc4afe23616ca8fd1d15d30fbbe4ee2621d68be3341b8e74a66e6dcd736f"
},
"combined_sound_fp": "preservation-v1:a6a26f1aa8e1acedd053ae79ef05547b532ebe2fcd15815219c0fab1b1b65f56"
},
"lane_votes": {
"v1": "Pass"
},
"reviewer_action_id": null
}Exact source record
{
"name": "core.f64.F64.INFINITY",
"extracted_signature": ": Result F64",
"rust_symbol": "core::f64::{f64}::INFINITY",
"raw_declaration_sha256": "f905901e67400987f49cddd13a8768644bed9e7e3f79c3a81b34879f494a2816",
"node": "ModelF64Infinity",
"declaration": "dec2flt_model.ModelF64Infinity"
}Captured evidence identities
[
{
"path": "reference/model-evidence/binary64-boundary.txt",
"sha256": "a17d82e7f789ce7f1fbb3922a66ec8806999e526532d637605263882d37b7abf",
"cited_by": [
"Tablet/ModelF64Infinity.tex",
"Tablet/model-support.json"
]
},
{
"path": "reference/model-evidence/binary64-probe.rs",
"sha256": "68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e",
"cited_by": [
"reference/model-evidence/binary64-boundary.txt"
]
}
]core::f64::{f64}::NEG_INFINITY
Inspect related source (1)
- NEG_INFINITY · core/src/num/f64.rs:515 Rust library
Related source and models come from the extraction records and declared dependencies.
| Rust item | core::f64::{f64}::NEG_INFINITY |
|---|---|
| Recorded source | /rustc/library/core/src/num/f64.rs |
| Lines | 515:4–515:31 |
The related-source link includes this operation’s Rust standard-library implementation.
Opaque extraction signature
: Result F64Lean definition
Trellis authored this Lean model for an operation outside the mechanical extraction. Modeling choices explains its behavior and review.
import Tablet.Binary64ModelDefault
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: ModelF64NegInfinity]
def ModelF64NegInfinity : Result F64 :=
-- BODY
Binary64ModelDefault.negInfinity
end dec2flt_model
Why this model is faithful
Definition
Preservation argument
Claim
Proof
fff0000000000000, as recorded in reference/model-evidence/binary64-boundary.txt.Authored arguments for individual requirements
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
Recorded review
| Correspondence | Pass |
|---|---|
| Preservation | VerifierPass |
ModelF64NegInfinity · Lean checked
Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
reference/model-evidence/binary64-boundary.txt
Primary evidence for the binary64 boundary
==========================================
Scope and identities
--------------------
This record concerns the frozen x86_64-unknown-linux-gnu extraction, the
adapted Rust crate retained in this repository, and the installed toolchain
named by modeling-input/SETUP.md. The probe source is retained at
reference/model-evidence/binary64-probe.rs; no scratch source is required to
reproduce it.
Toolchain executable:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
Target:
x86_64-unknown-linux-gnu
rustc executable SHA-256:
162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
Probe source SHA-256:
68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
Compiled probe SHA-256:
f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
Frozen generated.lean SHA-256:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692
Frozen modeling-input/manifest.json SHA-256:
2fc182c0c7acccad30c449ca349b999759b84e8ed4ec9d590e8295e43eeec077
Approved Binary64ModelDefault.lean SHA-256 at the time of this record:
03ae48fb631e6242bd21bf95d0481b66acae05f8cab343c7ab279b3c116538a3
Exact reproduction commands
---------------------------
Run from the repository root:
R=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
P=reference/model-evidence/binary64-probe.rs
B=.trellis/scratch/binary64-probe
"$R" --version --verbose
sha256sum "$R"
sha256sum "$P"
"$R" --target x86_64-unknown-linux-gnu -C opt-level=0 "$P" -o "$B"
sha256sum "$B"
"$B"
Raw output
----------
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
rustc_sha256=162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
probe_sha256=68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
binary_sha256=f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
target_arch=x86_64
mantissa_digits=53
exponent_mask=7ff0000000000000
mantissa_mask=000fffffffffffff
nan=7ff8000000000000
infinity=7ff0000000000000
neg_infinity=fff0000000000000
nan_category=Nan
infinity_category=Infinite
zero_category=Zero
subnormal_category=Subnormal
normal_category=Normal
from_bits_to_bits=7ff0000000000001
neg_payload_nan=fff0000000000001
neg_zero=8000000000000000
subnormal_tie_to_even_zero=0000000000000000
subnormal_tie_to_even_two=0000000000000002
normal_division=3fb999999999999a
mul_negative_zero=8000000000000000
div_negative_zero=8000000000000000
div_negative_infinity=fff0000000000000
mul_overflow=7ff0000000000000
mul_zero_infinity_is_nan=true
div_zero_zero_is_nan=true
mul_nan_is_nan=true
cast_2_pow_53=4340000000000000
cast_2_pow_53_plus_1=4340000000000000
Pinned Rust library sources
---------------------------
The installed sources below belong to the same named toolchain. Their
SHA-256 identities are:
core/src/primitive_docs.rs
c4b8627dd67d5dac8f383f383a9e7ff1229ea43e7599610fc61988694cf0f3e5
core/src/num/f64.rs
84540a6a59e347c63caabe12cf895ba1239c76a50682471567007138fac1c618
core/src/clone.rs
23f9cfc80347fde6b8457d46fbf7a2b8d9f34c8c58601b0b6f714ca2f6d1976b
The exact relevant text of core/src/primitive_docs.rs is:
#[rustc_doc_primitive = "f64"]
#[doc(alias = "double")]
/// A 64-bit floating-point type (specifically, the "binary64" type defined in IEEE 754-2008).
///
/// This type is very similar to [`prim@f32`], but has increased precision by using twice as many
/// bits. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on double-precision
/// values][wikipedia] for more information.
The referenced primitive-f32 documentation supplies the common primitive
floating-point operation rules quoted next:
/// - −0.0: IEEE 754 floating-point numbers have a bit that indicates their sign, so −0.0 is a
/// possible value. For comparison −0.0 = +0.0, but floating-point operations can carry
/// the sign bit through arithmetic operations. This means −0.0 × +0.0 produces −0.0 and
/// a negative number rounded to a value smaller than a float can represent also produces −0.0.
/// - [∞](#associatedconstant.INFINITY) and
/// [−∞](#associatedconstant.NEG_INFINITY): these result from calculations
/// like `1.0 / 0.0`.
///
/// When a primitive operation (addition, subtraction, multiplication, or
/// division) is performed on this type, the result is rounded according to the
/// roundTiesToEven direction defined in IEEE 754-2008. That means:
///
/// - The result is the representable value closest to the true value, if there
/// is a unique closest representable value.
/// - If the true value is exactly half-way between two representable values,
/// the result is the one with an even least-significant binary digit.
/// - If the true value's magnitude is ≥ `f32::MAX` + 2<sup>(`f32::MAX_EXP` −
/// `f32::MANTISSA_DIGITS` − 1)</sup>, the result is ∞ or −∞ (preserving the
/// true value's sign).
The same file explicitly separates arithmetic NaN choice from exact bitwise
operations; its exact relevant text is:
/// The rules for NaN values differ between *arithmetic* and *non-arithmetic* (or "bitwise")
/// operations. The non-arithmetic operations are unary `-`, `abs`, `copysign`, `signum`,
/// `{to,from}_bits`, `{to,from}_{be,le,ne}_bytes` and `is_sign_{positive,negative}`. These
/// operations are guaranteed to exactly preserve the bit pattern of their input except for possibly
/// changing the sign bit.
///
/// The following rules apply when a NaN value is returned from an arithmetic operation:
/// - The result has a non-deterministic sign.
/// - The quiet bit and payload are non-deterministically chosen from
/// the following set of options:
///
/// - **Preferred NaN**: The quiet bit is set and the payload is all-zero.
/// - **Quieting NaN propagation**: The quiet bit is set and the payload is copied from any input
/// operand that is a NaN. If the inputs and outputs do not have the same payload size (i.e., for
/// `as` casts), then
/// - If the output is smaller than the input, low-order bits of the payload get dropped.
/// - If the output is larger than the input, the payload gets filled up with 0s in the low-order
/// bits.
/// - **Unchanged NaN propagation**: The quiet bit and payload are copied from any input operand
/// that is a NaN. If the inputs and outputs do not have the same size (i.e., for `as` casts), the
/// same rules as for "quieting NaN propagation" apply, with one caveat: if the output is smaller
/// than the input, dropping the low-order bits may result in a payload of 0; a payload of 0 is not
/// possible with a signaling NaN (the all-0 significand encodes an infinity) so unchanged NaN
/// propagation cannot occur with some inputs.
/// - **Target-specific NaN**: The quiet bit is set and the payload is picked from a target-specific
/// set of "extra" possible NaN payloads. The set can depend on the input operand values.
/// See the table below for the concrete NaNs this set contains on various targets.
///
/// | `target_arch` | Extra payloads possible on this platform |
/// |---------------|------------------------------------------|
/// | `aarch64`, `arm`, `arm64ec`, `loongarch64`, `powerpc` (except when `target_abi = "spe"`), `powerpc64`, `riscv32`, `riscv64`, `s390x`, `x86`, `x86_64` | None |
Thus the model's preferred quiet NaN is one permitted result whenever
multiplication or division returns NaN. This does not claim that arbitrary
Rust arithmetic NaNs have those exact bits. By contrast, unary negation and
bit conversion must preserve all non-sign bits exactly, including for every
NaN payload.
The exact relevant declarations in core/src/num/f64.rs are:
pub const MANTISSA_DIGITS: u32 = 53;
pub const NAN: f64 = 0.0_f64 / 0.0_f64;
pub const INFINITY: f64 = 1.0_f64 / 0.0_f64;
pub const NEG_INFINITY: f64 = -1.0_f64 / 0.0_f64;
pub const SIGN_MASK: u64 = 0x8000_0000_0000_0000;
pub const EXPONENT_MASK: u64 = 0x7ff0_0000_0000_0000;
pub const MANTISSA_MASK: u64 = 0x000f_ffff_ffff_ffff;
pub const fn classify(self) -> FpCategory {
// We used to have complicated logic here that avoids the simple bit-based tests to work
// around buggy codegen for x87 targets (see
// https://github.com/rust-lang/rust/issues/114479). However, some LLVM versions later, none
// of our tests is able to find any difference between the complicated and the naive
// version, so now we are back to the naive version.
let b = self.to_bits();
match (b & Self::MANTISSA_MASK, b & Self::EXPONENT_MASK) {
(0, Self::EXPONENT_MASK) => FpCategory::Infinite,
(_, Self::EXPONENT_MASK) => FpCategory::Nan,
(0, 0) => FpCategory::Zero,
(_, 0) => FpCategory::Subnormal,
_ => FpCategory::Normal,
}
}
pub const fn to_bits(self) -> u64 {
// SAFETY: `u64` is a plain old datatype so we can always transmute to it.
unsafe { mem::transmute(self) }
}
pub const fn from_bits(v: u64) -> Self {
// It turns out the safety issues with sNaN were overblown! Hooray!
// SAFETY: `u64` is a plain old datatype so we can always transmute from it.
unsafe { mem::transmute(v) }
}
The exact scalar clone body in core/src/clone.rs is:
impl const Clone for $t {
#[inline(always)]
fn clone(&self) -> Self {
*self
}
}
Frozen adapted source
---------------------
The relevant retained source file hashes are:
crate/traits.rs
9013270fb846edcb0bdf2abd0353f575fdd727974cba9e89bdab8bb4c2b4f0bf
crate/dec2flt/mod.rs
b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012
crate/dec2flt/parse.rs
50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f
crate/dec2flt/decimal.rs
633658be803b7369b18feb098a8aa1b5f714a933d3b79ecbc4899a1b05f35beb
crate/dec2flt/lemire.rs
fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1
crate/dec2flt/slow.rs
93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485
Exact constant and bit-conversion excerpt from crate/traits.rs:
impl Float for f64 {
type Int = u64;
const INFINITY: Self = Self::INFINITY;
const NEG_INFINITY: Self = Self::NEG_INFINITY;
const NAN: Self = Self::NAN;
// Bit-identical to the upstream `-f64::NAN`, without the unsupported
// compile-time float negation.
const NEG_NAN: Self = f64::from_bits(0xFFF8_0000_0000_0000);
const BITS: u32 = 64;
const SIG_TOTAL_BITS: u32 = Self::MANTISSA_DIGITS;
const EXP_MASK: Self::Int = Self::EXPONENT_MASK;
const SIG_MASK: Self::Int = Self::MANTISSA_MASK;
fn to_bits(self) -> Self::Int {
self.to_bits()
}
fn classify(self) -> FpCategory {
self.classify()
}
}
impl FloatExt for f64 {
#[inline]
fn from_u64_bits(v: u64) -> Self {
f64::from_bits(v)
}
Exact derived-constant defaults from crate/traits.rs:
/// The number of bits in the significand, *excluding* the hidden bit.
const SIG_BITS: u32 = Self::SIG_TOTAL_BITS - 1;
/// Number of bits in the exponent.
const EXP_BITS: u32 = Self::BITS - Self::SIG_BITS - 1;
/// The saturated (maximum bitpattern) value of the exponent, i.e. the infinite
/// representation.
///
/// This shifted fully right, use `EXP_MASK` for the shifted value.
const EXP_SAT: u32 = (1 << Self::EXP_BITS) - 1;
/// Signed version of `EXP_SAT` since we convert a lot.
const INFINITE_POWER: i32 = Self::EXP_SAT as i32;
/// The exponent bias value. This is also the maximum value of the exponent.
const EXP_BIAS: u32 = Self::EXP_SAT >> 1;
/// Minimum exponent value of normal values.
const EXP_MIN: i32 = -(Self::EXP_BIAS as i32 - 1);
Together with the f64-instance lines `BITS = 64` and
`SIG_TOTAL_BITS = Self::MANTISSA_DIGITS` in the preceding excerpt, these
defaults derive SIG_BITS, EXP_MIN, and INFINITE_POWER from the primitive
mantissa-digit constant rather than introducing independent parameters.
Exact checked cast excerpt from crate/dec2flt/mod.rs:
#[inline]
// This method is precisely the source `u64 as f64` primitive conversion.
// Aeneas cannot translate that cast; opacity is confined to the cast while
// the fast-path algorithm, its range proof obligation, and all calls stay
// visible in the extracted model.
#[charon::opaque]
fn from_u64(v: u64) -> Self {
debug_assert!(v <= Self::MAX_MANTISSA_FAST_PATH);
v as _
}
Here MAX_MANTISSA_FAST_PATH is the retained default 1 << 53. Therefore the
source succeeds only through the modeled branch v <= 2^53 in this debug
configuration; above it the debug assertion fails before the cast. On the
successful branch every integer is exactly representable, so the source cast
and the model rounder return the same word.
Exact power-table and assembly excerpts from crate/dec2flt/mod.rs:
/// Maximum mantissa for the fast-path (`1 << 53` for f64).
const MAX_MANTISSA_FAST_PATH: u64 = 1 << Self::SIG_TOTAL_BITS;
const MAX_EXPONENT_FAST_PATH: i64 = 22;
const MIN_EXPONENT_FAST_PATH: i64 = -Self::MAX_EXPONENT_FAST_PATH;
const MAX_EXPONENT_DISGUISED_FAST_PATH: i64 = 37;
fn pow10_fast_path(exponent: usize) -> Self {
// These bit patterns are exactly the source table's rounded binary64
// literals. The match is the same masked lookup; it merely keeps float
// constants out of Aeneas's unsupported constant interpreter.
match exponent & 31 {
0 => f64::from_bits(0x3FF0_0000_0000_0000),
1 => f64::from_bits(0x4024_0000_0000_0000),
2 => f64::from_bits(0x4059_0000_0000_0000),
3 => f64::from_bits(0x408F_4000_0000_0000),
4 => f64::from_bits(0x40C3_8800_0000_0000),
5 => f64::from_bits(0x40F8_6A00_0000_0000),
6 => f64::from_bits(0x412E_8480_0000_0000),
7 => f64::from_bits(0x4163_12D0_0000_0000),
8 => f64::from_bits(0x4197_D784_0000_0000),
9 => f64::from_bits(0x41CD_CD65_0000_0000),
10 => f64::from_bits(0x4202_A05F_2000_0000),
11 => f64::from_bits(0x4237_4876_E800_0000),
12 => f64::from_bits(0x426D_1A94_A200_0000),
13 => f64::from_bits(0x42A2_309C_E540_0000),
14 => f64::from_bits(0x42D6_BCC4_1E90_0000),
15 => f64::from_bits(0x430C_6BF5_2634_0000),
16 => f64::from_bits(0x4341_C379_37E0_8000),
17 => f64::from_bits(0x4376_3457_85D8_A000),
18 => f64::from_bits(0x43AB_C16D_674E_C800),
19 => f64::from_bits(0x43E1_58E4_6091_3D00),
20 => f64::from_bits(0x4415_AF1D_78B5_8C40),
21 => f64::from_bits(0x444B_1AE4_D6E2_EF50),
22 => f64::from_bits(0x4480_F0CF_064D_D592),
_ => f64::from_bits(0),
}
}
fn biased_fp_to_float<F: FloatExt>(x: BiasedFp) -> F {
let mut word = x.m;
word |= (x.p_biased as u64) << F::SIG_BITS;
F::from_u64_bits(word)
}
Exact native-call excerpt from crate/dec2flt/decimal.rs:
fn can_use_fast_path<F: Lemire>(&self) -> bool {
F::MIN_EXPONENT_FAST_PATH <= self.exponent
&& self.exponent <= F::MAX_EXPONENT_DISGUISED_FAST_PATH
&& self.mantissa <= F::MAX_MANTISSA_FAST_PATH
&& !self.many_digits
}
if !self.can_use_fast_path::<F>() {
return None;
}
let value = if self.exponent <= F::MAX_EXPONENT_FAST_PATH {
// normal fast path
let value = F::from_u64(self.mantissa);
if self.exponent < 0 {
// Explicit trait calls preserve Rust arithmetic and resolve
// the generic output type that Charon leaves ambiguous.
core::ops::Div::div(value, F::pow10_fast_path((-self.exponent) as _))
} else {
core::ops::Mul::mul(value, F::pow10_fast_path(self.exponent as _))
}
} else {
// disguised fast path
let shift = self.exponent - F::MAX_EXPONENT_FAST_PATH;
let mantissa = self.mantissa.checked_mul(INT_POW10[shift as usize])?;
if mantissa > F::MAX_MANTISSA_FAST_PATH {
return None;
}
core::ops::Mul::mul(
F::from_u64(mantissa),
F::pow10_fast_path(F::MAX_EXPONENT_FAST_PATH as _),
)
};
if self.negative {
Some(core::ops::Neg::neg(value))
} else {
Some(value)
}
The preceding can_use_fast_path body, together with
MAX_MANTISSA_FAST_PATH = 1 << SIG_TOTAL_BITS and SIG_TOTAL_BITS = 53 for f64,
requires the exponent to lie between -22 and 37, the input mantissa to be at
most 2^53, and many_digits to be false. Consequently an ordinary arithmetic
call has a from_u64 operand in 0..=2^53. In its negative-exponent arm,
`-self.exponent` lies in 1..=22; in its nonnegative arm, `self.exponent` lies
in 0..=22. The disguised branch checks its multiplied mantissa against 2^53
before from_u64 and uses table index 22. The paired statement
Binary64NativeCallDomain does not assert this source reachability. It says
conditionally that a from_u64 argument at most 2^53 succeeds with a finite,
non-NaN word and that a table index at most 22 succeeds with a positive,
nonzero, finite, non-NaN word. Applying that conditional statement to the
guards just derived establishes those properties for the actual ordinary and
disguised calls, and in particular establishes that every executed divisor is
nonzero.
Exact special-value excerpt from crate/dec2flt/parse.rs:
let float = match (register, len) {
(INF_3, 3) => F::INFINITY,
(INF_8, 8) => F::INFINITY,
(NAN, 3) => F::NAN,
_ => return None,
};
if negative { Some(-float) } else { Some(float) }
Thus the executed special route is INFINITY or NAN followed by conditional
negation; it does not select NEG_INFINITY or NEG_NAN directly.
The number helper has the exact source body
pub fn parse_number(s: &[u8]) -> Option<Decimal> {
if let Some((float, rest)) = parse_partial_number(s) {
if rest == s.len() {
return Some(float);
}
}
None
}
It returns only the Decimal produced by parse_partial_number; there is no
float type parameter or float operation at this boundary.
The integer-tier helper has the source type and exact executable excerpts
below (long explanatory comments are elided). In particular it returns a raw
BiasedFp and contains no from_u64 cast, primitive float multiplication,
division, negation, or from_bits call:
pub fn compute_float<F: Float>(q: i64, mut w: u64) -> BiasedFp {
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let fp_error = BiasedFp::zero_pow2(-1);
// Short-circuit if the value can only be a literal 0 or infinity.
if w == 0 || q < F::SMALLEST_POWER_OF_TEN as i64 {
return fp_zero;
} else if q > F::LARGEST_POWER_OF_TEN as i64 {
return fp_inf;
}
// Normalize our significant digits, so the most-significant bit is set.
let lz = w.leading_zeros();
w <<= lz;
let (lo, hi) = compute_product_approx(q, w, F::SIG_BITS as usize + 3);
if lo == 0xFFFF_FFFF_FFFF_FFFF {
let inside_safe_exponent = (q >= -27) && (q <= 55);
if !inside_safe_exponent {
return fp_error;
}
}
let upperbit = (hi >> 63) as i32;
let mut mantissa = hi >> (upperbit + 64 - F::SIG_BITS as i32 - 3);
let mut power2 = power(q as i32) + upperbit - lz as i32 - F::EXP_MIN + 1;
if power2 <= 0 {
if -power2 + 1 >= 64 {
// Have more than 64 bits below the minimum exponent, must be 0.
return fp_zero;
}
// Have a subnormal value.
mantissa >>= -power2 + 1;
mantissa += mantissa & 1;
mantissa >>= 1;
power2 = (mantissa >= (1_u64 << F::SIG_BITS)) as i32;
return BiasedFp { m: mantissa, p_biased: power2 };
}
// Need to handle rounding ties. Normally, we need to round up,
// but if we fall right in between and we have an even basis, we
// need to round down.
if lo <= 1
&& q >= F::MIN_EXPONENT_ROUND_TO_EVEN as i64
&& q <= F::MAX_EXPONENT_ROUND_TO_EVEN as i64
&& mantissa & 0b11 == 0b01
&& (mantissa << (upperbit + 64 - F::SIG_BITS as i32 - 3)) == hi
{
// Zero the lowest bit, so we don't round up.
mantissa &= !1_u64;
}
// Round-to-even, then shift the significant digits into place.
mantissa += mantissa & 1;
mantissa >>= 1;
if mantissa >= (2_u64 << F::SIG_BITS) {
// Rounding up overflowed, so the carry bit is set. Set the
// mantissa to 1 (only the implicit, hidden bit is set) and
// increase the exponent.
mantissa = 1_u64 << F::SIG_BITS;
power2 += 1;
}
// Zero out the hidden bit.
mantissa &= !(1_u64 << F::SIG_BITS);
if power2 >= F::INFINITE_POWER {
// Exponent is above largest normal value, must be infinite.
return fp_inf;
}
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact slow-tier source body from crate/dec2flt/slow.rs:
pub(crate) fn parse_long_mantissa<F: Float>(s: &[u8]) -> BiasedFp {
const MAX_SHIFT: usize = 60;
const NUM_POWERS: usize = 19;
const POWERS: [u8; 19] =
[0, 3, 6, 9, 13, 16, 19, 23, 26, 29, 33, 36, 39, 43, 46, 49, 53, 56, 59];
let get_shift = |n| {
if n < NUM_POWERS { POWERS[n] as usize } else { MAX_SHIFT }
};
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let mut d = parse_decimal_seq(s);
// Short-circuit if the value can only be a literal 0 or infinity.
if d.num_digits == 0 || d.decimal_point < -324 {
return fp_zero;
} else if d.decimal_point >= 310 {
return fp_inf;
}
let mut exp2 = 0_i32;
let mut loop_result = None;
// Shift right toward (1/2 ... 1].
while d.decimal_point > 0 && loop_result.is_none() {
let n = d.decimal_point as usize;
let shift = get_shift(n);
d.right_shift(shift);
if d.decimal_point < -DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_zero);
} else {
exp2 += shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// Shift left toward (1/2 ... 1].
while d.decimal_point <= 0 && loop_result.is_none() {
let shift = if d.decimal_point == 0 {
match d.digits[0] {
digit if digit >= 5 => break,
0 | 1 => 2,
_ => 1,
}
} else {
get_shift((-d.decimal_point) as _)
};
d.left_shift(shift);
if d.decimal_point > DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_inf);
} else {
exp2 -= shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// We are now in the range [1/2 ... 1] but the binary format uses [1 ... 2].
exp2 -= 1;
while F::EXP_MIN > exp2 {
let mut n = (F::EXP_MIN - exp2) as usize;
if n > MAX_SHIFT {
n = MAX_SHIFT;
}
d.right_shift(n);
exp2 += n as i32;
}
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
// Shift the decimal to the hidden bit, and then round the value
// to get the high mantissa+1 bits.
d.left_shift(F::SIG_BITS as usize + 1);
let mut mantissa = d.round();
if mantissa >= (1_u64 << (F::SIG_BITS + 1)) {
// Rounding up overflowed to the carry bit, need to
// shift back to the hidden bit.
d.right_shift(1);
exp2 += 1;
mantissa = d.round();
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
}
let mut power2 = exp2 - F::EXP_MIN + 1;
if mantissa < (1_u64 << F::SIG_BITS) {
power2 -= 1;
}
// Zero out all the bits above the explicit mantissa bits.
mantissa &= (1_u64 << F::SIG_BITS) - 1;
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact final numeric-sign excerpt from crate/dec2flt/mod.rs:
let assembled_word = fp.m | ((fp.p_biased as u64) << F::SIG_BITS);
let assembly_result = biased_fp_to_float::<F>(fp);
let lexical_sign_applied = num.negative;
let result = if lexical_sign_applied {
core::ops::Neg::neg(assembly_result)
} else {
assembly_result
};
Thus a numeric execution that reaches the integer/slow selection route
assembles its selected pair with from_bits through biased_fp_to_float and only
then conditionally negates it. A successful try_fast_path returns earlier and
does not perform this assembly. compute_float and parse_long_mantissa produce
raw BiasedFp pairs and do not call from_u64, primitive float multiplication,
division, negation, or from_bits; they do, however, execute constants derived
from SIG_TOTAL_BITS before producing those pairs.
Retained structural-boundary evidence
-------------------------------------
Several adjacent structural bindings cite this same evidence record. Their
pinned library source identities are:
core/src/num/mod.rs
f0820f9dfb94999440c8cb4a349736fa21df7e5668e19b6b49e016ff67c05ce3
core/src/option.rs
7cf61204b05d98a95bc2e322d5fbfc1f4f91505109971917d9a7fb47151c50e6
core/src/slice/mod.rs
354992a6a3d69a0185eef9044a07ea5180e767bdb467aef55e69ee3d44317840
core/src/str/mod.rs
284b4c147b5d0497ce9146f6b96e564f196aed10411a62cdccf5fc5243d40f78
Exact ASCII-digit body from core/src/num/mod.rs:
pub const fn is_ascii_digit(&self) -> bool {
matches!(*self, b'0'..=b'9')
}
Exact Option control-flow bodies from core/src/option.rs:
fn branch(self) -> ControlFlow<Self::Residual, Self::Output> {
match self {
Some(v) => ControlFlow::Continue(v),
None => ControlFlow::Break(None),
}
}
fn from_residual(residual: Option<convert::Infallible>) -> Self {
match residual {
None => None,
}
}
Exact slice observation bodies from core/src/slice/mod.rs:
pub const fn first(&self) -> Option<&T> {
if let [first, ..] = self { Some(first) } else { None }
}
pub const fn split_first(&self) -> Option<(&T, &[T])> {
if let [first, tail @ ..] = self { Some((first, tail)) } else { None }
}
Exact string-byte body from core/src/str/mod.rs:
pub const fn as_bytes(&self) -> &[u8] {
// SAFETY: const sound because we transmute two types with the same layout
unsafe { mem::transmute(self) }
}
reference/model-evidence/binary64-probe.rs
#![feature(float_masks)]
use std::num::FpCategory;
fn bits(label: &str, value: f64) {
println!("{label}={:016x}", value.to_bits());
}
fn main() {
println!("target_arch={}", std::env::consts::ARCH);
println!("mantissa_digits={}", f64::MANTISSA_DIGITS);
println!("exponent_mask={:016x}", f64::EXPONENT_MASK);
println!("mantissa_mask={:016x}", f64::MANTISSA_MASK);
bits("nan", f64::NAN);
bits("infinity", f64::INFINITY);
bits("neg_infinity", f64::NEG_INFINITY);
for (label, value) in [
("nan_category", f64::NAN),
("infinity_category", f64::INFINITY),
("zero_category", 0.0),
("subnormal_category", f64::from_bits(1)),
("normal_category", 1.0),
] {
let category = match value.classify() {
FpCategory::Nan => "Nan",
FpCategory::Infinite => "Infinite",
FpCategory::Zero => "Zero",
FpCategory::Subnormal => "Subnormal",
FpCategory::Normal => "Normal",
};
println!("{label}={category}");
}
let payload_nan_word = 0x7ff0_0000_0000_0001_u64;
println!(
"from_bits_to_bits={:016x}",
f64::from_bits(payload_nan_word).to_bits()
);
bits("neg_payload_nan", -f64::from_bits(payload_nan_word));
bits("neg_zero", -0.0);
bits("subnormal_tie_to_even_zero", f64::from_bits(1) * 0.5);
bits("subnormal_tie_to_even_two", f64::from_bits(3) * 0.5);
bits("normal_division", 1.0 / 10.0);
bits("mul_negative_zero", -0.0 * 2.0);
bits("div_negative_zero", -1.0 / f64::INFINITY);
bits("div_negative_infinity", 1.0 / -0.0);
bits("mul_overflow", f64::MAX * (1.0 + f64::EPSILON));
println!("mul_zero_infinity_is_nan={}", (0.0 * f64::INFINITY).is_nan());
println!("div_zero_zero_is_nan={}", (0.0_f64 / 0.0_f64).is_nan());
println!("mul_nan_is_nan={}", (f64::NAN * 1.0).is_nan());
bits("cast_2_pow_53", (1_u64 << 53) as f64);
bits("cast_2_pow_53_plus_1", ((1_u64 << 53) + 1) as f64);
}
Assumptions / kernel axioms
- Classical.choice
- Quot.sound
- propext
conservative transitive union of saved axiom observations across node dependencies
Requirements depending on this item (32)
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
All 32 entries
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
- Exponent agreement
- Correctness or defer
- Native correctness or defer
- Numeric acceptance
- Accumulated-value diagnostic
- Record bounds
- Invalid rejection
- Accumulated-value diagnostic
- Equal-target bridge
- Exact rounding
- Infinity
- Invalid rejection
- NaN acceptance
- No spurious NaNs
- Numeric acceptance
- Numeric sign
- Selected exponent range
- Selected magnitude sign
- Signed zero
- Totality
- Rounding determinism
- Rounding totality
- Full-significand diagnostic
- Infinity
- NaN
- Rejection
These requirements are linked to this item through the declared dependencies of their proofs.
Record details
| Record source | Tablet/model-support.json |
|---|---|
| Kind | opaque external binding |
| Preservation assessment origin | VerifierPanel |
| Preservation fingerprint | preservation-v1:3ad28526f02dd8beab8329b9671d2f9256d43dccc10b9b879f789a10ba83a2bb |
| Preservation current fingerprint | preservation-v1:3ad28526f02dd8beab8329b9671d2f9256d43dccc10b9b879f789a10ba83a2bb |
| Preservation freshness | matches current fingerprint |
| Correspondence approved fingerprint | {"own_tex":"83b0894f6775fa78c9841be37195e3096ccfab2759adf691cec8a3e153f4c667","lean_semantic_closure":"c03e4ef7cdd0f3c15ff594c3a1919b5554f66e2681a60d45ffbb5badff1d2b79","lean_relevant_definition_descendants":{"Binary64Model":"d80435c56f8fcbe084ebc2fbf05989a7ddf07434d0acd161302414cac32f964d","Binary64ModelDefault":"e2475cd1caad0eef450c903f24d2dfb8ffdfadf787ccad3621a86556f41e533a","F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2"},"lean_relevant_dependencies":["Binary64Model","Binary64ModelDefault","F64","core_num_FpCategory"],"preamble_tex":""} |
| Correspondence current fingerprint | {"own_tex":"83b0894f6775fa78c9841be37195e3096ccfab2759adf691cec8a3e153f4c667","lean_semantic_closure":"c03e4ef7cdd0f3c15ff594c3a1919b5554f66e2681a60d45ffbb5badff1d2b79","lean_relevant_definition_descendants":{"Binary64Model":"d80435c56f8fcbe084ebc2fbf05989a7ddf07434d0acd161302414cac32f964d","Binary64ModelDefault":"e2475cd1caad0eef450c903f24d2dfb8ffdfadf787ccad3621a86556f41e533a","F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2"},"lean_relevant_dependencies":["Binary64Model","Binary64ModelDefault","F64","core_num_FpCategory"],"preamble_tex":""} |
| Correspondence freshness | matches current fingerprint |
Exact preservation assessment
{
"status": "VerifierPass",
"origin": "VerifierPanel",
"fingerprints": {
"own_tex_hash": "20893ba246371d8bc8637aa9c57f921e2445f0f6ff4b8feb23988a832afaebc1",
"dep_statement_hashes": {
"Binary64ModelDefault": "be5dcc4afe23616ca8fd1d15d30fbbe4ee2621d68be3341b8e74a66e6dcd736f"
},
"combined_sound_fp": "preservation-v1:3ad28526f02dd8beab8329b9671d2f9256d43dccc10b9b879f789a10ba83a2bb"
},
"lane_votes": {
"v1": "Pass"
},
"reviewer_action_id": null
}Exact source record
{
"name": "core.f64.F64.NEG_INFINITY",
"extracted_signature": ": Result F64",
"rust_symbol": "core::f64::{f64}::NEG_INFINITY",
"raw_declaration_sha256": "85f6e517e439c2f2d5c59aa29884ff38b2381c2f5dd7cb14e7947b232efe7f0e",
"node": "ModelF64NegInfinity",
"declaration": "dec2flt_model.ModelF64NegInfinity"
}Captured evidence identities
[
{
"path": "reference/model-evidence/binary64-boundary.txt",
"sha256": "a17d82e7f789ce7f1fbb3922a66ec8806999e526532d637605263882d37b7abf",
"cited_by": [
"Tablet/ModelF64NegInfinity.tex",
"Tablet/model-support.json"
]
},
{
"path": "reference/model-evidence/binary64-probe.rs",
"sha256": "68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e",
"cited_by": [
"reference/model-evidence/binary64-boundary.txt"
]
}
]core::f64::{f64}::EXPONENT_MASK
Inspect related source (1)
- EXPONENT_MASK · core/src/num/f64.rs:615 Rust library
Related source and models come from the extraction records and declared dependencies.
| Rust item | core::f64::{f64}::EXPONENT_MASK |
|---|---|
| Recorded source | /rustc/library/core/src/num/f64.rs |
| Lines | 615:4–615:32 |
The related-source link includes this operation’s Rust standard-library implementation.
Opaque extraction signature
: Result Std.U64Lean definition
Trellis authored this Lean model for an operation outside the mechanical extraction. Modeling choices explains its behavior and review.
import Tablet.Binary64ModelDefault
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: ModelF64ExponentMask]
def ModelF64ExponentMask : Result Std.U64 :=
-- BODY
Binary64ModelDefault.exponentMask
end dec2flt_model
Why this model is faithful
Definition
Preservation argument
Claim
Proof
7ff0000000000000, exactly the frozen Rust constant recorded in reference/model-evidence/binary64-boundary.txt.Authored arguments for individual requirements
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
Recorded review
| Correspondence | Pass |
|---|---|
| Preservation | VerifierPass |
ModelF64ExponentMask · Lean checked
Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
reference/model-evidence/binary64-boundary.txt
Primary evidence for the binary64 boundary
==========================================
Scope and identities
--------------------
This record concerns the frozen x86_64-unknown-linux-gnu extraction, the
adapted Rust crate retained in this repository, and the installed toolchain
named by modeling-input/SETUP.md. The probe source is retained at
reference/model-evidence/binary64-probe.rs; no scratch source is required to
reproduce it.
Toolchain executable:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
Target:
x86_64-unknown-linux-gnu
rustc executable SHA-256:
162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
Probe source SHA-256:
68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
Compiled probe SHA-256:
f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
Frozen generated.lean SHA-256:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692
Frozen modeling-input/manifest.json SHA-256:
2fc182c0c7acccad30c449ca349b999759b84e8ed4ec9d590e8295e43eeec077
Approved Binary64ModelDefault.lean SHA-256 at the time of this record:
03ae48fb631e6242bd21bf95d0481b66acae05f8cab343c7ab279b3c116538a3
Exact reproduction commands
---------------------------
Run from the repository root:
R=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
P=reference/model-evidence/binary64-probe.rs
B=.trellis/scratch/binary64-probe
"$R" --version --verbose
sha256sum "$R"
sha256sum "$P"
"$R" --target x86_64-unknown-linux-gnu -C opt-level=0 "$P" -o "$B"
sha256sum "$B"
"$B"
Raw output
----------
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
rustc_sha256=162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
probe_sha256=68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
binary_sha256=f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
target_arch=x86_64
mantissa_digits=53
exponent_mask=7ff0000000000000
mantissa_mask=000fffffffffffff
nan=7ff8000000000000
infinity=7ff0000000000000
neg_infinity=fff0000000000000
nan_category=Nan
infinity_category=Infinite
zero_category=Zero
subnormal_category=Subnormal
normal_category=Normal
from_bits_to_bits=7ff0000000000001
neg_payload_nan=fff0000000000001
neg_zero=8000000000000000
subnormal_tie_to_even_zero=0000000000000000
subnormal_tie_to_even_two=0000000000000002
normal_division=3fb999999999999a
mul_negative_zero=8000000000000000
div_negative_zero=8000000000000000
div_negative_infinity=fff0000000000000
mul_overflow=7ff0000000000000
mul_zero_infinity_is_nan=true
div_zero_zero_is_nan=true
mul_nan_is_nan=true
cast_2_pow_53=4340000000000000
cast_2_pow_53_plus_1=4340000000000000
Pinned Rust library sources
---------------------------
The installed sources below belong to the same named toolchain. Their
SHA-256 identities are:
core/src/primitive_docs.rs
c4b8627dd67d5dac8f383f383a9e7ff1229ea43e7599610fc61988694cf0f3e5
core/src/num/f64.rs
84540a6a59e347c63caabe12cf895ba1239c76a50682471567007138fac1c618
core/src/clone.rs
23f9cfc80347fde6b8457d46fbf7a2b8d9f34c8c58601b0b6f714ca2f6d1976b
The exact relevant text of core/src/primitive_docs.rs is:
#[rustc_doc_primitive = "f64"]
#[doc(alias = "double")]
/// A 64-bit floating-point type (specifically, the "binary64" type defined in IEEE 754-2008).
///
/// This type is very similar to [`prim@f32`], but has increased precision by using twice as many
/// bits. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on double-precision
/// values][wikipedia] for more information.
The referenced primitive-f32 documentation supplies the common primitive
floating-point operation rules quoted next:
/// - −0.0: IEEE 754 floating-point numbers have a bit that indicates their sign, so −0.0 is a
/// possible value. For comparison −0.0 = +0.0, but floating-point operations can carry
/// the sign bit through arithmetic operations. This means −0.0 × +0.0 produces −0.0 and
/// a negative number rounded to a value smaller than a float can represent also produces −0.0.
/// - [∞](#associatedconstant.INFINITY) and
/// [−∞](#associatedconstant.NEG_INFINITY): these result from calculations
/// like `1.0 / 0.0`.
///
/// When a primitive operation (addition, subtraction, multiplication, or
/// division) is performed on this type, the result is rounded according to the
/// roundTiesToEven direction defined in IEEE 754-2008. That means:
///
/// - The result is the representable value closest to the true value, if there
/// is a unique closest representable value.
/// - If the true value is exactly half-way between two representable values,
/// the result is the one with an even least-significant binary digit.
/// - If the true value's magnitude is ≥ `f32::MAX` + 2<sup>(`f32::MAX_EXP` −
/// `f32::MANTISSA_DIGITS` − 1)</sup>, the result is ∞ or −∞ (preserving the
/// true value's sign).
The same file explicitly separates arithmetic NaN choice from exact bitwise
operations; its exact relevant text is:
/// The rules for NaN values differ between *arithmetic* and *non-arithmetic* (or "bitwise")
/// operations. The non-arithmetic operations are unary `-`, `abs`, `copysign`, `signum`,
/// `{to,from}_bits`, `{to,from}_{be,le,ne}_bytes` and `is_sign_{positive,negative}`. These
/// operations are guaranteed to exactly preserve the bit pattern of their input except for possibly
/// changing the sign bit.
///
/// The following rules apply when a NaN value is returned from an arithmetic operation:
/// - The result has a non-deterministic sign.
/// - The quiet bit and payload are non-deterministically chosen from
/// the following set of options:
///
/// - **Preferred NaN**: The quiet bit is set and the payload is all-zero.
/// - **Quieting NaN propagation**: The quiet bit is set and the payload is copied from any input
/// operand that is a NaN. If the inputs and outputs do not have the same payload size (i.e., for
/// `as` casts), then
/// - If the output is smaller than the input, low-order bits of the payload get dropped.
/// - If the output is larger than the input, the payload gets filled up with 0s in the low-order
/// bits.
/// - **Unchanged NaN propagation**: The quiet bit and payload are copied from any input operand
/// that is a NaN. If the inputs and outputs do not have the same size (i.e., for `as` casts), the
/// same rules as for "quieting NaN propagation" apply, with one caveat: if the output is smaller
/// than the input, dropping the low-order bits may result in a payload of 0; a payload of 0 is not
/// possible with a signaling NaN (the all-0 significand encodes an infinity) so unchanged NaN
/// propagation cannot occur with some inputs.
/// - **Target-specific NaN**: The quiet bit is set and the payload is picked from a target-specific
/// set of "extra" possible NaN payloads. The set can depend on the input operand values.
/// See the table below for the concrete NaNs this set contains on various targets.
///
/// | `target_arch` | Extra payloads possible on this platform |
/// |---------------|------------------------------------------|
/// | `aarch64`, `arm`, `arm64ec`, `loongarch64`, `powerpc` (except when `target_abi = "spe"`), `powerpc64`, `riscv32`, `riscv64`, `s390x`, `x86`, `x86_64` | None |
Thus the model's preferred quiet NaN is one permitted result whenever
multiplication or division returns NaN. This does not claim that arbitrary
Rust arithmetic NaNs have those exact bits. By contrast, unary negation and
bit conversion must preserve all non-sign bits exactly, including for every
NaN payload.
The exact relevant declarations in core/src/num/f64.rs are:
pub const MANTISSA_DIGITS: u32 = 53;
pub const NAN: f64 = 0.0_f64 / 0.0_f64;
pub const INFINITY: f64 = 1.0_f64 / 0.0_f64;
pub const NEG_INFINITY: f64 = -1.0_f64 / 0.0_f64;
pub const SIGN_MASK: u64 = 0x8000_0000_0000_0000;
pub const EXPONENT_MASK: u64 = 0x7ff0_0000_0000_0000;
pub const MANTISSA_MASK: u64 = 0x000f_ffff_ffff_ffff;
pub const fn classify(self) -> FpCategory {
// We used to have complicated logic here that avoids the simple bit-based tests to work
// around buggy codegen for x87 targets (see
// https://github.com/rust-lang/rust/issues/114479). However, some LLVM versions later, none
// of our tests is able to find any difference between the complicated and the naive
// version, so now we are back to the naive version.
let b = self.to_bits();
match (b & Self::MANTISSA_MASK, b & Self::EXPONENT_MASK) {
(0, Self::EXPONENT_MASK) => FpCategory::Infinite,
(_, Self::EXPONENT_MASK) => FpCategory::Nan,
(0, 0) => FpCategory::Zero,
(_, 0) => FpCategory::Subnormal,
_ => FpCategory::Normal,
}
}
pub const fn to_bits(self) -> u64 {
// SAFETY: `u64` is a plain old datatype so we can always transmute to it.
unsafe { mem::transmute(self) }
}
pub const fn from_bits(v: u64) -> Self {
// It turns out the safety issues with sNaN were overblown! Hooray!
// SAFETY: `u64` is a plain old datatype so we can always transmute from it.
unsafe { mem::transmute(v) }
}
The exact scalar clone body in core/src/clone.rs is:
impl const Clone for $t {
#[inline(always)]
fn clone(&self) -> Self {
*self
}
}
Frozen adapted source
---------------------
The relevant retained source file hashes are:
crate/traits.rs
9013270fb846edcb0bdf2abd0353f575fdd727974cba9e89bdab8bb4c2b4f0bf
crate/dec2flt/mod.rs
b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012
crate/dec2flt/parse.rs
50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f
crate/dec2flt/decimal.rs
633658be803b7369b18feb098a8aa1b5f714a933d3b79ecbc4899a1b05f35beb
crate/dec2flt/lemire.rs
fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1
crate/dec2flt/slow.rs
93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485
Exact constant and bit-conversion excerpt from crate/traits.rs:
impl Float for f64 {
type Int = u64;
const INFINITY: Self = Self::INFINITY;
const NEG_INFINITY: Self = Self::NEG_INFINITY;
const NAN: Self = Self::NAN;
// Bit-identical to the upstream `-f64::NAN`, without the unsupported
// compile-time float negation.
const NEG_NAN: Self = f64::from_bits(0xFFF8_0000_0000_0000);
const BITS: u32 = 64;
const SIG_TOTAL_BITS: u32 = Self::MANTISSA_DIGITS;
const EXP_MASK: Self::Int = Self::EXPONENT_MASK;
const SIG_MASK: Self::Int = Self::MANTISSA_MASK;
fn to_bits(self) -> Self::Int {
self.to_bits()
}
fn classify(self) -> FpCategory {
self.classify()
}
}
impl FloatExt for f64 {
#[inline]
fn from_u64_bits(v: u64) -> Self {
f64::from_bits(v)
}
Exact derived-constant defaults from crate/traits.rs:
/// The number of bits in the significand, *excluding* the hidden bit.
const SIG_BITS: u32 = Self::SIG_TOTAL_BITS - 1;
/// Number of bits in the exponent.
const EXP_BITS: u32 = Self::BITS - Self::SIG_BITS - 1;
/// The saturated (maximum bitpattern) value of the exponent, i.e. the infinite
/// representation.
///
/// This shifted fully right, use `EXP_MASK` for the shifted value.
const EXP_SAT: u32 = (1 << Self::EXP_BITS) - 1;
/// Signed version of `EXP_SAT` since we convert a lot.
const INFINITE_POWER: i32 = Self::EXP_SAT as i32;
/// The exponent bias value. This is also the maximum value of the exponent.
const EXP_BIAS: u32 = Self::EXP_SAT >> 1;
/// Minimum exponent value of normal values.
const EXP_MIN: i32 = -(Self::EXP_BIAS as i32 - 1);
Together with the f64-instance lines `BITS = 64` and
`SIG_TOTAL_BITS = Self::MANTISSA_DIGITS` in the preceding excerpt, these
defaults derive SIG_BITS, EXP_MIN, and INFINITE_POWER from the primitive
mantissa-digit constant rather than introducing independent parameters.
Exact checked cast excerpt from crate/dec2flt/mod.rs:
#[inline]
// This method is precisely the source `u64 as f64` primitive conversion.
// Aeneas cannot translate that cast; opacity is confined to the cast while
// the fast-path algorithm, its range proof obligation, and all calls stay
// visible in the extracted model.
#[charon::opaque]
fn from_u64(v: u64) -> Self {
debug_assert!(v <= Self::MAX_MANTISSA_FAST_PATH);
v as _
}
Here MAX_MANTISSA_FAST_PATH is the retained default 1 << 53. Therefore the
source succeeds only through the modeled branch v <= 2^53 in this debug
configuration; above it the debug assertion fails before the cast. On the
successful branch every integer is exactly representable, so the source cast
and the model rounder return the same word.
Exact power-table and assembly excerpts from crate/dec2flt/mod.rs:
/// Maximum mantissa for the fast-path (`1 << 53` for f64).
const MAX_MANTISSA_FAST_PATH: u64 = 1 << Self::SIG_TOTAL_BITS;
const MAX_EXPONENT_FAST_PATH: i64 = 22;
const MIN_EXPONENT_FAST_PATH: i64 = -Self::MAX_EXPONENT_FAST_PATH;
const MAX_EXPONENT_DISGUISED_FAST_PATH: i64 = 37;
fn pow10_fast_path(exponent: usize) -> Self {
// These bit patterns are exactly the source table's rounded binary64
// literals. The match is the same masked lookup; it merely keeps float
// constants out of Aeneas's unsupported constant interpreter.
match exponent & 31 {
0 => f64::from_bits(0x3FF0_0000_0000_0000),
1 => f64::from_bits(0x4024_0000_0000_0000),
2 => f64::from_bits(0x4059_0000_0000_0000),
3 => f64::from_bits(0x408F_4000_0000_0000),
4 => f64::from_bits(0x40C3_8800_0000_0000),
5 => f64::from_bits(0x40F8_6A00_0000_0000),
6 => f64::from_bits(0x412E_8480_0000_0000),
7 => f64::from_bits(0x4163_12D0_0000_0000),
8 => f64::from_bits(0x4197_D784_0000_0000),
9 => f64::from_bits(0x41CD_CD65_0000_0000),
10 => f64::from_bits(0x4202_A05F_2000_0000),
11 => f64::from_bits(0x4237_4876_E800_0000),
12 => f64::from_bits(0x426D_1A94_A200_0000),
13 => f64::from_bits(0x42A2_309C_E540_0000),
14 => f64::from_bits(0x42D6_BCC4_1E90_0000),
15 => f64::from_bits(0x430C_6BF5_2634_0000),
16 => f64::from_bits(0x4341_C379_37E0_8000),
17 => f64::from_bits(0x4376_3457_85D8_A000),
18 => f64::from_bits(0x43AB_C16D_674E_C800),
19 => f64::from_bits(0x43E1_58E4_6091_3D00),
20 => f64::from_bits(0x4415_AF1D_78B5_8C40),
21 => f64::from_bits(0x444B_1AE4_D6E2_EF50),
22 => f64::from_bits(0x4480_F0CF_064D_D592),
_ => f64::from_bits(0),
}
}
fn biased_fp_to_float<F: FloatExt>(x: BiasedFp) -> F {
let mut word = x.m;
word |= (x.p_biased as u64) << F::SIG_BITS;
F::from_u64_bits(word)
}
Exact native-call excerpt from crate/dec2flt/decimal.rs:
fn can_use_fast_path<F: Lemire>(&self) -> bool {
F::MIN_EXPONENT_FAST_PATH <= self.exponent
&& self.exponent <= F::MAX_EXPONENT_DISGUISED_FAST_PATH
&& self.mantissa <= F::MAX_MANTISSA_FAST_PATH
&& !self.many_digits
}
if !self.can_use_fast_path::<F>() {
return None;
}
let value = if self.exponent <= F::MAX_EXPONENT_FAST_PATH {
// normal fast path
let value = F::from_u64(self.mantissa);
if self.exponent < 0 {
// Explicit trait calls preserve Rust arithmetic and resolve
// the generic output type that Charon leaves ambiguous.
core::ops::Div::div(value, F::pow10_fast_path((-self.exponent) as _))
} else {
core::ops::Mul::mul(value, F::pow10_fast_path(self.exponent as _))
}
} else {
// disguised fast path
let shift = self.exponent - F::MAX_EXPONENT_FAST_PATH;
let mantissa = self.mantissa.checked_mul(INT_POW10[shift as usize])?;
if mantissa > F::MAX_MANTISSA_FAST_PATH {
return None;
}
core::ops::Mul::mul(
F::from_u64(mantissa),
F::pow10_fast_path(F::MAX_EXPONENT_FAST_PATH as _),
)
};
if self.negative {
Some(core::ops::Neg::neg(value))
} else {
Some(value)
}
The preceding can_use_fast_path body, together with
MAX_MANTISSA_FAST_PATH = 1 << SIG_TOTAL_BITS and SIG_TOTAL_BITS = 53 for f64,
requires the exponent to lie between -22 and 37, the input mantissa to be at
most 2^53, and many_digits to be false. Consequently an ordinary arithmetic
call has a from_u64 operand in 0..=2^53. In its negative-exponent arm,
`-self.exponent` lies in 1..=22; in its nonnegative arm, `self.exponent` lies
in 0..=22. The disguised branch checks its multiplied mantissa against 2^53
before from_u64 and uses table index 22. The paired statement
Binary64NativeCallDomain does not assert this source reachability. It says
conditionally that a from_u64 argument at most 2^53 succeeds with a finite,
non-NaN word and that a table index at most 22 succeeds with a positive,
nonzero, finite, non-NaN word. Applying that conditional statement to the
guards just derived establishes those properties for the actual ordinary and
disguised calls, and in particular establishes that every executed divisor is
nonzero.
Exact special-value excerpt from crate/dec2flt/parse.rs:
let float = match (register, len) {
(INF_3, 3) => F::INFINITY,
(INF_8, 8) => F::INFINITY,
(NAN, 3) => F::NAN,
_ => return None,
};
if negative { Some(-float) } else { Some(float) }
Thus the executed special route is INFINITY or NAN followed by conditional
negation; it does not select NEG_INFINITY or NEG_NAN directly.
The number helper has the exact source body
pub fn parse_number(s: &[u8]) -> Option<Decimal> {
if let Some((float, rest)) = parse_partial_number(s) {
if rest == s.len() {
return Some(float);
}
}
None
}
It returns only the Decimal produced by parse_partial_number; there is no
float type parameter or float operation at this boundary.
The integer-tier helper has the source type and exact executable excerpts
below (long explanatory comments are elided). In particular it returns a raw
BiasedFp and contains no from_u64 cast, primitive float multiplication,
division, negation, or from_bits call:
pub fn compute_float<F: Float>(q: i64, mut w: u64) -> BiasedFp {
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let fp_error = BiasedFp::zero_pow2(-1);
// Short-circuit if the value can only be a literal 0 or infinity.
if w == 0 || q < F::SMALLEST_POWER_OF_TEN as i64 {
return fp_zero;
} else if q > F::LARGEST_POWER_OF_TEN as i64 {
return fp_inf;
}
// Normalize our significant digits, so the most-significant bit is set.
let lz = w.leading_zeros();
w <<= lz;
let (lo, hi) = compute_product_approx(q, w, F::SIG_BITS as usize + 3);
if lo == 0xFFFF_FFFF_FFFF_FFFF {
let inside_safe_exponent = (q >= -27) && (q <= 55);
if !inside_safe_exponent {
return fp_error;
}
}
let upperbit = (hi >> 63) as i32;
let mut mantissa = hi >> (upperbit + 64 - F::SIG_BITS as i32 - 3);
let mut power2 = power(q as i32) + upperbit - lz as i32 - F::EXP_MIN + 1;
if power2 <= 0 {
if -power2 + 1 >= 64 {
// Have more than 64 bits below the minimum exponent, must be 0.
return fp_zero;
}
// Have a subnormal value.
mantissa >>= -power2 + 1;
mantissa += mantissa & 1;
mantissa >>= 1;
power2 = (mantissa >= (1_u64 << F::SIG_BITS)) as i32;
return BiasedFp { m: mantissa, p_biased: power2 };
}
// Need to handle rounding ties. Normally, we need to round up,
// but if we fall right in between and we have an even basis, we
// need to round down.
if lo <= 1
&& q >= F::MIN_EXPONENT_ROUND_TO_EVEN as i64
&& q <= F::MAX_EXPONENT_ROUND_TO_EVEN as i64
&& mantissa & 0b11 == 0b01
&& (mantissa << (upperbit + 64 - F::SIG_BITS as i32 - 3)) == hi
{
// Zero the lowest bit, so we don't round up.
mantissa &= !1_u64;
}
// Round-to-even, then shift the significant digits into place.
mantissa += mantissa & 1;
mantissa >>= 1;
if mantissa >= (2_u64 << F::SIG_BITS) {
// Rounding up overflowed, so the carry bit is set. Set the
// mantissa to 1 (only the implicit, hidden bit is set) and
// increase the exponent.
mantissa = 1_u64 << F::SIG_BITS;
power2 += 1;
}
// Zero out the hidden bit.
mantissa &= !(1_u64 << F::SIG_BITS);
if power2 >= F::INFINITE_POWER {
// Exponent is above largest normal value, must be infinite.
return fp_inf;
}
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact slow-tier source body from crate/dec2flt/slow.rs:
pub(crate) fn parse_long_mantissa<F: Float>(s: &[u8]) -> BiasedFp {
const MAX_SHIFT: usize = 60;
const NUM_POWERS: usize = 19;
const POWERS: [u8; 19] =
[0, 3, 6, 9, 13, 16, 19, 23, 26, 29, 33, 36, 39, 43, 46, 49, 53, 56, 59];
let get_shift = |n| {
if n < NUM_POWERS { POWERS[n] as usize } else { MAX_SHIFT }
};
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let mut d = parse_decimal_seq(s);
// Short-circuit if the value can only be a literal 0 or infinity.
if d.num_digits == 0 || d.decimal_point < -324 {
return fp_zero;
} else if d.decimal_point >= 310 {
return fp_inf;
}
let mut exp2 = 0_i32;
let mut loop_result = None;
// Shift right toward (1/2 ... 1].
while d.decimal_point > 0 && loop_result.is_none() {
let n = d.decimal_point as usize;
let shift = get_shift(n);
d.right_shift(shift);
if d.decimal_point < -DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_zero);
} else {
exp2 += shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// Shift left toward (1/2 ... 1].
while d.decimal_point <= 0 && loop_result.is_none() {
let shift = if d.decimal_point == 0 {
match d.digits[0] {
digit if digit >= 5 => break,
0 | 1 => 2,
_ => 1,
}
} else {
get_shift((-d.decimal_point) as _)
};
d.left_shift(shift);
if d.decimal_point > DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_inf);
} else {
exp2 -= shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// We are now in the range [1/2 ... 1] but the binary format uses [1 ... 2].
exp2 -= 1;
while F::EXP_MIN > exp2 {
let mut n = (F::EXP_MIN - exp2) as usize;
if n > MAX_SHIFT {
n = MAX_SHIFT;
}
d.right_shift(n);
exp2 += n as i32;
}
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
// Shift the decimal to the hidden bit, and then round the value
// to get the high mantissa+1 bits.
d.left_shift(F::SIG_BITS as usize + 1);
let mut mantissa = d.round();
if mantissa >= (1_u64 << (F::SIG_BITS + 1)) {
// Rounding up overflowed to the carry bit, need to
// shift back to the hidden bit.
d.right_shift(1);
exp2 += 1;
mantissa = d.round();
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
}
let mut power2 = exp2 - F::EXP_MIN + 1;
if mantissa < (1_u64 << F::SIG_BITS) {
power2 -= 1;
}
// Zero out all the bits above the explicit mantissa bits.
mantissa &= (1_u64 << F::SIG_BITS) - 1;
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact final numeric-sign excerpt from crate/dec2flt/mod.rs:
let assembled_word = fp.m | ((fp.p_biased as u64) << F::SIG_BITS);
let assembly_result = biased_fp_to_float::<F>(fp);
let lexical_sign_applied = num.negative;
let result = if lexical_sign_applied {
core::ops::Neg::neg(assembly_result)
} else {
assembly_result
};
Thus a numeric execution that reaches the integer/slow selection route
assembles its selected pair with from_bits through biased_fp_to_float and only
then conditionally negates it. A successful try_fast_path returns earlier and
does not perform this assembly. compute_float and parse_long_mantissa produce
raw BiasedFp pairs and do not call from_u64, primitive float multiplication,
division, negation, or from_bits; they do, however, execute constants derived
from SIG_TOTAL_BITS before producing those pairs.
Retained structural-boundary evidence
-------------------------------------
Several adjacent structural bindings cite this same evidence record. Their
pinned library source identities are:
core/src/num/mod.rs
f0820f9dfb94999440c8cb4a349736fa21df7e5668e19b6b49e016ff67c05ce3
core/src/option.rs
7cf61204b05d98a95bc2e322d5fbfc1f4f91505109971917d9a7fb47151c50e6
core/src/slice/mod.rs
354992a6a3d69a0185eef9044a07ea5180e767bdb467aef55e69ee3d44317840
core/src/str/mod.rs
284b4c147b5d0497ce9146f6b96e564f196aed10411a62cdccf5fc5243d40f78
Exact ASCII-digit body from core/src/num/mod.rs:
pub const fn is_ascii_digit(&self) -> bool {
matches!(*self, b'0'..=b'9')
}
Exact Option control-flow bodies from core/src/option.rs:
fn branch(self) -> ControlFlow<Self::Residual, Self::Output> {
match self {
Some(v) => ControlFlow::Continue(v),
None => ControlFlow::Break(None),
}
}
fn from_residual(residual: Option<convert::Infallible>) -> Self {
match residual {
None => None,
}
}
Exact slice observation bodies from core/src/slice/mod.rs:
pub const fn first(&self) -> Option<&T> {
if let [first, ..] = self { Some(first) } else { None }
}
pub const fn split_first(&self) -> Option<(&T, &[T])> {
if let [first, tail @ ..] = self { Some((first, tail)) } else { None }
}
Exact string-byte body from core/src/str/mod.rs:
pub const fn as_bytes(&self) -> &[u8] {
// SAFETY: const sound because we transmute two types with the same layout
unsafe { mem::transmute(self) }
}
reference/model-evidence/binary64-probe.rs
#![feature(float_masks)]
use std::num::FpCategory;
fn bits(label: &str, value: f64) {
println!("{label}={:016x}", value.to_bits());
}
fn main() {
println!("target_arch={}", std::env::consts::ARCH);
println!("mantissa_digits={}", f64::MANTISSA_DIGITS);
println!("exponent_mask={:016x}", f64::EXPONENT_MASK);
println!("mantissa_mask={:016x}", f64::MANTISSA_MASK);
bits("nan", f64::NAN);
bits("infinity", f64::INFINITY);
bits("neg_infinity", f64::NEG_INFINITY);
for (label, value) in [
("nan_category", f64::NAN),
("infinity_category", f64::INFINITY),
("zero_category", 0.0),
("subnormal_category", f64::from_bits(1)),
("normal_category", 1.0),
] {
let category = match value.classify() {
FpCategory::Nan => "Nan",
FpCategory::Infinite => "Infinite",
FpCategory::Zero => "Zero",
FpCategory::Subnormal => "Subnormal",
FpCategory::Normal => "Normal",
};
println!("{label}={category}");
}
let payload_nan_word = 0x7ff0_0000_0000_0001_u64;
println!(
"from_bits_to_bits={:016x}",
f64::from_bits(payload_nan_word).to_bits()
);
bits("neg_payload_nan", -f64::from_bits(payload_nan_word));
bits("neg_zero", -0.0);
bits("subnormal_tie_to_even_zero", f64::from_bits(1) * 0.5);
bits("subnormal_tie_to_even_two", f64::from_bits(3) * 0.5);
bits("normal_division", 1.0 / 10.0);
bits("mul_negative_zero", -0.0 * 2.0);
bits("div_negative_zero", -1.0 / f64::INFINITY);
bits("div_negative_infinity", 1.0 / -0.0);
bits("mul_overflow", f64::MAX * (1.0 + f64::EPSILON));
println!("mul_zero_infinity_is_nan={}", (0.0 * f64::INFINITY).is_nan());
println!("div_zero_zero_is_nan={}", (0.0_f64 / 0.0_f64).is_nan());
println!("mul_nan_is_nan={}", (f64::NAN * 1.0).is_nan());
bits("cast_2_pow_53", (1_u64 << 53) as f64);
bits("cast_2_pow_53_plus_1", ((1_u64 << 53) + 1) as f64);
}
Assumptions / kernel axioms
- Classical.choice
- Quot.sound
- propext
conservative transitive union of saved axiom observations across node dependencies
Requirements depending on this item (32)
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
All 32 entries
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
- Exponent agreement
- Correctness or defer
- Native correctness or defer
- Numeric acceptance
- Accumulated-value diagnostic
- Record bounds
- Invalid rejection
- Accumulated-value diagnostic
- Equal-target bridge
- Exact rounding
- Infinity
- Invalid rejection
- NaN acceptance
- No spurious NaNs
- Numeric acceptance
- Numeric sign
- Selected exponent range
- Selected magnitude sign
- Signed zero
- Totality
- Rounding determinism
- Rounding totality
- Full-significand diagnostic
- Infinity
- NaN
- Rejection
These requirements are linked to this item through the declared dependencies of their proofs.
Record details
| Record source | Tablet/model-support.json |
|---|---|
| Kind | opaque external binding |
| Preservation assessment origin | VerifierPanel |
| Preservation fingerprint | preservation-v1:70179391bf08762afabb7c72b7e2fdf174277d28ada0799d12e5131b3e87d6bb |
| Preservation current fingerprint | preservation-v1:70179391bf08762afabb7c72b7e2fdf174277d28ada0799d12e5131b3e87d6bb |
| Preservation freshness | matches current fingerprint |
| Correspondence approved fingerprint | {"own_tex":"255b2144e2885d8d4584092e44db1391e26adb165b2be45c62fcc1a6cb66ce69","lean_semantic_closure":"80c73ea0665302cd5c54c07197df969e3333a5d483f73afd0aafca4293e0d917","lean_relevant_definition_descendants":{"Binary64Model":"d80435c56f8fcbe084ebc2fbf05989a7ddf07434d0acd161302414cac32f964d","Binary64ModelDefault":"e2475cd1caad0eef450c903f24d2dfb8ffdfadf787ccad3621a86556f41e533a","F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2"},"lean_relevant_dependencies":["Binary64Model","Binary64ModelDefault","F64","core_num_FpCategory"],"preamble_tex":""} |
| Correspondence current fingerprint | {"own_tex":"255b2144e2885d8d4584092e44db1391e26adb165b2be45c62fcc1a6cb66ce69","lean_semantic_closure":"80c73ea0665302cd5c54c07197df969e3333a5d483f73afd0aafca4293e0d917","lean_relevant_definition_descendants":{"Binary64Model":"d80435c56f8fcbe084ebc2fbf05989a7ddf07434d0acd161302414cac32f964d","Binary64ModelDefault":"e2475cd1caad0eef450c903f24d2dfb8ffdfadf787ccad3621a86556f41e533a","F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2"},"lean_relevant_dependencies":["Binary64Model","Binary64ModelDefault","F64","core_num_FpCategory"],"preamble_tex":""} |
| Correspondence freshness | matches current fingerprint |
Exact preservation assessment
{
"status": "VerifierPass",
"origin": "VerifierPanel",
"fingerprints": {
"own_tex_hash": "246e282d035a08ddafc287f0a6e193ed2527918e62a352ce8568cb293a706317",
"dep_statement_hashes": {
"Binary64ModelDefault": "be5dcc4afe23616ca8fd1d15d30fbbe4ee2621d68be3341b8e74a66e6dcd736f"
},
"combined_sound_fp": "preservation-v1:70179391bf08762afabb7c72b7e2fdf174277d28ada0799d12e5131b3e87d6bb"
},
"lane_votes": {
"v1": "Pass"
},
"reviewer_action_id": null
}Exact source record
{
"name": "core.f64.F64.EXPONENT_MASK",
"extracted_signature": ": Result Std.U64",
"rust_symbol": "core::f64::{f64}::EXPONENT_MASK",
"raw_declaration_sha256": "f1054e64392d8f9306e8c69015f0b521d9f387edda8458a3bae4773606f46a71",
"node": "ModelF64ExponentMask",
"declaration": "dec2flt_model.ModelF64ExponentMask"
}Captured evidence identities
[
{
"path": "reference/model-evidence/binary64-boundary.txt",
"sha256": "a17d82e7f789ce7f1fbb3922a66ec8806999e526532d637605263882d37b7abf",
"cited_by": [
"Tablet/ModelF64ExponentMask.tex",
"Tablet/model-support.json"
]
},
{
"path": "reference/model-evidence/binary64-probe.rs",
"sha256": "68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e",
"cited_by": [
"reference/model-evidence/binary64-boundary.txt"
]
}
]core::f64::{f64}::MANTISSA_MASK
Inspect related source (1)
- MANTISSA_MASK · core/src/num/f64.rs:637 Rust library
Related source and models come from the extraction records and declared dependencies.
| Rust item | core::f64::{f64}::MANTISSA_MASK |
|---|---|
| Recorded source | /rustc/library/core/src/num/f64.rs |
| Lines | 637:4–637:32 |
The related-source link includes this operation’s Rust standard-library implementation.
Opaque extraction signature
: Result Std.U64Lean definition
Trellis authored this Lean model for an operation outside the mechanical extraction. Modeling choices explains its behavior and review.
import Tablet.Binary64ModelDefault
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: ModelF64MantissaMask]
def ModelF64MantissaMask : Result Std.U64 :=
-- BODY
Binary64ModelDefault.mantissaMask
end dec2flt_model
Why this model is faithful
Definition
Preservation argument
Claim
Proof
000fffffffffffff, exactly the frozen Rust constant recorded in reference/model-evidence/binary64-boundary.txt.Authored arguments for individual requirements
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
Recorded review
| Correspondence | Pass |
|---|---|
| Preservation | VerifierPass |
ModelF64MantissaMask · Lean checked
Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
reference/model-evidence/binary64-boundary.txt
Primary evidence for the binary64 boundary
==========================================
Scope and identities
--------------------
This record concerns the frozen x86_64-unknown-linux-gnu extraction, the
adapted Rust crate retained in this repository, and the installed toolchain
named by modeling-input/SETUP.md. The probe source is retained at
reference/model-evidence/binary64-probe.rs; no scratch source is required to
reproduce it.
Toolchain executable:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
Target:
x86_64-unknown-linux-gnu
rustc executable SHA-256:
162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
Probe source SHA-256:
68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
Compiled probe SHA-256:
f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
Frozen generated.lean SHA-256:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692
Frozen modeling-input/manifest.json SHA-256:
2fc182c0c7acccad30c449ca349b999759b84e8ed4ec9d590e8295e43eeec077
Approved Binary64ModelDefault.lean SHA-256 at the time of this record:
03ae48fb631e6242bd21bf95d0481b66acae05f8cab343c7ab279b3c116538a3
Exact reproduction commands
---------------------------
Run from the repository root:
R=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
P=reference/model-evidence/binary64-probe.rs
B=.trellis/scratch/binary64-probe
"$R" --version --verbose
sha256sum "$R"
sha256sum "$P"
"$R" --target x86_64-unknown-linux-gnu -C opt-level=0 "$P" -o "$B"
sha256sum "$B"
"$B"
Raw output
----------
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
rustc_sha256=162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
probe_sha256=68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
binary_sha256=f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
target_arch=x86_64
mantissa_digits=53
exponent_mask=7ff0000000000000
mantissa_mask=000fffffffffffff
nan=7ff8000000000000
infinity=7ff0000000000000
neg_infinity=fff0000000000000
nan_category=Nan
infinity_category=Infinite
zero_category=Zero
subnormal_category=Subnormal
normal_category=Normal
from_bits_to_bits=7ff0000000000001
neg_payload_nan=fff0000000000001
neg_zero=8000000000000000
subnormal_tie_to_even_zero=0000000000000000
subnormal_tie_to_even_two=0000000000000002
normal_division=3fb999999999999a
mul_negative_zero=8000000000000000
div_negative_zero=8000000000000000
div_negative_infinity=fff0000000000000
mul_overflow=7ff0000000000000
mul_zero_infinity_is_nan=true
div_zero_zero_is_nan=true
mul_nan_is_nan=true
cast_2_pow_53=4340000000000000
cast_2_pow_53_plus_1=4340000000000000
Pinned Rust library sources
---------------------------
The installed sources below belong to the same named toolchain. Their
SHA-256 identities are:
core/src/primitive_docs.rs
c4b8627dd67d5dac8f383f383a9e7ff1229ea43e7599610fc61988694cf0f3e5
core/src/num/f64.rs
84540a6a59e347c63caabe12cf895ba1239c76a50682471567007138fac1c618
core/src/clone.rs
23f9cfc80347fde6b8457d46fbf7a2b8d9f34c8c58601b0b6f714ca2f6d1976b
The exact relevant text of core/src/primitive_docs.rs is:
#[rustc_doc_primitive = "f64"]
#[doc(alias = "double")]
/// A 64-bit floating-point type (specifically, the "binary64" type defined in IEEE 754-2008).
///
/// This type is very similar to [`prim@f32`], but has increased precision by using twice as many
/// bits. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on double-precision
/// values][wikipedia] for more information.
The referenced primitive-f32 documentation supplies the common primitive
floating-point operation rules quoted next:
/// - −0.0: IEEE 754 floating-point numbers have a bit that indicates their sign, so −0.0 is a
/// possible value. For comparison −0.0 = +0.0, but floating-point operations can carry
/// the sign bit through arithmetic operations. This means −0.0 × +0.0 produces −0.0 and
/// a negative number rounded to a value smaller than a float can represent also produces −0.0.
/// - [∞](#associatedconstant.INFINITY) and
/// [−∞](#associatedconstant.NEG_INFINITY): these result from calculations
/// like `1.0 / 0.0`.
///
/// When a primitive operation (addition, subtraction, multiplication, or
/// division) is performed on this type, the result is rounded according to the
/// roundTiesToEven direction defined in IEEE 754-2008. That means:
///
/// - The result is the representable value closest to the true value, if there
/// is a unique closest representable value.
/// - If the true value is exactly half-way between two representable values,
/// the result is the one with an even least-significant binary digit.
/// - If the true value's magnitude is ≥ `f32::MAX` + 2<sup>(`f32::MAX_EXP` −
/// `f32::MANTISSA_DIGITS` − 1)</sup>, the result is ∞ or −∞ (preserving the
/// true value's sign).
The same file explicitly separates arithmetic NaN choice from exact bitwise
operations; its exact relevant text is:
/// The rules for NaN values differ between *arithmetic* and *non-arithmetic* (or "bitwise")
/// operations. The non-arithmetic operations are unary `-`, `abs`, `copysign`, `signum`,
/// `{to,from}_bits`, `{to,from}_{be,le,ne}_bytes` and `is_sign_{positive,negative}`. These
/// operations are guaranteed to exactly preserve the bit pattern of their input except for possibly
/// changing the sign bit.
///
/// The following rules apply when a NaN value is returned from an arithmetic operation:
/// - The result has a non-deterministic sign.
/// - The quiet bit and payload are non-deterministically chosen from
/// the following set of options:
///
/// - **Preferred NaN**: The quiet bit is set and the payload is all-zero.
/// - **Quieting NaN propagation**: The quiet bit is set and the payload is copied from any input
/// operand that is a NaN. If the inputs and outputs do not have the same payload size (i.e., for
/// `as` casts), then
/// - If the output is smaller than the input, low-order bits of the payload get dropped.
/// - If the output is larger than the input, the payload gets filled up with 0s in the low-order
/// bits.
/// - **Unchanged NaN propagation**: The quiet bit and payload are copied from any input operand
/// that is a NaN. If the inputs and outputs do not have the same size (i.e., for `as` casts), the
/// same rules as for "quieting NaN propagation" apply, with one caveat: if the output is smaller
/// than the input, dropping the low-order bits may result in a payload of 0; a payload of 0 is not
/// possible with a signaling NaN (the all-0 significand encodes an infinity) so unchanged NaN
/// propagation cannot occur with some inputs.
/// - **Target-specific NaN**: The quiet bit is set and the payload is picked from a target-specific
/// set of "extra" possible NaN payloads. The set can depend on the input operand values.
/// See the table below for the concrete NaNs this set contains on various targets.
///
/// | `target_arch` | Extra payloads possible on this platform |
/// |---------------|------------------------------------------|
/// | `aarch64`, `arm`, `arm64ec`, `loongarch64`, `powerpc` (except when `target_abi = "spe"`), `powerpc64`, `riscv32`, `riscv64`, `s390x`, `x86`, `x86_64` | None |
Thus the model's preferred quiet NaN is one permitted result whenever
multiplication or division returns NaN. This does not claim that arbitrary
Rust arithmetic NaNs have those exact bits. By contrast, unary negation and
bit conversion must preserve all non-sign bits exactly, including for every
NaN payload.
The exact relevant declarations in core/src/num/f64.rs are:
pub const MANTISSA_DIGITS: u32 = 53;
pub const NAN: f64 = 0.0_f64 / 0.0_f64;
pub const INFINITY: f64 = 1.0_f64 / 0.0_f64;
pub const NEG_INFINITY: f64 = -1.0_f64 / 0.0_f64;
pub const SIGN_MASK: u64 = 0x8000_0000_0000_0000;
pub const EXPONENT_MASK: u64 = 0x7ff0_0000_0000_0000;
pub const MANTISSA_MASK: u64 = 0x000f_ffff_ffff_ffff;
pub const fn classify(self) -> FpCategory {
// We used to have complicated logic here that avoids the simple bit-based tests to work
// around buggy codegen for x87 targets (see
// https://github.com/rust-lang/rust/issues/114479). However, some LLVM versions later, none
// of our tests is able to find any difference between the complicated and the naive
// version, so now we are back to the naive version.
let b = self.to_bits();
match (b & Self::MANTISSA_MASK, b & Self::EXPONENT_MASK) {
(0, Self::EXPONENT_MASK) => FpCategory::Infinite,
(_, Self::EXPONENT_MASK) => FpCategory::Nan,
(0, 0) => FpCategory::Zero,
(_, 0) => FpCategory::Subnormal,
_ => FpCategory::Normal,
}
}
pub const fn to_bits(self) -> u64 {
// SAFETY: `u64` is a plain old datatype so we can always transmute to it.
unsafe { mem::transmute(self) }
}
pub const fn from_bits(v: u64) -> Self {
// It turns out the safety issues with sNaN were overblown! Hooray!
// SAFETY: `u64` is a plain old datatype so we can always transmute from it.
unsafe { mem::transmute(v) }
}
The exact scalar clone body in core/src/clone.rs is:
impl const Clone for $t {
#[inline(always)]
fn clone(&self) -> Self {
*self
}
}
Frozen adapted source
---------------------
The relevant retained source file hashes are:
crate/traits.rs
9013270fb846edcb0bdf2abd0353f575fdd727974cba9e89bdab8bb4c2b4f0bf
crate/dec2flt/mod.rs
b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012
crate/dec2flt/parse.rs
50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f
crate/dec2flt/decimal.rs
633658be803b7369b18feb098a8aa1b5f714a933d3b79ecbc4899a1b05f35beb
crate/dec2flt/lemire.rs
fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1
crate/dec2flt/slow.rs
93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485
Exact constant and bit-conversion excerpt from crate/traits.rs:
impl Float for f64 {
type Int = u64;
const INFINITY: Self = Self::INFINITY;
const NEG_INFINITY: Self = Self::NEG_INFINITY;
const NAN: Self = Self::NAN;
// Bit-identical to the upstream `-f64::NAN`, without the unsupported
// compile-time float negation.
const NEG_NAN: Self = f64::from_bits(0xFFF8_0000_0000_0000);
const BITS: u32 = 64;
const SIG_TOTAL_BITS: u32 = Self::MANTISSA_DIGITS;
const EXP_MASK: Self::Int = Self::EXPONENT_MASK;
const SIG_MASK: Self::Int = Self::MANTISSA_MASK;
fn to_bits(self) -> Self::Int {
self.to_bits()
}
fn classify(self) -> FpCategory {
self.classify()
}
}
impl FloatExt for f64 {
#[inline]
fn from_u64_bits(v: u64) -> Self {
f64::from_bits(v)
}
Exact derived-constant defaults from crate/traits.rs:
/// The number of bits in the significand, *excluding* the hidden bit.
const SIG_BITS: u32 = Self::SIG_TOTAL_BITS - 1;
/// Number of bits in the exponent.
const EXP_BITS: u32 = Self::BITS - Self::SIG_BITS - 1;
/// The saturated (maximum bitpattern) value of the exponent, i.e. the infinite
/// representation.
///
/// This shifted fully right, use `EXP_MASK` for the shifted value.
const EXP_SAT: u32 = (1 << Self::EXP_BITS) - 1;
/// Signed version of `EXP_SAT` since we convert a lot.
const INFINITE_POWER: i32 = Self::EXP_SAT as i32;
/// The exponent bias value. This is also the maximum value of the exponent.
const EXP_BIAS: u32 = Self::EXP_SAT >> 1;
/// Minimum exponent value of normal values.
const EXP_MIN: i32 = -(Self::EXP_BIAS as i32 - 1);
Together with the f64-instance lines `BITS = 64` and
`SIG_TOTAL_BITS = Self::MANTISSA_DIGITS` in the preceding excerpt, these
defaults derive SIG_BITS, EXP_MIN, and INFINITE_POWER from the primitive
mantissa-digit constant rather than introducing independent parameters.
Exact checked cast excerpt from crate/dec2flt/mod.rs:
#[inline]
// This method is precisely the source `u64 as f64` primitive conversion.
// Aeneas cannot translate that cast; opacity is confined to the cast while
// the fast-path algorithm, its range proof obligation, and all calls stay
// visible in the extracted model.
#[charon::opaque]
fn from_u64(v: u64) -> Self {
debug_assert!(v <= Self::MAX_MANTISSA_FAST_PATH);
v as _
}
Here MAX_MANTISSA_FAST_PATH is the retained default 1 << 53. Therefore the
source succeeds only through the modeled branch v <= 2^53 in this debug
configuration; above it the debug assertion fails before the cast. On the
successful branch every integer is exactly representable, so the source cast
and the model rounder return the same word.
Exact power-table and assembly excerpts from crate/dec2flt/mod.rs:
/// Maximum mantissa for the fast-path (`1 << 53` for f64).
const MAX_MANTISSA_FAST_PATH: u64 = 1 << Self::SIG_TOTAL_BITS;
const MAX_EXPONENT_FAST_PATH: i64 = 22;
const MIN_EXPONENT_FAST_PATH: i64 = -Self::MAX_EXPONENT_FAST_PATH;
const MAX_EXPONENT_DISGUISED_FAST_PATH: i64 = 37;
fn pow10_fast_path(exponent: usize) -> Self {
// These bit patterns are exactly the source table's rounded binary64
// literals. The match is the same masked lookup; it merely keeps float
// constants out of Aeneas's unsupported constant interpreter.
match exponent & 31 {
0 => f64::from_bits(0x3FF0_0000_0000_0000),
1 => f64::from_bits(0x4024_0000_0000_0000),
2 => f64::from_bits(0x4059_0000_0000_0000),
3 => f64::from_bits(0x408F_4000_0000_0000),
4 => f64::from_bits(0x40C3_8800_0000_0000),
5 => f64::from_bits(0x40F8_6A00_0000_0000),
6 => f64::from_bits(0x412E_8480_0000_0000),
7 => f64::from_bits(0x4163_12D0_0000_0000),
8 => f64::from_bits(0x4197_D784_0000_0000),
9 => f64::from_bits(0x41CD_CD65_0000_0000),
10 => f64::from_bits(0x4202_A05F_2000_0000),
11 => f64::from_bits(0x4237_4876_E800_0000),
12 => f64::from_bits(0x426D_1A94_A200_0000),
13 => f64::from_bits(0x42A2_309C_E540_0000),
14 => f64::from_bits(0x42D6_BCC4_1E90_0000),
15 => f64::from_bits(0x430C_6BF5_2634_0000),
16 => f64::from_bits(0x4341_C379_37E0_8000),
17 => f64::from_bits(0x4376_3457_85D8_A000),
18 => f64::from_bits(0x43AB_C16D_674E_C800),
19 => f64::from_bits(0x43E1_58E4_6091_3D00),
20 => f64::from_bits(0x4415_AF1D_78B5_8C40),
21 => f64::from_bits(0x444B_1AE4_D6E2_EF50),
22 => f64::from_bits(0x4480_F0CF_064D_D592),
_ => f64::from_bits(0),
}
}
fn biased_fp_to_float<F: FloatExt>(x: BiasedFp) -> F {
let mut word = x.m;
word |= (x.p_biased as u64) << F::SIG_BITS;
F::from_u64_bits(word)
}
Exact native-call excerpt from crate/dec2flt/decimal.rs:
fn can_use_fast_path<F: Lemire>(&self) -> bool {
F::MIN_EXPONENT_FAST_PATH <= self.exponent
&& self.exponent <= F::MAX_EXPONENT_DISGUISED_FAST_PATH
&& self.mantissa <= F::MAX_MANTISSA_FAST_PATH
&& !self.many_digits
}
if !self.can_use_fast_path::<F>() {
return None;
}
let value = if self.exponent <= F::MAX_EXPONENT_FAST_PATH {
// normal fast path
let value = F::from_u64(self.mantissa);
if self.exponent < 0 {
// Explicit trait calls preserve Rust arithmetic and resolve
// the generic output type that Charon leaves ambiguous.
core::ops::Div::div(value, F::pow10_fast_path((-self.exponent) as _))
} else {
core::ops::Mul::mul(value, F::pow10_fast_path(self.exponent as _))
}
} else {
// disguised fast path
let shift = self.exponent - F::MAX_EXPONENT_FAST_PATH;
let mantissa = self.mantissa.checked_mul(INT_POW10[shift as usize])?;
if mantissa > F::MAX_MANTISSA_FAST_PATH {
return None;
}
core::ops::Mul::mul(
F::from_u64(mantissa),
F::pow10_fast_path(F::MAX_EXPONENT_FAST_PATH as _),
)
};
if self.negative {
Some(core::ops::Neg::neg(value))
} else {
Some(value)
}
The preceding can_use_fast_path body, together with
MAX_MANTISSA_FAST_PATH = 1 << SIG_TOTAL_BITS and SIG_TOTAL_BITS = 53 for f64,
requires the exponent to lie between -22 and 37, the input mantissa to be at
most 2^53, and many_digits to be false. Consequently an ordinary arithmetic
call has a from_u64 operand in 0..=2^53. In its negative-exponent arm,
`-self.exponent` lies in 1..=22; in its nonnegative arm, `self.exponent` lies
in 0..=22. The disguised branch checks its multiplied mantissa against 2^53
before from_u64 and uses table index 22. The paired statement
Binary64NativeCallDomain does not assert this source reachability. It says
conditionally that a from_u64 argument at most 2^53 succeeds with a finite,
non-NaN word and that a table index at most 22 succeeds with a positive,
nonzero, finite, non-NaN word. Applying that conditional statement to the
guards just derived establishes those properties for the actual ordinary and
disguised calls, and in particular establishes that every executed divisor is
nonzero.
Exact special-value excerpt from crate/dec2flt/parse.rs:
let float = match (register, len) {
(INF_3, 3) => F::INFINITY,
(INF_8, 8) => F::INFINITY,
(NAN, 3) => F::NAN,
_ => return None,
};
if negative { Some(-float) } else { Some(float) }
Thus the executed special route is INFINITY or NAN followed by conditional
negation; it does not select NEG_INFINITY or NEG_NAN directly.
The number helper has the exact source body
pub fn parse_number(s: &[u8]) -> Option<Decimal> {
if let Some((float, rest)) = parse_partial_number(s) {
if rest == s.len() {
return Some(float);
}
}
None
}
It returns only the Decimal produced by parse_partial_number; there is no
float type parameter or float operation at this boundary.
The integer-tier helper has the source type and exact executable excerpts
below (long explanatory comments are elided). In particular it returns a raw
BiasedFp and contains no from_u64 cast, primitive float multiplication,
division, negation, or from_bits call:
pub fn compute_float<F: Float>(q: i64, mut w: u64) -> BiasedFp {
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let fp_error = BiasedFp::zero_pow2(-1);
// Short-circuit if the value can only be a literal 0 or infinity.
if w == 0 || q < F::SMALLEST_POWER_OF_TEN as i64 {
return fp_zero;
} else if q > F::LARGEST_POWER_OF_TEN as i64 {
return fp_inf;
}
// Normalize our significant digits, so the most-significant bit is set.
let lz = w.leading_zeros();
w <<= lz;
let (lo, hi) = compute_product_approx(q, w, F::SIG_BITS as usize + 3);
if lo == 0xFFFF_FFFF_FFFF_FFFF {
let inside_safe_exponent = (q >= -27) && (q <= 55);
if !inside_safe_exponent {
return fp_error;
}
}
let upperbit = (hi >> 63) as i32;
let mut mantissa = hi >> (upperbit + 64 - F::SIG_BITS as i32 - 3);
let mut power2 = power(q as i32) + upperbit - lz as i32 - F::EXP_MIN + 1;
if power2 <= 0 {
if -power2 + 1 >= 64 {
// Have more than 64 bits below the minimum exponent, must be 0.
return fp_zero;
}
// Have a subnormal value.
mantissa >>= -power2 + 1;
mantissa += mantissa & 1;
mantissa >>= 1;
power2 = (mantissa >= (1_u64 << F::SIG_BITS)) as i32;
return BiasedFp { m: mantissa, p_biased: power2 };
}
// Need to handle rounding ties. Normally, we need to round up,
// but if we fall right in between and we have an even basis, we
// need to round down.
if lo <= 1
&& q >= F::MIN_EXPONENT_ROUND_TO_EVEN as i64
&& q <= F::MAX_EXPONENT_ROUND_TO_EVEN as i64
&& mantissa & 0b11 == 0b01
&& (mantissa << (upperbit + 64 - F::SIG_BITS as i32 - 3)) == hi
{
// Zero the lowest bit, so we don't round up.
mantissa &= !1_u64;
}
// Round-to-even, then shift the significant digits into place.
mantissa += mantissa & 1;
mantissa >>= 1;
if mantissa >= (2_u64 << F::SIG_BITS) {
// Rounding up overflowed, so the carry bit is set. Set the
// mantissa to 1 (only the implicit, hidden bit is set) and
// increase the exponent.
mantissa = 1_u64 << F::SIG_BITS;
power2 += 1;
}
// Zero out the hidden bit.
mantissa &= !(1_u64 << F::SIG_BITS);
if power2 >= F::INFINITE_POWER {
// Exponent is above largest normal value, must be infinite.
return fp_inf;
}
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact slow-tier source body from crate/dec2flt/slow.rs:
pub(crate) fn parse_long_mantissa<F: Float>(s: &[u8]) -> BiasedFp {
const MAX_SHIFT: usize = 60;
const NUM_POWERS: usize = 19;
const POWERS: [u8; 19] =
[0, 3, 6, 9, 13, 16, 19, 23, 26, 29, 33, 36, 39, 43, 46, 49, 53, 56, 59];
let get_shift = |n| {
if n < NUM_POWERS { POWERS[n] as usize } else { MAX_SHIFT }
};
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let mut d = parse_decimal_seq(s);
// Short-circuit if the value can only be a literal 0 or infinity.
if d.num_digits == 0 || d.decimal_point < -324 {
return fp_zero;
} else if d.decimal_point >= 310 {
return fp_inf;
}
let mut exp2 = 0_i32;
let mut loop_result = None;
// Shift right toward (1/2 ... 1].
while d.decimal_point > 0 && loop_result.is_none() {
let n = d.decimal_point as usize;
let shift = get_shift(n);
d.right_shift(shift);
if d.decimal_point < -DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_zero);
} else {
exp2 += shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// Shift left toward (1/2 ... 1].
while d.decimal_point <= 0 && loop_result.is_none() {
let shift = if d.decimal_point == 0 {
match d.digits[0] {
digit if digit >= 5 => break,
0 | 1 => 2,
_ => 1,
}
} else {
get_shift((-d.decimal_point) as _)
};
d.left_shift(shift);
if d.decimal_point > DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_inf);
} else {
exp2 -= shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// We are now in the range [1/2 ... 1] but the binary format uses [1 ... 2].
exp2 -= 1;
while F::EXP_MIN > exp2 {
let mut n = (F::EXP_MIN - exp2) as usize;
if n > MAX_SHIFT {
n = MAX_SHIFT;
}
d.right_shift(n);
exp2 += n as i32;
}
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
// Shift the decimal to the hidden bit, and then round the value
// to get the high mantissa+1 bits.
d.left_shift(F::SIG_BITS as usize + 1);
let mut mantissa = d.round();
if mantissa >= (1_u64 << (F::SIG_BITS + 1)) {
// Rounding up overflowed to the carry bit, need to
// shift back to the hidden bit.
d.right_shift(1);
exp2 += 1;
mantissa = d.round();
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
}
let mut power2 = exp2 - F::EXP_MIN + 1;
if mantissa < (1_u64 << F::SIG_BITS) {
power2 -= 1;
}
// Zero out all the bits above the explicit mantissa bits.
mantissa &= (1_u64 << F::SIG_BITS) - 1;
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact final numeric-sign excerpt from crate/dec2flt/mod.rs:
let assembled_word = fp.m | ((fp.p_biased as u64) << F::SIG_BITS);
let assembly_result = biased_fp_to_float::<F>(fp);
let lexical_sign_applied = num.negative;
let result = if lexical_sign_applied {
core::ops::Neg::neg(assembly_result)
} else {
assembly_result
};
Thus a numeric execution that reaches the integer/slow selection route
assembles its selected pair with from_bits through biased_fp_to_float and only
then conditionally negates it. A successful try_fast_path returns earlier and
does not perform this assembly. compute_float and parse_long_mantissa produce
raw BiasedFp pairs and do not call from_u64, primitive float multiplication,
division, negation, or from_bits; they do, however, execute constants derived
from SIG_TOTAL_BITS before producing those pairs.
Retained structural-boundary evidence
-------------------------------------
Several adjacent structural bindings cite this same evidence record. Their
pinned library source identities are:
core/src/num/mod.rs
f0820f9dfb94999440c8cb4a349736fa21df7e5668e19b6b49e016ff67c05ce3
core/src/option.rs
7cf61204b05d98a95bc2e322d5fbfc1f4f91505109971917d9a7fb47151c50e6
core/src/slice/mod.rs
354992a6a3d69a0185eef9044a07ea5180e767bdb467aef55e69ee3d44317840
core/src/str/mod.rs
284b4c147b5d0497ce9146f6b96e564f196aed10411a62cdccf5fc5243d40f78
Exact ASCII-digit body from core/src/num/mod.rs:
pub const fn is_ascii_digit(&self) -> bool {
matches!(*self, b'0'..=b'9')
}
Exact Option control-flow bodies from core/src/option.rs:
fn branch(self) -> ControlFlow<Self::Residual, Self::Output> {
match self {
Some(v) => ControlFlow::Continue(v),
None => ControlFlow::Break(None),
}
}
fn from_residual(residual: Option<convert::Infallible>) -> Self {
match residual {
None => None,
}
}
Exact slice observation bodies from core/src/slice/mod.rs:
pub const fn first(&self) -> Option<&T> {
if let [first, ..] = self { Some(first) } else { None }
}
pub const fn split_first(&self) -> Option<(&T, &[T])> {
if let [first, tail @ ..] = self { Some((first, tail)) } else { None }
}
Exact string-byte body from core/src/str/mod.rs:
pub const fn as_bytes(&self) -> &[u8] {
// SAFETY: const sound because we transmute two types with the same layout
unsafe { mem::transmute(self) }
}
reference/model-evidence/binary64-probe.rs
#![feature(float_masks)]
use std::num::FpCategory;
fn bits(label: &str, value: f64) {
println!("{label}={:016x}", value.to_bits());
}
fn main() {
println!("target_arch={}", std::env::consts::ARCH);
println!("mantissa_digits={}", f64::MANTISSA_DIGITS);
println!("exponent_mask={:016x}", f64::EXPONENT_MASK);
println!("mantissa_mask={:016x}", f64::MANTISSA_MASK);
bits("nan", f64::NAN);
bits("infinity", f64::INFINITY);
bits("neg_infinity", f64::NEG_INFINITY);
for (label, value) in [
("nan_category", f64::NAN),
("infinity_category", f64::INFINITY),
("zero_category", 0.0),
("subnormal_category", f64::from_bits(1)),
("normal_category", 1.0),
] {
let category = match value.classify() {
FpCategory::Nan => "Nan",
FpCategory::Infinite => "Infinite",
FpCategory::Zero => "Zero",
FpCategory::Subnormal => "Subnormal",
FpCategory::Normal => "Normal",
};
println!("{label}={category}");
}
let payload_nan_word = 0x7ff0_0000_0000_0001_u64;
println!(
"from_bits_to_bits={:016x}",
f64::from_bits(payload_nan_word).to_bits()
);
bits("neg_payload_nan", -f64::from_bits(payload_nan_word));
bits("neg_zero", -0.0);
bits("subnormal_tie_to_even_zero", f64::from_bits(1) * 0.5);
bits("subnormal_tie_to_even_two", f64::from_bits(3) * 0.5);
bits("normal_division", 1.0 / 10.0);
bits("mul_negative_zero", -0.0 * 2.0);
bits("div_negative_zero", -1.0 / f64::INFINITY);
bits("div_negative_infinity", 1.0 / -0.0);
bits("mul_overflow", f64::MAX * (1.0 + f64::EPSILON));
println!("mul_zero_infinity_is_nan={}", (0.0 * f64::INFINITY).is_nan());
println!("div_zero_zero_is_nan={}", (0.0_f64 / 0.0_f64).is_nan());
println!("mul_nan_is_nan={}", (f64::NAN * 1.0).is_nan());
bits("cast_2_pow_53", (1_u64 << 53) as f64);
bits("cast_2_pow_53_plus_1", ((1_u64 << 53) + 1) as f64);
}
Assumptions / kernel axioms
- Classical.choice
- Quot.sound
- propext
conservative transitive union of saved axiom observations across node dependencies
Requirements depending on this item (32)
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
All 32 entries
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
- Exponent agreement
- Correctness or defer
- Native correctness or defer
- Numeric acceptance
- Accumulated-value diagnostic
- Record bounds
- Invalid rejection
- Accumulated-value diagnostic
- Equal-target bridge
- Exact rounding
- Infinity
- Invalid rejection
- NaN acceptance
- No spurious NaNs
- Numeric acceptance
- Numeric sign
- Selected exponent range
- Selected magnitude sign
- Signed zero
- Totality
- Rounding determinism
- Rounding totality
- Full-significand diagnostic
- Infinity
- NaN
- Rejection
These requirements are linked to this item through the declared dependencies of their proofs.
Record details
| Record source | Tablet/model-support.json |
|---|---|
| Kind | opaque external binding |
| Preservation assessment origin | VerifierPanel |
| Preservation fingerprint | preservation-v1:329c1d606d24956ac94021aca2d658c99c303c9c3c03b59997516eaca3c9283c |
| Preservation current fingerprint | preservation-v1:329c1d606d24956ac94021aca2d658c99c303c9c3c03b59997516eaca3c9283c |
| Preservation freshness | matches current fingerprint |
| Correspondence approved fingerprint | {"own_tex":"14ed75ce28431a353750ad105bf350beec679ec936692739193ca20d4289838f","lean_semantic_closure":"68309612925deed927586c9d2e8f6907ffe089d19691618016820c589a9285b8","lean_relevant_definition_descendants":{"Binary64Model":"d80435c56f8fcbe084ebc2fbf05989a7ddf07434d0acd161302414cac32f964d","Binary64ModelDefault":"e2475cd1caad0eef450c903f24d2dfb8ffdfadf787ccad3621a86556f41e533a","F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2"},"lean_relevant_dependencies":["Binary64Model","Binary64ModelDefault","F64","core_num_FpCategory"],"preamble_tex":""} |
| Correspondence current fingerprint | {"own_tex":"14ed75ce28431a353750ad105bf350beec679ec936692739193ca20d4289838f","lean_semantic_closure":"68309612925deed927586c9d2e8f6907ffe089d19691618016820c589a9285b8","lean_relevant_definition_descendants":{"Binary64Model":"d80435c56f8fcbe084ebc2fbf05989a7ddf07434d0acd161302414cac32f964d","Binary64ModelDefault":"e2475cd1caad0eef450c903f24d2dfb8ffdfadf787ccad3621a86556f41e533a","F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2"},"lean_relevant_dependencies":["Binary64Model","Binary64ModelDefault","F64","core_num_FpCategory"],"preamble_tex":""} |
| Correspondence freshness | matches current fingerprint |
Exact preservation assessment
{
"status": "VerifierPass",
"origin": "VerifierPanel",
"fingerprints": {
"own_tex_hash": "106cce445997fd5fcc9d365bc3904e1ca49946ead4776484be7b54974b2cdfe2",
"dep_statement_hashes": {
"Binary64ModelDefault": "be5dcc4afe23616ca8fd1d15d30fbbe4ee2621d68be3341b8e74a66e6dcd736f"
},
"combined_sound_fp": "preservation-v1:329c1d606d24956ac94021aca2d658c99c303c9c3c03b59997516eaca3c9283c"
},
"lane_votes": {
"v1": "Pass"
},
"reviewer_action_id": null
}Exact source record
{
"name": "core.f64.F64.MANTISSA_MASK",
"extracted_signature": ": Result Std.U64",
"rust_symbol": "core::f64::{f64}::MANTISSA_MASK",
"raw_declaration_sha256": "dc3517faa141b7a7a016e9f73930af3c9af23d3e6d06874440d99eabbc846538",
"node": "ModelF64MantissaMask",
"declaration": "dec2flt_model.ModelF64MantissaMask"
}Captured evidence identities
[
{
"path": "reference/model-evidence/binary64-boundary.txt",
"sha256": "a17d82e7f789ce7f1fbb3922a66ec8806999e526532d637605263882d37b7abf",
"cited_by": [
"Tablet/ModelF64MantissaMask.tex",
"Tablet/model-support.json"
]
},
{
"path": "reference/model-evidence/binary64-probe.rs",
"sha256": "68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e",
"cited_by": [
"reference/model-evidence/binary64-boundary.txt"
]
}
]core::f64::{f64}::classify
Inspect related source (1)
- classify · core/src/num/f64.rs:782 Rust library
Related source and models come from the extraction records and declared dependencies.
| Rust item | core::f64::{f64}::classify |
|---|---|
| Recorded source | /rustc/library/core/src/num/f64.rs |
| Lines | 782:4–782:45 |
The related-source link includes this operation’s Rust standard-library implementation.
Opaque extraction signature
: F64 → Result core.num.FpCategoryLean definition
Trellis authored this Lean model for an operation outside the mechanical extraction. Modeling choices explains its behavior and review.
import Tablet.Binary64ModelDefault
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: ModelF64Classify]
def ModelF64Classify : F64 -> Result core.num.FpCategory :=
-- BODY
Binary64ModelDefault.classify
end dec2flt_model
Why this model is faithful
Definition
Preservation argument
Claim
Proof
Authored arguments for individual requirements
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
Recorded review
| Correspondence | Pass |
|---|---|
| Preservation | VerifierPass |
ModelF64Classify · Lean checked
Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
reference/model-evidence/binary64-boundary.txt
Primary evidence for the binary64 boundary
==========================================
Scope and identities
--------------------
This record concerns the frozen x86_64-unknown-linux-gnu extraction, the
adapted Rust crate retained in this repository, and the installed toolchain
named by modeling-input/SETUP.md. The probe source is retained at
reference/model-evidence/binary64-probe.rs; no scratch source is required to
reproduce it.
Toolchain executable:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
Target:
x86_64-unknown-linux-gnu
rustc executable SHA-256:
162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
Probe source SHA-256:
68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
Compiled probe SHA-256:
f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
Frozen generated.lean SHA-256:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692
Frozen modeling-input/manifest.json SHA-256:
2fc182c0c7acccad30c449ca349b999759b84e8ed4ec9d590e8295e43eeec077
Approved Binary64ModelDefault.lean SHA-256 at the time of this record:
03ae48fb631e6242bd21bf95d0481b66acae05f8cab343c7ab279b3c116538a3
Exact reproduction commands
---------------------------
Run from the repository root:
R=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
P=reference/model-evidence/binary64-probe.rs
B=.trellis/scratch/binary64-probe
"$R" --version --verbose
sha256sum "$R"
sha256sum "$P"
"$R" --target x86_64-unknown-linux-gnu -C opt-level=0 "$P" -o "$B"
sha256sum "$B"
"$B"
Raw output
----------
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
rustc_sha256=162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
probe_sha256=68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
binary_sha256=f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
target_arch=x86_64
mantissa_digits=53
exponent_mask=7ff0000000000000
mantissa_mask=000fffffffffffff
nan=7ff8000000000000
infinity=7ff0000000000000
neg_infinity=fff0000000000000
nan_category=Nan
infinity_category=Infinite
zero_category=Zero
subnormal_category=Subnormal
normal_category=Normal
from_bits_to_bits=7ff0000000000001
neg_payload_nan=fff0000000000001
neg_zero=8000000000000000
subnormal_tie_to_even_zero=0000000000000000
subnormal_tie_to_even_two=0000000000000002
normal_division=3fb999999999999a
mul_negative_zero=8000000000000000
div_negative_zero=8000000000000000
div_negative_infinity=fff0000000000000
mul_overflow=7ff0000000000000
mul_zero_infinity_is_nan=true
div_zero_zero_is_nan=true
mul_nan_is_nan=true
cast_2_pow_53=4340000000000000
cast_2_pow_53_plus_1=4340000000000000
Pinned Rust library sources
---------------------------
The installed sources below belong to the same named toolchain. Their
SHA-256 identities are:
core/src/primitive_docs.rs
c4b8627dd67d5dac8f383f383a9e7ff1229ea43e7599610fc61988694cf0f3e5
core/src/num/f64.rs
84540a6a59e347c63caabe12cf895ba1239c76a50682471567007138fac1c618
core/src/clone.rs
23f9cfc80347fde6b8457d46fbf7a2b8d9f34c8c58601b0b6f714ca2f6d1976b
The exact relevant text of core/src/primitive_docs.rs is:
#[rustc_doc_primitive = "f64"]
#[doc(alias = "double")]
/// A 64-bit floating-point type (specifically, the "binary64" type defined in IEEE 754-2008).
///
/// This type is very similar to [`prim@f32`], but has increased precision by using twice as many
/// bits. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on double-precision
/// values][wikipedia] for more information.
The referenced primitive-f32 documentation supplies the common primitive
floating-point operation rules quoted next:
/// - −0.0: IEEE 754 floating-point numbers have a bit that indicates their sign, so −0.0 is a
/// possible value. For comparison −0.0 = +0.0, but floating-point operations can carry
/// the sign bit through arithmetic operations. This means −0.0 × +0.0 produces −0.0 and
/// a negative number rounded to a value smaller than a float can represent also produces −0.0.
/// - [∞](#associatedconstant.INFINITY) and
/// [−∞](#associatedconstant.NEG_INFINITY): these result from calculations
/// like `1.0 / 0.0`.
///
/// When a primitive operation (addition, subtraction, multiplication, or
/// division) is performed on this type, the result is rounded according to the
/// roundTiesToEven direction defined in IEEE 754-2008. That means:
///
/// - The result is the representable value closest to the true value, if there
/// is a unique closest representable value.
/// - If the true value is exactly half-way between two representable values,
/// the result is the one with an even least-significant binary digit.
/// - If the true value's magnitude is ≥ `f32::MAX` + 2<sup>(`f32::MAX_EXP` −
/// `f32::MANTISSA_DIGITS` − 1)</sup>, the result is ∞ or −∞ (preserving the
/// true value's sign).
The same file explicitly separates arithmetic NaN choice from exact bitwise
operations; its exact relevant text is:
/// The rules for NaN values differ between *arithmetic* and *non-arithmetic* (or "bitwise")
/// operations. The non-arithmetic operations are unary `-`, `abs`, `copysign`, `signum`,
/// `{to,from}_bits`, `{to,from}_{be,le,ne}_bytes` and `is_sign_{positive,negative}`. These
/// operations are guaranteed to exactly preserve the bit pattern of their input except for possibly
/// changing the sign bit.
///
/// The following rules apply when a NaN value is returned from an arithmetic operation:
/// - The result has a non-deterministic sign.
/// - The quiet bit and payload are non-deterministically chosen from
/// the following set of options:
///
/// - **Preferred NaN**: The quiet bit is set and the payload is all-zero.
/// - **Quieting NaN propagation**: The quiet bit is set and the payload is copied from any input
/// operand that is a NaN. If the inputs and outputs do not have the same payload size (i.e., for
/// `as` casts), then
/// - If the output is smaller than the input, low-order bits of the payload get dropped.
/// - If the output is larger than the input, the payload gets filled up with 0s in the low-order
/// bits.
/// - **Unchanged NaN propagation**: The quiet bit and payload are copied from any input operand
/// that is a NaN. If the inputs and outputs do not have the same size (i.e., for `as` casts), the
/// same rules as for "quieting NaN propagation" apply, with one caveat: if the output is smaller
/// than the input, dropping the low-order bits may result in a payload of 0; a payload of 0 is not
/// possible with a signaling NaN (the all-0 significand encodes an infinity) so unchanged NaN
/// propagation cannot occur with some inputs.
/// - **Target-specific NaN**: The quiet bit is set and the payload is picked from a target-specific
/// set of "extra" possible NaN payloads. The set can depend on the input operand values.
/// See the table below for the concrete NaNs this set contains on various targets.
///
/// | `target_arch` | Extra payloads possible on this platform |
/// |---------------|------------------------------------------|
/// | `aarch64`, `arm`, `arm64ec`, `loongarch64`, `powerpc` (except when `target_abi = "spe"`), `powerpc64`, `riscv32`, `riscv64`, `s390x`, `x86`, `x86_64` | None |
Thus the model's preferred quiet NaN is one permitted result whenever
multiplication or division returns NaN. This does not claim that arbitrary
Rust arithmetic NaNs have those exact bits. By contrast, unary negation and
bit conversion must preserve all non-sign bits exactly, including for every
NaN payload.
The exact relevant declarations in core/src/num/f64.rs are:
pub const MANTISSA_DIGITS: u32 = 53;
pub const NAN: f64 = 0.0_f64 / 0.0_f64;
pub const INFINITY: f64 = 1.0_f64 / 0.0_f64;
pub const NEG_INFINITY: f64 = -1.0_f64 / 0.0_f64;
pub const SIGN_MASK: u64 = 0x8000_0000_0000_0000;
pub const EXPONENT_MASK: u64 = 0x7ff0_0000_0000_0000;
pub const MANTISSA_MASK: u64 = 0x000f_ffff_ffff_ffff;
pub const fn classify(self) -> FpCategory {
// We used to have complicated logic here that avoids the simple bit-based tests to work
// around buggy codegen for x87 targets (see
// https://github.com/rust-lang/rust/issues/114479). However, some LLVM versions later, none
// of our tests is able to find any difference between the complicated and the naive
// version, so now we are back to the naive version.
let b = self.to_bits();
match (b & Self::MANTISSA_MASK, b & Self::EXPONENT_MASK) {
(0, Self::EXPONENT_MASK) => FpCategory::Infinite,
(_, Self::EXPONENT_MASK) => FpCategory::Nan,
(0, 0) => FpCategory::Zero,
(_, 0) => FpCategory::Subnormal,
_ => FpCategory::Normal,
}
}
pub const fn to_bits(self) -> u64 {
// SAFETY: `u64` is a plain old datatype so we can always transmute to it.
unsafe { mem::transmute(self) }
}
pub const fn from_bits(v: u64) -> Self {
// It turns out the safety issues with sNaN were overblown! Hooray!
// SAFETY: `u64` is a plain old datatype so we can always transmute from it.
unsafe { mem::transmute(v) }
}
The exact scalar clone body in core/src/clone.rs is:
impl const Clone for $t {
#[inline(always)]
fn clone(&self) -> Self {
*self
}
}
Frozen adapted source
---------------------
The relevant retained source file hashes are:
crate/traits.rs
9013270fb846edcb0bdf2abd0353f575fdd727974cba9e89bdab8bb4c2b4f0bf
crate/dec2flt/mod.rs
b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012
crate/dec2flt/parse.rs
50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f
crate/dec2flt/decimal.rs
633658be803b7369b18feb098a8aa1b5f714a933d3b79ecbc4899a1b05f35beb
crate/dec2flt/lemire.rs
fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1
crate/dec2flt/slow.rs
93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485
Exact constant and bit-conversion excerpt from crate/traits.rs:
impl Float for f64 {
type Int = u64;
const INFINITY: Self = Self::INFINITY;
const NEG_INFINITY: Self = Self::NEG_INFINITY;
const NAN: Self = Self::NAN;
// Bit-identical to the upstream `-f64::NAN`, without the unsupported
// compile-time float negation.
const NEG_NAN: Self = f64::from_bits(0xFFF8_0000_0000_0000);
const BITS: u32 = 64;
const SIG_TOTAL_BITS: u32 = Self::MANTISSA_DIGITS;
const EXP_MASK: Self::Int = Self::EXPONENT_MASK;
const SIG_MASK: Self::Int = Self::MANTISSA_MASK;
fn to_bits(self) -> Self::Int {
self.to_bits()
}
fn classify(self) -> FpCategory {
self.classify()
}
}
impl FloatExt for f64 {
#[inline]
fn from_u64_bits(v: u64) -> Self {
f64::from_bits(v)
}
Exact derived-constant defaults from crate/traits.rs:
/// The number of bits in the significand, *excluding* the hidden bit.
const SIG_BITS: u32 = Self::SIG_TOTAL_BITS - 1;
/// Number of bits in the exponent.
const EXP_BITS: u32 = Self::BITS - Self::SIG_BITS - 1;
/// The saturated (maximum bitpattern) value of the exponent, i.e. the infinite
/// representation.
///
/// This shifted fully right, use `EXP_MASK` for the shifted value.
const EXP_SAT: u32 = (1 << Self::EXP_BITS) - 1;
/// Signed version of `EXP_SAT` since we convert a lot.
const INFINITE_POWER: i32 = Self::EXP_SAT as i32;
/// The exponent bias value. This is also the maximum value of the exponent.
const EXP_BIAS: u32 = Self::EXP_SAT >> 1;
/// Minimum exponent value of normal values.
const EXP_MIN: i32 = -(Self::EXP_BIAS as i32 - 1);
Together with the f64-instance lines `BITS = 64` and
`SIG_TOTAL_BITS = Self::MANTISSA_DIGITS` in the preceding excerpt, these
defaults derive SIG_BITS, EXP_MIN, and INFINITE_POWER from the primitive
mantissa-digit constant rather than introducing independent parameters.
Exact checked cast excerpt from crate/dec2flt/mod.rs:
#[inline]
// This method is precisely the source `u64 as f64` primitive conversion.
// Aeneas cannot translate that cast; opacity is confined to the cast while
// the fast-path algorithm, its range proof obligation, and all calls stay
// visible in the extracted model.
#[charon::opaque]
fn from_u64(v: u64) -> Self {
debug_assert!(v <= Self::MAX_MANTISSA_FAST_PATH);
v as _
}
Here MAX_MANTISSA_FAST_PATH is the retained default 1 << 53. Therefore the
source succeeds only through the modeled branch v <= 2^53 in this debug
configuration; above it the debug assertion fails before the cast. On the
successful branch every integer is exactly representable, so the source cast
and the model rounder return the same word.
Exact power-table and assembly excerpts from crate/dec2flt/mod.rs:
/// Maximum mantissa for the fast-path (`1 << 53` for f64).
const MAX_MANTISSA_FAST_PATH: u64 = 1 << Self::SIG_TOTAL_BITS;
const MAX_EXPONENT_FAST_PATH: i64 = 22;
const MIN_EXPONENT_FAST_PATH: i64 = -Self::MAX_EXPONENT_FAST_PATH;
const MAX_EXPONENT_DISGUISED_FAST_PATH: i64 = 37;
fn pow10_fast_path(exponent: usize) -> Self {
// These bit patterns are exactly the source table's rounded binary64
// literals. The match is the same masked lookup; it merely keeps float
// constants out of Aeneas's unsupported constant interpreter.
match exponent & 31 {
0 => f64::from_bits(0x3FF0_0000_0000_0000),
1 => f64::from_bits(0x4024_0000_0000_0000),
2 => f64::from_bits(0x4059_0000_0000_0000),
3 => f64::from_bits(0x408F_4000_0000_0000),
4 => f64::from_bits(0x40C3_8800_0000_0000),
5 => f64::from_bits(0x40F8_6A00_0000_0000),
6 => f64::from_bits(0x412E_8480_0000_0000),
7 => f64::from_bits(0x4163_12D0_0000_0000),
8 => f64::from_bits(0x4197_D784_0000_0000),
9 => f64::from_bits(0x41CD_CD65_0000_0000),
10 => f64::from_bits(0x4202_A05F_2000_0000),
11 => f64::from_bits(0x4237_4876_E800_0000),
12 => f64::from_bits(0x426D_1A94_A200_0000),
13 => f64::from_bits(0x42A2_309C_E540_0000),
14 => f64::from_bits(0x42D6_BCC4_1E90_0000),
15 => f64::from_bits(0x430C_6BF5_2634_0000),
16 => f64::from_bits(0x4341_C379_37E0_8000),
17 => f64::from_bits(0x4376_3457_85D8_A000),
18 => f64::from_bits(0x43AB_C16D_674E_C800),
19 => f64::from_bits(0x43E1_58E4_6091_3D00),
20 => f64::from_bits(0x4415_AF1D_78B5_8C40),
21 => f64::from_bits(0x444B_1AE4_D6E2_EF50),
22 => f64::from_bits(0x4480_F0CF_064D_D592),
_ => f64::from_bits(0),
}
}
fn biased_fp_to_float<F: FloatExt>(x: BiasedFp) -> F {
let mut word = x.m;
word |= (x.p_biased as u64) << F::SIG_BITS;
F::from_u64_bits(word)
}
Exact native-call excerpt from crate/dec2flt/decimal.rs:
fn can_use_fast_path<F: Lemire>(&self) -> bool {
F::MIN_EXPONENT_FAST_PATH <= self.exponent
&& self.exponent <= F::MAX_EXPONENT_DISGUISED_FAST_PATH
&& self.mantissa <= F::MAX_MANTISSA_FAST_PATH
&& !self.many_digits
}
if !self.can_use_fast_path::<F>() {
return None;
}
let value = if self.exponent <= F::MAX_EXPONENT_FAST_PATH {
// normal fast path
let value = F::from_u64(self.mantissa);
if self.exponent < 0 {
// Explicit trait calls preserve Rust arithmetic and resolve
// the generic output type that Charon leaves ambiguous.
core::ops::Div::div(value, F::pow10_fast_path((-self.exponent) as _))
} else {
core::ops::Mul::mul(value, F::pow10_fast_path(self.exponent as _))
}
} else {
// disguised fast path
let shift = self.exponent - F::MAX_EXPONENT_FAST_PATH;
let mantissa = self.mantissa.checked_mul(INT_POW10[shift as usize])?;
if mantissa > F::MAX_MANTISSA_FAST_PATH {
return None;
}
core::ops::Mul::mul(
F::from_u64(mantissa),
F::pow10_fast_path(F::MAX_EXPONENT_FAST_PATH as _),
)
};
if self.negative {
Some(core::ops::Neg::neg(value))
} else {
Some(value)
}
The preceding can_use_fast_path body, together with
MAX_MANTISSA_FAST_PATH = 1 << SIG_TOTAL_BITS and SIG_TOTAL_BITS = 53 for f64,
requires the exponent to lie between -22 and 37, the input mantissa to be at
most 2^53, and many_digits to be false. Consequently an ordinary arithmetic
call has a from_u64 operand in 0..=2^53. In its negative-exponent arm,
`-self.exponent` lies in 1..=22; in its nonnegative arm, `self.exponent` lies
in 0..=22. The disguised branch checks its multiplied mantissa against 2^53
before from_u64 and uses table index 22. The paired statement
Binary64NativeCallDomain does not assert this source reachability. It says
conditionally that a from_u64 argument at most 2^53 succeeds with a finite,
non-NaN word and that a table index at most 22 succeeds with a positive,
nonzero, finite, non-NaN word. Applying that conditional statement to the
guards just derived establishes those properties for the actual ordinary and
disguised calls, and in particular establishes that every executed divisor is
nonzero.
Exact special-value excerpt from crate/dec2flt/parse.rs:
let float = match (register, len) {
(INF_3, 3) => F::INFINITY,
(INF_8, 8) => F::INFINITY,
(NAN, 3) => F::NAN,
_ => return None,
};
if negative { Some(-float) } else { Some(float) }
Thus the executed special route is INFINITY or NAN followed by conditional
negation; it does not select NEG_INFINITY or NEG_NAN directly.
The number helper has the exact source body
pub fn parse_number(s: &[u8]) -> Option<Decimal> {
if let Some((float, rest)) = parse_partial_number(s) {
if rest == s.len() {
return Some(float);
}
}
None
}
It returns only the Decimal produced by parse_partial_number; there is no
float type parameter or float operation at this boundary.
The integer-tier helper has the source type and exact executable excerpts
below (long explanatory comments are elided). In particular it returns a raw
BiasedFp and contains no from_u64 cast, primitive float multiplication,
division, negation, or from_bits call:
pub fn compute_float<F: Float>(q: i64, mut w: u64) -> BiasedFp {
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let fp_error = BiasedFp::zero_pow2(-1);
// Short-circuit if the value can only be a literal 0 or infinity.
if w == 0 || q < F::SMALLEST_POWER_OF_TEN as i64 {
return fp_zero;
} else if q > F::LARGEST_POWER_OF_TEN as i64 {
return fp_inf;
}
// Normalize our significant digits, so the most-significant bit is set.
let lz = w.leading_zeros();
w <<= lz;
let (lo, hi) = compute_product_approx(q, w, F::SIG_BITS as usize + 3);
if lo == 0xFFFF_FFFF_FFFF_FFFF {
let inside_safe_exponent = (q >= -27) && (q <= 55);
if !inside_safe_exponent {
return fp_error;
}
}
let upperbit = (hi >> 63) as i32;
let mut mantissa = hi >> (upperbit + 64 - F::SIG_BITS as i32 - 3);
let mut power2 = power(q as i32) + upperbit - lz as i32 - F::EXP_MIN + 1;
if power2 <= 0 {
if -power2 + 1 >= 64 {
// Have more than 64 bits below the minimum exponent, must be 0.
return fp_zero;
}
// Have a subnormal value.
mantissa >>= -power2 + 1;
mantissa += mantissa & 1;
mantissa >>= 1;
power2 = (mantissa >= (1_u64 << F::SIG_BITS)) as i32;
return BiasedFp { m: mantissa, p_biased: power2 };
}
// Need to handle rounding ties. Normally, we need to round up,
// but if we fall right in between and we have an even basis, we
// need to round down.
if lo <= 1
&& q >= F::MIN_EXPONENT_ROUND_TO_EVEN as i64
&& q <= F::MAX_EXPONENT_ROUND_TO_EVEN as i64
&& mantissa & 0b11 == 0b01
&& (mantissa << (upperbit + 64 - F::SIG_BITS as i32 - 3)) == hi
{
// Zero the lowest bit, so we don't round up.
mantissa &= !1_u64;
}
// Round-to-even, then shift the significant digits into place.
mantissa += mantissa & 1;
mantissa >>= 1;
if mantissa >= (2_u64 << F::SIG_BITS) {
// Rounding up overflowed, so the carry bit is set. Set the
// mantissa to 1 (only the implicit, hidden bit is set) and
// increase the exponent.
mantissa = 1_u64 << F::SIG_BITS;
power2 += 1;
}
// Zero out the hidden bit.
mantissa &= !(1_u64 << F::SIG_BITS);
if power2 >= F::INFINITE_POWER {
// Exponent is above largest normal value, must be infinite.
return fp_inf;
}
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact slow-tier source body from crate/dec2flt/slow.rs:
pub(crate) fn parse_long_mantissa<F: Float>(s: &[u8]) -> BiasedFp {
const MAX_SHIFT: usize = 60;
const NUM_POWERS: usize = 19;
const POWERS: [u8; 19] =
[0, 3, 6, 9, 13, 16, 19, 23, 26, 29, 33, 36, 39, 43, 46, 49, 53, 56, 59];
let get_shift = |n| {
if n < NUM_POWERS { POWERS[n] as usize } else { MAX_SHIFT }
};
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let mut d = parse_decimal_seq(s);
// Short-circuit if the value can only be a literal 0 or infinity.
if d.num_digits == 0 || d.decimal_point < -324 {
return fp_zero;
} else if d.decimal_point >= 310 {
return fp_inf;
}
let mut exp2 = 0_i32;
let mut loop_result = None;
// Shift right toward (1/2 ... 1].
while d.decimal_point > 0 && loop_result.is_none() {
let n = d.decimal_point as usize;
let shift = get_shift(n);
d.right_shift(shift);
if d.decimal_point < -DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_zero);
} else {
exp2 += shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// Shift left toward (1/2 ... 1].
while d.decimal_point <= 0 && loop_result.is_none() {
let shift = if d.decimal_point == 0 {
match d.digits[0] {
digit if digit >= 5 => break,
0 | 1 => 2,
_ => 1,
}
} else {
get_shift((-d.decimal_point) as _)
};
d.left_shift(shift);
if d.decimal_point > DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_inf);
} else {
exp2 -= shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// We are now in the range [1/2 ... 1] but the binary format uses [1 ... 2].
exp2 -= 1;
while F::EXP_MIN > exp2 {
let mut n = (F::EXP_MIN - exp2) as usize;
if n > MAX_SHIFT {
n = MAX_SHIFT;
}
d.right_shift(n);
exp2 += n as i32;
}
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
// Shift the decimal to the hidden bit, and then round the value
// to get the high mantissa+1 bits.
d.left_shift(F::SIG_BITS as usize + 1);
let mut mantissa = d.round();
if mantissa >= (1_u64 << (F::SIG_BITS + 1)) {
// Rounding up overflowed to the carry bit, need to
// shift back to the hidden bit.
d.right_shift(1);
exp2 += 1;
mantissa = d.round();
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
}
let mut power2 = exp2 - F::EXP_MIN + 1;
if mantissa < (1_u64 << F::SIG_BITS) {
power2 -= 1;
}
// Zero out all the bits above the explicit mantissa bits.
mantissa &= (1_u64 << F::SIG_BITS) - 1;
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact final numeric-sign excerpt from crate/dec2flt/mod.rs:
let assembled_word = fp.m | ((fp.p_biased as u64) << F::SIG_BITS);
let assembly_result = biased_fp_to_float::<F>(fp);
let lexical_sign_applied = num.negative;
let result = if lexical_sign_applied {
core::ops::Neg::neg(assembly_result)
} else {
assembly_result
};
Thus a numeric execution that reaches the integer/slow selection route
assembles its selected pair with from_bits through biased_fp_to_float and only
then conditionally negates it. A successful try_fast_path returns earlier and
does not perform this assembly. compute_float and parse_long_mantissa produce
raw BiasedFp pairs and do not call from_u64, primitive float multiplication,
division, negation, or from_bits; they do, however, execute constants derived
from SIG_TOTAL_BITS before producing those pairs.
Retained structural-boundary evidence
-------------------------------------
Several adjacent structural bindings cite this same evidence record. Their
pinned library source identities are:
core/src/num/mod.rs
f0820f9dfb94999440c8cb4a349736fa21df7e5668e19b6b49e016ff67c05ce3
core/src/option.rs
7cf61204b05d98a95bc2e322d5fbfc1f4f91505109971917d9a7fb47151c50e6
core/src/slice/mod.rs
354992a6a3d69a0185eef9044a07ea5180e767bdb467aef55e69ee3d44317840
core/src/str/mod.rs
284b4c147b5d0497ce9146f6b96e564f196aed10411a62cdccf5fc5243d40f78
Exact ASCII-digit body from core/src/num/mod.rs:
pub const fn is_ascii_digit(&self) -> bool {
matches!(*self, b'0'..=b'9')
}
Exact Option control-flow bodies from core/src/option.rs:
fn branch(self) -> ControlFlow<Self::Residual, Self::Output> {
match self {
Some(v) => ControlFlow::Continue(v),
None => ControlFlow::Break(None),
}
}
fn from_residual(residual: Option<convert::Infallible>) -> Self {
match residual {
None => None,
}
}
Exact slice observation bodies from core/src/slice/mod.rs:
pub const fn first(&self) -> Option<&T> {
if let [first, ..] = self { Some(first) } else { None }
}
pub const fn split_first(&self) -> Option<(&T, &[T])> {
if let [first, tail @ ..] = self { Some((first, tail)) } else { None }
}
Exact string-byte body from core/src/str/mod.rs:
pub const fn as_bytes(&self) -> &[u8] {
// SAFETY: const sound because we transmute two types with the same layout
unsafe { mem::transmute(self) }
}
reference/model-evidence/binary64-probe.rs
#![feature(float_masks)]
use std::num::FpCategory;
fn bits(label: &str, value: f64) {
println!("{label}={:016x}", value.to_bits());
}
fn main() {
println!("target_arch={}", std::env::consts::ARCH);
println!("mantissa_digits={}", f64::MANTISSA_DIGITS);
println!("exponent_mask={:016x}", f64::EXPONENT_MASK);
println!("mantissa_mask={:016x}", f64::MANTISSA_MASK);
bits("nan", f64::NAN);
bits("infinity", f64::INFINITY);
bits("neg_infinity", f64::NEG_INFINITY);
for (label, value) in [
("nan_category", f64::NAN),
("infinity_category", f64::INFINITY),
("zero_category", 0.0),
("subnormal_category", f64::from_bits(1)),
("normal_category", 1.0),
] {
let category = match value.classify() {
FpCategory::Nan => "Nan",
FpCategory::Infinite => "Infinite",
FpCategory::Zero => "Zero",
FpCategory::Subnormal => "Subnormal",
FpCategory::Normal => "Normal",
};
println!("{label}={category}");
}
let payload_nan_word = 0x7ff0_0000_0000_0001_u64;
println!(
"from_bits_to_bits={:016x}",
f64::from_bits(payload_nan_word).to_bits()
);
bits("neg_payload_nan", -f64::from_bits(payload_nan_word));
bits("neg_zero", -0.0);
bits("subnormal_tie_to_even_zero", f64::from_bits(1) * 0.5);
bits("subnormal_tie_to_even_two", f64::from_bits(3) * 0.5);
bits("normal_division", 1.0 / 10.0);
bits("mul_negative_zero", -0.0 * 2.0);
bits("div_negative_zero", -1.0 / f64::INFINITY);
bits("div_negative_infinity", 1.0 / -0.0);
bits("mul_overflow", f64::MAX * (1.0 + f64::EPSILON));
println!("mul_zero_infinity_is_nan={}", (0.0 * f64::INFINITY).is_nan());
println!("div_zero_zero_is_nan={}", (0.0_f64 / 0.0_f64).is_nan());
println!("mul_nan_is_nan={}", (f64::NAN * 1.0).is_nan());
bits("cast_2_pow_53", (1_u64 << 53) as f64);
bits("cast_2_pow_53_plus_1", ((1_u64 << 53) + 1) as f64);
}
Assumptions / kernel axioms
- Classical.choice
- Quot.sound
- propext
conservative transitive union of saved axiom observations across node dependencies
Requirements depending on this item (32)
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
All 32 entries
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
- Exponent agreement
- Correctness or defer
- Native correctness or defer
- Numeric acceptance
- Accumulated-value diagnostic
- Record bounds
- Invalid rejection
- Accumulated-value diagnostic
- Equal-target bridge
- Exact rounding
- Infinity
- Invalid rejection
- NaN acceptance
- No spurious NaNs
- Numeric acceptance
- Numeric sign
- Selected exponent range
- Selected magnitude sign
- Signed zero
- Totality
- Rounding determinism
- Rounding totality
- Full-significand diagnostic
- Infinity
- NaN
- Rejection
These requirements are linked to this item through the declared dependencies of their proofs.
Record details
| Record source | Tablet/model-support.json |
|---|---|
| Kind | opaque external binding |
| Preservation assessment origin | VerifierPanel |
| Preservation fingerprint | preservation-v1:8775eab8743e4a5d58ef7234b17ae6d936638e1857ac6188b0ebb65ced23efcc |
| Preservation current fingerprint | preservation-v1:8775eab8743e4a5d58ef7234b17ae6d936638e1857ac6188b0ebb65ced23efcc |
| Preservation freshness | matches current fingerprint |
| Correspondence approved fingerprint | {"own_tex":"4a3d0c05976e97107a13b942cb21c0cf7b9f33a8538413a9ab4e1c8bacaa81bd","lean_semantic_closure":"b5f937ef31cfdf4ab4e26f96d8646a8c9f2e9e43ec2d22ee04bdaf4760adc1bf","lean_relevant_definition_descendants":{"Binary64Model":"d80435c56f8fcbe084ebc2fbf05989a7ddf07434d0acd161302414cac32f964d","Binary64ModelDefault":"e2475cd1caad0eef450c903f24d2dfb8ffdfadf787ccad3621a86556f41e533a","F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2"},"lean_relevant_dependencies":["Binary64Model","Binary64ModelDefault","F64","core_num_FpCategory"],"preamble_tex":""} |
| Correspondence current fingerprint | {"own_tex":"4a3d0c05976e97107a13b942cb21c0cf7b9f33a8538413a9ab4e1c8bacaa81bd","lean_semantic_closure":"b5f937ef31cfdf4ab4e26f96d8646a8c9f2e9e43ec2d22ee04bdaf4760adc1bf","lean_relevant_definition_descendants":{"Binary64Model":"d80435c56f8fcbe084ebc2fbf05989a7ddf07434d0acd161302414cac32f964d","Binary64ModelDefault":"e2475cd1caad0eef450c903f24d2dfb8ffdfadf787ccad3621a86556f41e533a","F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2"},"lean_relevant_dependencies":["Binary64Model","Binary64ModelDefault","F64","core_num_FpCategory"],"preamble_tex":""} |
| Correspondence freshness | matches current fingerprint |
Exact preservation assessment
{
"status": "VerifierPass",
"origin": "VerifierPanel",
"fingerprints": {
"own_tex_hash": "d9eaca703f25c7f7a347f37f6c96817ebd03ea865be979787e4bebfb1313c84d",
"dep_statement_hashes": {
"Binary64ModelDefault": "be5dcc4afe23616ca8fd1d15d30fbbe4ee2621d68be3341b8e74a66e6dcd736f"
},
"combined_sound_fp": "preservation-v1:8775eab8743e4a5d58ef7234b17ae6d936638e1857ac6188b0ebb65ced23efcc"
},
"lane_votes": {
"v1": "Pass"
},
"reviewer_action_id": null
}Exact source record
{
"name": "core.f64.F64.classify",
"extracted_signature": ": F64 → Result core.num.FpCategory",
"rust_symbol": "core::f64::{f64}::classify",
"raw_declaration_sha256": "9fedd442d1d0403c4a7323d8f4e95c51b8bd39bf82d2d0ba357eaaf243e69b78",
"node": "ModelF64Classify",
"declaration": "dec2flt_model.ModelF64Classify"
}Captured evidence identities
[
{
"path": "reference/model-evidence/binary64-boundary.txt",
"sha256": "a17d82e7f789ce7f1fbb3922a66ec8806999e526532d637605263882d37b7abf",
"cited_by": [
"Tablet/ModelF64Classify.tex",
"Tablet/model-support.json"
]
},
{
"path": "reference/model-evidence/binary64-probe.rs",
"sha256": "68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e",
"cited_by": [
"reference/model-evidence/binary64-boundary.txt"
]
}
]core::f64::{f64}::to_bits
Inspect related source (1)
- to_bits · core/src/num/f64.rs:1223 Rust library
Related source and models come from the extraction records and declared dependencies.
| Rust item | core::f64::{f64}::to_bits |
|---|---|
| Recorded source | /rustc/library/core/src/num/f64.rs |
| Lines | 1223:4–1223:37 |
The related-source link includes this operation’s Rust standard-library implementation.
Opaque extraction signature
: F64 → Result Std.U64Lean definition
Trellis authored this Lean model for an operation outside the mechanical extraction. Modeling choices explains its behavior and review.
import Tablet.Binary64ModelDefault
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: ModelF64ToBits]
def ModelF64ToBits : F64 -> Result Std.U64 :=
-- BODY
Binary64ModelDefault.toBits
end dec2flt_model
Why this model is faithful
Definition
Preservation argument
Claim
Proof
Authored arguments for individual requirements
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
Recorded review
| Correspondence | Pass |
|---|---|
| Preservation | VerifierPass |
ModelF64ToBits · Lean checked
Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
reference/model-evidence/float-carriers.txt
Primary evidence for the F64 raw-word carrier
Scope
-----
This record supports only the representation claim that the source f64
specialization and the authored F64 carrier have the same set of 64-bit
encodings. It does not supply arithmetic or classification semantics.
All commands below were run from:
/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001
Tool and input identities
-------------------------
Command:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc --version --verbose
Raw result:
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
Command:
/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin/lean --version
Raw result:
Lean (version 4.30.0-rc2, x86_64-unknown-linux-gnu, commit 3dc1a088b6d2d8eafe25a7cd7ec7b58d731bd7cc, Release)
Command:
git -C /home/leanagent/pv_spike/tools/aeneas rev-parse HEAD
Raw result:
fa699427cdfa8f604b891fb0223ef42883dd7dc4
Command:
git -C /home/leanagent/pv_spike/tools/aeneas status --short
Raw result: empty (the pinned Aeneas checkout was clean).
Command:
sha256sum upstream/traits.rs modeling-input/manifest.json \
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/f64.rs \
/home/leanagent/pv_spike/tools/aeneas/backends/lean/Aeneas/Std/Scalar/Core.lean
Raw result:
66a02c44d72dfcc3ddae7e34a290e390dabaf98c5911b283d2d97f2f0075a44e upstream/traits.rs
2fc182c0c7acccad30c449ca349b999759b84e8ed4ec9d590e8295e43eeec077 modeling-input/manifest.json
84540a6a59e347c63caabe12cf895ba1239c76a50682471567007138fac1c618 /home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/f64.rs
a1c26c125a59bba635a2b2c170186ce07168c43308bcf386d508ebd77f01520e /home/leanagent/pv_spike/tools/aeneas/backends/lean/Aeneas/Std/Scalar/Core.lean
The manifest's effective_tools entry selects the rustc and Lean paths above,
and its effective_tools.lean_paths begins with the displayed Aeneas checkout.
Frozen f64 specialization
-------------------------
Command:
nl -ba upstream/traits.rs | sed -n '264,295p'
Raw result:
264 impl Float for f64 {
265 type Int = u64;
266
267 const INFINITY: Self = Self::INFINITY;
268 const NEG_INFINITY: Self = Self::NEG_INFINITY;
269 const NAN: Self = Self::NAN;
270 const NEG_NAN: Self = -Self::NAN;
271
272 const BITS: u32 = 64;
273 const SIG_TOTAL_BITS: u32 = Self::MANTISSA_DIGITS;
274 const EXP_MASK: Self::Int = Self::EXPONENT_MASK;
275 const SIG_MASK: Self::Int = Self::MANTISSA_MASK;
276
277 const MIN_EXPONENT_ROUND_TO_EVEN: i32 = -4;
278 const MAX_EXPONENT_ROUND_TO_EVEN: i32 = 23;
279 const SMALLEST_POWER_OF_TEN: i32 = -342;
280
281 fn to_bits(self) -> Self::Int {
282 self.to_bits()
283 }
284
285 fn classify(self) -> FpCategory {
286 self.classify()
287 }
288 }
289
290 impl FloatExt for f64 {
291 #[inline]
292 fn from_u64_bits(v: u64) -> Self {
293 f64::from_bits(v)
294 }
295 }
Thus the exact specialization boundary uses u64 in both directions: its
observation calls f64::to_bits, and its constructor calls f64::from_bits with
the complete u64, without a mask or numeric cast.
Pinned Rust exact-bit operations
--------------------------------
The source path was obtained with this command:
printf '%s/lib/rustlib/src/rust/library/core/src/num/f64.rs\n' \
"$(/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc --print sysroot)"
Raw result:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/f64.rs
Command (with F equal to that raw result):
nl -ba "$F" | sed -n '1201,1273p'
Raw result:
1201 /// Raw transmutation to `u64`.
1202 ///
1203 /// This is currently identical to `transmute::<f64, u64>(self)` on all platforms.
1204 ///
1205 /// See [`from_bits`](Self::from_bits) for some discussion of the
1206 /// portability of this operation (there are almost no issues).
1207 ///
1208 /// Note that this function is distinct from `as` casting, which attempts to
1209 /// preserve the *numeric* value, and not the bitwise value.
1210 ///
1211 /// # Examples
1212 ///
1213 /// ```
1214 /// assert!((1f64).to_bits() != 1f64 as u64); // to_bits() is not casting!
1215 /// assert_eq!((12.5f64).to_bits(), 0x4029000000000000);
1216 /// ```
1217 #[must_use = "this returns the result of the operation, \
1218 without modifying the original"]
1219 #[stable(feature = "float_bits_conv", since = "1.20.0")]
1220 #[rustc_const_stable(feature = "const_float_bits_conv", since = "1.83.0")]
1221 #[allow(unnecessary_transmutes)]
1222 #[inline]
1223 pub const fn to_bits(self) -> u64 {
1224 // SAFETY: `u64` is a plain old datatype so we can always transmute to it.
1225 unsafe { mem::transmute(self) }
1226 }
1227
1228 /// Raw transmutation from `u64`.
1229 ///
1230 /// This is currently identical to `transmute::<u64, f64>(v)` on all platforms.
1231 /// It turns out this is incredibly portable, for two reasons:
1232 ///
1233 /// * Floats and Ints have the same endianness on all supported platforms.
1234 /// * IEEE 754 very precisely specifies the bit layout of floats.
1235 ///
1236 /// However there is one caveat: prior to the 2008 version of IEEE 754, how
1237 /// to interpret the NaN signaling bit wasn't actually specified. Most platforms
1238 /// (notably x86 and ARM) picked the interpretation that was ultimately
1239 /// standardized in 2008, but some didn't (notably MIPS). As a result, all
1240 /// signaling NaNs on MIPS are quiet NaNs on x86, and vice-versa.
1241 ///
1242 /// Rather than trying to preserve signaling-ness cross-platform, this
1243 /// implementation favors preserving the exact bits. This means that
1244 /// any payloads encoded in NaNs will be preserved even if the result of
1245 /// this method is sent over the network from an x86 machine to a MIPS one.
1246 ///
1247 /// If the results of this method are only manipulated by the same
1248 /// architecture that produced them, then there is no portability concern.
1249 ///
1250 /// If the input isn't NaN, then there is no portability concern.
1251 ///
1252 /// If you don't care about signaling-ness (very likely), then there is no
1253 /// portability concern.
1254 ///
1255 /// Note that this function is distinct from `as` casting, which attempts to
1256 /// preserve the *numeric* value, and not the bitwise value.
1257 ///
1258 /// # Examples
1259 ///
1260 /// ```
1261 /// let v = f64::from_bits(0x4029000000000000);
1262 /// assert_eq!(v, 12.5);
1263 /// ```
1264 #[stable(feature = "float_bits_conv", since = "1.20.0")]
1265 #[rustc_const_stable(feature = "const_float_bits_conv", since = "1.83.0")]
1266 #[must_use]
1267 #[inline]
1268 #[allow(unnecessary_transmutes)]
1269 pub const fn from_bits(v: u64) -> Self {
1270 // It turns out the safety issues with sNaN were overblown! Hooray!
1271 // SAFETY: `u64` is a plain old datatype so we can always transmute from it.
1272 unsafe { mem::transmute(v) }
1273 }
These are opposite same-size transmutations, and the source explicitly chooses
exact bit preservation for NaNs, including their payloads.
Pinned Aeneas 64-bit carrier
----------------------------
Command:
nl -ba /home/leanagent/pv_spike/tools/aeneas/backends/lean/Aeneas/Std/Scalar/Core.lean \
| sed -n '27,34p;45,53p;65,69p;650,656p;1089,1094p'
Raw result:
27 /-- Kinds of unsigned integers -/
28 inductive UScalarTy where
29 | Usize
30 | U8
31 | U16
32 | U32
33 | U64
34 | U128
45 @[implicit_reducible]
46 def UScalarTy.numBits (ty : UScalarTy) : Nat :=
47 match ty with
48 | Usize => System.Platform.numBits
49 | U8 => 8
50 | U16 => 16
51 | U32 => 32
52 | U64 => 64
53 | U128 => 128
65 /-- Unsigned integer -/
66 structure UScalar (ty : UScalarTy) where
67 /- The internal representation is a bit-vector -/
68 bv : BitVec ty.numBits
69 deriving Repr, BEq, DecidableEq
650 /-! The scalar types. -/
651 abbrev Usize := UScalar .Usize
652 abbrev U8 := UScalar .U8
653 abbrev U16 := UScalar .U16
654 abbrev U32 := UScalar .U32
655 abbrev U64 := UScalar .U64
656 abbrev U128 := UScalar .U128
1089 abbrev U8.bv (x : U8) : BitVec 8 := UScalar.bv x
1090 abbrev U16.bv (x : U16) : BitVec 16 := UScalar.bv x
1091 abbrev U32.bv (x : U32) : BitVec 32 := UScalar.bv x
1092 abbrev U64.bv (x : U64) : BitVec 64 := UScalar.bv x
1093 abbrev U128.bv (x : U128) : BitVec 128 := UScalar.bv x
1094 abbrev Usize.bv (x : Usize) : BitVec System.Platform.numBits := UScalar.bv x
Consequently Std.U64 is a one-field structure whose field ranges over every
BitVec 64. There is neither a validity predicate nor a quotient that could
remove, merge, or add raw words.
Assumptions / kernel axioms
- Classical.choice
- Quot.sound
- propext
conservative transitive union of saved axiom observations across node dependencies
Requirements depending on this item (32)
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
All 32 entries
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
- Exponent agreement
- Correctness or defer
- Native correctness or defer
- Numeric acceptance
- Accumulated-value diagnostic
- Record bounds
- Invalid rejection
- Accumulated-value diagnostic
- Equal-target bridge
- Exact rounding
- Infinity
- Invalid rejection
- NaN acceptance
- No spurious NaNs
- Numeric acceptance
- Numeric sign
- Selected exponent range
- Selected magnitude sign
- Signed zero
- Totality
- Rounding determinism
- Rounding totality
- Full-significand diagnostic
- Infinity
- NaN
- Rejection
These requirements are linked to this item through the declared dependencies of their proofs.
Record details
| Record source | Tablet/model-support.json |
|---|---|
| Kind | opaque external binding |
| Preservation assessment origin | VerifierPanel |
| Preservation fingerprint | preservation-v1:dc519aac59ff2844b2dcf1ea30eae6ecd2dff3f9d56612f0253e36a60c61cc5c |
| Preservation current fingerprint | preservation-v1:dc519aac59ff2844b2dcf1ea30eae6ecd2dff3f9d56612f0253e36a60c61cc5c |
| Preservation freshness | matches current fingerprint |
| Correspondence approved fingerprint | {"own_tex":"293df8c87f6de0dd27a40fa265758f72260aea51ecd3e69edf9d51df43cb564b","lean_semantic_closure":"77d5d712dffbb54050b6077fdb30f70d9015f2aef826a25bcbee1c352227465c","lean_relevant_definition_descendants":{"Binary64Model":"d80435c56f8fcbe084ebc2fbf05989a7ddf07434d0acd161302414cac32f964d","Binary64ModelDefault":"e2475cd1caad0eef450c903f24d2dfb8ffdfadf787ccad3621a86556f41e533a","F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2"},"lean_relevant_dependencies":["Binary64Model","Binary64ModelDefault","F64","core_num_FpCategory"],"preamble_tex":""} |
| Correspondence current fingerprint | {"own_tex":"293df8c87f6de0dd27a40fa265758f72260aea51ecd3e69edf9d51df43cb564b","lean_semantic_closure":"77d5d712dffbb54050b6077fdb30f70d9015f2aef826a25bcbee1c352227465c","lean_relevant_definition_descendants":{"Binary64Model":"d80435c56f8fcbe084ebc2fbf05989a7ddf07434d0acd161302414cac32f964d","Binary64ModelDefault":"e2475cd1caad0eef450c903f24d2dfb8ffdfadf787ccad3621a86556f41e533a","F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2"},"lean_relevant_dependencies":["Binary64Model","Binary64ModelDefault","F64","core_num_FpCategory"],"preamble_tex":""} |
| Correspondence freshness | matches current fingerprint |
Exact preservation assessment
{
"status": "VerifierPass",
"origin": "VerifierPanel",
"fingerprints": {
"own_tex_hash": "4ffdafbff63452ef90afa122b7bc736d0d8e94b5d9e1a594bf4ecb13259508aa",
"dep_statement_hashes": {
"Binary64ModelDefault": "be5dcc4afe23616ca8fd1d15d30fbbe4ee2621d68be3341b8e74a66e6dcd736f"
},
"combined_sound_fp": "preservation-v1:dc519aac59ff2844b2dcf1ea30eae6ecd2dff3f9d56612f0253e36a60c61cc5c"
},
"lane_votes": {
"v1": "Pass"
},
"reviewer_action_id": null
}Exact source record
{
"name": "core.f64.F64.to_bits",
"extracted_signature": ": F64 → Result Std.U64",
"rust_symbol": "core::f64::{f64}::to_bits",
"raw_declaration_sha256": "ddaec6bb7c36ba6445a5b0b8e52f841240ca2563004e8ce1255caf0e36ec22ae",
"node": "ModelF64ToBits",
"declaration": "dec2flt_model.ModelF64ToBits"
}Captured evidence identities
[
{
"path": "reference/model-evidence/float-carriers.txt",
"sha256": "52008bf87912605e4a627f9846bd106465d79042eb794bef750d9e4d19bba071",
"cited_by": [
"Tablet/ModelF64ToBits.tex",
"Tablet/model-support.json"
]
}
]core::f64::{f64}::from_bits
Inspect related source (1)
- from_bits · core/src/num/f64.rs:1269 Rust library
Related source and models come from the extraction records and declared dependencies.
| Rust item | core::f64::{f64}::from_bits |
|---|---|
| Recorded source | /rustc/library/core/src/num/f64.rs |
| Lines | 1269:4–1269:42 |
The related-source link includes this operation’s Rust standard-library implementation.
Opaque extraction signature
: Std.U64 → Result F64Lean definition
Trellis authored this Lean model for an operation outside the mechanical extraction. Modeling choices explains its behavior and review.
import Tablet.Binary64ModelDefault
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: ModelF64FromBits]
def ModelF64FromBits : Std.U64 -> Result F64 :=
-- BODY
Binary64ModelDefault.fromBits
end dec2flt_model
Why this model is faithful
Definition
Preservation argument
Claim
Proof
Authored arguments for individual requirements
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
Recorded review
| Correspondence | Pass |
|---|---|
| Preservation | VerifierPass |
ModelF64FromBits · Lean checked
Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
reference/model-evidence/float-carriers.txt
Primary evidence for the F64 raw-word carrier
Scope
-----
This record supports only the representation claim that the source f64
specialization and the authored F64 carrier have the same set of 64-bit
encodings. It does not supply arithmetic or classification semantics.
All commands below were run from:
/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001
Tool and input identities
-------------------------
Command:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc --version --verbose
Raw result:
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
Command:
/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin/lean --version
Raw result:
Lean (version 4.30.0-rc2, x86_64-unknown-linux-gnu, commit 3dc1a088b6d2d8eafe25a7cd7ec7b58d731bd7cc, Release)
Command:
git -C /home/leanagent/pv_spike/tools/aeneas rev-parse HEAD
Raw result:
fa699427cdfa8f604b891fb0223ef42883dd7dc4
Command:
git -C /home/leanagent/pv_spike/tools/aeneas status --short
Raw result: empty (the pinned Aeneas checkout was clean).
Command:
sha256sum upstream/traits.rs modeling-input/manifest.json \
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/f64.rs \
/home/leanagent/pv_spike/tools/aeneas/backends/lean/Aeneas/Std/Scalar/Core.lean
Raw result:
66a02c44d72dfcc3ddae7e34a290e390dabaf98c5911b283d2d97f2f0075a44e upstream/traits.rs
2fc182c0c7acccad30c449ca349b999759b84e8ed4ec9d590e8295e43eeec077 modeling-input/manifest.json
84540a6a59e347c63caabe12cf895ba1239c76a50682471567007138fac1c618 /home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/f64.rs
a1c26c125a59bba635a2b2c170186ce07168c43308bcf386d508ebd77f01520e /home/leanagent/pv_spike/tools/aeneas/backends/lean/Aeneas/Std/Scalar/Core.lean
The manifest's effective_tools entry selects the rustc and Lean paths above,
and its effective_tools.lean_paths begins with the displayed Aeneas checkout.
Frozen f64 specialization
-------------------------
Command:
nl -ba upstream/traits.rs | sed -n '264,295p'
Raw result:
264 impl Float for f64 {
265 type Int = u64;
266
267 const INFINITY: Self = Self::INFINITY;
268 const NEG_INFINITY: Self = Self::NEG_INFINITY;
269 const NAN: Self = Self::NAN;
270 const NEG_NAN: Self = -Self::NAN;
271
272 const BITS: u32 = 64;
273 const SIG_TOTAL_BITS: u32 = Self::MANTISSA_DIGITS;
274 const EXP_MASK: Self::Int = Self::EXPONENT_MASK;
275 const SIG_MASK: Self::Int = Self::MANTISSA_MASK;
276
277 const MIN_EXPONENT_ROUND_TO_EVEN: i32 = -4;
278 const MAX_EXPONENT_ROUND_TO_EVEN: i32 = 23;
279 const SMALLEST_POWER_OF_TEN: i32 = -342;
280
281 fn to_bits(self) -> Self::Int {
282 self.to_bits()
283 }
284
285 fn classify(self) -> FpCategory {
286 self.classify()
287 }
288 }
289
290 impl FloatExt for f64 {
291 #[inline]
292 fn from_u64_bits(v: u64) -> Self {
293 f64::from_bits(v)
294 }
295 }
Thus the exact specialization boundary uses u64 in both directions: its
observation calls f64::to_bits, and its constructor calls f64::from_bits with
the complete u64, without a mask or numeric cast.
Pinned Rust exact-bit operations
--------------------------------
The source path was obtained with this command:
printf '%s/lib/rustlib/src/rust/library/core/src/num/f64.rs\n' \
"$(/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc --print sysroot)"
Raw result:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/f64.rs
Command (with F equal to that raw result):
nl -ba "$F" | sed -n '1201,1273p'
Raw result:
1201 /// Raw transmutation to `u64`.
1202 ///
1203 /// This is currently identical to `transmute::<f64, u64>(self)` on all platforms.
1204 ///
1205 /// See [`from_bits`](Self::from_bits) for some discussion of the
1206 /// portability of this operation (there are almost no issues).
1207 ///
1208 /// Note that this function is distinct from `as` casting, which attempts to
1209 /// preserve the *numeric* value, and not the bitwise value.
1210 ///
1211 /// # Examples
1212 ///
1213 /// ```
1214 /// assert!((1f64).to_bits() != 1f64 as u64); // to_bits() is not casting!
1215 /// assert_eq!((12.5f64).to_bits(), 0x4029000000000000);
1216 /// ```
1217 #[must_use = "this returns the result of the operation, \
1218 without modifying the original"]
1219 #[stable(feature = "float_bits_conv", since = "1.20.0")]
1220 #[rustc_const_stable(feature = "const_float_bits_conv", since = "1.83.0")]
1221 #[allow(unnecessary_transmutes)]
1222 #[inline]
1223 pub const fn to_bits(self) -> u64 {
1224 // SAFETY: `u64` is a plain old datatype so we can always transmute to it.
1225 unsafe { mem::transmute(self) }
1226 }
1227
1228 /// Raw transmutation from `u64`.
1229 ///
1230 /// This is currently identical to `transmute::<u64, f64>(v)` on all platforms.
1231 /// It turns out this is incredibly portable, for two reasons:
1232 ///
1233 /// * Floats and Ints have the same endianness on all supported platforms.
1234 /// * IEEE 754 very precisely specifies the bit layout of floats.
1235 ///
1236 /// However there is one caveat: prior to the 2008 version of IEEE 754, how
1237 /// to interpret the NaN signaling bit wasn't actually specified. Most platforms
1238 /// (notably x86 and ARM) picked the interpretation that was ultimately
1239 /// standardized in 2008, but some didn't (notably MIPS). As a result, all
1240 /// signaling NaNs on MIPS are quiet NaNs on x86, and vice-versa.
1241 ///
1242 /// Rather than trying to preserve signaling-ness cross-platform, this
1243 /// implementation favors preserving the exact bits. This means that
1244 /// any payloads encoded in NaNs will be preserved even if the result of
1245 /// this method is sent over the network from an x86 machine to a MIPS one.
1246 ///
1247 /// If the results of this method are only manipulated by the same
1248 /// architecture that produced them, then there is no portability concern.
1249 ///
1250 /// If the input isn't NaN, then there is no portability concern.
1251 ///
1252 /// If you don't care about signaling-ness (very likely), then there is no
1253 /// portability concern.
1254 ///
1255 /// Note that this function is distinct from `as` casting, which attempts to
1256 /// preserve the *numeric* value, and not the bitwise value.
1257 ///
1258 /// # Examples
1259 ///
1260 /// ```
1261 /// let v = f64::from_bits(0x4029000000000000);
1262 /// assert_eq!(v, 12.5);
1263 /// ```
1264 #[stable(feature = "float_bits_conv", since = "1.20.0")]
1265 #[rustc_const_stable(feature = "const_float_bits_conv", since = "1.83.0")]
1266 #[must_use]
1267 #[inline]
1268 #[allow(unnecessary_transmutes)]
1269 pub const fn from_bits(v: u64) -> Self {
1270 // It turns out the safety issues with sNaN were overblown! Hooray!
1271 // SAFETY: `u64` is a plain old datatype so we can always transmute from it.
1272 unsafe { mem::transmute(v) }
1273 }
These are opposite same-size transmutations, and the source explicitly chooses
exact bit preservation for NaNs, including their payloads.
Pinned Aeneas 64-bit carrier
----------------------------
Command:
nl -ba /home/leanagent/pv_spike/tools/aeneas/backends/lean/Aeneas/Std/Scalar/Core.lean \
| sed -n '27,34p;45,53p;65,69p;650,656p;1089,1094p'
Raw result:
27 /-- Kinds of unsigned integers -/
28 inductive UScalarTy where
29 | Usize
30 | U8
31 | U16
32 | U32
33 | U64
34 | U128
45 @[implicit_reducible]
46 def UScalarTy.numBits (ty : UScalarTy) : Nat :=
47 match ty with
48 | Usize => System.Platform.numBits
49 | U8 => 8
50 | U16 => 16
51 | U32 => 32
52 | U64 => 64
53 | U128 => 128
65 /-- Unsigned integer -/
66 structure UScalar (ty : UScalarTy) where
67 /- The internal representation is a bit-vector -/
68 bv : BitVec ty.numBits
69 deriving Repr, BEq, DecidableEq
650 /-! The scalar types. -/
651 abbrev Usize := UScalar .Usize
652 abbrev U8 := UScalar .U8
653 abbrev U16 := UScalar .U16
654 abbrev U32 := UScalar .U32
655 abbrev U64 := UScalar .U64
656 abbrev U128 := UScalar .U128
1089 abbrev U8.bv (x : U8) : BitVec 8 := UScalar.bv x
1090 abbrev U16.bv (x : U16) : BitVec 16 := UScalar.bv x
1091 abbrev U32.bv (x : U32) : BitVec 32 := UScalar.bv x
1092 abbrev U64.bv (x : U64) : BitVec 64 := UScalar.bv x
1093 abbrev U128.bv (x : U128) : BitVec 128 := UScalar.bv x
1094 abbrev Usize.bv (x : Usize) : BitVec System.Platform.numBits := UScalar.bv x
Consequently Std.U64 is a one-field structure whose field ranges over every
BitVec 64. There is neither a validity predicate nor a quotient that could
remove, merge, or add raw words.
Assumptions / kernel axioms
- Classical.choice
- Quot.sound
- propext
conservative transitive union of saved axiom observations across node dependencies
Requirements depending on this item (32)
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
All 32 entries
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
- Exponent agreement
- Correctness or defer
- Native correctness or defer
- Numeric acceptance
- Accumulated-value diagnostic
- Record bounds
- Invalid rejection
- Accumulated-value diagnostic
- Equal-target bridge
- Exact rounding
- Infinity
- Invalid rejection
- NaN acceptance
- No spurious NaNs
- Numeric acceptance
- Numeric sign
- Selected exponent range
- Selected magnitude sign
- Signed zero
- Totality
- Rounding determinism
- Rounding totality
- Full-significand diagnostic
- Infinity
- NaN
- Rejection
These requirements are linked to this item through the declared dependencies of their proofs.
Record details
| Record source | Tablet/model-support.json |
|---|---|
| Kind | opaque external binding |
| Preservation assessment origin | VerifierPanel |
| Preservation fingerprint | preservation-v1:670e8a3d455e782aae24b29b8d9091c55b41c957f9ff56b50572b35457a72e8a |
| Preservation current fingerprint | preservation-v1:670e8a3d455e782aae24b29b8d9091c55b41c957f9ff56b50572b35457a72e8a |
| Preservation freshness | matches current fingerprint |
| Correspondence approved fingerprint | {"own_tex":"ddd4e3ac18fa87485d58985fb4379a911c939601d663228453ef7e47dbb1aa31","lean_semantic_closure":"d3db342befc2f6bd15d0a8d594e7fde493bf2599e8fad4dbd81174d5bdb93c85","lean_relevant_definition_descendants":{"Binary64Model":"d80435c56f8fcbe084ebc2fbf05989a7ddf07434d0acd161302414cac32f964d","Binary64ModelDefault":"e2475cd1caad0eef450c903f24d2dfb8ffdfadf787ccad3621a86556f41e533a","F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2"},"lean_relevant_dependencies":["Binary64Model","Binary64ModelDefault","F64","core_num_FpCategory"],"preamble_tex":""} |
| Correspondence current fingerprint | {"own_tex":"ddd4e3ac18fa87485d58985fb4379a911c939601d663228453ef7e47dbb1aa31","lean_semantic_closure":"d3db342befc2f6bd15d0a8d594e7fde493bf2599e8fad4dbd81174d5bdb93c85","lean_relevant_definition_descendants":{"Binary64Model":"d80435c56f8fcbe084ebc2fbf05989a7ddf07434d0acd161302414cac32f964d","Binary64ModelDefault":"e2475cd1caad0eef450c903f24d2dfb8ffdfadf787ccad3621a86556f41e533a","F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2"},"lean_relevant_dependencies":["Binary64Model","Binary64ModelDefault","F64","core_num_FpCategory"],"preamble_tex":""} |
| Correspondence freshness | matches current fingerprint |
Exact preservation assessment
{
"status": "VerifierPass",
"origin": "VerifierPanel",
"fingerprints": {
"own_tex_hash": "6efdf22f161a5b9a0f429bc71df5cdd3ceb8c02065de7cd96a6926a379acf0fa",
"dep_statement_hashes": {
"Binary64ModelDefault": "be5dcc4afe23616ca8fd1d15d30fbbe4ee2621d68be3341b8e74a66e6dcd736f"
},
"combined_sound_fp": "preservation-v1:670e8a3d455e782aae24b29b8d9091c55b41c957f9ff56b50572b35457a72e8a"
},
"lane_votes": {
"v1": "Pass"
},
"reviewer_action_id": null
}Exact source record
{
"name": "core.f64.F64.from_bits",
"extracted_signature": ": Std.U64 → Result F64",
"rust_symbol": "core::f64::{f64}::from_bits",
"raw_declaration_sha256": "af8ee4387cea97d0a353a83d6280c03f3c9f739bf733af5bd39c29909f1b2b19",
"node": "ModelF64FromBits",
"declaration": "dec2flt_model.ModelF64FromBits"
}Captured evidence identities
[
{
"path": "reference/model-evidence/float-carriers.txt",
"sha256": "52008bf87912605e4a627f9846bd106465d79042eb794bef750d9e4d19bba071",
"cited_by": [
"Tablet/ModelF64FromBits.tex",
"Tablet/model-support.json"
]
}
]core::num::{u8}::is_ascii_digit
Inspect related source (1)
- is_ascii_digit · core/src/num/mod.rs:958 Rust library
Related source and models come from the extraction records and declared dependencies.
| Rust item | core::num::{u8}::is_ascii_digit |
|---|---|
| Recorded source | /rustc/library/core/src/num/mod.rs |
| Lines | 958:4–958:46 |
The related-source link includes this operation’s Rust standard-library implementation.
Opaque extraction signature
: Std.U8 → Result BoolLean 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: ModelU8IsAsciiDigit]
def ModelU8IsAsciiDigit (x : Std.U8) : Result Bool :=
-- BODY
ok (decide (48 <= x.val ∧ x.val <= 57))
end dec2flt_model
Why this model is faithful
Definition
Preservation argument
Claim
Proof
Authored arguments for individual requirements
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
Recorded review
| Correspondence | Pass |
|---|---|
| Preservation | VerifierPass |
ModelU8IsAsciiDigit · Lean checked
Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
reference/model-evidence/binary64-boundary.txt
Primary evidence for the binary64 boundary
==========================================
Scope and identities
--------------------
This record concerns the frozen x86_64-unknown-linux-gnu extraction, the
adapted Rust crate retained in this repository, and the installed toolchain
named by modeling-input/SETUP.md. The probe source is retained at
reference/model-evidence/binary64-probe.rs; no scratch source is required to
reproduce it.
Toolchain executable:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
Target:
x86_64-unknown-linux-gnu
rustc executable SHA-256:
162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
Probe source SHA-256:
68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
Compiled probe SHA-256:
f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
Frozen generated.lean SHA-256:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692
Frozen modeling-input/manifest.json SHA-256:
2fc182c0c7acccad30c449ca349b999759b84e8ed4ec9d590e8295e43eeec077
Approved Binary64ModelDefault.lean SHA-256 at the time of this record:
03ae48fb631e6242bd21bf95d0481b66acae05f8cab343c7ab279b3c116538a3
Exact reproduction commands
---------------------------
Run from the repository root:
R=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
P=reference/model-evidence/binary64-probe.rs
B=.trellis/scratch/binary64-probe
"$R" --version --verbose
sha256sum "$R"
sha256sum "$P"
"$R" --target x86_64-unknown-linux-gnu -C opt-level=0 "$P" -o "$B"
sha256sum "$B"
"$B"
Raw output
----------
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
rustc_sha256=162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
probe_sha256=68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
binary_sha256=f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
target_arch=x86_64
mantissa_digits=53
exponent_mask=7ff0000000000000
mantissa_mask=000fffffffffffff
nan=7ff8000000000000
infinity=7ff0000000000000
neg_infinity=fff0000000000000
nan_category=Nan
infinity_category=Infinite
zero_category=Zero
subnormal_category=Subnormal
normal_category=Normal
from_bits_to_bits=7ff0000000000001
neg_payload_nan=fff0000000000001
neg_zero=8000000000000000
subnormal_tie_to_even_zero=0000000000000000
subnormal_tie_to_even_two=0000000000000002
normal_division=3fb999999999999a
mul_negative_zero=8000000000000000
div_negative_zero=8000000000000000
div_negative_infinity=fff0000000000000
mul_overflow=7ff0000000000000
mul_zero_infinity_is_nan=true
div_zero_zero_is_nan=true
mul_nan_is_nan=true
cast_2_pow_53=4340000000000000
cast_2_pow_53_plus_1=4340000000000000
Pinned Rust library sources
---------------------------
The installed sources below belong to the same named toolchain. Their
SHA-256 identities are:
core/src/primitive_docs.rs
c4b8627dd67d5dac8f383f383a9e7ff1229ea43e7599610fc61988694cf0f3e5
core/src/num/f64.rs
84540a6a59e347c63caabe12cf895ba1239c76a50682471567007138fac1c618
core/src/clone.rs
23f9cfc80347fde6b8457d46fbf7a2b8d9f34c8c58601b0b6f714ca2f6d1976b
The exact relevant text of core/src/primitive_docs.rs is:
#[rustc_doc_primitive = "f64"]
#[doc(alias = "double")]
/// A 64-bit floating-point type (specifically, the "binary64" type defined in IEEE 754-2008).
///
/// This type is very similar to [`prim@f32`], but has increased precision by using twice as many
/// bits. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on double-precision
/// values][wikipedia] for more information.
The referenced primitive-f32 documentation supplies the common primitive
floating-point operation rules quoted next:
/// - −0.0: IEEE 754 floating-point numbers have a bit that indicates their sign, so −0.0 is a
/// possible value. For comparison −0.0 = +0.0, but floating-point operations can carry
/// the sign bit through arithmetic operations. This means −0.0 × +0.0 produces −0.0 and
/// a negative number rounded to a value smaller than a float can represent also produces −0.0.
/// - [∞](#associatedconstant.INFINITY) and
/// [−∞](#associatedconstant.NEG_INFINITY): these result from calculations
/// like `1.0 / 0.0`.
///
/// When a primitive operation (addition, subtraction, multiplication, or
/// division) is performed on this type, the result is rounded according to the
/// roundTiesToEven direction defined in IEEE 754-2008. That means:
///
/// - The result is the representable value closest to the true value, if there
/// is a unique closest representable value.
/// - If the true value is exactly half-way between two representable values,
/// the result is the one with an even least-significant binary digit.
/// - If the true value's magnitude is ≥ `f32::MAX` + 2<sup>(`f32::MAX_EXP` −
/// `f32::MANTISSA_DIGITS` − 1)</sup>, the result is ∞ or −∞ (preserving the
/// true value's sign).
The same file explicitly separates arithmetic NaN choice from exact bitwise
operations; its exact relevant text is:
/// The rules for NaN values differ between *arithmetic* and *non-arithmetic* (or "bitwise")
/// operations. The non-arithmetic operations are unary `-`, `abs`, `copysign`, `signum`,
/// `{to,from}_bits`, `{to,from}_{be,le,ne}_bytes` and `is_sign_{positive,negative}`. These
/// operations are guaranteed to exactly preserve the bit pattern of their input except for possibly
/// changing the sign bit.
///
/// The following rules apply when a NaN value is returned from an arithmetic operation:
/// - The result has a non-deterministic sign.
/// - The quiet bit and payload are non-deterministically chosen from
/// the following set of options:
///
/// - **Preferred NaN**: The quiet bit is set and the payload is all-zero.
/// - **Quieting NaN propagation**: The quiet bit is set and the payload is copied from any input
/// operand that is a NaN. If the inputs and outputs do not have the same payload size (i.e., for
/// `as` casts), then
/// - If the output is smaller than the input, low-order bits of the payload get dropped.
/// - If the output is larger than the input, the payload gets filled up with 0s in the low-order
/// bits.
/// - **Unchanged NaN propagation**: The quiet bit and payload are copied from any input operand
/// that is a NaN. If the inputs and outputs do not have the same size (i.e., for `as` casts), the
/// same rules as for "quieting NaN propagation" apply, with one caveat: if the output is smaller
/// than the input, dropping the low-order bits may result in a payload of 0; a payload of 0 is not
/// possible with a signaling NaN (the all-0 significand encodes an infinity) so unchanged NaN
/// propagation cannot occur with some inputs.
/// - **Target-specific NaN**: The quiet bit is set and the payload is picked from a target-specific
/// set of "extra" possible NaN payloads. The set can depend on the input operand values.
/// See the table below for the concrete NaNs this set contains on various targets.
///
/// | `target_arch` | Extra payloads possible on this platform |
/// |---------------|------------------------------------------|
/// | `aarch64`, `arm`, `arm64ec`, `loongarch64`, `powerpc` (except when `target_abi = "spe"`), `powerpc64`, `riscv32`, `riscv64`, `s390x`, `x86`, `x86_64` | None |
Thus the model's preferred quiet NaN is one permitted result whenever
multiplication or division returns NaN. This does not claim that arbitrary
Rust arithmetic NaNs have those exact bits. By contrast, unary negation and
bit conversion must preserve all non-sign bits exactly, including for every
NaN payload.
The exact relevant declarations in core/src/num/f64.rs are:
pub const MANTISSA_DIGITS: u32 = 53;
pub const NAN: f64 = 0.0_f64 / 0.0_f64;
pub const INFINITY: f64 = 1.0_f64 / 0.0_f64;
pub const NEG_INFINITY: f64 = -1.0_f64 / 0.0_f64;
pub const SIGN_MASK: u64 = 0x8000_0000_0000_0000;
pub const EXPONENT_MASK: u64 = 0x7ff0_0000_0000_0000;
pub const MANTISSA_MASK: u64 = 0x000f_ffff_ffff_ffff;
pub const fn classify(self) -> FpCategory {
// We used to have complicated logic here that avoids the simple bit-based tests to work
// around buggy codegen for x87 targets (see
// https://github.com/rust-lang/rust/issues/114479). However, some LLVM versions later, none
// of our tests is able to find any difference between the complicated and the naive
// version, so now we are back to the naive version.
let b = self.to_bits();
match (b & Self::MANTISSA_MASK, b & Self::EXPONENT_MASK) {
(0, Self::EXPONENT_MASK) => FpCategory::Infinite,
(_, Self::EXPONENT_MASK) => FpCategory::Nan,
(0, 0) => FpCategory::Zero,
(_, 0) => FpCategory::Subnormal,
_ => FpCategory::Normal,
}
}
pub const fn to_bits(self) -> u64 {
// SAFETY: `u64` is a plain old datatype so we can always transmute to it.
unsafe { mem::transmute(self) }
}
pub const fn from_bits(v: u64) -> Self {
// It turns out the safety issues with sNaN were overblown! Hooray!
// SAFETY: `u64` is a plain old datatype so we can always transmute from it.
unsafe { mem::transmute(v) }
}
The exact scalar clone body in core/src/clone.rs is:
impl const Clone for $t {
#[inline(always)]
fn clone(&self) -> Self {
*self
}
}
Frozen adapted source
---------------------
The relevant retained source file hashes are:
crate/traits.rs
9013270fb846edcb0bdf2abd0353f575fdd727974cba9e89bdab8bb4c2b4f0bf
crate/dec2flt/mod.rs
b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012
crate/dec2flt/parse.rs
50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f
crate/dec2flt/decimal.rs
633658be803b7369b18feb098a8aa1b5f714a933d3b79ecbc4899a1b05f35beb
crate/dec2flt/lemire.rs
fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1
crate/dec2flt/slow.rs
93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485
Exact constant and bit-conversion excerpt from crate/traits.rs:
impl Float for f64 {
type Int = u64;
const INFINITY: Self = Self::INFINITY;
const NEG_INFINITY: Self = Self::NEG_INFINITY;
const NAN: Self = Self::NAN;
// Bit-identical to the upstream `-f64::NAN`, without the unsupported
// compile-time float negation.
const NEG_NAN: Self = f64::from_bits(0xFFF8_0000_0000_0000);
const BITS: u32 = 64;
const SIG_TOTAL_BITS: u32 = Self::MANTISSA_DIGITS;
const EXP_MASK: Self::Int = Self::EXPONENT_MASK;
const SIG_MASK: Self::Int = Self::MANTISSA_MASK;
fn to_bits(self) -> Self::Int {
self.to_bits()
}
fn classify(self) -> FpCategory {
self.classify()
}
}
impl FloatExt for f64 {
#[inline]
fn from_u64_bits(v: u64) -> Self {
f64::from_bits(v)
}
Exact derived-constant defaults from crate/traits.rs:
/// The number of bits in the significand, *excluding* the hidden bit.
const SIG_BITS: u32 = Self::SIG_TOTAL_BITS - 1;
/// Number of bits in the exponent.
const EXP_BITS: u32 = Self::BITS - Self::SIG_BITS - 1;
/// The saturated (maximum bitpattern) value of the exponent, i.e. the infinite
/// representation.
///
/// This shifted fully right, use `EXP_MASK` for the shifted value.
const EXP_SAT: u32 = (1 << Self::EXP_BITS) - 1;
/// Signed version of `EXP_SAT` since we convert a lot.
const INFINITE_POWER: i32 = Self::EXP_SAT as i32;
/// The exponent bias value. This is also the maximum value of the exponent.
const EXP_BIAS: u32 = Self::EXP_SAT >> 1;
/// Minimum exponent value of normal values.
const EXP_MIN: i32 = -(Self::EXP_BIAS as i32 - 1);
Together with the f64-instance lines `BITS = 64` and
`SIG_TOTAL_BITS = Self::MANTISSA_DIGITS` in the preceding excerpt, these
defaults derive SIG_BITS, EXP_MIN, and INFINITE_POWER from the primitive
mantissa-digit constant rather than introducing independent parameters.
Exact checked cast excerpt from crate/dec2flt/mod.rs:
#[inline]
// This method is precisely the source `u64 as f64` primitive conversion.
// Aeneas cannot translate that cast; opacity is confined to the cast while
// the fast-path algorithm, its range proof obligation, and all calls stay
// visible in the extracted model.
#[charon::opaque]
fn from_u64(v: u64) -> Self {
debug_assert!(v <= Self::MAX_MANTISSA_FAST_PATH);
v as _
}
Here MAX_MANTISSA_FAST_PATH is the retained default 1 << 53. Therefore the
source succeeds only through the modeled branch v <= 2^53 in this debug
configuration; above it the debug assertion fails before the cast. On the
successful branch every integer is exactly representable, so the source cast
and the model rounder return the same word.
Exact power-table and assembly excerpts from crate/dec2flt/mod.rs:
/// Maximum mantissa for the fast-path (`1 << 53` for f64).
const MAX_MANTISSA_FAST_PATH: u64 = 1 << Self::SIG_TOTAL_BITS;
const MAX_EXPONENT_FAST_PATH: i64 = 22;
const MIN_EXPONENT_FAST_PATH: i64 = -Self::MAX_EXPONENT_FAST_PATH;
const MAX_EXPONENT_DISGUISED_FAST_PATH: i64 = 37;
fn pow10_fast_path(exponent: usize) -> Self {
// These bit patterns are exactly the source table's rounded binary64
// literals. The match is the same masked lookup; it merely keeps float
// constants out of Aeneas's unsupported constant interpreter.
match exponent & 31 {
0 => f64::from_bits(0x3FF0_0000_0000_0000),
1 => f64::from_bits(0x4024_0000_0000_0000),
2 => f64::from_bits(0x4059_0000_0000_0000),
3 => f64::from_bits(0x408F_4000_0000_0000),
4 => f64::from_bits(0x40C3_8800_0000_0000),
5 => f64::from_bits(0x40F8_6A00_0000_0000),
6 => f64::from_bits(0x412E_8480_0000_0000),
7 => f64::from_bits(0x4163_12D0_0000_0000),
8 => f64::from_bits(0x4197_D784_0000_0000),
9 => f64::from_bits(0x41CD_CD65_0000_0000),
10 => f64::from_bits(0x4202_A05F_2000_0000),
11 => f64::from_bits(0x4237_4876_E800_0000),
12 => f64::from_bits(0x426D_1A94_A200_0000),
13 => f64::from_bits(0x42A2_309C_E540_0000),
14 => f64::from_bits(0x42D6_BCC4_1E90_0000),
15 => f64::from_bits(0x430C_6BF5_2634_0000),
16 => f64::from_bits(0x4341_C379_37E0_8000),
17 => f64::from_bits(0x4376_3457_85D8_A000),
18 => f64::from_bits(0x43AB_C16D_674E_C800),
19 => f64::from_bits(0x43E1_58E4_6091_3D00),
20 => f64::from_bits(0x4415_AF1D_78B5_8C40),
21 => f64::from_bits(0x444B_1AE4_D6E2_EF50),
22 => f64::from_bits(0x4480_F0CF_064D_D592),
_ => f64::from_bits(0),
}
}
fn biased_fp_to_float<F: FloatExt>(x: BiasedFp) -> F {
let mut word = x.m;
word |= (x.p_biased as u64) << F::SIG_BITS;
F::from_u64_bits(word)
}
Exact native-call excerpt from crate/dec2flt/decimal.rs:
fn can_use_fast_path<F: Lemire>(&self) -> bool {
F::MIN_EXPONENT_FAST_PATH <= self.exponent
&& self.exponent <= F::MAX_EXPONENT_DISGUISED_FAST_PATH
&& self.mantissa <= F::MAX_MANTISSA_FAST_PATH
&& !self.many_digits
}
if !self.can_use_fast_path::<F>() {
return None;
}
let value = if self.exponent <= F::MAX_EXPONENT_FAST_PATH {
// normal fast path
let value = F::from_u64(self.mantissa);
if self.exponent < 0 {
// Explicit trait calls preserve Rust arithmetic and resolve
// the generic output type that Charon leaves ambiguous.
core::ops::Div::div(value, F::pow10_fast_path((-self.exponent) as _))
} else {
core::ops::Mul::mul(value, F::pow10_fast_path(self.exponent as _))
}
} else {
// disguised fast path
let shift = self.exponent - F::MAX_EXPONENT_FAST_PATH;
let mantissa = self.mantissa.checked_mul(INT_POW10[shift as usize])?;
if mantissa > F::MAX_MANTISSA_FAST_PATH {
return None;
}
core::ops::Mul::mul(
F::from_u64(mantissa),
F::pow10_fast_path(F::MAX_EXPONENT_FAST_PATH as _),
)
};
if self.negative {
Some(core::ops::Neg::neg(value))
} else {
Some(value)
}
The preceding can_use_fast_path body, together with
MAX_MANTISSA_FAST_PATH = 1 << SIG_TOTAL_BITS and SIG_TOTAL_BITS = 53 for f64,
requires the exponent to lie between -22 and 37, the input mantissa to be at
most 2^53, and many_digits to be false. Consequently an ordinary arithmetic
call has a from_u64 operand in 0..=2^53. In its negative-exponent arm,
`-self.exponent` lies in 1..=22; in its nonnegative arm, `self.exponent` lies
in 0..=22. The disguised branch checks its multiplied mantissa against 2^53
before from_u64 and uses table index 22. The paired statement
Binary64NativeCallDomain does not assert this source reachability. It says
conditionally that a from_u64 argument at most 2^53 succeeds with a finite,
non-NaN word and that a table index at most 22 succeeds with a positive,
nonzero, finite, non-NaN word. Applying that conditional statement to the
guards just derived establishes those properties for the actual ordinary and
disguised calls, and in particular establishes that every executed divisor is
nonzero.
Exact special-value excerpt from crate/dec2flt/parse.rs:
let float = match (register, len) {
(INF_3, 3) => F::INFINITY,
(INF_8, 8) => F::INFINITY,
(NAN, 3) => F::NAN,
_ => return None,
};
if negative { Some(-float) } else { Some(float) }
Thus the executed special route is INFINITY or NAN followed by conditional
negation; it does not select NEG_INFINITY or NEG_NAN directly.
The number helper has the exact source body
pub fn parse_number(s: &[u8]) -> Option<Decimal> {
if let Some((float, rest)) = parse_partial_number(s) {
if rest == s.len() {
return Some(float);
}
}
None
}
It returns only the Decimal produced by parse_partial_number; there is no
float type parameter or float operation at this boundary.
The integer-tier helper has the source type and exact executable excerpts
below (long explanatory comments are elided). In particular it returns a raw
BiasedFp and contains no from_u64 cast, primitive float multiplication,
division, negation, or from_bits call:
pub fn compute_float<F: Float>(q: i64, mut w: u64) -> BiasedFp {
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let fp_error = BiasedFp::zero_pow2(-1);
// Short-circuit if the value can only be a literal 0 or infinity.
if w == 0 || q < F::SMALLEST_POWER_OF_TEN as i64 {
return fp_zero;
} else if q > F::LARGEST_POWER_OF_TEN as i64 {
return fp_inf;
}
// Normalize our significant digits, so the most-significant bit is set.
let lz = w.leading_zeros();
w <<= lz;
let (lo, hi) = compute_product_approx(q, w, F::SIG_BITS as usize + 3);
if lo == 0xFFFF_FFFF_FFFF_FFFF {
let inside_safe_exponent = (q >= -27) && (q <= 55);
if !inside_safe_exponent {
return fp_error;
}
}
let upperbit = (hi >> 63) as i32;
let mut mantissa = hi >> (upperbit + 64 - F::SIG_BITS as i32 - 3);
let mut power2 = power(q as i32) + upperbit - lz as i32 - F::EXP_MIN + 1;
if power2 <= 0 {
if -power2 + 1 >= 64 {
// Have more than 64 bits below the minimum exponent, must be 0.
return fp_zero;
}
// Have a subnormal value.
mantissa >>= -power2 + 1;
mantissa += mantissa & 1;
mantissa >>= 1;
power2 = (mantissa >= (1_u64 << F::SIG_BITS)) as i32;
return BiasedFp { m: mantissa, p_biased: power2 };
}
// Need to handle rounding ties. Normally, we need to round up,
// but if we fall right in between and we have an even basis, we
// need to round down.
if lo <= 1
&& q >= F::MIN_EXPONENT_ROUND_TO_EVEN as i64
&& q <= F::MAX_EXPONENT_ROUND_TO_EVEN as i64
&& mantissa & 0b11 == 0b01
&& (mantissa << (upperbit + 64 - F::SIG_BITS as i32 - 3)) == hi
{
// Zero the lowest bit, so we don't round up.
mantissa &= !1_u64;
}
// Round-to-even, then shift the significant digits into place.
mantissa += mantissa & 1;
mantissa >>= 1;
if mantissa >= (2_u64 << F::SIG_BITS) {
// Rounding up overflowed, so the carry bit is set. Set the
// mantissa to 1 (only the implicit, hidden bit is set) and
// increase the exponent.
mantissa = 1_u64 << F::SIG_BITS;
power2 += 1;
}
// Zero out the hidden bit.
mantissa &= !(1_u64 << F::SIG_BITS);
if power2 >= F::INFINITE_POWER {
// Exponent is above largest normal value, must be infinite.
return fp_inf;
}
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact slow-tier source body from crate/dec2flt/slow.rs:
pub(crate) fn parse_long_mantissa<F: Float>(s: &[u8]) -> BiasedFp {
const MAX_SHIFT: usize = 60;
const NUM_POWERS: usize = 19;
const POWERS: [u8; 19] =
[0, 3, 6, 9, 13, 16, 19, 23, 26, 29, 33, 36, 39, 43, 46, 49, 53, 56, 59];
let get_shift = |n| {
if n < NUM_POWERS { POWERS[n] as usize } else { MAX_SHIFT }
};
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let mut d = parse_decimal_seq(s);
// Short-circuit if the value can only be a literal 0 or infinity.
if d.num_digits == 0 || d.decimal_point < -324 {
return fp_zero;
} else if d.decimal_point >= 310 {
return fp_inf;
}
let mut exp2 = 0_i32;
let mut loop_result = None;
// Shift right toward (1/2 ... 1].
while d.decimal_point > 0 && loop_result.is_none() {
let n = d.decimal_point as usize;
let shift = get_shift(n);
d.right_shift(shift);
if d.decimal_point < -DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_zero);
} else {
exp2 += shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// Shift left toward (1/2 ... 1].
while d.decimal_point <= 0 && loop_result.is_none() {
let shift = if d.decimal_point == 0 {
match d.digits[0] {
digit if digit >= 5 => break,
0 | 1 => 2,
_ => 1,
}
} else {
get_shift((-d.decimal_point) as _)
};
d.left_shift(shift);
if d.decimal_point > DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_inf);
} else {
exp2 -= shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// We are now in the range [1/2 ... 1] but the binary format uses [1 ... 2].
exp2 -= 1;
while F::EXP_MIN > exp2 {
let mut n = (F::EXP_MIN - exp2) as usize;
if n > MAX_SHIFT {
n = MAX_SHIFT;
}
d.right_shift(n);
exp2 += n as i32;
}
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
// Shift the decimal to the hidden bit, and then round the value
// to get the high mantissa+1 bits.
d.left_shift(F::SIG_BITS as usize + 1);
let mut mantissa = d.round();
if mantissa >= (1_u64 << (F::SIG_BITS + 1)) {
// Rounding up overflowed to the carry bit, need to
// shift back to the hidden bit.
d.right_shift(1);
exp2 += 1;
mantissa = d.round();
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
}
let mut power2 = exp2 - F::EXP_MIN + 1;
if mantissa < (1_u64 << F::SIG_BITS) {
power2 -= 1;
}
// Zero out all the bits above the explicit mantissa bits.
mantissa &= (1_u64 << F::SIG_BITS) - 1;
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact final numeric-sign excerpt from crate/dec2flt/mod.rs:
let assembled_word = fp.m | ((fp.p_biased as u64) << F::SIG_BITS);
let assembly_result = biased_fp_to_float::<F>(fp);
let lexical_sign_applied = num.negative;
let result = if lexical_sign_applied {
core::ops::Neg::neg(assembly_result)
} else {
assembly_result
};
Thus a numeric execution that reaches the integer/slow selection route
assembles its selected pair with from_bits through biased_fp_to_float and only
then conditionally negates it. A successful try_fast_path returns earlier and
does not perform this assembly. compute_float and parse_long_mantissa produce
raw BiasedFp pairs and do not call from_u64, primitive float multiplication,
division, negation, or from_bits; they do, however, execute constants derived
from SIG_TOTAL_BITS before producing those pairs.
Retained structural-boundary evidence
-------------------------------------
Several adjacent structural bindings cite this same evidence record. Their
pinned library source identities are:
core/src/num/mod.rs
f0820f9dfb94999440c8cb4a349736fa21df7e5668e19b6b49e016ff67c05ce3
core/src/option.rs
7cf61204b05d98a95bc2e322d5fbfc1f4f91505109971917d9a7fb47151c50e6
core/src/slice/mod.rs
354992a6a3d69a0185eef9044a07ea5180e767bdb467aef55e69ee3d44317840
core/src/str/mod.rs
284b4c147b5d0497ce9146f6b96e564f196aed10411a62cdccf5fc5243d40f78
Exact ASCII-digit body from core/src/num/mod.rs:
pub const fn is_ascii_digit(&self) -> bool {
matches!(*self, b'0'..=b'9')
}
Exact Option control-flow bodies from core/src/option.rs:
fn branch(self) -> ControlFlow<Self::Residual, Self::Output> {
match self {
Some(v) => ControlFlow::Continue(v),
None => ControlFlow::Break(None),
}
}
fn from_residual(residual: Option<convert::Infallible>) -> Self {
match residual {
None => None,
}
}
Exact slice observation bodies from core/src/slice/mod.rs:
pub const fn first(&self) -> Option<&T> {
if let [first, ..] = self { Some(first) } else { None }
}
pub const fn split_first(&self) -> Option<(&T, &[T])> {
if let [first, tail @ ..] = self { Some((first, tail)) } else { None }
}
Exact string-byte body from core/src/str/mod.rs:
pub const fn as_bytes(&self) -> &[u8] {
// SAFETY: const sound because we transmute two types with the same layout
unsafe { mem::transmute(self) }
}
reference/model-evidence/binary64-probe.rs
#![feature(float_masks)]
use std::num::FpCategory;
fn bits(label: &str, value: f64) {
println!("{label}={:016x}", value.to_bits());
}
fn main() {
println!("target_arch={}", std::env::consts::ARCH);
println!("mantissa_digits={}", f64::MANTISSA_DIGITS);
println!("exponent_mask={:016x}", f64::EXPONENT_MASK);
println!("mantissa_mask={:016x}", f64::MANTISSA_MASK);
bits("nan", f64::NAN);
bits("infinity", f64::INFINITY);
bits("neg_infinity", f64::NEG_INFINITY);
for (label, value) in [
("nan_category", f64::NAN),
("infinity_category", f64::INFINITY),
("zero_category", 0.0),
("subnormal_category", f64::from_bits(1)),
("normal_category", 1.0),
] {
let category = match value.classify() {
FpCategory::Nan => "Nan",
FpCategory::Infinite => "Infinite",
FpCategory::Zero => "Zero",
FpCategory::Subnormal => "Subnormal",
FpCategory::Normal => "Normal",
};
println!("{label}={category}");
}
let payload_nan_word = 0x7ff0_0000_0000_0001_u64;
println!(
"from_bits_to_bits={:016x}",
f64::from_bits(payload_nan_word).to_bits()
);
bits("neg_payload_nan", -f64::from_bits(payload_nan_word));
bits("neg_zero", -0.0);
bits("subnormal_tie_to_even_zero", f64::from_bits(1) * 0.5);
bits("subnormal_tie_to_even_two", f64::from_bits(3) * 0.5);
bits("normal_division", 1.0 / 10.0);
bits("mul_negative_zero", -0.0 * 2.0);
bits("div_negative_zero", -1.0 / f64::INFINITY);
bits("div_negative_infinity", 1.0 / -0.0);
bits("mul_overflow", f64::MAX * (1.0 + f64::EPSILON));
println!("mul_zero_infinity_is_nan={}", (0.0 * f64::INFINITY).is_nan());
println!("div_zero_zero_is_nan={}", (0.0_f64 / 0.0_f64).is_nan());
println!("mul_nan_is_nan={}", (f64::NAN * 1.0).is_nan());
bits("cast_2_pow_53", (1_u64 << 53) as f64);
bits("cast_2_pow_53_plus_1", ((1_u64 << 53) + 1) as f64);
}
Requirements depending on this item (32)
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
All 32 entries
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
- Exponent agreement
- Correctness or defer
- Native correctness or defer
- Numeric acceptance
- Accumulated-value diagnostic
- Record bounds
- Invalid rejection
- Accumulated-value diagnostic
- Equal-target bridge
- Exact rounding
- Infinity
- Invalid rejection
- NaN acceptance
- No spurious NaNs
- Numeric acceptance
- Numeric sign
- Selected exponent range
- Selected magnitude sign
- Signed zero
- Totality
- Rounding determinism
- Rounding totality
- Full-significand diagnostic
- Infinity
- NaN
- Rejection
These requirements are linked to this item through the declared dependencies of their proofs.
Record details
| Record source | Tablet/model-support.json |
|---|---|
| Kind | opaque external binding |
| Preservation assessment origin | VerifierPanel |
| Preservation fingerprint | preservation-v1:07ec773b7cceaeb22f3abcef0c1f561b3f6b2cc8373eef16ca32ce0c06d670a0 |
| Preservation current fingerprint | preservation-v1:07ec773b7cceaeb22f3abcef0c1f561b3f6b2cc8373eef16ca32ce0c06d670a0 |
| Preservation freshness | matches current fingerprint |
| Correspondence approved fingerprint | {"own_tex":"aa1fc6e8f0864cd1c431bceb74254faac1595cfb2182d5e273fbaa8a3f600efc","lean_semantic_closure":"2d851ed7d360abeae832a796cbb23db27ed267a307678d5ac068e41c140e4001","preamble_tex":""} |
| Correspondence current fingerprint | {"own_tex":"aa1fc6e8f0864cd1c431bceb74254faac1595cfb2182d5e273fbaa8a3f600efc","lean_semantic_closure":"2d851ed7d360abeae832a796cbb23db27ed267a307678d5ac068e41c140e4001","preamble_tex":""} |
| Correspondence freshness | matches current fingerprint |
Exact preservation assessment
{
"status": "VerifierPass",
"origin": "VerifierPanel",
"fingerprints": {
"own_tex_hash": "ce2792b4f7773833b049de32d7242e42338d9cdc1091d8c66c37751ec72072e5",
"dep_statement_hashes": {},
"combined_sound_fp": "preservation-v1:07ec773b7cceaeb22f3abcef0c1f561b3f6b2cc8373eef16ca32ce0c06d670a0"
},
"lane_votes": {
"v1": "Pass"
},
"reviewer_action_id": null
}Exact source record
{
"name": "core.num.U8.is_ascii_digit",
"extracted_signature": ": Std.U8 → Result Bool",
"rust_symbol": "core::num::{u8}::is_ascii_digit",
"raw_declaration_sha256": "fae6cbf092f55de23a7159eb77782a6336592a4609f96942008513624ed2033b",
"node": "ModelU8IsAsciiDigit",
"declaration": "dec2flt_model.ModelU8IsAsciiDigit"
}Captured evidence identities
[
{
"path": "reference/model-evidence/binary64-boundary.txt",
"sha256": "a17d82e7f789ce7f1fbb3922a66ec8806999e526532d637605263882d37b7abf",
"cited_by": [
"Tablet/ModelU8IsAsciiDigit.tex",
"Tablet/model-support.json"
]
},
{
"path": "reference/model-evidence/binary64-probe.rs",
"sha256": "68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e",
"cited_by": [
"reference/model-evidence/binary64-boundary.txt"
]
}
]core::ops::arith::{impl core::ops::arith::Mul<f64, f64> for f64}::mul
Inspect related source (1)
- mul · core/src/ops/arith.rs:350 Rust library
Related source and models come from the extraction records and declared dependencies.
| Rust item | core::ops::arith::{impl core::ops::arith::Mul<f64, f64> for f64}::mul |
|---|---|
| Recorded source | /rustc/library/core/src/ops/arith.rs |
| Lines | 350:12–350:41 |
The related-source link includes this operation’s Rust standard-library implementation.
Opaque extraction signature
: F64 → F64 → Result F64Lean definition
Trellis authored this Lean model for an operation outside the mechanical extraction. Modeling choices explains its behavior and review.
import Tablet.Binary64ModelDefault
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: ModelF64Mul]
def ModelF64Mul : F64 -> F64 -> Result F64 :=
-- BODY
Binary64ModelDefault.mul
end dec2flt_model
Why this model is faithful
Definition
Preservation argument
Claim
Proof
Authored arguments for individual requirements
Requirement: assembly correspondence
biased_fp_to_float, whose source body only casts the
biased exponent, shifts it, ORs it with the mantissa, and calls
from_u64_bits; it never invokes binary64 multiplication, as recorded
in reference/model-evidence/binary64-boundary.txt. This binding
therefore cannot affect the claimed assembled word.Requirement: classification determinism
Requirement: classification significand digit
Requirement: classification totality
Requirement: dispatch abstract composition
Requirement: dispatch component compliance
try_fast_path. The source guards, recorded in
reference/model-evidence/binary64-boundary.txt, respectively give
\mathit{mantissa}\leq2^{53} with a power-table index in 0,\ldots,22, or a
successfully checked multiplied mantissa at most 2^{53} with table index
22. By Binary64NativeCallDomain, both multiplication operands are
finite and non-NaN in either arm. The exact finite-operand multiplication
clause above therefore preserves the native component return and hence its
agreement with the contract instance; all other component paths make no
binary64 multiplication call.Requirement: exponent value agreement
Requirement: integer correct or defer
compute_float. Its source body performs integer
table arithmetic and returns a raw BiasedFp; the exact source excerpt
in reference/model-evidence/binary64-boundary.txt records that it
contains no primitive float multiplication. This binding therefore cannot
change either deferral or the returned raw pair.Requirement: native correct or defer
can_use_fast_path guards in
reference/model-evidence/binary64-boundary.txt give
\mathit{mantissa}\leq2^{53} and 0\leq\mathit{exponent}\leq22. In the
disguised arm, checked_mul must succeed and the resulting mantissa is
explicitly checked to be at most 2^{53} before multiplication by table entry
22. Applying Binary64NativeCallDomain gives finite non-NaN
operands in both arms, so the exact finite-operand multiplication clause above
agrees with the source on every executed binary64 multiplication; the
negative-exponent ordinary arm divides instead.Requirement: number helper acceptance
parse_number. Its recorded source body only
accepts a complete Decimal returned by
parse_partial_number; it has no float type parameter and executes no
float operation, including multiplication
(reference/model-evidence/binary64-boundary.txt).Requirement: number helper accumulated value
Decimal record returned by
parse_number. The recorded source boundary shows that this helper
has no float type parameter or float operation, so no binary64 multiplication
can affect the record or its represented interval
(reference/model-evidence/binary64-boundary.txt).Requirement: number helper record bounds
parse_number returns its
Decimal record. As its exact source body in
reference/model-evidence/binary64-boundary.txt shows, it invokes
no float conversion or arithmetic, hence no binary64 multiplication can
affect the record's sign or mantissa bound.Requirement: number helper rejection
parse_number: the helper
returns None unless parse_partial_number consumed the
entire slice. The recorded body has no float type parameter or float
operation, so this multiplication binding is not reached
(reference/model-evidence/binary64-boundary.txt).Requirement: parser accumulated rounding
Requirement: parser equal target rounding
Requirement: parser exact rounding
Requirement: parser infinity
None and the
dispatcher takes the special-helper branch. The source excerpt in
reference/model-evidence/binary64-boundary.txt shows that this
branch selects the infinity constant and conditionally negates it; it never
calls try_fast_path or binary64 multiplication.Requirement: parser invalid rejection
parse_number and then
parse_inf_nan both return None, after which the dispatcher
returns the parsing error. The former has no float operation and the latter
only selects a special constant and conditionally negates on success, as
recorded in reference/model-evidence/binary64-boundary.txt; this
branch never reaches try_fast_path or binary64 multiplication.Requirement: parser nan acceptance
None and the dispatcher
takes the special-helper branch. That branch selects the NaN constant and
conditionally negates it, as recorded in
reference/model-evidence/binary64-boundary.txt; it does not call
try_fast_path or binary64 multiplication, and no raw-word identity for an
arithmetic NaN is asserted.Requirement: parser non nan results
Requirement: parser numeric acceptance
Requirement: parser numeric sign
Requirement: parser selected exponent
Assembled trace. The source dispatcher
records such a trace only after try_fast_path returned
None; an executed float multiplication belongs to a successful
ordinary or disguised native arm and returns directly as Some.
Thus no execution relevant to the selected-pair exponent observation executes
binary64 multiplication, as the dispatcher excerpt in
reference/model-evidence/binary64-boundary.txt records.Requirement: parser selected magnitude sign
Assembled route, reached after the native shortcut returned
None. Every executed float multiplication is in an ordinary or
disguised native arm that returns its value directly rather than selecting or
assembling a raw pair. Consequently this binding cannot affect the selected
pair or its clear sign bit
(reference/model-evidence/binary64-boundary.txt).Requirement: parser signed zero
Requirement: parser totality
checked_mul succeeded and the
resulting mantissa passed the 2^{53} bound, and it uses table index 22.
Applying Binary64NativeCallDomain gives finite non-NaN operands in
both arms, so the exact finite-operand multiplication clause above supplies
the same normal source result. Every other dispatcher branch makes no float
multiplication call, so the binding introduces no panic or divergence on any
source input.Requirement: rounding determinism
Requirement: rounding totality
Requirement: slow accumulated rounding
parse_long_mantissa. Its recorded source body uses
decimal-sequence shifts and integer rounding and returns a raw
BiasedFp; it contains no primitive float multiplication or other
float arithmetic (reference/model-evidence/binary64-boundary.txt).
Thus this binding cannot affect its returned pair.Requirement: special helper infinity
parse_inf_nan. For an infinity keyword its exact
source path selects the infinity constant and conditionally applies negation;
it contains no binary64 multiplication call, as recorded in
reference/model-evidence/binary64-boundary.txt.Requirement: special helper nan
parse_inf_nan. For a NaN keyword its exact source
path selects the NaN constant and conditionally applies negation; it contains
no binary64 multiplication call, as recorded in
reference/model-evidence/binary64-boundary.txt. This application
asserts only the NaN category, not equality of any arithmetic NaN raw word.Requirement: special helper rejection
parse_inf_nan; an unrecognized keyword takes its
None branch before any special constant or negation is returned. The
recorded source body contains no binary64 multiplication on either success or
rejection
(reference/model-evidence/binary64-boundary.txt).Recorded review
| Correspondence | Pass |
|---|---|
| Preservation | VerifierPass |
ModelF64Mul · Lean checked
Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
reference/model-evidence/binary64-boundary.txt
Primary evidence for the binary64 boundary
==========================================
Scope and identities
--------------------
This record concerns the frozen x86_64-unknown-linux-gnu extraction, the
adapted Rust crate retained in this repository, and the installed toolchain
named by modeling-input/SETUP.md. The probe source is retained at
reference/model-evidence/binary64-probe.rs; no scratch source is required to
reproduce it.
Toolchain executable:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
Target:
x86_64-unknown-linux-gnu
rustc executable SHA-256:
162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
Probe source SHA-256:
68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
Compiled probe SHA-256:
f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
Frozen generated.lean SHA-256:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692
Frozen modeling-input/manifest.json SHA-256:
2fc182c0c7acccad30c449ca349b999759b84e8ed4ec9d590e8295e43eeec077
Approved Binary64ModelDefault.lean SHA-256 at the time of this record:
03ae48fb631e6242bd21bf95d0481b66acae05f8cab343c7ab279b3c116538a3
Exact reproduction commands
---------------------------
Run from the repository root:
R=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
P=reference/model-evidence/binary64-probe.rs
B=.trellis/scratch/binary64-probe
"$R" --version --verbose
sha256sum "$R"
sha256sum "$P"
"$R" --target x86_64-unknown-linux-gnu -C opt-level=0 "$P" -o "$B"
sha256sum "$B"
"$B"
Raw output
----------
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
rustc_sha256=162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
probe_sha256=68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
binary_sha256=f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
target_arch=x86_64
mantissa_digits=53
exponent_mask=7ff0000000000000
mantissa_mask=000fffffffffffff
nan=7ff8000000000000
infinity=7ff0000000000000
neg_infinity=fff0000000000000
nan_category=Nan
infinity_category=Infinite
zero_category=Zero
subnormal_category=Subnormal
normal_category=Normal
from_bits_to_bits=7ff0000000000001
neg_payload_nan=fff0000000000001
neg_zero=8000000000000000
subnormal_tie_to_even_zero=0000000000000000
subnormal_tie_to_even_two=0000000000000002
normal_division=3fb999999999999a
mul_negative_zero=8000000000000000
div_negative_zero=8000000000000000
div_negative_infinity=fff0000000000000
mul_overflow=7ff0000000000000
mul_zero_infinity_is_nan=true
div_zero_zero_is_nan=true
mul_nan_is_nan=true
cast_2_pow_53=4340000000000000
cast_2_pow_53_plus_1=4340000000000000
Pinned Rust library sources
---------------------------
The installed sources below belong to the same named toolchain. Their
SHA-256 identities are:
core/src/primitive_docs.rs
c4b8627dd67d5dac8f383f383a9e7ff1229ea43e7599610fc61988694cf0f3e5
core/src/num/f64.rs
84540a6a59e347c63caabe12cf895ba1239c76a50682471567007138fac1c618
core/src/clone.rs
23f9cfc80347fde6b8457d46fbf7a2b8d9f34c8c58601b0b6f714ca2f6d1976b
The exact relevant text of core/src/primitive_docs.rs is:
#[rustc_doc_primitive = "f64"]
#[doc(alias = "double")]
/// A 64-bit floating-point type (specifically, the "binary64" type defined in IEEE 754-2008).
///
/// This type is very similar to [`prim@f32`], but has increased precision by using twice as many
/// bits. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on double-precision
/// values][wikipedia] for more information.
The referenced primitive-f32 documentation supplies the common primitive
floating-point operation rules quoted next:
/// - −0.0: IEEE 754 floating-point numbers have a bit that indicates their sign, so −0.0 is a
/// possible value. For comparison −0.0 = +0.0, but floating-point operations can carry
/// the sign bit through arithmetic operations. This means −0.0 × +0.0 produces −0.0 and
/// a negative number rounded to a value smaller than a float can represent also produces −0.0.
/// - [∞](#associatedconstant.INFINITY) and
/// [−∞](#associatedconstant.NEG_INFINITY): these result from calculations
/// like `1.0 / 0.0`.
///
/// When a primitive operation (addition, subtraction, multiplication, or
/// division) is performed on this type, the result is rounded according to the
/// roundTiesToEven direction defined in IEEE 754-2008. That means:
///
/// - The result is the representable value closest to the true value, if there
/// is a unique closest representable value.
/// - If the true value is exactly half-way between two representable values,
/// the result is the one with an even least-significant binary digit.
/// - If the true value's magnitude is ≥ `f32::MAX` + 2<sup>(`f32::MAX_EXP` −
/// `f32::MANTISSA_DIGITS` − 1)</sup>, the result is ∞ or −∞ (preserving the
/// true value's sign).
The same file explicitly separates arithmetic NaN choice from exact bitwise
operations; its exact relevant text is:
/// The rules for NaN values differ between *arithmetic* and *non-arithmetic* (or "bitwise")
/// operations. The non-arithmetic operations are unary `-`, `abs`, `copysign`, `signum`,
/// `{to,from}_bits`, `{to,from}_{be,le,ne}_bytes` and `is_sign_{positive,negative}`. These
/// operations are guaranteed to exactly preserve the bit pattern of their input except for possibly
/// changing the sign bit.
///
/// The following rules apply when a NaN value is returned from an arithmetic operation:
/// - The result has a non-deterministic sign.
/// - The quiet bit and payload are non-deterministically chosen from
/// the following set of options:
///
/// - **Preferred NaN**: The quiet bit is set and the payload is all-zero.
/// - **Quieting NaN propagation**: The quiet bit is set and the payload is copied from any input
/// operand that is a NaN. If the inputs and outputs do not have the same payload size (i.e., for
/// `as` casts), then
/// - If the output is smaller than the input, low-order bits of the payload get dropped.
/// - If the output is larger than the input, the payload gets filled up with 0s in the low-order
/// bits.
/// - **Unchanged NaN propagation**: The quiet bit and payload are copied from any input operand
/// that is a NaN. If the inputs and outputs do not have the same size (i.e., for `as` casts), the
/// same rules as for "quieting NaN propagation" apply, with one caveat: if the output is smaller
/// than the input, dropping the low-order bits may result in a payload of 0; a payload of 0 is not
/// possible with a signaling NaN (the all-0 significand encodes an infinity) so unchanged NaN
/// propagation cannot occur with some inputs.
/// - **Target-specific NaN**: The quiet bit is set and the payload is picked from a target-specific
/// set of "extra" possible NaN payloads. The set can depend on the input operand values.
/// See the table below for the concrete NaNs this set contains on various targets.
///
/// | `target_arch` | Extra payloads possible on this platform |
/// |---------------|------------------------------------------|
/// | `aarch64`, `arm`, `arm64ec`, `loongarch64`, `powerpc` (except when `target_abi = "spe"`), `powerpc64`, `riscv32`, `riscv64`, `s390x`, `x86`, `x86_64` | None |
Thus the model's preferred quiet NaN is one permitted result whenever
multiplication or division returns NaN. This does not claim that arbitrary
Rust arithmetic NaNs have those exact bits. By contrast, unary negation and
bit conversion must preserve all non-sign bits exactly, including for every
NaN payload.
The exact relevant declarations in core/src/num/f64.rs are:
pub const MANTISSA_DIGITS: u32 = 53;
pub const NAN: f64 = 0.0_f64 / 0.0_f64;
pub const INFINITY: f64 = 1.0_f64 / 0.0_f64;
pub const NEG_INFINITY: f64 = -1.0_f64 / 0.0_f64;
pub const SIGN_MASK: u64 = 0x8000_0000_0000_0000;
pub const EXPONENT_MASK: u64 = 0x7ff0_0000_0000_0000;
pub const MANTISSA_MASK: u64 = 0x000f_ffff_ffff_ffff;
pub const fn classify(self) -> FpCategory {
// We used to have complicated logic here that avoids the simple bit-based tests to work
// around buggy codegen for x87 targets (see
// https://github.com/rust-lang/rust/issues/114479). However, some LLVM versions later, none
// of our tests is able to find any difference between the complicated and the naive
// version, so now we are back to the naive version.
let b = self.to_bits();
match (b & Self::MANTISSA_MASK, b & Self::EXPONENT_MASK) {
(0, Self::EXPONENT_MASK) => FpCategory::Infinite,
(_, Self::EXPONENT_MASK) => FpCategory::Nan,
(0, 0) => FpCategory::Zero,
(_, 0) => FpCategory::Subnormal,
_ => FpCategory::Normal,
}
}
pub const fn to_bits(self) -> u64 {
// SAFETY: `u64` is a plain old datatype so we can always transmute to it.
unsafe { mem::transmute(self) }
}
pub const fn from_bits(v: u64) -> Self {
// It turns out the safety issues with sNaN were overblown! Hooray!
// SAFETY: `u64` is a plain old datatype so we can always transmute from it.
unsafe { mem::transmute(v) }
}
The exact scalar clone body in core/src/clone.rs is:
impl const Clone for $t {
#[inline(always)]
fn clone(&self) -> Self {
*self
}
}
Frozen adapted source
---------------------
The relevant retained source file hashes are:
crate/traits.rs
9013270fb846edcb0bdf2abd0353f575fdd727974cba9e89bdab8bb4c2b4f0bf
crate/dec2flt/mod.rs
b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012
crate/dec2flt/parse.rs
50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f
crate/dec2flt/decimal.rs
633658be803b7369b18feb098a8aa1b5f714a933d3b79ecbc4899a1b05f35beb
crate/dec2flt/lemire.rs
fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1
crate/dec2flt/slow.rs
93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485
Exact constant and bit-conversion excerpt from crate/traits.rs:
impl Float for f64 {
type Int = u64;
const INFINITY: Self = Self::INFINITY;
const NEG_INFINITY: Self = Self::NEG_INFINITY;
const NAN: Self = Self::NAN;
// Bit-identical to the upstream `-f64::NAN`, without the unsupported
// compile-time float negation.
const NEG_NAN: Self = f64::from_bits(0xFFF8_0000_0000_0000);
const BITS: u32 = 64;
const SIG_TOTAL_BITS: u32 = Self::MANTISSA_DIGITS;
const EXP_MASK: Self::Int = Self::EXPONENT_MASK;
const SIG_MASK: Self::Int = Self::MANTISSA_MASK;
fn to_bits(self) -> Self::Int {
self.to_bits()
}
fn classify(self) -> FpCategory {
self.classify()
}
}
impl FloatExt for f64 {
#[inline]
fn from_u64_bits(v: u64) -> Self {
f64::from_bits(v)
}
Exact derived-constant defaults from crate/traits.rs:
/// The number of bits in the significand, *excluding* the hidden bit.
const SIG_BITS: u32 = Self::SIG_TOTAL_BITS - 1;
/// Number of bits in the exponent.
const EXP_BITS: u32 = Self::BITS - Self::SIG_BITS - 1;
/// The saturated (maximum bitpattern) value of the exponent, i.e. the infinite
/// representation.
///
/// This shifted fully right, use `EXP_MASK` for the shifted value.
const EXP_SAT: u32 = (1 << Self::EXP_BITS) - 1;
/// Signed version of `EXP_SAT` since we convert a lot.
const INFINITE_POWER: i32 = Self::EXP_SAT as i32;
/// The exponent bias value. This is also the maximum value of the exponent.
const EXP_BIAS: u32 = Self::EXP_SAT >> 1;
/// Minimum exponent value of normal values.
const EXP_MIN: i32 = -(Self::EXP_BIAS as i32 - 1);
Together with the f64-instance lines `BITS = 64` and
`SIG_TOTAL_BITS = Self::MANTISSA_DIGITS` in the preceding excerpt, these
defaults derive SIG_BITS, EXP_MIN, and INFINITE_POWER from the primitive
mantissa-digit constant rather than introducing independent parameters.
Exact checked cast excerpt from crate/dec2flt/mod.rs:
#[inline]
// This method is precisely the source `u64 as f64` primitive conversion.
// Aeneas cannot translate that cast; opacity is confined to the cast while
// the fast-path algorithm, its range proof obligation, and all calls stay
// visible in the extracted model.
#[charon::opaque]
fn from_u64(v: u64) -> Self {
debug_assert!(v <= Self::MAX_MANTISSA_FAST_PATH);
v as _
}
Here MAX_MANTISSA_FAST_PATH is the retained default 1 << 53. Therefore the
source succeeds only through the modeled branch v <= 2^53 in this debug
configuration; above it the debug assertion fails before the cast. On the
successful branch every integer is exactly representable, so the source cast
and the model rounder return the same word.
Exact power-table and assembly excerpts from crate/dec2flt/mod.rs:
/// Maximum mantissa for the fast-path (`1 << 53` for f64).
const MAX_MANTISSA_FAST_PATH: u64 = 1 << Self::SIG_TOTAL_BITS;
const MAX_EXPONENT_FAST_PATH: i64 = 22;
const MIN_EXPONENT_FAST_PATH: i64 = -Self::MAX_EXPONENT_FAST_PATH;
const MAX_EXPONENT_DISGUISED_FAST_PATH: i64 = 37;
fn pow10_fast_path(exponent: usize) -> Self {
// These bit patterns are exactly the source table's rounded binary64
// literals. The match is the same masked lookup; it merely keeps float
// constants out of Aeneas's unsupported constant interpreter.
match exponent & 31 {
0 => f64::from_bits(0x3FF0_0000_0000_0000),
1 => f64::from_bits(0x4024_0000_0000_0000),
2 => f64::from_bits(0x4059_0000_0000_0000),
3 => f64::from_bits(0x408F_4000_0000_0000),
4 => f64::from_bits(0x40C3_8800_0000_0000),
5 => f64::from_bits(0x40F8_6A00_0000_0000),
6 => f64::from_bits(0x412E_8480_0000_0000),
7 => f64::from_bits(0x4163_12D0_0000_0000),
8 => f64::from_bits(0x4197_D784_0000_0000),
9 => f64::from_bits(0x41CD_CD65_0000_0000),
10 => f64::from_bits(0x4202_A05F_2000_0000),
11 => f64::from_bits(0x4237_4876_E800_0000),
12 => f64::from_bits(0x426D_1A94_A200_0000),
13 => f64::from_bits(0x42A2_309C_E540_0000),
14 => f64::from_bits(0x42D6_BCC4_1E90_0000),
15 => f64::from_bits(0x430C_6BF5_2634_0000),
16 => f64::from_bits(0x4341_C379_37E0_8000),
17 => f64::from_bits(0x4376_3457_85D8_A000),
18 => f64::from_bits(0x43AB_C16D_674E_C800),
19 => f64::from_bits(0x43E1_58E4_6091_3D00),
20 => f64::from_bits(0x4415_AF1D_78B5_8C40),
21 => f64::from_bits(0x444B_1AE4_D6E2_EF50),
22 => f64::from_bits(0x4480_F0CF_064D_D592),
_ => f64::from_bits(0),
}
}
fn biased_fp_to_float<F: FloatExt>(x: BiasedFp) -> F {
let mut word = x.m;
word |= (x.p_biased as u64) << F::SIG_BITS;
F::from_u64_bits(word)
}
Exact native-call excerpt from crate/dec2flt/decimal.rs:
fn can_use_fast_path<F: Lemire>(&self) -> bool {
F::MIN_EXPONENT_FAST_PATH <= self.exponent
&& self.exponent <= F::MAX_EXPONENT_DISGUISED_FAST_PATH
&& self.mantissa <= F::MAX_MANTISSA_FAST_PATH
&& !self.many_digits
}
if !self.can_use_fast_path::<F>() {
return None;
}
let value = if self.exponent <= F::MAX_EXPONENT_FAST_PATH {
// normal fast path
let value = F::from_u64(self.mantissa);
if self.exponent < 0 {
// Explicit trait calls preserve Rust arithmetic and resolve
// the generic output type that Charon leaves ambiguous.
core::ops::Div::div(value, F::pow10_fast_path((-self.exponent) as _))
} else {
core::ops::Mul::mul(value, F::pow10_fast_path(self.exponent as _))
}
} else {
// disguised fast path
let shift = self.exponent - F::MAX_EXPONENT_FAST_PATH;
let mantissa = self.mantissa.checked_mul(INT_POW10[shift as usize])?;
if mantissa > F::MAX_MANTISSA_FAST_PATH {
return None;
}
core::ops::Mul::mul(
F::from_u64(mantissa),
F::pow10_fast_path(F::MAX_EXPONENT_FAST_PATH as _),
)
};
if self.negative {
Some(core::ops::Neg::neg(value))
} else {
Some(value)
}
The preceding can_use_fast_path body, together with
MAX_MANTISSA_FAST_PATH = 1 << SIG_TOTAL_BITS and SIG_TOTAL_BITS = 53 for f64,
requires the exponent to lie between -22 and 37, the input mantissa to be at
most 2^53, and many_digits to be false. Consequently an ordinary arithmetic
call has a from_u64 operand in 0..=2^53. In its negative-exponent arm,
`-self.exponent` lies in 1..=22; in its nonnegative arm, `self.exponent` lies
in 0..=22. The disguised branch checks its multiplied mantissa against 2^53
before from_u64 and uses table index 22. The paired statement
Binary64NativeCallDomain does not assert this source reachability. It says
conditionally that a from_u64 argument at most 2^53 succeeds with a finite,
non-NaN word and that a table index at most 22 succeeds with a positive,
nonzero, finite, non-NaN word. Applying that conditional statement to the
guards just derived establishes those properties for the actual ordinary and
disguised calls, and in particular establishes that every executed divisor is
nonzero.
Exact special-value excerpt from crate/dec2flt/parse.rs:
let float = match (register, len) {
(INF_3, 3) => F::INFINITY,
(INF_8, 8) => F::INFINITY,
(NAN, 3) => F::NAN,
_ => return None,
};
if negative { Some(-float) } else { Some(float) }
Thus the executed special route is INFINITY or NAN followed by conditional
negation; it does not select NEG_INFINITY or NEG_NAN directly.
The number helper has the exact source body
pub fn parse_number(s: &[u8]) -> Option<Decimal> {
if let Some((float, rest)) = parse_partial_number(s) {
if rest == s.len() {
return Some(float);
}
}
None
}
It returns only the Decimal produced by parse_partial_number; there is no
float type parameter or float operation at this boundary.
The integer-tier helper has the source type and exact executable excerpts
below (long explanatory comments are elided). In particular it returns a raw
BiasedFp and contains no from_u64 cast, primitive float multiplication,
division, negation, or from_bits call:
pub fn compute_float<F: Float>(q: i64, mut w: u64) -> BiasedFp {
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let fp_error = BiasedFp::zero_pow2(-1);
// Short-circuit if the value can only be a literal 0 or infinity.
if w == 0 || q < F::SMALLEST_POWER_OF_TEN as i64 {
return fp_zero;
} else if q > F::LARGEST_POWER_OF_TEN as i64 {
return fp_inf;
}
// Normalize our significant digits, so the most-significant bit is set.
let lz = w.leading_zeros();
w <<= lz;
let (lo, hi) = compute_product_approx(q, w, F::SIG_BITS as usize + 3);
if lo == 0xFFFF_FFFF_FFFF_FFFF {
let inside_safe_exponent = (q >= -27) && (q <= 55);
if !inside_safe_exponent {
return fp_error;
}
}
let upperbit = (hi >> 63) as i32;
let mut mantissa = hi >> (upperbit + 64 - F::SIG_BITS as i32 - 3);
let mut power2 = power(q as i32) + upperbit - lz as i32 - F::EXP_MIN + 1;
if power2 <= 0 {
if -power2 + 1 >= 64 {
// Have more than 64 bits below the minimum exponent, must be 0.
return fp_zero;
}
// Have a subnormal value.
mantissa >>= -power2 + 1;
mantissa += mantissa & 1;
mantissa >>= 1;
power2 = (mantissa >= (1_u64 << F::SIG_BITS)) as i32;
return BiasedFp { m: mantissa, p_biased: power2 };
}
// Need to handle rounding ties. Normally, we need to round up,
// but if we fall right in between and we have an even basis, we
// need to round down.
if lo <= 1
&& q >= F::MIN_EXPONENT_ROUND_TO_EVEN as i64
&& q <= F::MAX_EXPONENT_ROUND_TO_EVEN as i64
&& mantissa & 0b11 == 0b01
&& (mantissa << (upperbit + 64 - F::SIG_BITS as i32 - 3)) == hi
{
// Zero the lowest bit, so we don't round up.
mantissa &= !1_u64;
}
// Round-to-even, then shift the significant digits into place.
mantissa += mantissa & 1;
mantissa >>= 1;
if mantissa >= (2_u64 << F::SIG_BITS) {
// Rounding up overflowed, so the carry bit is set. Set the
// mantissa to 1 (only the implicit, hidden bit is set) and
// increase the exponent.
mantissa = 1_u64 << F::SIG_BITS;
power2 += 1;
}
// Zero out the hidden bit.
mantissa &= !(1_u64 << F::SIG_BITS);
if power2 >= F::INFINITE_POWER {
// Exponent is above largest normal value, must be infinite.
return fp_inf;
}
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact slow-tier source body from crate/dec2flt/slow.rs:
pub(crate) fn parse_long_mantissa<F: Float>(s: &[u8]) -> BiasedFp {
const MAX_SHIFT: usize = 60;
const NUM_POWERS: usize = 19;
const POWERS: [u8; 19] =
[0, 3, 6, 9, 13, 16, 19, 23, 26, 29, 33, 36, 39, 43, 46, 49, 53, 56, 59];
let get_shift = |n| {
if n < NUM_POWERS { POWERS[n] as usize } else { MAX_SHIFT }
};
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let mut d = parse_decimal_seq(s);
// Short-circuit if the value can only be a literal 0 or infinity.
if d.num_digits == 0 || d.decimal_point < -324 {
return fp_zero;
} else if d.decimal_point >= 310 {
return fp_inf;
}
let mut exp2 = 0_i32;
let mut loop_result = None;
// Shift right toward (1/2 ... 1].
while d.decimal_point > 0 && loop_result.is_none() {
let n = d.decimal_point as usize;
let shift = get_shift(n);
d.right_shift(shift);
if d.decimal_point < -DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_zero);
} else {
exp2 += shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// Shift left toward (1/2 ... 1].
while d.decimal_point <= 0 && loop_result.is_none() {
let shift = if d.decimal_point == 0 {
match d.digits[0] {
digit if digit >= 5 => break,
0 | 1 => 2,
_ => 1,
}
} else {
get_shift((-d.decimal_point) as _)
};
d.left_shift(shift);
if d.decimal_point > DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_inf);
} else {
exp2 -= shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// We are now in the range [1/2 ... 1] but the binary format uses [1 ... 2].
exp2 -= 1;
while F::EXP_MIN > exp2 {
let mut n = (F::EXP_MIN - exp2) as usize;
if n > MAX_SHIFT {
n = MAX_SHIFT;
}
d.right_shift(n);
exp2 += n as i32;
}
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
// Shift the decimal to the hidden bit, and then round the value
// to get the high mantissa+1 bits.
d.left_shift(F::SIG_BITS as usize + 1);
let mut mantissa = d.round();
if mantissa >= (1_u64 << (F::SIG_BITS + 1)) {
// Rounding up overflowed to the carry bit, need to
// shift back to the hidden bit.
d.right_shift(1);
exp2 += 1;
mantissa = d.round();
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
}
let mut power2 = exp2 - F::EXP_MIN + 1;
if mantissa < (1_u64 << F::SIG_BITS) {
power2 -= 1;
}
// Zero out all the bits above the explicit mantissa bits.
mantissa &= (1_u64 << F::SIG_BITS) - 1;
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact final numeric-sign excerpt from crate/dec2flt/mod.rs:
let assembled_word = fp.m | ((fp.p_biased as u64) << F::SIG_BITS);
let assembly_result = biased_fp_to_float::<F>(fp);
let lexical_sign_applied = num.negative;
let result = if lexical_sign_applied {
core::ops::Neg::neg(assembly_result)
} else {
assembly_result
};
Thus a numeric execution that reaches the integer/slow selection route
assembles its selected pair with from_bits through biased_fp_to_float and only
then conditionally negates it. A successful try_fast_path returns earlier and
does not perform this assembly. compute_float and parse_long_mantissa produce
raw BiasedFp pairs and do not call from_u64, primitive float multiplication,
division, negation, or from_bits; they do, however, execute constants derived
from SIG_TOTAL_BITS before producing those pairs.
Retained structural-boundary evidence
-------------------------------------
Several adjacent structural bindings cite this same evidence record. Their
pinned library source identities are:
core/src/num/mod.rs
f0820f9dfb94999440c8cb4a349736fa21df7e5668e19b6b49e016ff67c05ce3
core/src/option.rs
7cf61204b05d98a95bc2e322d5fbfc1f4f91505109971917d9a7fb47151c50e6
core/src/slice/mod.rs
354992a6a3d69a0185eef9044a07ea5180e767bdb467aef55e69ee3d44317840
core/src/str/mod.rs
284b4c147b5d0497ce9146f6b96e564f196aed10411a62cdccf5fc5243d40f78
Exact ASCII-digit body from core/src/num/mod.rs:
pub const fn is_ascii_digit(&self) -> bool {
matches!(*self, b'0'..=b'9')
}
Exact Option control-flow bodies from core/src/option.rs:
fn branch(self) -> ControlFlow<Self::Residual, Self::Output> {
match self {
Some(v) => ControlFlow::Continue(v),
None => ControlFlow::Break(None),
}
}
fn from_residual(residual: Option<convert::Infallible>) -> Self {
match residual {
None => None,
}
}
Exact slice observation bodies from core/src/slice/mod.rs:
pub const fn first(&self) -> Option<&T> {
if let [first, ..] = self { Some(first) } else { None }
}
pub const fn split_first(&self) -> Option<(&T, &[T])> {
if let [first, tail @ ..] = self { Some((first, tail)) } else { None }
}
Exact string-byte body from core/src/str/mod.rs:
pub const fn as_bytes(&self) -> &[u8] {
// SAFETY: const sound because we transmute two types with the same layout
unsafe { mem::transmute(self) }
}
reference/model-evidence/binary64-probe.rs
#![feature(float_masks)]
use std::num::FpCategory;
fn bits(label: &str, value: f64) {
println!("{label}={:016x}", value.to_bits());
}
fn main() {
println!("target_arch={}", std::env::consts::ARCH);
println!("mantissa_digits={}", f64::MANTISSA_DIGITS);
println!("exponent_mask={:016x}", f64::EXPONENT_MASK);
println!("mantissa_mask={:016x}", f64::MANTISSA_MASK);
bits("nan", f64::NAN);
bits("infinity", f64::INFINITY);
bits("neg_infinity", f64::NEG_INFINITY);
for (label, value) in [
("nan_category", f64::NAN),
("infinity_category", f64::INFINITY),
("zero_category", 0.0),
("subnormal_category", f64::from_bits(1)),
("normal_category", 1.0),
] {
let category = match value.classify() {
FpCategory::Nan => "Nan",
FpCategory::Infinite => "Infinite",
FpCategory::Zero => "Zero",
FpCategory::Subnormal => "Subnormal",
FpCategory::Normal => "Normal",
};
println!("{label}={category}");
}
let payload_nan_word = 0x7ff0_0000_0000_0001_u64;
println!(
"from_bits_to_bits={:016x}",
f64::from_bits(payload_nan_word).to_bits()
);
bits("neg_payload_nan", -f64::from_bits(payload_nan_word));
bits("neg_zero", -0.0);
bits("subnormal_tie_to_even_zero", f64::from_bits(1) * 0.5);
bits("subnormal_tie_to_even_two", f64::from_bits(3) * 0.5);
bits("normal_division", 1.0 / 10.0);
bits("mul_negative_zero", -0.0 * 2.0);
bits("div_negative_zero", -1.0 / f64::INFINITY);
bits("div_negative_infinity", 1.0 / -0.0);
bits("mul_overflow", f64::MAX * (1.0 + f64::EPSILON));
println!("mul_zero_infinity_is_nan={}", (0.0 * f64::INFINITY).is_nan());
println!("div_zero_zero_is_nan={}", (0.0_f64 / 0.0_f64).is_nan());
println!("mul_nan_is_nan={}", (f64::NAN * 1.0).is_nan());
bits("cast_2_pow_53", (1_u64 << 53) as f64);
bits("cast_2_pow_53_plus_1", ((1_u64 << 53) + 1) as f64);
}
Assumptions / kernel axioms
- Classical.choice
- Quot.sound
- propext
conservative transitive union of saved axiom observations across node dependencies
Requirements depending on this item (32)
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
All 32 entries
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
- Exponent agreement
- Correctness or defer
- Native correctness or defer
- Numeric acceptance
- Accumulated-value diagnostic
- Record bounds
- Invalid rejection
- Accumulated-value diagnostic
- Equal-target bridge
- Exact rounding
- Infinity
- Invalid rejection
- NaN acceptance
- No spurious NaNs
- Numeric acceptance
- Numeric sign
- Selected exponent range
- Selected magnitude sign
- Signed zero
- Totality
- Rounding determinism
- Rounding totality
- Full-significand diagnostic
- Infinity
- NaN
- Rejection
These requirements are linked to this item through the declared dependencies of their proofs.
Record details
| Record source | Tablet/model-support.json |
|---|---|
| Kind | opaque external binding |
| Preservation assessment origin | VerifierPanel |
| Preservation fingerprint | preservation-v1:7429dc199cdaf8768ec4939bf14ab514f9fd10fe8d632cd39c78bedaa9731bba |
| Preservation current fingerprint | preservation-v1:7429dc199cdaf8768ec4939bf14ab514f9fd10fe8d632cd39c78bedaa9731bba |
| Preservation freshness | matches current fingerprint |
| Correspondence approved fingerprint | {"own_tex":"967c7873d540d6122f7c1330d7214f4df95f5ca8b07901660a8b98da190737cf","lean_semantic_closure":"43510aafab4941ffb14dcb373fd5a4b71249109e37c9a94e16c17435345ca3da","lean_relevant_definition_descendants":{"Binary64Model":"d80435c56f8fcbe084ebc2fbf05989a7ddf07434d0acd161302414cac32f964d","Binary64ModelDefault":"e2475cd1caad0eef450c903f24d2dfb8ffdfadf787ccad3621a86556f41e533a","F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2"},"lean_relevant_dependencies":["Binary64Model","Binary64ModelDefault","F64","core_num_FpCategory"],"preamble_tex":""} |
| Correspondence current fingerprint | {"own_tex":"967c7873d540d6122f7c1330d7214f4df95f5ca8b07901660a8b98da190737cf","lean_semantic_closure":"43510aafab4941ffb14dcb373fd5a4b71249109e37c9a94e16c17435345ca3da","lean_relevant_definition_descendants":{"Binary64Model":"d80435c56f8fcbe084ebc2fbf05989a7ddf07434d0acd161302414cac32f964d","Binary64ModelDefault":"e2475cd1caad0eef450c903f24d2dfb8ffdfadf787ccad3621a86556f41e533a","F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2"},"lean_relevant_dependencies":["Binary64Model","Binary64ModelDefault","F64","core_num_FpCategory"],"preamble_tex":""} |
| Correspondence freshness | matches current fingerprint |
Exact preservation assessment
{
"status": "VerifierPass",
"origin": "VerifierPanel",
"fingerprints": {
"own_tex_hash": "4d8d9727d227bb22104e3139fd4d85496e45f48e3ffaf3245ef5281cf032ccda",
"dep_statement_hashes": {
"Binary64ModelDefault": "be5dcc4afe23616ca8fd1d15d30fbbe4ee2621d68be3341b8e74a66e6dcd736f",
"Binary64NativeCallDomain": "5b06c401ea7b8fe802a4cae40bcf11c5e438e342f3284a9e27ea421e01cb3642"
},
"combined_sound_fp": "preservation-v1:7429dc199cdaf8768ec4939bf14ab514f9fd10fe8d632cd39c78bedaa9731bba"
},
"lane_votes": {
"v1": "Pass"
},
"reviewer_action_id": null
}Exact source record
{
"name": "F64.Insts.CoreOpsArithMulF64F64.mul",
"extracted_signature": ": F64 → F64 → Result F64",
"rust_symbol": "core::ops::arith::{impl core::ops::arith::Mul<f64, f64> for f64}::mul",
"raw_declaration_sha256": "20d985819a981e9e80485ce169c1d045ea13fa8796e9314d5b621141aae6deec",
"node": "ModelF64Mul",
"declaration": "dec2flt_model.ModelF64Mul"
}Captured evidence identities
[
{
"path": "reference/model-evidence/binary64-boundary.txt",
"sha256": "a17d82e7f789ce7f1fbb3922a66ec8806999e526532d637605263882d37b7abf",
"cited_by": [
"Tablet/ModelF64Mul.tex",
"Tablet/model-support.json"
]
},
{
"path": "reference/model-evidence/binary64-probe.rs",
"sha256": "68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e",
"cited_by": [
"reference/model-evidence/binary64-boundary.txt"
]
}
]core::ops::arith::{impl core::ops::arith::Div<f64, f64> for f64}::div
Inspect related source (1)
- div · core/src/ops/arith.rs:515 Rust library
Related source and models come from the extraction records and declared dependencies.
| Rust item | core::ops::arith::{impl core::ops::arith::Div<f64, f64> for f64}::div |
|---|---|
| Recorded source | /rustc/library/core/src/ops/arith.rs |
| Lines | 515:12–515:41 |
The related-source link includes this operation’s Rust standard-library implementation.
Opaque extraction signature
: F64 → F64 → Result F64Lean definition
Trellis authored this Lean model for an operation outside the mechanical extraction. Modeling choices explains its behavior and review.
import Tablet.Binary64ModelDefault
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: ModelF64Div]
def ModelF64Div : F64 -> F64 -> Result F64 :=
-- BODY
Binary64ModelDefault.div
end dec2flt_model
Why this model is faithful
Definition
Preservation argument
Claim
Proof
Authored arguments for individual requirements
Requirement: assembly correspondence
biased_fp_to_float, whose source body only casts the
biased exponent, shifts it, ORs it with the mantissa, and calls
from_u64_bits; it never invokes binary64 division, as recorded in
reference/model-evidence/binary64-boundary.txt. This binding
therefore cannot affect the claimed assembled word.Requirement: classification determinism
Requirement: classification significand digit
Requirement: classification totality
Requirement: dispatch abstract composition
Requirement: dispatch component compliance
try_fast_path. Its source guards, recorded in
reference/model-evidence/binary64-boundary.txt, establish
\mathit{mantissa}\leq2^{53} and a power-table index
-\mathit{exponent} in 1,\ldots,22. By
Binary64NativeCallDomain, the numerator is finite and non-NaN and
the divisor is finite, non-NaN, and nonzero. The exact non-NaN division
clause above therefore preserves the native component return and hence its
agreement with the contract instance; all other component paths make no
division call.Requirement: exponent value agreement
Requirement: integer correct or defer
compute_float. Its source body performs integer
table arithmetic and returns a raw BiasedFp; the exact source excerpt
in reference/model-evidence/binary64-boundary.txt records that it
contains no primitive float division. This binding therefore cannot change
either deferral or the returned raw pair.Requirement: native correct or defer
can_use_fast_path guards in
reference/model-evidence/binary64-boundary.txt then give
\mathit{mantissa}\leq2^{53} and
1\leq-\mathit{exponent}\leq22. By
Binary64NativeCallDomain, conversion of the mantissa produces a
finite non-NaN operand and the power-table lookup produces a finite non-NaN,
nonzero divisor. The exact non-NaN division clause above therefore agrees
with the source on every executed division; the nonnegative-exponent and
disguised arms multiply instead.Requirement: number helper acceptance
parse_number. Its recorded source body only
accepts a complete Decimal returned by
parse_partial_number; it has no float type parameter and executes no
float operation, including division
(reference/model-evidence/binary64-boundary.txt).Requirement: number helper accumulated value
Decimal record returned by
parse_number. The recorded source boundary shows that this helper
has no float type parameter or float operation, so no binary64 division can
affect the record or its represented interval
(reference/model-evidence/binary64-boundary.txt).Requirement: number helper record bounds
parse_number returns its
Decimal record. As its exact source body in
reference/model-evidence/binary64-boundary.txt shows, it invokes
no float conversion or arithmetic, hence no binary64 division can affect the
record's sign or mantissa bound.Requirement: number helper rejection
parse_number: the helper
returns None unless parse_partial_number consumed the
entire slice. The recorded body has no float type parameter or float
operation, so this division binding is not reached
(reference/model-evidence/binary64-boundary.txt).Requirement: parser accumulated rounding
Requirement: parser equal target rounding
Requirement: parser exact rounding
Requirement: parser infinity
None and the
dispatcher takes the special-helper branch. The source excerpt in
reference/model-evidence/binary64-boundary.txt shows that this
branch selects the infinity constant and conditionally negates it; it never
calls try_fast_path or binary64 division.Requirement: parser invalid rejection
parse_number and then
parse_inf_nan both return None, after which the dispatcher
returns the parsing error. The former has no float operation and the latter
only selects a special constant and conditionally negates on success, as
recorded in reference/model-evidence/binary64-boundary.txt; this
branch never reaches try_fast_path or division.Requirement: parser nan acceptance
None and the dispatcher
takes the special-helper branch. That branch selects the NaN constant and
conditionally negates it, as recorded in
reference/model-evidence/binary64-boundary.txt; it does not call
try_fast_path or division, and no raw-word identity for an
arithmetic NaN is asserted.Requirement: parser non nan results
Requirement: parser numeric acceptance
Requirement: parser numeric sign
Requirement: parser selected exponent
Assembled trace. The source dispatcher
records such a trace only after try_fast_path returned
None; an executed negative-exponent division belongs to the ordinary
native arm and returns directly as Some. Thus no execution relevant
to the selected-pair exponent observation executes binary64 division, as the
dispatcher excerpt in
reference/model-evidence/binary64-boundary.txt records.Requirement: parser selected magnitude sign
Assembled route, reached after the native shortcut returned
None. The only division is in the ordinary negative-exponent native
arm, which returns its value directly rather than selecting or assembling a
raw pair. Consequently this binding cannot affect the selected pair or its
clear sign bit
(reference/model-evidence/binary64-boundary.txt).Requirement: parser signed zero
Requirement: parser totality
Requirement: rounding determinism
Requirement: rounding totality
Requirement: slow accumulated rounding
parse_long_mantissa. Its recorded source body uses
decimal-sequence shifts and integer rounding and returns a raw
BiasedFp; it contains no primitive float division or other float
arithmetic (reference/model-evidence/binary64-boundary.txt).
Thus this binding cannot affect its returned pair.Requirement: special helper infinity
parse_inf_nan. For an infinity keyword its exact
source path selects the infinity constant and conditionally applies negation;
it contains no division call, as recorded in
reference/model-evidence/binary64-boundary.txt.Requirement: special helper nan
parse_inf_nan. For a NaN keyword its exact source
path selects the NaN constant and conditionally applies negation; it contains
no division call, as recorded in
reference/model-evidence/binary64-boundary.txt. This application
asserts only the NaN category, not equality of any arithmetic NaN raw word.Requirement: special helper rejection
parse_inf_nan; an unrecognized keyword takes its
None branch before any special constant or negation is returned. The
recorded source body contains no binary64 division on either success or
rejection
(reference/model-evidence/binary64-boundary.txt).Recorded review
| Correspondence | Pass |
|---|---|
| Preservation | VerifierPass |
ModelF64Div · Lean checked
Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
reference/model-evidence/binary64-boundary.txt
Primary evidence for the binary64 boundary
==========================================
Scope and identities
--------------------
This record concerns the frozen x86_64-unknown-linux-gnu extraction, the
adapted Rust crate retained in this repository, and the installed toolchain
named by modeling-input/SETUP.md. The probe source is retained at
reference/model-evidence/binary64-probe.rs; no scratch source is required to
reproduce it.
Toolchain executable:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
Target:
x86_64-unknown-linux-gnu
rustc executable SHA-256:
162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
Probe source SHA-256:
68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
Compiled probe SHA-256:
f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
Frozen generated.lean SHA-256:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692
Frozen modeling-input/manifest.json SHA-256:
2fc182c0c7acccad30c449ca349b999759b84e8ed4ec9d590e8295e43eeec077
Approved Binary64ModelDefault.lean SHA-256 at the time of this record:
03ae48fb631e6242bd21bf95d0481b66acae05f8cab343c7ab279b3c116538a3
Exact reproduction commands
---------------------------
Run from the repository root:
R=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
P=reference/model-evidence/binary64-probe.rs
B=.trellis/scratch/binary64-probe
"$R" --version --verbose
sha256sum "$R"
sha256sum "$P"
"$R" --target x86_64-unknown-linux-gnu -C opt-level=0 "$P" -o "$B"
sha256sum "$B"
"$B"
Raw output
----------
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
rustc_sha256=162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
probe_sha256=68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
binary_sha256=f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
target_arch=x86_64
mantissa_digits=53
exponent_mask=7ff0000000000000
mantissa_mask=000fffffffffffff
nan=7ff8000000000000
infinity=7ff0000000000000
neg_infinity=fff0000000000000
nan_category=Nan
infinity_category=Infinite
zero_category=Zero
subnormal_category=Subnormal
normal_category=Normal
from_bits_to_bits=7ff0000000000001
neg_payload_nan=fff0000000000001
neg_zero=8000000000000000
subnormal_tie_to_even_zero=0000000000000000
subnormal_tie_to_even_two=0000000000000002
normal_division=3fb999999999999a
mul_negative_zero=8000000000000000
div_negative_zero=8000000000000000
div_negative_infinity=fff0000000000000
mul_overflow=7ff0000000000000
mul_zero_infinity_is_nan=true
div_zero_zero_is_nan=true
mul_nan_is_nan=true
cast_2_pow_53=4340000000000000
cast_2_pow_53_plus_1=4340000000000000
Pinned Rust library sources
---------------------------
The installed sources below belong to the same named toolchain. Their
SHA-256 identities are:
core/src/primitive_docs.rs
c4b8627dd67d5dac8f383f383a9e7ff1229ea43e7599610fc61988694cf0f3e5
core/src/num/f64.rs
84540a6a59e347c63caabe12cf895ba1239c76a50682471567007138fac1c618
core/src/clone.rs
23f9cfc80347fde6b8457d46fbf7a2b8d9f34c8c58601b0b6f714ca2f6d1976b
The exact relevant text of core/src/primitive_docs.rs is:
#[rustc_doc_primitive = "f64"]
#[doc(alias = "double")]
/// A 64-bit floating-point type (specifically, the "binary64" type defined in IEEE 754-2008).
///
/// This type is very similar to [`prim@f32`], but has increased precision by using twice as many
/// bits. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on double-precision
/// values][wikipedia] for more information.
The referenced primitive-f32 documentation supplies the common primitive
floating-point operation rules quoted next:
/// - −0.0: IEEE 754 floating-point numbers have a bit that indicates their sign, so −0.0 is a
/// possible value. For comparison −0.0 = +0.0, but floating-point operations can carry
/// the sign bit through arithmetic operations. This means −0.0 × +0.0 produces −0.0 and
/// a negative number rounded to a value smaller than a float can represent also produces −0.0.
/// - [∞](#associatedconstant.INFINITY) and
/// [−∞](#associatedconstant.NEG_INFINITY): these result from calculations
/// like `1.0 / 0.0`.
///
/// When a primitive operation (addition, subtraction, multiplication, or
/// division) is performed on this type, the result is rounded according to the
/// roundTiesToEven direction defined in IEEE 754-2008. That means:
///
/// - The result is the representable value closest to the true value, if there
/// is a unique closest representable value.
/// - If the true value is exactly half-way between two representable values,
/// the result is the one with an even least-significant binary digit.
/// - If the true value's magnitude is ≥ `f32::MAX` + 2<sup>(`f32::MAX_EXP` −
/// `f32::MANTISSA_DIGITS` − 1)</sup>, the result is ∞ or −∞ (preserving the
/// true value's sign).
The same file explicitly separates arithmetic NaN choice from exact bitwise
operations; its exact relevant text is:
/// The rules for NaN values differ between *arithmetic* and *non-arithmetic* (or "bitwise")
/// operations. The non-arithmetic operations are unary `-`, `abs`, `copysign`, `signum`,
/// `{to,from}_bits`, `{to,from}_{be,le,ne}_bytes` and `is_sign_{positive,negative}`. These
/// operations are guaranteed to exactly preserve the bit pattern of their input except for possibly
/// changing the sign bit.
///
/// The following rules apply when a NaN value is returned from an arithmetic operation:
/// - The result has a non-deterministic sign.
/// - The quiet bit and payload are non-deterministically chosen from
/// the following set of options:
///
/// - **Preferred NaN**: The quiet bit is set and the payload is all-zero.
/// - **Quieting NaN propagation**: The quiet bit is set and the payload is copied from any input
/// operand that is a NaN. If the inputs and outputs do not have the same payload size (i.e., for
/// `as` casts), then
/// - If the output is smaller than the input, low-order bits of the payload get dropped.
/// - If the output is larger than the input, the payload gets filled up with 0s in the low-order
/// bits.
/// - **Unchanged NaN propagation**: The quiet bit and payload are copied from any input operand
/// that is a NaN. If the inputs and outputs do not have the same size (i.e., for `as` casts), the
/// same rules as for "quieting NaN propagation" apply, with one caveat: if the output is smaller
/// than the input, dropping the low-order bits may result in a payload of 0; a payload of 0 is not
/// possible with a signaling NaN (the all-0 significand encodes an infinity) so unchanged NaN
/// propagation cannot occur with some inputs.
/// - **Target-specific NaN**: The quiet bit is set and the payload is picked from a target-specific
/// set of "extra" possible NaN payloads. The set can depend on the input operand values.
/// See the table below for the concrete NaNs this set contains on various targets.
///
/// | `target_arch` | Extra payloads possible on this platform |
/// |---------------|------------------------------------------|
/// | `aarch64`, `arm`, `arm64ec`, `loongarch64`, `powerpc` (except when `target_abi = "spe"`), `powerpc64`, `riscv32`, `riscv64`, `s390x`, `x86`, `x86_64` | None |
Thus the model's preferred quiet NaN is one permitted result whenever
multiplication or division returns NaN. This does not claim that arbitrary
Rust arithmetic NaNs have those exact bits. By contrast, unary negation and
bit conversion must preserve all non-sign bits exactly, including for every
NaN payload.
The exact relevant declarations in core/src/num/f64.rs are:
pub const MANTISSA_DIGITS: u32 = 53;
pub const NAN: f64 = 0.0_f64 / 0.0_f64;
pub const INFINITY: f64 = 1.0_f64 / 0.0_f64;
pub const NEG_INFINITY: f64 = -1.0_f64 / 0.0_f64;
pub const SIGN_MASK: u64 = 0x8000_0000_0000_0000;
pub const EXPONENT_MASK: u64 = 0x7ff0_0000_0000_0000;
pub const MANTISSA_MASK: u64 = 0x000f_ffff_ffff_ffff;
pub const fn classify(self) -> FpCategory {
// We used to have complicated logic here that avoids the simple bit-based tests to work
// around buggy codegen for x87 targets (see
// https://github.com/rust-lang/rust/issues/114479). However, some LLVM versions later, none
// of our tests is able to find any difference between the complicated and the naive
// version, so now we are back to the naive version.
let b = self.to_bits();
match (b & Self::MANTISSA_MASK, b & Self::EXPONENT_MASK) {
(0, Self::EXPONENT_MASK) => FpCategory::Infinite,
(_, Self::EXPONENT_MASK) => FpCategory::Nan,
(0, 0) => FpCategory::Zero,
(_, 0) => FpCategory::Subnormal,
_ => FpCategory::Normal,
}
}
pub const fn to_bits(self) -> u64 {
// SAFETY: `u64` is a plain old datatype so we can always transmute to it.
unsafe { mem::transmute(self) }
}
pub const fn from_bits(v: u64) -> Self {
// It turns out the safety issues with sNaN were overblown! Hooray!
// SAFETY: `u64` is a plain old datatype so we can always transmute from it.
unsafe { mem::transmute(v) }
}
The exact scalar clone body in core/src/clone.rs is:
impl const Clone for $t {
#[inline(always)]
fn clone(&self) -> Self {
*self
}
}
Frozen adapted source
---------------------
The relevant retained source file hashes are:
crate/traits.rs
9013270fb846edcb0bdf2abd0353f575fdd727974cba9e89bdab8bb4c2b4f0bf
crate/dec2flt/mod.rs
b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012
crate/dec2flt/parse.rs
50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f
crate/dec2flt/decimal.rs
633658be803b7369b18feb098a8aa1b5f714a933d3b79ecbc4899a1b05f35beb
crate/dec2flt/lemire.rs
fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1
crate/dec2flt/slow.rs
93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485
Exact constant and bit-conversion excerpt from crate/traits.rs:
impl Float for f64 {
type Int = u64;
const INFINITY: Self = Self::INFINITY;
const NEG_INFINITY: Self = Self::NEG_INFINITY;
const NAN: Self = Self::NAN;
// Bit-identical to the upstream `-f64::NAN`, without the unsupported
// compile-time float negation.
const NEG_NAN: Self = f64::from_bits(0xFFF8_0000_0000_0000);
const BITS: u32 = 64;
const SIG_TOTAL_BITS: u32 = Self::MANTISSA_DIGITS;
const EXP_MASK: Self::Int = Self::EXPONENT_MASK;
const SIG_MASK: Self::Int = Self::MANTISSA_MASK;
fn to_bits(self) -> Self::Int {
self.to_bits()
}
fn classify(self) -> FpCategory {
self.classify()
}
}
impl FloatExt for f64 {
#[inline]
fn from_u64_bits(v: u64) -> Self {
f64::from_bits(v)
}
Exact derived-constant defaults from crate/traits.rs:
/// The number of bits in the significand, *excluding* the hidden bit.
const SIG_BITS: u32 = Self::SIG_TOTAL_BITS - 1;
/// Number of bits in the exponent.
const EXP_BITS: u32 = Self::BITS - Self::SIG_BITS - 1;
/// The saturated (maximum bitpattern) value of the exponent, i.e. the infinite
/// representation.
///
/// This shifted fully right, use `EXP_MASK` for the shifted value.
const EXP_SAT: u32 = (1 << Self::EXP_BITS) - 1;
/// Signed version of `EXP_SAT` since we convert a lot.
const INFINITE_POWER: i32 = Self::EXP_SAT as i32;
/// The exponent bias value. This is also the maximum value of the exponent.
const EXP_BIAS: u32 = Self::EXP_SAT >> 1;
/// Minimum exponent value of normal values.
const EXP_MIN: i32 = -(Self::EXP_BIAS as i32 - 1);
Together with the f64-instance lines `BITS = 64` and
`SIG_TOTAL_BITS = Self::MANTISSA_DIGITS` in the preceding excerpt, these
defaults derive SIG_BITS, EXP_MIN, and INFINITE_POWER from the primitive
mantissa-digit constant rather than introducing independent parameters.
Exact checked cast excerpt from crate/dec2flt/mod.rs:
#[inline]
// This method is precisely the source `u64 as f64` primitive conversion.
// Aeneas cannot translate that cast; opacity is confined to the cast while
// the fast-path algorithm, its range proof obligation, and all calls stay
// visible in the extracted model.
#[charon::opaque]
fn from_u64(v: u64) -> Self {
debug_assert!(v <= Self::MAX_MANTISSA_FAST_PATH);
v as _
}
Here MAX_MANTISSA_FAST_PATH is the retained default 1 << 53. Therefore the
source succeeds only through the modeled branch v <= 2^53 in this debug
configuration; above it the debug assertion fails before the cast. On the
successful branch every integer is exactly representable, so the source cast
and the model rounder return the same word.
Exact power-table and assembly excerpts from crate/dec2flt/mod.rs:
/// Maximum mantissa for the fast-path (`1 << 53` for f64).
const MAX_MANTISSA_FAST_PATH: u64 = 1 << Self::SIG_TOTAL_BITS;
const MAX_EXPONENT_FAST_PATH: i64 = 22;
const MIN_EXPONENT_FAST_PATH: i64 = -Self::MAX_EXPONENT_FAST_PATH;
const MAX_EXPONENT_DISGUISED_FAST_PATH: i64 = 37;
fn pow10_fast_path(exponent: usize) -> Self {
// These bit patterns are exactly the source table's rounded binary64
// literals. The match is the same masked lookup; it merely keeps float
// constants out of Aeneas's unsupported constant interpreter.
match exponent & 31 {
0 => f64::from_bits(0x3FF0_0000_0000_0000),
1 => f64::from_bits(0x4024_0000_0000_0000),
2 => f64::from_bits(0x4059_0000_0000_0000),
3 => f64::from_bits(0x408F_4000_0000_0000),
4 => f64::from_bits(0x40C3_8800_0000_0000),
5 => f64::from_bits(0x40F8_6A00_0000_0000),
6 => f64::from_bits(0x412E_8480_0000_0000),
7 => f64::from_bits(0x4163_12D0_0000_0000),
8 => f64::from_bits(0x4197_D784_0000_0000),
9 => f64::from_bits(0x41CD_CD65_0000_0000),
10 => f64::from_bits(0x4202_A05F_2000_0000),
11 => f64::from_bits(0x4237_4876_E800_0000),
12 => f64::from_bits(0x426D_1A94_A200_0000),
13 => f64::from_bits(0x42A2_309C_E540_0000),
14 => f64::from_bits(0x42D6_BCC4_1E90_0000),
15 => f64::from_bits(0x430C_6BF5_2634_0000),
16 => f64::from_bits(0x4341_C379_37E0_8000),
17 => f64::from_bits(0x4376_3457_85D8_A000),
18 => f64::from_bits(0x43AB_C16D_674E_C800),
19 => f64::from_bits(0x43E1_58E4_6091_3D00),
20 => f64::from_bits(0x4415_AF1D_78B5_8C40),
21 => f64::from_bits(0x444B_1AE4_D6E2_EF50),
22 => f64::from_bits(0x4480_F0CF_064D_D592),
_ => f64::from_bits(0),
}
}
fn biased_fp_to_float<F: FloatExt>(x: BiasedFp) -> F {
let mut word = x.m;
word |= (x.p_biased as u64) << F::SIG_BITS;
F::from_u64_bits(word)
}
Exact native-call excerpt from crate/dec2flt/decimal.rs:
fn can_use_fast_path<F: Lemire>(&self) -> bool {
F::MIN_EXPONENT_FAST_PATH <= self.exponent
&& self.exponent <= F::MAX_EXPONENT_DISGUISED_FAST_PATH
&& self.mantissa <= F::MAX_MANTISSA_FAST_PATH
&& !self.many_digits
}
if !self.can_use_fast_path::<F>() {
return None;
}
let value = if self.exponent <= F::MAX_EXPONENT_FAST_PATH {
// normal fast path
let value = F::from_u64(self.mantissa);
if self.exponent < 0 {
// Explicit trait calls preserve Rust arithmetic and resolve
// the generic output type that Charon leaves ambiguous.
core::ops::Div::div(value, F::pow10_fast_path((-self.exponent) as _))
} else {
core::ops::Mul::mul(value, F::pow10_fast_path(self.exponent as _))
}
} else {
// disguised fast path
let shift = self.exponent - F::MAX_EXPONENT_FAST_PATH;
let mantissa = self.mantissa.checked_mul(INT_POW10[shift as usize])?;
if mantissa > F::MAX_MANTISSA_FAST_PATH {
return None;
}
core::ops::Mul::mul(
F::from_u64(mantissa),
F::pow10_fast_path(F::MAX_EXPONENT_FAST_PATH as _),
)
};
if self.negative {
Some(core::ops::Neg::neg(value))
} else {
Some(value)
}
The preceding can_use_fast_path body, together with
MAX_MANTISSA_FAST_PATH = 1 << SIG_TOTAL_BITS and SIG_TOTAL_BITS = 53 for f64,
requires the exponent to lie between -22 and 37, the input mantissa to be at
most 2^53, and many_digits to be false. Consequently an ordinary arithmetic
call has a from_u64 operand in 0..=2^53. In its negative-exponent arm,
`-self.exponent` lies in 1..=22; in its nonnegative arm, `self.exponent` lies
in 0..=22. The disguised branch checks its multiplied mantissa against 2^53
before from_u64 and uses table index 22. The paired statement
Binary64NativeCallDomain does not assert this source reachability. It says
conditionally that a from_u64 argument at most 2^53 succeeds with a finite,
non-NaN word and that a table index at most 22 succeeds with a positive,
nonzero, finite, non-NaN word. Applying that conditional statement to the
guards just derived establishes those properties for the actual ordinary and
disguised calls, and in particular establishes that every executed divisor is
nonzero.
Exact special-value excerpt from crate/dec2flt/parse.rs:
let float = match (register, len) {
(INF_3, 3) => F::INFINITY,
(INF_8, 8) => F::INFINITY,
(NAN, 3) => F::NAN,
_ => return None,
};
if negative { Some(-float) } else { Some(float) }
Thus the executed special route is INFINITY or NAN followed by conditional
negation; it does not select NEG_INFINITY or NEG_NAN directly.
The number helper has the exact source body
pub fn parse_number(s: &[u8]) -> Option<Decimal> {
if let Some((float, rest)) = parse_partial_number(s) {
if rest == s.len() {
return Some(float);
}
}
None
}
It returns only the Decimal produced by parse_partial_number; there is no
float type parameter or float operation at this boundary.
The integer-tier helper has the source type and exact executable excerpts
below (long explanatory comments are elided). In particular it returns a raw
BiasedFp and contains no from_u64 cast, primitive float multiplication,
division, negation, or from_bits call:
pub fn compute_float<F: Float>(q: i64, mut w: u64) -> BiasedFp {
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let fp_error = BiasedFp::zero_pow2(-1);
// Short-circuit if the value can only be a literal 0 or infinity.
if w == 0 || q < F::SMALLEST_POWER_OF_TEN as i64 {
return fp_zero;
} else if q > F::LARGEST_POWER_OF_TEN as i64 {
return fp_inf;
}
// Normalize our significant digits, so the most-significant bit is set.
let lz = w.leading_zeros();
w <<= lz;
let (lo, hi) = compute_product_approx(q, w, F::SIG_BITS as usize + 3);
if lo == 0xFFFF_FFFF_FFFF_FFFF {
let inside_safe_exponent = (q >= -27) && (q <= 55);
if !inside_safe_exponent {
return fp_error;
}
}
let upperbit = (hi >> 63) as i32;
let mut mantissa = hi >> (upperbit + 64 - F::SIG_BITS as i32 - 3);
let mut power2 = power(q as i32) + upperbit - lz as i32 - F::EXP_MIN + 1;
if power2 <= 0 {
if -power2 + 1 >= 64 {
// Have more than 64 bits below the minimum exponent, must be 0.
return fp_zero;
}
// Have a subnormal value.
mantissa >>= -power2 + 1;
mantissa += mantissa & 1;
mantissa >>= 1;
power2 = (mantissa >= (1_u64 << F::SIG_BITS)) as i32;
return BiasedFp { m: mantissa, p_biased: power2 };
}
// Need to handle rounding ties. Normally, we need to round up,
// but if we fall right in between and we have an even basis, we
// need to round down.
if lo <= 1
&& q >= F::MIN_EXPONENT_ROUND_TO_EVEN as i64
&& q <= F::MAX_EXPONENT_ROUND_TO_EVEN as i64
&& mantissa & 0b11 == 0b01
&& (mantissa << (upperbit + 64 - F::SIG_BITS as i32 - 3)) == hi
{
// Zero the lowest bit, so we don't round up.
mantissa &= !1_u64;
}
// Round-to-even, then shift the significant digits into place.
mantissa += mantissa & 1;
mantissa >>= 1;
if mantissa >= (2_u64 << F::SIG_BITS) {
// Rounding up overflowed, so the carry bit is set. Set the
// mantissa to 1 (only the implicit, hidden bit is set) and
// increase the exponent.
mantissa = 1_u64 << F::SIG_BITS;
power2 += 1;
}
// Zero out the hidden bit.
mantissa &= !(1_u64 << F::SIG_BITS);
if power2 >= F::INFINITE_POWER {
// Exponent is above largest normal value, must be infinite.
return fp_inf;
}
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact slow-tier source body from crate/dec2flt/slow.rs:
pub(crate) fn parse_long_mantissa<F: Float>(s: &[u8]) -> BiasedFp {
const MAX_SHIFT: usize = 60;
const NUM_POWERS: usize = 19;
const POWERS: [u8; 19] =
[0, 3, 6, 9, 13, 16, 19, 23, 26, 29, 33, 36, 39, 43, 46, 49, 53, 56, 59];
let get_shift = |n| {
if n < NUM_POWERS { POWERS[n] as usize } else { MAX_SHIFT }
};
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let mut d = parse_decimal_seq(s);
// Short-circuit if the value can only be a literal 0 or infinity.
if d.num_digits == 0 || d.decimal_point < -324 {
return fp_zero;
} else if d.decimal_point >= 310 {
return fp_inf;
}
let mut exp2 = 0_i32;
let mut loop_result = None;
// Shift right toward (1/2 ... 1].
while d.decimal_point > 0 && loop_result.is_none() {
let n = d.decimal_point as usize;
let shift = get_shift(n);
d.right_shift(shift);
if d.decimal_point < -DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_zero);
} else {
exp2 += shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// Shift left toward (1/2 ... 1].
while d.decimal_point <= 0 && loop_result.is_none() {
let shift = if d.decimal_point == 0 {
match d.digits[0] {
digit if digit >= 5 => break,
0 | 1 => 2,
_ => 1,
}
} else {
get_shift((-d.decimal_point) as _)
};
d.left_shift(shift);
if d.decimal_point > DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_inf);
} else {
exp2 -= shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// We are now in the range [1/2 ... 1] but the binary format uses [1 ... 2].
exp2 -= 1;
while F::EXP_MIN > exp2 {
let mut n = (F::EXP_MIN - exp2) as usize;
if n > MAX_SHIFT {
n = MAX_SHIFT;
}
d.right_shift(n);
exp2 += n as i32;
}
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
// Shift the decimal to the hidden bit, and then round the value
// to get the high mantissa+1 bits.
d.left_shift(F::SIG_BITS as usize + 1);
let mut mantissa = d.round();
if mantissa >= (1_u64 << (F::SIG_BITS + 1)) {
// Rounding up overflowed to the carry bit, need to
// shift back to the hidden bit.
d.right_shift(1);
exp2 += 1;
mantissa = d.round();
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
}
let mut power2 = exp2 - F::EXP_MIN + 1;
if mantissa < (1_u64 << F::SIG_BITS) {
power2 -= 1;
}
// Zero out all the bits above the explicit mantissa bits.
mantissa &= (1_u64 << F::SIG_BITS) - 1;
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact final numeric-sign excerpt from crate/dec2flt/mod.rs:
let assembled_word = fp.m | ((fp.p_biased as u64) << F::SIG_BITS);
let assembly_result = biased_fp_to_float::<F>(fp);
let lexical_sign_applied = num.negative;
let result = if lexical_sign_applied {
core::ops::Neg::neg(assembly_result)
} else {
assembly_result
};
Thus a numeric execution that reaches the integer/slow selection route
assembles its selected pair with from_bits through biased_fp_to_float and only
then conditionally negates it. A successful try_fast_path returns earlier and
does not perform this assembly. compute_float and parse_long_mantissa produce
raw BiasedFp pairs and do not call from_u64, primitive float multiplication,
division, negation, or from_bits; they do, however, execute constants derived
from SIG_TOTAL_BITS before producing those pairs.
Retained structural-boundary evidence
-------------------------------------
Several adjacent structural bindings cite this same evidence record. Their
pinned library source identities are:
core/src/num/mod.rs
f0820f9dfb94999440c8cb4a349736fa21df7e5668e19b6b49e016ff67c05ce3
core/src/option.rs
7cf61204b05d98a95bc2e322d5fbfc1f4f91505109971917d9a7fb47151c50e6
core/src/slice/mod.rs
354992a6a3d69a0185eef9044a07ea5180e767bdb467aef55e69ee3d44317840
core/src/str/mod.rs
284b4c147b5d0497ce9146f6b96e564f196aed10411a62cdccf5fc5243d40f78
Exact ASCII-digit body from core/src/num/mod.rs:
pub const fn is_ascii_digit(&self) -> bool {
matches!(*self, b'0'..=b'9')
}
Exact Option control-flow bodies from core/src/option.rs:
fn branch(self) -> ControlFlow<Self::Residual, Self::Output> {
match self {
Some(v) => ControlFlow::Continue(v),
None => ControlFlow::Break(None),
}
}
fn from_residual(residual: Option<convert::Infallible>) -> Self {
match residual {
None => None,
}
}
Exact slice observation bodies from core/src/slice/mod.rs:
pub const fn first(&self) -> Option<&T> {
if let [first, ..] = self { Some(first) } else { None }
}
pub const fn split_first(&self) -> Option<(&T, &[T])> {
if let [first, tail @ ..] = self { Some((first, tail)) } else { None }
}
Exact string-byte body from core/src/str/mod.rs:
pub const fn as_bytes(&self) -> &[u8] {
// SAFETY: const sound because we transmute two types with the same layout
unsafe { mem::transmute(self) }
}
reference/model-evidence/binary64-probe.rs
#![feature(float_masks)]
use std::num::FpCategory;
fn bits(label: &str, value: f64) {
println!("{label}={:016x}", value.to_bits());
}
fn main() {
println!("target_arch={}", std::env::consts::ARCH);
println!("mantissa_digits={}", f64::MANTISSA_DIGITS);
println!("exponent_mask={:016x}", f64::EXPONENT_MASK);
println!("mantissa_mask={:016x}", f64::MANTISSA_MASK);
bits("nan", f64::NAN);
bits("infinity", f64::INFINITY);
bits("neg_infinity", f64::NEG_INFINITY);
for (label, value) in [
("nan_category", f64::NAN),
("infinity_category", f64::INFINITY),
("zero_category", 0.0),
("subnormal_category", f64::from_bits(1)),
("normal_category", 1.0),
] {
let category = match value.classify() {
FpCategory::Nan => "Nan",
FpCategory::Infinite => "Infinite",
FpCategory::Zero => "Zero",
FpCategory::Subnormal => "Subnormal",
FpCategory::Normal => "Normal",
};
println!("{label}={category}");
}
let payload_nan_word = 0x7ff0_0000_0000_0001_u64;
println!(
"from_bits_to_bits={:016x}",
f64::from_bits(payload_nan_word).to_bits()
);
bits("neg_payload_nan", -f64::from_bits(payload_nan_word));
bits("neg_zero", -0.0);
bits("subnormal_tie_to_even_zero", f64::from_bits(1) * 0.5);
bits("subnormal_tie_to_even_two", f64::from_bits(3) * 0.5);
bits("normal_division", 1.0 / 10.0);
bits("mul_negative_zero", -0.0 * 2.0);
bits("div_negative_zero", -1.0 / f64::INFINITY);
bits("div_negative_infinity", 1.0 / -0.0);
bits("mul_overflow", f64::MAX * (1.0 + f64::EPSILON));
println!("mul_zero_infinity_is_nan={}", (0.0 * f64::INFINITY).is_nan());
println!("div_zero_zero_is_nan={}", (0.0_f64 / 0.0_f64).is_nan());
println!("mul_nan_is_nan={}", (f64::NAN * 1.0).is_nan());
bits("cast_2_pow_53", (1_u64 << 53) as f64);
bits("cast_2_pow_53_plus_1", ((1_u64 << 53) + 1) as f64);
}
Assumptions / kernel axioms
- Classical.choice
- Quot.sound
- propext
conservative transitive union of saved axiom observations across node dependencies
Requirements depending on this item (32)
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
All 32 entries
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
- Exponent agreement
- Correctness or defer
- Native correctness or defer
- Numeric acceptance
- Accumulated-value diagnostic
- Record bounds
- Invalid rejection
- Accumulated-value diagnostic
- Equal-target bridge
- Exact rounding
- Infinity
- Invalid rejection
- NaN acceptance
- No spurious NaNs
- Numeric acceptance
- Numeric sign
- Selected exponent range
- Selected magnitude sign
- Signed zero
- Totality
- Rounding determinism
- Rounding totality
- Full-significand diagnostic
- Infinity
- NaN
- Rejection
These requirements are linked to this item through the declared dependencies of their proofs.
Record details
| Record source | Tablet/model-support.json |
|---|---|
| Kind | opaque external binding |
| Preservation assessment origin | VerifierPanel |
| Preservation fingerprint | preservation-v1:2646a67d8825a19e90644cbbc3e4b63ea029b1e6c176696d17da12c578acd396 |
| Preservation current fingerprint | preservation-v1:2646a67d8825a19e90644cbbc3e4b63ea029b1e6c176696d17da12c578acd396 |
| Preservation freshness | matches current fingerprint |
| Correspondence approved fingerprint | {"own_tex":"7fa348acfaef51e50ae39f618bbf92c23f7094c6e1bfb8416bae87d57b1aa712","lean_semantic_closure":"ea40a149047fde89ae7bb6a18d3dde67b92ee2c77845abb7c0be8722ee33bf31","lean_relevant_definition_descendants":{"Binary64Model":"d80435c56f8fcbe084ebc2fbf05989a7ddf07434d0acd161302414cac32f964d","Binary64ModelDefault":"e2475cd1caad0eef450c903f24d2dfb8ffdfadf787ccad3621a86556f41e533a","F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2"},"lean_relevant_dependencies":["Binary64Model","Binary64ModelDefault","F64","core_num_FpCategory"],"preamble_tex":""} |
| Correspondence current fingerprint | {"own_tex":"7fa348acfaef51e50ae39f618bbf92c23f7094c6e1bfb8416bae87d57b1aa712","lean_semantic_closure":"ea40a149047fde89ae7bb6a18d3dde67b92ee2c77845abb7c0be8722ee33bf31","lean_relevant_definition_descendants":{"Binary64Model":"d80435c56f8fcbe084ebc2fbf05989a7ddf07434d0acd161302414cac32f964d","Binary64ModelDefault":"e2475cd1caad0eef450c903f24d2dfb8ffdfadf787ccad3621a86556f41e533a","F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2"},"lean_relevant_dependencies":["Binary64Model","Binary64ModelDefault","F64","core_num_FpCategory"],"preamble_tex":""} |
| Correspondence freshness | matches current fingerprint |
Exact preservation assessment
{
"status": "VerifierPass",
"origin": "VerifierPanel",
"fingerprints": {
"own_tex_hash": "839a3586b5aa16dc59658f81a410c51644f0a3e067fe370aa0b708e1e8133d9f",
"dep_statement_hashes": {
"Binary64ModelDefault": "be5dcc4afe23616ca8fd1d15d30fbbe4ee2621d68be3341b8e74a66e6dcd736f",
"Binary64NativeCallDomain": "5b06c401ea7b8fe802a4cae40bcf11c5e438e342f3284a9e27ea421e01cb3642"
},
"combined_sound_fp": "preservation-v1:2646a67d8825a19e90644cbbc3e4b63ea029b1e6c176696d17da12c578acd396"
},
"lane_votes": {
"v1": "Pass"
},
"reviewer_action_id": null
}Exact source record
{
"name": "F64.Insts.CoreOpsArithDivF64F64.div",
"extracted_signature": ": F64 → F64 → Result F64",
"rust_symbol": "core::ops::arith::{impl core::ops::arith::Div<f64, f64> for f64}::div",
"raw_declaration_sha256": "1ebb67b412d89328acb4c5dd53168e84fdf26be6cbe1ef49f5a27edbd84ada36",
"node": "ModelF64Div",
"declaration": "dec2flt_model.ModelF64Div"
}Captured evidence identities
[
{
"path": "reference/model-evidence/binary64-boundary.txt",
"sha256": "a17d82e7f789ce7f1fbb3922a66ec8806999e526532d637605263882d37b7abf",
"cited_by": [
"Tablet/ModelF64Div.tex",
"Tablet/model-support.json"
]
},
{
"path": "reference/model-evidence/binary64-probe.rs",
"sha256": "68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e",
"cited_by": [
"reference/model-evidence/binary64-boundary.txt"
]
}
]core::ops::arith::{impl core::ops::arith::Neg<f64> for f64}::neg
Inspect related source (1)
- neg · core/src/ops/arith.rs:719 Rust library
Related source and models come from the extraction records and declared dependencies.
| Rust item | core::ops::arith::{impl core::ops::arith::Neg<f64> for f64}::neg |
|---|---|
| Recorded source | /rustc/library/core/src/ops/arith.rs |
| Lines | 719:12–719:30 |
The related-source link includes this operation’s Rust standard-library implementation.
Opaque extraction signature
: F64 → Result F64Lean definition
Trellis authored this Lean model for an operation outside the mechanical extraction. Modeling choices explains its behavior and review.
import Tablet.Binary64ModelDefault
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: ModelF64Neg]
def ModelF64Neg : F64 -> Result F64 :=
-- BODY
Binary64ModelDefault.neg
end dec2flt_model
Why this model is faithful
Definition
Preservation argument
Claim
Proof
Authored arguments for individual requirements
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
Recorded review
| Correspondence | Pass |
|---|---|
| Preservation | VerifierPass |
ModelF64Neg · Lean checked
Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
reference/model-evidence/binary64-boundary.txt
Primary evidence for the binary64 boundary
==========================================
Scope and identities
--------------------
This record concerns the frozen x86_64-unknown-linux-gnu extraction, the
adapted Rust crate retained in this repository, and the installed toolchain
named by modeling-input/SETUP.md. The probe source is retained at
reference/model-evidence/binary64-probe.rs; no scratch source is required to
reproduce it.
Toolchain executable:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
Target:
x86_64-unknown-linux-gnu
rustc executable SHA-256:
162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
Probe source SHA-256:
68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
Compiled probe SHA-256:
f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
Frozen generated.lean SHA-256:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692
Frozen modeling-input/manifest.json SHA-256:
2fc182c0c7acccad30c449ca349b999759b84e8ed4ec9d590e8295e43eeec077
Approved Binary64ModelDefault.lean SHA-256 at the time of this record:
03ae48fb631e6242bd21bf95d0481b66acae05f8cab343c7ab279b3c116538a3
Exact reproduction commands
---------------------------
Run from the repository root:
R=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
P=reference/model-evidence/binary64-probe.rs
B=.trellis/scratch/binary64-probe
"$R" --version --verbose
sha256sum "$R"
sha256sum "$P"
"$R" --target x86_64-unknown-linux-gnu -C opt-level=0 "$P" -o "$B"
sha256sum "$B"
"$B"
Raw output
----------
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
rustc_sha256=162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
probe_sha256=68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
binary_sha256=f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
target_arch=x86_64
mantissa_digits=53
exponent_mask=7ff0000000000000
mantissa_mask=000fffffffffffff
nan=7ff8000000000000
infinity=7ff0000000000000
neg_infinity=fff0000000000000
nan_category=Nan
infinity_category=Infinite
zero_category=Zero
subnormal_category=Subnormal
normal_category=Normal
from_bits_to_bits=7ff0000000000001
neg_payload_nan=fff0000000000001
neg_zero=8000000000000000
subnormal_tie_to_even_zero=0000000000000000
subnormal_tie_to_even_two=0000000000000002
normal_division=3fb999999999999a
mul_negative_zero=8000000000000000
div_negative_zero=8000000000000000
div_negative_infinity=fff0000000000000
mul_overflow=7ff0000000000000
mul_zero_infinity_is_nan=true
div_zero_zero_is_nan=true
mul_nan_is_nan=true
cast_2_pow_53=4340000000000000
cast_2_pow_53_plus_1=4340000000000000
Pinned Rust library sources
---------------------------
The installed sources below belong to the same named toolchain. Their
SHA-256 identities are:
core/src/primitive_docs.rs
c4b8627dd67d5dac8f383f383a9e7ff1229ea43e7599610fc61988694cf0f3e5
core/src/num/f64.rs
84540a6a59e347c63caabe12cf895ba1239c76a50682471567007138fac1c618
core/src/clone.rs
23f9cfc80347fde6b8457d46fbf7a2b8d9f34c8c58601b0b6f714ca2f6d1976b
The exact relevant text of core/src/primitive_docs.rs is:
#[rustc_doc_primitive = "f64"]
#[doc(alias = "double")]
/// A 64-bit floating-point type (specifically, the "binary64" type defined in IEEE 754-2008).
///
/// This type is very similar to [`prim@f32`], but has increased precision by using twice as many
/// bits. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on double-precision
/// values][wikipedia] for more information.
The referenced primitive-f32 documentation supplies the common primitive
floating-point operation rules quoted next:
/// - −0.0: IEEE 754 floating-point numbers have a bit that indicates their sign, so −0.0 is a
/// possible value. For comparison −0.0 = +0.0, but floating-point operations can carry
/// the sign bit through arithmetic operations. This means −0.0 × +0.0 produces −0.0 and
/// a negative number rounded to a value smaller than a float can represent also produces −0.0.
/// - [∞](#associatedconstant.INFINITY) and
/// [−∞](#associatedconstant.NEG_INFINITY): these result from calculations
/// like `1.0 / 0.0`.
///
/// When a primitive operation (addition, subtraction, multiplication, or
/// division) is performed on this type, the result is rounded according to the
/// roundTiesToEven direction defined in IEEE 754-2008. That means:
///
/// - The result is the representable value closest to the true value, if there
/// is a unique closest representable value.
/// - If the true value is exactly half-way between two representable values,
/// the result is the one with an even least-significant binary digit.
/// - If the true value's magnitude is ≥ `f32::MAX` + 2<sup>(`f32::MAX_EXP` −
/// `f32::MANTISSA_DIGITS` − 1)</sup>, the result is ∞ or −∞ (preserving the
/// true value's sign).
The same file explicitly separates arithmetic NaN choice from exact bitwise
operations; its exact relevant text is:
/// The rules for NaN values differ between *arithmetic* and *non-arithmetic* (or "bitwise")
/// operations. The non-arithmetic operations are unary `-`, `abs`, `copysign`, `signum`,
/// `{to,from}_bits`, `{to,from}_{be,le,ne}_bytes` and `is_sign_{positive,negative}`. These
/// operations are guaranteed to exactly preserve the bit pattern of their input except for possibly
/// changing the sign bit.
///
/// The following rules apply when a NaN value is returned from an arithmetic operation:
/// - The result has a non-deterministic sign.
/// - The quiet bit and payload are non-deterministically chosen from
/// the following set of options:
///
/// - **Preferred NaN**: The quiet bit is set and the payload is all-zero.
/// - **Quieting NaN propagation**: The quiet bit is set and the payload is copied from any input
/// operand that is a NaN. If the inputs and outputs do not have the same payload size (i.e., for
/// `as` casts), then
/// - If the output is smaller than the input, low-order bits of the payload get dropped.
/// - If the output is larger than the input, the payload gets filled up with 0s in the low-order
/// bits.
/// - **Unchanged NaN propagation**: The quiet bit and payload are copied from any input operand
/// that is a NaN. If the inputs and outputs do not have the same size (i.e., for `as` casts), the
/// same rules as for "quieting NaN propagation" apply, with one caveat: if the output is smaller
/// than the input, dropping the low-order bits may result in a payload of 0; a payload of 0 is not
/// possible with a signaling NaN (the all-0 significand encodes an infinity) so unchanged NaN
/// propagation cannot occur with some inputs.
/// - **Target-specific NaN**: The quiet bit is set and the payload is picked from a target-specific
/// set of "extra" possible NaN payloads. The set can depend on the input operand values.
/// See the table below for the concrete NaNs this set contains on various targets.
///
/// | `target_arch` | Extra payloads possible on this platform |
/// |---------------|------------------------------------------|
/// | `aarch64`, `arm`, `arm64ec`, `loongarch64`, `powerpc` (except when `target_abi = "spe"`), `powerpc64`, `riscv32`, `riscv64`, `s390x`, `x86`, `x86_64` | None |
Thus the model's preferred quiet NaN is one permitted result whenever
multiplication or division returns NaN. This does not claim that arbitrary
Rust arithmetic NaNs have those exact bits. By contrast, unary negation and
bit conversion must preserve all non-sign bits exactly, including for every
NaN payload.
The exact relevant declarations in core/src/num/f64.rs are:
pub const MANTISSA_DIGITS: u32 = 53;
pub const NAN: f64 = 0.0_f64 / 0.0_f64;
pub const INFINITY: f64 = 1.0_f64 / 0.0_f64;
pub const NEG_INFINITY: f64 = -1.0_f64 / 0.0_f64;
pub const SIGN_MASK: u64 = 0x8000_0000_0000_0000;
pub const EXPONENT_MASK: u64 = 0x7ff0_0000_0000_0000;
pub const MANTISSA_MASK: u64 = 0x000f_ffff_ffff_ffff;
pub const fn classify(self) -> FpCategory {
// We used to have complicated logic here that avoids the simple bit-based tests to work
// around buggy codegen for x87 targets (see
// https://github.com/rust-lang/rust/issues/114479). However, some LLVM versions later, none
// of our tests is able to find any difference between the complicated and the naive
// version, so now we are back to the naive version.
let b = self.to_bits();
match (b & Self::MANTISSA_MASK, b & Self::EXPONENT_MASK) {
(0, Self::EXPONENT_MASK) => FpCategory::Infinite,
(_, Self::EXPONENT_MASK) => FpCategory::Nan,
(0, 0) => FpCategory::Zero,
(_, 0) => FpCategory::Subnormal,
_ => FpCategory::Normal,
}
}
pub const fn to_bits(self) -> u64 {
// SAFETY: `u64` is a plain old datatype so we can always transmute to it.
unsafe { mem::transmute(self) }
}
pub const fn from_bits(v: u64) -> Self {
// It turns out the safety issues with sNaN were overblown! Hooray!
// SAFETY: `u64` is a plain old datatype so we can always transmute from it.
unsafe { mem::transmute(v) }
}
The exact scalar clone body in core/src/clone.rs is:
impl const Clone for $t {
#[inline(always)]
fn clone(&self) -> Self {
*self
}
}
Frozen adapted source
---------------------
The relevant retained source file hashes are:
crate/traits.rs
9013270fb846edcb0bdf2abd0353f575fdd727974cba9e89bdab8bb4c2b4f0bf
crate/dec2flt/mod.rs
b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012
crate/dec2flt/parse.rs
50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f
crate/dec2flt/decimal.rs
633658be803b7369b18feb098a8aa1b5f714a933d3b79ecbc4899a1b05f35beb
crate/dec2flt/lemire.rs
fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1
crate/dec2flt/slow.rs
93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485
Exact constant and bit-conversion excerpt from crate/traits.rs:
impl Float for f64 {
type Int = u64;
const INFINITY: Self = Self::INFINITY;
const NEG_INFINITY: Self = Self::NEG_INFINITY;
const NAN: Self = Self::NAN;
// Bit-identical to the upstream `-f64::NAN`, without the unsupported
// compile-time float negation.
const NEG_NAN: Self = f64::from_bits(0xFFF8_0000_0000_0000);
const BITS: u32 = 64;
const SIG_TOTAL_BITS: u32 = Self::MANTISSA_DIGITS;
const EXP_MASK: Self::Int = Self::EXPONENT_MASK;
const SIG_MASK: Self::Int = Self::MANTISSA_MASK;
fn to_bits(self) -> Self::Int {
self.to_bits()
}
fn classify(self) -> FpCategory {
self.classify()
}
}
impl FloatExt for f64 {
#[inline]
fn from_u64_bits(v: u64) -> Self {
f64::from_bits(v)
}
Exact derived-constant defaults from crate/traits.rs:
/// The number of bits in the significand, *excluding* the hidden bit.
const SIG_BITS: u32 = Self::SIG_TOTAL_BITS - 1;
/// Number of bits in the exponent.
const EXP_BITS: u32 = Self::BITS - Self::SIG_BITS - 1;
/// The saturated (maximum bitpattern) value of the exponent, i.e. the infinite
/// representation.
///
/// This shifted fully right, use `EXP_MASK` for the shifted value.
const EXP_SAT: u32 = (1 << Self::EXP_BITS) - 1;
/// Signed version of `EXP_SAT` since we convert a lot.
const INFINITE_POWER: i32 = Self::EXP_SAT as i32;
/// The exponent bias value. This is also the maximum value of the exponent.
const EXP_BIAS: u32 = Self::EXP_SAT >> 1;
/// Minimum exponent value of normal values.
const EXP_MIN: i32 = -(Self::EXP_BIAS as i32 - 1);
Together with the f64-instance lines `BITS = 64` and
`SIG_TOTAL_BITS = Self::MANTISSA_DIGITS` in the preceding excerpt, these
defaults derive SIG_BITS, EXP_MIN, and INFINITE_POWER from the primitive
mantissa-digit constant rather than introducing independent parameters.
Exact checked cast excerpt from crate/dec2flt/mod.rs:
#[inline]
// This method is precisely the source `u64 as f64` primitive conversion.
// Aeneas cannot translate that cast; opacity is confined to the cast while
// the fast-path algorithm, its range proof obligation, and all calls stay
// visible in the extracted model.
#[charon::opaque]
fn from_u64(v: u64) -> Self {
debug_assert!(v <= Self::MAX_MANTISSA_FAST_PATH);
v as _
}
Here MAX_MANTISSA_FAST_PATH is the retained default 1 << 53. Therefore the
source succeeds only through the modeled branch v <= 2^53 in this debug
configuration; above it the debug assertion fails before the cast. On the
successful branch every integer is exactly representable, so the source cast
and the model rounder return the same word.
Exact power-table and assembly excerpts from crate/dec2flt/mod.rs:
/// Maximum mantissa for the fast-path (`1 << 53` for f64).
const MAX_MANTISSA_FAST_PATH: u64 = 1 << Self::SIG_TOTAL_BITS;
const MAX_EXPONENT_FAST_PATH: i64 = 22;
const MIN_EXPONENT_FAST_PATH: i64 = -Self::MAX_EXPONENT_FAST_PATH;
const MAX_EXPONENT_DISGUISED_FAST_PATH: i64 = 37;
fn pow10_fast_path(exponent: usize) -> Self {
// These bit patterns are exactly the source table's rounded binary64
// literals. The match is the same masked lookup; it merely keeps float
// constants out of Aeneas's unsupported constant interpreter.
match exponent & 31 {
0 => f64::from_bits(0x3FF0_0000_0000_0000),
1 => f64::from_bits(0x4024_0000_0000_0000),
2 => f64::from_bits(0x4059_0000_0000_0000),
3 => f64::from_bits(0x408F_4000_0000_0000),
4 => f64::from_bits(0x40C3_8800_0000_0000),
5 => f64::from_bits(0x40F8_6A00_0000_0000),
6 => f64::from_bits(0x412E_8480_0000_0000),
7 => f64::from_bits(0x4163_12D0_0000_0000),
8 => f64::from_bits(0x4197_D784_0000_0000),
9 => f64::from_bits(0x41CD_CD65_0000_0000),
10 => f64::from_bits(0x4202_A05F_2000_0000),
11 => f64::from_bits(0x4237_4876_E800_0000),
12 => f64::from_bits(0x426D_1A94_A200_0000),
13 => f64::from_bits(0x42A2_309C_E540_0000),
14 => f64::from_bits(0x42D6_BCC4_1E90_0000),
15 => f64::from_bits(0x430C_6BF5_2634_0000),
16 => f64::from_bits(0x4341_C379_37E0_8000),
17 => f64::from_bits(0x4376_3457_85D8_A000),
18 => f64::from_bits(0x43AB_C16D_674E_C800),
19 => f64::from_bits(0x43E1_58E4_6091_3D00),
20 => f64::from_bits(0x4415_AF1D_78B5_8C40),
21 => f64::from_bits(0x444B_1AE4_D6E2_EF50),
22 => f64::from_bits(0x4480_F0CF_064D_D592),
_ => f64::from_bits(0),
}
}
fn biased_fp_to_float<F: FloatExt>(x: BiasedFp) -> F {
let mut word = x.m;
word |= (x.p_biased as u64) << F::SIG_BITS;
F::from_u64_bits(word)
}
Exact native-call excerpt from crate/dec2flt/decimal.rs:
fn can_use_fast_path<F: Lemire>(&self) -> bool {
F::MIN_EXPONENT_FAST_PATH <= self.exponent
&& self.exponent <= F::MAX_EXPONENT_DISGUISED_FAST_PATH
&& self.mantissa <= F::MAX_MANTISSA_FAST_PATH
&& !self.many_digits
}
if !self.can_use_fast_path::<F>() {
return None;
}
let value = if self.exponent <= F::MAX_EXPONENT_FAST_PATH {
// normal fast path
let value = F::from_u64(self.mantissa);
if self.exponent < 0 {
// Explicit trait calls preserve Rust arithmetic and resolve
// the generic output type that Charon leaves ambiguous.
core::ops::Div::div(value, F::pow10_fast_path((-self.exponent) as _))
} else {
core::ops::Mul::mul(value, F::pow10_fast_path(self.exponent as _))
}
} else {
// disguised fast path
let shift = self.exponent - F::MAX_EXPONENT_FAST_PATH;
let mantissa = self.mantissa.checked_mul(INT_POW10[shift as usize])?;
if mantissa > F::MAX_MANTISSA_FAST_PATH {
return None;
}
core::ops::Mul::mul(
F::from_u64(mantissa),
F::pow10_fast_path(F::MAX_EXPONENT_FAST_PATH as _),
)
};
if self.negative {
Some(core::ops::Neg::neg(value))
} else {
Some(value)
}
The preceding can_use_fast_path body, together with
MAX_MANTISSA_FAST_PATH = 1 << SIG_TOTAL_BITS and SIG_TOTAL_BITS = 53 for f64,
requires the exponent to lie between -22 and 37, the input mantissa to be at
most 2^53, and many_digits to be false. Consequently an ordinary arithmetic
call has a from_u64 operand in 0..=2^53. In its negative-exponent arm,
`-self.exponent` lies in 1..=22; in its nonnegative arm, `self.exponent` lies
in 0..=22. The disguised branch checks its multiplied mantissa against 2^53
before from_u64 and uses table index 22. The paired statement
Binary64NativeCallDomain does not assert this source reachability. It says
conditionally that a from_u64 argument at most 2^53 succeeds with a finite,
non-NaN word and that a table index at most 22 succeeds with a positive,
nonzero, finite, non-NaN word. Applying that conditional statement to the
guards just derived establishes those properties for the actual ordinary and
disguised calls, and in particular establishes that every executed divisor is
nonzero.
Exact special-value excerpt from crate/dec2flt/parse.rs:
let float = match (register, len) {
(INF_3, 3) => F::INFINITY,
(INF_8, 8) => F::INFINITY,
(NAN, 3) => F::NAN,
_ => return None,
};
if negative { Some(-float) } else { Some(float) }
Thus the executed special route is INFINITY or NAN followed by conditional
negation; it does not select NEG_INFINITY or NEG_NAN directly.
The number helper has the exact source body
pub fn parse_number(s: &[u8]) -> Option<Decimal> {
if let Some((float, rest)) = parse_partial_number(s) {
if rest == s.len() {
return Some(float);
}
}
None
}
It returns only the Decimal produced by parse_partial_number; there is no
float type parameter or float operation at this boundary.
The integer-tier helper has the source type and exact executable excerpts
below (long explanatory comments are elided). In particular it returns a raw
BiasedFp and contains no from_u64 cast, primitive float multiplication,
division, negation, or from_bits call:
pub fn compute_float<F: Float>(q: i64, mut w: u64) -> BiasedFp {
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let fp_error = BiasedFp::zero_pow2(-1);
// Short-circuit if the value can only be a literal 0 or infinity.
if w == 0 || q < F::SMALLEST_POWER_OF_TEN as i64 {
return fp_zero;
} else if q > F::LARGEST_POWER_OF_TEN as i64 {
return fp_inf;
}
// Normalize our significant digits, so the most-significant bit is set.
let lz = w.leading_zeros();
w <<= lz;
let (lo, hi) = compute_product_approx(q, w, F::SIG_BITS as usize + 3);
if lo == 0xFFFF_FFFF_FFFF_FFFF {
let inside_safe_exponent = (q >= -27) && (q <= 55);
if !inside_safe_exponent {
return fp_error;
}
}
let upperbit = (hi >> 63) as i32;
let mut mantissa = hi >> (upperbit + 64 - F::SIG_BITS as i32 - 3);
let mut power2 = power(q as i32) + upperbit - lz as i32 - F::EXP_MIN + 1;
if power2 <= 0 {
if -power2 + 1 >= 64 {
// Have more than 64 bits below the minimum exponent, must be 0.
return fp_zero;
}
// Have a subnormal value.
mantissa >>= -power2 + 1;
mantissa += mantissa & 1;
mantissa >>= 1;
power2 = (mantissa >= (1_u64 << F::SIG_BITS)) as i32;
return BiasedFp { m: mantissa, p_biased: power2 };
}
// Need to handle rounding ties. Normally, we need to round up,
// but if we fall right in between and we have an even basis, we
// need to round down.
if lo <= 1
&& q >= F::MIN_EXPONENT_ROUND_TO_EVEN as i64
&& q <= F::MAX_EXPONENT_ROUND_TO_EVEN as i64
&& mantissa & 0b11 == 0b01
&& (mantissa << (upperbit + 64 - F::SIG_BITS as i32 - 3)) == hi
{
// Zero the lowest bit, so we don't round up.
mantissa &= !1_u64;
}
// Round-to-even, then shift the significant digits into place.
mantissa += mantissa & 1;
mantissa >>= 1;
if mantissa >= (2_u64 << F::SIG_BITS) {
// Rounding up overflowed, so the carry bit is set. Set the
// mantissa to 1 (only the implicit, hidden bit is set) and
// increase the exponent.
mantissa = 1_u64 << F::SIG_BITS;
power2 += 1;
}
// Zero out the hidden bit.
mantissa &= !(1_u64 << F::SIG_BITS);
if power2 >= F::INFINITE_POWER {
// Exponent is above largest normal value, must be infinite.
return fp_inf;
}
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact slow-tier source body from crate/dec2flt/slow.rs:
pub(crate) fn parse_long_mantissa<F: Float>(s: &[u8]) -> BiasedFp {
const MAX_SHIFT: usize = 60;
const NUM_POWERS: usize = 19;
const POWERS: [u8; 19] =
[0, 3, 6, 9, 13, 16, 19, 23, 26, 29, 33, 36, 39, 43, 46, 49, 53, 56, 59];
let get_shift = |n| {
if n < NUM_POWERS { POWERS[n] as usize } else { MAX_SHIFT }
};
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let mut d = parse_decimal_seq(s);
// Short-circuit if the value can only be a literal 0 or infinity.
if d.num_digits == 0 || d.decimal_point < -324 {
return fp_zero;
} else if d.decimal_point >= 310 {
return fp_inf;
}
let mut exp2 = 0_i32;
let mut loop_result = None;
// Shift right toward (1/2 ... 1].
while d.decimal_point > 0 && loop_result.is_none() {
let n = d.decimal_point as usize;
let shift = get_shift(n);
d.right_shift(shift);
if d.decimal_point < -DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_zero);
} else {
exp2 += shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// Shift left toward (1/2 ... 1].
while d.decimal_point <= 0 && loop_result.is_none() {
let shift = if d.decimal_point == 0 {
match d.digits[0] {
digit if digit >= 5 => break,
0 | 1 => 2,
_ => 1,
}
} else {
get_shift((-d.decimal_point) as _)
};
d.left_shift(shift);
if d.decimal_point > DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_inf);
} else {
exp2 -= shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// We are now in the range [1/2 ... 1] but the binary format uses [1 ... 2].
exp2 -= 1;
while F::EXP_MIN > exp2 {
let mut n = (F::EXP_MIN - exp2) as usize;
if n > MAX_SHIFT {
n = MAX_SHIFT;
}
d.right_shift(n);
exp2 += n as i32;
}
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
// Shift the decimal to the hidden bit, and then round the value
// to get the high mantissa+1 bits.
d.left_shift(F::SIG_BITS as usize + 1);
let mut mantissa = d.round();
if mantissa >= (1_u64 << (F::SIG_BITS + 1)) {
// Rounding up overflowed to the carry bit, need to
// shift back to the hidden bit.
d.right_shift(1);
exp2 += 1;
mantissa = d.round();
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
}
let mut power2 = exp2 - F::EXP_MIN + 1;
if mantissa < (1_u64 << F::SIG_BITS) {
power2 -= 1;
}
// Zero out all the bits above the explicit mantissa bits.
mantissa &= (1_u64 << F::SIG_BITS) - 1;
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact final numeric-sign excerpt from crate/dec2flt/mod.rs:
let assembled_word = fp.m | ((fp.p_biased as u64) << F::SIG_BITS);
let assembly_result = biased_fp_to_float::<F>(fp);
let lexical_sign_applied = num.negative;
let result = if lexical_sign_applied {
core::ops::Neg::neg(assembly_result)
} else {
assembly_result
};
Thus a numeric execution that reaches the integer/slow selection route
assembles its selected pair with from_bits through biased_fp_to_float and only
then conditionally negates it. A successful try_fast_path returns earlier and
does not perform this assembly. compute_float and parse_long_mantissa produce
raw BiasedFp pairs and do not call from_u64, primitive float multiplication,
division, negation, or from_bits; they do, however, execute constants derived
from SIG_TOTAL_BITS before producing those pairs.
Retained structural-boundary evidence
-------------------------------------
Several adjacent structural bindings cite this same evidence record. Their
pinned library source identities are:
core/src/num/mod.rs
f0820f9dfb94999440c8cb4a349736fa21df7e5668e19b6b49e016ff67c05ce3
core/src/option.rs
7cf61204b05d98a95bc2e322d5fbfc1f4f91505109971917d9a7fb47151c50e6
core/src/slice/mod.rs
354992a6a3d69a0185eef9044a07ea5180e767bdb467aef55e69ee3d44317840
core/src/str/mod.rs
284b4c147b5d0497ce9146f6b96e564f196aed10411a62cdccf5fc5243d40f78
Exact ASCII-digit body from core/src/num/mod.rs:
pub const fn is_ascii_digit(&self) -> bool {
matches!(*self, b'0'..=b'9')
}
Exact Option control-flow bodies from core/src/option.rs:
fn branch(self) -> ControlFlow<Self::Residual, Self::Output> {
match self {
Some(v) => ControlFlow::Continue(v),
None => ControlFlow::Break(None),
}
}
fn from_residual(residual: Option<convert::Infallible>) -> Self {
match residual {
None => None,
}
}
Exact slice observation bodies from core/src/slice/mod.rs:
pub const fn first(&self) -> Option<&T> {
if let [first, ..] = self { Some(first) } else { None }
}
pub const fn split_first(&self) -> Option<(&T, &[T])> {
if let [first, tail @ ..] = self { Some((first, tail)) } else { None }
}
Exact string-byte body from core/src/str/mod.rs:
pub const fn as_bytes(&self) -> &[u8] {
// SAFETY: const sound because we transmute two types with the same layout
unsafe { mem::transmute(self) }
}
reference/model-evidence/binary64-probe.rs
#![feature(float_masks)]
use std::num::FpCategory;
fn bits(label: &str, value: f64) {
println!("{label}={:016x}", value.to_bits());
}
fn main() {
println!("target_arch={}", std::env::consts::ARCH);
println!("mantissa_digits={}", f64::MANTISSA_DIGITS);
println!("exponent_mask={:016x}", f64::EXPONENT_MASK);
println!("mantissa_mask={:016x}", f64::MANTISSA_MASK);
bits("nan", f64::NAN);
bits("infinity", f64::INFINITY);
bits("neg_infinity", f64::NEG_INFINITY);
for (label, value) in [
("nan_category", f64::NAN),
("infinity_category", f64::INFINITY),
("zero_category", 0.0),
("subnormal_category", f64::from_bits(1)),
("normal_category", 1.0),
] {
let category = match value.classify() {
FpCategory::Nan => "Nan",
FpCategory::Infinite => "Infinite",
FpCategory::Zero => "Zero",
FpCategory::Subnormal => "Subnormal",
FpCategory::Normal => "Normal",
};
println!("{label}={category}");
}
let payload_nan_word = 0x7ff0_0000_0000_0001_u64;
println!(
"from_bits_to_bits={:016x}",
f64::from_bits(payload_nan_word).to_bits()
);
bits("neg_payload_nan", -f64::from_bits(payload_nan_word));
bits("neg_zero", -0.0);
bits("subnormal_tie_to_even_zero", f64::from_bits(1) * 0.5);
bits("subnormal_tie_to_even_two", f64::from_bits(3) * 0.5);
bits("normal_division", 1.0 / 10.0);
bits("mul_negative_zero", -0.0 * 2.0);
bits("div_negative_zero", -1.0 / f64::INFINITY);
bits("div_negative_infinity", 1.0 / -0.0);
bits("mul_overflow", f64::MAX * (1.0 + f64::EPSILON));
println!("mul_zero_infinity_is_nan={}", (0.0 * f64::INFINITY).is_nan());
println!("div_zero_zero_is_nan={}", (0.0_f64 / 0.0_f64).is_nan());
println!("mul_nan_is_nan={}", (f64::NAN * 1.0).is_nan());
bits("cast_2_pow_53", (1_u64 << 53) as f64);
bits("cast_2_pow_53_plus_1", ((1_u64 << 53) + 1) as f64);
}
Assumptions / kernel axioms
- Classical.choice
- Quot.sound
- propext
conservative transitive union of saved axiom observations across node dependencies
Requirements depending on this item (32)
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
All 32 entries
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
- Exponent agreement
- Correctness or defer
- Native correctness or defer
- Numeric acceptance
- Accumulated-value diagnostic
- Record bounds
- Invalid rejection
- Accumulated-value diagnostic
- Equal-target bridge
- Exact rounding
- Infinity
- Invalid rejection
- NaN acceptance
- No spurious NaNs
- Numeric acceptance
- Numeric sign
- Selected exponent range
- Selected magnitude sign
- Signed zero
- Totality
- Rounding determinism
- Rounding totality
- Full-significand diagnostic
- Infinity
- NaN
- Rejection
These requirements are linked to this item through the declared dependencies of their proofs.
Record details
| Record source | Tablet/model-support.json |
|---|---|
| Kind | opaque external binding |
| Preservation assessment origin | VerifierPanel |
| Preservation fingerprint | preservation-v1:6f2245ab5e02f3e4057a99a8b16b51007d7aab7ac7bdb17d36fe740da82e0ea3 |
| Preservation current fingerprint | preservation-v1:6f2245ab5e02f3e4057a99a8b16b51007d7aab7ac7bdb17d36fe740da82e0ea3 |
| Preservation freshness | matches current fingerprint |
| Correspondence approved fingerprint | {"own_tex":"3117e25e4ec7d4c7e88240299df10cc344be6fc6028b0b9a1e573a777eb613f9","lean_semantic_closure":"59844a6f7d5bfde463f4598d46c8abc4b4a9441985cf6f1d2eafb5abf4a49e56","lean_relevant_definition_descendants":{"Binary64Model":"d80435c56f8fcbe084ebc2fbf05989a7ddf07434d0acd161302414cac32f964d","Binary64ModelDefault":"e2475cd1caad0eef450c903f24d2dfb8ffdfadf787ccad3621a86556f41e533a","F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2"},"lean_relevant_dependencies":["Binary64Model","Binary64ModelDefault","F64","core_num_FpCategory"],"preamble_tex":""} |
| Correspondence current fingerprint | {"own_tex":"3117e25e4ec7d4c7e88240299df10cc344be6fc6028b0b9a1e573a777eb613f9","lean_semantic_closure":"59844a6f7d5bfde463f4598d46c8abc4b4a9441985cf6f1d2eafb5abf4a49e56","lean_relevant_definition_descendants":{"Binary64Model":"d80435c56f8fcbe084ebc2fbf05989a7ddf07434d0acd161302414cac32f964d","Binary64ModelDefault":"e2475cd1caad0eef450c903f24d2dfb8ffdfadf787ccad3621a86556f41e533a","F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2"},"lean_relevant_dependencies":["Binary64Model","Binary64ModelDefault","F64","core_num_FpCategory"],"preamble_tex":""} |
| Correspondence freshness | matches current fingerprint |
Exact preservation assessment
{
"status": "VerifierPass",
"origin": "VerifierPanel",
"fingerprints": {
"own_tex_hash": "01f174ce76233d1c34030781095792fb8bad5399e04e07cd245940e26919532f",
"dep_statement_hashes": {
"Binary64ModelDefault": "be5dcc4afe23616ca8fd1d15d30fbbe4ee2621d68be3341b8e74a66e6dcd736f"
},
"combined_sound_fp": "preservation-v1:6f2245ab5e02f3e4057a99a8b16b51007d7aab7ac7bdb17d36fe740da82e0ea3"
},
"lane_votes": {
"v1": "Pass"
},
"reviewer_action_id": null
}Exact source record
{
"name": "F64.Insts.CoreOpsArithNegF64.neg",
"extracted_signature": ": F64 → Result F64",
"rust_symbol": "core::ops::arith::{impl core::ops::arith::Neg<f64> for f64}::neg",
"raw_declaration_sha256": "bbf93f24bd7cfbc72e47e8bb3a9acc6641df939ad6afafd9ba02c81fe27f7ed0",
"node": "ModelF64Neg",
"declaration": "dec2flt_model.ModelF64Neg"
}Captured evidence identities
[
{
"path": "reference/model-evidence/binary64-boundary.txt",
"sha256": "a17d82e7f789ce7f1fbb3922a66ec8806999e526532d637605263882d37b7abf",
"cited_by": [
"Tablet/ModelF64Neg.tex",
"Tablet/model-support.json"
]
},
{
"path": "reference/model-evidence/binary64-probe.rs",
"sha256": "68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e",
"cited_by": [
"reference/model-evidence/binary64-boundary.txt"
]
}
]core::ops::bit::{impl core::ops::bit::BitAnd<u64, u64> for u64}::bitand
Inspect related source (1)
- bitand · core/src/ops/bit.rs:178 Rust library
Related source and models come from the extraction records and declared dependencies.
| Rust item | core::ops::bit::{impl core::ops::bit::BitAnd<u64, u64> for u64}::bitand |
|---|---|
| Recorded source | /rustc/library/core/src/ops/bit.rs |
| Lines | 178:12–178:42 |
The related-source link includes this operation’s Rust standard-library implementation.
Opaque extraction signature
: Std.U64 → Std.U64 → Result Std.U64Lean 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: ModelU64BitAnd]
def ModelU64BitAnd (x y : Std.U64) : Result Std.U64 :=
-- BODY
ok (x &&& y)
end dec2flt_model
Why this model is faithful
Definition
Preservation argument
Claim
Proof
inspect-native run identifies this exact external as the extracted
u64--u64 BitAnd method, with result type
Result Std.U64, and records its Rust source span and raw declaration
hash. At that span the approved toolchain's u64 implementation
returns self & rhs for every pair, with no guard or failure branch.
At the pinned Aeneas revision, Std.U64 is a scalar containing exactly
a 64-bit vector, and scalar &&& constructs the vector
x.bv &&& y.bv; the pinned bit-vector lemma states that each
result bit is the Boolean conjunction of the corresponding input bits. The
binding defined here returns ok (x &&& y) unconditionally.
Consequently, for arbitrary modeled 64-bit words x and y, it succeeds and
returns exactly the same bounded 64-bit conjunction as the Rust method. No
reachability restriction is used.Authored arguments for individual requirements
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
Recorded review
| Correspondence | Pass |
|---|---|
| Preservation | VerifierPass |
ModelU64BitAnd · Lean checked
Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
reference/model-evidence/u64-bitand.txt
U64 BitAnd preservation evidence
================================
Scope
-----
This record pins the source-to-model chain for the external declaration bound
to Tablet/ModelU64BitAnd. The commands below were run from the repository
root on 2026-09-24. They use the frozen generated.lean and the approved tools
recorded in modeling-input/manifest.json and modeling-input/tool-identities.json.
1. Fresh native-boundary inspection
-----------------------------------
Command:
python3 .trellis/scripts/pv_modeling.py inspect-native .
The command reported 24 declarations and wrote its full index to:
.trellis/scratch/inspect-native-1790258751442882118.json
SHA-256 identities:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692 generated.lean
1e4419e9c0fff857cbff6848d8e4d0b54267d4f2f3307ee139f058f88930ee77 .trellis/scratch/inspect-native-1790258751442882118.json
These identities are reproduced with:
sha256sum generated.lean \
.trellis/scratch/inspect-native-1790258751442882118.json
The exact U64 BitAnd entry in that index is:
name: U64.Insts.CoreOpsBitBitAndU64U64.bitand
extracted_signature: : Std.U64 → Std.U64 → Result Std.U64
rust_symbol: core::ops::bit::{impl core::ops::bit::BitAnd<u64, u64> for u64}::bitand
source: /rustc/library/core/src/ops/bit.rs, lines 178:12-178:42
raw_declaration_sha256: 36ceff7ad919e1d966b58518e19d49faa70b057d1eeab97b5d99db91bdce3e02
The indexed raw declaration is:
/-- [core::ops::bit::{impl core::ops::bit::BitAnd<u64, u64> for u64}::bitand]:
Source: '/rustc/library/core/src/ops/bit.rs', lines 178:12-178:42
Name pattern: [core::ops::bit::{core::ops::bit::BitAnd<u64, u64, u64>}::bitand]
Visibility: public -/
@[rust_fun "core::ops::bit::{core::ops::bit::BitAnd<u64, u64, u64>}::bitand"]
axiom U64.Insts.CoreOpsBitBitAndU64U64.bitand
: Std.U64 → Std.U64 → Result Std.U64
The declaration hash is reproducible directly from the fresh JSON index:
jq -jr '.declarations[] | select(.name == "U64.Insts.CoreOpsBitBitAndU64U64.bitand") | .source_utf8' \
.trellis/scratch/inspect-native-1790258751442882118.json | sha256sum
Output:
36ceff7ad919e1d966b58518e19d49faa70b057d1eeab97b5d99db91bdce3e02 -
Thus the inspected external is exactly the u64/u64 operation, has the stated
total-looking Result signature, and is traced by extraction to the Rust source
span used below. This inventory fact identifies the boundary; the next two
sections establish its semantics.
2. Approved Rust implementation
-------------------------------
Toolchain and compiler identity:
toolchain: nightly-2026-06-01-x86_64-unknown-linux-gnu
rustc path: /home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
rustc SHA-256: 162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
rustc 1.98.0-nightly (14210df0e 2026-05-31)
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
host: x86_64-unknown-linux-gnu
Reproduction commands:
RUSTC=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
"$RUSTC" -vV
"$RUSTC" --print sysroot
sha256sum "$RUSTC"
The installed rust-src component is under the same sysroot. Its relevant file
and hash are:
path: /home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/bit.rs
SHA-256: 31db8c3d227e01a9f60f37221d258dc1b2c8274163264602837bb3f3851c2a4d
The file identity and quoted line ranges are reproduced with:
RUSTSRC=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/bit.rs
sha256sum "$RUSTSRC"
nl -ba "$RUSTSRC" | sed -n '170,187p'
The pinned source says at lines 170-179:
macro_rules! bitand_impl {
($($t:ty)*) => ($(
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
impl const BitAnd for $t {
type Output = $t;
#[inline]
fn bitand(self, rhs: $t) -> $t { self & rhs }
}
and line 187 instantiates that implementation for u64:
bitand_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
Consequently the extracted Rust symbol's u64 implementation returns the
primitive bounded u64 conjunction `self & rhs` for every pair of u64 values;
there is no source guard, failure branch, or reachability precondition.
3. Pinned Aeneas scalar meaning
--------------------------------
Repository identity:
repository: https://github.com/AeneasVerif/aeneas.git
revision: fa699427cdfa8f604b891fb0223ef42883dd7dc4
aeneas binary SHA-256: 9f446d2aaf59e8e705e36d05cb993f1c6ab0e97f8dc6fd2f19907a86ede30922
Reproduction commands (with each relative file path listed below substituted
for PATH):
AENEAS=/home/leanagent/pv_spike/tools/aeneas
git -C "$AENEAS" rev-parse HEAD
git -C "$AENEAS" remote -v
sha256sum "$AENEAS/bin/aeneas"
git -C "$AENEAS" diff --quiet fa699427cdfa8f604b891fb0223ef42883dd7dc4 -- PATH
sha256sum "$AENEAS/PATH"
git -C "$AENEAS" ls-tree fa699427cdfa8f604b891fb0223ef42883dd7dc4 PATH
`git diff --quiet fa699427cdfa8f604b891fb0223ef42883dd7dc4 -- <path>`
returned status 0 for each file recorded below, so the inspected worktree files
are the files at the pinned revision.
File:
backends/lean/Aeneas/Std/Scalar/Core.lean
SHA-256: a1c26c125a59bba635a2b2c170186ce07168c43308bcf386d508ebd77f01520e
git blob: f8582928fe49a0ce75e143b46bb0a8826d7fddae
Its definitions at lines 28-34, 45-53, 65-69, and 650-656 include:
inductive UScalarTy where
| Usize
| U8
| U16
| U32
| U64
| U128
def UScalarTy.numBits (ty : UScalarTy) : Nat :=
match ty with
| Usize => System.Platform.numBits
| U8 => 8
| U16 => 16
| U32 => 32
| U64 => 64
| U128 => 128
structure UScalar (ty : UScalarTy) where
bv : BitVec ty.numBits
abbrev U64 := UScalar .U64
Thus Std.U64 is exactly a UScalar whose sole data field is a BitVec 64.
File:
backends/lean/Aeneas/Std/Scalar/Bitwise.lean
SHA-256: 63e4b1d0906c972fb4fef953d8d8a60410dcf5313261d2583b1170b4a1a5ce29
git blob: d3eb5022efc22d1d6c3ac055965f612c7f2fbca9
Its definitions at lines 105-116 and theorem at line 274 are:
def UScalar.and {ty} (x y : UScalar ty) : UScalar ty :=
⟨ x.bv &&& y.bv ⟩
instance {ty} : HAnd (UScalar ty) (UScalar ty) (UScalar ty) where
hAnd x y := UScalar.and x y
theorem UScalar.bv_and {ty} (x y : UScalar ty) :
(x &&& y).bv = x.bv &&& y.bv := by rfl
For an explicit bit-level characterization of the BitVec operation used there,
the same pinned repository contains:
backends/lean/Aeneas/Data/BitVec.lean
SHA-256: 66d6e1922a45beff2d75e71e10dc6e8294c7cbf69f95b22dc22f98c5667382a7
git blob: f7bc57109569cdd0fb0c3323021c73673dcfcd33
Lines 148-153 prove, for every width and bit index:
theorem BitVec.getElem!_and {w} (x y : BitVec w) (i : Nat) :
(x &&& y)[i]! = (x[i]! && y[i]!) := by
by_cases i < w
. simp only [getElem!_eq_getElem, getElem_and, *]
. simp_all only [not_lt, getElem!_eq_false, Bool.and_self]
Therefore `x &&& y` on Std.U64 constructs the unique 64-bit vector whose bit
at every position is the Boolean conjunction of the corresponding operand
bits. It is total and introduces neither overflow nor a failure condition.
Assumptions / kernel axioms
- Quot.sound
- propext
conservative transitive union of saved axiom observations across node dependencies
Requirements depending on this item (32)
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
All 32 entries
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
- Exponent agreement
- Correctness or defer
- Native correctness or defer
- Numeric acceptance
- Accumulated-value diagnostic
- Record bounds
- Invalid rejection
- Accumulated-value diagnostic
- Equal-target bridge
- Exact rounding
- Infinity
- Invalid rejection
- NaN acceptance
- No spurious NaNs
- Numeric acceptance
- Numeric sign
- Selected exponent range
- Selected magnitude sign
- Signed zero
- Totality
- Rounding determinism
- Rounding totality
- Full-significand diagnostic
- Infinity
- NaN
- Rejection
These requirements are linked to this item through the declared dependencies of their proofs.
Record details
| Record source | Tablet/model-support.json |
|---|---|
| Kind | opaque external binding |
| Preservation assessment origin | VerifierPanel |
| Preservation fingerprint | preservation-v1:9d616180045122217b46424d997fab49901ce114f0c1579d8d496a4bc0229dee |
| Preservation current fingerprint | preservation-v1:9d616180045122217b46424d997fab49901ce114f0c1579d8d496a4bc0229dee |
| Preservation freshness | matches current fingerprint |
| Correspondence approved fingerprint | {"own_tex":"f3791b8cb54cd55f702cb65b53b998d0d642a4f516b1f1d4dc7ef02f1a8bc180","lean_semantic_closure":"760c8d11170d28936cd7ec6e873cfae06073816f6f416afbff2e50ca335191e5","preamble_tex":""} |
| Correspondence current fingerprint | {"own_tex":"f3791b8cb54cd55f702cb65b53b998d0d642a4f516b1f1d4dc7ef02f1a8bc180","lean_semantic_closure":"760c8d11170d28936cd7ec6e873cfae06073816f6f416afbff2e50ca335191e5","preamble_tex":""} |
| Correspondence freshness | matches current fingerprint |
Exact preservation assessment
{
"status": "VerifierPass",
"origin": "VerifierPanel",
"fingerprints": {
"own_tex_hash": "65eba60c2a9f765ce55eda47257cbb750b864c9d6fddaa976557cca53631b1bc",
"dep_statement_hashes": {},
"combined_sound_fp": "preservation-v1:9d616180045122217b46424d997fab49901ce114f0c1579d8d496a4bc0229dee"
},
"lane_votes": {
"v1": "Pass"
},
"reviewer_action_id": null
}Exact source record
{
"name": "U64.Insts.CoreOpsBitBitAndU64U64.bitand",
"extracted_signature": ": Std.U64 → Std.U64 → Result Std.U64",
"rust_symbol": "core::ops::bit::{impl core::ops::bit::BitAnd<u64, u64> for u64}::bitand",
"raw_declaration_sha256": "36ceff7ad919e1d966b58518e19d49faa70b057d1eeab97b5d99db91bdce3e02",
"node": "ModelU64BitAnd",
"declaration": "dec2flt_model.ModelU64BitAnd"
}Captured evidence identities
[
{
"path": "reference/model-evidence/u64-bitand.txt",
"sha256": "1178f05c16fd796489038b08f76d2eb235b0f20c919dcd7265b8c33d6b309715",
"cited_by": [
"Tablet/ModelU64BitAnd.tex",
"Tablet/model-support.json"
]
}
]core::ops::bit::{impl core::ops::bit::BitOr<u64, u64> for u64}::bitor
Inspect related source (1)
- bitor · core/src/ops/bit.rs:282 Rust library
Related source and models come from the extraction records and declared dependencies.
| Rust item | core::ops::bit::{impl core::ops::bit::BitOr<u64, u64> for u64}::bitor |
|---|---|
| Recorded source | /rustc/library/core/src/ops/bit.rs |
| Lines | 282:12–282:41 |
The related-source link includes this operation’s Rust standard-library implementation.
Opaque extraction signature
: Std.U64 → Std.U64 → Result Std.U64Lean 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: ModelU64BitOr]
def ModelU64BitOr (x y : Std.U64) : Result Std.U64 :=
-- BODY
ok (x ||| y)
end dec2flt_model
Why this model is faithful
Definition
Preservation argument
Claim
Proof
inspect-native run identifies this exact external as the extracted
u64--u64 BitOr method, with result type
Result Std.U64, and records its Rust source span and raw declaration
hash. At that span the approved toolchain's u64 implementation
returns self | rhs for every pair, with no guard or failure branch.
At the pinned Aeneas revision, Std.U64 is a scalar containing exactly
a 64-bit vector, and scalar ||| constructs the vector
x.bv ||| y.bv; the pinned bit-vector lemma states that each
result bit is the Boolean disjunction of the corresponding input bits. The
binding defined here returns ok (x ||| y) unconditionally.
Consequently, for arbitrary modeled 64-bit words x and y, it succeeds and
returns exactly the same bounded 64-bit disjunction as the Rust method. No
reachability restriction is used.Authored arguments for individual requirements
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
Recorded review
| Correspondence | Pass |
|---|---|
| Preservation | VerifierPass |
ModelU64BitOr · Lean checked
Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
reference/model-evidence/u64-bitor.txt
U64 BitOr preservation evidence
===============================
Scope
-----
This record pins the source-to-model chain for the external declaration bound
to Tablet/ModelU64BitOr. The commands below were run from the repository root
on 2026-09-24. They use the frozen generated.lean and the approved tools
recorded in modeling-input/manifest.json and modeling-input/tool-identities.json.
1. Fresh native-boundary inspection
-----------------------------------
Command:
python3 .trellis/scripts/pv_modeling.py inspect-native .
The command reported 24 declarations and wrote its full index to:
.trellis/scratch/inspect-native-1790259866184055823.json
SHA-256 identities:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692 generated.lean
1e4419e9c0fff857cbff6848d8e4d0b54267d4f2f3307ee139f058f88930ee77 .trellis/scratch/inspect-native-1790259866184055823.json
These identities are reproduced with:
sha256sum generated.lean \
.trellis/scratch/inspect-native-1790259866184055823.json
The exact U64 BitOr entry in that index is:
name: U64.Insts.CoreOpsBitBitOrU64U64.bitor
extracted_signature: : Std.U64 → Std.U64 → Result Std.U64
rust_symbol: core::ops::bit::{impl core::ops::bit::BitOr<u64, u64> for u64}::bitor
source: /rustc/library/core/src/ops/bit.rs, lines 282:12-282:41
raw_declaration_sha256: 85930775e3fde73729bff04aa86624f11a9b03b31d18a49dc74ce7bae71b4ed6
The indexed raw declaration is:
/-- [core::ops::bit::{impl core::ops::bit::BitOr<u64, u64> for u64}::bitor]:
Source: '/rustc/library/core/src/ops/bit.rs', lines 282:12-282:41
Name pattern: [core::ops::bit::{core::ops::bit::BitOr<u64, u64, u64>}::bitor]
Visibility: public -/
@[rust_fun "core::ops::bit::{core::ops::bit::BitOr<u64, u64, u64>}::bitor"]
axiom U64.Insts.CoreOpsBitBitOrU64U64.bitor
: Std.U64 → Std.U64 → Result Std.U64
The declaration hash is reproducible directly from the fresh JSON index:
jq -jr '.declarations[] | select(.name == "U64.Insts.CoreOpsBitBitOrU64U64.bitor") | .source_utf8' \
.trellis/scratch/inspect-native-1790259866184055823.json | sha256sum
Output:
85930775e3fde73729bff04aa86624f11a9b03b31d18a49dc74ce7bae71b4ed6 -
Thus the inspected external is exactly the u64/u64 operation, has the stated
total-looking Result signature, and is traced by extraction to the Rust source
span used below. This inventory fact identifies the boundary; the next two
sections establish its semantics.
2. Approved Rust implementation
-------------------------------
Toolchain and compiler identity:
toolchain: nightly-2026-06-01-x86_64-unknown-linux-gnu
rustc path: /home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
rustc SHA-256: 162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
rustc 1.98.0-nightly (14210df0e 2026-05-31)
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
host: x86_64-unknown-linux-gnu
Reproduction commands:
RUSTC=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
"$RUSTC" -vV
"$RUSTC" --print sysroot
sha256sum "$RUSTC"
The installed rust-src component is under the same sysroot. Its relevant file
and hash are:
path: /home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/bit.rs
SHA-256: 31db8c3d227e01a9f60f37221d258dc1b2c8274163264602837bb3f3851c2a4d
The file identity and quoted line range are reproduced with:
RUSTSRC=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/bit.rs
sha256sum "$RUSTSRC"
nl -ba "$RUSTSRC" | sed -n '274,291p'
The pinned source says at lines 274-289:
macro_rules! bitor_impl {
($($t:ty)*) => ($(
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
impl const BitOr for $t {
type Output = $t;
#[inline]
fn bitor(self, rhs: $t) -> $t { self | rhs }
}
forward_ref_binop! { impl BitOr, bitor for $t, $t,
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
)*)
}
and line 291 instantiates that implementation for u64:
bitor_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
Consequently the extracted Rust symbol's u64 implementation returns the
primitive bounded u64 disjunction `self | rhs` for every pair of u64 values;
there is no source guard, failure branch, or reachability precondition.
3. Pinned Aeneas scalar meaning
-------------------------------
Repository identity:
repository: https://github.com/AeneasVerif/aeneas.git
revision: fa699427cdfa8f604b891fb0223ef42883dd7dc4
aeneas binary SHA-256: 9f446d2aaf59e8e705e36d05cb993f1c6ab0e97f8dc6fd2f19907a86ede30922
Reproduction commands (with each relative file path listed below substituted
for PATH):
AENEAS=/home/leanagent/pv_spike/tools/aeneas
git -C "$AENEAS" rev-parse HEAD
git -C "$AENEAS" remote -v
sha256sum "$AENEAS/bin/aeneas"
git -C "$AENEAS" diff --quiet fa699427cdfa8f604b891fb0223ef42883dd7dc4 -- PATH
sha256sum "$AENEAS/PATH"
git -C "$AENEAS" ls-tree fa699427cdfa8f604b891fb0223ef42883dd7dc4 PATH
`git diff --quiet fa699427cdfa8f604b891fb0223ef42883dd7dc4 -- <path>`
returned status 0 for each file recorded below, so the inspected worktree files
are the files at the pinned revision.
File:
backends/lean/Aeneas/Std/Scalar/Core.lean
SHA-256: a1c26c125a59bba635a2b2c170186ce07168c43308bcf386d508ebd77f01520e
git blob: f8582928fe49a0ce75e143b46bb0a8826d7fddae
Its definitions at lines 28-34, 45-53, 65-69, and 650-656 include:
inductive UScalarTy where
| Usize
| U8
| U16
| U32
| U64
| U128
def UScalarTy.numBits (ty : UScalarTy) : Nat :=
match ty with
| Usize => System.Platform.numBits
| U8 => 8
| U16 => 16
| U32 => 32
| U64 => 64
| U128 => 128
structure UScalar (ty : UScalarTy) where
bv : BitVec ty.numBits
abbrev U64 := UScalar .U64
Thus Std.U64 is exactly a UScalar whose sole data field is a BitVec 64.
File:
backends/lean/Aeneas/Std/Scalar/Bitwise.lean
SHA-256: 63e4b1d0906c972fb4fef953d8d8a60410dcf5313261d2583b1170b4a1a5ce29
git blob: d3eb5022efc22d1d6c3ac055965f612c7f2fbca9
Its definitions at lines 118-126 and theorem at line 275 are:
def UScalar.or {ty} (x y : UScalar ty) : UScalar ty :=
⟨ x.bv ||| y.bv ⟩
instance {ty} : HOr (UScalar ty) (UScalar ty) (UScalar ty) where
hOr x y := UScalar.or x y
theorem UScalar.bv_or {ty} (x y : UScalar ty) :
(x ||| y).bv = x.bv ||| y.bv := by rfl
For an explicit bit-level characterization of the BitVec operation used there,
the same pinned repository contains:
backends/lean/Aeneas/Data/BitVec.lean
SHA-256: 66d6e1922a45beff2d75e71e10dc6e8294c7cbf69f95b22dc22f98c5667382a7
git blob: f7bc57109569cdd0fb0c3323021c73673dcfcd33
Lines 141-146 prove, for every width and bit index:
theorem BitVec.getElem!_or {w} (x y : BitVec w) (i : Nat) :
(x ||| y)[i]! = (x[i]! || y[i]!) := by
by_cases i < w
. simp only [getElem!_eq_getElem, getElem_or, *]
. simp_all only [not_lt, getElem!_eq_false, Bool.or_self]
Therefore `x ||| y` on Std.U64 constructs the unique 64-bit vector whose bit
at every position is the Boolean disjunction of the corresponding operand
bits. It is total and introduces neither overflow nor a failure condition.
Assumptions / kernel axioms
- Quot.sound
- propext
conservative transitive union of saved axiom observations across node dependencies
Requirements depending on this item (32)
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
All 32 entries
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
- Exponent agreement
- Correctness or defer
- Native correctness or defer
- Numeric acceptance
- Accumulated-value diagnostic
- Record bounds
- Invalid rejection
- Accumulated-value diagnostic
- Equal-target bridge
- Exact rounding
- Infinity
- Invalid rejection
- NaN acceptance
- No spurious NaNs
- Numeric acceptance
- Numeric sign
- Selected exponent range
- Selected magnitude sign
- Signed zero
- Totality
- Rounding determinism
- Rounding totality
- Full-significand diagnostic
- Infinity
- NaN
- Rejection
These requirements are linked to this item through the declared dependencies of their proofs.
Record details
| Record source | Tablet/model-support.json |
|---|---|
| Kind | opaque external binding |
| Preservation assessment origin | VerifierPanel |
| Preservation fingerprint | preservation-v1:42ceffb37c75782edcee74524fe50dd74aaea6e22d2b4eb5f4bb64b958cbfdec |
| Preservation current fingerprint | preservation-v1:42ceffb37c75782edcee74524fe50dd74aaea6e22d2b4eb5f4bb64b958cbfdec |
| Preservation freshness | matches current fingerprint |
| Correspondence approved fingerprint | {"own_tex":"c1795ffd326d6d7b10277e6e5189adbd559da37f0b95510ab95505fdac8430e3","lean_semantic_closure":"04e1b81bf028ff964b48f52dab02eb081dc327262e2d8152947aee00dc27c1b3","preamble_tex":""} |
| Correspondence current fingerprint | {"own_tex":"c1795ffd326d6d7b10277e6e5189adbd559da37f0b95510ab95505fdac8430e3","lean_semantic_closure":"04e1b81bf028ff964b48f52dab02eb081dc327262e2d8152947aee00dc27c1b3","preamble_tex":""} |
| Correspondence freshness | matches current fingerprint |
Exact preservation assessment
{
"status": "VerifierPass",
"origin": "VerifierPanel",
"fingerprints": {
"own_tex_hash": "b051f3e7ad29c8330d4ae08fee36e7083191cd655130ff92345c573e514fcd5e",
"dep_statement_hashes": {},
"combined_sound_fp": "preservation-v1:42ceffb37c75782edcee74524fe50dd74aaea6e22d2b4eb5f4bb64b958cbfdec"
},
"lane_votes": {
"v1": "Pass"
},
"reviewer_action_id": null
}Exact source record
{
"name": "U64.Insts.CoreOpsBitBitOrU64U64.bitor",
"extracted_signature": ": Std.U64 → Std.U64 → Result Std.U64",
"rust_symbol": "core::ops::bit::{impl core::ops::bit::BitOr<u64, u64> for u64}::bitor",
"raw_declaration_sha256": "85930775e3fde73729bff04aa86624f11a9b03b31d18a49dc74ce7bae71b4ed6",
"node": "ModelU64BitOr",
"declaration": "dec2flt_model.ModelU64BitOr"
}Captured evidence identities
[
{
"path": "reference/model-evidence/u64-bitor.txt",
"sha256": "9b2f3537a8560faf754736d015e12a7892b0b21934ca411f171247a86ac308f1",
"cited_by": [
"Tablet/ModelU64BitOr.tex",
"Tablet/model-support.json"
]
}
]core::ops::bit::{impl core::ops::bit::Shl<u32, u64> for u64}::shl
Inspect related source (1)
- shl · core/src/ops/bit.rs:489 Rust library
Related source and models come from the extraction records and declared dependencies.
| Rust item | core::ops::bit::{impl core::ops::bit::Shl<u32, u64> for u64}::shl |
|---|---|
| Recorded source | /rustc/library/core/src/ops/bit.rs |
| Lines | 489:12–489:41 |
The related-source link includes this operation’s Rust standard-library implementation.
Opaque extraction signature
: Std.U64 → Std.U32 → Result Std.U64Lean 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: ModelU64Shl]
def ModelU64Shl (x : Std.U64) (y : Std.U32) : Result Std.U64 :=
-- BODY
x <<< y
end dec2flt_model
Why this model is faithful
Definition
Preservation argument
Claim
Proof
inspect-native run identifies this exact external as
Shl<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 bounded
u64 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.shiftLeft_UScalar to a branch on
the count's full unsigned value. Below 64 it returns ok of
BitVec.shiftLeft; the pinned scalar specification and bit-vector
lemmas identify its value as the mathematical left shift modulo 2^{64} and
its bits as the exact zero-filled, high-bit-truncated 64-bit shift. 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 bounded 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.Authored arguments for individual requirements
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
Recorded review
| Correspondence | Pass |
|---|---|
| Preservation | VerifierPass |
ModelU64Shl · Lean checked
Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
reference/model-evidence/u64-shl-probe.rs
use std::panic::{catch_unwind, AssertUnwindSafe};
#[inline(never)]
fn shift(x: u64, count: u32) -> u64 {
x << count
}
fn observe(x: u64, count: u32) {
match catch_unwind(AssertUnwindSafe(|| shift(x, count))) {
Ok(value) => println!("count={count} ok={value:#018x}"),
Err(_) => println!("count={count} panic"),
}
}
fn main() {
std::panic::set_hook(Box::new(|_| {}));
let x = 0x8000_0000_0000_0001_u64;
for count in [0, 1, 52, 63, 64, 65, u32::MAX] {
observe(x, count);
}
}
reference/model-evidence/u64-shl.txt
U64 Shl preservation evidence
=============================
Scope
-----
This record pins the source-to-model chain for the external declaration bound
to Tablet/ModelU64Shl. The commands below were run from the repository root on
2026-09-24. They use the frozen generated.lean, extraction configuration, and
approved tools recorded in modeling-input/manifest.json and
modeling-input/tool-identities.json. The two semantic cases are both in scope:
all U32 counts below 64 return a bounded U64 shift, and all U32 counts at least
64 encounter the enabled checked-shift failure.
1. Fresh native-boundary inspection
-----------------------------------
Command:
python3 .trellis/scripts/pv_modeling.py inspect-native .
The command reported 24 declarations and wrote its full index to:
.trellis/scratch/inspect-native-1790260978718245524.json
SHA-256 identities:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692 generated.lean
1e4419e9c0fff857cbff6848d8e4d0b54267d4f2f3307ee139f058f88930ee77 .trellis/scratch/inspect-native-1790260978718245524.json
These identities are reproduced with:
sha256sum generated.lean \
.trellis/scratch/inspect-native-1790260978718245524.json
The exact U64 Shl entry in that fresh index is:
name: U64.Insts.CoreOpsBitShlU32U64.shl
extracted_signature: : Std.U64 → Std.U32 → Result Std.U64
rust_symbol: core::ops::bit::{impl core::ops::bit::Shl<u32, u64> for u64}::shl
source: /rustc/library/core/src/ops/bit.rs, lines 489:12-489:41
raw_declaration_sha256: e025ae44955b09fe95d7d8e997cb0ecafdfeea85b78bf40427e6f9bb14bb985d
The indexed raw declaration is:
/-- [core::ops::bit::{impl core::ops::bit::Shl<u32, u64> for u64}::shl]:
Source: '/rustc/library/core/src/ops/bit.rs', lines 489:12-489:41
Name pattern: [core::ops::bit::{core::ops::bit::Shl<u64, u32, u64>}::shl]
Visibility: public -/
@[rust_fun "core::ops::bit::{core::ops::bit::Shl<u64, u32, u64>}::shl"]
axiom U64.Insts.CoreOpsBitShlU32U64.shl
: Std.U64 → Std.U32 → Result Std.U64
The declaration hash is reproduced directly from the fresh JSON index by:
jq -jr '.declarations[] | select(.name ==
"U64.Insts.CoreOpsBitShlU32U64.shl") | .source_utf8' \
.trellis/scratch/inspect-native-1790260978718245524.json | sha256sum
Output:
e025ae44955b09fe95d7d8e997cb0ecafdfeea85b78bf40427e6f9bb14bb985d -
Thus this boundary is specifically u64 shifted by u32, and its extracted
codomain is the Aeneas Result used below to distinguish normal return from
checked overflow.
2. Approved Rust implementation and build mode
-----------------------------------------------
Toolchain and compiler identity:
toolchain: nightly-2026-06-01-x86_64-unknown-linux-gnu
rustc path: /home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
rustc SHA-256: 162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
rustc 1.98.0-nightly (14210df0e 2026-05-31)
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
host: x86_64-unknown-linux-gnu
Reproduction commands:
RUSTC=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
"$RUSTC" -vV
"$RUSTC" --print sysroot
sha256sum "$RUSTC"
The installed rust-src component is under that same sysroot. Its relevant
file and identity are:
path: /home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/bit.rs
SHA-256: 31db8c3d227e01a9f60f37221d258dc1b2c8274163264602837bb3f3851c2a4d
The file identity and source are reproduced with:
RUSTSRC="$($RUSTC --print sysroot)/lib/rustlib/src/rust/library/core/src/ops/bit.rs"
sha256sum "$RUSTSRC"
nl -ba "$RUSTSRC" | sed -n '479,520p'
Lines 479-498 define the implementation macro:
macro_rules! shl_impl {
($t:ty, $f:ty) => {
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shl<$f> for $t {
type Output = $t;
#[inline]
#[track_caller]
#[rustc_inherit_overflow_checks]
fn shl(self, other: $f) -> $t {
self << other
}
}
forward_ref_binop! { impl Shl, shl for $t, $f,
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
};
}
Lines 500-518 apply `shl_impl! { $t, u32 }` to every type in
`shl_impl_all!`, and instantiate that outer macro with `u64` among its types:
macro_rules! shl_impl_all {
($($t:ty)*) => ($(
shl_impl! { $t, u8 }
shl_impl! { $t, u16 }
shl_impl! { $t, u32 }
shl_impl! { $t, u64 }
shl_impl! { $t, u128 }
shl_impl! { $t, usize }
...
)*)
}
shl_impl_all! { u8 u16 u32 u64 u128 usize i8 i16 i32 i64 i128 isize }
Therefore the inspected symbol has exactly this method body for `Shl<u32> for
u64`, and `#[rustc_inherit_overflow_checks]` makes its primitive `self << other`
use the calling crate's overflow-check mode.
The frozen configuration identities are:
2040ce5dc92c51b5245113f97682b692b876aa57708b5c7c483425ba152943c8 crate/Cargo.toml
a45e9bc0c57213e415eb8fa5cec983c44259d336522e6eec8760e7237b7779d7 modeling-input/extraction.json
2fc182c0c7acccad30c449ca349b999759b84e8ed4ec9d590e8295e43eeec077 modeling-input/manifest.json
68fc7ab89dac4e5389a286b36d919fde5481b2c5673fc7006c7f693afd6ceedf modeling-input/tool-identities.json
They are reproduced by `sha256sum` on those four paths. Cargo.toml lines
18-22 set `overflow-checks = true` in both the development and release
profiles. modeling-input/SETUP.md lines 17-22 record that extraction uses the
development profile with overflow checks enabled. The frozen
modeling-input/extraction.json is:
{"crate":"crate","cargo_args":[],"charon_args":[],"aeneas_args":[]}
so no extraction argument disables that setting. The manifest pins
`RUSTUP_TOOLCHAIN=nightly-2026-06-01` and the exact cargo/rustc toolchain. There
is no `panic` override in Cargo.toml; the approved rustc's default target cfg,
reproduced by `"$RUSTC" --print cfg`, includes:
panic="unwind"
target_arch="x86_64"
target_pointer_width="64"
Thus the frozen build uses checked shifts and unwinding panics.
3. Same-toolchain checked-shift probe and MIR
---------------------------------------------
The durable probe source is:
reference/model-evidence/u64-shl-probe.rs
with SHA-256:
a0f0f822b3ea216799bb900835341f6117d47b59b9d6ad3d9cbc3af07e2792a8
It places the same primitive expression `x << count` in a non-inlined function,
runs it on representative boundary counts while catching unwinding panics, and
does not mask or reduce the count. Reproduce it from the repository root with:
RUSTC=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
cd .trellis/scratch
"$RUSTC" -C overflow-checks=yes -C panic=unwind \
../../reference/model-evidence/u64-shl-probe.rs -o u64-shl-probe
./u64-shl-probe
"$RUSTC" -C overflow-checks=yes -C panic=unwind --emit=mir=u64-shl-probe.mir \
../../reference/model-evidence/u64-shl-probe.rs
sed -n '/fn shift(/,/^}/p' u64-shl-probe.mir
Runtime output:
count=0 ok=0x8000000000000001
count=1 ok=0x0000000000000002
count=52 ok=0x0010000000000000
count=63 ok=0x8000000000000000
count=64 panic
count=65 panic
count=4294967295 panic
The same invocation emits this MIR for the complete dynamic-count function:
fn shift(_1: u64, _2: u32) -> u64 {
debug x => _1;
debug count => _2;
let mut _0: u64;
let mut _3: bool;
bb0: {
_3 = Lt(copy _2, const 64_u32);
assert(move _3, "attempt to shift left by `{}`, which would overflow", copy _2) -> [success: bb1, unwind continue];
}
bb1: {
_0 = Shl(copy _1, copy _2);
return;
}
}
The MIR is general in both arguments: exactly when `count < 64`, control reaches
the U64 `Shl` operation and returns its bounded 64-bit result; otherwise the
assertion takes its unwind edge. The runtime boundary observations confirm
that the configured panic strategy makes that failure catchable at 64, 65, and
the largest U32 count, while counts 0, 1, 52, and 63 return normally with the
expected truncation to 64 bits.
4. Pinned Aeneas carrier and shift meaning
------------------------------------------
Repository and translator identity:
repository: https://github.com/AeneasVerif/aeneas.git
revision: fa699427cdfa8f604b891fb0223ef42883dd7dc4
aeneas binary SHA-256: 9f446d2aaf59e8e705e36d05cb993f1c6ab0e97f8dc6fd2f19907a86ede30922
Reproduction commands (substitute each relative path below for PATH):
AENEAS=/home/leanagent/pv_spike/tools/aeneas
git -C "$AENEAS" rev-parse HEAD
git -C "$AENEAS" remote -v
sha256sum "$AENEAS/bin/aeneas"
git -C "$AENEAS" diff --quiet fa699427cdfa8f604b891fb0223ef42883dd7dc4 -- PATH
sha256sum "$AENEAS/PATH"
git -C "$AENEAS" ls-tree fa699427cdfa8f604b891fb0223ef42883dd7dc4 PATH
The `git diff --quiet` command returned status 0 for every file below, so each
inspected worktree file is the file at the pinned revision.
File:
backends/lean/Aeneas/Std/Scalar/Core.lean
SHA-256: a1c26c125a59bba635a2b2c170186ce07168c43308bcf386d508ebd77f01520e
git blob: f8582928fe49a0ce75e143b46bb0a8826d7fddae
Lines 28-34, 45-53, 65-71, 90-95, and 650-656 define:
inductive UScalarTy where
| Usize
| U8
| U16
| U32
| U64
| U128
def UScalarTy.numBits (ty : UScalarTy) : Nat :=
match ty with
| Usize => System.Platform.numBits
| U8 => 8
| U16 => 16
| U32 => 32
| U64 => 64
| U128 => 128
structure UScalar (ty : UScalarTy) where
bv : BitVec ty.numBits
def UScalar.val {ty} (x : UScalar ty) : Nat := x.bv.toNat
irreducible_def UScalar.size (ty : UScalarTy) : Nat := 2^ty.numBits
abbrev U32 := UScalar .U32
abbrev U64 := UScalar .U64
Thus Std.U64 contains exactly a 64-bit vector, Std.U32 contains exactly a
32-bit vector, and the count's `val` ranges over the full U32 domain.
File:
backends/lean/Aeneas/Std/Scalar/Bitwise.lean
SHA-256: 63e4b1d0906c972fb4fef953d8d8a60410dcf5313261d2583b1170b4a1a5ce29
git blob: d3eb5022efc22d1d6c3ac055965f612c7f2fbca9
Lines 17-21 and 29-31 define:
def UScalar.shiftLeft {ty : UScalarTy} (x : UScalar ty) (s : Nat) :
Result (UScalar ty) :=
if s < ty.numBits then
ok ⟨ x.bv.shiftLeft s ⟩
else fail .integerOverflow
def UScalar.shiftLeft_UScalar {ty tys} (x : UScalar ty) (s : UScalar tys) :
Result (UScalar ty) :=
x.shiftLeft s.val
Lines 81-82 resolve the notation used by Tablet/ModelU64Shl.lean:
instance {ty0 ty1} : HShiftLeft (UScalar ty0) (UScalar ty1)
(Result (UScalar ty0)) where
hShiftLeft x y := UScalar.shiftLeft_UScalar x y
Consequently `x <<< y` for `x : Std.U64` and `y : Std.U32` tests exactly
`y.val < 64`: below 64 it is `ok` of the 64-bit vector shift; at least 64 it is
exactly `fail .integerOverflow`.
The same file's `UScalar.ShiftLeft_spec`, lines 193-205, proves the successful
branch has both equivalent bounded descriptions:
theorem UScalar.ShiftLeft_spec ... (hy : y.val < ty0.numBits) ... :
(x <<< y) ⦃ z =>
z.val = (x.val <<< y.val) % size ∧
z.bv = x.bv <<< y.val ⦄
For U64, `size` is `2^64`; hence the returned natural value is the mathematical
left shift reduced modulo `2^64`, and the returned carrier is exactly the
corresponding 64-bit vector.
File:
backends/lean/Aeneas/Data/BitVec.lean
SHA-256: 66d6e1922a45beff2d75e71e10dc6e8294c7cbf69f95b22dc22f98c5667382a7
git blob: f7bc57109569cdd0fb0c3323021c73673dcfcd33
Its lines 248-266 give the bit-level characterization: every result bit below
the shift count (or outside the fixed width) is false, and every in-width bit at
or above the count equals the corresponding input bit at index `i - n`:
theorem BitVec.getElem!_shiftLeft_false ...
(h : i < n ∨ w ≤ i) : (v <<< n)[i]! = false
theorem BitVec.getElem!_shiftLeft_eq ...
(h : n ≤ i ∧ i < w) : (v <<< n)[i]! = v[i - n]!
Finally, the model's failure constructor is pinned in:
backends/lean/Aeneas/Std/Primitives.lean
SHA-256: f3e9dc9ee62646d579b97747725c07f18760498601b5a37e48031d2f4893035a
git blob: e5733a774268c8dee71bd4ba402240d151bb8cb8
Lines 50-64 include the distinct `Error.integerOverflow` constructor and
`Result.fail`. Therefore the at-least-64 branch is the explicit Aeneas checked
integer-overflow failure, not a wrapping or masked shift.
5. Case-by-case preservation conclusion
----------------------------------------
Let x be any source/model U64 word and n any source/model U32 count; the carrier
definitions above identify their bits and numeric values exactly.
If n < 64, the Rust checked-shift assertion succeeds and the source method runs
the primitive U64 shift. The Aeneas branch condition also succeeds and returns
`ok` of `BitVec.shiftLeft n`. `UScalar.ShiftLeft_spec` and the BitVec lemmas
identify both results as the same 64-bit word, equivalently `(x * 2^n) mod
2^64`, with discarded high bits and zero-filled low bits.
If n >= 64, the configured Rust operation takes the checked-overflow panic
edge. The Aeneas branch condition fails and returns `fail .integerOverflow`,
the extracted Result representation of that checked shift failure. This holds
for the entire remaining U32 range, including counts larger than 64; it is not
restricted to counts reached by current parser executions.
Thus Tablet/ModelU64Shl preserves both the normal result and checked-failure
observations of the exact extracted Rust operation on its full U64 x U32 input
domain.
Requirements depending on this item (32)
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
All 32 entries
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
- Exponent agreement
- Correctness or defer
- Native correctness or defer
- Numeric acceptance
- Accumulated-value diagnostic
- Record bounds
- Invalid rejection
- Accumulated-value diagnostic
- Equal-target bridge
- Exact rounding
- Infinity
- Invalid rejection
- NaN acceptance
- No spurious NaNs
- Numeric acceptance
- Numeric sign
- Selected exponent range
- Selected magnitude sign
- Signed zero
- Totality
- Rounding determinism
- Rounding totality
- Full-significand diagnostic
- Infinity
- NaN
- Rejection
These requirements are linked to this item through the declared dependencies of their proofs.
Record details
| Record source | Tablet/model-support.json |
|---|---|
| Kind | opaque external binding |
| Preservation assessment origin | VerifierPanel |
| Preservation fingerprint | preservation-v1:5fa186f1ba85a910a4daeead1fc5ece1941ceff928de965578e844f5290e3969 |
| Preservation current fingerprint | preservation-v1:5fa186f1ba85a910a4daeead1fc5ece1941ceff928de965578e844f5290e3969 |
| Preservation freshness | matches current fingerprint |
| Correspondence approved fingerprint | {"own_tex":"b63ed97847770538f9391ba01e7547e6610c166290a0dada3d38eec1119a9ee6","lean_semantic_closure":"bbcd776bcbece10394a6604d8dbf65a3358ba69df0a542ed3aebad167aa0eca9","preamble_tex":""} |
| Correspondence current fingerprint | {"own_tex":"b63ed97847770538f9391ba01e7547e6610c166290a0dada3d38eec1119a9ee6","lean_semantic_closure":"bbcd776bcbece10394a6604d8dbf65a3358ba69df0a542ed3aebad167aa0eca9","preamble_tex":""} |
| Correspondence freshness | matches current fingerprint |
Exact preservation assessment
{
"status": "VerifierPass",
"origin": "VerifierPanel",
"fingerprints": {
"own_tex_hash": "4518534ea98e8d5c8c472bf747f5a4b4cf4afae768469797f22e27683311ab7c",
"dep_statement_hashes": {},
"combined_sound_fp": "preservation-v1:5fa186f1ba85a910a4daeead1fc5ece1941ceff928de965578e844f5290e3969"
},
"lane_votes": {
"v1": "Pass"
},
"reviewer_action_id": null
}Exact source record
{
"name": "U64.Insts.CoreOpsBitShlU32U64.shl",
"extracted_signature": ": Std.U64 → Std.U32 → Result Std.U64",
"rust_symbol": "core::ops::bit::{impl core::ops::bit::Shl<u32, u64> for u64}::shl",
"raw_declaration_sha256": "e025ae44955b09fe95d7d8e997cb0ecafdfeea85b78bf40427e6f9bb14bb985d",
"node": "ModelU64Shl",
"declaration": "dec2flt_model.ModelU64Shl"
}Captured evidence identities
[
{
"path": "reference/model-evidence/u64-shl-probe.rs",
"sha256": "a0f0f822b3ea216799bb900835341f6117d47b59b9d6ad3d9cbc3af07e2792a8",
"cited_by": [
"reference/model-evidence/u64-shl.txt"
]
},
{
"path": "reference/model-evidence/u64-shl.txt",
"sha256": "593dcbd60193d0e136d5fdf8f8241aa6c66f3f696a952dbc772d7fb0d4412ddc",
"cited_by": [
"Tablet/ModelU64Shl.tex",
"Tablet/model-support.json"
]
}
]core::ops::bit::{impl core::ops::bit::Shr<u32, u64> for u64}::shr
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.
| Rust item | core::ops::bit::{impl core::ops::bit::Shr<u32, u64> for u64}::shr |
|---|---|
| Recorded source | /rustc/library/core/src/ops/bit.rs |
| Lines | 612:12–612:41 |
The related-source link includes this operation’s Rust standard-library implementation.
Opaque extraction signature
: Std.U64 → Std.U32 → Result Std.U64Lean 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
Why this model is faithful
Definition
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.Authored arguments for individual requirements
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
Recorded review
| Correspondence | Pass |
|---|---|
| Preservation | VerifierPass |
ModelU64Shr · Lean checked
Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
reference/model-evidence/u64-shr-probe.rs
use std::panic::{catch_unwind, AssertUnwindSafe};
#[inline(never)]
fn shift(x: u64, count: u32) -> u64 {
x >> count
}
fn observe(x: u64, count: u32) {
match catch_unwind(AssertUnwindSafe(|| shift(x, count))) {
Ok(value) => println!("count={count} ok={value:#018x}"),
Err(_) => println!("count={count} panic"),
}
}
fn main() {
std::panic::set_hook(Box::new(|_| {}));
let x = 0x8000_0000_0000_0001_u64;
for count in [0, 1, 52, 63, 64, 65, u32::MAX] {
observe(x, count);
}
}
reference/model-evidence/u64-shr.txt
U64 Shr preservation evidence
=============================
Scope
-----
This record pins the source-to-model chain for the external declaration bound
to Tablet/ModelU64Shr. The commands below were run from the repository root on
2026-09-24. They use the frozen generated.lean, extraction configuration, and
approved tools recorded in modeling-input/manifest.json and
modeling-input/tool-identities.json. The two semantic cases are both in scope:
all U32 counts below 64 return a logical U64 right shift, and all U32 counts at
least 64 encounter the enabled checked-shift failure.
1. Fresh native-boundary inspection
-----------------------------------
Command:
python3 .trellis/scripts/pv_modeling.py inspect-native .
The command reported 24 declarations and wrote its full index to:
.trellis/scratch/inspect-native-1790262316075577976.json
SHA-256 identities:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692 generated.lean
1e4419e9c0fff857cbff6848d8e4d0b54267d4f2f3307ee139f058f88930ee77 .trellis/scratch/inspect-native-1790262316075577976.json
These identities are reproduced with:
sha256sum generated.lean \
.trellis/scratch/inspect-native-1790262316075577976.json
The exact U64 Shr entry in that fresh index is:
name: U64.Insts.CoreOpsBitShrU32U64.shr
extracted_signature: : Std.U64 -> Std.U32 -> Result Std.U64
rust_symbol: core::ops::bit::{impl core::ops::bit::Shr<u32, u64> for u64}::shr
source: /rustc/library/core/src/ops/bit.rs, lines 612:12-612:41
raw_declaration_sha256: 77bb0909a8e98b3624eb10ad550c04968db2c68776dcd3da10fb338b029a7c1f
The indexed raw declaration is:
/-- [core::ops::bit::{impl core::ops::bit::Shr<u32, u64> for u64}::shr]:
Source: '/rustc/library/core/src/ops/bit.rs', lines 612:12-612:41
Name pattern: [core::ops::bit::{core::ops::bit::Shr<u64, u32, u64>}::shr]
Visibility: public -/
@[rust_fun "core::ops::bit::{core::ops::bit::Shr<u64, u32, u64>}::shr"]
axiom U64.Insts.CoreOpsBitShrU32U64.shr
: Std.U64 -> Std.U32 -> Result Std.U64
The declaration hash is reproduced directly from the fresh JSON index by:
jq -jr '.declarations[] | select(.name ==
"U64.Insts.CoreOpsBitShrU32U64.shr") | .source_utf8' \
.trellis/scratch/inspect-native-1790262316075577976.json | sha256sum
Output:
77bb0909a8e98b3624eb10ad550c04968db2c68776dcd3da10fb338b029a7c1f -
Tablet/model-support.json binds precisely this indexed declaration and
signature to dec2flt_model.ModelU64Shr. Thus the boundary is specifically u64
shifted by u32, and its extracted codomain is the Aeneas Result used below to
distinguish normal return from checked overflow.
2. Approved Rust implementation and build mode
-----------------------------------------------
Toolchain and compiler identity:
toolchain: nightly-2026-06-01-x86_64-unknown-linux-gnu
rustc path: /home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
rustc SHA-256: 162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
rustc 1.98.0-nightly (14210df0e 2026-05-31)
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
host: x86_64-unknown-linux-gnu
Reproduction commands:
RUSTC=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
"$RUSTC" -vV
"$RUSTC" --print sysroot
sha256sum "$RUSTC"
The installed rust-src component is under that same sysroot. Its relevant
file and identity are:
path: /home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/bit.rs
SHA-256: 31db8c3d227e01a9f60f37221d258dc1b2c8274163264602837bb3f3851c2a4d
The file identity and source are reproduced with:
RUSTSRC="$($RUSTC --print sysroot)/lib/rustlib/src/rust/library/core/src/ops/bit.rs"
sha256sum "$RUSTSRC"
nl -ba "$RUSTSRC" | sed -n '602,641p'
Lines 602-620 define the implementation macro:
macro_rules! shr_impl {
($t:ty, $f:ty) => {
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")]
const impl Shr<$f> for $t {
type Output = $t;
#[inline]
#[track_caller]
#[rustc_inherit_overflow_checks]
fn shr(self, other: $f) -> $t {
self >> other
}
}
forward_ref_binop! { impl Shr, shr for $t, $f,
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_ops", issue = "143802")] }
};
}
Lines 623-641 apply `shr_impl! { $t, u32 }` to every type in
`shr_impl_all!`, and instantiate that outer macro with `u64` among its types:
macro_rules! shr_impl_all {
($($t:ty)*) => ($(
shr_impl! { $t, u8 }
shr_impl! { $t, u16 }
shr_impl! { $t, u32 }
shr_impl! { $t, u64 }
shr_impl! { $t, u128 }
shr_impl! { $t, usize }
...
)*)
}
shr_impl_all! { u8 u16 u32 u64 u128 usize i8 i16 i32 i64 i128 isize }
Therefore the inspected symbol has exactly this method body for `Shr<u32> for
u64`, and `#[rustc_inherit_overflow_checks]` makes its primitive `self >> other`
use the calling crate's overflow-check mode.
The frozen configuration identities are:
2040ce5dc92c51b5245113f97682b692b876aa57708b5c7c483425ba152943c8 crate/Cargo.toml
a45e9bc0c57213e415eb8fa5cec983c44259d336522e6eec8760e7237b7779d7 modeling-input/extraction.json
2fc182c0c7acccad30c449ca349b999759b84e8ed4ec9d590e8295e43eeec077 modeling-input/manifest.json
68fc7ab89dac4e5389a286b36d919fde5481b2c5673fc7006c7f693afd6ceedf modeling-input/tool-identities.json
They are reproduced by `sha256sum` on those four paths. Cargo.toml lines
18-22 set `overflow-checks = true` in both the development and release
profiles. modeling-input/SETUP.md lines 17-22 record that extraction uses the
development profile with overflow checks enabled. The frozen
modeling-input/extraction.json is:
{"crate":"crate","cargo_args":[],"charon_args":[],"aeneas_args":[]}
so no extraction argument disables that setting. The manifest pins
`RUSTUP_TOOLCHAIN=nightly-2026-06-01` and the exact cargo/rustc toolchain. There
is no `panic` override in Cargo.toml; the approved rustc's default target cfg,
reproduced by `"$RUSTC" --print cfg`, includes:
panic="unwind"
target_arch="x86_64"
target_pointer_width="64"
Thus the frozen build uses checked shifts and unwinding panics.
3. Same-toolchain checked-shift probe and MIR
---------------------------------------------
The durable probe source is:
reference/model-evidence/u64-shr-probe.rs
with SHA-256:
11f10c4d4eb07e9aaa518e6e08a52796814b6f29d09e2ada5138e61f70551fee
It places the same primitive expression `x >> count` in a non-inlined function,
runs it on representative boundary counts while catching unwinding panics, and
does not mask or reduce the count. Reproduce it from the repository root with:
RUSTC=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
cd .trellis/scratch
"$RUSTC" -C overflow-checks=yes -C panic=unwind \
../../reference/model-evidence/u64-shr-probe.rs -o u64-shr-probe
./u64-shr-probe
"$RUSTC" -C overflow-checks=yes -C panic=unwind --emit=mir=u64-shr-probe.mir \
../../reference/model-evidence/u64-shr-probe.rs
sed -n '/fn shift(/,/^}/p' u64-shr-probe.mir
Runtime output:
count=0 ok=0x8000000000000001
count=1 ok=0x4000000000000000
count=52 ok=0x0000000000000800
count=63 ok=0x0000000000000001
count=64 panic
count=65 panic
count=4294967295 panic
The same invocation emits this MIR for the complete dynamic-count function:
fn shift(_1: u64, _2: u32) -> u64 {
debug x => _1;
debug count => _2;
let mut _0: u64;
let mut _3: bool;
bb0: {
_3 = Lt(copy _2, const 64_u32);
assert(move _3, "attempt to shift right by `{}`, which would overflow", copy _2) -> [success: bb1, unwind continue];
}
bb1: {
_0 = Shr(copy _1, copy _2);
return;
}
}
The MIR is general in both arguments: exactly when `count < 64`, control reaches
the U64 `Shr` operation and returns its logical 64-bit result; otherwise the
assertion takes its unwind edge. The runtime boundary observations confirm
that the configured panic strategy makes that failure catchable at 64, 65, and
the largest U32 count, while counts 0, 1, 52, and 63 return normally with
zero-filled high bits.
4. Pinned Aeneas carrier and shift meaning
------------------------------------------
Repository and translator identity:
repository: https://github.com/AeneasVerif/aeneas.git
revision: fa699427cdfa8f604b891fb0223ef42883dd7dc4
aeneas binary SHA-256: 9f446d2aaf59e8e705e36d05cb993f1c6ab0e97f8dc6fd2f19907a86ede30922
Reproduction commands (substitute each relative path below for PATH):
AENEAS=/home/leanagent/pv_spike/tools/aeneas
git -C "$AENEAS" rev-parse HEAD
git -C "$AENEAS" remote -v
sha256sum "$AENEAS/bin/aeneas"
git -C "$AENEAS" diff --quiet fa699427cdfa8f604b891fb0223ef42883dd7dc4 -- PATH
sha256sum "$AENEAS/PATH"
git -C "$AENEAS" ls-tree fa699427cdfa8f604b891fb0223ef42883dd7dc4 PATH
The `git diff --quiet` command returned status 0 for every file below, so each
inspected worktree file is the file at the pinned revision.
File:
backends/lean/Aeneas/Std/Scalar/Core.lean
SHA-256: a1c26c125a59bba635a2b2c170186ce07168c43308bcf386d508ebd77f01520e
git blob: f8582928fe49a0ce75e143b46bb0a8826d7fddae
Lines 28-34, 45-53, 65-71, 90-95, and 650-656 define:
inductive UScalarTy where
| Usize
| U8
| U16
| U32
| U64
| U128
def UScalarTy.numBits (ty : UScalarTy) : Nat :=
match ty with
| Usize => System.Platform.numBits
| U8 => 8
| U16 => 16
| U32 => 32
| U64 => 64
| U128 => 128
structure UScalar (ty : UScalarTy) where
bv : BitVec ty.numBits
def UScalar.val {ty} (x : UScalar ty) : Nat := x.bv.toNat
irreducible_def UScalar.size (ty : UScalarTy) : Nat := 2^ty.numBits
abbrev U32 := UScalar .U32
abbrev U64 := UScalar .U64
Thus Std.U64 contains exactly a 64-bit vector, Std.U32 contains exactly a
32-bit vector, and the count's `val` ranges over the full U32 domain.
File:
backends/lean/Aeneas/Std/Scalar/Bitwise.lean
SHA-256: 63e4b1d0906c972fb4fef953d8d8a60410dcf5313261d2583b1170b4a1a5ce29
git blob: d3eb5022efc22d1d6c3ac055965f612c7f2fbca9
Lines 23-35 define:
def UScalar.shiftRight {ty : UScalarTy} (x : UScalar ty) (s : Nat) :
Result (UScalar ty) :=
if s < ty.numBits then
ok ⟨ x.bv.ushiftRight s ⟩
else fail .integerOverflow
def UScalar.shiftRight_UScalar {ty tys} (x : UScalar ty)
(s : UScalar tys) : Result (UScalar ty) :=
x.shiftRight s.val
Lines 93-94 resolve the notation used by Tablet/ModelU64Shr.lean:
instance {ty0 ty1} : HShiftRight (UScalar ty0) (UScalar ty1)
(Result (UScalar ty0)) where
hShiftRight x y := UScalar.shiftRight_UScalar x y
Consequently `x >>> y` for `x : Std.U64` and `y : Std.U32` tests exactly
`y.val < 64`: below 64 it is `ok` of the unsigned 64-bit vector shift; at least
64 it is exactly `fail .integerOverflow`.
The same file's `UScalar.ShiftRight_spec`, lines 166-174, proves the successful
branch has both equivalent logical-shift descriptions:
theorem UScalar.ShiftRight_spec ... (hy : y.val < ty0.numBits) :
(x >>> y) ⦃ z =>
z.val = x.val >>> y.val ∧
z.bv = x.bv >>> y.val ⦄
Here natural-number `>>>` is division by `2^y.val`, so the returned numeric
value is `floor(x.val / 2^y.val)`, and the returned carrier is exactly the
unsigned shift of the fixed-width bit vector.
File:
backends/lean/Aeneas/Data/BitVec.lean
SHA-256: 66d6e1922a45beff2d75e71e10dc6e8294c7cbf69f95b22dc22f98c5667382a7
git blob: f7bc57109569cdd0fb0c3323021c73673dcfcd33
Its lines 268-283 give the bit-level logical zero-fill characterization. For
every result position, the total bit lookup is the input bit at the offset
position; positions whose offset is outside the 64-bit input are false:
theorem BitVec.getElem!_shiftRight {w} (v : BitVec w) (n i : Nat) :
(v >>> n)[i]! = v[n + i]!
theorem BitVec.getElem_shiftRight_false {m n : Nat} (v : BitVec m)
(hm : i < m) (h : m <= n + i) :
(v >>> n)[i]'hm = false
Together with `BitVec.getElem_shiftRight_lt`, this states that every in-range
source bit moves downward by the count and every newly exposed high bit is
zero. Because the carrier is unsigned, there is no sign extension.
Finally, the model's failure constructor is pinned in:
backends/lean/Aeneas/Std/Primitives.lean
SHA-256: f3e9dc9ee62646d579b97747725c07f18760498601b5a37e48031d2f4893035a
git blob: e5733a774268c8dee71bd4ba402240d151bb8cb8
Lines 50-64 include the distinct `Error.integerOverflow` constructor and
`Result.fail`. Therefore the at-least-64 branch is the explicit Aeneas checked
integer-overflow failure, not a wrapping or masked shift.
5. Case-by-case preservation conclusion
----------------------------------------
Let x be any source/model U64 word and n any source/model U32 count; the carrier
definitions above identify their bits and numeric values exactly.
If n < 64, the Rust checked-shift assertion succeeds and the source method runs
the primitive unsigned U64 right shift. The Aeneas branch condition also
succeeds and returns `ok` of `BitVec.ushiftRight n`. `UScalar.ShiftRight_spec`
and the BitVec lemmas identify both results as the same 64-bit word,
equivalently `floor(x / 2^n)`, with every newly exposed high bit filled by zero.
If n >= 64, the configured Rust operation takes the checked-overflow panic
edge. The Aeneas branch condition fails and returns `fail .integerOverflow`,
the extracted Result representation of that checked shift failure. This holds
for the entire remaining U32 range, including counts larger than 64; it is not
restricted to counts reached by current parser executions.
Thus Tablet/ModelU64Shr preserves both the normal result and checked-failure
observations of the exact extracted Rust operation on its full U64 x U32 input
domain.
Assumptions / kernel axioms
- propext
conservative transitive union of saved axiom observations across node dependencies
Requirements depending on this item (32)
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
All 32 entries
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
- Exponent agreement
- Correctness or defer
- Native correctness or defer
- Numeric acceptance
- Accumulated-value diagnostic
- Record bounds
- Invalid rejection
- Accumulated-value diagnostic
- Equal-target bridge
- Exact rounding
- Infinity
- Invalid rejection
- NaN acceptance
- No spurious NaNs
- Numeric acceptance
- Numeric sign
- Selected exponent range
- Selected magnitude sign
- Signed zero
- Totality
- Rounding determinism
- Rounding totality
- Full-significand diagnostic
- Infinity
- NaN
- Rejection
These requirements are linked to this item through the declared dependencies of their proofs.
Record details
| Record source | Tablet/model-support.json |
|---|---|
| Kind | opaque external binding |
| Preservation assessment origin | VerifierPanel |
| Preservation fingerprint | preservation-v1:df243e9b386af64c08bbdc3d95d4d059573c1c0ab93b3b701f5c75e3db337491 |
| Preservation current fingerprint | preservation-v1:df243e9b386af64c08bbdc3d95d4d059573c1c0ab93b3b701f5c75e3db337491 |
| Preservation freshness | matches current fingerprint |
| Correspondence approved fingerprint | {"own_tex":"5ad44572d12a36ad385208a68bb9ccd600e8e297c44925442323eabdc625445e","lean_semantic_closure":"9a6c17e6318e8cad264124e8cc76df4b6f714d16b74dd7bd880882b2428694bf","preamble_tex":""} |
| Correspondence current fingerprint | {"own_tex":"5ad44572d12a36ad385208a68bb9ccd600e8e297c44925442323eabdc625445e","lean_semantic_closure":"9a6c17e6318e8cad264124e8cc76df4b6f714d16b74dd7bd880882b2428694bf","preamble_tex":""} |
| Correspondence freshness | matches current fingerprint |
Exact preservation assessment
{
"status": "VerifierPass",
"origin": "VerifierPanel",
"fingerprints": {
"own_tex_hash": "072d5bd7c4565d807febd6d3a8f1451bd1fdc64aa27c6cf49d9026c00bdaa422",
"dep_statement_hashes": {},
"combined_sound_fp": "preservation-v1:df243e9b386af64c08bbdc3d95d4d059573c1c0ab93b3b701f5c75e3db337491"
},
"lane_votes": {
"v1": "Pass"
},
"reviewer_action_id": null
}Exact source record
{
"name": "U64.Insts.CoreOpsBitShrU32U64.shr",
"extracted_signature": ": Std.U64 → Std.U32 → Result Std.U64",
"rust_symbol": "core::ops::bit::{impl core::ops::bit::Shr<u32, u64> for u64}::shr",
"raw_declaration_sha256": "77bb0909a8e98b3624eb10ad550c04968db2c68776dcd3da10fb338b029a7c1f",
"node": "ModelU64Shr",
"declaration": "dec2flt_model.ModelU64Shr"
}Captured evidence identities
[
{
"path": "reference/model-evidence/u64-shr-probe.rs",
"sha256": "11f10c4d4eb07e9aaa518e6e08a52796814b6f29d09e2ada5138e61f70551fee",
"cited_by": [
"reference/model-evidence/u64-shr.txt"
]
},
{
"path": "reference/model-evidence/u64-shr.txt",
"sha256": "17602b2331043582f916a9dad18d11fcef1175cc28e9784673b6928c22804710",
"cited_by": [
"Tablet/ModelU64Shr.tex",
"Tablet/model-support.json"
]
}
]core::option::{impl core::ops::try_trait::Try for core::option::Option<T>}::branch
Inspect related source (1)
- branch · core/src/option.rs:2779 Rust library
Related source and models come from the extraction records and declared dependencies.
| Rust item | core::option::{impl core::ops::try_trait::Try for core::option::Option<T>}::branch |
|---|---|
| Recorded source | /rustc/library/core/src/option.rs |
| Lines | 2779:4–2779:64 |
The related-source link includes this operation’s Rust standard-library implementation.
Opaque extraction signature
{T : Type} : Option T → Result (core.ops.control_flow.ControlFlow (Option core.convert.Infallible) T)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: ModelOptionBranch]
def ModelOptionBranch {T : Type} (x : Option T) :
Result (core.ops.control_flow.ControlFlow
(Option core.convert.Infallible) T) :=
-- BODY
match x with
| some v => ok (.Continue v)
| none => ok (.Break none)
end dec2flt_model
Why this model is faithful
Definition
Preservation argument
Claim
Proof
Authored arguments for individual requirements
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
Recorded review
| Correspondence | Pass |
|---|---|
| Preservation | VerifierPass |
ModelOptionBranch · Lean checked
Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
reference/model-evidence/binary64-boundary.txt
Primary evidence for the binary64 boundary
==========================================
Scope and identities
--------------------
This record concerns the frozen x86_64-unknown-linux-gnu extraction, the
adapted Rust crate retained in this repository, and the installed toolchain
named by modeling-input/SETUP.md. The probe source is retained at
reference/model-evidence/binary64-probe.rs; no scratch source is required to
reproduce it.
Toolchain executable:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
Target:
x86_64-unknown-linux-gnu
rustc executable SHA-256:
162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
Probe source SHA-256:
68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
Compiled probe SHA-256:
f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
Frozen generated.lean SHA-256:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692
Frozen modeling-input/manifest.json SHA-256:
2fc182c0c7acccad30c449ca349b999759b84e8ed4ec9d590e8295e43eeec077
Approved Binary64ModelDefault.lean SHA-256 at the time of this record:
03ae48fb631e6242bd21bf95d0481b66acae05f8cab343c7ab279b3c116538a3
Exact reproduction commands
---------------------------
Run from the repository root:
R=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
P=reference/model-evidence/binary64-probe.rs
B=.trellis/scratch/binary64-probe
"$R" --version --verbose
sha256sum "$R"
sha256sum "$P"
"$R" --target x86_64-unknown-linux-gnu -C opt-level=0 "$P" -o "$B"
sha256sum "$B"
"$B"
Raw output
----------
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
rustc_sha256=162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
probe_sha256=68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
binary_sha256=f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
target_arch=x86_64
mantissa_digits=53
exponent_mask=7ff0000000000000
mantissa_mask=000fffffffffffff
nan=7ff8000000000000
infinity=7ff0000000000000
neg_infinity=fff0000000000000
nan_category=Nan
infinity_category=Infinite
zero_category=Zero
subnormal_category=Subnormal
normal_category=Normal
from_bits_to_bits=7ff0000000000001
neg_payload_nan=fff0000000000001
neg_zero=8000000000000000
subnormal_tie_to_even_zero=0000000000000000
subnormal_tie_to_even_two=0000000000000002
normal_division=3fb999999999999a
mul_negative_zero=8000000000000000
div_negative_zero=8000000000000000
div_negative_infinity=fff0000000000000
mul_overflow=7ff0000000000000
mul_zero_infinity_is_nan=true
div_zero_zero_is_nan=true
mul_nan_is_nan=true
cast_2_pow_53=4340000000000000
cast_2_pow_53_plus_1=4340000000000000
Pinned Rust library sources
---------------------------
The installed sources below belong to the same named toolchain. Their
SHA-256 identities are:
core/src/primitive_docs.rs
c4b8627dd67d5dac8f383f383a9e7ff1229ea43e7599610fc61988694cf0f3e5
core/src/num/f64.rs
84540a6a59e347c63caabe12cf895ba1239c76a50682471567007138fac1c618
core/src/clone.rs
23f9cfc80347fde6b8457d46fbf7a2b8d9f34c8c58601b0b6f714ca2f6d1976b
The exact relevant text of core/src/primitive_docs.rs is:
#[rustc_doc_primitive = "f64"]
#[doc(alias = "double")]
/// A 64-bit floating-point type (specifically, the "binary64" type defined in IEEE 754-2008).
///
/// This type is very similar to [`prim@f32`], but has increased precision by using twice as many
/// bits. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on double-precision
/// values][wikipedia] for more information.
The referenced primitive-f32 documentation supplies the common primitive
floating-point operation rules quoted next:
/// - −0.0: IEEE 754 floating-point numbers have a bit that indicates their sign, so −0.0 is a
/// possible value. For comparison −0.0 = +0.0, but floating-point operations can carry
/// the sign bit through arithmetic operations. This means −0.0 × +0.0 produces −0.0 and
/// a negative number rounded to a value smaller than a float can represent also produces −0.0.
/// - [∞](#associatedconstant.INFINITY) and
/// [−∞](#associatedconstant.NEG_INFINITY): these result from calculations
/// like `1.0 / 0.0`.
///
/// When a primitive operation (addition, subtraction, multiplication, or
/// division) is performed on this type, the result is rounded according to the
/// roundTiesToEven direction defined in IEEE 754-2008. That means:
///
/// - The result is the representable value closest to the true value, if there
/// is a unique closest representable value.
/// - If the true value is exactly half-way between two representable values,
/// the result is the one with an even least-significant binary digit.
/// - If the true value's magnitude is ≥ `f32::MAX` + 2<sup>(`f32::MAX_EXP` −
/// `f32::MANTISSA_DIGITS` − 1)</sup>, the result is ∞ or −∞ (preserving the
/// true value's sign).
The same file explicitly separates arithmetic NaN choice from exact bitwise
operations; its exact relevant text is:
/// The rules for NaN values differ between *arithmetic* and *non-arithmetic* (or "bitwise")
/// operations. The non-arithmetic operations are unary `-`, `abs`, `copysign`, `signum`,
/// `{to,from}_bits`, `{to,from}_{be,le,ne}_bytes` and `is_sign_{positive,negative}`. These
/// operations are guaranteed to exactly preserve the bit pattern of their input except for possibly
/// changing the sign bit.
///
/// The following rules apply when a NaN value is returned from an arithmetic operation:
/// - The result has a non-deterministic sign.
/// - The quiet bit and payload are non-deterministically chosen from
/// the following set of options:
///
/// - **Preferred NaN**: The quiet bit is set and the payload is all-zero.
/// - **Quieting NaN propagation**: The quiet bit is set and the payload is copied from any input
/// operand that is a NaN. If the inputs and outputs do not have the same payload size (i.e., for
/// `as` casts), then
/// - If the output is smaller than the input, low-order bits of the payload get dropped.
/// - If the output is larger than the input, the payload gets filled up with 0s in the low-order
/// bits.
/// - **Unchanged NaN propagation**: The quiet bit and payload are copied from any input operand
/// that is a NaN. If the inputs and outputs do not have the same size (i.e., for `as` casts), the
/// same rules as for "quieting NaN propagation" apply, with one caveat: if the output is smaller
/// than the input, dropping the low-order bits may result in a payload of 0; a payload of 0 is not
/// possible with a signaling NaN (the all-0 significand encodes an infinity) so unchanged NaN
/// propagation cannot occur with some inputs.
/// - **Target-specific NaN**: The quiet bit is set and the payload is picked from a target-specific
/// set of "extra" possible NaN payloads. The set can depend on the input operand values.
/// See the table below for the concrete NaNs this set contains on various targets.
///
/// | `target_arch` | Extra payloads possible on this platform |
/// |---------------|------------------------------------------|
/// | `aarch64`, `arm`, `arm64ec`, `loongarch64`, `powerpc` (except when `target_abi = "spe"`), `powerpc64`, `riscv32`, `riscv64`, `s390x`, `x86`, `x86_64` | None |
Thus the model's preferred quiet NaN is one permitted result whenever
multiplication or division returns NaN. This does not claim that arbitrary
Rust arithmetic NaNs have those exact bits. By contrast, unary negation and
bit conversion must preserve all non-sign bits exactly, including for every
NaN payload.
The exact relevant declarations in core/src/num/f64.rs are:
pub const MANTISSA_DIGITS: u32 = 53;
pub const NAN: f64 = 0.0_f64 / 0.0_f64;
pub const INFINITY: f64 = 1.0_f64 / 0.0_f64;
pub const NEG_INFINITY: f64 = -1.0_f64 / 0.0_f64;
pub const SIGN_MASK: u64 = 0x8000_0000_0000_0000;
pub const EXPONENT_MASK: u64 = 0x7ff0_0000_0000_0000;
pub const MANTISSA_MASK: u64 = 0x000f_ffff_ffff_ffff;
pub const fn classify(self) -> FpCategory {
// We used to have complicated logic here that avoids the simple bit-based tests to work
// around buggy codegen for x87 targets (see
// https://github.com/rust-lang/rust/issues/114479). However, some LLVM versions later, none
// of our tests is able to find any difference between the complicated and the naive
// version, so now we are back to the naive version.
let b = self.to_bits();
match (b & Self::MANTISSA_MASK, b & Self::EXPONENT_MASK) {
(0, Self::EXPONENT_MASK) => FpCategory::Infinite,
(_, Self::EXPONENT_MASK) => FpCategory::Nan,
(0, 0) => FpCategory::Zero,
(_, 0) => FpCategory::Subnormal,
_ => FpCategory::Normal,
}
}
pub const fn to_bits(self) -> u64 {
// SAFETY: `u64` is a plain old datatype so we can always transmute to it.
unsafe { mem::transmute(self) }
}
pub const fn from_bits(v: u64) -> Self {
// It turns out the safety issues with sNaN were overblown! Hooray!
// SAFETY: `u64` is a plain old datatype so we can always transmute from it.
unsafe { mem::transmute(v) }
}
The exact scalar clone body in core/src/clone.rs is:
impl const Clone for $t {
#[inline(always)]
fn clone(&self) -> Self {
*self
}
}
Frozen adapted source
---------------------
The relevant retained source file hashes are:
crate/traits.rs
9013270fb846edcb0bdf2abd0353f575fdd727974cba9e89bdab8bb4c2b4f0bf
crate/dec2flt/mod.rs
b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012
crate/dec2flt/parse.rs
50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f
crate/dec2flt/decimal.rs
633658be803b7369b18feb098a8aa1b5f714a933d3b79ecbc4899a1b05f35beb
crate/dec2flt/lemire.rs
fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1
crate/dec2flt/slow.rs
93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485
Exact constant and bit-conversion excerpt from crate/traits.rs:
impl Float for f64 {
type Int = u64;
const INFINITY: Self = Self::INFINITY;
const NEG_INFINITY: Self = Self::NEG_INFINITY;
const NAN: Self = Self::NAN;
// Bit-identical to the upstream `-f64::NAN`, without the unsupported
// compile-time float negation.
const NEG_NAN: Self = f64::from_bits(0xFFF8_0000_0000_0000);
const BITS: u32 = 64;
const SIG_TOTAL_BITS: u32 = Self::MANTISSA_DIGITS;
const EXP_MASK: Self::Int = Self::EXPONENT_MASK;
const SIG_MASK: Self::Int = Self::MANTISSA_MASK;
fn to_bits(self) -> Self::Int {
self.to_bits()
}
fn classify(self) -> FpCategory {
self.classify()
}
}
impl FloatExt for f64 {
#[inline]
fn from_u64_bits(v: u64) -> Self {
f64::from_bits(v)
}
Exact derived-constant defaults from crate/traits.rs:
/// The number of bits in the significand, *excluding* the hidden bit.
const SIG_BITS: u32 = Self::SIG_TOTAL_BITS - 1;
/// Number of bits in the exponent.
const EXP_BITS: u32 = Self::BITS - Self::SIG_BITS - 1;
/// The saturated (maximum bitpattern) value of the exponent, i.e. the infinite
/// representation.
///
/// This shifted fully right, use `EXP_MASK` for the shifted value.
const EXP_SAT: u32 = (1 << Self::EXP_BITS) - 1;
/// Signed version of `EXP_SAT` since we convert a lot.
const INFINITE_POWER: i32 = Self::EXP_SAT as i32;
/// The exponent bias value. This is also the maximum value of the exponent.
const EXP_BIAS: u32 = Self::EXP_SAT >> 1;
/// Minimum exponent value of normal values.
const EXP_MIN: i32 = -(Self::EXP_BIAS as i32 - 1);
Together with the f64-instance lines `BITS = 64` and
`SIG_TOTAL_BITS = Self::MANTISSA_DIGITS` in the preceding excerpt, these
defaults derive SIG_BITS, EXP_MIN, and INFINITE_POWER from the primitive
mantissa-digit constant rather than introducing independent parameters.
Exact checked cast excerpt from crate/dec2flt/mod.rs:
#[inline]
// This method is precisely the source `u64 as f64` primitive conversion.
// Aeneas cannot translate that cast; opacity is confined to the cast while
// the fast-path algorithm, its range proof obligation, and all calls stay
// visible in the extracted model.
#[charon::opaque]
fn from_u64(v: u64) -> Self {
debug_assert!(v <= Self::MAX_MANTISSA_FAST_PATH);
v as _
}
Here MAX_MANTISSA_FAST_PATH is the retained default 1 << 53. Therefore the
source succeeds only through the modeled branch v <= 2^53 in this debug
configuration; above it the debug assertion fails before the cast. On the
successful branch every integer is exactly representable, so the source cast
and the model rounder return the same word.
Exact power-table and assembly excerpts from crate/dec2flt/mod.rs:
/// Maximum mantissa for the fast-path (`1 << 53` for f64).
const MAX_MANTISSA_FAST_PATH: u64 = 1 << Self::SIG_TOTAL_BITS;
const MAX_EXPONENT_FAST_PATH: i64 = 22;
const MIN_EXPONENT_FAST_PATH: i64 = -Self::MAX_EXPONENT_FAST_PATH;
const MAX_EXPONENT_DISGUISED_FAST_PATH: i64 = 37;
fn pow10_fast_path(exponent: usize) -> Self {
// These bit patterns are exactly the source table's rounded binary64
// literals. The match is the same masked lookup; it merely keeps float
// constants out of Aeneas's unsupported constant interpreter.
match exponent & 31 {
0 => f64::from_bits(0x3FF0_0000_0000_0000),
1 => f64::from_bits(0x4024_0000_0000_0000),
2 => f64::from_bits(0x4059_0000_0000_0000),
3 => f64::from_bits(0x408F_4000_0000_0000),
4 => f64::from_bits(0x40C3_8800_0000_0000),
5 => f64::from_bits(0x40F8_6A00_0000_0000),
6 => f64::from_bits(0x412E_8480_0000_0000),
7 => f64::from_bits(0x4163_12D0_0000_0000),
8 => f64::from_bits(0x4197_D784_0000_0000),
9 => f64::from_bits(0x41CD_CD65_0000_0000),
10 => f64::from_bits(0x4202_A05F_2000_0000),
11 => f64::from_bits(0x4237_4876_E800_0000),
12 => f64::from_bits(0x426D_1A94_A200_0000),
13 => f64::from_bits(0x42A2_309C_E540_0000),
14 => f64::from_bits(0x42D6_BCC4_1E90_0000),
15 => f64::from_bits(0x430C_6BF5_2634_0000),
16 => f64::from_bits(0x4341_C379_37E0_8000),
17 => f64::from_bits(0x4376_3457_85D8_A000),
18 => f64::from_bits(0x43AB_C16D_674E_C800),
19 => f64::from_bits(0x43E1_58E4_6091_3D00),
20 => f64::from_bits(0x4415_AF1D_78B5_8C40),
21 => f64::from_bits(0x444B_1AE4_D6E2_EF50),
22 => f64::from_bits(0x4480_F0CF_064D_D592),
_ => f64::from_bits(0),
}
}
fn biased_fp_to_float<F: FloatExt>(x: BiasedFp) -> F {
let mut word = x.m;
word |= (x.p_biased as u64) << F::SIG_BITS;
F::from_u64_bits(word)
}
Exact native-call excerpt from crate/dec2flt/decimal.rs:
fn can_use_fast_path<F: Lemire>(&self) -> bool {
F::MIN_EXPONENT_FAST_PATH <= self.exponent
&& self.exponent <= F::MAX_EXPONENT_DISGUISED_FAST_PATH
&& self.mantissa <= F::MAX_MANTISSA_FAST_PATH
&& !self.many_digits
}
if !self.can_use_fast_path::<F>() {
return None;
}
let value = if self.exponent <= F::MAX_EXPONENT_FAST_PATH {
// normal fast path
let value = F::from_u64(self.mantissa);
if self.exponent < 0 {
// Explicit trait calls preserve Rust arithmetic and resolve
// the generic output type that Charon leaves ambiguous.
core::ops::Div::div(value, F::pow10_fast_path((-self.exponent) as _))
} else {
core::ops::Mul::mul(value, F::pow10_fast_path(self.exponent as _))
}
} else {
// disguised fast path
let shift = self.exponent - F::MAX_EXPONENT_FAST_PATH;
let mantissa = self.mantissa.checked_mul(INT_POW10[shift as usize])?;
if mantissa > F::MAX_MANTISSA_FAST_PATH {
return None;
}
core::ops::Mul::mul(
F::from_u64(mantissa),
F::pow10_fast_path(F::MAX_EXPONENT_FAST_PATH as _),
)
};
if self.negative {
Some(core::ops::Neg::neg(value))
} else {
Some(value)
}
The preceding can_use_fast_path body, together with
MAX_MANTISSA_FAST_PATH = 1 << SIG_TOTAL_BITS and SIG_TOTAL_BITS = 53 for f64,
requires the exponent to lie between -22 and 37, the input mantissa to be at
most 2^53, and many_digits to be false. Consequently an ordinary arithmetic
call has a from_u64 operand in 0..=2^53. In its negative-exponent arm,
`-self.exponent` lies in 1..=22; in its nonnegative arm, `self.exponent` lies
in 0..=22. The disguised branch checks its multiplied mantissa against 2^53
before from_u64 and uses table index 22. The paired statement
Binary64NativeCallDomain does not assert this source reachability. It says
conditionally that a from_u64 argument at most 2^53 succeeds with a finite,
non-NaN word and that a table index at most 22 succeeds with a positive,
nonzero, finite, non-NaN word. Applying that conditional statement to the
guards just derived establishes those properties for the actual ordinary and
disguised calls, and in particular establishes that every executed divisor is
nonzero.
Exact special-value excerpt from crate/dec2flt/parse.rs:
let float = match (register, len) {
(INF_3, 3) => F::INFINITY,
(INF_8, 8) => F::INFINITY,
(NAN, 3) => F::NAN,
_ => return None,
};
if negative { Some(-float) } else { Some(float) }
Thus the executed special route is INFINITY or NAN followed by conditional
negation; it does not select NEG_INFINITY or NEG_NAN directly.
The number helper has the exact source body
pub fn parse_number(s: &[u8]) -> Option<Decimal> {
if let Some((float, rest)) = parse_partial_number(s) {
if rest == s.len() {
return Some(float);
}
}
None
}
It returns only the Decimal produced by parse_partial_number; there is no
float type parameter or float operation at this boundary.
The integer-tier helper has the source type and exact executable excerpts
below (long explanatory comments are elided). In particular it returns a raw
BiasedFp and contains no from_u64 cast, primitive float multiplication,
division, negation, or from_bits call:
pub fn compute_float<F: Float>(q: i64, mut w: u64) -> BiasedFp {
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let fp_error = BiasedFp::zero_pow2(-1);
// Short-circuit if the value can only be a literal 0 or infinity.
if w == 0 || q < F::SMALLEST_POWER_OF_TEN as i64 {
return fp_zero;
} else if q > F::LARGEST_POWER_OF_TEN as i64 {
return fp_inf;
}
// Normalize our significant digits, so the most-significant bit is set.
let lz = w.leading_zeros();
w <<= lz;
let (lo, hi) = compute_product_approx(q, w, F::SIG_BITS as usize + 3);
if lo == 0xFFFF_FFFF_FFFF_FFFF {
let inside_safe_exponent = (q >= -27) && (q <= 55);
if !inside_safe_exponent {
return fp_error;
}
}
let upperbit = (hi >> 63) as i32;
let mut mantissa = hi >> (upperbit + 64 - F::SIG_BITS as i32 - 3);
let mut power2 = power(q as i32) + upperbit - lz as i32 - F::EXP_MIN + 1;
if power2 <= 0 {
if -power2 + 1 >= 64 {
// Have more than 64 bits below the minimum exponent, must be 0.
return fp_zero;
}
// Have a subnormal value.
mantissa >>= -power2 + 1;
mantissa += mantissa & 1;
mantissa >>= 1;
power2 = (mantissa >= (1_u64 << F::SIG_BITS)) as i32;
return BiasedFp { m: mantissa, p_biased: power2 };
}
// Need to handle rounding ties. Normally, we need to round up,
// but if we fall right in between and we have an even basis, we
// need to round down.
if lo <= 1
&& q >= F::MIN_EXPONENT_ROUND_TO_EVEN as i64
&& q <= F::MAX_EXPONENT_ROUND_TO_EVEN as i64
&& mantissa & 0b11 == 0b01
&& (mantissa << (upperbit + 64 - F::SIG_BITS as i32 - 3)) == hi
{
// Zero the lowest bit, so we don't round up.
mantissa &= !1_u64;
}
// Round-to-even, then shift the significant digits into place.
mantissa += mantissa & 1;
mantissa >>= 1;
if mantissa >= (2_u64 << F::SIG_BITS) {
// Rounding up overflowed, so the carry bit is set. Set the
// mantissa to 1 (only the implicit, hidden bit is set) and
// increase the exponent.
mantissa = 1_u64 << F::SIG_BITS;
power2 += 1;
}
// Zero out the hidden bit.
mantissa &= !(1_u64 << F::SIG_BITS);
if power2 >= F::INFINITE_POWER {
// Exponent is above largest normal value, must be infinite.
return fp_inf;
}
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact slow-tier source body from crate/dec2flt/slow.rs:
pub(crate) fn parse_long_mantissa<F: Float>(s: &[u8]) -> BiasedFp {
const MAX_SHIFT: usize = 60;
const NUM_POWERS: usize = 19;
const POWERS: [u8; 19] =
[0, 3, 6, 9, 13, 16, 19, 23, 26, 29, 33, 36, 39, 43, 46, 49, 53, 56, 59];
let get_shift = |n| {
if n < NUM_POWERS { POWERS[n] as usize } else { MAX_SHIFT }
};
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let mut d = parse_decimal_seq(s);
// Short-circuit if the value can only be a literal 0 or infinity.
if d.num_digits == 0 || d.decimal_point < -324 {
return fp_zero;
} else if d.decimal_point >= 310 {
return fp_inf;
}
let mut exp2 = 0_i32;
let mut loop_result = None;
// Shift right toward (1/2 ... 1].
while d.decimal_point > 0 && loop_result.is_none() {
let n = d.decimal_point as usize;
let shift = get_shift(n);
d.right_shift(shift);
if d.decimal_point < -DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_zero);
} else {
exp2 += shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// Shift left toward (1/2 ... 1].
while d.decimal_point <= 0 && loop_result.is_none() {
let shift = if d.decimal_point == 0 {
match d.digits[0] {
digit if digit >= 5 => break,
0 | 1 => 2,
_ => 1,
}
} else {
get_shift((-d.decimal_point) as _)
};
d.left_shift(shift);
if d.decimal_point > DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_inf);
} else {
exp2 -= shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// We are now in the range [1/2 ... 1] but the binary format uses [1 ... 2].
exp2 -= 1;
while F::EXP_MIN > exp2 {
let mut n = (F::EXP_MIN - exp2) as usize;
if n > MAX_SHIFT {
n = MAX_SHIFT;
}
d.right_shift(n);
exp2 += n as i32;
}
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
// Shift the decimal to the hidden bit, and then round the value
// to get the high mantissa+1 bits.
d.left_shift(F::SIG_BITS as usize + 1);
let mut mantissa = d.round();
if mantissa >= (1_u64 << (F::SIG_BITS + 1)) {
// Rounding up overflowed to the carry bit, need to
// shift back to the hidden bit.
d.right_shift(1);
exp2 += 1;
mantissa = d.round();
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
}
let mut power2 = exp2 - F::EXP_MIN + 1;
if mantissa < (1_u64 << F::SIG_BITS) {
power2 -= 1;
}
// Zero out all the bits above the explicit mantissa bits.
mantissa &= (1_u64 << F::SIG_BITS) - 1;
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact final numeric-sign excerpt from crate/dec2flt/mod.rs:
let assembled_word = fp.m | ((fp.p_biased as u64) << F::SIG_BITS);
let assembly_result = biased_fp_to_float::<F>(fp);
let lexical_sign_applied = num.negative;
let result = if lexical_sign_applied {
core::ops::Neg::neg(assembly_result)
} else {
assembly_result
};
Thus a numeric execution that reaches the integer/slow selection route
assembles its selected pair with from_bits through biased_fp_to_float and only
then conditionally negates it. A successful try_fast_path returns earlier and
does not perform this assembly. compute_float and parse_long_mantissa produce
raw BiasedFp pairs and do not call from_u64, primitive float multiplication,
division, negation, or from_bits; they do, however, execute constants derived
from SIG_TOTAL_BITS before producing those pairs.
Retained structural-boundary evidence
-------------------------------------
Several adjacent structural bindings cite this same evidence record. Their
pinned library source identities are:
core/src/num/mod.rs
f0820f9dfb94999440c8cb4a349736fa21df7e5668e19b6b49e016ff67c05ce3
core/src/option.rs
7cf61204b05d98a95bc2e322d5fbfc1f4f91505109971917d9a7fb47151c50e6
core/src/slice/mod.rs
354992a6a3d69a0185eef9044a07ea5180e767bdb467aef55e69ee3d44317840
core/src/str/mod.rs
284b4c147b5d0497ce9146f6b96e564f196aed10411a62cdccf5fc5243d40f78
Exact ASCII-digit body from core/src/num/mod.rs:
pub const fn is_ascii_digit(&self) -> bool {
matches!(*self, b'0'..=b'9')
}
Exact Option control-flow bodies from core/src/option.rs:
fn branch(self) -> ControlFlow<Self::Residual, Self::Output> {
match self {
Some(v) => ControlFlow::Continue(v),
None => ControlFlow::Break(None),
}
}
fn from_residual(residual: Option<convert::Infallible>) -> Self {
match residual {
None => None,
}
}
Exact slice observation bodies from core/src/slice/mod.rs:
pub const fn first(&self) -> Option<&T> {
if let [first, ..] = self { Some(first) } else { None }
}
pub const fn split_first(&self) -> Option<(&T, &[T])> {
if let [first, tail @ ..] = self { Some((first, tail)) } else { None }
}
Exact string-byte body from core/src/str/mod.rs:
pub const fn as_bytes(&self) -> &[u8] {
// SAFETY: const sound because we transmute two types with the same layout
unsafe { mem::transmute(self) }
}
reference/model-evidence/binary64-probe.rs
#![feature(float_masks)]
use std::num::FpCategory;
fn bits(label: &str, value: f64) {
println!("{label}={:016x}", value.to_bits());
}
fn main() {
println!("target_arch={}", std::env::consts::ARCH);
println!("mantissa_digits={}", f64::MANTISSA_DIGITS);
println!("exponent_mask={:016x}", f64::EXPONENT_MASK);
println!("mantissa_mask={:016x}", f64::MANTISSA_MASK);
bits("nan", f64::NAN);
bits("infinity", f64::INFINITY);
bits("neg_infinity", f64::NEG_INFINITY);
for (label, value) in [
("nan_category", f64::NAN),
("infinity_category", f64::INFINITY),
("zero_category", 0.0),
("subnormal_category", f64::from_bits(1)),
("normal_category", 1.0),
] {
let category = match value.classify() {
FpCategory::Nan => "Nan",
FpCategory::Infinite => "Infinite",
FpCategory::Zero => "Zero",
FpCategory::Subnormal => "Subnormal",
FpCategory::Normal => "Normal",
};
println!("{label}={category}");
}
let payload_nan_word = 0x7ff0_0000_0000_0001_u64;
println!(
"from_bits_to_bits={:016x}",
f64::from_bits(payload_nan_word).to_bits()
);
bits("neg_payload_nan", -f64::from_bits(payload_nan_word));
bits("neg_zero", -0.0);
bits("subnormal_tie_to_even_zero", f64::from_bits(1) * 0.5);
bits("subnormal_tie_to_even_two", f64::from_bits(3) * 0.5);
bits("normal_division", 1.0 / 10.0);
bits("mul_negative_zero", -0.0 * 2.0);
bits("div_negative_zero", -1.0 / f64::INFINITY);
bits("div_negative_infinity", 1.0 / -0.0);
bits("mul_overflow", f64::MAX * (1.0 + f64::EPSILON));
println!("mul_zero_infinity_is_nan={}", (0.0 * f64::INFINITY).is_nan());
println!("div_zero_zero_is_nan={}", (0.0_f64 / 0.0_f64).is_nan());
println!("mul_nan_is_nan={}", (f64::NAN * 1.0).is_nan());
bits("cast_2_pow_53", (1_u64 << 53) as f64);
bits("cast_2_pow_53_plus_1", ((1_u64 << 53) + 1) as f64);
}
Requirements depending on this item (32)
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
All 32 entries
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
- Exponent agreement
- Correctness or defer
- Native correctness or defer
- Numeric acceptance
- Accumulated-value diagnostic
- Record bounds
- Invalid rejection
- Accumulated-value diagnostic
- Equal-target bridge
- Exact rounding
- Infinity
- Invalid rejection
- NaN acceptance
- No spurious NaNs
- Numeric acceptance
- Numeric sign
- Selected exponent range
- Selected magnitude sign
- Signed zero
- Totality
- Rounding determinism
- Rounding totality
- Full-significand diagnostic
- Infinity
- NaN
- Rejection
These requirements are linked to this item through the declared dependencies of their proofs.
Record details
| Record source | Tablet/model-support.json |
|---|---|
| Kind | opaque external binding |
| Preservation assessment origin | VerifierPanel |
| Preservation fingerprint | preservation-v1:95ed6275fe3b60c3568c7161ba4c6330b2386aa39f46d8770a5567cce7ed951c |
| Preservation current fingerprint | preservation-v1:95ed6275fe3b60c3568c7161ba4c6330b2386aa39f46d8770a5567cce7ed951c |
| Preservation freshness | matches current fingerprint |
| Correspondence approved fingerprint | {"own_tex":"52346a9eff57b2df264690fd9889257a49117a5df41389641f6e99d744ca19f4","lean_semantic_closure":"a30d1280b20ea5a49f1544af33a49ddeead48555dbbbc00b6bdf09c6f463add2","preamble_tex":""} |
| Correspondence current fingerprint | {"own_tex":"52346a9eff57b2df264690fd9889257a49117a5df41389641f6e99d744ca19f4","lean_semantic_closure":"a30d1280b20ea5a49f1544af33a49ddeead48555dbbbc00b6bdf09c6f463add2","preamble_tex":""} |
| Correspondence freshness | matches current fingerprint |
Exact preservation assessment
{
"status": "VerifierPass",
"origin": "VerifierPanel",
"fingerprints": {
"own_tex_hash": "18e300e7427ed0e03086567e498bf332f982c6da42587238bd924ade262fd2b4",
"dep_statement_hashes": {},
"combined_sound_fp": "preservation-v1:95ed6275fe3b60c3568c7161ba4c6330b2386aa39f46d8770a5567cce7ed951c"
},
"lane_votes": {
"v1": "Pass"
},
"reviewer_action_id": null
}Exact source record
{
"name": "core.option.Option.Insts.CoreOpsTry_traitTry.branch",
"extracted_signature": "{T : Type} : Option T → Result (core.ops.control_flow.ControlFlow (Option core.convert.Infallible) T)",
"rust_symbol": "core::option::{impl core::ops::try_trait::Try for core::option::Option<T>}::branch",
"raw_declaration_sha256": "0bf9b9d904111c7989cfc386f7bf22bbc7b1b9fd128306025fc6fe3916ef2bcf",
"node": "ModelOptionBranch",
"declaration": "dec2flt_model.ModelOptionBranch"
}Captured evidence identities
[
{
"path": "reference/model-evidence/binary64-boundary.txt",
"sha256": "a17d82e7f789ce7f1fbb3922a66ec8806999e526532d637605263882d37b7abf",
"cited_by": [
"Tablet/ModelOptionBranch.tex",
"Tablet/model-support.json"
]
},
{
"path": "reference/model-evidence/binary64-probe.rs",
"sha256": "68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e",
"cited_by": [
"reference/model-evidence/binary64-boundary.txt"
]
}
]core::option::{impl core::ops::try_trait::FromResidual<core::option::Option<core::convert::Infallible>> for core::option::Option<T>}::from_residual
Inspect related source (1)
- from_residual · core/src/option.rs:2793 Rust library
Related source and models come from the extraction records and declared dependencies.
| Rust item | core::option::{impl core::ops::try_trait::FromResidual<core::option::Option<core::convert::Infallible>> for core::option::Option<T>}::from_residual |
|---|---|
| Recorded source | /rustc/library/core/src/option.rs |
| Lines | 2793:4–2793:67 |
The related-source link includes this operation’s Rust standard-library implementation.
Opaque extraction signature
(T : Type) : Option core.convert.Infallible → Result (Option T)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: ModelOptionFromResidual]
def ModelOptionFromResidual (T : Type)
(x : Option core.convert.Infallible) : Result (Option T) :=
-- BODY
match x with
| none => ok none
| some v => nomatch v
end dec2flt_model
Why this model is faithful
Definition
Preservation argument
Claim
Proof
Authored arguments for individual requirements
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
Recorded review
| Correspondence | Pass |
|---|---|
| Preservation | VerifierPass |
ModelOptionFromResidual · Lean checked
Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
reference/model-evidence/binary64-boundary.txt
Primary evidence for the binary64 boundary
==========================================
Scope and identities
--------------------
This record concerns the frozen x86_64-unknown-linux-gnu extraction, the
adapted Rust crate retained in this repository, and the installed toolchain
named by modeling-input/SETUP.md. The probe source is retained at
reference/model-evidence/binary64-probe.rs; no scratch source is required to
reproduce it.
Toolchain executable:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
Target:
x86_64-unknown-linux-gnu
rustc executable SHA-256:
162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
Probe source SHA-256:
68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
Compiled probe SHA-256:
f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
Frozen generated.lean SHA-256:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692
Frozen modeling-input/manifest.json SHA-256:
2fc182c0c7acccad30c449ca349b999759b84e8ed4ec9d590e8295e43eeec077
Approved Binary64ModelDefault.lean SHA-256 at the time of this record:
03ae48fb631e6242bd21bf95d0481b66acae05f8cab343c7ab279b3c116538a3
Exact reproduction commands
---------------------------
Run from the repository root:
R=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
P=reference/model-evidence/binary64-probe.rs
B=.trellis/scratch/binary64-probe
"$R" --version --verbose
sha256sum "$R"
sha256sum "$P"
"$R" --target x86_64-unknown-linux-gnu -C opt-level=0 "$P" -o "$B"
sha256sum "$B"
"$B"
Raw output
----------
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
rustc_sha256=162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
probe_sha256=68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
binary_sha256=f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
target_arch=x86_64
mantissa_digits=53
exponent_mask=7ff0000000000000
mantissa_mask=000fffffffffffff
nan=7ff8000000000000
infinity=7ff0000000000000
neg_infinity=fff0000000000000
nan_category=Nan
infinity_category=Infinite
zero_category=Zero
subnormal_category=Subnormal
normal_category=Normal
from_bits_to_bits=7ff0000000000001
neg_payload_nan=fff0000000000001
neg_zero=8000000000000000
subnormal_tie_to_even_zero=0000000000000000
subnormal_tie_to_even_two=0000000000000002
normal_division=3fb999999999999a
mul_negative_zero=8000000000000000
div_negative_zero=8000000000000000
div_negative_infinity=fff0000000000000
mul_overflow=7ff0000000000000
mul_zero_infinity_is_nan=true
div_zero_zero_is_nan=true
mul_nan_is_nan=true
cast_2_pow_53=4340000000000000
cast_2_pow_53_plus_1=4340000000000000
Pinned Rust library sources
---------------------------
The installed sources below belong to the same named toolchain. Their
SHA-256 identities are:
core/src/primitive_docs.rs
c4b8627dd67d5dac8f383f383a9e7ff1229ea43e7599610fc61988694cf0f3e5
core/src/num/f64.rs
84540a6a59e347c63caabe12cf895ba1239c76a50682471567007138fac1c618
core/src/clone.rs
23f9cfc80347fde6b8457d46fbf7a2b8d9f34c8c58601b0b6f714ca2f6d1976b
The exact relevant text of core/src/primitive_docs.rs is:
#[rustc_doc_primitive = "f64"]
#[doc(alias = "double")]
/// A 64-bit floating-point type (specifically, the "binary64" type defined in IEEE 754-2008).
///
/// This type is very similar to [`prim@f32`], but has increased precision by using twice as many
/// bits. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on double-precision
/// values][wikipedia] for more information.
The referenced primitive-f32 documentation supplies the common primitive
floating-point operation rules quoted next:
/// - −0.0: IEEE 754 floating-point numbers have a bit that indicates their sign, so −0.0 is a
/// possible value. For comparison −0.0 = +0.0, but floating-point operations can carry
/// the sign bit through arithmetic operations. This means −0.0 × +0.0 produces −0.0 and
/// a negative number rounded to a value smaller than a float can represent also produces −0.0.
/// - [∞](#associatedconstant.INFINITY) and
/// [−∞](#associatedconstant.NEG_INFINITY): these result from calculations
/// like `1.0 / 0.0`.
///
/// When a primitive operation (addition, subtraction, multiplication, or
/// division) is performed on this type, the result is rounded according to the
/// roundTiesToEven direction defined in IEEE 754-2008. That means:
///
/// - The result is the representable value closest to the true value, if there
/// is a unique closest representable value.
/// - If the true value is exactly half-way between two representable values,
/// the result is the one with an even least-significant binary digit.
/// - If the true value's magnitude is ≥ `f32::MAX` + 2<sup>(`f32::MAX_EXP` −
/// `f32::MANTISSA_DIGITS` − 1)</sup>, the result is ∞ or −∞ (preserving the
/// true value's sign).
The same file explicitly separates arithmetic NaN choice from exact bitwise
operations; its exact relevant text is:
/// The rules for NaN values differ between *arithmetic* and *non-arithmetic* (or "bitwise")
/// operations. The non-arithmetic operations are unary `-`, `abs`, `copysign`, `signum`,
/// `{to,from}_bits`, `{to,from}_{be,le,ne}_bytes` and `is_sign_{positive,negative}`. These
/// operations are guaranteed to exactly preserve the bit pattern of their input except for possibly
/// changing the sign bit.
///
/// The following rules apply when a NaN value is returned from an arithmetic operation:
/// - The result has a non-deterministic sign.
/// - The quiet bit and payload are non-deterministically chosen from
/// the following set of options:
///
/// - **Preferred NaN**: The quiet bit is set and the payload is all-zero.
/// - **Quieting NaN propagation**: The quiet bit is set and the payload is copied from any input
/// operand that is a NaN. If the inputs and outputs do not have the same payload size (i.e., for
/// `as` casts), then
/// - If the output is smaller than the input, low-order bits of the payload get dropped.
/// - If the output is larger than the input, the payload gets filled up with 0s in the low-order
/// bits.
/// - **Unchanged NaN propagation**: The quiet bit and payload are copied from any input operand
/// that is a NaN. If the inputs and outputs do not have the same size (i.e., for `as` casts), the
/// same rules as for "quieting NaN propagation" apply, with one caveat: if the output is smaller
/// than the input, dropping the low-order bits may result in a payload of 0; a payload of 0 is not
/// possible with a signaling NaN (the all-0 significand encodes an infinity) so unchanged NaN
/// propagation cannot occur with some inputs.
/// - **Target-specific NaN**: The quiet bit is set and the payload is picked from a target-specific
/// set of "extra" possible NaN payloads. The set can depend on the input operand values.
/// See the table below for the concrete NaNs this set contains on various targets.
///
/// | `target_arch` | Extra payloads possible on this platform |
/// |---------------|------------------------------------------|
/// | `aarch64`, `arm`, `arm64ec`, `loongarch64`, `powerpc` (except when `target_abi = "spe"`), `powerpc64`, `riscv32`, `riscv64`, `s390x`, `x86`, `x86_64` | None |
Thus the model's preferred quiet NaN is one permitted result whenever
multiplication or division returns NaN. This does not claim that arbitrary
Rust arithmetic NaNs have those exact bits. By contrast, unary negation and
bit conversion must preserve all non-sign bits exactly, including for every
NaN payload.
The exact relevant declarations in core/src/num/f64.rs are:
pub const MANTISSA_DIGITS: u32 = 53;
pub const NAN: f64 = 0.0_f64 / 0.0_f64;
pub const INFINITY: f64 = 1.0_f64 / 0.0_f64;
pub const NEG_INFINITY: f64 = -1.0_f64 / 0.0_f64;
pub const SIGN_MASK: u64 = 0x8000_0000_0000_0000;
pub const EXPONENT_MASK: u64 = 0x7ff0_0000_0000_0000;
pub const MANTISSA_MASK: u64 = 0x000f_ffff_ffff_ffff;
pub const fn classify(self) -> FpCategory {
// We used to have complicated logic here that avoids the simple bit-based tests to work
// around buggy codegen for x87 targets (see
// https://github.com/rust-lang/rust/issues/114479). However, some LLVM versions later, none
// of our tests is able to find any difference between the complicated and the naive
// version, so now we are back to the naive version.
let b = self.to_bits();
match (b & Self::MANTISSA_MASK, b & Self::EXPONENT_MASK) {
(0, Self::EXPONENT_MASK) => FpCategory::Infinite,
(_, Self::EXPONENT_MASK) => FpCategory::Nan,
(0, 0) => FpCategory::Zero,
(_, 0) => FpCategory::Subnormal,
_ => FpCategory::Normal,
}
}
pub const fn to_bits(self) -> u64 {
// SAFETY: `u64` is a plain old datatype so we can always transmute to it.
unsafe { mem::transmute(self) }
}
pub const fn from_bits(v: u64) -> Self {
// It turns out the safety issues with sNaN were overblown! Hooray!
// SAFETY: `u64` is a plain old datatype so we can always transmute from it.
unsafe { mem::transmute(v) }
}
The exact scalar clone body in core/src/clone.rs is:
impl const Clone for $t {
#[inline(always)]
fn clone(&self) -> Self {
*self
}
}
Frozen adapted source
---------------------
The relevant retained source file hashes are:
crate/traits.rs
9013270fb846edcb0bdf2abd0353f575fdd727974cba9e89bdab8bb4c2b4f0bf
crate/dec2flt/mod.rs
b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012
crate/dec2flt/parse.rs
50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f
crate/dec2flt/decimal.rs
633658be803b7369b18feb098a8aa1b5f714a933d3b79ecbc4899a1b05f35beb
crate/dec2flt/lemire.rs
fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1
crate/dec2flt/slow.rs
93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485
Exact constant and bit-conversion excerpt from crate/traits.rs:
impl Float for f64 {
type Int = u64;
const INFINITY: Self = Self::INFINITY;
const NEG_INFINITY: Self = Self::NEG_INFINITY;
const NAN: Self = Self::NAN;
// Bit-identical to the upstream `-f64::NAN`, without the unsupported
// compile-time float negation.
const NEG_NAN: Self = f64::from_bits(0xFFF8_0000_0000_0000);
const BITS: u32 = 64;
const SIG_TOTAL_BITS: u32 = Self::MANTISSA_DIGITS;
const EXP_MASK: Self::Int = Self::EXPONENT_MASK;
const SIG_MASK: Self::Int = Self::MANTISSA_MASK;
fn to_bits(self) -> Self::Int {
self.to_bits()
}
fn classify(self) -> FpCategory {
self.classify()
}
}
impl FloatExt for f64 {
#[inline]
fn from_u64_bits(v: u64) -> Self {
f64::from_bits(v)
}
Exact derived-constant defaults from crate/traits.rs:
/// The number of bits in the significand, *excluding* the hidden bit.
const SIG_BITS: u32 = Self::SIG_TOTAL_BITS - 1;
/// Number of bits in the exponent.
const EXP_BITS: u32 = Self::BITS - Self::SIG_BITS - 1;
/// The saturated (maximum bitpattern) value of the exponent, i.e. the infinite
/// representation.
///
/// This shifted fully right, use `EXP_MASK` for the shifted value.
const EXP_SAT: u32 = (1 << Self::EXP_BITS) - 1;
/// Signed version of `EXP_SAT` since we convert a lot.
const INFINITE_POWER: i32 = Self::EXP_SAT as i32;
/// The exponent bias value. This is also the maximum value of the exponent.
const EXP_BIAS: u32 = Self::EXP_SAT >> 1;
/// Minimum exponent value of normal values.
const EXP_MIN: i32 = -(Self::EXP_BIAS as i32 - 1);
Together with the f64-instance lines `BITS = 64` and
`SIG_TOTAL_BITS = Self::MANTISSA_DIGITS` in the preceding excerpt, these
defaults derive SIG_BITS, EXP_MIN, and INFINITE_POWER from the primitive
mantissa-digit constant rather than introducing independent parameters.
Exact checked cast excerpt from crate/dec2flt/mod.rs:
#[inline]
// This method is precisely the source `u64 as f64` primitive conversion.
// Aeneas cannot translate that cast; opacity is confined to the cast while
// the fast-path algorithm, its range proof obligation, and all calls stay
// visible in the extracted model.
#[charon::opaque]
fn from_u64(v: u64) -> Self {
debug_assert!(v <= Self::MAX_MANTISSA_FAST_PATH);
v as _
}
Here MAX_MANTISSA_FAST_PATH is the retained default 1 << 53. Therefore the
source succeeds only through the modeled branch v <= 2^53 in this debug
configuration; above it the debug assertion fails before the cast. On the
successful branch every integer is exactly representable, so the source cast
and the model rounder return the same word.
Exact power-table and assembly excerpts from crate/dec2flt/mod.rs:
/// Maximum mantissa for the fast-path (`1 << 53` for f64).
const MAX_MANTISSA_FAST_PATH: u64 = 1 << Self::SIG_TOTAL_BITS;
const MAX_EXPONENT_FAST_PATH: i64 = 22;
const MIN_EXPONENT_FAST_PATH: i64 = -Self::MAX_EXPONENT_FAST_PATH;
const MAX_EXPONENT_DISGUISED_FAST_PATH: i64 = 37;
fn pow10_fast_path(exponent: usize) -> Self {
// These bit patterns are exactly the source table's rounded binary64
// literals. The match is the same masked lookup; it merely keeps float
// constants out of Aeneas's unsupported constant interpreter.
match exponent & 31 {
0 => f64::from_bits(0x3FF0_0000_0000_0000),
1 => f64::from_bits(0x4024_0000_0000_0000),
2 => f64::from_bits(0x4059_0000_0000_0000),
3 => f64::from_bits(0x408F_4000_0000_0000),
4 => f64::from_bits(0x40C3_8800_0000_0000),
5 => f64::from_bits(0x40F8_6A00_0000_0000),
6 => f64::from_bits(0x412E_8480_0000_0000),
7 => f64::from_bits(0x4163_12D0_0000_0000),
8 => f64::from_bits(0x4197_D784_0000_0000),
9 => f64::from_bits(0x41CD_CD65_0000_0000),
10 => f64::from_bits(0x4202_A05F_2000_0000),
11 => f64::from_bits(0x4237_4876_E800_0000),
12 => f64::from_bits(0x426D_1A94_A200_0000),
13 => f64::from_bits(0x42A2_309C_E540_0000),
14 => f64::from_bits(0x42D6_BCC4_1E90_0000),
15 => f64::from_bits(0x430C_6BF5_2634_0000),
16 => f64::from_bits(0x4341_C379_37E0_8000),
17 => f64::from_bits(0x4376_3457_85D8_A000),
18 => f64::from_bits(0x43AB_C16D_674E_C800),
19 => f64::from_bits(0x43E1_58E4_6091_3D00),
20 => f64::from_bits(0x4415_AF1D_78B5_8C40),
21 => f64::from_bits(0x444B_1AE4_D6E2_EF50),
22 => f64::from_bits(0x4480_F0CF_064D_D592),
_ => f64::from_bits(0),
}
}
fn biased_fp_to_float<F: FloatExt>(x: BiasedFp) -> F {
let mut word = x.m;
word |= (x.p_biased as u64) << F::SIG_BITS;
F::from_u64_bits(word)
}
Exact native-call excerpt from crate/dec2flt/decimal.rs:
fn can_use_fast_path<F: Lemire>(&self) -> bool {
F::MIN_EXPONENT_FAST_PATH <= self.exponent
&& self.exponent <= F::MAX_EXPONENT_DISGUISED_FAST_PATH
&& self.mantissa <= F::MAX_MANTISSA_FAST_PATH
&& !self.many_digits
}
if !self.can_use_fast_path::<F>() {
return None;
}
let value = if self.exponent <= F::MAX_EXPONENT_FAST_PATH {
// normal fast path
let value = F::from_u64(self.mantissa);
if self.exponent < 0 {
// Explicit trait calls preserve Rust arithmetic and resolve
// the generic output type that Charon leaves ambiguous.
core::ops::Div::div(value, F::pow10_fast_path((-self.exponent) as _))
} else {
core::ops::Mul::mul(value, F::pow10_fast_path(self.exponent as _))
}
} else {
// disguised fast path
let shift = self.exponent - F::MAX_EXPONENT_FAST_PATH;
let mantissa = self.mantissa.checked_mul(INT_POW10[shift as usize])?;
if mantissa > F::MAX_MANTISSA_FAST_PATH {
return None;
}
core::ops::Mul::mul(
F::from_u64(mantissa),
F::pow10_fast_path(F::MAX_EXPONENT_FAST_PATH as _),
)
};
if self.negative {
Some(core::ops::Neg::neg(value))
} else {
Some(value)
}
The preceding can_use_fast_path body, together with
MAX_MANTISSA_FAST_PATH = 1 << SIG_TOTAL_BITS and SIG_TOTAL_BITS = 53 for f64,
requires the exponent to lie between -22 and 37, the input mantissa to be at
most 2^53, and many_digits to be false. Consequently an ordinary arithmetic
call has a from_u64 operand in 0..=2^53. In its negative-exponent arm,
`-self.exponent` lies in 1..=22; in its nonnegative arm, `self.exponent` lies
in 0..=22. The disguised branch checks its multiplied mantissa against 2^53
before from_u64 and uses table index 22. The paired statement
Binary64NativeCallDomain does not assert this source reachability. It says
conditionally that a from_u64 argument at most 2^53 succeeds with a finite,
non-NaN word and that a table index at most 22 succeeds with a positive,
nonzero, finite, non-NaN word. Applying that conditional statement to the
guards just derived establishes those properties for the actual ordinary and
disguised calls, and in particular establishes that every executed divisor is
nonzero.
Exact special-value excerpt from crate/dec2flt/parse.rs:
let float = match (register, len) {
(INF_3, 3) => F::INFINITY,
(INF_8, 8) => F::INFINITY,
(NAN, 3) => F::NAN,
_ => return None,
};
if negative { Some(-float) } else { Some(float) }
Thus the executed special route is INFINITY or NAN followed by conditional
negation; it does not select NEG_INFINITY or NEG_NAN directly.
The number helper has the exact source body
pub fn parse_number(s: &[u8]) -> Option<Decimal> {
if let Some((float, rest)) = parse_partial_number(s) {
if rest == s.len() {
return Some(float);
}
}
None
}
It returns only the Decimal produced by parse_partial_number; there is no
float type parameter or float operation at this boundary.
The integer-tier helper has the source type and exact executable excerpts
below (long explanatory comments are elided). In particular it returns a raw
BiasedFp and contains no from_u64 cast, primitive float multiplication,
division, negation, or from_bits call:
pub fn compute_float<F: Float>(q: i64, mut w: u64) -> BiasedFp {
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let fp_error = BiasedFp::zero_pow2(-1);
// Short-circuit if the value can only be a literal 0 or infinity.
if w == 0 || q < F::SMALLEST_POWER_OF_TEN as i64 {
return fp_zero;
} else if q > F::LARGEST_POWER_OF_TEN as i64 {
return fp_inf;
}
// Normalize our significant digits, so the most-significant bit is set.
let lz = w.leading_zeros();
w <<= lz;
let (lo, hi) = compute_product_approx(q, w, F::SIG_BITS as usize + 3);
if lo == 0xFFFF_FFFF_FFFF_FFFF {
let inside_safe_exponent = (q >= -27) && (q <= 55);
if !inside_safe_exponent {
return fp_error;
}
}
let upperbit = (hi >> 63) as i32;
let mut mantissa = hi >> (upperbit + 64 - F::SIG_BITS as i32 - 3);
let mut power2 = power(q as i32) + upperbit - lz as i32 - F::EXP_MIN + 1;
if power2 <= 0 {
if -power2 + 1 >= 64 {
// Have more than 64 bits below the minimum exponent, must be 0.
return fp_zero;
}
// Have a subnormal value.
mantissa >>= -power2 + 1;
mantissa += mantissa & 1;
mantissa >>= 1;
power2 = (mantissa >= (1_u64 << F::SIG_BITS)) as i32;
return BiasedFp { m: mantissa, p_biased: power2 };
}
// Need to handle rounding ties. Normally, we need to round up,
// but if we fall right in between and we have an even basis, we
// need to round down.
if lo <= 1
&& q >= F::MIN_EXPONENT_ROUND_TO_EVEN as i64
&& q <= F::MAX_EXPONENT_ROUND_TO_EVEN as i64
&& mantissa & 0b11 == 0b01
&& (mantissa << (upperbit + 64 - F::SIG_BITS as i32 - 3)) == hi
{
// Zero the lowest bit, so we don't round up.
mantissa &= !1_u64;
}
// Round-to-even, then shift the significant digits into place.
mantissa += mantissa & 1;
mantissa >>= 1;
if mantissa >= (2_u64 << F::SIG_BITS) {
// Rounding up overflowed, so the carry bit is set. Set the
// mantissa to 1 (only the implicit, hidden bit is set) and
// increase the exponent.
mantissa = 1_u64 << F::SIG_BITS;
power2 += 1;
}
// Zero out the hidden bit.
mantissa &= !(1_u64 << F::SIG_BITS);
if power2 >= F::INFINITE_POWER {
// Exponent is above largest normal value, must be infinite.
return fp_inf;
}
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact slow-tier source body from crate/dec2flt/slow.rs:
pub(crate) fn parse_long_mantissa<F: Float>(s: &[u8]) -> BiasedFp {
const MAX_SHIFT: usize = 60;
const NUM_POWERS: usize = 19;
const POWERS: [u8; 19] =
[0, 3, 6, 9, 13, 16, 19, 23, 26, 29, 33, 36, 39, 43, 46, 49, 53, 56, 59];
let get_shift = |n| {
if n < NUM_POWERS { POWERS[n] as usize } else { MAX_SHIFT }
};
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let mut d = parse_decimal_seq(s);
// Short-circuit if the value can only be a literal 0 or infinity.
if d.num_digits == 0 || d.decimal_point < -324 {
return fp_zero;
} else if d.decimal_point >= 310 {
return fp_inf;
}
let mut exp2 = 0_i32;
let mut loop_result = None;
// Shift right toward (1/2 ... 1].
while d.decimal_point > 0 && loop_result.is_none() {
let n = d.decimal_point as usize;
let shift = get_shift(n);
d.right_shift(shift);
if d.decimal_point < -DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_zero);
} else {
exp2 += shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// Shift left toward (1/2 ... 1].
while d.decimal_point <= 0 && loop_result.is_none() {
let shift = if d.decimal_point == 0 {
match d.digits[0] {
digit if digit >= 5 => break,
0 | 1 => 2,
_ => 1,
}
} else {
get_shift((-d.decimal_point) as _)
};
d.left_shift(shift);
if d.decimal_point > DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_inf);
} else {
exp2 -= shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// We are now in the range [1/2 ... 1] but the binary format uses [1 ... 2].
exp2 -= 1;
while F::EXP_MIN > exp2 {
let mut n = (F::EXP_MIN - exp2) as usize;
if n > MAX_SHIFT {
n = MAX_SHIFT;
}
d.right_shift(n);
exp2 += n as i32;
}
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
// Shift the decimal to the hidden bit, and then round the value
// to get the high mantissa+1 bits.
d.left_shift(F::SIG_BITS as usize + 1);
let mut mantissa = d.round();
if mantissa >= (1_u64 << (F::SIG_BITS + 1)) {
// Rounding up overflowed to the carry bit, need to
// shift back to the hidden bit.
d.right_shift(1);
exp2 += 1;
mantissa = d.round();
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
}
let mut power2 = exp2 - F::EXP_MIN + 1;
if mantissa < (1_u64 << F::SIG_BITS) {
power2 -= 1;
}
// Zero out all the bits above the explicit mantissa bits.
mantissa &= (1_u64 << F::SIG_BITS) - 1;
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact final numeric-sign excerpt from crate/dec2flt/mod.rs:
let assembled_word = fp.m | ((fp.p_biased as u64) << F::SIG_BITS);
let assembly_result = biased_fp_to_float::<F>(fp);
let lexical_sign_applied = num.negative;
let result = if lexical_sign_applied {
core::ops::Neg::neg(assembly_result)
} else {
assembly_result
};
Thus a numeric execution that reaches the integer/slow selection route
assembles its selected pair with from_bits through biased_fp_to_float and only
then conditionally negates it. A successful try_fast_path returns earlier and
does not perform this assembly. compute_float and parse_long_mantissa produce
raw BiasedFp pairs and do not call from_u64, primitive float multiplication,
division, negation, or from_bits; they do, however, execute constants derived
from SIG_TOTAL_BITS before producing those pairs.
Retained structural-boundary evidence
-------------------------------------
Several adjacent structural bindings cite this same evidence record. Their
pinned library source identities are:
core/src/num/mod.rs
f0820f9dfb94999440c8cb4a349736fa21df7e5668e19b6b49e016ff67c05ce3
core/src/option.rs
7cf61204b05d98a95bc2e322d5fbfc1f4f91505109971917d9a7fb47151c50e6
core/src/slice/mod.rs
354992a6a3d69a0185eef9044a07ea5180e767bdb467aef55e69ee3d44317840
core/src/str/mod.rs
284b4c147b5d0497ce9146f6b96e564f196aed10411a62cdccf5fc5243d40f78
Exact ASCII-digit body from core/src/num/mod.rs:
pub const fn is_ascii_digit(&self) -> bool {
matches!(*self, b'0'..=b'9')
}
Exact Option control-flow bodies from core/src/option.rs:
fn branch(self) -> ControlFlow<Self::Residual, Self::Output> {
match self {
Some(v) => ControlFlow::Continue(v),
None => ControlFlow::Break(None),
}
}
fn from_residual(residual: Option<convert::Infallible>) -> Self {
match residual {
None => None,
}
}
Exact slice observation bodies from core/src/slice/mod.rs:
pub const fn first(&self) -> Option<&T> {
if let [first, ..] = self { Some(first) } else { None }
}
pub const fn split_first(&self) -> Option<(&T, &[T])> {
if let [first, tail @ ..] = self { Some((first, tail)) } else { None }
}
Exact string-byte body from core/src/str/mod.rs:
pub const fn as_bytes(&self) -> &[u8] {
// SAFETY: const sound because we transmute two types with the same layout
unsafe { mem::transmute(self) }
}
reference/model-evidence/binary64-probe.rs
#![feature(float_masks)]
use std::num::FpCategory;
fn bits(label: &str, value: f64) {
println!("{label}={:016x}", value.to_bits());
}
fn main() {
println!("target_arch={}", std::env::consts::ARCH);
println!("mantissa_digits={}", f64::MANTISSA_DIGITS);
println!("exponent_mask={:016x}", f64::EXPONENT_MASK);
println!("mantissa_mask={:016x}", f64::MANTISSA_MASK);
bits("nan", f64::NAN);
bits("infinity", f64::INFINITY);
bits("neg_infinity", f64::NEG_INFINITY);
for (label, value) in [
("nan_category", f64::NAN),
("infinity_category", f64::INFINITY),
("zero_category", 0.0),
("subnormal_category", f64::from_bits(1)),
("normal_category", 1.0),
] {
let category = match value.classify() {
FpCategory::Nan => "Nan",
FpCategory::Infinite => "Infinite",
FpCategory::Zero => "Zero",
FpCategory::Subnormal => "Subnormal",
FpCategory::Normal => "Normal",
};
println!("{label}={category}");
}
let payload_nan_word = 0x7ff0_0000_0000_0001_u64;
println!(
"from_bits_to_bits={:016x}",
f64::from_bits(payload_nan_word).to_bits()
);
bits("neg_payload_nan", -f64::from_bits(payload_nan_word));
bits("neg_zero", -0.0);
bits("subnormal_tie_to_even_zero", f64::from_bits(1) * 0.5);
bits("subnormal_tie_to_even_two", f64::from_bits(3) * 0.5);
bits("normal_division", 1.0 / 10.0);
bits("mul_negative_zero", -0.0 * 2.0);
bits("div_negative_zero", -1.0 / f64::INFINITY);
bits("div_negative_infinity", 1.0 / -0.0);
bits("mul_overflow", f64::MAX * (1.0 + f64::EPSILON));
println!("mul_zero_infinity_is_nan={}", (0.0 * f64::INFINITY).is_nan());
println!("div_zero_zero_is_nan={}", (0.0_f64 / 0.0_f64).is_nan());
println!("mul_nan_is_nan={}", (f64::NAN * 1.0).is_nan());
bits("cast_2_pow_53", (1_u64 << 53) as f64);
bits("cast_2_pow_53_plus_1", ((1_u64 << 53) + 1) as f64);
}
Requirements depending on this item (32)
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
All 32 entries
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
- Exponent agreement
- Correctness or defer
- Native correctness or defer
- Numeric acceptance
- Accumulated-value diagnostic
- Record bounds
- Invalid rejection
- Accumulated-value diagnostic
- Equal-target bridge
- Exact rounding
- Infinity
- Invalid rejection
- NaN acceptance
- No spurious NaNs
- Numeric acceptance
- Numeric sign
- Selected exponent range
- Selected magnitude sign
- Signed zero
- Totality
- Rounding determinism
- Rounding totality
- Full-significand diagnostic
- Infinity
- NaN
- Rejection
These requirements are linked to this item through the declared dependencies of their proofs.
Record details
| Record source | Tablet/model-support.json |
|---|---|
| Kind | opaque external binding |
| Preservation assessment origin | VerifierPanel |
| Preservation fingerprint | preservation-v1:701126d2dc1a9fa3a0eaad91175316007eae3f995a24e8676589e026fa3dfbd1 |
| Preservation current fingerprint | preservation-v1:701126d2dc1a9fa3a0eaad91175316007eae3f995a24e8676589e026fa3dfbd1 |
| Preservation freshness | matches current fingerprint |
| Correspondence approved fingerprint | {"own_tex":"f3d98cec684f8005e8fc2d92d579677f40c057555c8038016be87f598d853d28","lean_semantic_closure":"a92cc17aaf6bc78d97354592f0cdef183839d0e8d53ae8111bc07a81d1baa8c7","preamble_tex":""} |
| Correspondence current fingerprint | {"own_tex":"f3d98cec684f8005e8fc2d92d579677f40c057555c8038016be87f598d853d28","lean_semantic_closure":"a92cc17aaf6bc78d97354592f0cdef183839d0e8d53ae8111bc07a81d1baa8c7","preamble_tex":""} |
| Correspondence freshness | matches current fingerprint |
Exact preservation assessment
{
"status": "VerifierPass",
"origin": "VerifierPanel",
"fingerprints": {
"own_tex_hash": "ab4996aeb1dc1968c72e67dbe64efabe2a78530d81538a21ea3520f116a07f31",
"dep_statement_hashes": {},
"combined_sound_fp": "preservation-v1:701126d2dc1a9fa3a0eaad91175316007eae3f995a24e8676589e026fa3dfbd1"
},
"lane_votes": {
"v1": "Pass"
},
"reviewer_action_id": null
}Exact source record
{
"name": "core.option.Option.Insts.CoreOpsTry_traitFromResidualOptionInfallible.from_residual",
"extracted_signature": "(T : Type) : Option core.convert.Infallible → Result (Option T)",
"rust_symbol": "core::option::{impl core::ops::try_trait::FromResidual<core::option::Option<core::convert::Infallible>> for core::option::Option<T>}::from_residual",
"raw_declaration_sha256": "4c10afcd703d980e458ca8e8ce2ecf1d0c415721467b76953e9223648ea5106c",
"node": "ModelOptionFromResidual",
"declaration": "dec2flt_model.ModelOptionFromResidual"
}Captured evidence identities
[
{
"path": "reference/model-evidence/binary64-boundary.txt",
"sha256": "a17d82e7f789ce7f1fbb3922a66ec8806999e526532d637605263882d37b7abf",
"cited_by": [
"Tablet/ModelOptionFromResidual.tex",
"Tablet/model-support.json"
]
},
{
"path": "reference/model-evidence/binary64-probe.rs",
"sha256": "68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e",
"cited_by": [
"reference/model-evidence/binary64-boundary.txt"
]
}
]core::slice::{[T]}::first
Inspect related source (1)
- first · core/src/slice/mod.rs:155 Rust library
Related source and models come from the extraction records and declared dependencies.
| Rust item | core::slice::{[T]}::first |
|---|---|
| Recorded source | /rustc/library/core/src/slice/mod.rs |
| Lines | 155:4–155:43 |
The related-source link includes this operation’s Rust standard-library implementation.
Opaque extraction signature
{T : Type} : Slice T → Result (Option T)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: ModelSliceFirst]
def ModelSliceFirst {T : Type} (s : Slice T) : Result (Option T) :=
-- BODY
ok s.val.head?
end dec2flt_model
Why this model is faithful
Definition
Preservation argument
Claim
Proof
Authored arguments for individual requirements
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
Recorded review
| Correspondence | Pass |
|---|---|
| Preservation | VerifierPass |
ModelSliceFirst · Lean checked
Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
reference/model-evidence/binary64-boundary.txt
Primary evidence for the binary64 boundary
==========================================
Scope and identities
--------------------
This record concerns the frozen x86_64-unknown-linux-gnu extraction, the
adapted Rust crate retained in this repository, and the installed toolchain
named by modeling-input/SETUP.md. The probe source is retained at
reference/model-evidence/binary64-probe.rs; no scratch source is required to
reproduce it.
Toolchain executable:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
Target:
x86_64-unknown-linux-gnu
rustc executable SHA-256:
162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
Probe source SHA-256:
68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
Compiled probe SHA-256:
f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
Frozen generated.lean SHA-256:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692
Frozen modeling-input/manifest.json SHA-256:
2fc182c0c7acccad30c449ca349b999759b84e8ed4ec9d590e8295e43eeec077
Approved Binary64ModelDefault.lean SHA-256 at the time of this record:
03ae48fb631e6242bd21bf95d0481b66acae05f8cab343c7ab279b3c116538a3
Exact reproduction commands
---------------------------
Run from the repository root:
R=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
P=reference/model-evidence/binary64-probe.rs
B=.trellis/scratch/binary64-probe
"$R" --version --verbose
sha256sum "$R"
sha256sum "$P"
"$R" --target x86_64-unknown-linux-gnu -C opt-level=0 "$P" -o "$B"
sha256sum "$B"
"$B"
Raw output
----------
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
rustc_sha256=162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
probe_sha256=68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
binary_sha256=f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
target_arch=x86_64
mantissa_digits=53
exponent_mask=7ff0000000000000
mantissa_mask=000fffffffffffff
nan=7ff8000000000000
infinity=7ff0000000000000
neg_infinity=fff0000000000000
nan_category=Nan
infinity_category=Infinite
zero_category=Zero
subnormal_category=Subnormal
normal_category=Normal
from_bits_to_bits=7ff0000000000001
neg_payload_nan=fff0000000000001
neg_zero=8000000000000000
subnormal_tie_to_even_zero=0000000000000000
subnormal_tie_to_even_two=0000000000000002
normal_division=3fb999999999999a
mul_negative_zero=8000000000000000
div_negative_zero=8000000000000000
div_negative_infinity=fff0000000000000
mul_overflow=7ff0000000000000
mul_zero_infinity_is_nan=true
div_zero_zero_is_nan=true
mul_nan_is_nan=true
cast_2_pow_53=4340000000000000
cast_2_pow_53_plus_1=4340000000000000
Pinned Rust library sources
---------------------------
The installed sources below belong to the same named toolchain. Their
SHA-256 identities are:
core/src/primitive_docs.rs
c4b8627dd67d5dac8f383f383a9e7ff1229ea43e7599610fc61988694cf0f3e5
core/src/num/f64.rs
84540a6a59e347c63caabe12cf895ba1239c76a50682471567007138fac1c618
core/src/clone.rs
23f9cfc80347fde6b8457d46fbf7a2b8d9f34c8c58601b0b6f714ca2f6d1976b
The exact relevant text of core/src/primitive_docs.rs is:
#[rustc_doc_primitive = "f64"]
#[doc(alias = "double")]
/// A 64-bit floating-point type (specifically, the "binary64" type defined in IEEE 754-2008).
///
/// This type is very similar to [`prim@f32`], but has increased precision by using twice as many
/// bits. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on double-precision
/// values][wikipedia] for more information.
The referenced primitive-f32 documentation supplies the common primitive
floating-point operation rules quoted next:
/// - −0.0: IEEE 754 floating-point numbers have a bit that indicates their sign, so −0.0 is a
/// possible value. For comparison −0.0 = +0.0, but floating-point operations can carry
/// the sign bit through arithmetic operations. This means −0.0 × +0.0 produces −0.0 and
/// a negative number rounded to a value smaller than a float can represent also produces −0.0.
/// - [∞](#associatedconstant.INFINITY) and
/// [−∞](#associatedconstant.NEG_INFINITY): these result from calculations
/// like `1.0 / 0.0`.
///
/// When a primitive operation (addition, subtraction, multiplication, or
/// division) is performed on this type, the result is rounded according to the
/// roundTiesToEven direction defined in IEEE 754-2008. That means:
///
/// - The result is the representable value closest to the true value, if there
/// is a unique closest representable value.
/// - If the true value is exactly half-way between two representable values,
/// the result is the one with an even least-significant binary digit.
/// - If the true value's magnitude is ≥ `f32::MAX` + 2<sup>(`f32::MAX_EXP` −
/// `f32::MANTISSA_DIGITS` − 1)</sup>, the result is ∞ or −∞ (preserving the
/// true value's sign).
The same file explicitly separates arithmetic NaN choice from exact bitwise
operations; its exact relevant text is:
/// The rules for NaN values differ between *arithmetic* and *non-arithmetic* (or "bitwise")
/// operations. The non-arithmetic operations are unary `-`, `abs`, `copysign`, `signum`,
/// `{to,from}_bits`, `{to,from}_{be,le,ne}_bytes` and `is_sign_{positive,negative}`. These
/// operations are guaranteed to exactly preserve the bit pattern of their input except for possibly
/// changing the sign bit.
///
/// The following rules apply when a NaN value is returned from an arithmetic operation:
/// - The result has a non-deterministic sign.
/// - The quiet bit and payload are non-deterministically chosen from
/// the following set of options:
///
/// - **Preferred NaN**: The quiet bit is set and the payload is all-zero.
/// - **Quieting NaN propagation**: The quiet bit is set and the payload is copied from any input
/// operand that is a NaN. If the inputs and outputs do not have the same payload size (i.e., for
/// `as` casts), then
/// - If the output is smaller than the input, low-order bits of the payload get dropped.
/// - If the output is larger than the input, the payload gets filled up with 0s in the low-order
/// bits.
/// - **Unchanged NaN propagation**: The quiet bit and payload are copied from any input operand
/// that is a NaN. If the inputs and outputs do not have the same size (i.e., for `as` casts), the
/// same rules as for "quieting NaN propagation" apply, with one caveat: if the output is smaller
/// than the input, dropping the low-order bits may result in a payload of 0; a payload of 0 is not
/// possible with a signaling NaN (the all-0 significand encodes an infinity) so unchanged NaN
/// propagation cannot occur with some inputs.
/// - **Target-specific NaN**: The quiet bit is set and the payload is picked from a target-specific
/// set of "extra" possible NaN payloads. The set can depend on the input operand values.
/// See the table below for the concrete NaNs this set contains on various targets.
///
/// | `target_arch` | Extra payloads possible on this platform |
/// |---------------|------------------------------------------|
/// | `aarch64`, `arm`, `arm64ec`, `loongarch64`, `powerpc` (except when `target_abi = "spe"`), `powerpc64`, `riscv32`, `riscv64`, `s390x`, `x86`, `x86_64` | None |
Thus the model's preferred quiet NaN is one permitted result whenever
multiplication or division returns NaN. This does not claim that arbitrary
Rust arithmetic NaNs have those exact bits. By contrast, unary negation and
bit conversion must preserve all non-sign bits exactly, including for every
NaN payload.
The exact relevant declarations in core/src/num/f64.rs are:
pub const MANTISSA_DIGITS: u32 = 53;
pub const NAN: f64 = 0.0_f64 / 0.0_f64;
pub const INFINITY: f64 = 1.0_f64 / 0.0_f64;
pub const NEG_INFINITY: f64 = -1.0_f64 / 0.0_f64;
pub const SIGN_MASK: u64 = 0x8000_0000_0000_0000;
pub const EXPONENT_MASK: u64 = 0x7ff0_0000_0000_0000;
pub const MANTISSA_MASK: u64 = 0x000f_ffff_ffff_ffff;
pub const fn classify(self) -> FpCategory {
// We used to have complicated logic here that avoids the simple bit-based tests to work
// around buggy codegen for x87 targets (see
// https://github.com/rust-lang/rust/issues/114479). However, some LLVM versions later, none
// of our tests is able to find any difference between the complicated and the naive
// version, so now we are back to the naive version.
let b = self.to_bits();
match (b & Self::MANTISSA_MASK, b & Self::EXPONENT_MASK) {
(0, Self::EXPONENT_MASK) => FpCategory::Infinite,
(_, Self::EXPONENT_MASK) => FpCategory::Nan,
(0, 0) => FpCategory::Zero,
(_, 0) => FpCategory::Subnormal,
_ => FpCategory::Normal,
}
}
pub const fn to_bits(self) -> u64 {
// SAFETY: `u64` is a plain old datatype so we can always transmute to it.
unsafe { mem::transmute(self) }
}
pub const fn from_bits(v: u64) -> Self {
// It turns out the safety issues with sNaN were overblown! Hooray!
// SAFETY: `u64` is a plain old datatype so we can always transmute from it.
unsafe { mem::transmute(v) }
}
The exact scalar clone body in core/src/clone.rs is:
impl const Clone for $t {
#[inline(always)]
fn clone(&self) -> Self {
*self
}
}
Frozen adapted source
---------------------
The relevant retained source file hashes are:
crate/traits.rs
9013270fb846edcb0bdf2abd0353f575fdd727974cba9e89bdab8bb4c2b4f0bf
crate/dec2flt/mod.rs
b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012
crate/dec2flt/parse.rs
50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f
crate/dec2flt/decimal.rs
633658be803b7369b18feb098a8aa1b5f714a933d3b79ecbc4899a1b05f35beb
crate/dec2flt/lemire.rs
fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1
crate/dec2flt/slow.rs
93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485
Exact constant and bit-conversion excerpt from crate/traits.rs:
impl Float for f64 {
type Int = u64;
const INFINITY: Self = Self::INFINITY;
const NEG_INFINITY: Self = Self::NEG_INFINITY;
const NAN: Self = Self::NAN;
// Bit-identical to the upstream `-f64::NAN`, without the unsupported
// compile-time float negation.
const NEG_NAN: Self = f64::from_bits(0xFFF8_0000_0000_0000);
const BITS: u32 = 64;
const SIG_TOTAL_BITS: u32 = Self::MANTISSA_DIGITS;
const EXP_MASK: Self::Int = Self::EXPONENT_MASK;
const SIG_MASK: Self::Int = Self::MANTISSA_MASK;
fn to_bits(self) -> Self::Int {
self.to_bits()
}
fn classify(self) -> FpCategory {
self.classify()
}
}
impl FloatExt for f64 {
#[inline]
fn from_u64_bits(v: u64) -> Self {
f64::from_bits(v)
}
Exact derived-constant defaults from crate/traits.rs:
/// The number of bits in the significand, *excluding* the hidden bit.
const SIG_BITS: u32 = Self::SIG_TOTAL_BITS - 1;
/// Number of bits in the exponent.
const EXP_BITS: u32 = Self::BITS - Self::SIG_BITS - 1;
/// The saturated (maximum bitpattern) value of the exponent, i.e. the infinite
/// representation.
///
/// This shifted fully right, use `EXP_MASK` for the shifted value.
const EXP_SAT: u32 = (1 << Self::EXP_BITS) - 1;
/// Signed version of `EXP_SAT` since we convert a lot.
const INFINITE_POWER: i32 = Self::EXP_SAT as i32;
/// The exponent bias value. This is also the maximum value of the exponent.
const EXP_BIAS: u32 = Self::EXP_SAT >> 1;
/// Minimum exponent value of normal values.
const EXP_MIN: i32 = -(Self::EXP_BIAS as i32 - 1);
Together with the f64-instance lines `BITS = 64` and
`SIG_TOTAL_BITS = Self::MANTISSA_DIGITS` in the preceding excerpt, these
defaults derive SIG_BITS, EXP_MIN, and INFINITE_POWER from the primitive
mantissa-digit constant rather than introducing independent parameters.
Exact checked cast excerpt from crate/dec2flt/mod.rs:
#[inline]
// This method is precisely the source `u64 as f64` primitive conversion.
// Aeneas cannot translate that cast; opacity is confined to the cast while
// the fast-path algorithm, its range proof obligation, and all calls stay
// visible in the extracted model.
#[charon::opaque]
fn from_u64(v: u64) -> Self {
debug_assert!(v <= Self::MAX_MANTISSA_FAST_PATH);
v as _
}
Here MAX_MANTISSA_FAST_PATH is the retained default 1 << 53. Therefore the
source succeeds only through the modeled branch v <= 2^53 in this debug
configuration; above it the debug assertion fails before the cast. On the
successful branch every integer is exactly representable, so the source cast
and the model rounder return the same word.
Exact power-table and assembly excerpts from crate/dec2flt/mod.rs:
/// Maximum mantissa for the fast-path (`1 << 53` for f64).
const MAX_MANTISSA_FAST_PATH: u64 = 1 << Self::SIG_TOTAL_BITS;
const MAX_EXPONENT_FAST_PATH: i64 = 22;
const MIN_EXPONENT_FAST_PATH: i64 = -Self::MAX_EXPONENT_FAST_PATH;
const MAX_EXPONENT_DISGUISED_FAST_PATH: i64 = 37;
fn pow10_fast_path(exponent: usize) -> Self {
// These bit patterns are exactly the source table's rounded binary64
// literals. The match is the same masked lookup; it merely keeps float
// constants out of Aeneas's unsupported constant interpreter.
match exponent & 31 {
0 => f64::from_bits(0x3FF0_0000_0000_0000),
1 => f64::from_bits(0x4024_0000_0000_0000),
2 => f64::from_bits(0x4059_0000_0000_0000),
3 => f64::from_bits(0x408F_4000_0000_0000),
4 => f64::from_bits(0x40C3_8800_0000_0000),
5 => f64::from_bits(0x40F8_6A00_0000_0000),
6 => f64::from_bits(0x412E_8480_0000_0000),
7 => f64::from_bits(0x4163_12D0_0000_0000),
8 => f64::from_bits(0x4197_D784_0000_0000),
9 => f64::from_bits(0x41CD_CD65_0000_0000),
10 => f64::from_bits(0x4202_A05F_2000_0000),
11 => f64::from_bits(0x4237_4876_E800_0000),
12 => f64::from_bits(0x426D_1A94_A200_0000),
13 => f64::from_bits(0x42A2_309C_E540_0000),
14 => f64::from_bits(0x42D6_BCC4_1E90_0000),
15 => f64::from_bits(0x430C_6BF5_2634_0000),
16 => f64::from_bits(0x4341_C379_37E0_8000),
17 => f64::from_bits(0x4376_3457_85D8_A000),
18 => f64::from_bits(0x43AB_C16D_674E_C800),
19 => f64::from_bits(0x43E1_58E4_6091_3D00),
20 => f64::from_bits(0x4415_AF1D_78B5_8C40),
21 => f64::from_bits(0x444B_1AE4_D6E2_EF50),
22 => f64::from_bits(0x4480_F0CF_064D_D592),
_ => f64::from_bits(0),
}
}
fn biased_fp_to_float<F: FloatExt>(x: BiasedFp) -> F {
let mut word = x.m;
word |= (x.p_biased as u64) << F::SIG_BITS;
F::from_u64_bits(word)
}
Exact native-call excerpt from crate/dec2flt/decimal.rs:
fn can_use_fast_path<F: Lemire>(&self) -> bool {
F::MIN_EXPONENT_FAST_PATH <= self.exponent
&& self.exponent <= F::MAX_EXPONENT_DISGUISED_FAST_PATH
&& self.mantissa <= F::MAX_MANTISSA_FAST_PATH
&& !self.many_digits
}
if !self.can_use_fast_path::<F>() {
return None;
}
let value = if self.exponent <= F::MAX_EXPONENT_FAST_PATH {
// normal fast path
let value = F::from_u64(self.mantissa);
if self.exponent < 0 {
// Explicit trait calls preserve Rust arithmetic and resolve
// the generic output type that Charon leaves ambiguous.
core::ops::Div::div(value, F::pow10_fast_path((-self.exponent) as _))
} else {
core::ops::Mul::mul(value, F::pow10_fast_path(self.exponent as _))
}
} else {
// disguised fast path
let shift = self.exponent - F::MAX_EXPONENT_FAST_PATH;
let mantissa = self.mantissa.checked_mul(INT_POW10[shift as usize])?;
if mantissa > F::MAX_MANTISSA_FAST_PATH {
return None;
}
core::ops::Mul::mul(
F::from_u64(mantissa),
F::pow10_fast_path(F::MAX_EXPONENT_FAST_PATH as _),
)
};
if self.negative {
Some(core::ops::Neg::neg(value))
} else {
Some(value)
}
The preceding can_use_fast_path body, together with
MAX_MANTISSA_FAST_PATH = 1 << SIG_TOTAL_BITS and SIG_TOTAL_BITS = 53 for f64,
requires the exponent to lie between -22 and 37, the input mantissa to be at
most 2^53, and many_digits to be false. Consequently an ordinary arithmetic
call has a from_u64 operand in 0..=2^53. In its negative-exponent arm,
`-self.exponent` lies in 1..=22; in its nonnegative arm, `self.exponent` lies
in 0..=22. The disguised branch checks its multiplied mantissa against 2^53
before from_u64 and uses table index 22. The paired statement
Binary64NativeCallDomain does not assert this source reachability. It says
conditionally that a from_u64 argument at most 2^53 succeeds with a finite,
non-NaN word and that a table index at most 22 succeeds with a positive,
nonzero, finite, non-NaN word. Applying that conditional statement to the
guards just derived establishes those properties for the actual ordinary and
disguised calls, and in particular establishes that every executed divisor is
nonzero.
Exact special-value excerpt from crate/dec2flt/parse.rs:
let float = match (register, len) {
(INF_3, 3) => F::INFINITY,
(INF_8, 8) => F::INFINITY,
(NAN, 3) => F::NAN,
_ => return None,
};
if negative { Some(-float) } else { Some(float) }
Thus the executed special route is INFINITY or NAN followed by conditional
negation; it does not select NEG_INFINITY or NEG_NAN directly.
The number helper has the exact source body
pub fn parse_number(s: &[u8]) -> Option<Decimal> {
if let Some((float, rest)) = parse_partial_number(s) {
if rest == s.len() {
return Some(float);
}
}
None
}
It returns only the Decimal produced by parse_partial_number; there is no
float type parameter or float operation at this boundary.
The integer-tier helper has the source type and exact executable excerpts
below (long explanatory comments are elided). In particular it returns a raw
BiasedFp and contains no from_u64 cast, primitive float multiplication,
division, negation, or from_bits call:
pub fn compute_float<F: Float>(q: i64, mut w: u64) -> BiasedFp {
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let fp_error = BiasedFp::zero_pow2(-1);
// Short-circuit if the value can only be a literal 0 or infinity.
if w == 0 || q < F::SMALLEST_POWER_OF_TEN as i64 {
return fp_zero;
} else if q > F::LARGEST_POWER_OF_TEN as i64 {
return fp_inf;
}
// Normalize our significant digits, so the most-significant bit is set.
let lz = w.leading_zeros();
w <<= lz;
let (lo, hi) = compute_product_approx(q, w, F::SIG_BITS as usize + 3);
if lo == 0xFFFF_FFFF_FFFF_FFFF {
let inside_safe_exponent = (q >= -27) && (q <= 55);
if !inside_safe_exponent {
return fp_error;
}
}
let upperbit = (hi >> 63) as i32;
let mut mantissa = hi >> (upperbit + 64 - F::SIG_BITS as i32 - 3);
let mut power2 = power(q as i32) + upperbit - lz as i32 - F::EXP_MIN + 1;
if power2 <= 0 {
if -power2 + 1 >= 64 {
// Have more than 64 bits below the minimum exponent, must be 0.
return fp_zero;
}
// Have a subnormal value.
mantissa >>= -power2 + 1;
mantissa += mantissa & 1;
mantissa >>= 1;
power2 = (mantissa >= (1_u64 << F::SIG_BITS)) as i32;
return BiasedFp { m: mantissa, p_biased: power2 };
}
// Need to handle rounding ties. Normally, we need to round up,
// but if we fall right in between and we have an even basis, we
// need to round down.
if lo <= 1
&& q >= F::MIN_EXPONENT_ROUND_TO_EVEN as i64
&& q <= F::MAX_EXPONENT_ROUND_TO_EVEN as i64
&& mantissa & 0b11 == 0b01
&& (mantissa << (upperbit + 64 - F::SIG_BITS as i32 - 3)) == hi
{
// Zero the lowest bit, so we don't round up.
mantissa &= !1_u64;
}
// Round-to-even, then shift the significant digits into place.
mantissa += mantissa & 1;
mantissa >>= 1;
if mantissa >= (2_u64 << F::SIG_BITS) {
// Rounding up overflowed, so the carry bit is set. Set the
// mantissa to 1 (only the implicit, hidden bit is set) and
// increase the exponent.
mantissa = 1_u64 << F::SIG_BITS;
power2 += 1;
}
// Zero out the hidden bit.
mantissa &= !(1_u64 << F::SIG_BITS);
if power2 >= F::INFINITE_POWER {
// Exponent is above largest normal value, must be infinite.
return fp_inf;
}
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact slow-tier source body from crate/dec2flt/slow.rs:
pub(crate) fn parse_long_mantissa<F: Float>(s: &[u8]) -> BiasedFp {
const MAX_SHIFT: usize = 60;
const NUM_POWERS: usize = 19;
const POWERS: [u8; 19] =
[0, 3, 6, 9, 13, 16, 19, 23, 26, 29, 33, 36, 39, 43, 46, 49, 53, 56, 59];
let get_shift = |n| {
if n < NUM_POWERS { POWERS[n] as usize } else { MAX_SHIFT }
};
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let mut d = parse_decimal_seq(s);
// Short-circuit if the value can only be a literal 0 or infinity.
if d.num_digits == 0 || d.decimal_point < -324 {
return fp_zero;
} else if d.decimal_point >= 310 {
return fp_inf;
}
let mut exp2 = 0_i32;
let mut loop_result = None;
// Shift right toward (1/2 ... 1].
while d.decimal_point > 0 && loop_result.is_none() {
let n = d.decimal_point as usize;
let shift = get_shift(n);
d.right_shift(shift);
if d.decimal_point < -DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_zero);
} else {
exp2 += shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// Shift left toward (1/2 ... 1].
while d.decimal_point <= 0 && loop_result.is_none() {
let shift = if d.decimal_point == 0 {
match d.digits[0] {
digit if digit >= 5 => break,
0 | 1 => 2,
_ => 1,
}
} else {
get_shift((-d.decimal_point) as _)
};
d.left_shift(shift);
if d.decimal_point > DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_inf);
} else {
exp2 -= shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// We are now in the range [1/2 ... 1] but the binary format uses [1 ... 2].
exp2 -= 1;
while F::EXP_MIN > exp2 {
let mut n = (F::EXP_MIN - exp2) as usize;
if n > MAX_SHIFT {
n = MAX_SHIFT;
}
d.right_shift(n);
exp2 += n as i32;
}
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
// Shift the decimal to the hidden bit, and then round the value
// to get the high mantissa+1 bits.
d.left_shift(F::SIG_BITS as usize + 1);
let mut mantissa = d.round();
if mantissa >= (1_u64 << (F::SIG_BITS + 1)) {
// Rounding up overflowed to the carry bit, need to
// shift back to the hidden bit.
d.right_shift(1);
exp2 += 1;
mantissa = d.round();
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
}
let mut power2 = exp2 - F::EXP_MIN + 1;
if mantissa < (1_u64 << F::SIG_BITS) {
power2 -= 1;
}
// Zero out all the bits above the explicit mantissa bits.
mantissa &= (1_u64 << F::SIG_BITS) - 1;
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact final numeric-sign excerpt from crate/dec2flt/mod.rs:
let assembled_word = fp.m | ((fp.p_biased as u64) << F::SIG_BITS);
let assembly_result = biased_fp_to_float::<F>(fp);
let lexical_sign_applied = num.negative;
let result = if lexical_sign_applied {
core::ops::Neg::neg(assembly_result)
} else {
assembly_result
};
Thus a numeric execution that reaches the integer/slow selection route
assembles its selected pair with from_bits through biased_fp_to_float and only
then conditionally negates it. A successful try_fast_path returns earlier and
does not perform this assembly. compute_float and parse_long_mantissa produce
raw BiasedFp pairs and do not call from_u64, primitive float multiplication,
division, negation, or from_bits; they do, however, execute constants derived
from SIG_TOTAL_BITS before producing those pairs.
Retained structural-boundary evidence
-------------------------------------
Several adjacent structural bindings cite this same evidence record. Their
pinned library source identities are:
core/src/num/mod.rs
f0820f9dfb94999440c8cb4a349736fa21df7e5668e19b6b49e016ff67c05ce3
core/src/option.rs
7cf61204b05d98a95bc2e322d5fbfc1f4f91505109971917d9a7fb47151c50e6
core/src/slice/mod.rs
354992a6a3d69a0185eef9044a07ea5180e767bdb467aef55e69ee3d44317840
core/src/str/mod.rs
284b4c147b5d0497ce9146f6b96e564f196aed10411a62cdccf5fc5243d40f78
Exact ASCII-digit body from core/src/num/mod.rs:
pub const fn is_ascii_digit(&self) -> bool {
matches!(*self, b'0'..=b'9')
}
Exact Option control-flow bodies from core/src/option.rs:
fn branch(self) -> ControlFlow<Self::Residual, Self::Output> {
match self {
Some(v) => ControlFlow::Continue(v),
None => ControlFlow::Break(None),
}
}
fn from_residual(residual: Option<convert::Infallible>) -> Self {
match residual {
None => None,
}
}
Exact slice observation bodies from core/src/slice/mod.rs:
pub const fn first(&self) -> Option<&T> {
if let [first, ..] = self { Some(first) } else { None }
}
pub const fn split_first(&self) -> Option<(&T, &[T])> {
if let [first, tail @ ..] = self { Some((first, tail)) } else { None }
}
Exact string-byte body from core/src/str/mod.rs:
pub const fn as_bytes(&self) -> &[u8] {
// SAFETY: const sound because we transmute two types with the same layout
unsafe { mem::transmute(self) }
}
reference/model-evidence/binary64-probe.rs
#![feature(float_masks)]
use std::num::FpCategory;
fn bits(label: &str, value: f64) {
println!("{label}={:016x}", value.to_bits());
}
fn main() {
println!("target_arch={}", std::env::consts::ARCH);
println!("mantissa_digits={}", f64::MANTISSA_DIGITS);
println!("exponent_mask={:016x}", f64::EXPONENT_MASK);
println!("mantissa_mask={:016x}", f64::MANTISSA_MASK);
bits("nan", f64::NAN);
bits("infinity", f64::INFINITY);
bits("neg_infinity", f64::NEG_INFINITY);
for (label, value) in [
("nan_category", f64::NAN),
("infinity_category", f64::INFINITY),
("zero_category", 0.0),
("subnormal_category", f64::from_bits(1)),
("normal_category", 1.0),
] {
let category = match value.classify() {
FpCategory::Nan => "Nan",
FpCategory::Infinite => "Infinite",
FpCategory::Zero => "Zero",
FpCategory::Subnormal => "Subnormal",
FpCategory::Normal => "Normal",
};
println!("{label}={category}");
}
let payload_nan_word = 0x7ff0_0000_0000_0001_u64;
println!(
"from_bits_to_bits={:016x}",
f64::from_bits(payload_nan_word).to_bits()
);
bits("neg_payload_nan", -f64::from_bits(payload_nan_word));
bits("neg_zero", -0.0);
bits("subnormal_tie_to_even_zero", f64::from_bits(1) * 0.5);
bits("subnormal_tie_to_even_two", f64::from_bits(3) * 0.5);
bits("normal_division", 1.0 / 10.0);
bits("mul_negative_zero", -0.0 * 2.0);
bits("div_negative_zero", -1.0 / f64::INFINITY);
bits("div_negative_infinity", 1.0 / -0.0);
bits("mul_overflow", f64::MAX * (1.0 + f64::EPSILON));
println!("mul_zero_infinity_is_nan={}", (0.0 * f64::INFINITY).is_nan());
println!("div_zero_zero_is_nan={}", (0.0_f64 / 0.0_f64).is_nan());
println!("mul_nan_is_nan={}", (f64::NAN * 1.0).is_nan());
bits("cast_2_pow_53", (1_u64 << 53) as f64);
bits("cast_2_pow_53_plus_1", ((1_u64 << 53) + 1) as f64);
}
Assumptions / kernel axioms
- propext
conservative transitive union of saved axiom observations across node dependencies
Requirements depending on this item (32)
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
All 32 entries
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
- Exponent agreement
- Correctness or defer
- Native correctness or defer
- Numeric acceptance
- Accumulated-value diagnostic
- Record bounds
- Invalid rejection
- Accumulated-value diagnostic
- Equal-target bridge
- Exact rounding
- Infinity
- Invalid rejection
- NaN acceptance
- No spurious NaNs
- Numeric acceptance
- Numeric sign
- Selected exponent range
- Selected magnitude sign
- Signed zero
- Totality
- Rounding determinism
- Rounding totality
- Full-significand diagnostic
- Infinity
- NaN
- Rejection
These requirements are linked to this item through the declared dependencies of their proofs.
Record details
| Record source | Tablet/model-support.json |
|---|---|
| Kind | opaque external binding |
| Preservation assessment origin | VerifierPanel |
| Preservation fingerprint | preservation-v1:96bd39406872e536084e34cf33ba207ff4cd2c724b0b8ff9905db88e43098f6c |
| Preservation current fingerprint | preservation-v1:96bd39406872e536084e34cf33ba207ff4cd2c724b0b8ff9905db88e43098f6c |
| Preservation freshness | matches current fingerprint |
| Correspondence approved fingerprint | {"own_tex":"daa1d788720f27eca31e722db51d2d3e6e80bb4fb62e35d6bc6d9686e17ab381","lean_semantic_closure":"c02db9c8475e537013729680a2bfb86330285c45f141bc1a8a5f7fd0490e03d1","preamble_tex":""} |
| Correspondence current fingerprint | {"own_tex":"daa1d788720f27eca31e722db51d2d3e6e80bb4fb62e35d6bc6d9686e17ab381","lean_semantic_closure":"c02db9c8475e537013729680a2bfb86330285c45f141bc1a8a5f7fd0490e03d1","preamble_tex":""} |
| Correspondence freshness | matches current fingerprint |
Exact preservation assessment
{
"status": "VerifierPass",
"origin": "VerifierPanel",
"fingerprints": {
"own_tex_hash": "f02883324606aa168c6a6cfb535ae8d307def46a26950e516f74c319f55f1c36",
"dep_statement_hashes": {},
"combined_sound_fp": "preservation-v1:96bd39406872e536084e34cf33ba207ff4cd2c724b0b8ff9905db88e43098f6c"
},
"lane_votes": {
"v1": "Pass"
},
"reviewer_action_id": null
}Exact source record
{
"name": "core.slice.Slice.first",
"extracted_signature": "{T : Type} : Slice T → Result (Option T)",
"rust_symbol": "core::slice::{[T]}::first",
"raw_declaration_sha256": "221298364b1df3a924d1ee3951ad3e7d786065b4aa48e2b74eedb0a49f643105",
"node": "ModelSliceFirst",
"declaration": "dec2flt_model.ModelSliceFirst"
}Captured evidence identities
[
{
"path": "reference/model-evidence/binary64-boundary.txt",
"sha256": "a17d82e7f789ce7f1fbb3922a66ec8806999e526532d637605263882d37b7abf",
"cited_by": [
"Tablet/ModelSliceFirst.tex",
"Tablet/model-support.json"
]
},
{
"path": "reference/model-evidence/binary64-probe.rs",
"sha256": "68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e",
"cited_by": [
"reference/model-evidence/binary64-boundary.txt"
]
}
]core::slice::{[T]}::split_first
Inspect related source (1)
- split_first · core/src/slice/mod.rs:198 Rust library
Related source and models come from the extraction records and declared dependencies.
| Rust item | core::slice::{[T]}::split_first |
|---|---|
| Recorded source | /rustc/library/core/src/slice/mod.rs |
| Lines | 198:4–198:57 |
The related-source link includes this operation’s Rust standard-library implementation.
Opaque extraction signature
{T : Type} : Slice T → Result (Option (T × (Slice T)))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: ModelSliceSplitFirst]
def ModelSliceSplitFirst {T : Type}
(s : Slice T) : Result (Option (T × Slice T)) :=
-- BODY
match h : s.val with
| [] => ok none
| x :: xs => ok (some (x, ⟨xs, by
have p := s.property
rw [h] at p
have p' : 1 + xs.length ≤ Usize.max := by
simpa [Nat.add_comm] using p
exact Nat.le_trans (Nat.le_add_left xs.length 1) p'⟩))
end dec2flt_model
Why this model is faithful
Definition
Preservation argument
Claim
Proof
Authored arguments for individual requirements
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
Recorded review
| Correspondence | Pass |
|---|---|
| Preservation | VerifierPass |
ModelSliceSplitFirst · Lean checked
Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
reference/model-evidence/binary64-boundary.txt
Primary evidence for the binary64 boundary
==========================================
Scope and identities
--------------------
This record concerns the frozen x86_64-unknown-linux-gnu extraction, the
adapted Rust crate retained in this repository, and the installed toolchain
named by modeling-input/SETUP.md. The probe source is retained at
reference/model-evidence/binary64-probe.rs; no scratch source is required to
reproduce it.
Toolchain executable:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
Target:
x86_64-unknown-linux-gnu
rustc executable SHA-256:
162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
Probe source SHA-256:
68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
Compiled probe SHA-256:
f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
Frozen generated.lean SHA-256:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692
Frozen modeling-input/manifest.json SHA-256:
2fc182c0c7acccad30c449ca349b999759b84e8ed4ec9d590e8295e43eeec077
Approved Binary64ModelDefault.lean SHA-256 at the time of this record:
03ae48fb631e6242bd21bf95d0481b66acae05f8cab343c7ab279b3c116538a3
Exact reproduction commands
---------------------------
Run from the repository root:
R=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
P=reference/model-evidence/binary64-probe.rs
B=.trellis/scratch/binary64-probe
"$R" --version --verbose
sha256sum "$R"
sha256sum "$P"
"$R" --target x86_64-unknown-linux-gnu -C opt-level=0 "$P" -o "$B"
sha256sum "$B"
"$B"
Raw output
----------
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
rustc_sha256=162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
probe_sha256=68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
binary_sha256=f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
target_arch=x86_64
mantissa_digits=53
exponent_mask=7ff0000000000000
mantissa_mask=000fffffffffffff
nan=7ff8000000000000
infinity=7ff0000000000000
neg_infinity=fff0000000000000
nan_category=Nan
infinity_category=Infinite
zero_category=Zero
subnormal_category=Subnormal
normal_category=Normal
from_bits_to_bits=7ff0000000000001
neg_payload_nan=fff0000000000001
neg_zero=8000000000000000
subnormal_tie_to_even_zero=0000000000000000
subnormal_tie_to_even_two=0000000000000002
normal_division=3fb999999999999a
mul_negative_zero=8000000000000000
div_negative_zero=8000000000000000
div_negative_infinity=fff0000000000000
mul_overflow=7ff0000000000000
mul_zero_infinity_is_nan=true
div_zero_zero_is_nan=true
mul_nan_is_nan=true
cast_2_pow_53=4340000000000000
cast_2_pow_53_plus_1=4340000000000000
Pinned Rust library sources
---------------------------
The installed sources below belong to the same named toolchain. Their
SHA-256 identities are:
core/src/primitive_docs.rs
c4b8627dd67d5dac8f383f383a9e7ff1229ea43e7599610fc61988694cf0f3e5
core/src/num/f64.rs
84540a6a59e347c63caabe12cf895ba1239c76a50682471567007138fac1c618
core/src/clone.rs
23f9cfc80347fde6b8457d46fbf7a2b8d9f34c8c58601b0b6f714ca2f6d1976b
The exact relevant text of core/src/primitive_docs.rs is:
#[rustc_doc_primitive = "f64"]
#[doc(alias = "double")]
/// A 64-bit floating-point type (specifically, the "binary64" type defined in IEEE 754-2008).
///
/// This type is very similar to [`prim@f32`], but has increased precision by using twice as many
/// bits. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on double-precision
/// values][wikipedia] for more information.
The referenced primitive-f32 documentation supplies the common primitive
floating-point operation rules quoted next:
/// - −0.0: IEEE 754 floating-point numbers have a bit that indicates their sign, so −0.0 is a
/// possible value. For comparison −0.0 = +0.0, but floating-point operations can carry
/// the sign bit through arithmetic operations. This means −0.0 × +0.0 produces −0.0 and
/// a negative number rounded to a value smaller than a float can represent also produces −0.0.
/// - [∞](#associatedconstant.INFINITY) and
/// [−∞](#associatedconstant.NEG_INFINITY): these result from calculations
/// like `1.0 / 0.0`.
///
/// When a primitive operation (addition, subtraction, multiplication, or
/// division) is performed on this type, the result is rounded according to the
/// roundTiesToEven direction defined in IEEE 754-2008. That means:
///
/// - The result is the representable value closest to the true value, if there
/// is a unique closest representable value.
/// - If the true value is exactly half-way between two representable values,
/// the result is the one with an even least-significant binary digit.
/// - If the true value's magnitude is ≥ `f32::MAX` + 2<sup>(`f32::MAX_EXP` −
/// `f32::MANTISSA_DIGITS` − 1)</sup>, the result is ∞ or −∞ (preserving the
/// true value's sign).
The same file explicitly separates arithmetic NaN choice from exact bitwise
operations; its exact relevant text is:
/// The rules for NaN values differ between *arithmetic* and *non-arithmetic* (or "bitwise")
/// operations. The non-arithmetic operations are unary `-`, `abs`, `copysign`, `signum`,
/// `{to,from}_bits`, `{to,from}_{be,le,ne}_bytes` and `is_sign_{positive,negative}`. These
/// operations are guaranteed to exactly preserve the bit pattern of their input except for possibly
/// changing the sign bit.
///
/// The following rules apply when a NaN value is returned from an arithmetic operation:
/// - The result has a non-deterministic sign.
/// - The quiet bit and payload are non-deterministically chosen from
/// the following set of options:
///
/// - **Preferred NaN**: The quiet bit is set and the payload is all-zero.
/// - **Quieting NaN propagation**: The quiet bit is set and the payload is copied from any input
/// operand that is a NaN. If the inputs and outputs do not have the same payload size (i.e., for
/// `as` casts), then
/// - If the output is smaller than the input, low-order bits of the payload get dropped.
/// - If the output is larger than the input, the payload gets filled up with 0s in the low-order
/// bits.
/// - **Unchanged NaN propagation**: The quiet bit and payload are copied from any input operand
/// that is a NaN. If the inputs and outputs do not have the same size (i.e., for `as` casts), the
/// same rules as for "quieting NaN propagation" apply, with one caveat: if the output is smaller
/// than the input, dropping the low-order bits may result in a payload of 0; a payload of 0 is not
/// possible with a signaling NaN (the all-0 significand encodes an infinity) so unchanged NaN
/// propagation cannot occur with some inputs.
/// - **Target-specific NaN**: The quiet bit is set and the payload is picked from a target-specific
/// set of "extra" possible NaN payloads. The set can depend on the input operand values.
/// See the table below for the concrete NaNs this set contains on various targets.
///
/// | `target_arch` | Extra payloads possible on this platform |
/// |---------------|------------------------------------------|
/// | `aarch64`, `arm`, `arm64ec`, `loongarch64`, `powerpc` (except when `target_abi = "spe"`), `powerpc64`, `riscv32`, `riscv64`, `s390x`, `x86`, `x86_64` | None |
Thus the model's preferred quiet NaN is one permitted result whenever
multiplication or division returns NaN. This does not claim that arbitrary
Rust arithmetic NaNs have those exact bits. By contrast, unary negation and
bit conversion must preserve all non-sign bits exactly, including for every
NaN payload.
The exact relevant declarations in core/src/num/f64.rs are:
pub const MANTISSA_DIGITS: u32 = 53;
pub const NAN: f64 = 0.0_f64 / 0.0_f64;
pub const INFINITY: f64 = 1.0_f64 / 0.0_f64;
pub const NEG_INFINITY: f64 = -1.0_f64 / 0.0_f64;
pub const SIGN_MASK: u64 = 0x8000_0000_0000_0000;
pub const EXPONENT_MASK: u64 = 0x7ff0_0000_0000_0000;
pub const MANTISSA_MASK: u64 = 0x000f_ffff_ffff_ffff;
pub const fn classify(self) -> FpCategory {
// We used to have complicated logic here that avoids the simple bit-based tests to work
// around buggy codegen for x87 targets (see
// https://github.com/rust-lang/rust/issues/114479). However, some LLVM versions later, none
// of our tests is able to find any difference between the complicated and the naive
// version, so now we are back to the naive version.
let b = self.to_bits();
match (b & Self::MANTISSA_MASK, b & Self::EXPONENT_MASK) {
(0, Self::EXPONENT_MASK) => FpCategory::Infinite,
(_, Self::EXPONENT_MASK) => FpCategory::Nan,
(0, 0) => FpCategory::Zero,
(_, 0) => FpCategory::Subnormal,
_ => FpCategory::Normal,
}
}
pub const fn to_bits(self) -> u64 {
// SAFETY: `u64` is a plain old datatype so we can always transmute to it.
unsafe { mem::transmute(self) }
}
pub const fn from_bits(v: u64) -> Self {
// It turns out the safety issues with sNaN were overblown! Hooray!
// SAFETY: `u64` is a plain old datatype so we can always transmute from it.
unsafe { mem::transmute(v) }
}
The exact scalar clone body in core/src/clone.rs is:
impl const Clone for $t {
#[inline(always)]
fn clone(&self) -> Self {
*self
}
}
Frozen adapted source
---------------------
The relevant retained source file hashes are:
crate/traits.rs
9013270fb846edcb0bdf2abd0353f575fdd727974cba9e89bdab8bb4c2b4f0bf
crate/dec2flt/mod.rs
b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012
crate/dec2flt/parse.rs
50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f
crate/dec2flt/decimal.rs
633658be803b7369b18feb098a8aa1b5f714a933d3b79ecbc4899a1b05f35beb
crate/dec2flt/lemire.rs
fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1
crate/dec2flt/slow.rs
93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485
Exact constant and bit-conversion excerpt from crate/traits.rs:
impl Float for f64 {
type Int = u64;
const INFINITY: Self = Self::INFINITY;
const NEG_INFINITY: Self = Self::NEG_INFINITY;
const NAN: Self = Self::NAN;
// Bit-identical to the upstream `-f64::NAN`, without the unsupported
// compile-time float negation.
const NEG_NAN: Self = f64::from_bits(0xFFF8_0000_0000_0000);
const BITS: u32 = 64;
const SIG_TOTAL_BITS: u32 = Self::MANTISSA_DIGITS;
const EXP_MASK: Self::Int = Self::EXPONENT_MASK;
const SIG_MASK: Self::Int = Self::MANTISSA_MASK;
fn to_bits(self) -> Self::Int {
self.to_bits()
}
fn classify(self) -> FpCategory {
self.classify()
}
}
impl FloatExt for f64 {
#[inline]
fn from_u64_bits(v: u64) -> Self {
f64::from_bits(v)
}
Exact derived-constant defaults from crate/traits.rs:
/// The number of bits in the significand, *excluding* the hidden bit.
const SIG_BITS: u32 = Self::SIG_TOTAL_BITS - 1;
/// Number of bits in the exponent.
const EXP_BITS: u32 = Self::BITS - Self::SIG_BITS - 1;
/// The saturated (maximum bitpattern) value of the exponent, i.e. the infinite
/// representation.
///
/// This shifted fully right, use `EXP_MASK` for the shifted value.
const EXP_SAT: u32 = (1 << Self::EXP_BITS) - 1;
/// Signed version of `EXP_SAT` since we convert a lot.
const INFINITE_POWER: i32 = Self::EXP_SAT as i32;
/// The exponent bias value. This is also the maximum value of the exponent.
const EXP_BIAS: u32 = Self::EXP_SAT >> 1;
/// Minimum exponent value of normal values.
const EXP_MIN: i32 = -(Self::EXP_BIAS as i32 - 1);
Together with the f64-instance lines `BITS = 64` and
`SIG_TOTAL_BITS = Self::MANTISSA_DIGITS` in the preceding excerpt, these
defaults derive SIG_BITS, EXP_MIN, and INFINITE_POWER from the primitive
mantissa-digit constant rather than introducing independent parameters.
Exact checked cast excerpt from crate/dec2flt/mod.rs:
#[inline]
// This method is precisely the source `u64 as f64` primitive conversion.
// Aeneas cannot translate that cast; opacity is confined to the cast while
// the fast-path algorithm, its range proof obligation, and all calls stay
// visible in the extracted model.
#[charon::opaque]
fn from_u64(v: u64) -> Self {
debug_assert!(v <= Self::MAX_MANTISSA_FAST_PATH);
v as _
}
Here MAX_MANTISSA_FAST_PATH is the retained default 1 << 53. Therefore the
source succeeds only through the modeled branch v <= 2^53 in this debug
configuration; above it the debug assertion fails before the cast. On the
successful branch every integer is exactly representable, so the source cast
and the model rounder return the same word.
Exact power-table and assembly excerpts from crate/dec2flt/mod.rs:
/// Maximum mantissa for the fast-path (`1 << 53` for f64).
const MAX_MANTISSA_FAST_PATH: u64 = 1 << Self::SIG_TOTAL_BITS;
const MAX_EXPONENT_FAST_PATH: i64 = 22;
const MIN_EXPONENT_FAST_PATH: i64 = -Self::MAX_EXPONENT_FAST_PATH;
const MAX_EXPONENT_DISGUISED_FAST_PATH: i64 = 37;
fn pow10_fast_path(exponent: usize) -> Self {
// These bit patterns are exactly the source table's rounded binary64
// literals. The match is the same masked lookup; it merely keeps float
// constants out of Aeneas's unsupported constant interpreter.
match exponent & 31 {
0 => f64::from_bits(0x3FF0_0000_0000_0000),
1 => f64::from_bits(0x4024_0000_0000_0000),
2 => f64::from_bits(0x4059_0000_0000_0000),
3 => f64::from_bits(0x408F_4000_0000_0000),
4 => f64::from_bits(0x40C3_8800_0000_0000),
5 => f64::from_bits(0x40F8_6A00_0000_0000),
6 => f64::from_bits(0x412E_8480_0000_0000),
7 => f64::from_bits(0x4163_12D0_0000_0000),
8 => f64::from_bits(0x4197_D784_0000_0000),
9 => f64::from_bits(0x41CD_CD65_0000_0000),
10 => f64::from_bits(0x4202_A05F_2000_0000),
11 => f64::from_bits(0x4237_4876_E800_0000),
12 => f64::from_bits(0x426D_1A94_A200_0000),
13 => f64::from_bits(0x42A2_309C_E540_0000),
14 => f64::from_bits(0x42D6_BCC4_1E90_0000),
15 => f64::from_bits(0x430C_6BF5_2634_0000),
16 => f64::from_bits(0x4341_C379_37E0_8000),
17 => f64::from_bits(0x4376_3457_85D8_A000),
18 => f64::from_bits(0x43AB_C16D_674E_C800),
19 => f64::from_bits(0x43E1_58E4_6091_3D00),
20 => f64::from_bits(0x4415_AF1D_78B5_8C40),
21 => f64::from_bits(0x444B_1AE4_D6E2_EF50),
22 => f64::from_bits(0x4480_F0CF_064D_D592),
_ => f64::from_bits(0),
}
}
fn biased_fp_to_float<F: FloatExt>(x: BiasedFp) -> F {
let mut word = x.m;
word |= (x.p_biased as u64) << F::SIG_BITS;
F::from_u64_bits(word)
}
Exact native-call excerpt from crate/dec2flt/decimal.rs:
fn can_use_fast_path<F: Lemire>(&self) -> bool {
F::MIN_EXPONENT_FAST_PATH <= self.exponent
&& self.exponent <= F::MAX_EXPONENT_DISGUISED_FAST_PATH
&& self.mantissa <= F::MAX_MANTISSA_FAST_PATH
&& !self.many_digits
}
if !self.can_use_fast_path::<F>() {
return None;
}
let value = if self.exponent <= F::MAX_EXPONENT_FAST_PATH {
// normal fast path
let value = F::from_u64(self.mantissa);
if self.exponent < 0 {
// Explicit trait calls preserve Rust arithmetic and resolve
// the generic output type that Charon leaves ambiguous.
core::ops::Div::div(value, F::pow10_fast_path((-self.exponent) as _))
} else {
core::ops::Mul::mul(value, F::pow10_fast_path(self.exponent as _))
}
} else {
// disguised fast path
let shift = self.exponent - F::MAX_EXPONENT_FAST_PATH;
let mantissa = self.mantissa.checked_mul(INT_POW10[shift as usize])?;
if mantissa > F::MAX_MANTISSA_FAST_PATH {
return None;
}
core::ops::Mul::mul(
F::from_u64(mantissa),
F::pow10_fast_path(F::MAX_EXPONENT_FAST_PATH as _),
)
};
if self.negative {
Some(core::ops::Neg::neg(value))
} else {
Some(value)
}
The preceding can_use_fast_path body, together with
MAX_MANTISSA_FAST_PATH = 1 << SIG_TOTAL_BITS and SIG_TOTAL_BITS = 53 for f64,
requires the exponent to lie between -22 and 37, the input mantissa to be at
most 2^53, and many_digits to be false. Consequently an ordinary arithmetic
call has a from_u64 operand in 0..=2^53. In its negative-exponent arm,
`-self.exponent` lies in 1..=22; in its nonnegative arm, `self.exponent` lies
in 0..=22. The disguised branch checks its multiplied mantissa against 2^53
before from_u64 and uses table index 22. The paired statement
Binary64NativeCallDomain does not assert this source reachability. It says
conditionally that a from_u64 argument at most 2^53 succeeds with a finite,
non-NaN word and that a table index at most 22 succeeds with a positive,
nonzero, finite, non-NaN word. Applying that conditional statement to the
guards just derived establishes those properties for the actual ordinary and
disguised calls, and in particular establishes that every executed divisor is
nonzero.
Exact special-value excerpt from crate/dec2flt/parse.rs:
let float = match (register, len) {
(INF_3, 3) => F::INFINITY,
(INF_8, 8) => F::INFINITY,
(NAN, 3) => F::NAN,
_ => return None,
};
if negative { Some(-float) } else { Some(float) }
Thus the executed special route is INFINITY or NAN followed by conditional
negation; it does not select NEG_INFINITY or NEG_NAN directly.
The number helper has the exact source body
pub fn parse_number(s: &[u8]) -> Option<Decimal> {
if let Some((float, rest)) = parse_partial_number(s) {
if rest == s.len() {
return Some(float);
}
}
None
}
It returns only the Decimal produced by parse_partial_number; there is no
float type parameter or float operation at this boundary.
The integer-tier helper has the source type and exact executable excerpts
below (long explanatory comments are elided). In particular it returns a raw
BiasedFp and contains no from_u64 cast, primitive float multiplication,
division, negation, or from_bits call:
pub fn compute_float<F: Float>(q: i64, mut w: u64) -> BiasedFp {
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let fp_error = BiasedFp::zero_pow2(-1);
// Short-circuit if the value can only be a literal 0 or infinity.
if w == 0 || q < F::SMALLEST_POWER_OF_TEN as i64 {
return fp_zero;
} else if q > F::LARGEST_POWER_OF_TEN as i64 {
return fp_inf;
}
// Normalize our significant digits, so the most-significant bit is set.
let lz = w.leading_zeros();
w <<= lz;
let (lo, hi) = compute_product_approx(q, w, F::SIG_BITS as usize + 3);
if lo == 0xFFFF_FFFF_FFFF_FFFF {
let inside_safe_exponent = (q >= -27) && (q <= 55);
if !inside_safe_exponent {
return fp_error;
}
}
let upperbit = (hi >> 63) as i32;
let mut mantissa = hi >> (upperbit + 64 - F::SIG_BITS as i32 - 3);
let mut power2 = power(q as i32) + upperbit - lz as i32 - F::EXP_MIN + 1;
if power2 <= 0 {
if -power2 + 1 >= 64 {
// Have more than 64 bits below the minimum exponent, must be 0.
return fp_zero;
}
// Have a subnormal value.
mantissa >>= -power2 + 1;
mantissa += mantissa & 1;
mantissa >>= 1;
power2 = (mantissa >= (1_u64 << F::SIG_BITS)) as i32;
return BiasedFp { m: mantissa, p_biased: power2 };
}
// Need to handle rounding ties. Normally, we need to round up,
// but if we fall right in between and we have an even basis, we
// need to round down.
if lo <= 1
&& q >= F::MIN_EXPONENT_ROUND_TO_EVEN as i64
&& q <= F::MAX_EXPONENT_ROUND_TO_EVEN as i64
&& mantissa & 0b11 == 0b01
&& (mantissa << (upperbit + 64 - F::SIG_BITS as i32 - 3)) == hi
{
// Zero the lowest bit, so we don't round up.
mantissa &= !1_u64;
}
// Round-to-even, then shift the significant digits into place.
mantissa += mantissa & 1;
mantissa >>= 1;
if mantissa >= (2_u64 << F::SIG_BITS) {
// Rounding up overflowed, so the carry bit is set. Set the
// mantissa to 1 (only the implicit, hidden bit is set) and
// increase the exponent.
mantissa = 1_u64 << F::SIG_BITS;
power2 += 1;
}
// Zero out the hidden bit.
mantissa &= !(1_u64 << F::SIG_BITS);
if power2 >= F::INFINITE_POWER {
// Exponent is above largest normal value, must be infinite.
return fp_inf;
}
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact slow-tier source body from crate/dec2flt/slow.rs:
pub(crate) fn parse_long_mantissa<F: Float>(s: &[u8]) -> BiasedFp {
const MAX_SHIFT: usize = 60;
const NUM_POWERS: usize = 19;
const POWERS: [u8; 19] =
[0, 3, 6, 9, 13, 16, 19, 23, 26, 29, 33, 36, 39, 43, 46, 49, 53, 56, 59];
let get_shift = |n| {
if n < NUM_POWERS { POWERS[n] as usize } else { MAX_SHIFT }
};
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let mut d = parse_decimal_seq(s);
// Short-circuit if the value can only be a literal 0 or infinity.
if d.num_digits == 0 || d.decimal_point < -324 {
return fp_zero;
} else if d.decimal_point >= 310 {
return fp_inf;
}
let mut exp2 = 0_i32;
let mut loop_result = None;
// Shift right toward (1/2 ... 1].
while d.decimal_point > 0 && loop_result.is_none() {
let n = d.decimal_point as usize;
let shift = get_shift(n);
d.right_shift(shift);
if d.decimal_point < -DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_zero);
} else {
exp2 += shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// Shift left toward (1/2 ... 1].
while d.decimal_point <= 0 && loop_result.is_none() {
let shift = if d.decimal_point == 0 {
match d.digits[0] {
digit if digit >= 5 => break,
0 | 1 => 2,
_ => 1,
}
} else {
get_shift((-d.decimal_point) as _)
};
d.left_shift(shift);
if d.decimal_point > DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_inf);
} else {
exp2 -= shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// We are now in the range [1/2 ... 1] but the binary format uses [1 ... 2].
exp2 -= 1;
while F::EXP_MIN > exp2 {
let mut n = (F::EXP_MIN - exp2) as usize;
if n > MAX_SHIFT {
n = MAX_SHIFT;
}
d.right_shift(n);
exp2 += n as i32;
}
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
// Shift the decimal to the hidden bit, and then round the value
// to get the high mantissa+1 bits.
d.left_shift(F::SIG_BITS as usize + 1);
let mut mantissa = d.round();
if mantissa >= (1_u64 << (F::SIG_BITS + 1)) {
// Rounding up overflowed to the carry bit, need to
// shift back to the hidden bit.
d.right_shift(1);
exp2 += 1;
mantissa = d.round();
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
}
let mut power2 = exp2 - F::EXP_MIN + 1;
if mantissa < (1_u64 << F::SIG_BITS) {
power2 -= 1;
}
// Zero out all the bits above the explicit mantissa bits.
mantissa &= (1_u64 << F::SIG_BITS) - 1;
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact final numeric-sign excerpt from crate/dec2flt/mod.rs:
let assembled_word = fp.m | ((fp.p_biased as u64) << F::SIG_BITS);
let assembly_result = biased_fp_to_float::<F>(fp);
let lexical_sign_applied = num.negative;
let result = if lexical_sign_applied {
core::ops::Neg::neg(assembly_result)
} else {
assembly_result
};
Thus a numeric execution that reaches the integer/slow selection route
assembles its selected pair with from_bits through biased_fp_to_float and only
then conditionally negates it. A successful try_fast_path returns earlier and
does not perform this assembly. compute_float and parse_long_mantissa produce
raw BiasedFp pairs and do not call from_u64, primitive float multiplication,
division, negation, or from_bits; they do, however, execute constants derived
from SIG_TOTAL_BITS before producing those pairs.
Retained structural-boundary evidence
-------------------------------------
Several adjacent structural bindings cite this same evidence record. Their
pinned library source identities are:
core/src/num/mod.rs
f0820f9dfb94999440c8cb4a349736fa21df7e5668e19b6b49e016ff67c05ce3
core/src/option.rs
7cf61204b05d98a95bc2e322d5fbfc1f4f91505109971917d9a7fb47151c50e6
core/src/slice/mod.rs
354992a6a3d69a0185eef9044a07ea5180e767bdb467aef55e69ee3d44317840
core/src/str/mod.rs
284b4c147b5d0497ce9146f6b96e564f196aed10411a62cdccf5fc5243d40f78
Exact ASCII-digit body from core/src/num/mod.rs:
pub const fn is_ascii_digit(&self) -> bool {
matches!(*self, b'0'..=b'9')
}
Exact Option control-flow bodies from core/src/option.rs:
fn branch(self) -> ControlFlow<Self::Residual, Self::Output> {
match self {
Some(v) => ControlFlow::Continue(v),
None => ControlFlow::Break(None),
}
}
fn from_residual(residual: Option<convert::Infallible>) -> Self {
match residual {
None => None,
}
}
Exact slice observation bodies from core/src/slice/mod.rs:
pub const fn first(&self) -> Option<&T> {
if let [first, ..] = self { Some(first) } else { None }
}
pub const fn split_first(&self) -> Option<(&T, &[T])> {
if let [first, tail @ ..] = self { Some((first, tail)) } else { None }
}
Exact string-byte body from core/src/str/mod.rs:
pub const fn as_bytes(&self) -> &[u8] {
// SAFETY: const sound because we transmute two types with the same layout
unsafe { mem::transmute(self) }
}
reference/model-evidence/binary64-probe.rs
#![feature(float_masks)]
use std::num::FpCategory;
fn bits(label: &str, value: f64) {
println!("{label}={:016x}", value.to_bits());
}
fn main() {
println!("target_arch={}", std::env::consts::ARCH);
println!("mantissa_digits={}", f64::MANTISSA_DIGITS);
println!("exponent_mask={:016x}", f64::EXPONENT_MASK);
println!("mantissa_mask={:016x}", f64::MANTISSA_MASK);
bits("nan", f64::NAN);
bits("infinity", f64::INFINITY);
bits("neg_infinity", f64::NEG_INFINITY);
for (label, value) in [
("nan_category", f64::NAN),
("infinity_category", f64::INFINITY),
("zero_category", 0.0),
("subnormal_category", f64::from_bits(1)),
("normal_category", 1.0),
] {
let category = match value.classify() {
FpCategory::Nan => "Nan",
FpCategory::Infinite => "Infinite",
FpCategory::Zero => "Zero",
FpCategory::Subnormal => "Subnormal",
FpCategory::Normal => "Normal",
};
println!("{label}={category}");
}
let payload_nan_word = 0x7ff0_0000_0000_0001_u64;
println!(
"from_bits_to_bits={:016x}",
f64::from_bits(payload_nan_word).to_bits()
);
bits("neg_payload_nan", -f64::from_bits(payload_nan_word));
bits("neg_zero", -0.0);
bits("subnormal_tie_to_even_zero", f64::from_bits(1) * 0.5);
bits("subnormal_tie_to_even_two", f64::from_bits(3) * 0.5);
bits("normal_division", 1.0 / 10.0);
bits("mul_negative_zero", -0.0 * 2.0);
bits("div_negative_zero", -1.0 / f64::INFINITY);
bits("div_negative_infinity", 1.0 / -0.0);
bits("mul_overflow", f64::MAX * (1.0 + f64::EPSILON));
println!("mul_zero_infinity_is_nan={}", (0.0 * f64::INFINITY).is_nan());
println!("div_zero_zero_is_nan={}", (0.0_f64 / 0.0_f64).is_nan());
println!("mul_nan_is_nan={}", (f64::NAN * 1.0).is_nan());
bits("cast_2_pow_53", (1_u64 << 53) as f64);
bits("cast_2_pow_53_plus_1", ((1_u64 << 53) + 1) as f64);
}
Assumptions / kernel axioms
- Classical.choice
- Quot.sound
- propext
conservative transitive union of saved axiom observations across node dependencies
Requirements depending on this item (32)
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
All 32 entries
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
- Exponent agreement
- Correctness or defer
- Native correctness or defer
- Numeric acceptance
- Accumulated-value diagnostic
- Record bounds
- Invalid rejection
- Accumulated-value diagnostic
- Equal-target bridge
- Exact rounding
- Infinity
- Invalid rejection
- NaN acceptance
- No spurious NaNs
- Numeric acceptance
- Numeric sign
- Selected exponent range
- Selected magnitude sign
- Signed zero
- Totality
- Rounding determinism
- Rounding totality
- Full-significand diagnostic
- Infinity
- NaN
- Rejection
These requirements are linked to this item through the declared dependencies of their proofs.
Record details
| Record source | Tablet/model-support.json |
|---|---|
| Kind | opaque external binding |
| Preservation assessment origin | VerifierPanel |
| Preservation fingerprint | preservation-v1:175364f69c1c0a543bc994cfae9e0028000c4ed35666842a1523846be95109cd |
| Preservation current fingerprint | preservation-v1:175364f69c1c0a543bc994cfae9e0028000c4ed35666842a1523846be95109cd |
| Preservation freshness | matches current fingerprint |
| Correspondence approved fingerprint | {"own_tex":"b941136529ebbb99d2692bd8b5047d080684eea508b678b8cf7b06ef567ee21f","lean_semantic_closure":"f2d984413bfd9b1860de8e3d5e54d883a9edf8c6755551f3e6a7eec141a714e9","preamble_tex":""} |
| Correspondence current fingerprint | {"own_tex":"b941136529ebbb99d2692bd8b5047d080684eea508b678b8cf7b06ef567ee21f","lean_semantic_closure":"f2d984413bfd9b1860de8e3d5e54d883a9edf8c6755551f3e6a7eec141a714e9","preamble_tex":""} |
| Correspondence freshness | matches current fingerprint |
Exact preservation assessment
{
"status": "VerifierPass",
"origin": "VerifierPanel",
"fingerprints": {
"own_tex_hash": "31ccd4026ab55bbe7d4f551a91fd77beedcd4dbf82b0450d688abcebbf437499",
"dep_statement_hashes": {},
"combined_sound_fp": "preservation-v1:175364f69c1c0a543bc994cfae9e0028000c4ed35666842a1523846be95109cd"
},
"lane_votes": {
"v1": "Pass"
},
"reviewer_action_id": null
}Exact source record
{
"name": "core.slice.Slice.split_first",
"extracted_signature": "{T : Type} : Slice T → Result (Option (T × (Slice T)))",
"rust_symbol": "core::slice::{[T]}::split_first",
"raw_declaration_sha256": "f983904621cafa667f0bfd9822b4d95fb0bd6820ee84b107130e7c4f7bac3c49",
"node": "ModelSliceSplitFirst",
"declaration": "dec2flt_model.ModelSliceSplitFirst"
}Captured evidence identities
[
{
"path": "reference/model-evidence/binary64-boundary.txt",
"sha256": "a17d82e7f789ce7f1fbb3922a66ec8806999e526532d637605263882d37b7abf",
"cited_by": [
"Tablet/ModelSliceSplitFirst.tex",
"Tablet/model-support.json"
]
},
{
"path": "reference/model-evidence/binary64-probe.rs",
"sha256": "68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e",
"cited_by": [
"reference/model-evidence/binary64-boundary.txt"
]
}
]core::str::{str}::as_bytes
Inspect related source (1)
- as_bytes · core/src/str/mod.rs:498 Rust library
Related source and models come from the extraction records and declared dependencies.
| Rust item | core::str::{str}::as_bytes |
|---|---|
| Recorded source | /rustc/library/core/src/str/mod.rs |
| Lines | 498:4–498:41 |
The related-source link includes this operation’s Rust standard-library implementation.
Opaque extraction signature
: Str → Result (Slice Std.U8)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: ModelStrAsBytes]
def ModelStrAsBytes (s : Str) : Result (Slice Std.U8) :=
-- BODY
ok s
end dec2flt_model
Why this model is faithful
Definition
Str byte slice s,
\mathsf{ModelStrAsBytes}(s) successfully returns s itself.Preservation argument
Claim
Proof
Authored arguments for individual requirements
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
Recorded review
| Correspondence | Pass |
|---|---|
| Preservation | VerifierPass |
ModelStrAsBytes · Lean checked
Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
reference/model-evidence/binary64-boundary.txt
Primary evidence for the binary64 boundary
==========================================
Scope and identities
--------------------
This record concerns the frozen x86_64-unknown-linux-gnu extraction, the
adapted Rust crate retained in this repository, and the installed toolchain
named by modeling-input/SETUP.md. The probe source is retained at
reference/model-evidence/binary64-probe.rs; no scratch source is required to
reproduce it.
Toolchain executable:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
Target:
x86_64-unknown-linux-gnu
rustc executable SHA-256:
162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
Probe source SHA-256:
68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
Compiled probe SHA-256:
f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
Frozen generated.lean SHA-256:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692
Frozen modeling-input/manifest.json SHA-256:
2fc182c0c7acccad30c449ca349b999759b84e8ed4ec9d590e8295e43eeec077
Approved Binary64ModelDefault.lean SHA-256 at the time of this record:
03ae48fb631e6242bd21bf95d0481b66acae05f8cab343c7ab279b3c116538a3
Exact reproduction commands
---------------------------
Run from the repository root:
R=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
P=reference/model-evidence/binary64-probe.rs
B=.trellis/scratch/binary64-probe
"$R" --version --verbose
sha256sum "$R"
sha256sum "$P"
"$R" --target x86_64-unknown-linux-gnu -C opt-level=0 "$P" -o "$B"
sha256sum "$B"
"$B"
Raw output
----------
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
rustc_sha256=162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
probe_sha256=68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
binary_sha256=f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
target_arch=x86_64
mantissa_digits=53
exponent_mask=7ff0000000000000
mantissa_mask=000fffffffffffff
nan=7ff8000000000000
infinity=7ff0000000000000
neg_infinity=fff0000000000000
nan_category=Nan
infinity_category=Infinite
zero_category=Zero
subnormal_category=Subnormal
normal_category=Normal
from_bits_to_bits=7ff0000000000001
neg_payload_nan=fff0000000000001
neg_zero=8000000000000000
subnormal_tie_to_even_zero=0000000000000000
subnormal_tie_to_even_two=0000000000000002
normal_division=3fb999999999999a
mul_negative_zero=8000000000000000
div_negative_zero=8000000000000000
div_negative_infinity=fff0000000000000
mul_overflow=7ff0000000000000
mul_zero_infinity_is_nan=true
div_zero_zero_is_nan=true
mul_nan_is_nan=true
cast_2_pow_53=4340000000000000
cast_2_pow_53_plus_1=4340000000000000
Pinned Rust library sources
---------------------------
The installed sources below belong to the same named toolchain. Their
SHA-256 identities are:
core/src/primitive_docs.rs
c4b8627dd67d5dac8f383f383a9e7ff1229ea43e7599610fc61988694cf0f3e5
core/src/num/f64.rs
84540a6a59e347c63caabe12cf895ba1239c76a50682471567007138fac1c618
core/src/clone.rs
23f9cfc80347fde6b8457d46fbf7a2b8d9f34c8c58601b0b6f714ca2f6d1976b
The exact relevant text of core/src/primitive_docs.rs is:
#[rustc_doc_primitive = "f64"]
#[doc(alias = "double")]
/// A 64-bit floating-point type (specifically, the "binary64" type defined in IEEE 754-2008).
///
/// This type is very similar to [`prim@f32`], but has increased precision by using twice as many
/// bits. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on double-precision
/// values][wikipedia] for more information.
The referenced primitive-f32 documentation supplies the common primitive
floating-point operation rules quoted next:
/// - −0.0: IEEE 754 floating-point numbers have a bit that indicates their sign, so −0.0 is a
/// possible value. For comparison −0.0 = +0.0, but floating-point operations can carry
/// the sign bit through arithmetic operations. This means −0.0 × +0.0 produces −0.0 and
/// a negative number rounded to a value smaller than a float can represent also produces −0.0.
/// - [∞](#associatedconstant.INFINITY) and
/// [−∞](#associatedconstant.NEG_INFINITY): these result from calculations
/// like `1.0 / 0.0`.
///
/// When a primitive operation (addition, subtraction, multiplication, or
/// division) is performed on this type, the result is rounded according to the
/// roundTiesToEven direction defined in IEEE 754-2008. That means:
///
/// - The result is the representable value closest to the true value, if there
/// is a unique closest representable value.
/// - If the true value is exactly half-way between two representable values,
/// the result is the one with an even least-significant binary digit.
/// - If the true value's magnitude is ≥ `f32::MAX` + 2<sup>(`f32::MAX_EXP` −
/// `f32::MANTISSA_DIGITS` − 1)</sup>, the result is ∞ or −∞ (preserving the
/// true value's sign).
The same file explicitly separates arithmetic NaN choice from exact bitwise
operations; its exact relevant text is:
/// The rules for NaN values differ between *arithmetic* and *non-arithmetic* (or "bitwise")
/// operations. The non-arithmetic operations are unary `-`, `abs`, `copysign`, `signum`,
/// `{to,from}_bits`, `{to,from}_{be,le,ne}_bytes` and `is_sign_{positive,negative}`. These
/// operations are guaranteed to exactly preserve the bit pattern of their input except for possibly
/// changing the sign bit.
///
/// The following rules apply when a NaN value is returned from an arithmetic operation:
/// - The result has a non-deterministic sign.
/// - The quiet bit and payload are non-deterministically chosen from
/// the following set of options:
///
/// - **Preferred NaN**: The quiet bit is set and the payload is all-zero.
/// - **Quieting NaN propagation**: The quiet bit is set and the payload is copied from any input
/// operand that is a NaN. If the inputs and outputs do not have the same payload size (i.e., for
/// `as` casts), then
/// - If the output is smaller than the input, low-order bits of the payload get dropped.
/// - If the output is larger than the input, the payload gets filled up with 0s in the low-order
/// bits.
/// - **Unchanged NaN propagation**: The quiet bit and payload are copied from any input operand
/// that is a NaN. If the inputs and outputs do not have the same size (i.e., for `as` casts), the
/// same rules as for "quieting NaN propagation" apply, with one caveat: if the output is smaller
/// than the input, dropping the low-order bits may result in a payload of 0; a payload of 0 is not
/// possible with a signaling NaN (the all-0 significand encodes an infinity) so unchanged NaN
/// propagation cannot occur with some inputs.
/// - **Target-specific NaN**: The quiet bit is set and the payload is picked from a target-specific
/// set of "extra" possible NaN payloads. The set can depend on the input operand values.
/// See the table below for the concrete NaNs this set contains on various targets.
///
/// | `target_arch` | Extra payloads possible on this platform |
/// |---------------|------------------------------------------|
/// | `aarch64`, `arm`, `arm64ec`, `loongarch64`, `powerpc` (except when `target_abi = "spe"`), `powerpc64`, `riscv32`, `riscv64`, `s390x`, `x86`, `x86_64` | None |
Thus the model's preferred quiet NaN is one permitted result whenever
multiplication or division returns NaN. This does not claim that arbitrary
Rust arithmetic NaNs have those exact bits. By contrast, unary negation and
bit conversion must preserve all non-sign bits exactly, including for every
NaN payload.
The exact relevant declarations in core/src/num/f64.rs are:
pub const MANTISSA_DIGITS: u32 = 53;
pub const NAN: f64 = 0.0_f64 / 0.0_f64;
pub const INFINITY: f64 = 1.0_f64 / 0.0_f64;
pub const NEG_INFINITY: f64 = -1.0_f64 / 0.0_f64;
pub const SIGN_MASK: u64 = 0x8000_0000_0000_0000;
pub const EXPONENT_MASK: u64 = 0x7ff0_0000_0000_0000;
pub const MANTISSA_MASK: u64 = 0x000f_ffff_ffff_ffff;
pub const fn classify(self) -> FpCategory {
// We used to have complicated logic here that avoids the simple bit-based tests to work
// around buggy codegen for x87 targets (see
// https://github.com/rust-lang/rust/issues/114479). However, some LLVM versions later, none
// of our tests is able to find any difference between the complicated and the naive
// version, so now we are back to the naive version.
let b = self.to_bits();
match (b & Self::MANTISSA_MASK, b & Self::EXPONENT_MASK) {
(0, Self::EXPONENT_MASK) => FpCategory::Infinite,
(_, Self::EXPONENT_MASK) => FpCategory::Nan,
(0, 0) => FpCategory::Zero,
(_, 0) => FpCategory::Subnormal,
_ => FpCategory::Normal,
}
}
pub const fn to_bits(self) -> u64 {
// SAFETY: `u64` is a plain old datatype so we can always transmute to it.
unsafe { mem::transmute(self) }
}
pub const fn from_bits(v: u64) -> Self {
// It turns out the safety issues with sNaN were overblown! Hooray!
// SAFETY: `u64` is a plain old datatype so we can always transmute from it.
unsafe { mem::transmute(v) }
}
The exact scalar clone body in core/src/clone.rs is:
impl const Clone for $t {
#[inline(always)]
fn clone(&self) -> Self {
*self
}
}
Frozen adapted source
---------------------
The relevant retained source file hashes are:
crate/traits.rs
9013270fb846edcb0bdf2abd0353f575fdd727974cba9e89bdab8bb4c2b4f0bf
crate/dec2flt/mod.rs
b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012
crate/dec2flt/parse.rs
50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f
crate/dec2flt/decimal.rs
633658be803b7369b18feb098a8aa1b5f714a933d3b79ecbc4899a1b05f35beb
crate/dec2flt/lemire.rs
fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1
crate/dec2flt/slow.rs
93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485
Exact constant and bit-conversion excerpt from crate/traits.rs:
impl Float for f64 {
type Int = u64;
const INFINITY: Self = Self::INFINITY;
const NEG_INFINITY: Self = Self::NEG_INFINITY;
const NAN: Self = Self::NAN;
// Bit-identical to the upstream `-f64::NAN`, without the unsupported
// compile-time float negation.
const NEG_NAN: Self = f64::from_bits(0xFFF8_0000_0000_0000);
const BITS: u32 = 64;
const SIG_TOTAL_BITS: u32 = Self::MANTISSA_DIGITS;
const EXP_MASK: Self::Int = Self::EXPONENT_MASK;
const SIG_MASK: Self::Int = Self::MANTISSA_MASK;
fn to_bits(self) -> Self::Int {
self.to_bits()
}
fn classify(self) -> FpCategory {
self.classify()
}
}
impl FloatExt for f64 {
#[inline]
fn from_u64_bits(v: u64) -> Self {
f64::from_bits(v)
}
Exact derived-constant defaults from crate/traits.rs:
/// The number of bits in the significand, *excluding* the hidden bit.
const SIG_BITS: u32 = Self::SIG_TOTAL_BITS - 1;
/// Number of bits in the exponent.
const EXP_BITS: u32 = Self::BITS - Self::SIG_BITS - 1;
/// The saturated (maximum bitpattern) value of the exponent, i.e. the infinite
/// representation.
///
/// This shifted fully right, use `EXP_MASK` for the shifted value.
const EXP_SAT: u32 = (1 << Self::EXP_BITS) - 1;
/// Signed version of `EXP_SAT` since we convert a lot.
const INFINITE_POWER: i32 = Self::EXP_SAT as i32;
/// The exponent bias value. This is also the maximum value of the exponent.
const EXP_BIAS: u32 = Self::EXP_SAT >> 1;
/// Minimum exponent value of normal values.
const EXP_MIN: i32 = -(Self::EXP_BIAS as i32 - 1);
Together with the f64-instance lines `BITS = 64` and
`SIG_TOTAL_BITS = Self::MANTISSA_DIGITS` in the preceding excerpt, these
defaults derive SIG_BITS, EXP_MIN, and INFINITE_POWER from the primitive
mantissa-digit constant rather than introducing independent parameters.
Exact checked cast excerpt from crate/dec2flt/mod.rs:
#[inline]
// This method is precisely the source `u64 as f64` primitive conversion.
// Aeneas cannot translate that cast; opacity is confined to the cast while
// the fast-path algorithm, its range proof obligation, and all calls stay
// visible in the extracted model.
#[charon::opaque]
fn from_u64(v: u64) -> Self {
debug_assert!(v <= Self::MAX_MANTISSA_FAST_PATH);
v as _
}
Here MAX_MANTISSA_FAST_PATH is the retained default 1 << 53. Therefore the
source succeeds only through the modeled branch v <= 2^53 in this debug
configuration; above it the debug assertion fails before the cast. On the
successful branch every integer is exactly representable, so the source cast
and the model rounder return the same word.
Exact power-table and assembly excerpts from crate/dec2flt/mod.rs:
/// Maximum mantissa for the fast-path (`1 << 53` for f64).
const MAX_MANTISSA_FAST_PATH: u64 = 1 << Self::SIG_TOTAL_BITS;
const MAX_EXPONENT_FAST_PATH: i64 = 22;
const MIN_EXPONENT_FAST_PATH: i64 = -Self::MAX_EXPONENT_FAST_PATH;
const MAX_EXPONENT_DISGUISED_FAST_PATH: i64 = 37;
fn pow10_fast_path(exponent: usize) -> Self {
// These bit patterns are exactly the source table's rounded binary64
// literals. The match is the same masked lookup; it merely keeps float
// constants out of Aeneas's unsupported constant interpreter.
match exponent & 31 {
0 => f64::from_bits(0x3FF0_0000_0000_0000),
1 => f64::from_bits(0x4024_0000_0000_0000),
2 => f64::from_bits(0x4059_0000_0000_0000),
3 => f64::from_bits(0x408F_4000_0000_0000),
4 => f64::from_bits(0x40C3_8800_0000_0000),
5 => f64::from_bits(0x40F8_6A00_0000_0000),
6 => f64::from_bits(0x412E_8480_0000_0000),
7 => f64::from_bits(0x4163_12D0_0000_0000),
8 => f64::from_bits(0x4197_D784_0000_0000),
9 => f64::from_bits(0x41CD_CD65_0000_0000),
10 => f64::from_bits(0x4202_A05F_2000_0000),
11 => f64::from_bits(0x4237_4876_E800_0000),
12 => f64::from_bits(0x426D_1A94_A200_0000),
13 => f64::from_bits(0x42A2_309C_E540_0000),
14 => f64::from_bits(0x42D6_BCC4_1E90_0000),
15 => f64::from_bits(0x430C_6BF5_2634_0000),
16 => f64::from_bits(0x4341_C379_37E0_8000),
17 => f64::from_bits(0x4376_3457_85D8_A000),
18 => f64::from_bits(0x43AB_C16D_674E_C800),
19 => f64::from_bits(0x43E1_58E4_6091_3D00),
20 => f64::from_bits(0x4415_AF1D_78B5_8C40),
21 => f64::from_bits(0x444B_1AE4_D6E2_EF50),
22 => f64::from_bits(0x4480_F0CF_064D_D592),
_ => f64::from_bits(0),
}
}
fn biased_fp_to_float<F: FloatExt>(x: BiasedFp) -> F {
let mut word = x.m;
word |= (x.p_biased as u64) << F::SIG_BITS;
F::from_u64_bits(word)
}
Exact native-call excerpt from crate/dec2flt/decimal.rs:
fn can_use_fast_path<F: Lemire>(&self) -> bool {
F::MIN_EXPONENT_FAST_PATH <= self.exponent
&& self.exponent <= F::MAX_EXPONENT_DISGUISED_FAST_PATH
&& self.mantissa <= F::MAX_MANTISSA_FAST_PATH
&& !self.many_digits
}
if !self.can_use_fast_path::<F>() {
return None;
}
let value = if self.exponent <= F::MAX_EXPONENT_FAST_PATH {
// normal fast path
let value = F::from_u64(self.mantissa);
if self.exponent < 0 {
// Explicit trait calls preserve Rust arithmetic and resolve
// the generic output type that Charon leaves ambiguous.
core::ops::Div::div(value, F::pow10_fast_path((-self.exponent) as _))
} else {
core::ops::Mul::mul(value, F::pow10_fast_path(self.exponent as _))
}
} else {
// disguised fast path
let shift = self.exponent - F::MAX_EXPONENT_FAST_PATH;
let mantissa = self.mantissa.checked_mul(INT_POW10[shift as usize])?;
if mantissa > F::MAX_MANTISSA_FAST_PATH {
return None;
}
core::ops::Mul::mul(
F::from_u64(mantissa),
F::pow10_fast_path(F::MAX_EXPONENT_FAST_PATH as _),
)
};
if self.negative {
Some(core::ops::Neg::neg(value))
} else {
Some(value)
}
The preceding can_use_fast_path body, together with
MAX_MANTISSA_FAST_PATH = 1 << SIG_TOTAL_BITS and SIG_TOTAL_BITS = 53 for f64,
requires the exponent to lie between -22 and 37, the input mantissa to be at
most 2^53, and many_digits to be false. Consequently an ordinary arithmetic
call has a from_u64 operand in 0..=2^53. In its negative-exponent arm,
`-self.exponent` lies in 1..=22; in its nonnegative arm, `self.exponent` lies
in 0..=22. The disguised branch checks its multiplied mantissa against 2^53
before from_u64 and uses table index 22. The paired statement
Binary64NativeCallDomain does not assert this source reachability. It says
conditionally that a from_u64 argument at most 2^53 succeeds with a finite,
non-NaN word and that a table index at most 22 succeeds with a positive,
nonzero, finite, non-NaN word. Applying that conditional statement to the
guards just derived establishes those properties for the actual ordinary and
disguised calls, and in particular establishes that every executed divisor is
nonzero.
Exact special-value excerpt from crate/dec2flt/parse.rs:
let float = match (register, len) {
(INF_3, 3) => F::INFINITY,
(INF_8, 8) => F::INFINITY,
(NAN, 3) => F::NAN,
_ => return None,
};
if negative { Some(-float) } else { Some(float) }
Thus the executed special route is INFINITY or NAN followed by conditional
negation; it does not select NEG_INFINITY or NEG_NAN directly.
The number helper has the exact source body
pub fn parse_number(s: &[u8]) -> Option<Decimal> {
if let Some((float, rest)) = parse_partial_number(s) {
if rest == s.len() {
return Some(float);
}
}
None
}
It returns only the Decimal produced by parse_partial_number; there is no
float type parameter or float operation at this boundary.
The integer-tier helper has the source type and exact executable excerpts
below (long explanatory comments are elided). In particular it returns a raw
BiasedFp and contains no from_u64 cast, primitive float multiplication,
division, negation, or from_bits call:
pub fn compute_float<F: Float>(q: i64, mut w: u64) -> BiasedFp {
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let fp_error = BiasedFp::zero_pow2(-1);
// Short-circuit if the value can only be a literal 0 or infinity.
if w == 0 || q < F::SMALLEST_POWER_OF_TEN as i64 {
return fp_zero;
} else if q > F::LARGEST_POWER_OF_TEN as i64 {
return fp_inf;
}
// Normalize our significant digits, so the most-significant bit is set.
let lz = w.leading_zeros();
w <<= lz;
let (lo, hi) = compute_product_approx(q, w, F::SIG_BITS as usize + 3);
if lo == 0xFFFF_FFFF_FFFF_FFFF {
let inside_safe_exponent = (q >= -27) && (q <= 55);
if !inside_safe_exponent {
return fp_error;
}
}
let upperbit = (hi >> 63) as i32;
let mut mantissa = hi >> (upperbit + 64 - F::SIG_BITS as i32 - 3);
let mut power2 = power(q as i32) + upperbit - lz as i32 - F::EXP_MIN + 1;
if power2 <= 0 {
if -power2 + 1 >= 64 {
// Have more than 64 bits below the minimum exponent, must be 0.
return fp_zero;
}
// Have a subnormal value.
mantissa >>= -power2 + 1;
mantissa += mantissa & 1;
mantissa >>= 1;
power2 = (mantissa >= (1_u64 << F::SIG_BITS)) as i32;
return BiasedFp { m: mantissa, p_biased: power2 };
}
// Need to handle rounding ties. Normally, we need to round up,
// but if we fall right in between and we have an even basis, we
// need to round down.
if lo <= 1
&& q >= F::MIN_EXPONENT_ROUND_TO_EVEN as i64
&& q <= F::MAX_EXPONENT_ROUND_TO_EVEN as i64
&& mantissa & 0b11 == 0b01
&& (mantissa << (upperbit + 64 - F::SIG_BITS as i32 - 3)) == hi
{
// Zero the lowest bit, so we don't round up.
mantissa &= !1_u64;
}
// Round-to-even, then shift the significant digits into place.
mantissa += mantissa & 1;
mantissa >>= 1;
if mantissa >= (2_u64 << F::SIG_BITS) {
// Rounding up overflowed, so the carry bit is set. Set the
// mantissa to 1 (only the implicit, hidden bit is set) and
// increase the exponent.
mantissa = 1_u64 << F::SIG_BITS;
power2 += 1;
}
// Zero out the hidden bit.
mantissa &= !(1_u64 << F::SIG_BITS);
if power2 >= F::INFINITE_POWER {
// Exponent is above largest normal value, must be infinite.
return fp_inf;
}
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact slow-tier source body from crate/dec2flt/slow.rs:
pub(crate) fn parse_long_mantissa<F: Float>(s: &[u8]) -> BiasedFp {
const MAX_SHIFT: usize = 60;
const NUM_POWERS: usize = 19;
const POWERS: [u8; 19] =
[0, 3, 6, 9, 13, 16, 19, 23, 26, 29, 33, 36, 39, 43, 46, 49, 53, 56, 59];
let get_shift = |n| {
if n < NUM_POWERS { POWERS[n] as usize } else { MAX_SHIFT }
};
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let mut d = parse_decimal_seq(s);
// Short-circuit if the value can only be a literal 0 or infinity.
if d.num_digits == 0 || d.decimal_point < -324 {
return fp_zero;
} else if d.decimal_point >= 310 {
return fp_inf;
}
let mut exp2 = 0_i32;
let mut loop_result = None;
// Shift right toward (1/2 ... 1].
while d.decimal_point > 0 && loop_result.is_none() {
let n = d.decimal_point as usize;
let shift = get_shift(n);
d.right_shift(shift);
if d.decimal_point < -DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_zero);
} else {
exp2 += shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// Shift left toward (1/2 ... 1].
while d.decimal_point <= 0 && loop_result.is_none() {
let shift = if d.decimal_point == 0 {
match d.digits[0] {
digit if digit >= 5 => break,
0 | 1 => 2,
_ => 1,
}
} else {
get_shift((-d.decimal_point) as _)
};
d.left_shift(shift);
if d.decimal_point > DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_inf);
} else {
exp2 -= shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// We are now in the range [1/2 ... 1] but the binary format uses [1 ... 2].
exp2 -= 1;
while F::EXP_MIN > exp2 {
let mut n = (F::EXP_MIN - exp2) as usize;
if n > MAX_SHIFT {
n = MAX_SHIFT;
}
d.right_shift(n);
exp2 += n as i32;
}
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
// Shift the decimal to the hidden bit, and then round the value
// to get the high mantissa+1 bits.
d.left_shift(F::SIG_BITS as usize + 1);
let mut mantissa = d.round();
if mantissa >= (1_u64 << (F::SIG_BITS + 1)) {
// Rounding up overflowed to the carry bit, need to
// shift back to the hidden bit.
d.right_shift(1);
exp2 += 1;
mantissa = d.round();
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
}
let mut power2 = exp2 - F::EXP_MIN + 1;
if mantissa < (1_u64 << F::SIG_BITS) {
power2 -= 1;
}
// Zero out all the bits above the explicit mantissa bits.
mantissa &= (1_u64 << F::SIG_BITS) - 1;
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact final numeric-sign excerpt from crate/dec2flt/mod.rs:
let assembled_word = fp.m | ((fp.p_biased as u64) << F::SIG_BITS);
let assembly_result = biased_fp_to_float::<F>(fp);
let lexical_sign_applied = num.negative;
let result = if lexical_sign_applied {
core::ops::Neg::neg(assembly_result)
} else {
assembly_result
};
Thus a numeric execution that reaches the integer/slow selection route
assembles its selected pair with from_bits through biased_fp_to_float and only
then conditionally negates it. A successful try_fast_path returns earlier and
does not perform this assembly. compute_float and parse_long_mantissa produce
raw BiasedFp pairs and do not call from_u64, primitive float multiplication,
division, negation, or from_bits; they do, however, execute constants derived
from SIG_TOTAL_BITS before producing those pairs.
Retained structural-boundary evidence
-------------------------------------
Several adjacent structural bindings cite this same evidence record. Their
pinned library source identities are:
core/src/num/mod.rs
f0820f9dfb94999440c8cb4a349736fa21df7e5668e19b6b49e016ff67c05ce3
core/src/option.rs
7cf61204b05d98a95bc2e322d5fbfc1f4f91505109971917d9a7fb47151c50e6
core/src/slice/mod.rs
354992a6a3d69a0185eef9044a07ea5180e767bdb467aef55e69ee3d44317840
core/src/str/mod.rs
284b4c147b5d0497ce9146f6b96e564f196aed10411a62cdccf5fc5243d40f78
Exact ASCII-digit body from core/src/num/mod.rs:
pub const fn is_ascii_digit(&self) -> bool {
matches!(*self, b'0'..=b'9')
}
Exact Option control-flow bodies from core/src/option.rs:
fn branch(self) -> ControlFlow<Self::Residual, Self::Output> {
match self {
Some(v) => ControlFlow::Continue(v),
None => ControlFlow::Break(None),
}
}
fn from_residual(residual: Option<convert::Infallible>) -> Self {
match residual {
None => None,
}
}
Exact slice observation bodies from core/src/slice/mod.rs:
pub const fn first(&self) -> Option<&T> {
if let [first, ..] = self { Some(first) } else { None }
}
pub const fn split_first(&self) -> Option<(&T, &[T])> {
if let [first, tail @ ..] = self { Some((first, tail)) } else { None }
}
Exact string-byte body from core/src/str/mod.rs:
pub const fn as_bytes(&self) -> &[u8] {
// SAFETY: const sound because we transmute two types with the same layout
unsafe { mem::transmute(self) }
}
reference/model-evidence/binary64-probe.rs
#![feature(float_masks)]
use std::num::FpCategory;
fn bits(label: &str, value: f64) {
println!("{label}={:016x}", value.to_bits());
}
fn main() {
println!("target_arch={}", std::env::consts::ARCH);
println!("mantissa_digits={}", f64::MANTISSA_DIGITS);
println!("exponent_mask={:016x}", f64::EXPONENT_MASK);
println!("mantissa_mask={:016x}", f64::MANTISSA_MASK);
bits("nan", f64::NAN);
bits("infinity", f64::INFINITY);
bits("neg_infinity", f64::NEG_INFINITY);
for (label, value) in [
("nan_category", f64::NAN),
("infinity_category", f64::INFINITY),
("zero_category", 0.0),
("subnormal_category", f64::from_bits(1)),
("normal_category", 1.0),
] {
let category = match value.classify() {
FpCategory::Nan => "Nan",
FpCategory::Infinite => "Infinite",
FpCategory::Zero => "Zero",
FpCategory::Subnormal => "Subnormal",
FpCategory::Normal => "Normal",
};
println!("{label}={category}");
}
let payload_nan_word = 0x7ff0_0000_0000_0001_u64;
println!(
"from_bits_to_bits={:016x}",
f64::from_bits(payload_nan_word).to_bits()
);
bits("neg_payload_nan", -f64::from_bits(payload_nan_word));
bits("neg_zero", -0.0);
bits("subnormal_tie_to_even_zero", f64::from_bits(1) * 0.5);
bits("subnormal_tie_to_even_two", f64::from_bits(3) * 0.5);
bits("normal_division", 1.0 / 10.0);
bits("mul_negative_zero", -0.0 * 2.0);
bits("div_negative_zero", -1.0 / f64::INFINITY);
bits("div_negative_infinity", 1.0 / -0.0);
bits("mul_overflow", f64::MAX * (1.0 + f64::EPSILON));
println!("mul_zero_infinity_is_nan={}", (0.0 * f64::INFINITY).is_nan());
println!("div_zero_zero_is_nan={}", (0.0_f64 / 0.0_f64).is_nan());
println!("mul_nan_is_nan={}", (f64::NAN * 1.0).is_nan());
bits("cast_2_pow_53", (1_u64 << 53) as f64);
bits("cast_2_pow_53_plus_1", ((1_u64 << 53) + 1) as f64);
}
Assumptions / kernel axioms
- propext
conservative transitive union of saved axiom observations across node dependencies
Requirements depending on this item (32)
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
All 32 entries
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
- Exponent agreement
- Correctness or defer
- Native correctness or defer
- Numeric acceptance
- Accumulated-value diagnostic
- Record bounds
- Invalid rejection
- Accumulated-value diagnostic
- Equal-target bridge
- Exact rounding
- Infinity
- Invalid rejection
- NaN acceptance
- No spurious NaNs
- Numeric acceptance
- Numeric sign
- Selected exponent range
- Selected magnitude sign
- Signed zero
- Totality
- Rounding determinism
- Rounding totality
- Full-significand diagnostic
- Infinity
- NaN
- Rejection
These requirements are linked to this item through the declared dependencies of their proofs.
Record details
| Record source | Tablet/model-support.json |
|---|---|
| Kind | opaque external binding |
| Preservation assessment origin | VerifierPanel |
| Preservation fingerprint | preservation-v1:4a0defa2eb412da7a27d859d9af1287332e5e64ebeb7e68c2fc04404cf69b88f |
| Preservation current fingerprint | preservation-v1:4a0defa2eb412da7a27d859d9af1287332e5e64ebeb7e68c2fc04404cf69b88f |
| Preservation freshness | matches current fingerprint |
| Correspondence approved fingerprint | {"own_tex":"7df2b5123e579ab4bfb5510ea39ca58bceb2387aa50af74f44127e51a1e7f281","lean_semantic_closure":"d53346dcad87db5a726f330ad015dd667460351ed0ca2ed56f7916a28b27ce6f","preamble_tex":""} |
| Correspondence current fingerprint | {"own_tex":"7df2b5123e579ab4bfb5510ea39ca58bceb2387aa50af74f44127e51a1e7f281","lean_semantic_closure":"d53346dcad87db5a726f330ad015dd667460351ed0ca2ed56f7916a28b27ce6f","preamble_tex":""} |
| Correspondence freshness | matches current fingerprint |
Exact preservation assessment
{
"status": "VerifierPass",
"origin": "VerifierPanel",
"fingerprints": {
"own_tex_hash": "dc61a8e1551b7e78aa25fa57263f5d0a395523d4375bd5d374316bf0b8446439",
"dep_statement_hashes": {},
"combined_sound_fp": "preservation-v1:4a0defa2eb412da7a27d859d9af1287332e5e64ebeb7e68c2fc04404cf69b88f"
},
"lane_votes": {
"v1": "Pass"
},
"reviewer_action_id": null
}Exact source record
{
"name": "core.str.Str.as_bytes",
"extracted_signature": ": Str → Result (Slice Std.U8)",
"rust_symbol": "core::str::{str}::as_bytes",
"raw_declaration_sha256": "11bae0b1f519e9d892c9835bacc776977e8d5dbf1013af4a24178a41025a8b3f",
"node": "ModelStrAsBytes",
"declaration": "dec2flt_model.ModelStrAsBytes"
}Captured evidence identities
[
{
"path": "reference/model-evidence/binary64-boundary.txt",
"sha256": "a17d82e7f789ce7f1fbb3922a66ec8806999e526532d637605263882d37b7abf",
"cited_by": [
"Tablet/ModelStrAsBytes.tex",
"Tablet/model-support.json"
]
},
{
"path": "reference/model-evidence/binary64-probe.rs",
"sha256": "68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e",
"cited_by": [
"reference/model-evidence/binary64-boundary.txt"
]
}
]dec2flt_model::num::imp::dec2flt::{impl dec2flt_model::num::imp::dec2flt::Lemire<u64> for f64}::from_u64
Inspect related source (1)
- from_u64 · dec2flt/mod.rs:260 Program Rust
Related source and models come from the extraction records and declared dependencies.
| Rust item | dec2flt_model::num::imp::dec2flt::{impl dec2flt_model::num::imp::dec2flt::Lemire<u64> for f64}::from_u64 |
|---|---|
| Recorded source | num/imp/../../dec2flt/mod.rs |
| Lines | 260:4–263:5 |
Opaque extraction signature
: Std.U64 → Result F64Lean definition
Trellis authored this Lean model for an operation outside the mechanical extraction. Modeling choices explains its behavior and review.
import Tablet.Binary64ModelDefault
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: ModelF64FromU64]
def ModelF64FromU64 : Std.U64 -> Result F64 :=
-- BODY
Binary64ModelDefault.fromU64
end dec2flt_model
Why this model is faithful
Definition
Preservation argument
Claim
u64-to-f64 cast on its asserted domain and reports assertion failure outside it.Proof
Authored arguments for individual requirements
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
Recorded review
| Correspondence | Pass |
|---|---|
| Preservation | VerifierPass |
ModelF64FromU64 · Lean checked
Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
reference/model-evidence/binary64-boundary.txt
Primary evidence for the binary64 boundary
==========================================
Scope and identities
--------------------
This record concerns the frozen x86_64-unknown-linux-gnu extraction, the
adapted Rust crate retained in this repository, and the installed toolchain
named by modeling-input/SETUP.md. The probe source is retained at
reference/model-evidence/binary64-probe.rs; no scratch source is required to
reproduce it.
Toolchain executable:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
Target:
x86_64-unknown-linux-gnu
rustc executable SHA-256:
162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
Probe source SHA-256:
68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
Compiled probe SHA-256:
f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
Frozen generated.lean SHA-256:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692
Frozen modeling-input/manifest.json SHA-256:
2fc182c0c7acccad30c449ca349b999759b84e8ed4ec9d590e8295e43eeec077
Approved Binary64ModelDefault.lean SHA-256 at the time of this record:
03ae48fb631e6242bd21bf95d0481b66acae05f8cab343c7ab279b3c116538a3
Exact reproduction commands
---------------------------
Run from the repository root:
R=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
P=reference/model-evidence/binary64-probe.rs
B=.trellis/scratch/binary64-probe
"$R" --version --verbose
sha256sum "$R"
sha256sum "$P"
"$R" --target x86_64-unknown-linux-gnu -C opt-level=0 "$P" -o "$B"
sha256sum "$B"
"$B"
Raw output
----------
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
rustc_sha256=162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
probe_sha256=68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
binary_sha256=f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
target_arch=x86_64
mantissa_digits=53
exponent_mask=7ff0000000000000
mantissa_mask=000fffffffffffff
nan=7ff8000000000000
infinity=7ff0000000000000
neg_infinity=fff0000000000000
nan_category=Nan
infinity_category=Infinite
zero_category=Zero
subnormal_category=Subnormal
normal_category=Normal
from_bits_to_bits=7ff0000000000001
neg_payload_nan=fff0000000000001
neg_zero=8000000000000000
subnormal_tie_to_even_zero=0000000000000000
subnormal_tie_to_even_two=0000000000000002
normal_division=3fb999999999999a
mul_negative_zero=8000000000000000
div_negative_zero=8000000000000000
div_negative_infinity=fff0000000000000
mul_overflow=7ff0000000000000
mul_zero_infinity_is_nan=true
div_zero_zero_is_nan=true
mul_nan_is_nan=true
cast_2_pow_53=4340000000000000
cast_2_pow_53_plus_1=4340000000000000
Pinned Rust library sources
---------------------------
The installed sources below belong to the same named toolchain. Their
SHA-256 identities are:
core/src/primitive_docs.rs
c4b8627dd67d5dac8f383f383a9e7ff1229ea43e7599610fc61988694cf0f3e5
core/src/num/f64.rs
84540a6a59e347c63caabe12cf895ba1239c76a50682471567007138fac1c618
core/src/clone.rs
23f9cfc80347fde6b8457d46fbf7a2b8d9f34c8c58601b0b6f714ca2f6d1976b
The exact relevant text of core/src/primitive_docs.rs is:
#[rustc_doc_primitive = "f64"]
#[doc(alias = "double")]
/// A 64-bit floating-point type (specifically, the "binary64" type defined in IEEE 754-2008).
///
/// This type is very similar to [`prim@f32`], but has increased precision by using twice as many
/// bits. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on double-precision
/// values][wikipedia] for more information.
The referenced primitive-f32 documentation supplies the common primitive
floating-point operation rules quoted next:
/// - −0.0: IEEE 754 floating-point numbers have a bit that indicates their sign, so −0.0 is a
/// possible value. For comparison −0.0 = +0.0, but floating-point operations can carry
/// the sign bit through arithmetic operations. This means −0.0 × +0.0 produces −0.0 and
/// a negative number rounded to a value smaller than a float can represent also produces −0.0.
/// - [∞](#associatedconstant.INFINITY) and
/// [−∞](#associatedconstant.NEG_INFINITY): these result from calculations
/// like `1.0 / 0.0`.
///
/// When a primitive operation (addition, subtraction, multiplication, or
/// division) is performed on this type, the result is rounded according to the
/// roundTiesToEven direction defined in IEEE 754-2008. That means:
///
/// - The result is the representable value closest to the true value, if there
/// is a unique closest representable value.
/// - If the true value is exactly half-way between two representable values,
/// the result is the one with an even least-significant binary digit.
/// - If the true value's magnitude is ≥ `f32::MAX` + 2<sup>(`f32::MAX_EXP` −
/// `f32::MANTISSA_DIGITS` − 1)</sup>, the result is ∞ or −∞ (preserving the
/// true value's sign).
The same file explicitly separates arithmetic NaN choice from exact bitwise
operations; its exact relevant text is:
/// The rules for NaN values differ between *arithmetic* and *non-arithmetic* (or "bitwise")
/// operations. The non-arithmetic operations are unary `-`, `abs`, `copysign`, `signum`,
/// `{to,from}_bits`, `{to,from}_{be,le,ne}_bytes` and `is_sign_{positive,negative}`. These
/// operations are guaranteed to exactly preserve the bit pattern of their input except for possibly
/// changing the sign bit.
///
/// The following rules apply when a NaN value is returned from an arithmetic operation:
/// - The result has a non-deterministic sign.
/// - The quiet bit and payload are non-deterministically chosen from
/// the following set of options:
///
/// - **Preferred NaN**: The quiet bit is set and the payload is all-zero.
/// - **Quieting NaN propagation**: The quiet bit is set and the payload is copied from any input
/// operand that is a NaN. If the inputs and outputs do not have the same payload size (i.e., for
/// `as` casts), then
/// - If the output is smaller than the input, low-order bits of the payload get dropped.
/// - If the output is larger than the input, the payload gets filled up with 0s in the low-order
/// bits.
/// - **Unchanged NaN propagation**: The quiet bit and payload are copied from any input operand
/// that is a NaN. If the inputs and outputs do not have the same size (i.e., for `as` casts), the
/// same rules as for "quieting NaN propagation" apply, with one caveat: if the output is smaller
/// than the input, dropping the low-order bits may result in a payload of 0; a payload of 0 is not
/// possible with a signaling NaN (the all-0 significand encodes an infinity) so unchanged NaN
/// propagation cannot occur with some inputs.
/// - **Target-specific NaN**: The quiet bit is set and the payload is picked from a target-specific
/// set of "extra" possible NaN payloads. The set can depend on the input operand values.
/// See the table below for the concrete NaNs this set contains on various targets.
///
/// | `target_arch` | Extra payloads possible on this platform |
/// |---------------|------------------------------------------|
/// | `aarch64`, `arm`, `arm64ec`, `loongarch64`, `powerpc` (except when `target_abi = "spe"`), `powerpc64`, `riscv32`, `riscv64`, `s390x`, `x86`, `x86_64` | None |
Thus the model's preferred quiet NaN is one permitted result whenever
multiplication or division returns NaN. This does not claim that arbitrary
Rust arithmetic NaNs have those exact bits. By contrast, unary negation and
bit conversion must preserve all non-sign bits exactly, including for every
NaN payload.
The exact relevant declarations in core/src/num/f64.rs are:
pub const MANTISSA_DIGITS: u32 = 53;
pub const NAN: f64 = 0.0_f64 / 0.0_f64;
pub const INFINITY: f64 = 1.0_f64 / 0.0_f64;
pub const NEG_INFINITY: f64 = -1.0_f64 / 0.0_f64;
pub const SIGN_MASK: u64 = 0x8000_0000_0000_0000;
pub const EXPONENT_MASK: u64 = 0x7ff0_0000_0000_0000;
pub const MANTISSA_MASK: u64 = 0x000f_ffff_ffff_ffff;
pub const fn classify(self) -> FpCategory {
// We used to have complicated logic here that avoids the simple bit-based tests to work
// around buggy codegen for x87 targets (see
// https://github.com/rust-lang/rust/issues/114479). However, some LLVM versions later, none
// of our tests is able to find any difference between the complicated and the naive
// version, so now we are back to the naive version.
let b = self.to_bits();
match (b & Self::MANTISSA_MASK, b & Self::EXPONENT_MASK) {
(0, Self::EXPONENT_MASK) => FpCategory::Infinite,
(_, Self::EXPONENT_MASK) => FpCategory::Nan,
(0, 0) => FpCategory::Zero,
(_, 0) => FpCategory::Subnormal,
_ => FpCategory::Normal,
}
}
pub const fn to_bits(self) -> u64 {
// SAFETY: `u64` is a plain old datatype so we can always transmute to it.
unsafe { mem::transmute(self) }
}
pub const fn from_bits(v: u64) -> Self {
// It turns out the safety issues with sNaN were overblown! Hooray!
// SAFETY: `u64` is a plain old datatype so we can always transmute from it.
unsafe { mem::transmute(v) }
}
The exact scalar clone body in core/src/clone.rs is:
impl const Clone for $t {
#[inline(always)]
fn clone(&self) -> Self {
*self
}
}
Frozen adapted source
---------------------
The relevant retained source file hashes are:
crate/traits.rs
9013270fb846edcb0bdf2abd0353f575fdd727974cba9e89bdab8bb4c2b4f0bf
crate/dec2flt/mod.rs
b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012
crate/dec2flt/parse.rs
50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f
crate/dec2flt/decimal.rs
633658be803b7369b18feb098a8aa1b5f714a933d3b79ecbc4899a1b05f35beb
crate/dec2flt/lemire.rs
fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1
crate/dec2flt/slow.rs
93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485
Exact constant and bit-conversion excerpt from crate/traits.rs:
impl Float for f64 {
type Int = u64;
const INFINITY: Self = Self::INFINITY;
const NEG_INFINITY: Self = Self::NEG_INFINITY;
const NAN: Self = Self::NAN;
// Bit-identical to the upstream `-f64::NAN`, without the unsupported
// compile-time float negation.
const NEG_NAN: Self = f64::from_bits(0xFFF8_0000_0000_0000);
const BITS: u32 = 64;
const SIG_TOTAL_BITS: u32 = Self::MANTISSA_DIGITS;
const EXP_MASK: Self::Int = Self::EXPONENT_MASK;
const SIG_MASK: Self::Int = Self::MANTISSA_MASK;
fn to_bits(self) -> Self::Int {
self.to_bits()
}
fn classify(self) -> FpCategory {
self.classify()
}
}
impl FloatExt for f64 {
#[inline]
fn from_u64_bits(v: u64) -> Self {
f64::from_bits(v)
}
Exact derived-constant defaults from crate/traits.rs:
/// The number of bits in the significand, *excluding* the hidden bit.
const SIG_BITS: u32 = Self::SIG_TOTAL_BITS - 1;
/// Number of bits in the exponent.
const EXP_BITS: u32 = Self::BITS - Self::SIG_BITS - 1;
/// The saturated (maximum bitpattern) value of the exponent, i.e. the infinite
/// representation.
///
/// This shifted fully right, use `EXP_MASK` for the shifted value.
const EXP_SAT: u32 = (1 << Self::EXP_BITS) - 1;
/// Signed version of `EXP_SAT` since we convert a lot.
const INFINITE_POWER: i32 = Self::EXP_SAT as i32;
/// The exponent bias value. This is also the maximum value of the exponent.
const EXP_BIAS: u32 = Self::EXP_SAT >> 1;
/// Minimum exponent value of normal values.
const EXP_MIN: i32 = -(Self::EXP_BIAS as i32 - 1);
Together with the f64-instance lines `BITS = 64` and
`SIG_TOTAL_BITS = Self::MANTISSA_DIGITS` in the preceding excerpt, these
defaults derive SIG_BITS, EXP_MIN, and INFINITE_POWER from the primitive
mantissa-digit constant rather than introducing independent parameters.
Exact checked cast excerpt from crate/dec2flt/mod.rs:
#[inline]
// This method is precisely the source `u64 as f64` primitive conversion.
// Aeneas cannot translate that cast; opacity is confined to the cast while
// the fast-path algorithm, its range proof obligation, and all calls stay
// visible in the extracted model.
#[charon::opaque]
fn from_u64(v: u64) -> Self {
debug_assert!(v <= Self::MAX_MANTISSA_FAST_PATH);
v as _
}
Here MAX_MANTISSA_FAST_PATH is the retained default 1 << 53. Therefore the
source succeeds only through the modeled branch v <= 2^53 in this debug
configuration; above it the debug assertion fails before the cast. On the
successful branch every integer is exactly representable, so the source cast
and the model rounder return the same word.
Exact power-table and assembly excerpts from crate/dec2flt/mod.rs:
/// Maximum mantissa for the fast-path (`1 << 53` for f64).
const MAX_MANTISSA_FAST_PATH: u64 = 1 << Self::SIG_TOTAL_BITS;
const MAX_EXPONENT_FAST_PATH: i64 = 22;
const MIN_EXPONENT_FAST_PATH: i64 = -Self::MAX_EXPONENT_FAST_PATH;
const MAX_EXPONENT_DISGUISED_FAST_PATH: i64 = 37;
fn pow10_fast_path(exponent: usize) -> Self {
// These bit patterns are exactly the source table's rounded binary64
// literals. The match is the same masked lookup; it merely keeps float
// constants out of Aeneas's unsupported constant interpreter.
match exponent & 31 {
0 => f64::from_bits(0x3FF0_0000_0000_0000),
1 => f64::from_bits(0x4024_0000_0000_0000),
2 => f64::from_bits(0x4059_0000_0000_0000),
3 => f64::from_bits(0x408F_4000_0000_0000),
4 => f64::from_bits(0x40C3_8800_0000_0000),
5 => f64::from_bits(0x40F8_6A00_0000_0000),
6 => f64::from_bits(0x412E_8480_0000_0000),
7 => f64::from_bits(0x4163_12D0_0000_0000),
8 => f64::from_bits(0x4197_D784_0000_0000),
9 => f64::from_bits(0x41CD_CD65_0000_0000),
10 => f64::from_bits(0x4202_A05F_2000_0000),
11 => f64::from_bits(0x4237_4876_E800_0000),
12 => f64::from_bits(0x426D_1A94_A200_0000),
13 => f64::from_bits(0x42A2_309C_E540_0000),
14 => f64::from_bits(0x42D6_BCC4_1E90_0000),
15 => f64::from_bits(0x430C_6BF5_2634_0000),
16 => f64::from_bits(0x4341_C379_37E0_8000),
17 => f64::from_bits(0x4376_3457_85D8_A000),
18 => f64::from_bits(0x43AB_C16D_674E_C800),
19 => f64::from_bits(0x43E1_58E4_6091_3D00),
20 => f64::from_bits(0x4415_AF1D_78B5_8C40),
21 => f64::from_bits(0x444B_1AE4_D6E2_EF50),
22 => f64::from_bits(0x4480_F0CF_064D_D592),
_ => f64::from_bits(0),
}
}
fn biased_fp_to_float<F: FloatExt>(x: BiasedFp) -> F {
let mut word = x.m;
word |= (x.p_biased as u64) << F::SIG_BITS;
F::from_u64_bits(word)
}
Exact native-call excerpt from crate/dec2flt/decimal.rs:
fn can_use_fast_path<F: Lemire>(&self) -> bool {
F::MIN_EXPONENT_FAST_PATH <= self.exponent
&& self.exponent <= F::MAX_EXPONENT_DISGUISED_FAST_PATH
&& self.mantissa <= F::MAX_MANTISSA_FAST_PATH
&& !self.many_digits
}
if !self.can_use_fast_path::<F>() {
return None;
}
let value = if self.exponent <= F::MAX_EXPONENT_FAST_PATH {
// normal fast path
let value = F::from_u64(self.mantissa);
if self.exponent < 0 {
// Explicit trait calls preserve Rust arithmetic and resolve
// the generic output type that Charon leaves ambiguous.
core::ops::Div::div(value, F::pow10_fast_path((-self.exponent) as _))
} else {
core::ops::Mul::mul(value, F::pow10_fast_path(self.exponent as _))
}
} else {
// disguised fast path
let shift = self.exponent - F::MAX_EXPONENT_FAST_PATH;
let mantissa = self.mantissa.checked_mul(INT_POW10[shift as usize])?;
if mantissa > F::MAX_MANTISSA_FAST_PATH {
return None;
}
core::ops::Mul::mul(
F::from_u64(mantissa),
F::pow10_fast_path(F::MAX_EXPONENT_FAST_PATH as _),
)
};
if self.negative {
Some(core::ops::Neg::neg(value))
} else {
Some(value)
}
The preceding can_use_fast_path body, together with
MAX_MANTISSA_FAST_PATH = 1 << SIG_TOTAL_BITS and SIG_TOTAL_BITS = 53 for f64,
requires the exponent to lie between -22 and 37, the input mantissa to be at
most 2^53, and many_digits to be false. Consequently an ordinary arithmetic
call has a from_u64 operand in 0..=2^53. In its negative-exponent arm,
`-self.exponent` lies in 1..=22; in its nonnegative arm, `self.exponent` lies
in 0..=22. The disguised branch checks its multiplied mantissa against 2^53
before from_u64 and uses table index 22. The paired statement
Binary64NativeCallDomain does not assert this source reachability. It says
conditionally that a from_u64 argument at most 2^53 succeeds with a finite,
non-NaN word and that a table index at most 22 succeeds with a positive,
nonzero, finite, non-NaN word. Applying that conditional statement to the
guards just derived establishes those properties for the actual ordinary and
disguised calls, and in particular establishes that every executed divisor is
nonzero.
Exact special-value excerpt from crate/dec2flt/parse.rs:
let float = match (register, len) {
(INF_3, 3) => F::INFINITY,
(INF_8, 8) => F::INFINITY,
(NAN, 3) => F::NAN,
_ => return None,
};
if negative { Some(-float) } else { Some(float) }
Thus the executed special route is INFINITY or NAN followed by conditional
negation; it does not select NEG_INFINITY or NEG_NAN directly.
The number helper has the exact source body
pub fn parse_number(s: &[u8]) -> Option<Decimal> {
if let Some((float, rest)) = parse_partial_number(s) {
if rest == s.len() {
return Some(float);
}
}
None
}
It returns only the Decimal produced by parse_partial_number; there is no
float type parameter or float operation at this boundary.
The integer-tier helper has the source type and exact executable excerpts
below (long explanatory comments are elided). In particular it returns a raw
BiasedFp and contains no from_u64 cast, primitive float multiplication,
division, negation, or from_bits call:
pub fn compute_float<F: Float>(q: i64, mut w: u64) -> BiasedFp {
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let fp_error = BiasedFp::zero_pow2(-1);
// Short-circuit if the value can only be a literal 0 or infinity.
if w == 0 || q < F::SMALLEST_POWER_OF_TEN as i64 {
return fp_zero;
} else if q > F::LARGEST_POWER_OF_TEN as i64 {
return fp_inf;
}
// Normalize our significant digits, so the most-significant bit is set.
let lz = w.leading_zeros();
w <<= lz;
let (lo, hi) = compute_product_approx(q, w, F::SIG_BITS as usize + 3);
if lo == 0xFFFF_FFFF_FFFF_FFFF {
let inside_safe_exponent = (q >= -27) && (q <= 55);
if !inside_safe_exponent {
return fp_error;
}
}
let upperbit = (hi >> 63) as i32;
let mut mantissa = hi >> (upperbit + 64 - F::SIG_BITS as i32 - 3);
let mut power2 = power(q as i32) + upperbit - lz as i32 - F::EXP_MIN + 1;
if power2 <= 0 {
if -power2 + 1 >= 64 {
// Have more than 64 bits below the minimum exponent, must be 0.
return fp_zero;
}
// Have a subnormal value.
mantissa >>= -power2 + 1;
mantissa += mantissa & 1;
mantissa >>= 1;
power2 = (mantissa >= (1_u64 << F::SIG_BITS)) as i32;
return BiasedFp { m: mantissa, p_biased: power2 };
}
// Need to handle rounding ties. Normally, we need to round up,
// but if we fall right in between and we have an even basis, we
// need to round down.
if lo <= 1
&& q >= F::MIN_EXPONENT_ROUND_TO_EVEN as i64
&& q <= F::MAX_EXPONENT_ROUND_TO_EVEN as i64
&& mantissa & 0b11 == 0b01
&& (mantissa << (upperbit + 64 - F::SIG_BITS as i32 - 3)) == hi
{
// Zero the lowest bit, so we don't round up.
mantissa &= !1_u64;
}
// Round-to-even, then shift the significant digits into place.
mantissa += mantissa & 1;
mantissa >>= 1;
if mantissa >= (2_u64 << F::SIG_BITS) {
// Rounding up overflowed, so the carry bit is set. Set the
// mantissa to 1 (only the implicit, hidden bit is set) and
// increase the exponent.
mantissa = 1_u64 << F::SIG_BITS;
power2 += 1;
}
// Zero out the hidden bit.
mantissa &= !(1_u64 << F::SIG_BITS);
if power2 >= F::INFINITE_POWER {
// Exponent is above largest normal value, must be infinite.
return fp_inf;
}
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact slow-tier source body from crate/dec2flt/slow.rs:
pub(crate) fn parse_long_mantissa<F: Float>(s: &[u8]) -> BiasedFp {
const MAX_SHIFT: usize = 60;
const NUM_POWERS: usize = 19;
const POWERS: [u8; 19] =
[0, 3, 6, 9, 13, 16, 19, 23, 26, 29, 33, 36, 39, 43, 46, 49, 53, 56, 59];
let get_shift = |n| {
if n < NUM_POWERS { POWERS[n] as usize } else { MAX_SHIFT }
};
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let mut d = parse_decimal_seq(s);
// Short-circuit if the value can only be a literal 0 or infinity.
if d.num_digits == 0 || d.decimal_point < -324 {
return fp_zero;
} else if d.decimal_point >= 310 {
return fp_inf;
}
let mut exp2 = 0_i32;
let mut loop_result = None;
// Shift right toward (1/2 ... 1].
while d.decimal_point > 0 && loop_result.is_none() {
let n = d.decimal_point as usize;
let shift = get_shift(n);
d.right_shift(shift);
if d.decimal_point < -DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_zero);
} else {
exp2 += shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// Shift left toward (1/2 ... 1].
while d.decimal_point <= 0 && loop_result.is_none() {
let shift = if d.decimal_point == 0 {
match d.digits[0] {
digit if digit >= 5 => break,
0 | 1 => 2,
_ => 1,
}
} else {
get_shift((-d.decimal_point) as _)
};
d.left_shift(shift);
if d.decimal_point > DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_inf);
} else {
exp2 -= shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// We are now in the range [1/2 ... 1] but the binary format uses [1 ... 2].
exp2 -= 1;
while F::EXP_MIN > exp2 {
let mut n = (F::EXP_MIN - exp2) as usize;
if n > MAX_SHIFT {
n = MAX_SHIFT;
}
d.right_shift(n);
exp2 += n as i32;
}
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
// Shift the decimal to the hidden bit, and then round the value
// to get the high mantissa+1 bits.
d.left_shift(F::SIG_BITS as usize + 1);
let mut mantissa = d.round();
if mantissa >= (1_u64 << (F::SIG_BITS + 1)) {
// Rounding up overflowed to the carry bit, need to
// shift back to the hidden bit.
d.right_shift(1);
exp2 += 1;
mantissa = d.round();
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
}
let mut power2 = exp2 - F::EXP_MIN + 1;
if mantissa < (1_u64 << F::SIG_BITS) {
power2 -= 1;
}
// Zero out all the bits above the explicit mantissa bits.
mantissa &= (1_u64 << F::SIG_BITS) - 1;
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact final numeric-sign excerpt from crate/dec2flt/mod.rs:
let assembled_word = fp.m | ((fp.p_biased as u64) << F::SIG_BITS);
let assembly_result = biased_fp_to_float::<F>(fp);
let lexical_sign_applied = num.negative;
let result = if lexical_sign_applied {
core::ops::Neg::neg(assembly_result)
} else {
assembly_result
};
Thus a numeric execution that reaches the integer/slow selection route
assembles its selected pair with from_bits through biased_fp_to_float and only
then conditionally negates it. A successful try_fast_path returns earlier and
does not perform this assembly. compute_float and parse_long_mantissa produce
raw BiasedFp pairs and do not call from_u64, primitive float multiplication,
division, negation, or from_bits; they do, however, execute constants derived
from SIG_TOTAL_BITS before producing those pairs.
Retained structural-boundary evidence
-------------------------------------
Several adjacent structural bindings cite this same evidence record. Their
pinned library source identities are:
core/src/num/mod.rs
f0820f9dfb94999440c8cb4a349736fa21df7e5668e19b6b49e016ff67c05ce3
core/src/option.rs
7cf61204b05d98a95bc2e322d5fbfc1f4f91505109971917d9a7fb47151c50e6
core/src/slice/mod.rs
354992a6a3d69a0185eef9044a07ea5180e767bdb467aef55e69ee3d44317840
core/src/str/mod.rs
284b4c147b5d0497ce9146f6b96e564f196aed10411a62cdccf5fc5243d40f78
Exact ASCII-digit body from core/src/num/mod.rs:
pub const fn is_ascii_digit(&self) -> bool {
matches!(*self, b'0'..=b'9')
}
Exact Option control-flow bodies from core/src/option.rs:
fn branch(self) -> ControlFlow<Self::Residual, Self::Output> {
match self {
Some(v) => ControlFlow::Continue(v),
None => ControlFlow::Break(None),
}
}
fn from_residual(residual: Option<convert::Infallible>) -> Self {
match residual {
None => None,
}
}
Exact slice observation bodies from core/src/slice/mod.rs:
pub const fn first(&self) -> Option<&T> {
if let [first, ..] = self { Some(first) } else { None }
}
pub const fn split_first(&self) -> Option<(&T, &[T])> {
if let [first, tail @ ..] = self { Some((first, tail)) } else { None }
}
Exact string-byte body from core/src/str/mod.rs:
pub const fn as_bytes(&self) -> &[u8] {
// SAFETY: const sound because we transmute two types with the same layout
unsafe { mem::transmute(self) }
}
reference/model-evidence/binary64-probe.rs
#![feature(float_masks)]
use std::num::FpCategory;
fn bits(label: &str, value: f64) {
println!("{label}={:016x}", value.to_bits());
}
fn main() {
println!("target_arch={}", std::env::consts::ARCH);
println!("mantissa_digits={}", f64::MANTISSA_DIGITS);
println!("exponent_mask={:016x}", f64::EXPONENT_MASK);
println!("mantissa_mask={:016x}", f64::MANTISSA_MASK);
bits("nan", f64::NAN);
bits("infinity", f64::INFINITY);
bits("neg_infinity", f64::NEG_INFINITY);
for (label, value) in [
("nan_category", f64::NAN),
("infinity_category", f64::INFINITY),
("zero_category", 0.0),
("subnormal_category", f64::from_bits(1)),
("normal_category", 1.0),
] {
let category = match value.classify() {
FpCategory::Nan => "Nan",
FpCategory::Infinite => "Infinite",
FpCategory::Zero => "Zero",
FpCategory::Subnormal => "Subnormal",
FpCategory::Normal => "Normal",
};
println!("{label}={category}");
}
let payload_nan_word = 0x7ff0_0000_0000_0001_u64;
println!(
"from_bits_to_bits={:016x}",
f64::from_bits(payload_nan_word).to_bits()
);
bits("neg_payload_nan", -f64::from_bits(payload_nan_word));
bits("neg_zero", -0.0);
bits("subnormal_tie_to_even_zero", f64::from_bits(1) * 0.5);
bits("subnormal_tie_to_even_two", f64::from_bits(3) * 0.5);
bits("normal_division", 1.0 / 10.0);
bits("mul_negative_zero", -0.0 * 2.0);
bits("div_negative_zero", -1.0 / f64::INFINITY);
bits("div_negative_infinity", 1.0 / -0.0);
bits("mul_overflow", f64::MAX * (1.0 + f64::EPSILON));
println!("mul_zero_infinity_is_nan={}", (0.0 * f64::INFINITY).is_nan());
println!("div_zero_zero_is_nan={}", (0.0_f64 / 0.0_f64).is_nan());
println!("mul_nan_is_nan={}", (f64::NAN * 1.0).is_nan());
bits("cast_2_pow_53", (1_u64 << 53) as f64);
bits("cast_2_pow_53_plus_1", ((1_u64 << 53) + 1) as f64);
}
Assumptions / kernel axioms
- Classical.choice
- Quot.sound
- propext
conservative transitive union of saved axiom observations across node dependencies
Requirements depending on this item (32)
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
All 32 entries
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
- Exponent agreement
- Correctness or defer
- Native correctness or defer
- Numeric acceptance
- Accumulated-value diagnostic
- Record bounds
- Invalid rejection
- Accumulated-value diagnostic
- Equal-target bridge
- Exact rounding
- Infinity
- Invalid rejection
- NaN acceptance
- No spurious NaNs
- Numeric acceptance
- Numeric sign
- Selected exponent range
- Selected magnitude sign
- Signed zero
- Totality
- Rounding determinism
- Rounding totality
- Full-significand diagnostic
- Infinity
- NaN
- Rejection
These requirements are linked to this item through the declared dependencies of their proofs.
Record details
| Record source | Tablet/model-support.json |
|---|---|
| Kind | opaque external binding |
| Preservation assessment origin | VerifierPanel |
| Preservation fingerprint | preservation-v1:6ce6b78a26e371ebcbf58977e3448b9616ed9b050e569875365b4217e0e87376 |
| Preservation current fingerprint | preservation-v1:6ce6b78a26e371ebcbf58977e3448b9616ed9b050e569875365b4217e0e87376 |
| Preservation freshness | matches current fingerprint |
| Correspondence approved fingerprint | {"own_tex":"8d2638f64a331a029d6ae0d22b87b2d11cc4bd8ebb1c2c5ccd6dbe16f103283d","lean_semantic_closure":"6cbb08481544edb52e8b26d6bae4bca0cec628f574e86986141494017d56dac1","lean_relevant_definition_descendants":{"Binary64Model":"d80435c56f8fcbe084ebc2fbf05989a7ddf07434d0acd161302414cac32f964d","Binary64ModelDefault":"e2475cd1caad0eef450c903f24d2dfb8ffdfadf787ccad3621a86556f41e533a","F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2"},"lean_relevant_dependencies":["Binary64Model","Binary64ModelDefault","F64","core_num_FpCategory"],"preamble_tex":""} |
| Correspondence current fingerprint | {"own_tex":"8d2638f64a331a029d6ae0d22b87b2d11cc4bd8ebb1c2c5ccd6dbe16f103283d","lean_semantic_closure":"6cbb08481544edb52e8b26d6bae4bca0cec628f574e86986141494017d56dac1","lean_relevant_definition_descendants":{"Binary64Model":"d80435c56f8fcbe084ebc2fbf05989a7ddf07434d0acd161302414cac32f964d","Binary64ModelDefault":"e2475cd1caad0eef450c903f24d2dfb8ffdfadf787ccad3621a86556f41e533a","F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2"},"lean_relevant_dependencies":["Binary64Model","Binary64ModelDefault","F64","core_num_FpCategory"],"preamble_tex":""} |
| Correspondence freshness | matches current fingerprint |
Exact preservation assessment
{
"status": "VerifierPass",
"origin": "VerifierPanel",
"fingerprints": {
"own_tex_hash": "c9038332c190f0243d8a7d76c173bfd56a00bf2f9addd84d175d2ada8944895d",
"dep_statement_hashes": {
"Binary64ModelDefault": "be5dcc4afe23616ca8fd1d15d30fbbe4ee2621d68be3341b8e74a66e6dcd736f"
},
"combined_sound_fp": "preservation-v1:6ce6b78a26e371ebcbf58977e3448b9616ed9b050e569875365b4217e0e87376"
},
"lane_votes": {
"v1": "Pass"
},
"reviewer_action_id": null
}Exact source record
{
"name": "F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64.from_u64",
"extracted_signature": ": Std.U64 → Result F64",
"rust_symbol": "dec2flt_model::num::imp::dec2flt::{impl dec2flt_model::num::imp::dec2flt::Lemire<u64> for f64}::from_u64",
"raw_declaration_sha256": "66e5ddbe77fbc07ebbffebc5843fe8eb1b388be6ada5e9d040e90ae811cd9b78",
"node": "ModelF64FromU64",
"declaration": "dec2flt_model.ModelF64FromU64"
}Captured evidence identities
[
{
"path": "reference/model-evidence/binary64-boundary.txt",
"sha256": "a17d82e7f789ce7f1fbb3922a66ec8806999e526532d637605263882d37b7abf",
"cited_by": [
"Tablet/ModelF64FromU64.tex",
"Tablet/model-support.json"
]
},
{
"path": "reference/model-evidence/binary64-probe.rs",
"sha256": "68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e",
"cited_by": [
"reference/model-evidence/binary64-boundary.txt"
]
}
]Specification vocabulary and authored definitions (9)
Assumptions
Staged under-model assumptions: none.
Recorded review
| Correspondence | Pass |
|---|
Assumptions · Lean checked
Requirements depending on this item (32)
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
All 32 entries
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
- Exponent agreement
- Correctness or defer
- Native correctness or defer
- Numeric acceptance
- Accumulated-value diagnostic
- Record bounds
- Invalid rejection
- Accumulated-value diagnostic
- Equal-target bridge
- Exact rounding
- Infinity
- Invalid rejection
- NaN acceptance
- No spurious NaNs
- Numeric acceptance
- Numeric sign
- Selected exponent range
- Selected magnitude sign
- Signed zero
- Totality
- Rounding determinism
- Rounding totality
- Full-significand diagnostic
- Infinity
- NaN
- Rejection
These requirements are linked to this item through the declared dependencies of their proofs.
Record details
| Record source | committed_node_kinds / pv_tablet.json |
|---|---|
| Kind | authored definition |
Binary64Model
Lean definition
Trellis authored this Lean model for an operation outside the mechanical extraction. Modeling choices explains its behavior and review.
import Tablet.F64
import Tablet.core_num_FpCategory
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: Binary64Model]
structure Binary64Model where
-- BODY
clone : F64 -> Result F64
mantissaDigits : Result Std.U32
nan : Result F64
infinity : Result F64
negInfinity : Result F64
exponentMask : Result Std.U64
mantissaMask : Result Std.U64
classify : F64 -> Result core.num.FpCategory
toBits : F64 -> Result Std.U64
fromBits : Std.U64 -> Result F64
mul : F64 -> F64 -> Result F64
div : F64 -> F64 -> Result F64
neg : F64 -> Result F64
fromU64 : Std.U64 -> Result F64
end dec2flt_model
Why this model is faithful
Definition
Preservation argument
Claim
Proof
inspect-native records in
reference/model-evidence/native-boundary.txt give the following
field-to-external correspondence, with the same argument order and result
type in every row:
clone to F64.Insts.CoreCloneClone.clone;
mantissaDigits to core.f64.F64.MANTISSA_DIGITS;
nan to core.f64.F64.NAN;
infinity to core.f64.F64.INFINITY;
negInfinity to core.f64.F64.NEG_INFINITY;
exponentMask to core.f64.F64.EXPONENT_MASK;
mantissaMask to core.f64.F64.MANTISSA_MASK;
classify to core.f64.F64.classify;
toBits to core.f64.F64.to_bits;
fromBits to core.f64.F64.from_bits;
mul to F64.Insts.CoreOpsArithMulF64F64.mul;
div to F64.Insts.CoreOpsArithDivF64F64.div;
neg to F64.Insts.CoreOpsArithNegF64.neg; and
fromU64 to
F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64.from_u64.
The frozen declarations are axioms with precisely those signatures, and the
structure has only these data-valued or function-valued fields: it has no
proposition-valued field and states no equation about any field's result.
Thus this node packages the frozen call surface without constraining an
implementation. Behavioral preservation is a separate obligation of the
corresponding ModelF64Clone, ModelF64MantissaDigits,
ModelF64Nan, ModelF64Infinity,
ModelF64NegInfinity, ModelF64ExponentMask,
ModelF64MantissaMask, ModelF64Classify,
ModelF64ToBits, ModelF64FromBits, ModelF64Mul,
ModelF64Div, ModelF64Neg, and
ModelF64FromU64 binding nodes, not a premise of this claim.Authored arguments for individual requirements
Requirement: parser totality
f64
specialization is retained with its frozen signatures. This package adds no
behavioral premise or input-domain restriction; normal-return behavior, where
needed, belongs separately to the fourteen ModelF64 owners listed in
the proof.Requirement: parser numeric acceptance
ModelF64 owner listed above.Requirement: parser invalid rejection
Requirement: parser nan acceptance
NAN, conditionally invokes
neg for a negative lexical sign, and uses classification to support
the required NaN observation. This package retains those three signatures
without asserting their results or restricting their domains; their behavior
belongs to ModelF64Nan, ModelF64Neg, and
ModelF64Classify.Requirement: parser infinity
INFINITY and then invokes
neg exactly when the lexical sign is negative; it does not request
NEG_INFINITY. This package retains the two executed signatures
without asserting their results or restricting their domains; their behavior
belongs to ModelF64Infinity and ModelF64Neg.Requirement: parser non nan results
classify signatures in the fourteen-external
surface are retained, without asserting which words they return or restricting
their inputs. Result behavior belongs to the corresponding operation owner,
and classification behavior belongs to ModelF64Classify.Requirement: parser numeric sign
from_bits while constructing their
magnitudes and invoke neg when applying a negative lexical sign; they
do not request either signed-infinity constant or to_bits. This
package retains the executed signatures without asserting sign behavior or
restricting their domains; behavior belongs to ModelF64FromBits and
ModelF64Neg.Requirement: parser signed zero
from_bits while constructing a zero
magnitude and invoke neg when applying a negative lexical sign; they
do not invoke to_bits. This package retains the executed signatures
without asserting a zero encoding or restricting their domains; behavior
belongs to ModelF64FromBits and ModelF64Neg.Requirement: parser exact rounding
mul, div, from_u64, and
from_bits signatures used by magnitude-conversion paths, together
with the neg signature used for a negative lexical sign, are retained
without an accuracy premise or domain restriction. Their behavior belongs to
ModelF64Mul, ModelF64Div, ModelF64FromU64,
ModelF64FromBits, and ModelF64Neg.Requirement: parser selected exponent
from_bits signatures remain
available to the specialized dispatcher and assembly path. This interface
adds no range premise or domain restriction; the concrete owners are
ModelF64MantissaDigits, ModelF64ExponentMask,
ModelF64MantissaMask, and ModelF64FromBits.Requirement: parser selected magnitude sign
to_bits, and from_bits signatures remain
available to the specialized conversion and assembly paths. This interface
adds no sign-bit premise or domain restriction; behavior belongs to
ModelF64ExponentMask, ModelF64MantissaMask,
ModelF64ToBits, and ModelF64FromBits.Requirement: dispatch abstract composition
f64 specialization is
retained. Because the package states neither component contracts nor
equations and restricts no input, it adds no behavioral premise to the
abstract composition claim; concrete behavior belongs to the corresponding
fourteen ModelF64 owners listed above.Requirement: dispatch component compliance
f64 components are extracted is retained. This package adds no
component-compliance premise or domain restriction; compliance of each
operation is the separate responsibility of its corresponding
ModelF64 owner listed above.Requirement: parser accumulated rounding
mul, div, from_u64, and
from_bits signatures used by magnitude conversion, together with the
neg signature used for a negative lexical sign, are retained. This
interface asserts no rounding or sign behavior and restricts no input; that
behavior belongs to ModelF64Mul, ModelF64Div,
ModelF64FromU64, ModelF64FromBits, and
ModelF64Neg.Requirement: parser equal target rounding
mul, div, from_u64, and
from_bits signatures used by magnitude conversion, together with the
neg signature used for a negative lexical sign, are retained; the
numeric source routes do not invoke to_bits. This interface adds no
target-equality premise or domain restriction; behavior belongs to
ModelF64Mul, ModelF64Div, ModelF64FromU64,
ModelF64FromBits, and ModelF64Neg.Requirement: number helper acceptance
parse_number call surface contains none of these fourteen
binary64 externals. Packaging their signatures therefore adds no acceptance
premise and no restriction on byte-slice inputs.Requirement: number helper rejection
parse_number call surface contains none of these fourteen
binary64 externals. Packaging their signatures therefore adds no rejection
premise and no restriction on byte-slice inputs.Requirement: number helper record bounds
parse_number call surface contains none of these fourteen
binary64 externals. Packaging their signatures therefore adds no record-field
premise and no restriction on byte-slice inputs.Requirement: number helper accumulated value
parse_number call surface contains none of these fourteen
binary64 externals. Packaging their signatures therefore adds no numeric-value
premise and no restriction on byte-slice inputs.Requirement: special helper infinity
parse_inf_nan source route requests INFINITY and then
invokes neg exactly when its separate sign argument is true; it does
not request NEG_INFINITY. This package retains the two executed
signatures without asserting their results or restricting slice or sign
inputs; their behavior belongs to ModelF64Infinity and
ModelF64Neg.Requirement: special helper nan
parse_inf_nan source route requests NAN and invokes
neg when its separate sign argument is true; classification supports
the required NaN observation. This package retains those three signatures
without asserting their results or restricting slice or sign inputs; their
behavior belongs to ModelF64Nan, ModelF64Neg, and
ModelF64Classify.Requirement: special helper rejection
parse_inf_nan branches invoke none of the fourteen
binary64 externals. Packaging their signatures therefore adds no
keyword-recognition premise and no restriction on slice or sign inputs.Requirement: native correct or defer
from_u64, from_bits, mul,
div, and neg signatures used by the native shortcut are
retained. This interface adds no correctness, deferral, or range premise;
behavior belongs to ModelF64FromU64, ModelF64FromBits,
ModelF64Mul, ModelF64Div, and ModelF64Neg.Requirement: integer correct or defer
ModelF64MantissaDigits, ModelF64ExponentMask,
ModelF64MantissaMask, ModelF64ToBits, and
ModelF64FromBits.Requirement: slow accumulated rounding
from_bits signatures available to
the slow conversion and eventual assembly are retained. This interface adds
no rounding premise or domain restriction; behavior belongs to
ModelF64MantissaDigits, ModelF64ExponentMask,
ModelF64MantissaMask, and ModelF64FromBits.Requirement: assembly correspondence
from_bits signature used by final assembly is retained.
This interface asserts no assembly equation and restricts no raw word;
construction behavior belongs to ModelF64FromBits.Requirement: classification totality
Requirement: classification determinism
Requirement: classification significand digit
Requirement: rounding totality
Requirement: rounding determinism
Requirement: exponent value agreement
Recorded review
| Correspondence | Pass |
|---|---|
| Preservation | VerifierPass |
Binary64Model · Lean checked
Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
reference/model-evidence/native-boundary.txt
Native boundary inventory for Binary64Model
Reproduction command (repository root):
python3 .trellis/scripts/pv_modeling.py inspect-native .
Tool identity for this reproduction:
Python 3.14.4
.trellis/scripts/pv_modeling.py
sha256 915b29822cb4c47b70dabb1dc011514641deb2e428b62347fc31aa898de5e0d4
Top-level result:
declaration_count: 24
The complete raw inspect-native records for the fourteen F64 externals follow.
They are copied from the command's complete index; no scratch artifact is needed
to review them.
[
{
"name": "F64.Insts.CoreCloneClone.clone",
"extracted_signature": ": F64 → Result F64",
"rust_symbol": "core::clone::impls::{impl core::clone::Clone for f64}::clone",
"raw_declaration_sha256": "5eaad5fb9af034045cf0dafed5af85445fe4af9a78958259a15a1faddd1e8f05",
"source_utf8": "/-- [core::clone::impls::{impl core::clone::Clone for f64}::clone]:\n Source: '/rustc/library/core/src/clone.rs', lines 698:20-698:43\n Name pattern: [core::clone::impls::{core::clone::Clone<f64>}::clone]\n Visibility: public -/\n@[rust_fun \"core::clone::impls::{core::clone::Clone<f64>}::clone\"]\naxiom F64.Insts.CoreCloneClone.clone : F64 → Result F64\n"
},
{
"name": "core.f64.F64.MANTISSA_DIGITS",
"extracted_signature": ": Result Std.U32",
"rust_symbol": "core::f64::{f64}::MANTISSA_DIGITS",
"raw_declaration_sha256": "42b1b0c4d2c2bbc7271748fc78c518391f55bf6517c643667a6561a0ac6e771c",
"source_utf8": "/-- [core::f64::{f64}::MANTISSA_DIGITS]\n Source: '/rustc/library/core/src/num/f64.rs', lines 412:4-412:34\n Name pattern: [core::f64::{f64}::MANTISSA_DIGITS]\n Visibility: public -/\n@[rust_const \"core::f64::{f64}::MANTISSA_DIGITS\"]\naxiom core.f64.F64.MANTISSA_DIGITS : Result Std.U32\n"
},
{
"name": "core.f64.F64.NAN",
"extracted_signature": ": Result F64",
"rust_symbol": "core::f64::{f64}::NAN",
"raw_declaration_sha256": "a18685a80db5dbebe39151c7375a0470bb3905fe1228e5598a995a1cf017a768",
"source_utf8": "/-- [core::f64::{f64}::NAN]\n Source: '/rustc/library/core/src/num/f64.rs', lines 509:4-509:22\n Name pattern: [core::f64::{f64}::NAN]\n Visibility: public -/\n@[rust_const \"core::f64::{f64}::NAN\"] axiom core.f64.F64.NAN : Result F64\n"
},
{
"name": "core.f64.F64.INFINITY",
"extracted_signature": ": Result F64",
"rust_symbol": "core::f64::{f64}::INFINITY",
"raw_declaration_sha256": "f905901e67400987f49cddd13a8768644bed9e7e3f79c3a81b34879f494a2816",
"source_utf8": "/-- [core::f64::{f64}::INFINITY]\n Source: '/rustc/library/core/src/num/f64.rs', lines 512:4-512:27\n Name pattern: [core::f64::{f64}::INFINITY]\n Visibility: public -/\n@[rust_const \"core::f64::{f64}::INFINITY\"]\naxiom core.f64.F64.INFINITY : Result F64\n"
},
{
"name": "core.f64.F64.NEG_INFINITY",
"extracted_signature": ": Result F64",
"rust_symbol": "core::f64::{f64}::NEG_INFINITY",
"raw_declaration_sha256": "85f6e517e439c2f2d5c59aa29884ff38b2381c2f5dd7cb14e7947b232efe7f0e",
"source_utf8": "/-- [core::f64::{f64}::NEG_INFINITY]\n Source: '/rustc/library/core/src/num/f64.rs', lines 515:4-515:31\n Name pattern: [core::f64::{f64}::NEG_INFINITY]\n Visibility: public -/\n@[rust_const \"core::f64::{f64}::NEG_INFINITY\"]\naxiom core.f64.F64.NEG_INFINITY : Result F64\n"
},
{
"name": "core.f64.F64.EXPONENT_MASK",
"extracted_signature": ": Result Std.U64",
"rust_symbol": "core::f64::{f64}::EXPONENT_MASK",
"raw_declaration_sha256": "f1054e64392d8f9306e8c69015f0b521d9f387edda8458a3bae4773606f46a71",
"source_utf8": "/-- [core::f64::{f64}::EXPONENT_MASK]\n Source: '/rustc/library/core/src/num/f64.rs', lines 615:4-615:32\n Name pattern: [core::f64::{f64}::EXPONENT_MASK]\n Visibility: public -/\n@[rust_const \"core::f64::{f64}::EXPONENT_MASK\"]\naxiom core.f64.F64.EXPONENT_MASK : Result Std.U64\n"
},
{
"name": "core.f64.F64.MANTISSA_MASK",
"extracted_signature": ": Result Std.U64",
"rust_symbol": "core::f64::{f64}::MANTISSA_MASK",
"raw_declaration_sha256": "dc3517faa141b7a7a016e9f73930af3c9af23d3e6d06874440d99eabbc846538",
"source_utf8": "/-- [core::f64::{f64}::MANTISSA_MASK]\n Source: '/rustc/library/core/src/num/f64.rs', lines 637:4-637:32\n Name pattern: [core::f64::{f64}::MANTISSA_MASK]\n Visibility: public -/\n@[rust_const \"core::f64::{f64}::MANTISSA_MASK\"]\naxiom core.f64.F64.MANTISSA_MASK : Result Std.U64\n"
},
{
"name": "core.f64.F64.classify",
"extracted_signature": ": F64 → Result core.num.FpCategory",
"rust_symbol": "core::f64::{f64}::classify",
"raw_declaration_sha256": "9fedd442d1d0403c4a7323d8f4e95c51b8bd39bf82d2d0ba357eaaf243e69b78",
"source_utf8": "/-- [core::f64::{f64}::classify]:\n Source: '/rustc/library/core/src/num/f64.rs', lines 782:4-782:45\n Name pattern: [core::f64::{f64}::classify]\n Visibility: public -/\n@[rust_fun \"core::f64::{f64}::classify\"]\naxiom core.f64.F64.classify : F64 → Result core.num.FpCategory\n"
},
{
"name": "core.f64.F64.to_bits",
"extracted_signature": ": F64 → Result Std.U64",
"rust_symbol": "core::f64::{f64}::to_bits",
"raw_declaration_sha256": "ddaec6bb7c36ba6445a5b0b8e52f841240ca2563004e8ce1255caf0e36ec22ae",
"source_utf8": "/-- [core::f64::{f64}::to_bits]:\n Source: '/rustc/library/core/src/num/f64.rs', lines 1223:4-1223:37\n Name pattern: [core::f64::{f64}::to_bits]\n Visibility: public -/\n@[rust_fun \"core::f64::{f64}::to_bits\"]\naxiom core.f64.F64.to_bits : F64 → Result Std.U64\n"
},
{
"name": "core.f64.F64.from_bits",
"extracted_signature": ": Std.U64 → Result F64",
"rust_symbol": "core::f64::{f64}::from_bits",
"raw_declaration_sha256": "af8ee4387cea97d0a353a83d6280c03f3c9f739bf733af5bd39c29909f1b2b19",
"source_utf8": "/-- [core::f64::{f64}::from_bits]:\n Source: '/rustc/library/core/src/num/f64.rs', lines 1269:4-1269:42\n Name pattern: [core::f64::{f64}::from_bits]\n Visibility: public -/\n@[rust_fun \"core::f64::{f64}::from_bits\"]\naxiom core.f64.F64.from_bits : Std.U64 → Result F64\n"
},
{
"name": "F64.Insts.CoreOpsArithMulF64F64.mul",
"extracted_signature": ": F64 → F64 → Result F64",
"rust_symbol": "core::ops::arith::{impl core::ops::arith::Mul<f64, f64> for f64}::mul",
"raw_declaration_sha256": "20d985819a981e9e80485ce169c1d045ea13fa8796e9314d5b621141aae6deec",
"source_utf8": "/-- [core::ops::arith::{impl core::ops::arith::Mul<f64, f64> for f64}::mul]:\n Source: '/rustc/library/core/src/ops/arith.rs', lines 350:12-350:41\n Name pattern: [core::ops::arith::{core::ops::arith::Mul<f64, f64, f64>}::mul]\n Visibility: public -/\n@[rust_fun \"core::ops::arith::{core::ops::arith::Mul<f64, f64, f64>}::mul\"]\naxiom F64.Insts.CoreOpsArithMulF64F64.mul : F64 → F64 → Result F64\n"
},
{
"name": "F64.Insts.CoreOpsArithDivF64F64.div",
"extracted_signature": ": F64 → F64 → Result F64",
"rust_symbol": "core::ops::arith::{impl core::ops::arith::Div<f64, f64> for f64}::div",
"raw_declaration_sha256": "1ebb67b412d89328acb4c5dd53168e84fdf26be6cbe1ef49f5a27edbd84ada36",
"source_utf8": "/-- [core::ops::arith::{impl core::ops::arith::Div<f64, f64> for f64}::div]:\n Source: '/rustc/library/core/src/ops/arith.rs', lines 515:12-515:41\n Name pattern: [core::ops::arith::{core::ops::arith::Div<f64, f64, f64>}::div]\n Visibility: public -/\n@[rust_fun \"core::ops::arith::{core::ops::arith::Div<f64, f64, f64>}::div\"]\naxiom F64.Insts.CoreOpsArithDivF64F64.div : F64 → F64 → Result F64\n"
},
{
"name": "F64.Insts.CoreOpsArithNegF64.neg",
"extracted_signature": ": F64 → Result F64",
"rust_symbol": "core::ops::arith::{impl core::ops::arith::Neg<f64> for f64}::neg",
"raw_declaration_sha256": "bbf93f24bd7cfbc72e47e8bb3a9acc6641df939ad6afafd9ba02c81fe27f7ed0",
"source_utf8": "/-- [core::ops::arith::{impl core::ops::arith::Neg<f64> for f64}::neg]:\n Source: '/rustc/library/core/src/ops/arith.rs', lines 719:12-719:30\n Name pattern: [core::ops::arith::{core::ops::arith::Neg<f64, f64>}::neg]\n Visibility: public -/\n@[rust_fun \"core::ops::arith::{core::ops::arith::Neg<f64, f64>}::neg\"]\naxiom F64.Insts.CoreOpsArithNegF64.neg : F64 → Result F64\n"
},
{
"name": "F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64.from_u64",
"extracted_signature": ": Std.U64 → Result F64",
"rust_symbol": "dec2flt_model::num::imp::dec2flt::{impl dec2flt_model::num::imp::dec2flt::Lemire<u64> for f64}::from_u64",
"raw_declaration_sha256": "66e5ddbe77fbc07ebbffebc5843fe8eb1b388be6ada5e9d040e90ae811cd9b78",
"source_utf8": "/-- [dec2flt_model::num::imp::dec2flt::{impl dec2flt_model::num::imp::dec2flt::Lemire<u64> for f64}::from_u64]:\n Source: 'num/imp/../../dec2flt/mod.rs', lines 260:4-263:5\n Visibility: public -/\naxiom F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64.from_u64\n : Std.U64 → Result F64\n"
}
]
Assumptions / kernel axioms
- Classical.choice
- Quot.sound
- propext
conservative transitive union of saved axiom observations across node dependencies
Requirements depending on this item (32)
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
All 32 entries
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
- Exponent agreement
- Correctness or defer
- Native correctness or defer
- Numeric acceptance
- Accumulated-value diagnostic
- Record bounds
- Invalid rejection
- Accumulated-value diagnostic
- Equal-target bridge
- Exact rounding
- Infinity
- Invalid rejection
- NaN acceptance
- No spurious NaNs
- Numeric acceptance
- Numeric sign
- Selected exponent range
- Selected magnitude sign
- Signed zero
- Totality
- Rounding determinism
- Rounding totality
- Full-significand diagnostic
- Infinity
- NaN
- Rejection
These requirements are linked to this item through the declared dependencies of their proofs.
Record details
| Record source | committed_node_kinds / pv_tablet.json |
|---|---|
| Kind | authored definition |
| Preservation assessment origin | VerifierPanel |
| Preservation fingerprint | preservation-v1:759d57e9ea138556cfcbf25f527b2338a2973aca6e090764b47e5b64a27e4bdf |
| Preservation current fingerprint | preservation-v1:759d57e9ea138556cfcbf25f527b2338a2973aca6e090764b47e5b64a27e4bdf |
| Preservation freshness | matches current fingerprint |
| Correspondence approved fingerprint | {"own_tex":"d80435c56f8fcbe084ebc2fbf05989a7ddf07434d0acd161302414cac32f964d","lean_semantic_closure":"152e7ea8c8bb655433fccf89dbab1745cb5f3c97fe281f41f1bd44819985f50c","lean_relevant_definition_descendants":{"F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2"},"lean_relevant_dependencies":["F64","core_num_FpCategory"],"preamble_tex":""} |
| Correspondence current fingerprint | {"own_tex":"d80435c56f8fcbe084ebc2fbf05989a7ddf07434d0acd161302414cac32f964d","lean_semantic_closure":"152e7ea8c8bb655433fccf89dbab1745cb5f3c97fe281f41f1bd44819985f50c","lean_relevant_definition_descendants":{"F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2"},"lean_relevant_dependencies":["F64","core_num_FpCategory"],"preamble_tex":""} |
| Correspondence freshness | matches current fingerprint |
Exact preservation assessment
{
"status": "VerifierPass",
"origin": "VerifierPanel",
"fingerprints": {
"own_tex_hash": "cafac1a1bfa9f7a2cee5bf7a0220865d60ec818d726dfdc525bbacdecbef39a6",
"dep_statement_hashes": {},
"combined_sound_fp": "preservation-v1:759d57e9ea138556cfcbf25f527b2338a2973aca6e090764b47e5b64a27e4bdf"
},
"lane_votes": {
"v1": "Pass"
},
"reviewer_action_id": null
}Captured evidence identities
[
{
"path": "reference/model-evidence/native-boundary.txt",
"sha256": "35e2c2b72d0cf23fcac2a487ee2db6f09f67e2bbdc73520dd23ea1f092029400",
"cited_by": [
"Tablet/Binary64Model.tex",
"committed_node_kinds / pv_tablet.json"
]
}
]Binary64ModelDefault
Lean definition
Trellis authored this Lean model for an operation outside the mechanical extraction. Modeling choices explains its behavior and review.
import Tablet.Binary64Model
import Mathlib.Data.Rat.Defs
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
set_option maxRecDepth 4096
namespace dec2flt_model
-- [TABLET NODE: Binary64ModelDefault]
def Binary64ModelDefault : Binary64Model :=
-- BODY
let signBit : Nat := 2 ^ 63
let fractionUnit : Nat := 2 ^ 52
let infinityBits : Nat := 2047 * fractionUnit
let quietNanBits : Nat := infinityBits + 2 ^ 51
let word := fun n : Nat => (⟨BitVec.ofNat 64 n⟩ : Std.U64)
let sign := fun w : F64 => w.val / signBit
let magnitude := fun w : F64 => w.val % signBit
let exponent := fun w : F64 => magnitude w / fractionUnit
let fraction := fun w : F64 => magnitude w % fractionUnit
let categoryCode := fun w : F64 =>
if exponent w = 2047 then
if fraction w = 0 then 1 else 0
else if exponent w = 0 then
if fraction w = 0 then 2 else 3
else 4
let category := fun w : F64 =>
match categoryCode w with
| 0 => core.num.FpCategory.Nan
| 1 => core.num.FpCategory.Infinite
| 2 => core.num.FpCategory.Zero
| 3 => core.num.FpCategory.Subnormal
| _ => core.num.FpCategory.Normal
let finiteMagnitudeValue := fun bits : Nat =>
let e := bits / fractionUnit
let m := bits % fractionUnit
if e = 0 then
(m : Rat) / ((2 : Rat) ^ (1074 : Nat))
else if 1075 <= e then
((fractionUnit + m : Nat) : Rat) * ((2 : Rat) ^ (e - 1075))
else
((fractionUnit + m : Nat) : Rat) / ((2 : Rat) ^ (1075 - e))
let roundEvenNat := fun x : Rat =>
let q := x.num.natAbs / x.den
let r := x.num.natAbs % x.den
if x.den < 2 * r ∨ (x.den = 2 * r ∧ q % 2 = 1) then q + 1 else q
let normalExponent := fun x : Rat =>
(List.range 2046).foldl (fun (old : Nat) (i : Nat) =>
let e : Nat := i + 1
if ((2 : Rat) ^ ((e : Int) - 1023)) ≤ x then e else old) 1
let overflowThreshold : Rat :=
((2 : Rat) ^ (1024 : Nat)) - ((2 : Rat) ^ (970 : Nat))
let roundMagnitude := fun x : Rat =>
if overflowThreshold <= x then infinityBits
else if x < ((2 : Rat) ^ (-1022 : Int)) then
roundEvenNat (x * ((2 : Rat) ^ (1074 : Nat)))
else
let e := normalExponent x
let significand := roundEvenNat (x * ((2 : Rat) ^ ((1075 : Int) - (e : Int))))
if significand = 2 ^ 53 then (e + 1) * fractionUnit
else e * fractionUnit + (significand - fractionUnit)
let signedWord := fun negative : Bool => fun mag : Nat =>
word (mag + if negative then signBit else 0)
let negativeResult := fun a b : F64 => decide (sign a != sign b)
let mulImpl := fun a b : F64 =>
let ca := categoryCode a
let cb := categoryCode b
let negResult := negativeResult a b
if ca = 0 ∨ cb = 0 then ok (word quietNanBits)
else if (ca = 1 ∧ cb = 2) ∨ (ca = 2 ∧ cb = 1) then
ok (word quietNanBits)
else if ca = 1 ∨ cb = 1 then
ok (signedWord negResult infinityBits)
else
let x := finiteMagnitudeValue (magnitude a)
let y := finiteMagnitudeValue (magnitude b)
ok (signedWord negResult (roundMagnitude (x * y)))
let divImpl := fun a b : F64 =>
let ca := categoryCode a
let cb := categoryCode b
let negResult := negativeResult a b
if ca = 0 ∨ cb = 0 then ok (word quietNanBits)
else if (ca = 1 ∧ cb = 1) ∨ (ca = 2 ∧ cb = 2) then
ok (word quietNanBits)
else if ca = 1 ∨ cb = 2 then
ok (signedWord negResult infinityBits)
else if cb = 1 ∨ ca = 2 then
ok (signedWord negResult 0)
else
let x := finiteMagnitudeValue (magnitude a)
let y := finiteMagnitudeValue (magnitude b)
ok (signedWord negResult (roundMagnitude (x / y)))
{
clone := fun x => ok x
mantissaDigits := ok 53#u32
nan := ok (word quietNanBits)
infinity := ok (word infinityBits)
negInfinity := ok (word (signBit + infinityBits))
exponentMask := ok (word infinityBits)
mantissaMask := ok (word (fractionUnit - 1))
classify := fun x => ok (category x)
toBits := fun x => ok x
fromBits := fun x => ok x
mul := mulImpl
div := divImpl
neg := fun x => ok ⟨x.bv ^^^ BitVec.ofNat 64 signBit⟩
fromU64 := fun x =>
if x.val <= 2 ^ 53 then
ok (word (roundMagnitude (x.val : Rat)))
else fail .assertionFailure
}
end dec2flt_model
Why this model is faithful
Definition
u64 succeeds with this exact rounding when the input is at most
2^{53} and reports assertion failure otherwise.Preservation argument
Claim
from_u64 debug
assertion and its exact cast result on the asserted domain.Proof
word uses
BitVec.ofNat 64, so it takes the low 64 bits exactly. Division and
remainder by 2^{63} split bit 63 from the lower 63 bits. Division and
remainder of that magnitude by 2^{52} then split the eleven exponent bits
from the 52 fraction bits. Consequently exponent field 2047 with zero
fraction is infinity and with nonzero fraction is NaN; exponent zero with zero
fraction is zero and with nonzero fraction is subnormal; every other exponent
is normal. These are exactly the five arms of the pinned source
classify body.clone returns its input word. This is the exact frozen scalar
Clone::clone body, *self.
2. mantissaDigits returns 53, the pinned
f64::MANTISSA_DIGITS declaration.
3. nan returns \mathtt{0x7ff8000000000000}. The retained probe on
the pinned toolchain and target gives exactly that word for
f64::NAN. This is an exact claim about that constant, not about
NaNs produced by arbitrary arithmetic.
4. infinity returns \mathtt{0x7ff0000000000000}, exactly the probed
source constant.
5. negInfinity adds bit 63 to that word and therefore returns
\mathtt{0xfff0000000000000}, exactly the probed negative-infinity
constant.
6. exponentMask is the pinned eleven-bit mask
\mathtt{0x7ff0000000000000}.
7. mantissaMask is 2^{52}-1, namely the pinned mask
\mathtt{0x000fffffffffffff}.
8. By the initial field split, classify's nested tests are exactly
the five source match arms, for every one of the 2^{64} words.
9. toBits is the identity on the raw-word carrier, matching the
source transmutation for every word, including every NaN payload.
10. fromBits is the same identity in the other direction, matching
the inverse source transmutation and preserving every input bit.SIG_TOTAL_BITS to f64::MANTISSA_DIGITS, then derive
SIG_BITS as 53-1=52, EXP_BITS as 64-52-1=11,
EXP_SAT and INFINITE_POWER as 2047,
EXP_BIAS as 1023, and EXP_MIN as -1022. The
Lemire default similarly derives
MAX_MANTISSA_FAST_PATH as 1\ll53=2^{53}. Thus the same
preserved field fixes the precision, exponent, overflow, native-cast guard,
and final-assembly shift used by the frozen generic bodies.finiteMagnitudeValue's three exponent-sign cases.roundEvenNat's disjunction selects the
nearest integer, choosing the even integer on every tie. The r=0 case
returns q unchanged.overflowThreshold. Below
it, exponent 2046 rounds at most to the maximum finite significand. At the
boundary and above it, the pinned Rust round-to-even overflow rule specifies
infinity. Thus the explicit comparison implements the source rule on both
sides and at the midpoint.mul, let N, I, Z, and F denote NaN, infinity, zero, and
finite nonzero. If either operand is N, the exact result class is NaN.
I times Z (in either order) is also NaN. I times I or F is infinity.
Otherwise both operands are finite; the package multiplies their exact
nonnegative rational magnitudes and applies the proved encoder. This last
row includes Z times Z or F and hence returns zero. Every non-NaN row
applies the xor of operand sign bits, so infinity, ordinary results,
underflowed results, and zero all have the Rust-prescribed sign.
12. For div, either NaN operand gives NaN; I divided by I and Z
divided by Z give NaN. I divided by Z or F, and F divided by Z, give
signed infinity. F divided by F uses the exact rational quotient and the
proved encoder. F or Z divided by I, and Z divided by F, give signed
zero. These cases are exhaustive and occur in exactly the order of the
definition, so the denominator reaches rational division only in the
finite-nonzero row. Again every non-NaN row uses the xor sign.can_use_fast_path guard and call body in
reference/model-evidence/binary64-boundary.txt, with the field-2
derivation above, give the ordinary path a from_u64 argument at
most 2^{53} and a table index in 0\ldots22: a negative exponent lies in
-22\ldots-1 and is negated for the index, while a nonnegative exponent is at
most 22. On the disguised path the checked integer product must pass the
explicit \leq2^{53} test before from_u64, and the table index is
exactly 22. Only after deriving those hypotheses from the source guards do
we apply Binary64NativeCallDomain: each cast operand and table word
is finite and non-NaN, every table word is positive and nonzero, and hence an
executed division has a nonzero divisor. Therefore the actual native calls
use only fields 11 and 12's exact rational, signed-zero, or infinity rows.
The support theorem is conditional and is not itself cited as a source
reachability assertion.neg xors bit 63 and leaves all other 63 bits fixed. Rust lists
unary negation as a non-arithmetic bitwise operation that preserves a NaN
payload exactly except for sign, so this agrees on all words, not merely
non-NaNs.
14. Finally, fromU64 tests the exact source debug assertion
v\leq2^{53}. In that branch every integer is exactly representable, and
the proved encoder returns its exact cast word. Above the bound, both the
frozen debug build and the model report assertion failure before a cast.Authored arguments for individual requirements
Requirement: parser totality
from_u64
debug assertion. For an ordinary native call, the frozen guard gives the
original mantissa \leq2^{53}; for a disguised call, the checked product must
pass the same bound before the cast. Applying the conditional first clause of
Binary64NativeCallDomain then makes each actual cast succeed. Field
2 fixes both this bound and all precision constants used by the integer, slow,
and assembly routes, whose relevant operations are total at this boundary.
Thus this model introduces no additional panic or divergence into the source
executions quantified by the goal. This application concerns preservation,
not whether other source checked arithmetic makes the positive GOAL true.Requirement: parser numeric acceptance
Requirement: parser invalid rejection
Requirement: parser nan acceptance
NAN and then conditionally applies
unary negation, as recorded in
reference/model-evidence/binary64-boundary.txt. Field 3 supplies
the pinned NaN word, field 13 changes only its sign bit, and field 8 recognizes
either word as NaN. No arithmetic-NaN bit claim is used.Requirement: parser infinity
INFINITY and conditionally
negates it; it does not select NEG_INFINITY directly. Fields 4 and
13 therefore give exactly the infinity with the lexical sign. The source
route is copied in
reference/model-evidence/binary64-boundary.txt.Requirement: parser non nan results
Requirement: parser numeric sign
SIG_BITS, EXP_MIN, and
INFINITE_POWER while constructing the raw magnitude; field 10
assembles it and field 13 applies the lexical sign. Those exact routes are
recorded in reference/model-evidence/binary64-boundary.txt; hence
zero and infinity retain the lexical sign as an observable bit.Requirement: parser signed zero
BiasedFp is used.Requirement: parser exact rounding
compute_float
and parse_long_mantissa; their selected raw pair is assembled by
field 10 and optionally negated by field 13. This covers the boundary
operations on every route while leaving the source parser's positive exactness
claim, including its known counterexamples, unchanged.Requirement: parser selected exponent
BiasedFp. Before
that selection, compute_float and any invoked
parse_long_mantissa execute SIG_BITS,
EXP_MIN, and INFINITE_POWER; field 2 and the exact trait
defaults derive their values 52, -1022, and 2047. Field 10 then
interprets the selected pair's assembled word and field 13 may negate it.
These source bodies are copied in
reference/model-evidence/binary64-boundary.txt, so the model
preserves the constants that can affect the selected exponent without
assuming that the positive range claim holds.Requirement: parser selected magnitude sign
SIG_BITS value 52 before field 10 interprets the OR/shift word;
identity from_bits preserves its sign bit, and later lexical
negation is a separate field-13 operation. This ordering and the executed
constant uses are recorded in
reference/model-evidence/binary64-boundary.txt, so the model does
not assume that the selected magnitude is well formed.Requirement: dispatch abstract composition
Requirement: dispatch component compliance
MAX_MANTISSA_FAST_PATH for those guards and supplies
SIG_BITS, EXP_MIN, and INFINITE_POWER to both
the integer and slow pair producers. Field 2's shift value and field 10 cover
final assembly, followed by conditional field 13. Finally, the special
component selects field 3 or 4 for NAN or INFINITY and may
apply field 13, with field 8 preserving the resulting category observation.
Thus the package supplies the operation meanings for native,
integer, slow, assembly, and special components without assuming that the
broader positive compliance theorem is true.Requirement: parser accumulated rounding
Requirement: parser equal target rounding
Requirement: number helper acceptance
parse_number helper returns an optional
Decimal; it has no type parameter or float operation, as recorded in
reference/model-evidence/binary64-boundary.txt. This entire
binary64 package is therefore noninterfering with helper acceptance.Requirement: number helper rejection
parse_number
performs no binary64 constant, conversion, classification, or arithmetic call.
The package cannot affect its None results, without implying that all
source-invalid slices return normally.Requirement: number helper record bounds
Decimal record before any dispatcher
float conversion. Its exact source boundary is recorded in
reference/model-evidence/binary64-boundary.txt; consequently no
field of this package can alter its Boolean, mantissa, or exponent fields.Requirement: number helper accumulated value
parse_number,
whose source boundary uses no float operation; see
reference/model-evidence/binary64-boundary.txt. Binary64
rounding occurs only after the helper returns, so this package is genuinely
noninterfering with the stated helper value relation.Requirement: special helper infinity
INFINITY and conditionally negates it.
Fields 4 and 13 reproduce those exact calls and bits for either sign argument;
the source excerpt is in
reference/model-evidence/binary64-boundary.txt.Requirement: special helper nan
NAN constant and conditionally negates
it. Fields 3, 13, and 8 ensure either returned word is classified NaN. This
uses the exact bitwise NaN rules, not an assertion about arithmetic NaN bits;
see reference/model-evidence/binary64-boundary.txt.Requirement: special helper rejection
None from its unmatched branch before selecting a
float constant or invoking negation. The exact match and return structure is
in reference/model-evidence/binary64-boundary.txt, so this
package cannot change rejection.Requirement: native correct or defer
MAX_MANTISSA_FAST_PATH as 2^{53}. On the ordinary path, the
guard bounds the original mantissa by that value and bounds the negated or
nonnegative exponent table index by 22. On the disguised path, checked
integer multiplication occurs first, the resulting mantissa must pass the
2^{53} comparison, and the table index is exactly 22. Applying the two
conditional clauses of Binary64NativeCallDomain after these source
derivations gives a successful finite cast, a finite nonzero table word, and
hence a nonzero divisor. Fields 14 and 10 then reproduce the cast and table
from_bits; fields 11 or 12 reproduce multiplication or division;
and field 13 reproduces the final optional negation. The exact guards and
calls are in reference/model-evidence/binary64-boundary.txt.Requirement: integer correct or defer
compute_float operation produces a raw
BiasedFp; it does not call from_u64, multiplication,
division, or negation, but it does execute SIG_BITS,
EXP_MIN, and INFINITE_POWER while computing that pair.
Field 2 plus the exact trait defaults give these constants as 52, -1022,
and 2047. If the pair is later assembled, the field-2-derived shift 52
forms its word and identity field 10 preserves the unrestricted result. The
exact body is recorded in
reference/model-evidence/binary64-boundary.txt; no false native
cast-domain claim is used for this GOAL.Requirement: slow accumulated rounding
parse_long_mantissa body uses
INFINITE_POWER, EXP_MIN, and SIG_BITS in its
overflow tests, scaling, rounding, and returned pair. Field 2 and the trait
defaults fix them as 2047, -1022, and 52. Final assembly uses the same
derived shift, then invokes field 10 and possible field-13 lexical negation.
These operations are copied in
reference/model-evidence/binary64-boundary.txt; this application
preserves their meanings without assuming the positive rounding conclusion.Requirement: assembly correspondence
F::SIG_BITS, ORs it with the mantissa, and passes the low-64-bit word
to from_bits. Field 2, SIG_TOTAL_BITS, and the exact
trait default derive this shift as 52; field 10 is the identity on every
word, with no field-validity precondition. The exact body in
reference/model-evidence/binary64-boundary.txt therefore agrees
with the goal's unrestricted Rust cast/shift/OR operation for all field values.Requirement: classification totality
Requirement: classification determinism
Requirement: classification significand digit
Requirement: rounding totality
Real. Neither that relation nor the principal theorem statement
calls this package's rational encoder. The model computation is
therefore noninterfering with the full real domain; the rational proof above is
not substituted for the GOAL.Requirement: rounding determinism
Requirement: exponent value agreement
Recorded review
| Correspondence | Pass |
|---|---|
| Preservation | ReviewerPinnedFail |
This preservation review applies to an earlier version of the item.
Binary64ModelDefault · Lean checked
Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
reference/model-evidence/binary64-boundary.txt
Primary evidence for the binary64 boundary
==========================================
Scope and identities
--------------------
This record concerns the frozen x86_64-unknown-linux-gnu extraction, the
adapted Rust crate retained in this repository, and the installed toolchain
named by modeling-input/SETUP.md. The probe source is retained at
reference/model-evidence/binary64-probe.rs; no scratch source is required to
reproduce it.
Toolchain executable:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
Target:
x86_64-unknown-linux-gnu
rustc executable SHA-256:
162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
Probe source SHA-256:
68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
Compiled probe SHA-256:
f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
Frozen generated.lean SHA-256:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692
Frozen modeling-input/manifest.json SHA-256:
2fc182c0c7acccad30c449ca349b999759b84e8ed4ec9d590e8295e43eeec077
Approved Binary64ModelDefault.lean SHA-256 at the time of this record:
03ae48fb631e6242bd21bf95d0481b66acae05f8cab343c7ab279b3c116538a3
Exact reproduction commands
---------------------------
Run from the repository root:
R=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
P=reference/model-evidence/binary64-probe.rs
B=.trellis/scratch/binary64-probe
"$R" --version --verbose
sha256sum "$R"
sha256sum "$P"
"$R" --target x86_64-unknown-linux-gnu -C opt-level=0 "$P" -o "$B"
sha256sum "$B"
"$B"
Raw output
----------
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
rustc_sha256=162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
probe_sha256=68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
binary_sha256=f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
target_arch=x86_64
mantissa_digits=53
exponent_mask=7ff0000000000000
mantissa_mask=000fffffffffffff
nan=7ff8000000000000
infinity=7ff0000000000000
neg_infinity=fff0000000000000
nan_category=Nan
infinity_category=Infinite
zero_category=Zero
subnormal_category=Subnormal
normal_category=Normal
from_bits_to_bits=7ff0000000000001
neg_payload_nan=fff0000000000001
neg_zero=8000000000000000
subnormal_tie_to_even_zero=0000000000000000
subnormal_tie_to_even_two=0000000000000002
normal_division=3fb999999999999a
mul_negative_zero=8000000000000000
div_negative_zero=8000000000000000
div_negative_infinity=fff0000000000000
mul_overflow=7ff0000000000000
mul_zero_infinity_is_nan=true
div_zero_zero_is_nan=true
mul_nan_is_nan=true
cast_2_pow_53=4340000000000000
cast_2_pow_53_plus_1=4340000000000000
Pinned Rust library sources
---------------------------
The installed sources below belong to the same named toolchain. Their
SHA-256 identities are:
core/src/primitive_docs.rs
c4b8627dd67d5dac8f383f383a9e7ff1229ea43e7599610fc61988694cf0f3e5
core/src/num/f64.rs
84540a6a59e347c63caabe12cf895ba1239c76a50682471567007138fac1c618
core/src/clone.rs
23f9cfc80347fde6b8457d46fbf7a2b8d9f34c8c58601b0b6f714ca2f6d1976b
The exact relevant text of core/src/primitive_docs.rs is:
#[rustc_doc_primitive = "f64"]
#[doc(alias = "double")]
/// A 64-bit floating-point type (specifically, the "binary64" type defined in IEEE 754-2008).
///
/// This type is very similar to [`prim@f32`], but has increased precision by using twice as many
/// bits. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on double-precision
/// values][wikipedia] for more information.
The referenced primitive-f32 documentation supplies the common primitive
floating-point operation rules quoted next:
/// - −0.0: IEEE 754 floating-point numbers have a bit that indicates their sign, so −0.0 is a
/// possible value. For comparison −0.0 = +0.0, but floating-point operations can carry
/// the sign bit through arithmetic operations. This means −0.0 × +0.0 produces −0.0 and
/// a negative number rounded to a value smaller than a float can represent also produces −0.0.
/// - [∞](#associatedconstant.INFINITY) and
/// [−∞](#associatedconstant.NEG_INFINITY): these result from calculations
/// like `1.0 / 0.0`.
///
/// When a primitive operation (addition, subtraction, multiplication, or
/// division) is performed on this type, the result is rounded according to the
/// roundTiesToEven direction defined in IEEE 754-2008. That means:
///
/// - The result is the representable value closest to the true value, if there
/// is a unique closest representable value.
/// - If the true value is exactly half-way between two representable values,
/// the result is the one with an even least-significant binary digit.
/// - If the true value's magnitude is ≥ `f32::MAX` + 2<sup>(`f32::MAX_EXP` −
/// `f32::MANTISSA_DIGITS` − 1)</sup>, the result is ∞ or −∞ (preserving the
/// true value's sign).
The same file explicitly separates arithmetic NaN choice from exact bitwise
operations; its exact relevant text is:
/// The rules for NaN values differ between *arithmetic* and *non-arithmetic* (or "bitwise")
/// operations. The non-arithmetic operations are unary `-`, `abs`, `copysign`, `signum`,
/// `{to,from}_bits`, `{to,from}_{be,le,ne}_bytes` and `is_sign_{positive,negative}`. These
/// operations are guaranteed to exactly preserve the bit pattern of their input except for possibly
/// changing the sign bit.
///
/// The following rules apply when a NaN value is returned from an arithmetic operation:
/// - The result has a non-deterministic sign.
/// - The quiet bit and payload are non-deterministically chosen from
/// the following set of options:
///
/// - **Preferred NaN**: The quiet bit is set and the payload is all-zero.
/// - **Quieting NaN propagation**: The quiet bit is set and the payload is copied from any input
/// operand that is a NaN. If the inputs and outputs do not have the same payload size (i.e., for
/// `as` casts), then
/// - If the output is smaller than the input, low-order bits of the payload get dropped.
/// - If the output is larger than the input, the payload gets filled up with 0s in the low-order
/// bits.
/// - **Unchanged NaN propagation**: The quiet bit and payload are copied from any input operand
/// that is a NaN. If the inputs and outputs do not have the same size (i.e., for `as` casts), the
/// same rules as for "quieting NaN propagation" apply, with one caveat: if the output is smaller
/// than the input, dropping the low-order bits may result in a payload of 0; a payload of 0 is not
/// possible with a signaling NaN (the all-0 significand encodes an infinity) so unchanged NaN
/// propagation cannot occur with some inputs.
/// - **Target-specific NaN**: The quiet bit is set and the payload is picked from a target-specific
/// set of "extra" possible NaN payloads. The set can depend on the input operand values.
/// See the table below for the concrete NaNs this set contains on various targets.
///
/// | `target_arch` | Extra payloads possible on this platform |
/// |---------------|------------------------------------------|
/// | `aarch64`, `arm`, `arm64ec`, `loongarch64`, `powerpc` (except when `target_abi = "spe"`), `powerpc64`, `riscv32`, `riscv64`, `s390x`, `x86`, `x86_64` | None |
Thus the model's preferred quiet NaN is one permitted result whenever
multiplication or division returns NaN. This does not claim that arbitrary
Rust arithmetic NaNs have those exact bits. By contrast, unary negation and
bit conversion must preserve all non-sign bits exactly, including for every
NaN payload.
The exact relevant declarations in core/src/num/f64.rs are:
pub const MANTISSA_DIGITS: u32 = 53;
pub const NAN: f64 = 0.0_f64 / 0.0_f64;
pub const INFINITY: f64 = 1.0_f64 / 0.0_f64;
pub const NEG_INFINITY: f64 = -1.0_f64 / 0.0_f64;
pub const SIGN_MASK: u64 = 0x8000_0000_0000_0000;
pub const EXPONENT_MASK: u64 = 0x7ff0_0000_0000_0000;
pub const MANTISSA_MASK: u64 = 0x000f_ffff_ffff_ffff;
pub const fn classify(self) -> FpCategory {
// We used to have complicated logic here that avoids the simple bit-based tests to work
// around buggy codegen for x87 targets (see
// https://github.com/rust-lang/rust/issues/114479). However, some LLVM versions later, none
// of our tests is able to find any difference between the complicated and the naive
// version, so now we are back to the naive version.
let b = self.to_bits();
match (b & Self::MANTISSA_MASK, b & Self::EXPONENT_MASK) {
(0, Self::EXPONENT_MASK) => FpCategory::Infinite,
(_, Self::EXPONENT_MASK) => FpCategory::Nan,
(0, 0) => FpCategory::Zero,
(_, 0) => FpCategory::Subnormal,
_ => FpCategory::Normal,
}
}
pub const fn to_bits(self) -> u64 {
// SAFETY: `u64` is a plain old datatype so we can always transmute to it.
unsafe { mem::transmute(self) }
}
pub const fn from_bits(v: u64) -> Self {
// It turns out the safety issues with sNaN were overblown! Hooray!
// SAFETY: `u64` is a plain old datatype so we can always transmute from it.
unsafe { mem::transmute(v) }
}
The exact scalar clone body in core/src/clone.rs is:
impl const Clone for $t {
#[inline(always)]
fn clone(&self) -> Self {
*self
}
}
Frozen adapted source
---------------------
The relevant retained source file hashes are:
crate/traits.rs
9013270fb846edcb0bdf2abd0353f575fdd727974cba9e89bdab8bb4c2b4f0bf
crate/dec2flt/mod.rs
b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012
crate/dec2flt/parse.rs
50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f
crate/dec2flt/decimal.rs
633658be803b7369b18feb098a8aa1b5f714a933d3b79ecbc4899a1b05f35beb
crate/dec2flt/lemire.rs
fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1
crate/dec2flt/slow.rs
93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485
Exact constant and bit-conversion excerpt from crate/traits.rs:
impl Float for f64 {
type Int = u64;
const INFINITY: Self = Self::INFINITY;
const NEG_INFINITY: Self = Self::NEG_INFINITY;
const NAN: Self = Self::NAN;
// Bit-identical to the upstream `-f64::NAN`, without the unsupported
// compile-time float negation.
const NEG_NAN: Self = f64::from_bits(0xFFF8_0000_0000_0000);
const BITS: u32 = 64;
const SIG_TOTAL_BITS: u32 = Self::MANTISSA_DIGITS;
const EXP_MASK: Self::Int = Self::EXPONENT_MASK;
const SIG_MASK: Self::Int = Self::MANTISSA_MASK;
fn to_bits(self) -> Self::Int {
self.to_bits()
}
fn classify(self) -> FpCategory {
self.classify()
}
}
impl FloatExt for f64 {
#[inline]
fn from_u64_bits(v: u64) -> Self {
f64::from_bits(v)
}
Exact derived-constant defaults from crate/traits.rs:
/// The number of bits in the significand, *excluding* the hidden bit.
const SIG_BITS: u32 = Self::SIG_TOTAL_BITS - 1;
/// Number of bits in the exponent.
const EXP_BITS: u32 = Self::BITS - Self::SIG_BITS - 1;
/// The saturated (maximum bitpattern) value of the exponent, i.e. the infinite
/// representation.
///
/// This shifted fully right, use `EXP_MASK` for the shifted value.
const EXP_SAT: u32 = (1 << Self::EXP_BITS) - 1;
/// Signed version of `EXP_SAT` since we convert a lot.
const INFINITE_POWER: i32 = Self::EXP_SAT as i32;
/// The exponent bias value. This is also the maximum value of the exponent.
const EXP_BIAS: u32 = Self::EXP_SAT >> 1;
/// Minimum exponent value of normal values.
const EXP_MIN: i32 = -(Self::EXP_BIAS as i32 - 1);
Together with the f64-instance lines `BITS = 64` and
`SIG_TOTAL_BITS = Self::MANTISSA_DIGITS` in the preceding excerpt, these
defaults derive SIG_BITS, EXP_MIN, and INFINITE_POWER from the primitive
mantissa-digit constant rather than introducing independent parameters.
Exact checked cast excerpt from crate/dec2flt/mod.rs:
#[inline]
// This method is precisely the source `u64 as f64` primitive conversion.
// Aeneas cannot translate that cast; opacity is confined to the cast while
// the fast-path algorithm, its range proof obligation, and all calls stay
// visible in the extracted model.
#[charon::opaque]
fn from_u64(v: u64) -> Self {
debug_assert!(v <= Self::MAX_MANTISSA_FAST_PATH);
v as _
}
Here MAX_MANTISSA_FAST_PATH is the retained default 1 << 53. Therefore the
source succeeds only through the modeled branch v <= 2^53 in this debug
configuration; above it the debug assertion fails before the cast. On the
successful branch every integer is exactly representable, so the source cast
and the model rounder return the same word.
Exact power-table and assembly excerpts from crate/dec2flt/mod.rs:
/// Maximum mantissa for the fast-path (`1 << 53` for f64).
const MAX_MANTISSA_FAST_PATH: u64 = 1 << Self::SIG_TOTAL_BITS;
const MAX_EXPONENT_FAST_PATH: i64 = 22;
const MIN_EXPONENT_FAST_PATH: i64 = -Self::MAX_EXPONENT_FAST_PATH;
const MAX_EXPONENT_DISGUISED_FAST_PATH: i64 = 37;
fn pow10_fast_path(exponent: usize) -> Self {
// These bit patterns are exactly the source table's rounded binary64
// literals. The match is the same masked lookup; it merely keeps float
// constants out of Aeneas's unsupported constant interpreter.
match exponent & 31 {
0 => f64::from_bits(0x3FF0_0000_0000_0000),
1 => f64::from_bits(0x4024_0000_0000_0000),
2 => f64::from_bits(0x4059_0000_0000_0000),
3 => f64::from_bits(0x408F_4000_0000_0000),
4 => f64::from_bits(0x40C3_8800_0000_0000),
5 => f64::from_bits(0x40F8_6A00_0000_0000),
6 => f64::from_bits(0x412E_8480_0000_0000),
7 => f64::from_bits(0x4163_12D0_0000_0000),
8 => f64::from_bits(0x4197_D784_0000_0000),
9 => f64::from_bits(0x41CD_CD65_0000_0000),
10 => f64::from_bits(0x4202_A05F_2000_0000),
11 => f64::from_bits(0x4237_4876_E800_0000),
12 => f64::from_bits(0x426D_1A94_A200_0000),
13 => f64::from_bits(0x42A2_309C_E540_0000),
14 => f64::from_bits(0x42D6_BCC4_1E90_0000),
15 => f64::from_bits(0x430C_6BF5_2634_0000),
16 => f64::from_bits(0x4341_C379_37E0_8000),
17 => f64::from_bits(0x4376_3457_85D8_A000),
18 => f64::from_bits(0x43AB_C16D_674E_C800),
19 => f64::from_bits(0x43E1_58E4_6091_3D00),
20 => f64::from_bits(0x4415_AF1D_78B5_8C40),
21 => f64::from_bits(0x444B_1AE4_D6E2_EF50),
22 => f64::from_bits(0x4480_F0CF_064D_D592),
_ => f64::from_bits(0),
}
}
fn biased_fp_to_float<F: FloatExt>(x: BiasedFp) -> F {
let mut word = x.m;
word |= (x.p_biased as u64) << F::SIG_BITS;
F::from_u64_bits(word)
}
Exact native-call excerpt from crate/dec2flt/decimal.rs:
fn can_use_fast_path<F: Lemire>(&self) -> bool {
F::MIN_EXPONENT_FAST_PATH <= self.exponent
&& self.exponent <= F::MAX_EXPONENT_DISGUISED_FAST_PATH
&& self.mantissa <= F::MAX_MANTISSA_FAST_PATH
&& !self.many_digits
}
if !self.can_use_fast_path::<F>() {
return None;
}
let value = if self.exponent <= F::MAX_EXPONENT_FAST_PATH {
// normal fast path
let value = F::from_u64(self.mantissa);
if self.exponent < 0 {
// Explicit trait calls preserve Rust arithmetic and resolve
// the generic output type that Charon leaves ambiguous.
core::ops::Div::div(value, F::pow10_fast_path((-self.exponent) as _))
} else {
core::ops::Mul::mul(value, F::pow10_fast_path(self.exponent as _))
}
} else {
// disguised fast path
let shift = self.exponent - F::MAX_EXPONENT_FAST_PATH;
let mantissa = self.mantissa.checked_mul(INT_POW10[shift as usize])?;
if mantissa > F::MAX_MANTISSA_FAST_PATH {
return None;
}
core::ops::Mul::mul(
F::from_u64(mantissa),
F::pow10_fast_path(F::MAX_EXPONENT_FAST_PATH as _),
)
};
if self.negative {
Some(core::ops::Neg::neg(value))
} else {
Some(value)
}
The preceding can_use_fast_path body, together with
MAX_MANTISSA_FAST_PATH = 1 << SIG_TOTAL_BITS and SIG_TOTAL_BITS = 53 for f64,
requires the exponent to lie between -22 and 37, the input mantissa to be at
most 2^53, and many_digits to be false. Consequently an ordinary arithmetic
call has a from_u64 operand in 0..=2^53. In its negative-exponent arm,
`-self.exponent` lies in 1..=22; in its nonnegative arm, `self.exponent` lies
in 0..=22. The disguised branch checks its multiplied mantissa against 2^53
before from_u64 and uses table index 22. The paired statement
Binary64NativeCallDomain does not assert this source reachability. It says
conditionally that a from_u64 argument at most 2^53 succeeds with a finite,
non-NaN word and that a table index at most 22 succeeds with a positive,
nonzero, finite, non-NaN word. Applying that conditional statement to the
guards just derived establishes those properties for the actual ordinary and
disguised calls, and in particular establishes that every executed divisor is
nonzero.
Exact special-value excerpt from crate/dec2flt/parse.rs:
let float = match (register, len) {
(INF_3, 3) => F::INFINITY,
(INF_8, 8) => F::INFINITY,
(NAN, 3) => F::NAN,
_ => return None,
};
if negative { Some(-float) } else { Some(float) }
Thus the executed special route is INFINITY or NAN followed by conditional
negation; it does not select NEG_INFINITY or NEG_NAN directly.
The number helper has the exact source body
pub fn parse_number(s: &[u8]) -> Option<Decimal> {
if let Some((float, rest)) = parse_partial_number(s) {
if rest == s.len() {
return Some(float);
}
}
None
}
It returns only the Decimal produced by parse_partial_number; there is no
float type parameter or float operation at this boundary.
The integer-tier helper has the source type and exact executable excerpts
below (long explanatory comments are elided). In particular it returns a raw
BiasedFp and contains no from_u64 cast, primitive float multiplication,
division, negation, or from_bits call:
pub fn compute_float<F: Float>(q: i64, mut w: u64) -> BiasedFp {
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let fp_error = BiasedFp::zero_pow2(-1);
// Short-circuit if the value can only be a literal 0 or infinity.
if w == 0 || q < F::SMALLEST_POWER_OF_TEN as i64 {
return fp_zero;
} else if q > F::LARGEST_POWER_OF_TEN as i64 {
return fp_inf;
}
// Normalize our significant digits, so the most-significant bit is set.
let lz = w.leading_zeros();
w <<= lz;
let (lo, hi) = compute_product_approx(q, w, F::SIG_BITS as usize + 3);
if lo == 0xFFFF_FFFF_FFFF_FFFF {
let inside_safe_exponent = (q >= -27) && (q <= 55);
if !inside_safe_exponent {
return fp_error;
}
}
let upperbit = (hi >> 63) as i32;
let mut mantissa = hi >> (upperbit + 64 - F::SIG_BITS as i32 - 3);
let mut power2 = power(q as i32) + upperbit - lz as i32 - F::EXP_MIN + 1;
if power2 <= 0 {
if -power2 + 1 >= 64 {
// Have more than 64 bits below the minimum exponent, must be 0.
return fp_zero;
}
// Have a subnormal value.
mantissa >>= -power2 + 1;
mantissa += mantissa & 1;
mantissa >>= 1;
power2 = (mantissa >= (1_u64 << F::SIG_BITS)) as i32;
return BiasedFp { m: mantissa, p_biased: power2 };
}
// Need to handle rounding ties. Normally, we need to round up,
// but if we fall right in between and we have an even basis, we
// need to round down.
if lo <= 1
&& q >= F::MIN_EXPONENT_ROUND_TO_EVEN as i64
&& q <= F::MAX_EXPONENT_ROUND_TO_EVEN as i64
&& mantissa & 0b11 == 0b01
&& (mantissa << (upperbit + 64 - F::SIG_BITS as i32 - 3)) == hi
{
// Zero the lowest bit, so we don't round up.
mantissa &= !1_u64;
}
// Round-to-even, then shift the significant digits into place.
mantissa += mantissa & 1;
mantissa >>= 1;
if mantissa >= (2_u64 << F::SIG_BITS) {
// Rounding up overflowed, so the carry bit is set. Set the
// mantissa to 1 (only the implicit, hidden bit is set) and
// increase the exponent.
mantissa = 1_u64 << F::SIG_BITS;
power2 += 1;
}
// Zero out the hidden bit.
mantissa &= !(1_u64 << F::SIG_BITS);
if power2 >= F::INFINITE_POWER {
// Exponent is above largest normal value, must be infinite.
return fp_inf;
}
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact slow-tier source body from crate/dec2flt/slow.rs:
pub(crate) fn parse_long_mantissa<F: Float>(s: &[u8]) -> BiasedFp {
const MAX_SHIFT: usize = 60;
const NUM_POWERS: usize = 19;
const POWERS: [u8; 19] =
[0, 3, 6, 9, 13, 16, 19, 23, 26, 29, 33, 36, 39, 43, 46, 49, 53, 56, 59];
let get_shift = |n| {
if n < NUM_POWERS { POWERS[n] as usize } else { MAX_SHIFT }
};
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let mut d = parse_decimal_seq(s);
// Short-circuit if the value can only be a literal 0 or infinity.
if d.num_digits == 0 || d.decimal_point < -324 {
return fp_zero;
} else if d.decimal_point >= 310 {
return fp_inf;
}
let mut exp2 = 0_i32;
let mut loop_result = None;
// Shift right toward (1/2 ... 1].
while d.decimal_point > 0 && loop_result.is_none() {
let n = d.decimal_point as usize;
let shift = get_shift(n);
d.right_shift(shift);
if d.decimal_point < -DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_zero);
} else {
exp2 += shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// Shift left toward (1/2 ... 1].
while d.decimal_point <= 0 && loop_result.is_none() {
let shift = if d.decimal_point == 0 {
match d.digits[0] {
digit if digit >= 5 => break,
0 | 1 => 2,
_ => 1,
}
} else {
get_shift((-d.decimal_point) as _)
};
d.left_shift(shift);
if d.decimal_point > DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_inf);
} else {
exp2 -= shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// We are now in the range [1/2 ... 1] but the binary format uses [1 ... 2].
exp2 -= 1;
while F::EXP_MIN > exp2 {
let mut n = (F::EXP_MIN - exp2) as usize;
if n > MAX_SHIFT {
n = MAX_SHIFT;
}
d.right_shift(n);
exp2 += n as i32;
}
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
// Shift the decimal to the hidden bit, and then round the value
// to get the high mantissa+1 bits.
d.left_shift(F::SIG_BITS as usize + 1);
let mut mantissa = d.round();
if mantissa >= (1_u64 << (F::SIG_BITS + 1)) {
// Rounding up overflowed to the carry bit, need to
// shift back to the hidden bit.
d.right_shift(1);
exp2 += 1;
mantissa = d.round();
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
}
let mut power2 = exp2 - F::EXP_MIN + 1;
if mantissa < (1_u64 << F::SIG_BITS) {
power2 -= 1;
}
// Zero out all the bits above the explicit mantissa bits.
mantissa &= (1_u64 << F::SIG_BITS) - 1;
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact final numeric-sign excerpt from crate/dec2flt/mod.rs:
let assembled_word = fp.m | ((fp.p_biased as u64) << F::SIG_BITS);
let assembly_result = biased_fp_to_float::<F>(fp);
let lexical_sign_applied = num.negative;
let result = if lexical_sign_applied {
core::ops::Neg::neg(assembly_result)
} else {
assembly_result
};
Thus a numeric execution that reaches the integer/slow selection route
assembles its selected pair with from_bits through biased_fp_to_float and only
then conditionally negates it. A successful try_fast_path returns earlier and
does not perform this assembly. compute_float and parse_long_mantissa produce
raw BiasedFp pairs and do not call from_u64, primitive float multiplication,
division, negation, or from_bits; they do, however, execute constants derived
from SIG_TOTAL_BITS before producing those pairs.
Retained structural-boundary evidence
-------------------------------------
Several adjacent structural bindings cite this same evidence record. Their
pinned library source identities are:
core/src/num/mod.rs
f0820f9dfb94999440c8cb4a349736fa21df7e5668e19b6b49e016ff67c05ce3
core/src/option.rs
7cf61204b05d98a95bc2e322d5fbfc1f4f91505109971917d9a7fb47151c50e6
core/src/slice/mod.rs
354992a6a3d69a0185eef9044a07ea5180e767bdb467aef55e69ee3d44317840
core/src/str/mod.rs
284b4c147b5d0497ce9146f6b96e564f196aed10411a62cdccf5fc5243d40f78
Exact ASCII-digit body from core/src/num/mod.rs:
pub const fn is_ascii_digit(&self) -> bool {
matches!(*self, b'0'..=b'9')
}
Exact Option control-flow bodies from core/src/option.rs:
fn branch(self) -> ControlFlow<Self::Residual, Self::Output> {
match self {
Some(v) => ControlFlow::Continue(v),
None => ControlFlow::Break(None),
}
}
fn from_residual(residual: Option<convert::Infallible>) -> Self {
match residual {
None => None,
}
}
Exact slice observation bodies from core/src/slice/mod.rs:
pub const fn first(&self) -> Option<&T> {
if let [first, ..] = self { Some(first) } else { None }
}
pub const fn split_first(&self) -> Option<(&T, &[T])> {
if let [first, tail @ ..] = self { Some((first, tail)) } else { None }
}
Exact string-byte body from core/src/str/mod.rs:
pub const fn as_bytes(&self) -> &[u8] {
// SAFETY: const sound because we transmute two types with the same layout
unsafe { mem::transmute(self) }
}
reference/model-evidence/binary64-probe.rs
#![feature(float_masks)]
use std::num::FpCategory;
fn bits(label: &str, value: f64) {
println!("{label}={:016x}", value.to_bits());
}
fn main() {
println!("target_arch={}", std::env::consts::ARCH);
println!("mantissa_digits={}", f64::MANTISSA_DIGITS);
println!("exponent_mask={:016x}", f64::EXPONENT_MASK);
println!("mantissa_mask={:016x}", f64::MANTISSA_MASK);
bits("nan", f64::NAN);
bits("infinity", f64::INFINITY);
bits("neg_infinity", f64::NEG_INFINITY);
for (label, value) in [
("nan_category", f64::NAN),
("infinity_category", f64::INFINITY),
("zero_category", 0.0),
("subnormal_category", f64::from_bits(1)),
("normal_category", 1.0),
] {
let category = match value.classify() {
FpCategory::Nan => "Nan",
FpCategory::Infinite => "Infinite",
FpCategory::Zero => "Zero",
FpCategory::Subnormal => "Subnormal",
FpCategory::Normal => "Normal",
};
println!("{label}={category}");
}
let payload_nan_word = 0x7ff0_0000_0000_0001_u64;
println!(
"from_bits_to_bits={:016x}",
f64::from_bits(payload_nan_word).to_bits()
);
bits("neg_payload_nan", -f64::from_bits(payload_nan_word));
bits("neg_zero", -0.0);
bits("subnormal_tie_to_even_zero", f64::from_bits(1) * 0.5);
bits("subnormal_tie_to_even_two", f64::from_bits(3) * 0.5);
bits("normal_division", 1.0 / 10.0);
bits("mul_negative_zero", -0.0 * 2.0);
bits("div_negative_zero", -1.0 / f64::INFINITY);
bits("div_negative_infinity", 1.0 / -0.0);
bits("mul_overflow", f64::MAX * (1.0 + f64::EPSILON));
println!("mul_zero_infinity_is_nan={}", (0.0 * f64::INFINITY).is_nan());
println!("div_zero_zero_is_nan={}", (0.0_f64 / 0.0_f64).is_nan());
println!("mul_nan_is_nan={}", (f64::NAN * 1.0).is_nan());
bits("cast_2_pow_53", (1_u64 << 53) as f64);
bits("cast_2_pow_53_plus_1", ((1_u64 << 53) + 1) as f64);
}
Assumptions / kernel axioms
- Classical.choice
- Quot.sound
- propext
conservative transitive union of saved axiom observations across node dependencies
Requirements depending on this item (32)
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
All 32 entries
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
- Exponent agreement
- Correctness or defer
- Native correctness or defer
- Numeric acceptance
- Accumulated-value diagnostic
- Record bounds
- Invalid rejection
- Accumulated-value diagnostic
- Equal-target bridge
- Exact rounding
- Infinity
- Invalid rejection
- NaN acceptance
- No spurious NaNs
- Numeric acceptance
- Numeric sign
- Selected exponent range
- Selected magnitude sign
- Signed zero
- Totality
- Rounding determinism
- Rounding totality
- Full-significand diagnostic
- Infinity
- NaN
- Rejection
These requirements are linked to this item through the declared dependencies of their proofs.
Record details
| Record source | committed_node_kinds / pv_tablet.json |
|---|---|
| Kind | authored definition |
| Preservation assessment origin | ReviewerAction |
| Preservation fingerprint | preservation-v1:ebbd6ce55fe9f326d31ba7e4d94c80bfb1fa8669c0eaf192848ca55cbd3c763c |
| Preservation current fingerprint | preservation-v1:cbd3f6e434a1882defb917659bf265507d5a4cd1537073bc4bb2b43ff9e7871e |
| Preservation freshness | differs from current fingerprint |
| Correspondence approved fingerprint | {"own_tex":"e2475cd1caad0eef450c903f24d2dfb8ffdfadf787ccad3621a86556f41e533a","lean_semantic_closure":"eb3665125cfccd3338b901a3a743d3789335315a8f2ca7a0988e6a1cd4962f11","lean_relevant_definition_descendants":{"Binary64Model":"d80435c56f8fcbe084ebc2fbf05989a7ddf07434d0acd161302414cac32f964d","F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2"},"lean_relevant_dependencies":["Binary64Model","F64","core_num_FpCategory"],"preamble_tex":""} |
| Correspondence current fingerprint | {"own_tex":"e2475cd1caad0eef450c903f24d2dfb8ffdfadf787ccad3621a86556f41e533a","lean_semantic_closure":"eb3665125cfccd3338b901a3a743d3789335315a8f2ca7a0988e6a1cd4962f11","lean_relevant_definition_descendants":{"Binary64Model":"d80435c56f8fcbe084ebc2fbf05989a7ddf07434d0acd161302414cac32f964d","F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2"},"lean_relevant_dependencies":["Binary64Model","F64","core_num_FpCategory"],"preamble_tex":""} |
| Correspondence freshness | matches current fingerprint |
Exact preservation assessment
{
"status": "ReviewerPinnedFail",
"origin": "ReviewerAction",
"fingerprints": {
"own_tex_hash": "eab1de6522b75cbf9e074943ae85e21cc302567cd340c3af98b58982d4fa1095",
"dep_statement_hashes": {
"Binary64NativeCallDomain": "5b06c401ea7b8fe802a4cae40bcf11c5e438e342f3284a9e27ea421e01cb3642",
"DecimalGoalVocabularyDefault": "d4b3da7e2387e8a515bfcb54efc73f6f4ad498278c6384f4efd04d25991f016b",
"DispatchContracts": "8d2ac7a4d6e57e46e23cdd01bdbcc549e7cf572deedc9986d4d09dcaed202edc"
},
"combined_sound_fp": "preservation-v1:ebbd6ce55fe9f326d31ba7e4d94c80bfb1fa8669c0eaf192848ca55cbd3c763c"
},
"lane_votes": {},
"reviewer_action_id": null
}Captured evidence identities
[
{
"path": "reference/model-evidence/binary64-boundary.txt",
"sha256": "a17d82e7f789ce7f1fbb3922a66ec8806999e526532d637605263882d37b7abf",
"cited_by": [
"Tablet/Binary64ModelDefault.tex",
"committed_node_kinds / pv_tablet.json"
]
},
{
"path": "reference/model-evidence/binary64-probe.rs",
"sha256": "68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e",
"cited_by": [
"reference/model-evidence/binary64-boundary.txt"
]
}
]DecimalGoalVocabulary
Lean definition
Trellis authored this Lean model for an operation outside the mechanical extraction. Modeling choices explains its behavior and review.
import Tablet.DecimalLexeme
import Tablet.F64
import Tablet.num_imp_dec2flt_common_BiasedFp
import Tablet.num_imp_dec2flt_decimal_Decimal
import Mathlib.Data.Real.Basic
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: DecimalGoalVocabulary]
structure DecimalGoalVocabulary where
-- BODY
bytes : Slice Std.U8 -> List Nat
sourceString : Str -> Prop
validNumeric : DecimalLexeme -> Prop
renderNumeric : DecimalLexeme -> List Nat
lexicalNegative : DecimalLexeme -> Bool
specialLiteral : List Nat -> Option Bool -> Bool -> Prop
classifies : List Nat -> Option (Sum DecimalLexeme (Option Bool × Bool)) -> Prop
mathExplicitExponent : DecimalLexeme -> Int
accumulatedExplicitExponent : DecimalLexeme -> Int
exactMagnitude : DecimalLexeme -> Real
accumulatedMagnitude : DecimalLexeme -> Real
decimalMagnitude : num.imp.dec2flt.decimal.Decimal -> Real
roundsMagnitude : Real -> F64 -> Prop
isNan : F64 -> Prop
isInfinity : Bool -> F64 -> Prop
isNegative : F64 -> Prop
signedMagnitude : Bool -> F64 -> F64 -> Prop
assembledWord : num.imp.dec2flt.common.BiasedFp -> F64 -> Prop
end dec2flt_model
Why this model is faithful
Definition
Decimal record; binary64 magnitude
rounding; NaN, signed infinity, and sign-bit observations; application of a
lexical sign to a magnitude word; and unrestricted BiasedFp assembly.Preservation argument
Claim
Proof
Str; byte-list
classification is unrestricted; rounding accepts real inputs; and raw-pair
assembly has no well-formedness argument. The interface introduces no
computation and is instantiated concretely in
DecimalGoalVocabularyDefault.Authored arguments for individual requirements
Requirement: parser totality
Requirement: parser numeric acceptance
Requirement: parser invalid rejection
Requirement: parser nan acceptance
Requirement: parser infinity
Requirement: parser non nan results
Requirement: parser numeric sign
Requirement: parser signed zero
Requirement: parser exact rounding
Requirement: parser selected exponent
Requirement: parser selected magnitude sign
Requirement: dispatch abstract composition
Requirement: dispatch component compliance
Requirement: parser accumulated rounding
Requirement: parser equal target rounding
Requirement: number helper acceptance
Requirement: number helper rejection
Requirement: number helper record bounds
Requirement: number helper accumulated value
Requirement: special helper infinity
Requirement: special helper nan
Requirement: special helper rejection
Requirement: native correct or defer
Requirement: integer correct or defer
Requirement: slow accumulated rounding
Requirement: assembly correspondence
Requirement: classification totality
Requirement: classification determinism
Requirement: classification significand digit
Requirement: rounding totality
Requirement: rounding determinism
Requirement: exponent value agreement
Recorded review
| Correspondence | Pass |
|---|
DecimalGoalVocabulary · Lean checked
Assumptions / kernel axioms
- Classical.choice
- Quot.sound
- propext
conservative transitive union of saved axiom observations across node dependencies
Requirements depending on this item (32)
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
All 32 entries
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
- Exponent agreement
- Correctness or defer
- Native correctness or defer
- Numeric acceptance
- Accumulated-value diagnostic
- Record bounds
- Invalid rejection
- Accumulated-value diagnostic
- Equal-target bridge
- Exact rounding
- Infinity
- Invalid rejection
- NaN acceptance
- No spurious NaNs
- Numeric acceptance
- Numeric sign
- Selected exponent range
- Selected magnitude sign
- Signed zero
- Totality
- Rounding determinism
- Rounding totality
- Full-significand diagnostic
- Infinity
- NaN
- Rejection
These requirements are linked to this item through the declared dependencies of their proofs.
Record details
| Record source | committed_node_kinds / pv_tablet.json |
|---|---|
| Kind | authored definition |
| Correspondence approved fingerprint | {"own_tex":"93815606c510afb8f425bb3ef618e21f81033cc552e15695a4d443dbb7010103","lean_semantic_closure":"c5e131808ca7c2258bd4e9ab3ac387fb18520c3691a9cb8189466ab4bb44dd2a","lean_relevant_definition_descendants":{"DecimalLexeme":"aeeeec41a307a5fb7e3916c9c4899c4077abccd652062c92a252fc65a8e7d7a6","F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2"},"lean_relevant_dependencies":["DecimalLexeme","F64","num_imp_dec2flt_common_BiasedFp","num_imp_dec2flt_decimal_Decimal"],"preamble_tex":""} |
| Correspondence current fingerprint | {"own_tex":"93815606c510afb8f425bb3ef618e21f81033cc552e15695a4d443dbb7010103","lean_semantic_closure":"c5e131808ca7c2258bd4e9ab3ac387fb18520c3691a9cb8189466ab4bb44dd2a","lean_relevant_definition_descendants":{"DecimalLexeme":"aeeeec41a307a5fb7e3916c9c4899c4077abccd652062c92a252fc65a8e7d7a6","F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2"},"lean_relevant_dependencies":["DecimalLexeme","F64","num_imp_dec2flt_common_BiasedFp","num_imp_dec2flt_decimal_Decimal"],"preamble_tex":""} |
| Correspondence freshness | matches current fingerprint |
DecimalGoalVocabularyDefault
Lean definition
Trellis authored this Lean model for an operation outside the mechanical extraction. Modeling choices explains its behavior and review.
import Tablet.DecimalGoalVocabulary
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: DecimalGoalVocabularyDefault]
noncomputable def DecimalGoalVocabularyDefault : DecimalGoalVocabulary :=
-- BODY
let signBytes := fun sign : Option Bool =>
match sign with | none => [] | some negative => [if negative then 45 else 43]
let digitByte := fun d : Nat => 48 + d
let allDigits := fun ds : List Nat => ∀ d ∈ ds, d < 10
let validNumeric := fun x : DecimalLexeme =>
allDigits x.integerDigits ∧
(match x.fractionDigits with | none => True | some ds => allDigits ds) ∧
(x.integerDigits ≠ [] ∨
match x.fractionDigits with | none => False | some ds => ds ≠ []) ∧
(match x.exponent with | none => True | some (_, _, ds) => ds ≠ [] ∧ allDigits ds)
let renderNumeric := fun x : DecimalLexeme =>
signBytes x.leadingSign ++ x.integerDigits.map digitByte ++
(match x.fractionDigits with | none => [] | some ds => 46 :: ds.map digitByte) ++
(match x.exponent with
| none => []
| some (upper, sign, ds) =>
(if upper then 69 else 101) ::
(match sign with | none => [] | some neg => [if neg then 45 else 43]) ++
ds.map digitByte)
let asciiCaseEq := fun xs ys : List Nat =>
List.Forall₂ (fun actual lower => actual = lower ∨ actual + 32 = lower) xs ys
let specialLiteral := fun bs : List Nat => fun sign : Option Bool => fun nan : Bool =>
∃ body, bs = signBytes sign ++ body ∧
if nan then asciiCaseEq body [110, 97, 110]
else asciiCaseEq body [105, 110, 102] ∨
asciiCaseEq body [105, 110, 102, 105, 110, 105, 116, 121]
let numericLiteral := fun bs : List Nat => fun x : DecimalLexeme =>
validNumeric x ∧ renderNumeric x = bs
let classifies := fun bs : List Nat =>
fun c : Option (Sum DecimalLexeme (Option Bool × Bool)) =>
match c with
| some (Sum.inl x) => numericLiteral bs x
| some (Sum.inr (sign, nan)) => specialLiteral bs sign nan
| none => (¬ ∃ x, numericLiteral bs x) ∧ (¬ ∃ sign nan, specialLiteral bs sign nan)
let digitsValue : List Nat -> Nat :=
fun ds => ds.foldl (fun (n d : Nat) => 10 * n + d) 0
let exponentValue := fun x : DecimalLexeme =>
match x.exponent with
| none => 0
| some (_, sign, ds) =>
let n : Int := digitsValue ds
match sign with | some true => -n | _ => n
let accumulatedExponentValue := fun x : DecimalLexeme =>
match x.exponent with
| none => 0
| some (_, sign, ds) =>
let n : Nat := ds.foldl
(fun (n d : Nat) => if n < 65536 then 10 * n + d else n) 0
match sign with | some true => -(n : Int) | _ => (n : Int)
let fractionCount := fun x : DecimalLexeme =>
match x.fractionDigits with | none => 0 | some ds => ds.length
let significandDigits := fun x : DecimalLexeme =>
x.integerDigits ++ match x.fractionDigits with | none => [] | some ds => ds
let magnitudeWithExponent := fun x : DecimalLexeme => fun e : Int =>
(digitsValue (significandDigits x) : Real) *
(10 : Real) ^ (e - (fractionCount x : Int))
let signBit : Nat := 2 ^ 63
let fractionUnit : Nat := 2 ^ 52
let infinityBits : Nat := 2047 * fractionUnit
let finiteMagnitudeValue := fun bits : Nat =>
let e := bits / fractionUnit
let m := bits % fractionUnit
if e = 0 then
(m : Real) / ((2 : Real) ^ (1074 : Nat))
else if 1075 <= e then
((fractionUnit + m : Nat) : Real) * ((2 : Real) ^ (e - 1075))
else
((fractionUnit + m : Nat) : Real) / ((2 : Real) ^ (1075 - e))
let overflowThreshold : Real :=
((2 : Real) ^ (1024 : Nat)) - ((2 : Real) ^ (970 : Nat))
let roundsMagnitude := fun x : Real => fun w : F64 =>
0 <= x ∧ w.val <= infinityBits ∧
if w.val = infinityBits then overflowThreshold <= x
else x < overflowThreshold ∧
∀ v : F64, v.val < infinityBits -> v ≠ w ->
abs (x - finiteMagnitudeValue w.val) <= abs (x - finiteMagnitudeValue v.val) ∧
(abs (x - finiteMagnitudeValue w.val) = abs (x - finiteMagnitudeValue v.val) ->
w.val % 2 = 0)
{
bytes := fun s => s.val.map (fun b => b.val)
sourceString := fun s => s.val.length <= 9223372036854775807 ∧
∃ t : String, s.val.map (fun b => b.val) = t.toUTF8.toList.map UInt8.toNat
validNumeric := validNumeric
renderNumeric := renderNumeric
lexicalNegative := fun x => x.leadingSign = some true
specialLiteral := specialLiteral
classifies := classifies
mathExplicitExponent := exponentValue
accumulatedExplicitExponent := accumulatedExponentValue
exactMagnitude := fun x => magnitudeWithExponent x (exponentValue x)
accumulatedMagnitude := fun x => magnitudeWithExponent x (accumulatedExponentValue x)
decimalMagnitude := fun d => (d.mantissa.val : Real) * (10 : Real) ^ d.exponent.val
roundsMagnitude := roundsMagnitude
isNan := fun w =>
(w.val % signBit) / fractionUnit = 2047 ∧ w.val % fractionUnit ≠ 0
isInfinity := fun negative w =>
w.val = infinityBits + if negative then signBit else 0
isNegative := fun w => signBit <= w.val
signedMagnitude := fun negative magnitude result =>
magnitude.val < signBit ∧ result.val = magnitude.val + if negative then signBit else 0
assembledWord := fun fp w =>
w.val = Nat.lor fp.m.val
(((fp.p_biased.val.emod (2 ^ 64)).toNat * (2 ^ 52)) % (2 ^ 64))
}
end dec2flt_model
Why this model is faithful
Definition
Str is source-valid
exactly when its byte list has length at most
\mathtt{isize::MAX}=9223372036854775807 and is the UTF-8 encoding of a Lean
string. A numeric
lexeme has an optional minus or plus sign and is valid exactly when every
recorded digit is in 0,\ldots,9, at least
one digit occurs on either side of the optional point, and a present exponent
has at least one digit. Rendering uses ASCII, an optional leading sign, the
recorded optional point, and an optional e/E exponent with
its optional sign. Special literals are optionally signed
inf, infinity, or nan, ASCII case-insensitively.
Classification is numeric with its complete lexeme, special with its sign and
kind, or invalid exactly when neither grammar matches.Decimal has magnitude \mathit{mantissa}\,10^{\mathit{exponent}}.BiasedFp assembly is the low 64 bits of the
mantissa OR the Rust two's-complement i32-to-u64 cast of the
biased exponent shifted left by 52.Preservation argument
Claim
BiasedFp field values.Proof
str representation conditions recorded in
reference/model-evidence/source-valid-byte-slice.txt. The numeric
renderer is a literal transcription of the grammar in GOAL.md:
its validity conditions require a significand digit and exponent digit when
needed, and rendering admits no whitespace or trailing bytes. The special
relation compares each ASCII letter with exactly its upper- or lowercase form.
The accumulated fold is the condition and update in
reference/model-evidence/goal-vocabulary.txt; the mathematical
fold never saturates. The binary64 formulas include subnormals, both midpoint
tie cases through low-bit parity, and the standard overflow midpoint. Word
classification uses the fixed 11-bit exponent and 52-bit fraction fields.
Assembly uses modulo 2^{64} for the Rust signed cast and left shift, followed
by bitwise OR, exactly matching the source expression for every field value.Authored arguments for individual requirements
Requirement: parser totality
Requirement: parser numeric acceptance
Requirement: parser invalid rejection
Requirement: parser nan acceptance
Requirement: parser infinity
Requirement: parser non nan results
Requirement: parser numeric sign
Requirement: parser signed zero
Requirement: parser exact rounding
Requirement: parser selected exponent
Requirement: parser selected magnitude sign
Requirement: dispatch abstract composition
Requirement: dispatch component compliance
Requirement: parser accumulated rounding
Requirement: parser equal target rounding
Requirement: number helper acceptance
Requirement: number helper rejection
Requirement: number helper record bounds
Requirement: number helper accumulated value
Requirement: special helper infinity
Requirement: special helper nan
Requirement: special helper rejection
Requirement: native correct or defer
Requirement: integer correct or defer
Requirement: slow accumulated rounding
Requirement: assembly correspondence
Requirement: classification totality
Requirement: classification determinism
Requirement: classification significand digit
Requirement: rounding totality
Requirement: rounding determinism
Requirement: exponent value agreement
Recorded review
| Correspondence | Pass |
|---|
DecimalGoalVocabularyDefault · Lean checked
Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
reference/model-evidence/goal-vocabulary.txt
Decimal goal-vocabulary primary evidence
Repository-root reproduction commands:
sha256sum GOAL.md crate/dec2flt/parse.rs crate/dec2flt/mod.rs modeling-input/manifest.json
nl -ba GOAL.md | sed -n '3,24p'
nl -ba crate/dec2flt/parse.rs | sed -n '121,155p'
nl -ba crate/dec2flt/mod.rs | sed -n '279,284p'
Recorded SHA-256 identities:
b64efb7cb397f6e6b263e6af4a8ad3405cc19d6902b5dd8a4984e3add857fb12 GOAL.md
50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f crate/dec2flt/parse.rs
b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012 crate/dec2flt/mod.rs
2fc182c0c7acccad30c449ca349b999759b84e8ed4ec9d590e8295e43eeec077 modeling-input/manifest.json
GOAL.md lines 9-24 define the optional leading sign, decimal significand,
optional signed exponent, case-insensitive special keywords, whole-input
matching, exact decimal value, IEEE binary64 rounding mode, and the distinct
source-accumulated exponent diagnostic.
The checked source exponent loop at crate/dec2flt/parse.rs lines 141-150 is:
let mut count = 0;
while count < s.len() && s[count].wrapping_sub(b'0') < 10 {
let digit = s[count].wrapping_sub(b'0');
if exponent < 0x10000 {
exponent = 10 * exponent + digit as i64;
}
count += 1;
}
*s_ref = &s[count..];
if negative { Some(-exponent) } else { Some(exponent) }
The unrestricted source assembly at crate/dec2flt/mod.rs lines 279-282 is:
fn biased_fp_to_float<F: FloatExt>(x: BiasedFp) -> F {
let mut word = x.m;
word |= (x.p_biased as u64) << F::SIG_BITS;
F::from_u64_bits(word)
}
The manifest pins debug and overflow checks and the f64 extraction basis. The
vocabulary uses the reference statement, rather than an implementation probe,
for the mathematical finite-byte-string and nonnegative-real domains.
reference/model-evidence/source-valid-byte-slice.txt
Source-valid byte-slice domain evidence
Pinned toolchain commands, run from the repository root:
rustc --version --verbose
rustc --print cfg | rg 'target_(arch|pointer_width)'
rustc .trellis/scratch/source_valid_slice_probe.rs -o /tmp/source_valid_slice_probe
/tmp/source_valid_slice_probe
Raw configuration and probe output:
rustc 1.98.0-nightly (14210df0e 2026-05-31)
host: x86_64-unknown-linux-gnu
target_arch="x86_64"
target_pointer_width="64"
arch=x86_64
usize_bits=64
isize_max=9223372036854775807
u8_size=1
Pinned core-library source:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:801
states that a slice is never larger than isize::MAX bytes.
The same toolchain's core/src/num/int_macros.rs:47 defines a signed
integer's MAX as the corresponding unsigned MAX shifted right by one.
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/mod.rs:507-510
requires the contents of a str to remain valid UTF-8 and states that using a
str whose contents are not valid UTF-8 is undefined behavior.
Consequently, on the configured 64-bit target a &[u8] has at most
9223372036854775807 elements. This is a byte-count condition only: &[u8]
does not impose UTF-8 validity or restrict the values of its u8 elements.
A Rust str has the same inherent byte-length bound and additionally consists
of valid UTF-8 bytes.
Assumptions / kernel axioms
- Classical.choice
- Quot.sound
- propext
conservative transitive union of saved axiom observations across node dependencies
Requirements depending on this item (32)
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
All 32 entries
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
- Exponent agreement
- Correctness or defer
- Native correctness or defer
- Numeric acceptance
- Accumulated-value diagnostic
- Record bounds
- Invalid rejection
- Accumulated-value diagnostic
- Equal-target bridge
- Exact rounding
- Infinity
- Invalid rejection
- NaN acceptance
- No spurious NaNs
- Numeric acceptance
- Numeric sign
- Selected exponent range
- Selected magnitude sign
- Signed zero
- Totality
- Rounding determinism
- Rounding totality
- Full-significand diagnostic
- Infinity
- NaN
- Rejection
These requirements are linked to this item through the declared dependencies of their proofs.
Record details
| Record source | committed_node_kinds / pv_tablet.json |
|---|---|
| Kind | authored definition |
| Correspondence approved fingerprint | {"own_tex":"8e764be6667e1926143e8f2576a83acf0a0aa9a5aa790c9619858db50c026dc4","lean_semantic_closure":"7050158d50f891228451ab1820dccf6b1fb8fb1798cfd24f377f5ed12dd2f207","lean_relevant_definition_descendants":{"DecimalGoalVocabulary":"93815606c510afb8f425bb3ef618e21f81033cc552e15695a4d443dbb7010103","DecimalLexeme":"aeeeec41a307a5fb7e3916c9c4899c4077abccd652062c92a252fc65a8e7d7a6","F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2"},"lean_relevant_dependencies":["DecimalGoalVocabulary","DecimalLexeme","F64","num_imp_dec2flt_common_BiasedFp","num_imp_dec2flt_decimal_Decimal"],"preamble_tex":""} |
| Correspondence current fingerprint | {"own_tex":"8e764be6667e1926143e8f2576a83acf0a0aa9a5aa790c9619858db50c026dc4","lean_semantic_closure":"7050158d50f891228451ab1820dccf6b1fb8fb1798cfd24f377f5ed12dd2f207","lean_relevant_definition_descendants":{"DecimalGoalVocabulary":"93815606c510afb8f425bb3ef618e21f81033cc552e15695a4d443dbb7010103","DecimalLexeme":"aeeeec41a307a5fb7e3916c9c4899c4077abccd652062c92a252fc65a8e7d7a6","F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2"},"lean_relevant_dependencies":["DecimalGoalVocabulary","DecimalLexeme","F64","num_imp_dec2flt_common_BiasedFp","num_imp_dec2flt_decimal_Decimal"],"preamble_tex":""} |
| Correspondence freshness | matches current fingerprint |
Captured evidence identities
[
{
"path": "reference/model-evidence/goal-vocabulary.txt",
"sha256": "ea4352c90f9e035dd54e4d1f71048d45c76c04951bc962b144e1e59fa37fd237",
"cited_by": [
"Tablet/DecimalGoalVocabularyDefault.tex",
"committed_node_kinds / pv_tablet.json"
]
},
{
"path": "reference/model-evidence/source-valid-byte-slice.txt",
"sha256": "e7887429c66a303cbba3b4df30080ddd9ba4d54e24f25f74947deb228b32b04f",
"cited_by": [
"Tablet/DecimalGoalVocabularyDefault.tex",
"committed_node_kinds / pv_tablet.json"
]
}
]DecimalLexeme
Lean definition
Trellis authored this Lean model for an operation outside the mechanical extraction. Modeling choices explains its behavior and review.
import Aeneas
import Tablet.Preamble
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: DecimalLexeme]
structure DecimalLexeme where
-- BODY
leadingSign : Option Bool
integerDigits : List Nat
fractionDigits : Option (List Nat)
exponent : Option (Bool × Option Bool × List Nat)
end dec2flt_model
Why this model is faithful
Definition
Preservation argument
Claim
Proof
Authored arguments for individual requirements
Requirement: parser totality
Requirement: parser numeric acceptance
Requirement: parser invalid rejection
Requirement: parser nan acceptance
Requirement: parser infinity
Requirement: parser non nan results
Requirement: parser numeric sign
Requirement: parser signed zero
Requirement: parser exact rounding
Requirement: parser selected exponent
Requirement: parser selected magnitude sign
Requirement: dispatch abstract composition
Requirement: dispatch component compliance
Requirement: parser accumulated rounding
Requirement: parser equal target rounding
Requirement: number helper acceptance
Requirement: number helper rejection
Requirement: number helper record bounds
Requirement: number helper accumulated value
Requirement: special helper infinity
Requirement: special helper nan
Requirement: special helper rejection
Requirement: native correct or defer
Requirement: integer correct or defer
Requirement: slow accumulated rounding
Requirement: assembly correspondence
Requirement: classification totality
Requirement: classification determinism
Requirement: classification significand digit
Requirement: rounding totality
Requirement: rounding determinism
Requirement: exponent value agreement
Recorded review
| Correspondence | Pass |
|---|
DecimalLexeme · Lean checked
Assumptions / kernel axioms
- propext
conservative transitive union of saved axiom observations across node dependencies
Requirements depending on this item (32)
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
All 32 entries
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
- Exponent agreement
- Correctness or defer
- Native correctness or defer
- Numeric acceptance
- Accumulated-value diagnostic
- Record bounds
- Invalid rejection
- Accumulated-value diagnostic
- Equal-target bridge
- Exact rounding
- Infinity
- Invalid rejection
- NaN acceptance
- No spurious NaNs
- Numeric acceptance
- Numeric sign
- Selected exponent range
- Selected magnitude sign
- Signed zero
- Totality
- Rounding determinism
- Rounding totality
- Full-significand diagnostic
- Infinity
- NaN
- Rejection
These requirements are linked to this item through the declared dependencies of their proofs.
Record details
| Record source | committed_node_kinds / pv_tablet.json |
|---|---|
| Kind | authored definition |
| Correspondence approved fingerprint | {"own_tex":"aeeeec41a307a5fb7e3916c9c4899c4077abccd652062c92a252fc65a8e7d7a6","lean_semantic_closure":"88a55d30e14969c279ce18cf88b25a016c40d52cad5a1a166d71f5f189370a56","preamble_tex":""} |
| Correspondence current fingerprint | {"own_tex":"aeeeec41a307a5fb7e3916c9c4899c4077abccd652062c92a252fc65a8e7d7a6","lean_semantic_closure":"88a55d30e14969c279ce18cf88b25a016c40d52cad5a1a166d71f5f189370a56","preamble_tex":""} |
| Correspondence freshness | matches current fingerprint |
DispatchContracts
Lean definition
Trellis authored this Lean model for an operation outside the mechanical extraction. Modeling choices explains its behavior and review.
import Tablet.DecimalGoalVocabularyDefault
import Tablet.SourceValidByteSlice
import Tablet.num_imp_dec2flt_common_BiasedFp
import Tablet.num_imp_dec2flt_decimal_Decimal
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: DispatchContracts]
structure DispatchContracts where
-- BODY
stripSign : List Nat -> Option (Option Bool × List Nat)
parseNumber : List Nat -> Option num.imp.dec2flt.decimal.Decimal
parseSpecial : List Nat -> Bool -> Option F64
native : num.imp.dec2flt.decimal.Decimal -> Option F64
incrementMantissa : Std.U64 -> Option Std.U64
integer : Std.I64 -> Std.U64 -> num.imp.dec2flt.common.BiasedFp
samePair : num.imp.dec2flt.common.BiasedFp ->
num.imp.dec2flt.common.BiasedFp -> Bool
forceDefer : num.imp.dec2flt.common.BiasedFp ->
num.imp.dec2flt.common.BiasedFp
slow : List Nat -> num.imp.dec2flt.common.BiasedFp
assemble : num.imp.dec2flt.common.BiasedFp -> F64
applySign : Bool -> F64 -> F64
recordRepresents : num.imp.dec2flt.decimal.Decimal -> DecimalLexeme -> Prop
flow : List Nat -> Option F64 -> Prop
stripSign_exact : ∀ s,
DecimalGoalVocabularyDefault.sourceString s ->
stripSign (DecimalGoalVocabularyDefault.bytes s) =
match DecimalGoalVocabularyDefault.bytes s with
| [] => none
| 43 :: body =>
if body = [] then none else some (some false, body)
| 45 :: body =>
if body = [] then none else some (some true, body)
| body => some (none, body)
stripSign_none : ∀ s,
DecimalGoalVocabularyDefault.sourceString s ->
stripSign (DecimalGoalVocabularyDefault.bytes s) = none ->
DecimalGoalVocabularyDefault.classifies
(DecimalGoalVocabularyDefault.bytes s) none
stripSign_some : ∀ s sign body,
DecimalGoalVocabularyDefault.sourceString s ->
stripSign (DecimalGoalVocabularyDefault.bytes s) = some (sign, body) ->
body ≠ [] ∧
(∃ bodySlice : Slice Std.U8,
SourceValidByteSlice bodySlice ∧
DecimalGoalVocabularyDefault.bytes bodySlice = body) ∧
(∀ x,
(DecimalGoalVocabularyDefault.classifies
(DecimalGoalVocabularyDefault.bytes s) (some (Sum.inl x)) ↔
∃ unsigned,
unsigned.leadingSign = none ∧
DecimalGoalVocabularyDefault.validNumeric unsigned ∧
DecimalGoalVocabularyDefault.renderNumeric unsigned = body ∧
x = { unsigned with leadingSign := sign })) ∧
(∀ specialSign nan,
(DecimalGoalVocabularyDefault.classifies
(DecimalGoalVocabularyDefault.bytes s)
(some (Sum.inr (specialSign, nan))) ↔
specialSign = sign ∧
DecimalGoalVocabularyDefault.specialLiteral body none nan))
parseNumber_spec : ∀ (body : Slice Std.U8) d,
SourceValidByteSlice body ->
(parseNumber (DecimalGoalVocabularyDefault.bytes body) = some d ↔
∃ x,
x.leadingSign = none ∧
DecimalGoalVocabularyDefault.validNumeric x ∧
DecimalGoalVocabularyDefault.renderNumeric x =
DecimalGoalVocabularyDefault.bytes body ∧
recordRepresents d x)
parseNumber_complete : ∀ (body : Slice Std.U8) x,
SourceValidByteSlice body ->
x.leadingSign = none ->
DecimalGoalVocabularyDefault.validNumeric x ->
DecimalGoalVocabularyDefault.renderNumeric x =
DecimalGoalVocabularyDefault.bytes body ->
∃ d,
parseNumber (DecimalGoalVocabularyDefault.bytes body) = some d ∧
recordRepresents d x
recordRepresents_spec : ∀ d x, recordRepresents d x ->
d.negative = false ∧ d.mantissa.val < 10 ^ 19 ∧
(if d.many_digits then
DecimalGoalVocabularyDefault.decimalMagnitude d <=
DecimalGoalVocabularyDefault.accumulatedMagnitude x ∧
DecimalGoalVocabularyDefault.accumulatedMagnitude x <
(((d.mantissa.val + 1 : Nat) : Real) *
(10 : Real) ^ d.exponent.val)
else
DecimalGoalVocabularyDefault.decimalMagnitude d =
DecimalGoalVocabularyDefault.accumulatedMagnitude x)
parseSpecial_sound : ∀ (body : Slice Std.U8) negative f,
SourceValidByteSlice body ->
parseSpecial (DecimalGoalVocabularyDefault.bytes body) negative = some f ->
∃ nan,
DecimalGoalVocabularyDefault.specialLiteral
(DecimalGoalVocabularyDefault.bytes body) none nan ∧
(if nan then DecimalGoalVocabularyDefault.isNan f
else DecimalGoalVocabularyDefault.isInfinity negative f)
parseSpecial_complete : ∀ (body : Slice Std.U8) negative nan,
SourceValidByteSlice body ->
DecimalGoalVocabularyDefault.specialLiteral
(DecimalGoalVocabularyDefault.bytes body) none nan ->
∃ f,
parseSpecial (DecimalGoalVocabularyDefault.bytes body) negative = some f ∧
(if nan then DecimalGoalVocabularyDefault.isNan f
else DecimalGoalVocabularyDefault.isInfinity negative f)
parseSpecial_reject : ∀ (body : Slice Std.U8) negative,
SourceValidByteSlice body ->
(¬ ∃ nan, DecimalGoalVocabularyDefault.specialLiteral
(DecimalGoalVocabularyDefault.bytes body) none nan) ->
parseSpecial (DecimalGoalVocabularyDefault.bytes body) negative = none
native_spec : ∀ d f, native d = some f ->
d.many_digits = false ∧
∃ magnitude,
DecimalGoalVocabularyDefault.roundsMagnitude
(DecimalGoalVocabularyDefault.decimalMagnitude d) magnitude ∧
magnitude.val < 2 ^ 63 ∧
f = applySign d.negative magnitude
incrementMantissa_spec : ∀ w,
w.val < 10 ^ 19 ->
∃ w', incrementMantissa w = some w' ∧ w'.val = w.val + 1
integer_spec : ∀ q w,
let fp := integer q w
fp.p_biased.val < 0 ∨
(0 <= fp.p_biased.val ∧ fp.p_biased.val <= 2047 ∧
DecimalGoalVocabularyDefault.roundsMagnitude
((w.val : Real) * (10 : Real) ^ q.val) (assemble fp) ∧
(assemble fp).val < 2 ^ 63)
samePair_spec : ∀ a b, samePair a b = true ↔ a = b
recordTarget_spec : ∀ d x, recordRepresents d x ->
(d.many_digits = false ->
∀ target,
(DecimalGoalVocabularyDefault.roundsMagnitude
(DecimalGoalVocabularyDefault.decimalMagnitude d) target ↔
DecimalGoalVocabularyDefault.roundsMagnitude
(DecimalGoalVocabularyDefault.exactMagnitude x) target)) ∧
(d.many_digits = true ->
∀ nextMantissa,
incrementMantissa d.mantissa = some nextMantissa ->
samePair (integer d.exponent d.mantissa)
(integer d.exponent nextMantissa) = true ->
DecimalGoalVocabularyDefault.roundsMagnitude
(DecimalGoalVocabularyDefault.exactMagnitude x)
(assemble (integer d.exponent d.mantissa)))
forceDefer_spec : ∀ fp,
(forceDefer fp).m = fp.m ∧ (forceDefer fp).p_biased.val = -1
slow_spec : ∀ (body : Slice Std.U8) x,
SourceValidByteSlice body ->
x.leadingSign = none ->
DecimalGoalVocabularyDefault.validNumeric x ->
DecimalGoalVocabularyDefault.renderNumeric x =
DecimalGoalVocabularyDefault.bytes body ->
let fp := slow (DecimalGoalVocabularyDefault.bytes body)
0 <= fp.p_biased.val ∧ fp.p_biased.val <= 2047 ∧
DecimalGoalVocabularyDefault.roundsMagnitude
(DecimalGoalVocabularyDefault.accumulatedMagnitude x) (assemble fp) ∧
(assemble fp).val < 2 ^ 63
slowTarget_spec : ∀ (body : Slice Std.U8) x,
SourceValidByteSlice body ->
x.leadingSign = none ->
DecimalGoalVocabularyDefault.validNumeric x ->
DecimalGoalVocabularyDefault.renderNumeric x =
DecimalGoalVocabularyDefault.bytes body ->
DecimalGoalVocabularyDefault.roundsMagnitude
(DecimalGoalVocabularyDefault.exactMagnitude x)
(assemble (slow (DecimalGoalVocabularyDefault.bytes body)))
assembly_spec : ∀ fp,
DecimalGoalVocabularyDefault.assembledWord fp (assemble fp)
sign_spec : ∀ negative magnitude, magnitude.val < 2 ^ 63 ->
DecimalGoalVocabularyDefault.signedMagnitude
negative magnitude (applySign negative magnitude)
flow_spec : ∀ s out,
DecimalGoalVocabularyDefault.sourceString s ->
(flow (DecimalGoalVocabularyDefault.bytes s) out ↔
match stripSign (DecimalGoalVocabularyDefault.bytes s) with
| none => out = none
| some (sign, body) =>
let negative : Bool := decide (sign = some true)
match parseNumber body with
| none => out = parseSpecial body negative
| some parsed =>
let signedParsed := { parsed with negative := negative }
match native signedParsed with
| some f => out = some f
| none =>
let first := integer parsed.exponent parsed.mantissa
let secondGuard : Bool :=
parsed.many_digits && decide (0 <= first.p_biased.val)
let postComparison :=
if secondGuard then
match incrementMantissa parsed.mantissa with
| none => forceDefer first
| some nextMantissa =>
let second := integer parsed.exponent nextMantissa
if samePair first second then first else forceDefer first
else first
let selected :=
if decide (postComparison.p_biased.val < 0) then slow body
else postComparison
out = some (applySign negative (assemble selected)))
end dec2flt_model
Why this model is faithful
Definition
+ is removed and records the optional Boolean sign
\operatorname{some}(\mathit{false}), while a leading ASCII - is
removed and records \operatorname{some}(\mathit{true}); either case returns
none when the remainder is empty and otherwise returns that exact nonempty
remainder as the body. Every other nonempty byte list is returned unchanged as
the body with no leading sign. Failed sign stripping classifies the input as
invalid. Successful sign stripping produces a nonempty body, the same optional
leading sign, and a source-valid Rust byte-slice carrier for exactly that body.
The original string's bytes are classified by a numeric lexeme x exactly
when there is a valid unsigned lexeme whose rendering is the body and whose
complete record becomes x upon replacing its absent leading sign by that
exact optional sign. They are classified by a special kind with an optional
sign exactly when that sign is the stripped sign and the body is the
corresponding unsigned special literal. Thus sign stripping preserves the
complete numeric, special, and invalid classification on precisely the
source-string domain: empty and sign-only inputs cannot invent a helper body,
whereas every other nonempty invalid input reaches the lexical helpers on the
exact body just described.nan or the infinity selected
by the separate sign argument for inf and infinity.
Conversely, each unsigned special literal has some returned value satisfying
its corresponding predicate; this existential does not choose one NaN
representation and equate it with all NaNs. When there is no unsigned special
literal, the parser returns none. A represented record is nonnegative,
has mantissa below 10^{19}, and either denotes the input's accumulated-
exponent magnitude when no digits were truncated or brackets that diagnostic
magnitude between the values obtained from its mantissa and from mantissa plus
one. A distinct target-preservation clause says that a nontruncated record has
the same rounding targets as the exact input and that agreement of the two
many-digit endpoint pairs gives an exact-input rounding target.Preservation argument
Claim
f64
dispatcher: it neither inserts a
conversion branch nor treats a directly returned native or special value as an
assembled raw pair. Its record, endpoint, fallback, assembly, and sign clauses
preserve the source's distinct intermediate values and do not assume the final
combined exact-rounding-and-sign conclusion.Proof
str. The meanings of its
source-string domain and bytes, grammar and classification, decimal and exact
magnitudes, rounding relation, NaN and signed-infinity observations, raw-pair
assembly, and signed-magnitude observation are precisely those fixed by
DecimalGoalVocabularyDefault. Its representation is UTF-8 and
bounded by isize::MAX; removing at most one leading ASCII sign leaves
a subslice within the same length bound, but helper slices need not
independently satisfy UTF-8. That slice representability distinction is
precisely the one recorded by SourceValidByteSlice.- and +, removes exactly that one
byte in either signed case, and rejects exactly when the resulting body is
empty. Hence - records true, + records false, a signed
nonempty input returns its exact tail, and every other nonempty input returns
its exact unchanged bytes with no optional sign. This proves the stated
sign-stripping equation from the source branches. Together with the grammar
and classification of DecimalGoalVocabularyDefault, the equation
also proves the retained classification consequences: only empty or sign-only
inputs can fail before obtaining a body, and every other nonempty invalid input
passes its exact unsigned or unchanged body to both lexical stages before it
is rejected. The body is a subslice, so its carrier satisfies
SourceValidByteSlice.Authored arguments for individual requirements
Requirement: parser totality
Requirement: parser numeric acceptance
Requirement: parser invalid rejection
Requirement: parser nan acceptance
Requirement: parser infinity
Requirement: parser non nan results
Requirement: parser numeric sign
Requirement: parser signed zero
Requirement: parser exact rounding
Requirement: parser selected exponent
Requirement: parser selected magnitude sign
Requirement: dispatch abstract composition
Requirement: dispatch component compliance
Requirement: parser accumulated rounding
Requirement: parser equal target rounding
Requirement: number helper acceptance
Requirement: number helper rejection
None for every nonnumeric source-valid unsigned byte slice, without adding UTF-8.Requirement: number helper record bounds
Requirement: number helper accumulated value
Requirement: special helper infinity
Requirement: special helper nan
Requirement: special helper rejection
None outside all three unsigned keywords throughout the source-valid byte-slice domain.Requirement: native correct or defer
Requirement: integer correct or defer
Requirement: slow accumulated rounding
Requirement: assembly correspondence
Requirement: classification totality
Requirement: classification determinism
Requirement: classification significand digit
Requirement: rounding totality
Requirement: rounding determinism
Requirement: exponent value agreement
Recorded review
| Correspondence | Pass |
|---|---|
| Preservation | VerifierPass |
DispatchContracts · Lean checked
Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
reference/model-evidence/dispatch-contracts.txt
Dispatcher contract and trace evidence
Files inspected (SHA-256 from sha256sum 9.1):
upstream/dec2flt/mod.rs
7198e238c554b692405537a446b3526ad66805ec2900cd0e299f10c51402a44a
crate/dec2flt/mod.rs
b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012
upstream/dec2flt/parse.rs
9daf21ab9445a84552535152f376eef8c30f3d5827296c0645f5952d3b22bbf1
crate/dec2flt/parse.rs
50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f
Tablet/num_imp_dec2flt_dec2flt_with_trace.lean
d6334bbf4a4437677de1865a89f696eeb4dfdb10d547499667d7cd19755b6d1
Tablet/num_imp_dec2flt_Dec2FltAssemblyTrace.lean
1d4248b9374405a2614a03986c45563c92425ec58a7be981dea74bb2de3142ac
Reproduction commands:
sha256sum upstream/dec2flt/mod.rs crate/dec2flt/mod.rs \
upstream/dec2flt/parse.rs crate/dec2flt/parse.rs \
Tablet/num_imp_dec2flt_dec2flt_with_trace.lean \
Tablet/num_imp_dec2flt_Dec2FltAssemblyTrace.lean
nl -ba upstream/dec2flt/mod.rs | sed -n '209,255p'
nl -ba crate/dec2flt/mod.rs | sed -n '285,501p'
nl -ba upstream/dec2flt/parse.rs | sed -n '198,242p'
nl -ba crate/dec2flt/parse.rs | sed -n '240,284p'
nl -ba Tablet/num_imp_dec2flt_dec2flt_with_trace.lean | sed -n '36,194p'
nl -ba Tablet/num_imp_dec2flt_Dec2FltAssemblyTrace.lean | sed -n '25,52p'
Raw source observations:
upstream lines 212-225 convert the string to bytes, strip at most one leading
sign, reject an empty body, call parse_number first, and call parse_inf_nan
only after parse_number returns None.
upstream lines 227-232 overwrite Decimal.negative with the lexical sign and
return a Some result from try_fast_path directly.
upstream lines 238-249 call compute_float(exponent, mantissa), call
compute_float(exponent, mantissa + 1) exactly when many_digits and the first
biased exponent is nonnegative, set that exponent to -1 on disagreement, and
replace every negative-exponent current pair with parse_long_mantissa(body).
upstream lines 251-255 assemble the selected pair, negate only after
assembly when Decimal.negative is true, and return the resulting float.
upstream parse.rs lines 199-241 first reject every length other than three
or eight, normalize the candidate bytes with the ASCII case mask, and match
exactly INF, INFINITY, or NAN together with the corresponding length. The
two infinity branches select F::INFINITY, the NaN branch selects F::NAN, and
the final branch applies negation exactly when the separate negative argument
is true. Every other register-and-length pair returns None.
Raw adapted-source observations:
crate lines 361-419 record the exact sign-stripped body, lexical sign,
parse_number result, sign-overwritten fast-path input, fast-path result, and
direct special/native results without introducing a new conversion decision.
crate lines 421-448 record the first integer operands/result, the exact
many_digits-and-nondeferred second-call guard, the checked mantissa successor,
the second operands/result, equality result, and forced-deferral decision.
crate lines 449-472 record the post-comparison pair, the negative-exponent
slow guard, the slow replacement, selected pair, assembled word, assembly
result, lexical-sign branch, and final result.
crate lines 474-500 return the ordinary result paired with precisely those
already-computed observations. Lines 503-519 define public dec2flt as the
first projection of this single traced implementation.
crate parse.rs lines 241-283 retain that special parser unchanged: the same
length split, case mask, three constants and matches, rejection branch,
selected special value, and final sign branch appear at lines 249-283.
Raw extracted-model observations:
num_imp_dec2flt_dec2flt_with_trace.lean lines 36-77 retain the sign-removal,
empty/sign-only, parse_number, parse_inf_nan, invalid, and special branches.
Lines 78-115 retain the native call, first integer call, exact second-call
guard, checked U64 addition, second call, equality comparison, and exponent
-1 update. Lines 116-194 retain the slow replacement, Rust cast/shift/OR
assembled word, biased_fp_to_float call, optional negation, and every trace
field in both sign branches.
num_imp_dec2flt_Dec2FltAssemblyTrace.lean lines 31-52 list, in order, the
body and sign; parsed and fast-path values; first and second integer values;
comparison and deferral values; post-comparison, slow, and selected pairs;
and assembly, sign, and final-result values used by the paired contracts.
Assumptions / kernel axioms
- Classical.choice
- Quot.sound
- propext
conservative transitive union of saved axiom observations across node dependencies
Requirements depending on this item (2)
These requirements are linked to this item through the declared dependencies of their proofs.
Record details
| Record source | committed_node_kinds / pv_tablet.json |
|---|---|
| Kind | authored definition |
| Preservation assessment origin | VerifierPanel |
| Preservation fingerprint | preservation-v1:c9f8aca0e3445a9cde08e7c69fd6d0793647865ed7082e5f8309efe9da241175 |
| Preservation current fingerprint | preservation-v1:c9f8aca0e3445a9cde08e7c69fd6d0793647865ed7082e5f8309efe9da241175 |
| Preservation freshness | matches current fingerprint |
| Correspondence approved fingerprint | {"own_tex":"e68115f73014084240349f6f169b36d6714dcdf39ca9a3c88ee40d872b5c9ef2","lean_semantic_closure":"d4eb5352b7725cceff1c3b6c35e6c86577a48a192dbf6157c8c0c2ea03216891","lean_relevant_definition_descendants":{"DecimalGoalVocabulary":"93815606c510afb8f425bb3ef618e21f81033cc552e15695a4d443dbb7010103","DecimalGoalVocabularyDefault":"8e764be6667e1926143e8f2576a83acf0a0aa9a5aa790c9619858db50c026dc4","DecimalLexeme":"aeeeec41a307a5fb7e3916c9c4899c4077abccd652062c92a252fc65a8e7d7a6","F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2","SourceValidByteSlice":"d736148659be38528d8040160c92286f94c9e3a163bf026d5bef1af084b422bd"},"lean_relevant_dependencies":["DecimalGoalVocabulary","DecimalGoalVocabularyDefault","DecimalLexeme","F64","SourceValidByteSlice","num_imp_dec2flt_common_BiasedFp","num_imp_dec2flt_decimal_Decimal"],"preamble_tex":""} |
| Correspondence current fingerprint | {"own_tex":"e68115f73014084240349f6f169b36d6714dcdf39ca9a3c88ee40d872b5c9ef2","lean_semantic_closure":"d4eb5352b7725cceff1c3b6c35e6c86577a48a192dbf6157c8c0c2ea03216891","lean_relevant_definition_descendants":{"DecimalGoalVocabulary":"93815606c510afb8f425bb3ef618e21f81033cc552e15695a4d443dbb7010103","DecimalGoalVocabularyDefault":"8e764be6667e1926143e8f2576a83acf0a0aa9a5aa790c9619858db50c026dc4","DecimalLexeme":"aeeeec41a307a5fb7e3916c9c4899c4077abccd652062c92a252fc65a8e7d7a6","F64":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2","SourceValidByteSlice":"d736148659be38528d8040160c92286f94c9e3a163bf026d5bef1af084b422bd"},"lean_relevant_dependencies":["DecimalGoalVocabulary","DecimalGoalVocabularyDefault","DecimalLexeme","F64","SourceValidByteSlice","num_imp_dec2flt_common_BiasedFp","num_imp_dec2flt_decimal_Decimal"],"preamble_tex":""} |
| Correspondence freshness | matches current fingerprint |
Exact preservation assessment
{
"status": "VerifierPass",
"origin": "VerifierPanel",
"fingerprints": {
"own_tex_hash": "b91e3fd616edad7aac27c97eb75629ca6349572411576bc10cd2aef5865ee096",
"dep_statement_hashes": {
"DecimalGoalVocabularyDefault": "d4b3da7e2387e8a515bfcb54efc73f6f4ad498278c6384f4efd04d25991f016b",
"SourceValidByteSlice": "52522ae5b8602c6279dde2af31f94e21db249400641f5d3e951f68a74c3c11e2"
},
"combined_sound_fp": "preservation-v1:c9f8aca0e3445a9cde08e7c69fd6d0793647865ed7082e5f8309efe9da241175"
},
"lane_votes": {
"v1": "Pass"
},
"reviewer_action_id": null
}Captured evidence identities
[
{
"path": "reference/model-evidence/dispatch-contracts.txt",
"sha256": "befe64d1d793743f915f77fbfdabe8b5a9bc2540874c6a805940dc58d18868fa",
"cited_by": [
"Tablet/DispatchContracts.tex",
"committed_node_kinds / pv_tablet.json"
]
}
]F64
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: F64]
abbrev F64 : Type :=
-- BODY
Std.U64
end dec2flt_model
Why this model is faithful
Definition
Preservation argument
Claim
f64 by its complete to_bits word loses
no source encoding or public bit-level observation: on the full 64-bit domain,
including every NaN encoding, from_bits interprets every carrier word
and is inverse to to_bits at the level of raw encodings.Proof
f64 specialization sets Int = u64; its
to_bits method calls f64::to_bits, and its
from_u64_bits method passes the complete u64 to
f64::from_bits. Rust implements those two operations as the opposite
same-size transmutations and explicitly specifies exact-bit preservation,
including NaN payloads. The exact excerpts, hashes, tool identities, and
reproduction commands are recorded in
reference/model-evidence/float-carriers.txt.f64 with raw memory
word w. Transmutation by to_bits returns that same w, and
transmutation of w by from_bits creates an f64 with the
same raw memory word. Thus
from_bits(to_bits(x)) has exactly the encoding of x; this is a
bitwise statement and does not incorrectly use Rust floating-point equality on
NaNs. For the other direction, take any of the 2^{64} words w.
from_bits(w) creates the float encoding w, so applying
to_bits returns exactly w. This includes all words with an
all-ones exponent and nonzero fraction, regardless of sign, quiet/signaling
bit, or payload.Std.U64 a structure with one
BitVec 64 field, and every such bit vector is admitted. Therefore the
model carrier contains exactly the words in the two inverse arguments. The
carrier correspondence retains every raw encoding; meanings of classification
and operations on those words are supplied by their separate bindings.Authored arguments for individual requirements
Requirement: parser totality
Requirement: parser numeric acceptance
Ok is unchanged, and any float inside such a result has exactly one retained raw word.Requirement: parser invalid rejection
Err is unchanged; an error contains no float to which this carrier choice could apply.Requirement: parser nan acceptance
Requirement: parser infinity
Requirement: parser non nan results
Requirement: parser numeric sign
Requirement: parser signed zero
Requirement: parser exact rounding
Requirement: parser selected exponent
Requirement: parser selected magnitude sign
Requirement: dispatch abstract composition
Requirement: dispatch component compliance
Requirement: parser accumulated rounding
Requirement: parser equal target rounding
Requirement: number helper acceptance
Requirement: number helper rejection
Requirement: number helper record bounds
negative, mantissa, and other fields are distinct source observations and do not use this float carrier.Requirement: number helper accumulated value
Requirement: special helper infinity
Requirement: special helper nan
Requirement: special helper rejection
None result contains no float, and the input bytes and separate sign argument are unchanged by this carrier choice.Requirement: native correct or defer
Some float are retained as words under DecimalGoalVocabularyDefault.Requirement: integer correct or defer
Requirement: slow accumulated rounding
Requirement: assembly correspondence
Requirement: classification totality
Requirement: classification determinism
Requirement: classification significand digit
Requirement: rounding totality
Requirement: rounding determinism
Requirement: exponent value agreement
Recorded review
| Correspondence | Pass |
|---|---|
| Preservation | VerifierFail |
F64 · Lean checked
Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
reference/model-evidence/float-carriers.txt
Primary evidence for the F64 raw-word carrier
Scope
-----
This record supports only the representation claim that the source f64
specialization and the authored F64 carrier have the same set of 64-bit
encodings. It does not supply arithmetic or classification semantics.
All commands below were run from:
/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001
Tool and input identities
-------------------------
Command:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc --version --verbose
Raw result:
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
Command:
/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin/lean --version
Raw result:
Lean (version 4.30.0-rc2, x86_64-unknown-linux-gnu, commit 3dc1a088b6d2d8eafe25a7cd7ec7b58d731bd7cc, Release)
Command:
git -C /home/leanagent/pv_spike/tools/aeneas rev-parse HEAD
Raw result:
fa699427cdfa8f604b891fb0223ef42883dd7dc4
Command:
git -C /home/leanagent/pv_spike/tools/aeneas status --short
Raw result: empty (the pinned Aeneas checkout was clean).
Command:
sha256sum upstream/traits.rs modeling-input/manifest.json \
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/f64.rs \
/home/leanagent/pv_spike/tools/aeneas/backends/lean/Aeneas/Std/Scalar/Core.lean
Raw result:
66a02c44d72dfcc3ddae7e34a290e390dabaf98c5911b283d2d97f2f0075a44e upstream/traits.rs
2fc182c0c7acccad30c449ca349b999759b84e8ed4ec9d590e8295e43eeec077 modeling-input/manifest.json
84540a6a59e347c63caabe12cf895ba1239c76a50682471567007138fac1c618 /home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/f64.rs
a1c26c125a59bba635a2b2c170186ce07168c43308bcf386d508ebd77f01520e /home/leanagent/pv_spike/tools/aeneas/backends/lean/Aeneas/Std/Scalar/Core.lean
The manifest's effective_tools entry selects the rustc and Lean paths above,
and its effective_tools.lean_paths begins with the displayed Aeneas checkout.
Frozen f64 specialization
-------------------------
Command:
nl -ba upstream/traits.rs | sed -n '264,295p'
Raw result:
264 impl Float for f64 {
265 type Int = u64;
266
267 const INFINITY: Self = Self::INFINITY;
268 const NEG_INFINITY: Self = Self::NEG_INFINITY;
269 const NAN: Self = Self::NAN;
270 const NEG_NAN: Self = -Self::NAN;
271
272 const BITS: u32 = 64;
273 const SIG_TOTAL_BITS: u32 = Self::MANTISSA_DIGITS;
274 const EXP_MASK: Self::Int = Self::EXPONENT_MASK;
275 const SIG_MASK: Self::Int = Self::MANTISSA_MASK;
276
277 const MIN_EXPONENT_ROUND_TO_EVEN: i32 = -4;
278 const MAX_EXPONENT_ROUND_TO_EVEN: i32 = 23;
279 const SMALLEST_POWER_OF_TEN: i32 = -342;
280
281 fn to_bits(self) -> Self::Int {
282 self.to_bits()
283 }
284
285 fn classify(self) -> FpCategory {
286 self.classify()
287 }
288 }
289
290 impl FloatExt for f64 {
291 #[inline]
292 fn from_u64_bits(v: u64) -> Self {
293 f64::from_bits(v)
294 }
295 }
Thus the exact specialization boundary uses u64 in both directions: its
observation calls f64::to_bits, and its constructor calls f64::from_bits with
the complete u64, without a mask or numeric cast.
Pinned Rust exact-bit operations
--------------------------------
The source path was obtained with this command:
printf '%s/lib/rustlib/src/rust/library/core/src/num/f64.rs\n' \
"$(/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc --print sysroot)"
Raw result:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/f64.rs
Command (with F equal to that raw result):
nl -ba "$F" | sed -n '1201,1273p'
Raw result:
1201 /// Raw transmutation to `u64`.
1202 ///
1203 /// This is currently identical to `transmute::<f64, u64>(self)` on all platforms.
1204 ///
1205 /// See [`from_bits`](Self::from_bits) for some discussion of the
1206 /// portability of this operation (there are almost no issues).
1207 ///
1208 /// Note that this function is distinct from `as` casting, which attempts to
1209 /// preserve the *numeric* value, and not the bitwise value.
1210 ///
1211 /// # Examples
1212 ///
1213 /// ```
1214 /// assert!((1f64).to_bits() != 1f64 as u64); // to_bits() is not casting!
1215 /// assert_eq!((12.5f64).to_bits(), 0x4029000000000000);
1216 /// ```
1217 #[must_use = "this returns the result of the operation, \
1218 without modifying the original"]
1219 #[stable(feature = "float_bits_conv", since = "1.20.0")]
1220 #[rustc_const_stable(feature = "const_float_bits_conv", since = "1.83.0")]
1221 #[allow(unnecessary_transmutes)]
1222 #[inline]
1223 pub const fn to_bits(self) -> u64 {
1224 // SAFETY: `u64` is a plain old datatype so we can always transmute to it.
1225 unsafe { mem::transmute(self) }
1226 }
1227
1228 /// Raw transmutation from `u64`.
1229 ///
1230 /// This is currently identical to `transmute::<u64, f64>(v)` on all platforms.
1231 /// It turns out this is incredibly portable, for two reasons:
1232 ///
1233 /// * Floats and Ints have the same endianness on all supported platforms.
1234 /// * IEEE 754 very precisely specifies the bit layout of floats.
1235 ///
1236 /// However there is one caveat: prior to the 2008 version of IEEE 754, how
1237 /// to interpret the NaN signaling bit wasn't actually specified. Most platforms
1238 /// (notably x86 and ARM) picked the interpretation that was ultimately
1239 /// standardized in 2008, but some didn't (notably MIPS). As a result, all
1240 /// signaling NaNs on MIPS are quiet NaNs on x86, and vice-versa.
1241 ///
1242 /// Rather than trying to preserve signaling-ness cross-platform, this
1243 /// implementation favors preserving the exact bits. This means that
1244 /// any payloads encoded in NaNs will be preserved even if the result of
1245 /// this method is sent over the network from an x86 machine to a MIPS one.
1246 ///
1247 /// If the results of this method are only manipulated by the same
1248 /// architecture that produced them, then there is no portability concern.
1249 ///
1250 /// If the input isn't NaN, then there is no portability concern.
1251 ///
1252 /// If you don't care about signaling-ness (very likely), then there is no
1253 /// portability concern.
1254 ///
1255 /// Note that this function is distinct from `as` casting, which attempts to
1256 /// preserve the *numeric* value, and not the bitwise value.
1257 ///
1258 /// # Examples
1259 ///
1260 /// ```
1261 /// let v = f64::from_bits(0x4029000000000000);
1262 /// assert_eq!(v, 12.5);
1263 /// ```
1264 #[stable(feature = "float_bits_conv", since = "1.20.0")]
1265 #[rustc_const_stable(feature = "const_float_bits_conv", since = "1.83.0")]
1266 #[must_use]
1267 #[inline]
1268 #[allow(unnecessary_transmutes)]
1269 pub const fn from_bits(v: u64) -> Self {
1270 // It turns out the safety issues with sNaN were overblown! Hooray!
1271 // SAFETY: `u64` is a plain old datatype so we can always transmute from it.
1272 unsafe { mem::transmute(v) }
1273 }
These are opposite same-size transmutations, and the source explicitly chooses
exact bit preservation for NaNs, including their payloads.
Pinned Aeneas 64-bit carrier
----------------------------
Command:
nl -ba /home/leanagent/pv_spike/tools/aeneas/backends/lean/Aeneas/Std/Scalar/Core.lean \
| sed -n '27,34p;45,53p;65,69p;650,656p;1089,1094p'
Raw result:
27 /-- Kinds of unsigned integers -/
28 inductive UScalarTy where
29 | Usize
30 | U8
31 | U16
32 | U32
33 | U64
34 | U128
45 @[implicit_reducible]
46 def UScalarTy.numBits (ty : UScalarTy) : Nat :=
47 match ty with
48 | Usize => System.Platform.numBits
49 | U8 => 8
50 | U16 => 16
51 | U32 => 32
52 | U64 => 64
53 | U128 => 128
65 /-- Unsigned integer -/
66 structure UScalar (ty : UScalarTy) where
67 /- The internal representation is a bit-vector -/
68 bv : BitVec ty.numBits
69 deriving Repr, BEq, DecidableEq
650 /-! The scalar types. -/
651 abbrev Usize := UScalar .Usize
652 abbrev U8 := UScalar .U8
653 abbrev U16 := UScalar .U16
654 abbrev U32 := UScalar .U32
655 abbrev U64 := UScalar .U64
656 abbrev U128 := UScalar .U128
1089 abbrev U8.bv (x : U8) : BitVec 8 := UScalar.bv x
1090 abbrev U16.bv (x : U16) : BitVec 16 := UScalar.bv x
1091 abbrev U32.bv (x : U32) : BitVec 32 := UScalar.bv x
1092 abbrev U64.bv (x : U64) : BitVec 64 := UScalar.bv x
1093 abbrev U128.bv (x : U128) : BitVec 128 := UScalar.bv x
1094 abbrev Usize.bv (x : Usize) : BitVec System.Platform.numBits := UScalar.bv x
Consequently Std.U64 is a one-field structure whose field ranges over every
BitVec 64. There is neither a validity predicate nor a quotient that could
remove, merge, or add raw words.
Requirements depending on this item (32)
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
All 32 entries
- Assembly correspondence
- Classification determinism
- Significand digit
- Classification totality
- Abstract composition
- Component compliance
- Exponent agreement
- Correctness or defer
- Native correctness or defer
- Numeric acceptance
- Accumulated-value diagnostic
- Record bounds
- Invalid rejection
- Accumulated-value diagnostic
- Equal-target bridge
- Exact rounding
- Infinity
- Invalid rejection
- NaN acceptance
- No spurious NaNs
- Numeric acceptance
- Numeric sign
- Selected exponent range
- Selected magnitude sign
- Signed zero
- Totality
- Rounding determinism
- Rounding totality
- Full-significand diagnostic
- Infinity
- NaN
- Rejection
These requirements are linked to this item through the declared dependencies of their proofs.
Record details
| Record source | committed_node_kinds / pv_tablet.json |
|---|---|
| Kind | authored definition |
| Preservation assessment origin | VerifierPanel |
| Preservation fingerprint | preservation-v1:5f56f59747e7aed289df753cd667f0ad084251727b39a6a3cd7c1b8cbf83f5f0 |
| Preservation current fingerprint | preservation-v1:5f56f59747e7aed289df753cd667f0ad084251727b39a6a3cd7c1b8cbf83f5f0 |
| Preservation freshness | matches current fingerprint |
| Correspondence approved fingerprint | {"own_tex":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2","lean_semantic_closure":"e635794078f5dc661ee0333607027ee168a5c0cdc88af5c09543d1d251ae951a","preamble_tex":""} |
| Correspondence current fingerprint | {"own_tex":"cc96d5e66f40c1a2965cffa0288f89c7ca9ce356f1258ceee4a0bdf883a2f6c2","lean_semantic_closure":"e635794078f5dc661ee0333607027ee168a5c0cdc88af5c09543d1d251ae951a","preamble_tex":""} |
| Correspondence freshness | matches current fingerprint |
Exact preservation assessment
{
"status": "VerifierFail",
"origin": "VerifierPanel",
"fingerprints": {
"own_tex_hash": "a0c3a67537700eef5bbcc44be94f9dff333ad831f7e515069805d7fcde31e2a9",
"dep_statement_hashes": {
"DecimalGoalVocabularyDefault": "d4b3da7e2387e8a515bfcb54efc73f6f4ad498278c6384f4efd04d25991f016b",
"ModelF64Classify": "57e5044aada78df18405225dc7fcbb022cd92439cb2cd0ec3f1f04a03eba9c48"
},
"combined_sound_fp": "preservation-v1:5f56f59747e7aed289df753cd667f0ad084251727b39a6a3cd7c1b8cbf83f5f0"
},
"lane_votes": {
"v1": "Fail"
},
"reviewer_action_id": null
}Captured evidence identities
[
{
"path": "reference/model-evidence/float-carriers.txt",
"sha256": "52008bf87912605e4a627f9846bd106465d79042eb794bef750d9e4d19bba071",
"cited_by": [
"Tablet/F64.tex",
"committed_node_kinds / pv_tablet.json"
]
}
]SourceValidByteSlice
Lean definition
Trellis authored this Lean model for an operation outside the mechanical extraction. Modeling choices explains its behavior and review.
import Aeneas
import Tablet.Preamble
open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false
namespace dec2flt_model
-- [TABLET NODE: SourceValidByteSlice]
def SourceValidByteSlice (s : Slice Std.U8) : Prop :=
-- BODY
s.val.length <= 9223372036854775807
end dec2flt_model
Why this model is faithful
Definition
Preservation argument
Claim
x86_64-unknown-linux-gnu source domain,
SourceValidByteSlice is exactly the length condition on a Rust
&[u8] represented by an Aeneas byte slice: the represented byte count
is at most isize::MAX; byte contents are unrestricted.Proof
Slice Std.U8 exposes its represented elements as
s.val, so s.val.length is its byte count. The pinned
toolchain reports a 64-bit pointer width, isize::MAX equal to
9223372036854775807, and one-byte u8 elements. Its core slice
source records that a slice occupies at most isize::MAX bytes.
These commands, raw results, and source locations are recorded in
reference/model-evidence/source-valid-byte-slice.txt. Thus the
Lean inequality is precisely the configured source length bound. Since the
definition inspects only length, it adds neither a byte-value condition nor
the UTF-8 invariant that belongs specifically to Rust strings.Authored arguments for individual requirements
Requirement: parser totality
Requirement: parser numeric acceptance
as_bytes is called; numeric grammar remains a separate premise.Requirement: parser invalid rejection
Requirement: parser nan acceptance
Requirement: parser infinity
Requirement: parser non nan results
Requirement: parser numeric sign
Requirement: parser signed zero
Requirement: parser exact rounding
Requirement: parser selected exponent
Requirement: parser selected magnitude sign
Requirement: dispatch abstract composition
Requirement: dispatch component compliance
Requirement: parser accumulated rounding
Requirement: parser equal target rounding
Requirement: number helper acceptance
Requirement: number helper rejection
Requirement: number helper record bounds
Requirement: number helper accumulated value
Requirement: special helper infinity
Requirement: special helper nan
Requirement: special helper rejection
Requirement: native correct or defer
Decimal records rather than slices, so the predicate is noninterfering.Requirement: integer correct or defer
Requirement: slow accumulated rounding
Requirement: assembly correspondence
Requirement: classification totality
Requirement: classification determinism
Requirement: classification significand digit
Requirement: rounding totality
Requirement: rounding determinism
Requirement: exponent value agreement
Recorded review
| Correspondence | Pass |
|---|
SourceValidByteSlice · Lean checked
Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
reference/model-evidence/source-valid-byte-slice.txt
Source-valid byte-slice domain evidence
Pinned toolchain commands, run from the repository root:
rustc --version --verbose
rustc --print cfg | rg 'target_(arch|pointer_width)'
rustc .trellis/scratch/source_valid_slice_probe.rs -o /tmp/source_valid_slice_probe
/tmp/source_valid_slice_probe
Raw configuration and probe output:
rustc 1.98.0-nightly (14210df0e 2026-05-31)
host: x86_64-unknown-linux-gnu
target_arch="x86_64"
target_pointer_width="64"
arch=x86_64
usize_bits=64
isize_max=9223372036854775807
u8_size=1
Pinned core-library source:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:801
states that a slice is never larger than isize::MAX bytes.
The same toolchain's core/src/num/int_macros.rs:47 defines a signed
integer's MAX as the corresponding unsigned MAX shifted right by one.
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/mod.rs:507-510
requires the contents of a str to remain valid UTF-8 and states that using a
str whose contents are not valid UTF-8 is undefined behavior.
Consequently, on the configured 64-bit target a &[u8] has at most
9223372036854775807 elements. This is a byte-count condition only: &[u8]
does not impose UTF-8 validity or restrict the values of its u8 elements.
A Rust str has the same inherent byte-length bound and additionally consists
of valid UTF-8 bytes.
Assumptions / kernel axioms
- propext
conservative transitive union of saved axiom observations across node dependencies
Requirements depending on this item (8)
- Abstract composition
- Component compliance
- Numeric acceptance
- Accumulated-value diagnostic
- Record bounds
- Invalid rejection
All 8 entries
These requirements are linked to this item through the declared dependencies of their proofs.
Record details
| Record source | committed_node_kinds / pv_tablet.json |
|---|---|
| Kind | authored definition |
| Correspondence approved fingerprint | {"own_tex":"d736148659be38528d8040160c92286f94c9e3a163bf026d5bef1af084b422bd","lean_semantic_closure":"97e2005f894731188b78bd906f4df6b86ad4a847c9c485370529868a68c963f7","preamble_tex":""} |
| Correspondence current fingerprint | {"own_tex":"d736148659be38528d8040160c92286f94c9e3a163bf026d5bef1af084b422bd","lean_semantic_closure":"97e2005f894731188b78bd906f4df6b86ad4a847c9c485370529868a68c963f7","preamble_tex":""} |
| Correspondence freshness | matches current fingerprint |
Captured evidence identities
[
{
"path": "reference/model-evidence/source-valid-byte-slice.txt",
"sha256": "e7887429c66a303cbba3b4df30080ddd9ba4d54e24f25f74947deb228b32b04f",
"cited_by": [
"Tablet/SourceValidByteSlice.tex",
"committed_node_kinds / pv_tablet.json"
]
}
]Source adaptations (8)
source adaptation audit
Historical preparation document: preparation source-adaptation audit. It describes the state and obligations at preparation. This generation is captured in Modeling. Later closure and review results appear in the proof and modeling views. This original document remains available as history.
Shared extraction-boundary explanation (Preamble)
Preservation argument
Claim
x86_64-unknown-linux-gnu, the library's empty default feature set
(so optimize_for_size is disabled), the unoptimized development
profile, enabled debug assertions and integer overflow checks, and the target's
SSE2 precision-setting branch. Interpret each of the frozen extraction's 24
external operations by the separately justified model-support definition that
owns that operation. Under those interpretations, the composed Aeneas model
represents the supplied source's f64 specialization on all of these
domains, without a correctness premise: every Rust str whose bytes
are valid UTF-8 and whose 64-bit slice length is at most
\mathtt{isize::MAX}=2^{63}-1; every Rust &[u8] whose length is at
most that bound, with arbitrary byte contents; every Decimal; every
i64/u64 pair; and every BiasedFp.dec2flt::<f64> the relation preserves panic versus normal return,
the outer returned Result's Ok/Err discriminant,
and, on success, the exact binary64 word and its NaN classification. For
parse_number it preserves panic versus normal return, the
Option discriminant, and all four returned Decimal fields.
For parse_inf_nan::<f64> and
Decimal::try_fast_path::<f64> it preserves panic versus normal
return, None versus Some, and every returned word and NaN
classification. For compute_float::<f64> and
parse_long_mantissa::<f64> it preserves panic versus normal return
and both fields of every returned BiasedFp. For
biased_fp_to_float::<f64> it preserves panic versus normal return
and the exact returned word, with no restriction on the pair fields.dec2flt_with_trace::<f64> it additionally preserves the public
result and the complete trace: its control-flow variant; sign-stripped body and
lexical sign; numeric and special helper results; signed native input and
native result; first integer operands and result; second-call guard, optional
operands and result, comparison and forced-deferral fact; post-comparison pair;
slow-path guard and optional result; selected pair; assembled unsigned word;
pre-sign assembly result; sign-application fact; and final word. Public
dec2flt::<f64> is exactly the first projection of that interface, and
direct special and native returns select no raw pair.Proof
generated.lean, with SHA-256
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692.
The raw source has no placeholder. The compatibility check reports no
unapproved axiom and isolates exactly 24 external declarations; the complete
inventory equals the 24 entries of Tablet/model-support.json.
compose-native --check reports an unchanged composition and equal
expected and actual Preamble hashes. Thus all transparent extracted
declarations come from this one pinned source and every nontransparent
operation is explicit. The premise assigning each external its owning
definition deliberately leaves that definition's primitive-semantics proof to
its own preservation record; no primitive binding is re-proved here.fpu.rs, lemire.rs, and table.rs are
byte-identical. The standalone namespace and local error shell introduce no
call. The GOALs observe only panic versus normal return and the outer
Ok/Err discriminant, so the shell's private kind and
formatting are unobserved; no identity with an unpinned core error payload is
asserted. Visibility and removed Debug derives do not affect values.
The retained generic bodies use none of the removed trait operations;
the direct Mul, Div, and Neg clauses and calls are
the operations already implied by Lemire. Only the u64
integer instance and f64 Float, FloatExt, and
Lemire instances can participate in an f64 execution, so
disabling the u16/u32 and f16/f32
instances changes no such call.f64/u64 field widths and
masks; the fast-path bounds are the source formula results; and the match over
power-of-ten words has the same masked index and exact words as the source
array. The toolchain-specific words, masks, classifications, casts, and
rounding behavior are independently pinned in
reference/model-evidence/binary64-boundary.txt. The frozen
from_u64 Rust body is the enabled assertion followed by the
u64 as f64 conversion. Because #[charon::opaque] applies to
the whole function, neither operation inside that body is transparent in the
extraction: the whole method is the single inventoried external. Its callers,
their guards, and the surrounding native computation remain transparent.
ModelF64FromU64 supplies exactly successful integer conversion for
v\leq2^{53} and assertion failure otherwise.split_first loops. Extracted helpers receive the same
slices and mutable values, visit bytes in the same forward or reverse order,
and retain every saturating, wrapping, and checked operation. Delayed returns
set a result flag, execute no intervening state update, leave the loop through
that flag, and immediately return the source value. In particular, casts and
length-derived additions on very large inputs keep their original panic or
normal behavior rather than acquiring a convenience size bound.None, overwrite only the parsed sign, try the enabled native
path, make the first integer call, and evaluate the checked
mantissa+1 and second call under exactly the source short-circuit
guard. Both force the same deferral on unequal pairs, call the slow helper on
the unchanged body exactly for a negative post-comparison exponent, assemble
the same selected pair, and apply the sign last. Every trace field is either
one of those already computed values or the same nonmutating cast/shift/OR word
used by assembly. Hence recording the trace and discarding it in the public
projection changes neither call order, guards, state, panic points, nor any
returned observation.isize::MAX, while a Rust string adds UTF-8 validity. Sub-slicing
preserves the length bound and need not preserve an independent string type.
These facts establish all domains and observations in the claim independently
of the truth or falsity of any GOAL.Recorded review
| Preservation | accept |
|---|
Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
extraction-evidence/COMMAND.json
{"declaration_reader_sha256":"76f60cf0b867fad9727d2256d32b306c8cba3725216a4225d0f83add77fd6158","extraction_provenance":{"extraction_toolchain":{"aeneas":"fa699427","aeneas_revision":"fa699427cdfa8f604b891fb0223ef42883dd7dc4","cargo_features":[{"features":["default"],"name":"dec2flt-model","source":"workspace:Cargo.toml","version":"0.1.0"}],"cargo_lock_sha256":"bc644c624ded89197356bbd65d995054b7fb08e5bdfbaa38c6e7c7a53772cecf","cfg":["debug_assertions","emscripten_wasm_eh","feature=\"default\"","fmt_debug=\"full\"","overflow_checks","panic=\"unwind\"","relocation_model=\"pic\"","target_abi=\"\"","target_arch=\"x86_64\"","target_endian=\"little\"","target_env=\"gnu\"","target_family=\"unix\"","target_feature=\"fxsr\"","target_feature=\"sse\"","target_feature=\"sse2\"","target_feature=\"x87\"","target_has_atomic","target_has_atomic=\"16\"","target_has_atomic=\"32\"","target_has_atomic=\"64\"","target_has_atomic=\"8\"","target_has_atomic=\"ptr\"","target_has_atomic_load_store","target_has_atomic_load_store=\"16\"","target_has_atomic_load_store=\"32\"","target_has_atomic_load_store=\"64\"","target_has_atomic_load_store=\"8\"","target_has_atomic_load_store=\"ptr\"","target_has_atomic_primitive_alignment=\"16\"","target_has_atomic_primitive_alignment=\"32\"","target_has_atomic_primitive_alignment=\"64\"","target_has_atomic_primitive_alignment=\"8\"","target_has_atomic_primitive_alignment=\"ptr\"","target_has_reliable_f128","target_has_reliable_f16","target_has_reliable_f16_math","target_object_format=\"elf\"","target_os=\"linux\"","target_pointer_width=\"64\"","target_thread_local","target_vendor=\"unknown\"","ub_checks","unix"],"charon":"0.1.216","charon_revision":"6f058254eb741c12e9b388df07adaf7cc8aac8ed","extraction_profile":"dev","lean":"4.30.0-rc2","overflow_checks":true,"panic_strategy":"unwind","rustc_vv":"rustc 1.98.0-nightly (14210df0e 2026-05-31)\nbinary: rustc\ncommit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65\ncommit-date: 2026-05-31\nhost: x86_64-unknown-linux-gnu\nrelease: 1.98.0-nightly\nLLVM version: 22.1.6\n","target_pointer_width":64,"target_triple":"x86_64-unknown-linux-gnu"},"extractor_stack":["charon@0.1.216","aeneas@fa699427"],"extractor_toolchain_sha256":"18657da0659dee7889ed8a937b136c9abbc3a35e9050241cd8201c94fd232323","not_recorded":[],"source_digests":[{"source_file":"lib.rs","source_sha256":"b5ecf4d7e9dfa0337f1586ae0e865fbbe2dd384137ee6e2ad635f0d5d6e916a9"}]},"extractor_script_path":"/home/leanagent/pv_runs/trellis-native-implementation-v85/scripts/extract_pv_model.py","extractor_script_sha256":"cc1fdd50a78185c7bb564b715c554cb35d9fc09ed566b6c3d4f482f2d27ef67d","kernel_gate_checkers":[],"log_concatenation_order":"runs_then_steps_in_array_order","runs":[{"run_role":"primary","steps":[{"argv":["/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","-vV"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"rustc-version","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"},{"argv":["/home/leanagent/pv_spike/tools/charon/bin/charon","cargo","--preset=aeneas","--dest-file","/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/m.llbc","--","--offline","--profile","dev","--target","x86_64-unknown-linux-gnu"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_BUILD_TARGET":"x86_64-unknown-linux-gnu","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"charon","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"},{"argv":["/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/cargo","metadata","--format-version=1","--locked","--offline","--filter-platform","x86_64-unknown-linux-gnu"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_BUILD_TARGET":"x86_64-unknown-linux-gnu","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"cargo-metadata","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"},{"argv":["/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/cargo","rustc","--lib","--locked","--offline","--profile","dev","--target","x86_64-unknown-linux-gnu","--","--print","cfg"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_BUILD_TARGET":"x86_64-unknown-linux-gnu","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"cargo-rustc-cfg","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"},{"argv":["/home/leanagent/pv_spike/tools/aeneas/bin/aeneas","-backend","lean","-dest","/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen","-emit-json","/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/m.llbc"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_BUILD_TARGET":"x86_64-unknown-linux-gnu","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"aeneas","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"}]}],"schema":"trellis-extraction-command/v1","tool_source_checkouts":[]}extraction-evidence/DETERMINISM.json
{"comparison":"generated_lean_and_complete_tablet_tree_byte_identity","generated_lean_byte_identical":false,"generated_lean_sha256":["49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692"],"kernel_filespec_gate":"not_run","kernel_prescribed_region_gate":"not_run","namespace_context_roundtrip_gate":"not_run","result_sha256":"62a89492b5592f404e065d2f8c9a89fd3f83cc59b772fed0eaa475138211d641","run_roles":["primary"],"schema":"trellis-extraction-determinism/v2","status":"not_run","tablet_root_sha256":["57e6ec9f6e8b1d9d78ab01504bad58f93cb43308edf77f73f86b986b8d07b809"],"tablet_tree_byte_identical":false}extraction-evidence/RESULT.json
{"command_sha256":"611f36cefb2d895e7b22bd15eaccc1bd57d1b539d54cbd6337e84d0573719a9e","runs":[{"generated_lean_sha256":"49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692","run_role":"primary","steps":[{"exit_status":0,"stderr_byte_length":0,"stderr_offset":0,"stderr_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","stdout_byte_length":212,"stdout_offset":0,"stdout_sha256":"e6ea0da4a3301256a0a0dc0d67d11acf4e83e0d1bff5dd987ccdaa43708714bc","tool":"rustc-version"},{"exit_status":0,"stderr_byte_length":654,"stderr_offset":0,"stderr_sha256":"263937c29ffcb9cf54e452b2d8b89e015a1fa1a5b2a2d237292d4350d0b04aed","stdout_byte_length":0,"stdout_offset":212,"stdout_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","tool":"charon"},{"exit_status":0,"stderr_byte_length":0,"stderr_offset":654,"stderr_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","stdout_byte_length":2897,"stdout_offset":212,"stdout_sha256":"ec87d2fc78972115c1b9e436f373a890f3847397a741d91d720dce4fb36c7a90","tool":"cargo-metadata"},{"exit_status":0,"stderr_byte_length":302,"stderr_offset":654,"stderr_sha256":"7025c1726c90c35a211042d6945c25ff6015acaca27ee97a063465221b792806","stdout_byte_length":1062,"stdout_offset":3109,"stdout_sha256":"4081a320e6292139b4a673d225682dc054b77cba113b8c8a8fbb0593f824b713","tool":"cargo-rustc-cfg"},{"exit_status":0,"stderr_byte_length":7084,"stderr_offset":956,"stderr_sha256":"5f41394d8b12a0d7a6c9e7115108a06b20599eb7ddd611cff4b90b31ba2fe26a","stdout_byte_length":933,"stdout_offset":4171,"stdout_sha256":"376c43fb83e40962a056e9198dba4afb0cf8ecb0238e76c78bd9dbc32fbced4a","tool":"aeneas"}],"tablet_root_sha256":"57e6ec9f6e8b1d9d78ab01504bad58f93cb43308edf77f73f86b986b8d07b809"}],"schema":"trellis-extraction-result/v2","stderr_byte_length":8040,"stderr_sha256":"ab4dc202d7a8a30a83ea62ed154710a48148d62230ff8b834700919d4e679c0c","stdout_byte_length":5104,"stdout_sha256":"604aae51d5c3394417224f655c7de355cc3e699d31fff49f93734706ad43f3f8"}extraction-evidence/STDERR.bin
Compiling dec2flt-model v0.1.0 (/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate)
warning: feature `f16` is declared but not used
--> lib.rs:2:46
|
2 | #![feature(cfg_target_has_reliable_f16_f128, f16, float_masks, register_tool, staged_api)]
| ^^^
|
= note: `#[warn(unused_features)]` (part of `#[warn(unused)]`) on by default
warning: `dec2flt-model` (lib) generated 1 warning
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.41s
Compiling dec2flt-model v0.1.0 (/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.02s
[?25lApplied prepasses: [------------------------------------------------] 0/203 ⠋
Applied prepasses: [------------------------------------------------] 1/203 ⠋
Applied prepasses: [#####-------------------------------------------] 24/203 ⠋
Applied prepasses: [########----------------------------------------] 38/203 ⠋
Applied prepasses: [##############################------------------] 128/203 ⠙
Applied prepasses: [################################################] 203/203 ✔️
[?25h[?25lTranslated globals: [-------------------------------------------------] 0/50 ⠋
Translated globals: [#################################################] 50/50 ✔️
[?25h[?25lTranslated opaque functions: [----------------------------------------] 0/87 ⠋
Translated opaque functions: [########################################] 87/87 ✔️
[?25h[?25lTranslated transparent functions: [---------------------------------] 0/107 ⠋
Translated transparent functions: [---------------------------------] 1/107 ⠋
Translated transparent functions: [###------------------------------] 10/107 ⠙
Translated transparent functions: [######---------------------------] 22/107 ⠹
Translated transparent functions: [##########-----------------------] 35/107 ⠹
Translated transparent functions: [##############-------------------] 47/107 ⠹
Translated transparent functions: [###############------------------] 51/107 ⠸
Translated transparent functions: [################-----------------] 55/107 ⠸
Translated transparent functions: [##################---------------] 60/107 ⠼
Translated transparent functions: [##################---------------] 61/107 ⠼
Translated transparent functions: [###################--------------] 64/107 ⠼
Translated transparent functions: [####################-------------] 68/107 ⠼
Translated transparent functions: [#####################------------] 69/107 ⠴
Translated transparent functions: [#####################------------] 70/107 ⠴
Translated transparent functions: [######################-----------] 72/107 ⠦
Translated transparent functions: [######################-----------] 73/107 ⠦
Translated transparent functions: [######################-----------] 74/107 ⠧
Translated transparent functions: [#######################----------] 77/107 ⠧
Translated transparent functions: [########################---------] 78/107 ⠧
Translated transparent functions: [########################---------] 80/107 ⠇
Translated transparent functions: [#########################--------] 83/107 ⠇
Translated transparent functions: [#########################--------] 84/107 ⠇
Translated transparent functions: [##########################-------] 85/107 ⠏
Translated transparent functions: [##########################-------] 86/107 ⠏
Translated transparent functions: [##########################-------] 87/107 ⠋
Translated transparent functions: [###########################------] 88/107 ⠋
Translated transparent functions: [###########################------] 90/107 ⠋
Translated transparent functions: [############################-----] 91/107 ⠙
Translated transparent functions: [############################-----] 92/107 ⠙
Translated transparent functions: [############################-----] 93/107 ⠙
Translated transparent functions: [#############################----] 95/107 ⠹
Translated transparent functions: [#############################----] 97/107 ⠹
Translated transparent functions: [##############################---] 98/107 ⠸
Translated transparent functions: [##############################---] 99/107 ⠼
Translated transparent functions: [###############################--] 101/107 ⠼
Translated transparent functions: [###############################--] 102/107 ⠴
Translated transparent functions: [###############################--] 103/107 ⠦
Translated transparent functions: [################################-] 104/107 ⠦
Translated transparent functions: [################################-] 105/107 ⠧
Translated transparent functions: [################################-] 106/107 ⠇
Translated transparent functions: [#################################] 107/107 ⠏
Translated transparent functions: [#################################] 107/107 ✔️
[?25h[?25lTranslated trait declarations: [--------------------------------------] 0/49 ⠋
Translated trait declarations: [########################--------------] 31/49 ✔️
[?25h[?25lTranslated trait impls: [---------------------------------------------] 0/85 ⠋
Translated trait impls: [#################################------------] 64/85 ✔️
[?25h[?25lPost-processed translated opaque functions: [-------------------------] 0/87 ⠋
Post-processed translated opaque functions: [-------------------------] 1/87 ⠙
Post-processed translated opaque functions: [#########################] 87/87 ✔️
[?25h[?25lPost-processed translated transparent functions: [------------------] 0/107 ⠋
Post-processed translated transparent functions: [------------------] 1/107 ⠋
Post-processed translated transparent functions: [#-----------------] 10/107 ⠙
Post-processed translated transparent functions: [##----------------] 13/107 ⠹
Post-processed translated transparent functions: [##----------------] 16/107 ⠸
Post-processed translated transparent functions: [##----------------] 17/107 ⠸
Post-processed translated transparent functions: [###---------------] 18/107 ⠼
Post-processed translated transparent functions: [###---------------] 22/107 ⠼
Post-processed translated transparent functions: [####--------------] 24/107 ⠼
Post-processed translated transparent functions: [####--------------] 29/107 ⠴
Post-processed translated transparent functions: [#####-------------] 31/107 ⠴
Post-processed translated transparent functions: [#####-------------] 33/107 ⠴
Post-processed translated transparent functions: [######------------] 39/107 ⠴
Post-processed translated transparent functions: [########----------] 48/107 ⠦
Post-processed translated transparent functions: [#########---------] 56/107 ⠦
Post-processed translated transparent functions: [##########--------] 62/107 ⠦
Post-processed translated transparent functions: [###############---] 94/107 ⠦
Post-processed translated transparent functions: [################--] 99/107 ⠧
Post-processed translated transparent functions: [################--] 100/107 ⠇
Post-processed translated transparent functions: [#################-] 102/107 ⠇
Post-processed translated transparent functions: [#################-] 104/107 ⠏
Post-processed translated transparent functions: [#################-] 105/107 ⠋
Post-processed translated transparent functions: [##################] 107/107 ⠙
Post-processed translated transparent functions: [##################] 107/107 ✔️
[?25hextraction-evidence/STDOUT.bin
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
{"packages":[{"name":"dec2flt-model","version":"0.1.0","id":"path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0","license":null,"license_file":null,"description":null,"source":null,"dependencies":[],"targets":[{"kind":["lib"],"crate_types":["lib"],"name":"dec2flt_model","src_path":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate/lib.rs","edition":"2024","doc":true,"doctest":true,"test":true}],"features":{"default":[],"optimize_for_size":[]},"manifest_path":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate/Cargo.toml","metadata":null,"publish":[],"authors":[],"categories":[],"keywords":[],"readme":null,"repository":null,"homepage":null,"documentation":null,"edition":"2024","links":null,"default_run":null,"rust_version":null}],"workspace_members":["path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0"],"workspace_default_members":["path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0"],"resolve":{"nodes":[{"id":"path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0","dependencies":[],"deps":[],"features":["default"]}],"root":"path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0"},"target_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","build_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","version":1,"workspace_root":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate","metadata":null}
debug_assertions
emscripten_wasm_eh
feature="default"
fmt_debug="full"
overflow_checks
panic="unwind"
relocation_model="pic"
target_abi=""
target_arch="x86_64"
target_endian="little"
target_env="gnu"
target_family="unix"
target_feature="fxsr"
target_feature="sse"
target_feature="sse2"
target_feature="x87"
target_has_atomic
target_has_atomic="16"
target_has_atomic="32"
target_has_atomic="64"
target_has_atomic="8"
target_has_atomic="ptr"
target_has_atomic_load_store
target_has_atomic_load_store="16"
target_has_atomic_load_store="32"
target_has_atomic_load_store="64"
target_has_atomic_load_store="8"
target_has_atomic_load_store="ptr"
target_has_atomic_primitive_alignment="16"
target_has_atomic_primitive_alignment="32"
target_has_atomic_primitive_alignment="64"
target_has_atomic_primitive_alignment="8"
target_has_atomic_primitive_alignment="ptr"
target_has_reliable_f128
target_has_reliable_f16
target_has_reliable_f16_math
target_object_format="elf"
target_os="linux"
target_pointer_width="64"
target_thread_local
target_vendor="unknown"
ub_checks
unix
[[92mInfo[39m ] Imported: /home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/m.llbc
[[92mInfo[39m ] Generated: /home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/M.lean
[[92mInfo[39m ] Generated: /home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/translation.json
[[93mWarn[39m ] The crate contains extracted external, unknown definitions: we advise using the option -split-files to allow manually providing these definitions in separate files.
[[92mInfo[39m ] Total execution time: 7.245881 seconds
reference/model-evidence/adaptation-constants-probe.rs
fn main() {
let largest_power_of_ten = (1024_f64 / std::f64::consts::LOG2_10) as i32;
let log2_5 = std::f64::consts::LOG2_10 - 1.0;
let max_exponent_fast_path = (53_f64 / log2_5) as i64;
let max_exponent_disguised =
max_exponent_fast_path + (53_f64 / std::f64::consts::LOG2_10) as i64;
println!("largest_power_of_ten={largest_power_of_ten}");
println!("max_exponent_fast_path={max_exponent_fast_path}");
println!("max_exponent_disguised={max_exponent_disguised}");
println!("neg_nan={:016x}", (-f64::NAN).to_bits());
for (exponent, value) in IntoIterator::into_iter([
1e0_f64, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11,
1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, 1e20, 1e21, 1e22,
])
.enumerate()
{
println!("pow10_{exponent}={:016x}", value.to_bits());
}
}
reference/model-evidence/binary64-boundary.txt
Primary evidence for the binary64 boundary
==========================================
Scope and identities
--------------------
This record concerns the frozen x86_64-unknown-linux-gnu extraction, the
adapted Rust crate retained in this repository, and the installed toolchain
named by modeling-input/SETUP.md. The probe source is retained at
reference/model-evidence/binary64-probe.rs; no scratch source is required to
reproduce it.
Toolchain executable:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
Target:
x86_64-unknown-linux-gnu
rustc executable SHA-256:
162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
Probe source SHA-256:
68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
Compiled probe SHA-256:
f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
Frozen generated.lean SHA-256:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692
Frozen modeling-input/manifest.json SHA-256:
2fc182c0c7acccad30c449ca349b999759b84e8ed4ec9d590e8295e43eeec077
Approved Binary64ModelDefault.lean SHA-256 at the time of this record:
03ae48fb631e6242bd21bf95d0481b66acae05f8cab343c7ab279b3c116538a3
Exact reproduction commands
---------------------------
Run from the repository root:
R=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
P=reference/model-evidence/binary64-probe.rs
B=.trellis/scratch/binary64-probe
"$R" --version --verbose
sha256sum "$R"
sha256sum "$P"
"$R" --target x86_64-unknown-linux-gnu -C opt-level=0 "$P" -o "$B"
sha256sum "$B"
"$B"
Raw output
----------
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
rustc_sha256=162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
probe_sha256=68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
binary_sha256=f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
target_arch=x86_64
mantissa_digits=53
exponent_mask=7ff0000000000000
mantissa_mask=000fffffffffffff
nan=7ff8000000000000
infinity=7ff0000000000000
neg_infinity=fff0000000000000
nan_category=Nan
infinity_category=Infinite
zero_category=Zero
subnormal_category=Subnormal
normal_category=Normal
from_bits_to_bits=7ff0000000000001
neg_payload_nan=fff0000000000001
neg_zero=8000000000000000
subnormal_tie_to_even_zero=0000000000000000
subnormal_tie_to_even_two=0000000000000002
normal_division=3fb999999999999a
mul_negative_zero=8000000000000000
div_negative_zero=8000000000000000
div_negative_infinity=fff0000000000000
mul_overflow=7ff0000000000000
mul_zero_infinity_is_nan=true
div_zero_zero_is_nan=true
mul_nan_is_nan=true
cast_2_pow_53=4340000000000000
cast_2_pow_53_plus_1=4340000000000000
Pinned Rust library sources
---------------------------
The installed sources below belong to the same named toolchain. Their
SHA-256 identities are:
core/src/primitive_docs.rs
c4b8627dd67d5dac8f383f383a9e7ff1229ea43e7599610fc61988694cf0f3e5
core/src/num/f64.rs
84540a6a59e347c63caabe12cf895ba1239c76a50682471567007138fac1c618
core/src/clone.rs
23f9cfc80347fde6b8457d46fbf7a2b8d9f34c8c58601b0b6f714ca2f6d1976b
The exact relevant text of core/src/primitive_docs.rs is:
#[rustc_doc_primitive = "f64"]
#[doc(alias = "double")]
/// A 64-bit floating-point type (specifically, the "binary64" type defined in IEEE 754-2008).
///
/// This type is very similar to [`prim@f32`], but has increased precision by using twice as many
/// bits. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on double-precision
/// values][wikipedia] for more information.
The referenced primitive-f32 documentation supplies the common primitive
floating-point operation rules quoted next:
/// - −0.0: IEEE 754 floating-point numbers have a bit that indicates their sign, so −0.0 is a
/// possible value. For comparison −0.0 = +0.0, but floating-point operations can carry
/// the sign bit through arithmetic operations. This means −0.0 × +0.0 produces −0.0 and
/// a negative number rounded to a value smaller than a float can represent also produces −0.0.
/// - [∞](#associatedconstant.INFINITY) and
/// [−∞](#associatedconstant.NEG_INFINITY): these result from calculations
/// like `1.0 / 0.0`.
///
/// When a primitive operation (addition, subtraction, multiplication, or
/// division) is performed on this type, the result is rounded according to the
/// roundTiesToEven direction defined in IEEE 754-2008. That means:
///
/// - The result is the representable value closest to the true value, if there
/// is a unique closest representable value.
/// - If the true value is exactly half-way between two representable values,
/// the result is the one with an even least-significant binary digit.
/// - If the true value's magnitude is ≥ `f32::MAX` + 2<sup>(`f32::MAX_EXP` −
/// `f32::MANTISSA_DIGITS` − 1)</sup>, the result is ∞ or −∞ (preserving the
/// true value's sign).
The same file explicitly separates arithmetic NaN choice from exact bitwise
operations; its exact relevant text is:
/// The rules for NaN values differ between *arithmetic* and *non-arithmetic* (or "bitwise")
/// operations. The non-arithmetic operations are unary `-`, `abs`, `copysign`, `signum`,
/// `{to,from}_bits`, `{to,from}_{be,le,ne}_bytes` and `is_sign_{positive,negative}`. These
/// operations are guaranteed to exactly preserve the bit pattern of their input except for possibly
/// changing the sign bit.
///
/// The following rules apply when a NaN value is returned from an arithmetic operation:
/// - The result has a non-deterministic sign.
/// - The quiet bit and payload are non-deterministically chosen from
/// the following set of options:
///
/// - **Preferred NaN**: The quiet bit is set and the payload is all-zero.
/// - **Quieting NaN propagation**: The quiet bit is set and the payload is copied from any input
/// operand that is a NaN. If the inputs and outputs do not have the same payload size (i.e., for
/// `as` casts), then
/// - If the output is smaller than the input, low-order bits of the payload get dropped.
/// - If the output is larger than the input, the payload gets filled up with 0s in the low-order
/// bits.
/// - **Unchanged NaN propagation**: The quiet bit and payload are copied from any input operand
/// that is a NaN. If the inputs and outputs do not have the same size (i.e., for `as` casts), the
/// same rules as for "quieting NaN propagation" apply, with one caveat: if the output is smaller
/// than the input, dropping the low-order bits may result in a payload of 0; a payload of 0 is not
/// possible with a signaling NaN (the all-0 significand encodes an infinity) so unchanged NaN
/// propagation cannot occur with some inputs.
/// - **Target-specific NaN**: The quiet bit is set and the payload is picked from a target-specific
/// set of "extra" possible NaN payloads. The set can depend on the input operand values.
/// See the table below for the concrete NaNs this set contains on various targets.
///
/// | `target_arch` | Extra payloads possible on this platform |
/// |---------------|------------------------------------------|
/// | `aarch64`, `arm`, `arm64ec`, `loongarch64`, `powerpc` (except when `target_abi = "spe"`), `powerpc64`, `riscv32`, `riscv64`, `s390x`, `x86`, `x86_64` | None |
Thus the model's preferred quiet NaN is one permitted result whenever
multiplication or division returns NaN. This does not claim that arbitrary
Rust arithmetic NaNs have those exact bits. By contrast, unary negation and
bit conversion must preserve all non-sign bits exactly, including for every
NaN payload.
The exact relevant declarations in core/src/num/f64.rs are:
pub const MANTISSA_DIGITS: u32 = 53;
pub const NAN: f64 = 0.0_f64 / 0.0_f64;
pub const INFINITY: f64 = 1.0_f64 / 0.0_f64;
pub const NEG_INFINITY: f64 = -1.0_f64 / 0.0_f64;
pub const SIGN_MASK: u64 = 0x8000_0000_0000_0000;
pub const EXPONENT_MASK: u64 = 0x7ff0_0000_0000_0000;
pub const MANTISSA_MASK: u64 = 0x000f_ffff_ffff_ffff;
pub const fn classify(self) -> FpCategory {
// We used to have complicated logic here that avoids the simple bit-based tests to work
// around buggy codegen for x87 targets (see
// https://github.com/rust-lang/rust/issues/114479). However, some LLVM versions later, none
// of our tests is able to find any difference between the complicated and the naive
// version, so now we are back to the naive version.
let b = self.to_bits();
match (b & Self::MANTISSA_MASK, b & Self::EXPONENT_MASK) {
(0, Self::EXPONENT_MASK) => FpCategory::Infinite,
(_, Self::EXPONENT_MASK) => FpCategory::Nan,
(0, 0) => FpCategory::Zero,
(_, 0) => FpCategory::Subnormal,
_ => FpCategory::Normal,
}
}
pub const fn to_bits(self) -> u64 {
// SAFETY: `u64` is a plain old datatype so we can always transmute to it.
unsafe { mem::transmute(self) }
}
pub const fn from_bits(v: u64) -> Self {
// It turns out the safety issues with sNaN were overblown! Hooray!
// SAFETY: `u64` is a plain old datatype so we can always transmute from it.
unsafe { mem::transmute(v) }
}
The exact scalar clone body in core/src/clone.rs is:
impl const Clone for $t {
#[inline(always)]
fn clone(&self) -> Self {
*self
}
}
Frozen adapted source
---------------------
The relevant retained source file hashes are:
crate/traits.rs
9013270fb846edcb0bdf2abd0353f575fdd727974cba9e89bdab8bb4c2b4f0bf
crate/dec2flt/mod.rs
b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012
crate/dec2flt/parse.rs
50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f
crate/dec2flt/decimal.rs
633658be803b7369b18feb098a8aa1b5f714a933d3b79ecbc4899a1b05f35beb
crate/dec2flt/lemire.rs
fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1
crate/dec2flt/slow.rs
93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485
Exact constant and bit-conversion excerpt from crate/traits.rs:
impl Float for f64 {
type Int = u64;
const INFINITY: Self = Self::INFINITY;
const NEG_INFINITY: Self = Self::NEG_INFINITY;
const NAN: Self = Self::NAN;
// Bit-identical to the upstream `-f64::NAN`, without the unsupported
// compile-time float negation.
const NEG_NAN: Self = f64::from_bits(0xFFF8_0000_0000_0000);
const BITS: u32 = 64;
const SIG_TOTAL_BITS: u32 = Self::MANTISSA_DIGITS;
const EXP_MASK: Self::Int = Self::EXPONENT_MASK;
const SIG_MASK: Self::Int = Self::MANTISSA_MASK;
fn to_bits(self) -> Self::Int {
self.to_bits()
}
fn classify(self) -> FpCategory {
self.classify()
}
}
impl FloatExt for f64 {
#[inline]
fn from_u64_bits(v: u64) -> Self {
f64::from_bits(v)
}
Exact derived-constant defaults from crate/traits.rs:
/// The number of bits in the significand, *excluding* the hidden bit.
const SIG_BITS: u32 = Self::SIG_TOTAL_BITS - 1;
/// Number of bits in the exponent.
const EXP_BITS: u32 = Self::BITS - Self::SIG_BITS - 1;
/// The saturated (maximum bitpattern) value of the exponent, i.e. the infinite
/// representation.
///
/// This shifted fully right, use `EXP_MASK` for the shifted value.
const EXP_SAT: u32 = (1 << Self::EXP_BITS) - 1;
/// Signed version of `EXP_SAT` since we convert a lot.
const INFINITE_POWER: i32 = Self::EXP_SAT as i32;
/// The exponent bias value. This is also the maximum value of the exponent.
const EXP_BIAS: u32 = Self::EXP_SAT >> 1;
/// Minimum exponent value of normal values.
const EXP_MIN: i32 = -(Self::EXP_BIAS as i32 - 1);
Together with the f64-instance lines `BITS = 64` and
`SIG_TOTAL_BITS = Self::MANTISSA_DIGITS` in the preceding excerpt, these
defaults derive SIG_BITS, EXP_MIN, and INFINITE_POWER from the primitive
mantissa-digit constant rather than introducing independent parameters.
Exact checked cast excerpt from crate/dec2flt/mod.rs:
#[inline]
// This method is precisely the source `u64 as f64` primitive conversion.
// Aeneas cannot translate that cast; opacity is confined to the cast while
// the fast-path algorithm, its range proof obligation, and all calls stay
// visible in the extracted model.
#[charon::opaque]
fn from_u64(v: u64) -> Self {
debug_assert!(v <= Self::MAX_MANTISSA_FAST_PATH);
v as _
}
Here MAX_MANTISSA_FAST_PATH is the retained default 1 << 53. Therefore the
source succeeds only through the modeled branch v <= 2^53 in this debug
configuration; above it the debug assertion fails before the cast. On the
successful branch every integer is exactly representable, so the source cast
and the model rounder return the same word.
Exact power-table and assembly excerpts from crate/dec2flt/mod.rs:
/// Maximum mantissa for the fast-path (`1 << 53` for f64).
const MAX_MANTISSA_FAST_PATH: u64 = 1 << Self::SIG_TOTAL_BITS;
const MAX_EXPONENT_FAST_PATH: i64 = 22;
const MIN_EXPONENT_FAST_PATH: i64 = -Self::MAX_EXPONENT_FAST_PATH;
const MAX_EXPONENT_DISGUISED_FAST_PATH: i64 = 37;
fn pow10_fast_path(exponent: usize) -> Self {
// These bit patterns are exactly the source table's rounded binary64
// literals. The match is the same masked lookup; it merely keeps float
// constants out of Aeneas's unsupported constant interpreter.
match exponent & 31 {
0 => f64::from_bits(0x3FF0_0000_0000_0000),
1 => f64::from_bits(0x4024_0000_0000_0000),
2 => f64::from_bits(0x4059_0000_0000_0000),
3 => f64::from_bits(0x408F_4000_0000_0000),
4 => f64::from_bits(0x40C3_8800_0000_0000),
5 => f64::from_bits(0x40F8_6A00_0000_0000),
6 => f64::from_bits(0x412E_8480_0000_0000),
7 => f64::from_bits(0x4163_12D0_0000_0000),
8 => f64::from_bits(0x4197_D784_0000_0000),
9 => f64::from_bits(0x41CD_CD65_0000_0000),
10 => f64::from_bits(0x4202_A05F_2000_0000),
11 => f64::from_bits(0x4237_4876_E800_0000),
12 => f64::from_bits(0x426D_1A94_A200_0000),
13 => f64::from_bits(0x42A2_309C_E540_0000),
14 => f64::from_bits(0x42D6_BCC4_1E90_0000),
15 => f64::from_bits(0x430C_6BF5_2634_0000),
16 => f64::from_bits(0x4341_C379_37E0_8000),
17 => f64::from_bits(0x4376_3457_85D8_A000),
18 => f64::from_bits(0x43AB_C16D_674E_C800),
19 => f64::from_bits(0x43E1_58E4_6091_3D00),
20 => f64::from_bits(0x4415_AF1D_78B5_8C40),
21 => f64::from_bits(0x444B_1AE4_D6E2_EF50),
22 => f64::from_bits(0x4480_F0CF_064D_D592),
_ => f64::from_bits(0),
}
}
fn biased_fp_to_float<F: FloatExt>(x: BiasedFp) -> F {
let mut word = x.m;
word |= (x.p_biased as u64) << F::SIG_BITS;
F::from_u64_bits(word)
}
Exact native-call excerpt from crate/dec2flt/decimal.rs:
fn can_use_fast_path<F: Lemire>(&self) -> bool {
F::MIN_EXPONENT_FAST_PATH <= self.exponent
&& self.exponent <= F::MAX_EXPONENT_DISGUISED_FAST_PATH
&& self.mantissa <= F::MAX_MANTISSA_FAST_PATH
&& !self.many_digits
}
if !self.can_use_fast_path::<F>() {
return None;
}
let value = if self.exponent <= F::MAX_EXPONENT_FAST_PATH {
// normal fast path
let value = F::from_u64(self.mantissa);
if self.exponent < 0 {
// Explicit trait calls preserve Rust arithmetic and resolve
// the generic output type that Charon leaves ambiguous.
core::ops::Div::div(value, F::pow10_fast_path((-self.exponent) as _))
} else {
core::ops::Mul::mul(value, F::pow10_fast_path(self.exponent as _))
}
} else {
// disguised fast path
let shift = self.exponent - F::MAX_EXPONENT_FAST_PATH;
let mantissa = self.mantissa.checked_mul(INT_POW10[shift as usize])?;
if mantissa > F::MAX_MANTISSA_FAST_PATH {
return None;
}
core::ops::Mul::mul(
F::from_u64(mantissa),
F::pow10_fast_path(F::MAX_EXPONENT_FAST_PATH as _),
)
};
if self.negative {
Some(core::ops::Neg::neg(value))
} else {
Some(value)
}
The preceding can_use_fast_path body, together with
MAX_MANTISSA_FAST_PATH = 1 << SIG_TOTAL_BITS and SIG_TOTAL_BITS = 53 for f64,
requires the exponent to lie between -22 and 37, the input mantissa to be at
most 2^53, and many_digits to be false. Consequently an ordinary arithmetic
call has a from_u64 operand in 0..=2^53. In its negative-exponent arm,
`-self.exponent` lies in 1..=22; in its nonnegative arm, `self.exponent` lies
in 0..=22. The disguised branch checks its multiplied mantissa against 2^53
before from_u64 and uses table index 22. The paired statement
Binary64NativeCallDomain does not assert this source reachability. It says
conditionally that a from_u64 argument at most 2^53 succeeds with a finite,
non-NaN word and that a table index at most 22 succeeds with a positive,
nonzero, finite, non-NaN word. Applying that conditional statement to the
guards just derived establishes those properties for the actual ordinary and
disguised calls, and in particular establishes that every executed divisor is
nonzero.
Exact special-value excerpt from crate/dec2flt/parse.rs:
let float = match (register, len) {
(INF_3, 3) => F::INFINITY,
(INF_8, 8) => F::INFINITY,
(NAN, 3) => F::NAN,
_ => return None,
};
if negative { Some(-float) } else { Some(float) }
Thus the executed special route is INFINITY or NAN followed by conditional
negation; it does not select NEG_INFINITY or NEG_NAN directly.
The number helper has the exact source body
pub fn parse_number(s: &[u8]) -> Option<Decimal> {
if let Some((float, rest)) = parse_partial_number(s) {
if rest == s.len() {
return Some(float);
}
}
None
}
It returns only the Decimal produced by parse_partial_number; there is no
float type parameter or float operation at this boundary.
The integer-tier helper has the source type and exact executable excerpts
below (long explanatory comments are elided). In particular it returns a raw
BiasedFp and contains no from_u64 cast, primitive float multiplication,
division, negation, or from_bits call:
pub fn compute_float<F: Float>(q: i64, mut w: u64) -> BiasedFp {
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let fp_error = BiasedFp::zero_pow2(-1);
// Short-circuit if the value can only be a literal 0 or infinity.
if w == 0 || q < F::SMALLEST_POWER_OF_TEN as i64 {
return fp_zero;
} else if q > F::LARGEST_POWER_OF_TEN as i64 {
return fp_inf;
}
// Normalize our significant digits, so the most-significant bit is set.
let lz = w.leading_zeros();
w <<= lz;
let (lo, hi) = compute_product_approx(q, w, F::SIG_BITS as usize + 3);
if lo == 0xFFFF_FFFF_FFFF_FFFF {
let inside_safe_exponent = (q >= -27) && (q <= 55);
if !inside_safe_exponent {
return fp_error;
}
}
let upperbit = (hi >> 63) as i32;
let mut mantissa = hi >> (upperbit + 64 - F::SIG_BITS as i32 - 3);
let mut power2 = power(q as i32) + upperbit - lz as i32 - F::EXP_MIN + 1;
if power2 <= 0 {
if -power2 + 1 >= 64 {
// Have more than 64 bits below the minimum exponent, must be 0.
return fp_zero;
}
// Have a subnormal value.
mantissa >>= -power2 + 1;
mantissa += mantissa & 1;
mantissa >>= 1;
power2 = (mantissa >= (1_u64 << F::SIG_BITS)) as i32;
return BiasedFp { m: mantissa, p_biased: power2 };
}
// Need to handle rounding ties. Normally, we need to round up,
// but if we fall right in between and we have an even basis, we
// need to round down.
if lo <= 1
&& q >= F::MIN_EXPONENT_ROUND_TO_EVEN as i64
&& q <= F::MAX_EXPONENT_ROUND_TO_EVEN as i64
&& mantissa & 0b11 == 0b01
&& (mantissa << (upperbit + 64 - F::SIG_BITS as i32 - 3)) == hi
{
// Zero the lowest bit, so we don't round up.
mantissa &= !1_u64;
}
// Round-to-even, then shift the significant digits into place.
mantissa += mantissa & 1;
mantissa >>= 1;
if mantissa >= (2_u64 << F::SIG_BITS) {
// Rounding up overflowed, so the carry bit is set. Set the
// mantissa to 1 (only the implicit, hidden bit is set) and
// increase the exponent.
mantissa = 1_u64 << F::SIG_BITS;
power2 += 1;
}
// Zero out the hidden bit.
mantissa &= !(1_u64 << F::SIG_BITS);
if power2 >= F::INFINITE_POWER {
// Exponent is above largest normal value, must be infinite.
return fp_inf;
}
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact slow-tier source body from crate/dec2flt/slow.rs:
pub(crate) fn parse_long_mantissa<F: Float>(s: &[u8]) -> BiasedFp {
const MAX_SHIFT: usize = 60;
const NUM_POWERS: usize = 19;
const POWERS: [u8; 19] =
[0, 3, 6, 9, 13, 16, 19, 23, 26, 29, 33, 36, 39, 43, 46, 49, 53, 56, 59];
let get_shift = |n| {
if n < NUM_POWERS { POWERS[n] as usize } else { MAX_SHIFT }
};
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let mut d = parse_decimal_seq(s);
// Short-circuit if the value can only be a literal 0 or infinity.
if d.num_digits == 0 || d.decimal_point < -324 {
return fp_zero;
} else if d.decimal_point >= 310 {
return fp_inf;
}
let mut exp2 = 0_i32;
let mut loop_result = None;
// Shift right toward (1/2 ... 1].
while d.decimal_point > 0 && loop_result.is_none() {
let n = d.decimal_point as usize;
let shift = get_shift(n);
d.right_shift(shift);
if d.decimal_point < -DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_zero);
} else {
exp2 += shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// Shift left toward (1/2 ... 1].
while d.decimal_point <= 0 && loop_result.is_none() {
let shift = if d.decimal_point == 0 {
match d.digits[0] {
digit if digit >= 5 => break,
0 | 1 => 2,
_ => 1,
}
} else {
get_shift((-d.decimal_point) as _)
};
d.left_shift(shift);
if d.decimal_point > DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_inf);
} else {
exp2 -= shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// We are now in the range [1/2 ... 1] but the binary format uses [1 ... 2].
exp2 -= 1;
while F::EXP_MIN > exp2 {
let mut n = (F::EXP_MIN - exp2) as usize;
if n > MAX_SHIFT {
n = MAX_SHIFT;
}
d.right_shift(n);
exp2 += n as i32;
}
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
// Shift the decimal to the hidden bit, and then round the value
// to get the high mantissa+1 bits.
d.left_shift(F::SIG_BITS as usize + 1);
let mut mantissa = d.round();
if mantissa >= (1_u64 << (F::SIG_BITS + 1)) {
// Rounding up overflowed to the carry bit, need to
// shift back to the hidden bit.
d.right_shift(1);
exp2 += 1;
mantissa = d.round();
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
}
let mut power2 = exp2 - F::EXP_MIN + 1;
if mantissa < (1_u64 << F::SIG_BITS) {
power2 -= 1;
}
// Zero out all the bits above the explicit mantissa bits.
mantissa &= (1_u64 << F::SIG_BITS) - 1;
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact final numeric-sign excerpt from crate/dec2flt/mod.rs:
let assembled_word = fp.m | ((fp.p_biased as u64) << F::SIG_BITS);
let assembly_result = biased_fp_to_float::<F>(fp);
let lexical_sign_applied = num.negative;
let result = if lexical_sign_applied {
core::ops::Neg::neg(assembly_result)
} else {
assembly_result
};
Thus a numeric execution that reaches the integer/slow selection route
assembles its selected pair with from_bits through biased_fp_to_float and only
then conditionally negates it. A successful try_fast_path returns earlier and
does not perform this assembly. compute_float and parse_long_mantissa produce
raw BiasedFp pairs and do not call from_u64, primitive float multiplication,
division, negation, or from_bits; they do, however, execute constants derived
from SIG_TOTAL_BITS before producing those pairs.
Retained structural-boundary evidence
-------------------------------------
Several adjacent structural bindings cite this same evidence record. Their
pinned library source identities are:
core/src/num/mod.rs
f0820f9dfb94999440c8cb4a349736fa21df7e5668e19b6b49e016ff67c05ce3
core/src/option.rs
7cf61204b05d98a95bc2e322d5fbfc1f4f91505109971917d9a7fb47151c50e6
core/src/slice/mod.rs
354992a6a3d69a0185eef9044a07ea5180e767bdb467aef55e69ee3d44317840
core/src/str/mod.rs
284b4c147b5d0497ce9146f6b96e564f196aed10411a62cdccf5fc5243d40f78
Exact ASCII-digit body from core/src/num/mod.rs:
pub const fn is_ascii_digit(&self) -> bool {
matches!(*self, b'0'..=b'9')
}
Exact Option control-flow bodies from core/src/option.rs:
fn branch(self) -> ControlFlow<Self::Residual, Self::Output> {
match self {
Some(v) => ControlFlow::Continue(v),
None => ControlFlow::Break(None),
}
}
fn from_residual(residual: Option<convert::Infallible>) -> Self {
match residual {
None => None,
}
}
Exact slice observation bodies from core/src/slice/mod.rs:
pub const fn first(&self) -> Option<&T> {
if let [first, ..] = self { Some(first) } else { None }
}
pub const fn split_first(&self) -> Option<(&T, &[T])> {
if let [first, tail @ ..] = self { Some((first, tail)) } else { None }
}
Exact string-byte body from core/src/str/mod.rs:
pub const fn as_bytes(&self) -> &[u8] {
// SAFETY: const sound because we transmute two types with the same layout
unsafe { mem::transmute(self) }
}
reference/model-evidence/binary64-probe.rs
#![feature(float_masks)]
use std::num::FpCategory;
fn bits(label: &str, value: f64) {
println!("{label}={:016x}", value.to_bits());
}
fn main() {
println!("target_arch={}", std::env::consts::ARCH);
println!("mantissa_digits={}", f64::MANTISSA_DIGITS);
println!("exponent_mask={:016x}", f64::EXPONENT_MASK);
println!("mantissa_mask={:016x}", f64::MANTISSA_MASK);
bits("nan", f64::NAN);
bits("infinity", f64::INFINITY);
bits("neg_infinity", f64::NEG_INFINITY);
for (label, value) in [
("nan_category", f64::NAN),
("infinity_category", f64::INFINITY),
("zero_category", 0.0),
("subnormal_category", f64::from_bits(1)),
("normal_category", 1.0),
] {
let category = match value.classify() {
FpCategory::Nan => "Nan",
FpCategory::Infinite => "Infinite",
FpCategory::Zero => "Zero",
FpCategory::Subnormal => "Subnormal",
FpCategory::Normal => "Normal",
};
println!("{label}={category}");
}
let payload_nan_word = 0x7ff0_0000_0000_0001_u64;
println!(
"from_bits_to_bits={:016x}",
f64::from_bits(payload_nan_word).to_bits()
);
bits("neg_payload_nan", -f64::from_bits(payload_nan_word));
bits("neg_zero", -0.0);
bits("subnormal_tie_to_even_zero", f64::from_bits(1) * 0.5);
bits("subnormal_tie_to_even_two", f64::from_bits(3) * 0.5);
bits("normal_division", 1.0 / 10.0);
bits("mul_negative_zero", -0.0 * 2.0);
bits("div_negative_zero", -1.0 / f64::INFINITY);
bits("div_negative_infinity", 1.0 / -0.0);
bits("mul_overflow", f64::MAX * (1.0 + f64::EPSILON));
println!("mul_zero_infinity_is_nan={}", (0.0 * f64::INFINITY).is_nan());
println!("div_zero_zero_is_nan={}", (0.0_f64 / 0.0_f64).is_nan());
println!("mul_nan_is_nan={}", (f64::NAN * 1.0).is_nan());
bits("cast_2_pow_53", (1_u64 << 53) as f64);
bits("cast_2_pow_53_plus_1", ((1_u64 << 53) + 1) as f64);
}
reference/model-evidence/setup-reproduction.txt
Fresh extraction and composition evidence for Preamble
======================================================
Scope
-----
This record was produced from the repository root on 2026-09-24. It records
the current frozen extraction configuration and a fresh execution of the
Cargo, Charon, and Aeneas stages. It is evidence about the bytes and commands
used to build the model, not evidence that any supplied GOAL is true.
Pinned configuration
--------------------
modeling-input/extraction.json contains exactly:
{
"crate": "crate",
"cargo_args": [],
"charon_args": [],
"aeneas_args": []
}
crate/Cargo.toml:5-22 names one edition-2024 library package, gives the
"default" feature an empty definition, gives "optimize_for_size" a distinct
feature, and sets overflow-checks=true in both development and release
profiles. The fresh run used the development profile. The configuration
probe below reported debug_assertions, overflow_checks, target_arch="x86_64",
target_pointer_width="64", target_env="gnu", and target_feature="sse2"; it
did not report feature="optimize_for_size". Its final Cargo line was:
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.08s
The exact probe command was:
env RUSTUP_TOOLCHAIN=nightly-2026-06-01 \
CARGO_TARGET_DIR=.trellis/scratch/preamble-cfg-target \
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/cargo \
rustc --offline \
--manifest-path .trellis/scratch/provenance-evidence-1790263924955098840/extraction/source/Cargo.toml \
--lib -- --print cfg
The materialized source used by that command is the source copy made by the
fresh extraction run described below. Relevant raw stdout was:
debug_assertions
feature="default"
overflow_checks
target_arch="x86_64"
target_endian="little"
target_env="gnu"
target_family="unix"
target_feature="sse"
target_feature="sse2"
target_feature="x87"
target_os="linux"
target_pointer_width="64"
Tool identities
---------------
These are the executable identities in modeling-input/tool-identities.json,
rechecked with sha256sum:
cargo
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/cargo
54e05dce8c9ca2f638cc3d87ec1a19425b5d0bf1f31aeb48cf4792aec5cadf27
cargo 1.98.0-nightly (fbb61be30 2026-05-26)
rustc
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
rustc 1.98.0-nightly (14210df0e 2026-05-31), LLVM 22.1.6
rustdoc
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc
2bf660d140310e28146e2c002dc6fcabd957c0a3b740be0419e6f8e5a9c87523
rustdoc 1.98.0-nightly (14210df0e 2026-05-31)
Charon
/home/leanagent/pv_spike/tools/charon/bin/charon
6490034f368ce98f3e7ae5a28bf71ed56d03bdf1e3712e71376b96fc55baeade
Charon 0.1.216, toolchain nightly-2026-06-01
Aeneas
/home/leanagent/pv_spike/tools/aeneas/bin/aeneas
9f446d2aaf59e8e705e36d05cb993f1c6ab0e97f8dc6fd2f19907a86ede30922
aeneas fa699427
Lean
/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin/lean
3e0d0d3d801675359f2d4cf9815bfdb417b20b92fdd9d48b3b14c95bbae28bbf
Lean 4.30.0-rc2, commit 3dc1a088b6d2d8eafe25a7cd7ec7b58d731bd7cc
Fresh extraction
----------------
The public reproduction command recorded by modeling-input/manifest.json is:
python3 .trellis/scripts/pv_modeling.py check-native . --fresh
For this record the same check_provenance implementation was invoked directly
so that its complete result could be retained without the CLI's bounded JSON
preview. It wrote:
.trellis/scratch/provenance-evidence-1790263924955098840/provenance.json
.trellis/scratch/provenance-evidence-1790263924955098840/extraction/observation.json
The extractor instantiated the empty argument lists above as these commands
(the output and cache paths are those beneath that scratch directory):
<cargo> check --offline
<charon> cargo --preset=aeneas --dest-file Generated/m.llbc -- --offline
<aeneas> -backend lean -dest Generated -emit-json Generated/m.llbc
The observation records exit code 0 for Cargo, Charon, and Aeneas. Cargo's raw
terminal result was:
Checking dec2flt-model v0.1.0 (.../extraction/source)
warning: feature `f16` is declared but not used
warning: `dec2flt-model` (lib) generated 1 warning
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.14s
Charon's raw terminal result was:
Compiling dec2flt-model v0.1.0 (.../extraction/source)
warning: feature `f16` is declared but not used
warning: `dec2flt-model` (lib) generated 1 warning
Finished `dev` profile [unoptimized + debuginfo] target(s) in 15.24s
Aeneas reported 203 prepasses, 50 globals, 87 opaque functions, 107
transparent functions, 49 trait declarations, and 85 trait implementations.
Its raw terminal result ended:
Generated: .../extraction/Generated/M.lean
Generated: .../extraction/Generated/translation.json
[Warn ] The crate contains extracted external, unknown definitions: ...
[Info ] Total execution time: 7.332373 seconds
The warning is the inventoried external boundary below. The fresh provenance
result had an empty error string, passed=true, no tool-identity differences,
and true values for every check, including fresh_extraction_succeeds,
fresh_model_export, crate_export, upstream_export, tool_identities_current,
bootstrap_receipt, and model_support_composition. The canonical current crate
tree digest reported by that result was:
b5ecf4d7e9dfa0337f1586ae0e865fbbe2dd384137ee6e2ad635f0d5d6e916a9
Generated bytes, placeholders, and axioms
-----------------------------------------
sha256sum gave the same digest for the fresh Generated/M.lean and the frozen
generated.lean:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692
The observation's raw-source placeholder count was 0. Compiling raw M.lean
without model support fails as diagnosed because F64 and the external boundary
are absent; four "declaration uses sorry" diagnostics are Lean error-recovery
consequences for F64-valued constants, not tokens in the generated source.
The pinned compatibility report has SHA-256
557a4924d55becf1b33d7dc7f9dfdf2b675c895ce4a9b6bee8a0622378e48d6a,
checks 2225 declarations, reports no unapproved axiom, and marks only the 64
declarations downstream of the missing boundary as pending. This is why the
24 operations below have separate authored model-support owners.
External boundary
-----------------
The exact command
python3 .trellis/scripts/pv_modeling.py inspect-native .
returned declaration_count=24 and retained the full index at
.trellis/scratch/inspect-native-1790264067166282471.json. The 24 names are:
F64.Insts.CoreCloneClone.clone
core.f64.F64.MANTISSA_DIGITS
core.f64.F64.NAN
core.f64.F64.INFINITY
core.f64.F64.NEG_INFINITY
core.f64.F64.EXPONENT_MASK
core.f64.F64.MANTISSA_MASK
core.f64.F64.classify
core.f64.F64.to_bits
core.f64.F64.from_bits
core.num.U8.is_ascii_digit
F64.Insts.CoreOpsArithMulF64F64.mul
F64.Insts.CoreOpsArithDivF64F64.div
F64.Insts.CoreOpsArithNegF64.neg
U64.Insts.CoreOpsBitBitAndU64U64.bitand
U64.Insts.CoreOpsBitBitOrU64U64.bitor
U64.Insts.CoreOpsBitShlU32U64.shl
U64.Insts.CoreOpsBitShrU32U64.shr
core.option.Option.Insts.CoreOpsTry_traitTry.branch
core.option.Option.Insts.CoreOpsTry_traitFromResidualOptionInfallible.from_residual
core.slice.Slice.first
core.slice.Slice.split_first
core.str.Str.as_bytes
F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64.from_u64
Tablet/model-support.json has exactly 24 bindings, one for each name. This
record establishes completeness of that inventory and its composition; the
semantic justification for an individual binding remains the responsibility
of that binding's paired definition node.
Composition
-----------
The exact command
python3 .trellis/scripts/pv_modeling.py compose-native . --check
returned matches=true, changed=false, no mismatched files, raw extraction hash
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692,
and both expected and actual Preamble hashes
15adb2db06b06e099d17070c2a373619ecdc481e32fc78d34054cd01fc7b492a.
The complete receipt is retained at
.trellis/scratch/compose-native-1790264071122343238.json.
reference/model-evidence/source-adaptation-delta.txt
Primary inventory and preservation analysis of the upstream-to-crate delta
============================================================================
Method and complete file inventory
----------------------------------
This record compares the supplied files in upstream/ with the frozen adapted
crate/. It treats the sources and their control flow as primary evidence; it
does not use a prior route decision as semantic proof and makes no assertion
that a supplied GOAL is true. The commands used were:
find upstream crate -type f ! -path '*/target/*' -print0 | sort -z |
xargs -0 sha256sum
for each supplied file f:
cmp -s upstream/$f crate/$f
diff -U0 upstream/$f crate/$f
The concatenated contextual diff of every supplied file has SHA-256
2eb0202ba9ae8092d6727dd2f3b824c29cb160b005960ccf2b15bfb804ed1217.
The complete inventory is:
supplied path upstream SHA-256 crate SHA-256 status
dec2flt/common.rs fc64094721ff23e08fcba013154d04dec3fe986cae5ffd73a20f86049980aace 4c4be815335a7b176527b1345e662890caa48181a0a4f814594339016cab18e changed
dec2flt/decimal.rs 3c164785e1bc3f3b48aa9c212dd6c4ab535fe828523af9fa584df4c7b1e60e0d 633658be803b7369b18feb098a8aa1b5f714a933d3b79ecbc4899a1b05f35beb changed
dec2flt/decimal_seq.rs c0c1c6028e3f57cefc3de7635a94788e9180f5ebcedc7a334ec8dbac786ec788 4aa4ecf9f31970033093d73238d4f2c72d433639bbe467c0741b185807380bd9 changed
dec2flt/fpu.rs 16cf9ec154d477ab3d4184a01fb4b9ed7c59f0228cc55589d393c40a61b19d8f 16cf9ec154d477ab3d4184a01fb4b9ed7c59f0228cc55589d393c40a61b19d8f identical
dec2flt/lemire.rs fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1 fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1 identical
dec2flt/mod.rs 7198e238c554b692405537a446b3526ad66805ec2900cd0e299f10c51402a44a b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012 changed
dec2flt/parse.rs 9daf21ab9445a84552535152f376eef8c30f3d5827296c0645f5952d3b22bbf1 50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f changed
dec2flt/slow.rs 43e7aba32d7431bbf0e1bbcb4c334eaffb23eb66891c7e45abe799c5235cc0d2 93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485 changed
dec2flt/table.rs 6eb59023784bd84cb6fb074c70da8a99bef72bc2a2ea179b0da457ca1ee00abb 6eb59023784bd84cb6fb074c70da8a99bef72bc2a2ea179b0da457ca1ee00abb identical
traits.rs 66a02c44d72dfcc3ddae7e34a290e390dabaf98c5911b283d2d97f2f0075a44e 9013270fb846edcb0bdf2abd0353f575fdd727974cba9e89bdab8bb4c2b4f0bf changed
The standalone package adds four files having no supplied counterpart:
crate/Cargo.toml 2040ce5dc92c51b5245113f97682b692b876aa57708b5c7c483425ba152943c8
crate/lib.rs 1df2b8bcb2f52068d05a6343923716d0ef4475abdef34a0de3fe7cb8dc2ba95b
crate/num/mod.rs d9ac4f964d124bd4660914dc4c80bbb14f48d7851f9a8edc71a0931e9fce37b3
crate/num/imp/mod.rs df09b97393e97b23b0a558c2fcbbf4e75dd9d68338f1e83f168bab80a37a31f1
Thus fpu.rs, lemire.rs, and the complete 671-line table.rs, including their
algorithmic constants and tables, are byte-identical. The following sections
account for every other file and every changed hunk.
Namespace and error shell
-------------------------
crate/lib.rs:1-12 is a no_std crate root that re-exports core::f64 and
core::ops and introduces the same num module path expected by the supplied
slice. crate/num/imp/mod.rs:1-10 uses path attributes to place traits.rs and
dec2flt/mod.rs at core::num::imp-like module names. These declarations add no
wrapper call or computation. crate/num/mod.rs:1 re-exports
core::num::FpCategory. crate/num/mod.rs:3-26 defines a local private
FloatErrorKind and ParseFloatError shell so the standalone package can name
the parser's error type. The pursued GOALs observe only panic versus normal
return and, on normal return, the outer Result's Ok/Err discriminant; they do
not observe the private error kind or formatting. No identity is asserted
between this local shell and an unpinned core error payload.
crate/Cargo.toml:5-22 selects the package, empty default features, and
checked-overflow profiles. The configuration and fresh build are independently
reproduced in setup-reproduction.txt.
Visibility, derives, and bounds
-------------------------------
upstream/dec2flt/mod.rs:90 versus crate/dec2flt/mod.rs:90 changes only the
visibility of the existing BiasedFp import so a goal-facing caller can name the
same type. It changes neither layout nor execution.
upstream/dec2flt/common.rs:68 and decimal.rs:28 and decimal_seq.rs:17 include
Debug derives. The corresponding crate spans common.rs:48-51,
decimal.rs:28-31, and decimal_seq.rs:17-20 remove only Debug. Copy, Clone,
PartialEq, Eq, and Default used by computation remain where present, and no
accepted observation formats these records.
upstream/traits.rs:11-52 versus crate/traits.rs:11-64 removes formatting from
Int, removes a redundant Copy supertrait from CastInto, and instantiates Int
only for u64. Every call of CastInto is through Int, which still requires
Copy; all retained concrete values are primitive Copy values. The removed
u16/u32 instances are associated only with the disabled f16/f32 formats.
upstream/traits.rs:55-76 versus crate/traits.rs:67-80 removes Add, Debug,
PartialEq, PartialOrd, Default, and Clone from Float while retaining Copy, Mul,
Div, and Neg. A search of all retained generic bodies shows no call using a
removed operation. upstream/dec2flt/decimal.rs:56-89 versus
crate/dec2flt/decimal.rs:59-111 and upstream/dec2flt/mod.rs:209-256 versus
crate/dec2flt/mod.rs:352-520 add direct Div, Mul, and Neg bounds already implied
by Lemire -> Float, and replace operator notation with calls to those same
traits. Rust desugars the original /, *, and unary - to these trait calls, so
the operands, call order, result, and admitted f64 specialization are unchanged.
Exact constants, tables, and specialized decoding
-------------------------------------------------
The source formulae and decimal-literal table were evaluated directly by the
pinned rustc using the retained source
reference/model-evidence/adaptation-constants-probe.rs. The command was:
R=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
P=reference/model-evidence/adaptation-constants-probe.rs
B=.trellis/scratch/adaptation-constants-probe
"$R" --edition 2024 --target x86_64-unknown-linux-gnu -C opt-level=0 "$P" -o "$B"
sha256sum "$P" "$B"
"$B"
The source hash was
b5a4a2cba0c08053cb9a816adb1ba5dbd160bf3928bdf5ccf56b7ae83aaa2aa5
and the resulting executable hash was
b02d2f6deb675f17d0dbdc22e57a67d7692689f7a2b0d7b125556c35c4b8a4a5.
Raw output was:
largest_power_of_ten=308
max_exponent_fast_path=22
max_exponent_disguised=37
neg_nan=fff8000000000000
pow10_0=3ff0000000000000
pow10_1=4024000000000000
pow10_2=4059000000000000
pow10_3=408f400000000000
pow10_4=40c3880000000000
pow10_5=40f86a0000000000
pow10_6=412e848000000000
pow10_7=416312d000000000
pow10_8=4197d78400000000
pow10_9=41cdcd6500000000
pow10_10=4202a05f20000000
pow10_11=42374876e8000000
pow10_12=426d1a94a2000000
pow10_13=42a2309ce5400000
pow10_14=42d6bcc41e900000
pow10_15=430c6bf526340000
pow10_16=4341c37937e08000
pow10_17=4376345785d8a000
pow10_18=43abc16d674ec800
pow10_19=43e158e460913d00
pow10_20=4415af1d78b58c40
pow10_21=444b1ae4d6e2ef50
pow10_22=4480f0cf064dd592
upstream/traits.rs:134-137 computes LARGEST_POWER_OF_TEN through a Float
default, and upstream/traits.rs:175-193 gives the generic integer_decode and
the helper used by that constant. crate/traits.rs:146 makes the constant an
associated requirement; crate/traits.rs:309-359 supplies the retained f64
values and decoder after substituting BITS=64, SIG_BITS=52, EXP_BIAS=1023,
EXPONENT_MASK, MANTISSA_MASK, and the u64 operations. Each source expression
then becomes exactly the corresponding crate expression: sign is bits>>63,
exponent is (bits & mask)>>52 cast to i16, the subnormal mantissa is shifted
once, the normal mantissa receives 1<<52, and 1023+52 is subtracted. The
resulting tuple and every bit operation are unchanged. The probe output above
shows that the computed f64 LARGEST_POWER_OF_TEN is 308 and that the source
-f64::NAN word is fff8000000000000, exactly crate/traits.rs:315-327; the
independent binary64-boundary.txt record fixes the masks and primitive bit
semantics used by the decoder.
upstream/dec2flt/mod.rs:118-129 gives the two Lemire default formulae.
crate/dec2flt/mod.rs:115-128 makes them associated requirements, and the
retained f64 instance at crate/dec2flt/mod.rs:217-220 supplies 22 and 37, the
integer results of the two source formulae for 53 significand bits.
upstream/dec2flt/mod.rs:176-181 indexes a 32-entry f64 table with exponent&31.
crate/dec2flt/mod.rs:222-251 performs the same masked selection using from_bits:
cases 0 through 22 are the exact pinned binary64 words printed above for 1e0 through 1e22 and
all other cases return positive zero, as did entries 23 through 31. The full
word list and the pinned float semantics are recorded in binary64-boundary.txt.
The analogous f16/f32 replacements at crate/dec2flt/mod.rs:145-215 and
crate/traits.rs:187-307 lie under cfg(any()) and cannot enter this build.
Whole-function from_u64 opacity
-------------------------------
upstream/dec2flt/mod.rs:184-188 and crate/dec2flt/mod.rs:254-263 have the same
f64 body: the same enabled debug_assert that v <= 1<<53, followed by the same
primitive `v as f64` cast. The sole semantic-boundary annotation is
#[charon::opaque] at crate line 259, syntactically attached to the function
item. It therefore hides the entire from_u64 body from translation: neither
the debug assertion nor the cast is transparent in the extraction. The
callers, their guards, and the surrounding native-path computation remain
transparent. The fresh external inventory contains the whole method as the
single external F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64.from_u64. Its
separately reviewed ModelF64FromU64 binding supplies exactly successful integer
conversion for v <= 2^53 and assertion failure otherwise.
Digit scans, slice patterns, and helper extraction
-------------------------------------------------
upstream/dec2flt/common.rs:14-53 supplies ByteSlice::parse_digits: repeatedly
split_first, wrapping-subtract ASCII zero, invoke the closure exactly when the
result is below 10, consume that byte, and stop at the first other byte.
crate/dec2flt/common.rs:11-36 removes only this method. Its complete set of
uses is replaced as follows.
* upstream/dec2flt/parse.rs:31-48 versus crate/dec2flt/parse.rs:31-58 keeps the
eight-byte loop, wrapping multiply/add, and then performs the same digit test,
accumulator update, and one-byte progress with an index. The local rename
num to chunk is lexical only.
* upstream/dec2flt/parse.rs:83-97 versus crate/dec2flt/parse.rs:131-153 expands
matches!/parse_digits into the same nonempty first-digit guard, the same
0x10000 bounded exponent update, the same first-nondigit suffix, and the same
final sign. The bound is tested before each checked multiply and addition,
exactly as in the closure.
* upstream/dec2flt/decimal_seq.rs:220-295 versus
crate/dec2flt/decimal_seq.rs:231-359 extracts parse_digits_into_seq,
parse_decimal_exponent, and count_trailing_zeros. The digit helpers use the
same wrapping byte test, forward order, try_add_digit state transition, and
0x10000 exponent guard. The reverse helper visits indices consumed_len-1
down to zero, increments only for ASCII zero, ignores a decimal point, and
stops at the first other byte, exactly the original iter().rev() loop.
In all these replacements, indexing occurs only under count<len or !is_empty,
so it has the same bounds as split_first. Slicing advances by exactly the same
one or eight bytes. No wrapping operation is replaced by checked arithmetic,
and no checked source operation is replaced by wrapping arithmetic.
upstream/dec2flt/parse.rs:155-181 versus crate/dec2flt/parse.rs:82-119 and
212-226 moves two loops into adjust_many_digit_count and parse_many_digits.
The prefix helper visits the same start bytes in the same order, performs the
same saturating_sub and checked isize subtraction, and stops on the same byte.
The retry helper makes the same first 19-digit call, tests the same threshold,
makes the same one-byte rebase and second call in the alternate branch,
computes the same offset with the same sign, casts it to i64, and performs the
same checked addition of exp_number last. Thus any large-input panic is
preserved rather than excluded.
upstream/dec2flt/decimal_seq.rs:226-295 versus
crate/dec2flt/decimal_seq.rs:284-359 replaces literal split_first patterns by
nonempty index tests. The leading-zero scans, optional decimal point, optional
exponent marker, optional exponent sign, and suffixes occur in the same order.
The crate's exp_sign*exp_num equals the source choice between exp_num and
-exp_num because exp_num is bounded by the unchanged 0x10000 guard; the final
decimal_point checked addition is in the same position. Casts of lengths to
i32 and every subsequent checked update remain unchanged, including their
large-input behavior.
Delayed returns
---------------
upstream/dec2flt/decimal_seq.rs:173-198 versus
crate/dec2flt/decimal_seq.rs:176-203 replaces one return inside right_shift's
loop by all_zero=true, exits because !all_zero is the loop guard, and returns
immediately afterward. No decimal_point, digit, index, or arithmetic update
occurs between the original and delayed return.
upstream/dec2flt/slow.rs:46-76 versus crate/dec2flt/slow.rs:46-94 replaces two
nested-loop returns by loop_result. In the zero branch it records fp_zero,
skips the source-skipped exp2 addition, exits through is_none(), and returns.
In the infinity branch it records fp_inf, skips the source-skipped exp2
subtraction, exits, and returns. On all other iterations it performs the same
shift, checked state changes, and exponent update. Lines 95-126 after these
returns are otherwise the source lines 77-110 unchanged.
Dispatcher trace and public projection
--------------------------------------
upstream/dec2flt/mod.rs:209-256 is the whole original dispatcher.
crate/dec2flt/mod.rs:285-349 declares trace data only, lines 352-505 execute the
instrumented dispatcher, and lines 507-520 define public dec2flt as its first
projection. Comparing the bodies gives the following branch-by-branch
correspondence.
* Both call as_bytes, inspect the first byte, reject empty input before a helper,
remove at most one sign, and reject a sign-only body. The trace stores the
already obtained body and Boolean sign.
* Both call parse_number first on that exact body. Only None calls
parse_inf_nan on the same body and sign. Its Some is returned directly and
its None returns invalid. The trace stores those existing Option values.
* Both overwrite only Decimal.negative, test the same compile-time
!optimize_for_size condition, call try_fast_path once, and return its Some
directly. The trace stores the copied Decimal and Option; Decimal is Copy.
* Both call compute_float first with num.exponent and num.mantissa. The crate's
second_compute_guard is exactly the first two conjuncts of the source
short-circuit. Therefore the checked mantissa+1 and second compute_float call
occur under precisely the source guard, in the same order. The same pair
comparison either retains fp or changes only p_biased to -1.
* Both test the post-comparison p_biased<0 once, call parse_long_mantissa on the
unchanged body exactly when true, and otherwise retain the same pair. The
trace records both guard and result without another helper call.
* The extra assembled_word expression is the same cast, shift, and OR performed
by biased_fp_to_float at upstream lines 202-206 and crate lines 278-282; these
integer operations neither panic nor mutate fp. Both then call assembly once
on the selected pair and apply unary negation exactly when num.negative.
Public dec2flt returns the identical Result first component.
Consequently the trace does not infer uncomputed data: it records the exact
variant; sign-stripped body and sign; numeric/special Options; fast-path input
and result; first and conditional second integer operands and results;
comparison, forced-deferral and post-comparison pair; slow guard and result;
selected pair; assembled word; pre-sign assembly word; sign-application fact;
and final word. Special and native direct returns create no selected pair.
All source call order, guards, checked arithmetic, mutable-state transitions,
panic points, and returned Result/F64 observations remain in place.
F64-only restriction
--------------------
crate/traits.rs:187-307 and crate/dec2flt/mod.rs:140-215 add cfg(any()) to the
f16/f32 Float, FloatExt, and Lemire implementations. crate/traits.rs:59-64
retains only u64 Int. The retained f64 implementations are
crate/traits.rs:309-360 and crate/dec2flt/mod.rs:217-264. Every goal-facing
function remains generic in the source and extraction, but each pursued source
subject specializes it to f64, whose associated integer is u64. There is no
dynamic format dispatch, so removing other impl blocks cannot change an f64
call, its native decision, checks, result word, NaN classification, fields, or
trace. The fresh boundary inventory in setup-reproduction.txt confirms that
no removed-format external remains.
Conclusion
----------
The inventory is exhaustive: three supplied files are identical, seven have
all hunks classified above, and the four added files are the package shell.
For the configured f64 specialization, the adapted crate has the same input
domains, branch order, guards, checked/wrapping distinction, state transitions,
panic versus normal behavior, and public/helper observations as the supplied
source. The only new observations are the trace fields, each copied from an
existing value or computed by the same pure assembly expression. This
conclusion is independent of whether any parser-correctness GOAL is true.
reference/model-evidence/source-valid-byte-slice.txt
Source-valid byte-slice domain evidence
Pinned toolchain commands, run from the repository root:
rustc --version --verbose
rustc --print cfg | rg 'target_(arch|pointer_width)'
rustc .trellis/scratch/source_valid_slice_probe.rs -o /tmp/source_valid_slice_probe
/tmp/source_valid_slice_probe
Raw configuration and probe output:
rustc 1.98.0-nightly (14210df0e 2026-05-31)
host: x86_64-unknown-linux-gnu
target_arch="x86_64"
target_pointer_width="64"
arch=x86_64
usize_bits=64
isize_max=9223372036854775807
u8_size=1
Pinned core-library source:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:801
states that a slice is never larger than isize::MAX bytes.
The same toolchain's core/src/num/int_macros.rs:47 defines a signed
integer's MAX as the corresponding unsigned MAX shifted right by one.
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/mod.rs:507-510
requires the contents of a str to remain valid UTF-8 and states that using a
str whose contents are not valid UTF-8 is undefined behavior.
Consequently, on the configured 64-bit target a &[u8] has at most
9223372036854775807 elements. This is a byte-count condition only: &[u8]
does not impose UTF-8 validity or restrict the values of its u8 elements.
A Rust str has the same inherent byte-length bound and additionally consists
of valid UTF-8 bytes.
Record details
| Record source | modeling-input/manifest.json |
|---|---|
| Kind | source adaptation audit |
Exact source record
{
"decision": "accept",
"reason": "The reopened adaptation satisfies the preparation gate on the exact setup-approved fingerprint 9d4c05f435792403fa73aebf05485da1c3e860b58fd839922b55871d832fc360. The observed source copy is byte-for-byte equal to work/crate apart from its generated Cargo.lock, and the complete candidate diff and local comments give source-grounded, GOAL-independent preservation arguments for the namespace shell, narrow cast opacity, extraction rewrites, trace projection, and approved removal of out-of-scope f16/f32 and u16/u32 instances and unused Float bounds. The approved route already compared this 24-external F64-only boundary with the materially larger frozen boundary and fuller monomorphization; the implementation keeps all retained parser, helper, native, checked-arithmetic, debug-assertion, and trace behavior and all 32 GOALs over the full accepted Rust string/slice domains. The fresh uncached check has Cargo, Charon, and Aeneas exit 0, emits exactly one root module M, and leaves exactly the approved 24 external declarations: 14 F64 operations/constants, four U64 bit operations, and six structural operations. The goal-facing dec2flt, trace types and dispatcher, parse_number, parse_inf_nan, try_fast_path, compute_float, parse_long_mantissa, biased_fp_to_float, Decimal, and BiasedFp declarations are transparent, with no f16/f32 implementation or removed Float-bound external remaining. The full Lean failure is fully diagnosed native-model support: all 44 errors are Unknown identifier F64, the four sorry warnings are error-recovery artifacts in F64-valued constants, and the raw generated source has zero placeholders. The axiom report checks 2225 declarations, marks only 64 declarations downstream of the absent F64 carrier pending, and the export compatibility report finds no unapproved dependency. The export check passes for the observed M.lean hash. This basis may therefore be frozen and exported; complete closure remains a Modeling obligation after the diagnosed bindings below are supplied.",
"route_compliance": "verified",
"support_obligations": [
"Define the missing Lean F64 carrier as raw U64 binary64 words and bind the 14 emitted F64 externals: clone; MANTISSA_DIGITS, NAN, INFINITY, NEG_INFINITY, EXPONENT_MASK, and MANTISSA_MASK; classify, to_bits, and from_bits; Mul, Div, and Neg; and the local opaque Lemire.from_u64 cast. The generated declaration headers identify the primary source at /rustc/library/core/src/clone.rs:698, num/f64.rs:412,509,512,515,615,637,782,1223,1269, ops/arith.rs:350,515,719, and work/crate/dec2flt/mod.rs:260. Implement the approved field-exact constants/classification/bit conversions, identity clone, exact sign-bit negation, exact binary64 arithmetic on reachable finite calls with only source-permitted NaN behavior elsewhere, and from_u64's debug assertion outside v <= 2^53.",
"Bind the four emitted U64 bit externals to bounded 64-bit and, or, left-shift, and right-shift semantics. Their generated headers cite /rustc/library/core/src/ops/bit.rs:178,282,489,612, and the extracted Float/Int bodies use them for masks, field assembly, and decoding.",
"Bind the six emitted structural externals directly: U8.is_ascii_digit is the ASCII 48-through-57 test; Option Try.branch and FromResidual.from_residual preserve the source Option control flow; Slice.first and Slice.split_first preserve the source slice observations; and Str.as_bytes exposes the same UTF-8 bytes. The generated headers cite /rustc/library/core/src/num/mod.rs:958, option.rs:2779,2793, slice/mod.rs:155,198, and str/mod.rs:498; apply the approved source-valid slice and string predicates to their uses."
],
"basis": "f455061d9a6f77288fddc10a7db13957a904d12abd06b9b6abd229dff17151a3c06583f9e94b467095cf9aff1a26a4857650ace006061c1ca5e4c441747ef622",
"axiom_compatibility_sha256": "557a4924d55becf1b33d7dc7f9dfdf2b675c895ce4a9b6bee8a0622378e48d6a"
}Captured evidence identities
[
{
"path": "extraction-evidence/COMMAND.json",
"sha256": "611f36cefb2d895e7b22bd15eaccc1bd57d1b539d54cbd6337e84d0573719a9e",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "extraction-evidence/DETERMINISM.json",
"sha256": "360301745fc66c713335320b2e6a57ef7fb71e390cc7db31a6316a3902f7ef8f",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "extraction-evidence/RESULT.json",
"sha256": "62a89492b5592f404e065d2f8c9a89fd3f83cc59b772fed0eaa475138211d641",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "extraction-evidence/STDERR.bin",
"sha256": "ab4dc202d7a8a30a83ea62ed154710a48148d62230ff8b834700919d4e679c0c",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "extraction-evidence/STDOUT.bin",
"sha256": "604aae51d5c3394417224f655c7de355cc3e699d31fff49f93734706ad43f3f8",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "reference/model-evidence/adaptation-constants-probe.rs",
"sha256": "b5a4a2cba0c08053cb9a816adb1ba5dbd160bf3928bdf5ccf56b7ae83aaa2aa5",
"cited_by": [
"reference/model-evidence/source-adaptation-delta.txt"
]
},
{
"path": "reference/model-evidence/binary64-boundary.txt",
"sha256": "a17d82e7f789ce7f1fbb3922a66ec8806999e526532d637605263882d37b7abf",
"cited_by": [
"shared extraction boundary: Tablet/Preamble.tex",
"reference/model-evidence/source-adaptation-delta.txt"
]
},
{
"path": "reference/model-evidence/binary64-probe.rs",
"sha256": "68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e",
"cited_by": [
"reference/model-evidence/binary64-boundary.txt"
]
},
{
"path": "reference/model-evidence/setup-reproduction.txt",
"sha256": "f97c87d1af65130560f67d2bfcd737106b191c8fce1ed0174569ee218c4ee8d7",
"cited_by": [
"shared extraction boundary: Tablet/Preamble.tex",
"reference/model-evidence/source-adaptation-delta.txt"
]
},
{
"path": "reference/model-evidence/source-adaptation-delta.txt",
"sha256": "5502c71eb4420211d20bd8b6aade171c56cc2dce11d758a73bb93ef1083634ad",
"cited_by": [
"shared extraction boundary: Tablet/Preamble.tex"
]
},
{
"path": "reference/model-evidence/source-valid-byte-slice.txt",
"sha256": "e7887429c66a303cbba3b4df30080ddd9ba4d54e24f25f74947deb228b32b04f",
"cited_by": [
"shared extraction boundary: Tablet/Preamble.tex"
]
}
]crate/dec2flt/common.rs
Historical preparation document: preparation source-adaptation audit. It describes the state and obligations at preparation. This generation is captured in Modeling. Later closure and review results appear in the proof and modeling views. This original document remains available as history.
Shared extraction-boundary explanation (Preamble)
Preservation argument
Claim
x86_64-unknown-linux-gnu, the library's empty default feature set
(so optimize_for_size is disabled), the unoptimized development
profile, enabled debug assertions and integer overflow checks, and the target's
SSE2 precision-setting branch. Interpret each of the frozen extraction's 24
external operations by the separately justified model-support definition that
owns that operation. Under those interpretations, the composed Aeneas model
represents the supplied source's f64 specialization on all of these
domains, without a correctness premise: every Rust str whose bytes
are valid UTF-8 and whose 64-bit slice length is at most
\mathtt{isize::MAX}=2^{63}-1; every Rust &[u8] whose length is at
most that bound, with arbitrary byte contents; every Decimal; every
i64/u64 pair; and every BiasedFp.dec2flt::<f64> the relation preserves panic versus normal return,
the outer returned Result's Ok/Err discriminant,
and, on success, the exact binary64 word and its NaN classification. For
parse_number it preserves panic versus normal return, the
Option discriminant, and all four returned Decimal fields.
For parse_inf_nan::<f64> and
Decimal::try_fast_path::<f64> it preserves panic versus normal
return, None versus Some, and every returned word and NaN
classification. For compute_float::<f64> and
parse_long_mantissa::<f64> it preserves panic versus normal return
and both fields of every returned BiasedFp. For
biased_fp_to_float::<f64> it preserves panic versus normal return
and the exact returned word, with no restriction on the pair fields.dec2flt_with_trace::<f64> it additionally preserves the public
result and the complete trace: its control-flow variant; sign-stripped body and
lexical sign; numeric and special helper results; signed native input and
native result; first integer operands and result; second-call guard, optional
operands and result, comparison and forced-deferral fact; post-comparison pair;
slow-path guard and optional result; selected pair; assembled unsigned word;
pre-sign assembly result; sign-application fact; and final word. Public
dec2flt::<f64> is exactly the first projection of that interface, and
direct special and native returns select no raw pair.Proof
generated.lean, with SHA-256
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692.
The raw source has no placeholder. The compatibility check reports no
unapproved axiom and isolates exactly 24 external declarations; the complete
inventory equals the 24 entries of Tablet/model-support.json.
compose-native --check reports an unchanged composition and equal
expected and actual Preamble hashes. Thus all transparent extracted
declarations come from this one pinned source and every nontransparent
operation is explicit. The premise assigning each external its owning
definition deliberately leaves that definition's primitive-semantics proof to
its own preservation record; no primitive binding is re-proved here.fpu.rs, lemire.rs, and table.rs are
byte-identical. The standalone namespace and local error shell introduce no
call. The GOALs observe only panic versus normal return and the outer
Ok/Err discriminant, so the shell's private kind and
formatting are unobserved; no identity with an unpinned core error payload is
asserted. Visibility and removed Debug derives do not affect values.
The retained generic bodies use none of the removed trait operations;
the direct Mul, Div, and Neg clauses and calls are
the operations already implied by Lemire. Only the u64
integer instance and f64 Float, FloatExt, and
Lemire instances can participate in an f64 execution, so
disabling the u16/u32 and f16/f32
instances changes no such call.f64/u64 field widths and
masks; the fast-path bounds are the source formula results; and the match over
power-of-ten words has the same masked index and exact words as the source
array. The toolchain-specific words, masks, classifications, casts, and
rounding behavior are independently pinned in
reference/model-evidence/binary64-boundary.txt. The frozen
from_u64 Rust body is the enabled assertion followed by the
u64 as f64 conversion. Because #[charon::opaque] applies to
the whole function, neither operation inside that body is transparent in the
extraction: the whole method is the single inventoried external. Its callers,
their guards, and the surrounding native computation remain transparent.
ModelF64FromU64 supplies exactly successful integer conversion for
v\leq2^{53} and assertion failure otherwise.split_first loops. Extracted helpers receive the same
slices and mutable values, visit bytes in the same forward or reverse order,
and retain every saturating, wrapping, and checked operation. Delayed returns
set a result flag, execute no intervening state update, leave the loop through
that flag, and immediately return the source value. In particular, casts and
length-derived additions on very large inputs keep their original panic or
normal behavior rather than acquiring a convenience size bound.None, overwrite only the parsed sign, try the enabled native
path, make the first integer call, and evaluate the checked
mantissa+1 and second call under exactly the source short-circuit
guard. Both force the same deferral on unequal pairs, call the slow helper on
the unchanged body exactly for a negative post-comparison exponent, assemble
the same selected pair, and apply the sign last. Every trace field is either
one of those already computed values or the same nonmutating cast/shift/OR word
used by assembly. Hence recording the trace and discarding it in the public
projection changes neither call order, guards, state, panic points, nor any
returned observation.isize::MAX, while a Rust string adds UTF-8 validity. Sub-slicing
preserves the length bound and need not preserve an independent string type.
These facts establish all domains and observations in the claim independently
of the truth or falsity of any GOAL.Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
extraction-evidence/COMMAND.json
{"declaration_reader_sha256":"76f60cf0b867fad9727d2256d32b306c8cba3725216a4225d0f83add77fd6158","extraction_provenance":{"extraction_toolchain":{"aeneas":"fa699427","aeneas_revision":"fa699427cdfa8f604b891fb0223ef42883dd7dc4","cargo_features":[{"features":["default"],"name":"dec2flt-model","source":"workspace:Cargo.toml","version":"0.1.0"}],"cargo_lock_sha256":"bc644c624ded89197356bbd65d995054b7fb08e5bdfbaa38c6e7c7a53772cecf","cfg":["debug_assertions","emscripten_wasm_eh","feature=\"default\"","fmt_debug=\"full\"","overflow_checks","panic=\"unwind\"","relocation_model=\"pic\"","target_abi=\"\"","target_arch=\"x86_64\"","target_endian=\"little\"","target_env=\"gnu\"","target_family=\"unix\"","target_feature=\"fxsr\"","target_feature=\"sse\"","target_feature=\"sse2\"","target_feature=\"x87\"","target_has_atomic","target_has_atomic=\"16\"","target_has_atomic=\"32\"","target_has_atomic=\"64\"","target_has_atomic=\"8\"","target_has_atomic=\"ptr\"","target_has_atomic_load_store","target_has_atomic_load_store=\"16\"","target_has_atomic_load_store=\"32\"","target_has_atomic_load_store=\"64\"","target_has_atomic_load_store=\"8\"","target_has_atomic_load_store=\"ptr\"","target_has_atomic_primitive_alignment=\"16\"","target_has_atomic_primitive_alignment=\"32\"","target_has_atomic_primitive_alignment=\"64\"","target_has_atomic_primitive_alignment=\"8\"","target_has_atomic_primitive_alignment=\"ptr\"","target_has_reliable_f128","target_has_reliable_f16","target_has_reliable_f16_math","target_object_format=\"elf\"","target_os=\"linux\"","target_pointer_width=\"64\"","target_thread_local","target_vendor=\"unknown\"","ub_checks","unix"],"charon":"0.1.216","charon_revision":"6f058254eb741c12e9b388df07adaf7cc8aac8ed","extraction_profile":"dev","lean":"4.30.0-rc2","overflow_checks":true,"panic_strategy":"unwind","rustc_vv":"rustc 1.98.0-nightly (14210df0e 2026-05-31)\nbinary: rustc\ncommit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65\ncommit-date: 2026-05-31\nhost: x86_64-unknown-linux-gnu\nrelease: 1.98.0-nightly\nLLVM version: 22.1.6\n","target_pointer_width":64,"target_triple":"x86_64-unknown-linux-gnu"},"extractor_stack":["charon@0.1.216","aeneas@fa699427"],"extractor_toolchain_sha256":"18657da0659dee7889ed8a937b136c9abbc3a35e9050241cd8201c94fd232323","not_recorded":[],"source_digests":[{"source_file":"lib.rs","source_sha256":"b5ecf4d7e9dfa0337f1586ae0e865fbbe2dd384137ee6e2ad635f0d5d6e916a9"}]},"extractor_script_path":"/home/leanagent/pv_runs/trellis-native-implementation-v85/scripts/extract_pv_model.py","extractor_script_sha256":"cc1fdd50a78185c7bb564b715c554cb35d9fc09ed566b6c3d4f482f2d27ef67d","kernel_gate_checkers":[],"log_concatenation_order":"runs_then_steps_in_array_order","runs":[{"run_role":"primary","steps":[{"argv":["/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","-vV"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"rustc-version","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"},{"argv":["/home/leanagent/pv_spike/tools/charon/bin/charon","cargo","--preset=aeneas","--dest-file","/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/m.llbc","--","--offline","--profile","dev","--target","x86_64-unknown-linux-gnu"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_BUILD_TARGET":"x86_64-unknown-linux-gnu","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"charon","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"},{"argv":["/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/cargo","metadata","--format-version=1","--locked","--offline","--filter-platform","x86_64-unknown-linux-gnu"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_BUILD_TARGET":"x86_64-unknown-linux-gnu","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"cargo-metadata","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"},{"argv":["/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/cargo","rustc","--lib","--locked","--offline","--profile","dev","--target","x86_64-unknown-linux-gnu","--","--print","cfg"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_BUILD_TARGET":"x86_64-unknown-linux-gnu","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"cargo-rustc-cfg","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"},{"argv":["/home/leanagent/pv_spike/tools/aeneas/bin/aeneas","-backend","lean","-dest","/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen","-emit-json","/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/m.llbc"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_BUILD_TARGET":"x86_64-unknown-linux-gnu","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"aeneas","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"}]}],"schema":"trellis-extraction-command/v1","tool_source_checkouts":[]}extraction-evidence/DETERMINISM.json
{"comparison":"generated_lean_and_complete_tablet_tree_byte_identity","generated_lean_byte_identical":false,"generated_lean_sha256":["49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692"],"kernel_filespec_gate":"not_run","kernel_prescribed_region_gate":"not_run","namespace_context_roundtrip_gate":"not_run","result_sha256":"62a89492b5592f404e065d2f8c9a89fd3f83cc59b772fed0eaa475138211d641","run_roles":["primary"],"schema":"trellis-extraction-determinism/v2","status":"not_run","tablet_root_sha256":["57e6ec9f6e8b1d9d78ab01504bad58f93cb43308edf77f73f86b986b8d07b809"],"tablet_tree_byte_identical":false}extraction-evidence/RESULT.json
{"command_sha256":"611f36cefb2d895e7b22bd15eaccc1bd57d1b539d54cbd6337e84d0573719a9e","runs":[{"generated_lean_sha256":"49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692","run_role":"primary","steps":[{"exit_status":0,"stderr_byte_length":0,"stderr_offset":0,"stderr_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","stdout_byte_length":212,"stdout_offset":0,"stdout_sha256":"e6ea0da4a3301256a0a0dc0d67d11acf4e83e0d1bff5dd987ccdaa43708714bc","tool":"rustc-version"},{"exit_status":0,"stderr_byte_length":654,"stderr_offset":0,"stderr_sha256":"263937c29ffcb9cf54e452b2d8b89e015a1fa1a5b2a2d237292d4350d0b04aed","stdout_byte_length":0,"stdout_offset":212,"stdout_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","tool":"charon"},{"exit_status":0,"stderr_byte_length":0,"stderr_offset":654,"stderr_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","stdout_byte_length":2897,"stdout_offset":212,"stdout_sha256":"ec87d2fc78972115c1b9e436f373a890f3847397a741d91d720dce4fb36c7a90","tool":"cargo-metadata"},{"exit_status":0,"stderr_byte_length":302,"stderr_offset":654,"stderr_sha256":"7025c1726c90c35a211042d6945c25ff6015acaca27ee97a063465221b792806","stdout_byte_length":1062,"stdout_offset":3109,"stdout_sha256":"4081a320e6292139b4a673d225682dc054b77cba113b8c8a8fbb0593f824b713","tool":"cargo-rustc-cfg"},{"exit_status":0,"stderr_byte_length":7084,"stderr_offset":956,"stderr_sha256":"5f41394d8b12a0d7a6c9e7115108a06b20599eb7ddd611cff4b90b31ba2fe26a","stdout_byte_length":933,"stdout_offset":4171,"stdout_sha256":"376c43fb83e40962a056e9198dba4afb0cf8ecb0238e76c78bd9dbc32fbced4a","tool":"aeneas"}],"tablet_root_sha256":"57e6ec9f6e8b1d9d78ab01504bad58f93cb43308edf77f73f86b986b8d07b809"}],"schema":"trellis-extraction-result/v2","stderr_byte_length":8040,"stderr_sha256":"ab4dc202d7a8a30a83ea62ed154710a48148d62230ff8b834700919d4e679c0c","stdout_byte_length":5104,"stdout_sha256":"604aae51d5c3394417224f655c7de355cc3e699d31fff49f93734706ad43f3f8"}extraction-evidence/STDERR.bin
Compiling dec2flt-model v0.1.0 (/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate)
warning: feature `f16` is declared but not used
--> lib.rs:2:46
|
2 | #![feature(cfg_target_has_reliable_f16_f128, f16, float_masks, register_tool, staged_api)]
| ^^^
|
= note: `#[warn(unused_features)]` (part of `#[warn(unused)]`) on by default
warning: `dec2flt-model` (lib) generated 1 warning
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.41s
Compiling dec2flt-model v0.1.0 (/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.02s
[?25lApplied prepasses: [------------------------------------------------] 0/203 ⠋
Applied prepasses: [------------------------------------------------] 1/203 ⠋
Applied prepasses: [#####-------------------------------------------] 24/203 ⠋
Applied prepasses: [########----------------------------------------] 38/203 ⠋
Applied prepasses: [##############################------------------] 128/203 ⠙
Applied prepasses: [################################################] 203/203 ✔️
[?25h[?25lTranslated globals: [-------------------------------------------------] 0/50 ⠋
Translated globals: [#################################################] 50/50 ✔️
[?25h[?25lTranslated opaque functions: [----------------------------------------] 0/87 ⠋
Translated opaque functions: [########################################] 87/87 ✔️
[?25h[?25lTranslated transparent functions: [---------------------------------] 0/107 ⠋
Translated transparent functions: [---------------------------------] 1/107 ⠋
Translated transparent functions: [###------------------------------] 10/107 ⠙
Translated transparent functions: [######---------------------------] 22/107 ⠹
Translated transparent functions: [##########-----------------------] 35/107 ⠹
Translated transparent functions: [##############-------------------] 47/107 ⠹
Translated transparent functions: [###############------------------] 51/107 ⠸
Translated transparent functions: [################-----------------] 55/107 ⠸
Translated transparent functions: [##################---------------] 60/107 ⠼
Translated transparent functions: [##################---------------] 61/107 ⠼
Translated transparent functions: [###################--------------] 64/107 ⠼
Translated transparent functions: [####################-------------] 68/107 ⠼
Translated transparent functions: [#####################------------] 69/107 ⠴
Translated transparent functions: [#####################------------] 70/107 ⠴
Translated transparent functions: [######################-----------] 72/107 ⠦
Translated transparent functions: [######################-----------] 73/107 ⠦
Translated transparent functions: [######################-----------] 74/107 ⠧
Translated transparent functions: [#######################----------] 77/107 ⠧
Translated transparent functions: [########################---------] 78/107 ⠧
Translated transparent functions: [########################---------] 80/107 ⠇
Translated transparent functions: [#########################--------] 83/107 ⠇
Translated transparent functions: [#########################--------] 84/107 ⠇
Translated transparent functions: [##########################-------] 85/107 ⠏
Translated transparent functions: [##########################-------] 86/107 ⠏
Translated transparent functions: [##########################-------] 87/107 ⠋
Translated transparent functions: [###########################------] 88/107 ⠋
Translated transparent functions: [###########################------] 90/107 ⠋
Translated transparent functions: [############################-----] 91/107 ⠙
Translated transparent functions: [############################-----] 92/107 ⠙
Translated transparent functions: [############################-----] 93/107 ⠙
Translated transparent functions: [#############################----] 95/107 ⠹
Translated transparent functions: [#############################----] 97/107 ⠹
Translated transparent functions: [##############################---] 98/107 ⠸
Translated transparent functions: [##############################---] 99/107 ⠼
Translated transparent functions: [###############################--] 101/107 ⠼
Translated transparent functions: [###############################--] 102/107 ⠴
Translated transparent functions: [###############################--] 103/107 ⠦
Translated transparent functions: [################################-] 104/107 ⠦
Translated transparent functions: [################################-] 105/107 ⠧
Translated transparent functions: [################################-] 106/107 ⠇
Translated transparent functions: [#################################] 107/107 ⠏
Translated transparent functions: [#################################] 107/107 ✔️
[?25h[?25lTranslated trait declarations: [--------------------------------------] 0/49 ⠋
Translated trait declarations: [########################--------------] 31/49 ✔️
[?25h[?25lTranslated trait impls: [---------------------------------------------] 0/85 ⠋
Translated trait impls: [#################################------------] 64/85 ✔️
[?25h[?25lPost-processed translated opaque functions: [-------------------------] 0/87 ⠋
Post-processed translated opaque functions: [-------------------------] 1/87 ⠙
Post-processed translated opaque functions: [#########################] 87/87 ✔️
[?25h[?25lPost-processed translated transparent functions: [------------------] 0/107 ⠋
Post-processed translated transparent functions: [------------------] 1/107 ⠋
Post-processed translated transparent functions: [#-----------------] 10/107 ⠙
Post-processed translated transparent functions: [##----------------] 13/107 ⠹
Post-processed translated transparent functions: [##----------------] 16/107 ⠸
Post-processed translated transparent functions: [##----------------] 17/107 ⠸
Post-processed translated transparent functions: [###---------------] 18/107 ⠼
Post-processed translated transparent functions: [###---------------] 22/107 ⠼
Post-processed translated transparent functions: [####--------------] 24/107 ⠼
Post-processed translated transparent functions: [####--------------] 29/107 ⠴
Post-processed translated transparent functions: [#####-------------] 31/107 ⠴
Post-processed translated transparent functions: [#####-------------] 33/107 ⠴
Post-processed translated transparent functions: [######------------] 39/107 ⠴
Post-processed translated transparent functions: [########----------] 48/107 ⠦
Post-processed translated transparent functions: [#########---------] 56/107 ⠦
Post-processed translated transparent functions: [##########--------] 62/107 ⠦
Post-processed translated transparent functions: [###############---] 94/107 ⠦
Post-processed translated transparent functions: [################--] 99/107 ⠧
Post-processed translated transparent functions: [################--] 100/107 ⠇
Post-processed translated transparent functions: [#################-] 102/107 ⠇
Post-processed translated transparent functions: [#################-] 104/107 ⠏
Post-processed translated transparent functions: [#################-] 105/107 ⠋
Post-processed translated transparent functions: [##################] 107/107 ⠙
Post-processed translated transparent functions: [##################] 107/107 ✔️
[?25hextraction-evidence/STDOUT.bin
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
{"packages":[{"name":"dec2flt-model","version":"0.1.0","id":"path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0","license":null,"license_file":null,"description":null,"source":null,"dependencies":[],"targets":[{"kind":["lib"],"crate_types":["lib"],"name":"dec2flt_model","src_path":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate/lib.rs","edition":"2024","doc":true,"doctest":true,"test":true}],"features":{"default":[],"optimize_for_size":[]},"manifest_path":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate/Cargo.toml","metadata":null,"publish":[],"authors":[],"categories":[],"keywords":[],"readme":null,"repository":null,"homepage":null,"documentation":null,"edition":"2024","links":null,"default_run":null,"rust_version":null}],"workspace_members":["path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0"],"workspace_default_members":["path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0"],"resolve":{"nodes":[{"id":"path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0","dependencies":[],"deps":[],"features":["default"]}],"root":"path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0"},"target_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","build_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","version":1,"workspace_root":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate","metadata":null}
debug_assertions
emscripten_wasm_eh
feature="default"
fmt_debug="full"
overflow_checks
panic="unwind"
relocation_model="pic"
target_abi=""
target_arch="x86_64"
target_endian="little"
target_env="gnu"
target_family="unix"
target_feature="fxsr"
target_feature="sse"
target_feature="sse2"
target_feature="x87"
target_has_atomic
target_has_atomic="16"
target_has_atomic="32"
target_has_atomic="64"
target_has_atomic="8"
target_has_atomic="ptr"
target_has_atomic_load_store
target_has_atomic_load_store="16"
target_has_atomic_load_store="32"
target_has_atomic_load_store="64"
target_has_atomic_load_store="8"
target_has_atomic_load_store="ptr"
target_has_atomic_primitive_alignment="16"
target_has_atomic_primitive_alignment="32"
target_has_atomic_primitive_alignment="64"
target_has_atomic_primitive_alignment="8"
target_has_atomic_primitive_alignment="ptr"
target_has_reliable_f128
target_has_reliable_f16
target_has_reliable_f16_math
target_object_format="elf"
target_os="linux"
target_pointer_width="64"
target_thread_local
target_vendor="unknown"
ub_checks
unix
[[92mInfo[39m ] Imported: /home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/m.llbc
[[92mInfo[39m ] Generated: /home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/M.lean
[[92mInfo[39m ] Generated: /home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/translation.json
[[93mWarn[39m ] The crate contains extracted external, unknown definitions: we advise using the option -split-files to allow manually providing these definitions in separate files.
[[92mInfo[39m ] Total execution time: 7.245881 seconds
reference/model-evidence/adaptation-constants-probe.rs
fn main() {
let largest_power_of_ten = (1024_f64 / std::f64::consts::LOG2_10) as i32;
let log2_5 = std::f64::consts::LOG2_10 - 1.0;
let max_exponent_fast_path = (53_f64 / log2_5) as i64;
let max_exponent_disguised =
max_exponent_fast_path + (53_f64 / std::f64::consts::LOG2_10) as i64;
println!("largest_power_of_ten={largest_power_of_ten}");
println!("max_exponent_fast_path={max_exponent_fast_path}");
println!("max_exponent_disguised={max_exponent_disguised}");
println!("neg_nan={:016x}", (-f64::NAN).to_bits());
for (exponent, value) in IntoIterator::into_iter([
1e0_f64, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11,
1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, 1e20, 1e21, 1e22,
])
.enumerate()
{
println!("pow10_{exponent}={:016x}", value.to_bits());
}
}
reference/model-evidence/binary64-boundary.txt
Primary evidence for the binary64 boundary
==========================================
Scope and identities
--------------------
This record concerns the frozen x86_64-unknown-linux-gnu extraction, the
adapted Rust crate retained in this repository, and the installed toolchain
named by modeling-input/SETUP.md. The probe source is retained at
reference/model-evidence/binary64-probe.rs; no scratch source is required to
reproduce it.
Toolchain executable:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
Target:
x86_64-unknown-linux-gnu
rustc executable SHA-256:
162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
Probe source SHA-256:
68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
Compiled probe SHA-256:
f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
Frozen generated.lean SHA-256:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692
Frozen modeling-input/manifest.json SHA-256:
2fc182c0c7acccad30c449ca349b999759b84e8ed4ec9d590e8295e43eeec077
Approved Binary64ModelDefault.lean SHA-256 at the time of this record:
03ae48fb631e6242bd21bf95d0481b66acae05f8cab343c7ab279b3c116538a3
Exact reproduction commands
---------------------------
Run from the repository root:
R=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
P=reference/model-evidence/binary64-probe.rs
B=.trellis/scratch/binary64-probe
"$R" --version --verbose
sha256sum "$R"
sha256sum "$P"
"$R" --target x86_64-unknown-linux-gnu -C opt-level=0 "$P" -o "$B"
sha256sum "$B"
"$B"
Raw output
----------
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
rustc_sha256=162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
probe_sha256=68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
binary_sha256=f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
target_arch=x86_64
mantissa_digits=53
exponent_mask=7ff0000000000000
mantissa_mask=000fffffffffffff
nan=7ff8000000000000
infinity=7ff0000000000000
neg_infinity=fff0000000000000
nan_category=Nan
infinity_category=Infinite
zero_category=Zero
subnormal_category=Subnormal
normal_category=Normal
from_bits_to_bits=7ff0000000000001
neg_payload_nan=fff0000000000001
neg_zero=8000000000000000
subnormal_tie_to_even_zero=0000000000000000
subnormal_tie_to_even_two=0000000000000002
normal_division=3fb999999999999a
mul_negative_zero=8000000000000000
div_negative_zero=8000000000000000
div_negative_infinity=fff0000000000000
mul_overflow=7ff0000000000000
mul_zero_infinity_is_nan=true
div_zero_zero_is_nan=true
mul_nan_is_nan=true
cast_2_pow_53=4340000000000000
cast_2_pow_53_plus_1=4340000000000000
Pinned Rust library sources
---------------------------
The installed sources below belong to the same named toolchain. Their
SHA-256 identities are:
core/src/primitive_docs.rs
c4b8627dd67d5dac8f383f383a9e7ff1229ea43e7599610fc61988694cf0f3e5
core/src/num/f64.rs
84540a6a59e347c63caabe12cf895ba1239c76a50682471567007138fac1c618
core/src/clone.rs
23f9cfc80347fde6b8457d46fbf7a2b8d9f34c8c58601b0b6f714ca2f6d1976b
The exact relevant text of core/src/primitive_docs.rs is:
#[rustc_doc_primitive = "f64"]
#[doc(alias = "double")]
/// A 64-bit floating-point type (specifically, the "binary64" type defined in IEEE 754-2008).
///
/// This type is very similar to [`prim@f32`], but has increased precision by using twice as many
/// bits. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on double-precision
/// values][wikipedia] for more information.
The referenced primitive-f32 documentation supplies the common primitive
floating-point operation rules quoted next:
/// - −0.0: IEEE 754 floating-point numbers have a bit that indicates their sign, so −0.0 is a
/// possible value. For comparison −0.0 = +0.0, but floating-point operations can carry
/// the sign bit through arithmetic operations. This means −0.0 × +0.0 produces −0.0 and
/// a negative number rounded to a value smaller than a float can represent also produces −0.0.
/// - [∞](#associatedconstant.INFINITY) and
/// [−∞](#associatedconstant.NEG_INFINITY): these result from calculations
/// like `1.0 / 0.0`.
///
/// When a primitive operation (addition, subtraction, multiplication, or
/// division) is performed on this type, the result is rounded according to the
/// roundTiesToEven direction defined in IEEE 754-2008. That means:
///
/// - The result is the representable value closest to the true value, if there
/// is a unique closest representable value.
/// - If the true value is exactly half-way between two representable values,
/// the result is the one with an even least-significant binary digit.
/// - If the true value's magnitude is ≥ `f32::MAX` + 2<sup>(`f32::MAX_EXP` −
/// `f32::MANTISSA_DIGITS` − 1)</sup>, the result is ∞ or −∞ (preserving the
/// true value's sign).
The same file explicitly separates arithmetic NaN choice from exact bitwise
operations; its exact relevant text is:
/// The rules for NaN values differ between *arithmetic* and *non-arithmetic* (or "bitwise")
/// operations. The non-arithmetic operations are unary `-`, `abs`, `copysign`, `signum`,
/// `{to,from}_bits`, `{to,from}_{be,le,ne}_bytes` and `is_sign_{positive,negative}`. These
/// operations are guaranteed to exactly preserve the bit pattern of their input except for possibly
/// changing the sign bit.
///
/// The following rules apply when a NaN value is returned from an arithmetic operation:
/// - The result has a non-deterministic sign.
/// - The quiet bit and payload are non-deterministically chosen from
/// the following set of options:
///
/// - **Preferred NaN**: The quiet bit is set and the payload is all-zero.
/// - **Quieting NaN propagation**: The quiet bit is set and the payload is copied from any input
/// operand that is a NaN. If the inputs and outputs do not have the same payload size (i.e., for
/// `as` casts), then
/// - If the output is smaller than the input, low-order bits of the payload get dropped.
/// - If the output is larger than the input, the payload gets filled up with 0s in the low-order
/// bits.
/// - **Unchanged NaN propagation**: The quiet bit and payload are copied from any input operand
/// that is a NaN. If the inputs and outputs do not have the same size (i.e., for `as` casts), the
/// same rules as for "quieting NaN propagation" apply, with one caveat: if the output is smaller
/// than the input, dropping the low-order bits may result in a payload of 0; a payload of 0 is not
/// possible with a signaling NaN (the all-0 significand encodes an infinity) so unchanged NaN
/// propagation cannot occur with some inputs.
/// - **Target-specific NaN**: The quiet bit is set and the payload is picked from a target-specific
/// set of "extra" possible NaN payloads. The set can depend on the input operand values.
/// See the table below for the concrete NaNs this set contains on various targets.
///
/// | `target_arch` | Extra payloads possible on this platform |
/// |---------------|------------------------------------------|
/// | `aarch64`, `arm`, `arm64ec`, `loongarch64`, `powerpc` (except when `target_abi = "spe"`), `powerpc64`, `riscv32`, `riscv64`, `s390x`, `x86`, `x86_64` | None |
Thus the model's preferred quiet NaN is one permitted result whenever
multiplication or division returns NaN. This does not claim that arbitrary
Rust arithmetic NaNs have those exact bits. By contrast, unary negation and
bit conversion must preserve all non-sign bits exactly, including for every
NaN payload.
The exact relevant declarations in core/src/num/f64.rs are:
pub const MANTISSA_DIGITS: u32 = 53;
pub const NAN: f64 = 0.0_f64 / 0.0_f64;
pub const INFINITY: f64 = 1.0_f64 / 0.0_f64;
pub const NEG_INFINITY: f64 = -1.0_f64 / 0.0_f64;
pub const SIGN_MASK: u64 = 0x8000_0000_0000_0000;
pub const EXPONENT_MASK: u64 = 0x7ff0_0000_0000_0000;
pub const MANTISSA_MASK: u64 = 0x000f_ffff_ffff_ffff;
pub const fn classify(self) -> FpCategory {
// We used to have complicated logic here that avoids the simple bit-based tests to work
// around buggy codegen for x87 targets (see
// https://github.com/rust-lang/rust/issues/114479). However, some LLVM versions later, none
// of our tests is able to find any difference between the complicated and the naive
// version, so now we are back to the naive version.
let b = self.to_bits();
match (b & Self::MANTISSA_MASK, b & Self::EXPONENT_MASK) {
(0, Self::EXPONENT_MASK) => FpCategory::Infinite,
(_, Self::EXPONENT_MASK) => FpCategory::Nan,
(0, 0) => FpCategory::Zero,
(_, 0) => FpCategory::Subnormal,
_ => FpCategory::Normal,
}
}
pub const fn to_bits(self) -> u64 {
// SAFETY: `u64` is a plain old datatype so we can always transmute to it.
unsafe { mem::transmute(self) }
}
pub const fn from_bits(v: u64) -> Self {
// It turns out the safety issues with sNaN were overblown! Hooray!
// SAFETY: `u64` is a plain old datatype so we can always transmute from it.
unsafe { mem::transmute(v) }
}
The exact scalar clone body in core/src/clone.rs is:
impl const Clone for $t {
#[inline(always)]
fn clone(&self) -> Self {
*self
}
}
Frozen adapted source
---------------------
The relevant retained source file hashes are:
crate/traits.rs
9013270fb846edcb0bdf2abd0353f575fdd727974cba9e89bdab8bb4c2b4f0bf
crate/dec2flt/mod.rs
b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012
crate/dec2flt/parse.rs
50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f
crate/dec2flt/decimal.rs
633658be803b7369b18feb098a8aa1b5f714a933d3b79ecbc4899a1b05f35beb
crate/dec2flt/lemire.rs
fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1
crate/dec2flt/slow.rs
93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485
Exact constant and bit-conversion excerpt from crate/traits.rs:
impl Float for f64 {
type Int = u64;
const INFINITY: Self = Self::INFINITY;
const NEG_INFINITY: Self = Self::NEG_INFINITY;
const NAN: Self = Self::NAN;
// Bit-identical to the upstream `-f64::NAN`, without the unsupported
// compile-time float negation.
const NEG_NAN: Self = f64::from_bits(0xFFF8_0000_0000_0000);
const BITS: u32 = 64;
const SIG_TOTAL_BITS: u32 = Self::MANTISSA_DIGITS;
const EXP_MASK: Self::Int = Self::EXPONENT_MASK;
const SIG_MASK: Self::Int = Self::MANTISSA_MASK;
fn to_bits(self) -> Self::Int {
self.to_bits()
}
fn classify(self) -> FpCategory {
self.classify()
}
}
impl FloatExt for f64 {
#[inline]
fn from_u64_bits(v: u64) -> Self {
f64::from_bits(v)
}
Exact derived-constant defaults from crate/traits.rs:
/// The number of bits in the significand, *excluding* the hidden bit.
const SIG_BITS: u32 = Self::SIG_TOTAL_BITS - 1;
/// Number of bits in the exponent.
const EXP_BITS: u32 = Self::BITS - Self::SIG_BITS - 1;
/// The saturated (maximum bitpattern) value of the exponent, i.e. the infinite
/// representation.
///
/// This shifted fully right, use `EXP_MASK` for the shifted value.
const EXP_SAT: u32 = (1 << Self::EXP_BITS) - 1;
/// Signed version of `EXP_SAT` since we convert a lot.
const INFINITE_POWER: i32 = Self::EXP_SAT as i32;
/// The exponent bias value. This is also the maximum value of the exponent.
const EXP_BIAS: u32 = Self::EXP_SAT >> 1;
/// Minimum exponent value of normal values.
const EXP_MIN: i32 = -(Self::EXP_BIAS as i32 - 1);
Together with the f64-instance lines `BITS = 64` and
`SIG_TOTAL_BITS = Self::MANTISSA_DIGITS` in the preceding excerpt, these
defaults derive SIG_BITS, EXP_MIN, and INFINITE_POWER from the primitive
mantissa-digit constant rather than introducing independent parameters.
Exact checked cast excerpt from crate/dec2flt/mod.rs:
#[inline]
// This method is precisely the source `u64 as f64` primitive conversion.
// Aeneas cannot translate that cast; opacity is confined to the cast while
// the fast-path algorithm, its range proof obligation, and all calls stay
// visible in the extracted model.
#[charon::opaque]
fn from_u64(v: u64) -> Self {
debug_assert!(v <= Self::MAX_MANTISSA_FAST_PATH);
v as _
}
Here MAX_MANTISSA_FAST_PATH is the retained default 1 << 53. Therefore the
source succeeds only through the modeled branch v <= 2^53 in this debug
configuration; above it the debug assertion fails before the cast. On the
successful branch every integer is exactly representable, so the source cast
and the model rounder return the same word.
Exact power-table and assembly excerpts from crate/dec2flt/mod.rs:
/// Maximum mantissa for the fast-path (`1 << 53` for f64).
const MAX_MANTISSA_FAST_PATH: u64 = 1 << Self::SIG_TOTAL_BITS;
const MAX_EXPONENT_FAST_PATH: i64 = 22;
const MIN_EXPONENT_FAST_PATH: i64 = -Self::MAX_EXPONENT_FAST_PATH;
const MAX_EXPONENT_DISGUISED_FAST_PATH: i64 = 37;
fn pow10_fast_path(exponent: usize) -> Self {
// These bit patterns are exactly the source table's rounded binary64
// literals. The match is the same masked lookup; it merely keeps float
// constants out of Aeneas's unsupported constant interpreter.
match exponent & 31 {
0 => f64::from_bits(0x3FF0_0000_0000_0000),
1 => f64::from_bits(0x4024_0000_0000_0000),
2 => f64::from_bits(0x4059_0000_0000_0000),
3 => f64::from_bits(0x408F_4000_0000_0000),
4 => f64::from_bits(0x40C3_8800_0000_0000),
5 => f64::from_bits(0x40F8_6A00_0000_0000),
6 => f64::from_bits(0x412E_8480_0000_0000),
7 => f64::from_bits(0x4163_12D0_0000_0000),
8 => f64::from_bits(0x4197_D784_0000_0000),
9 => f64::from_bits(0x41CD_CD65_0000_0000),
10 => f64::from_bits(0x4202_A05F_2000_0000),
11 => f64::from_bits(0x4237_4876_E800_0000),
12 => f64::from_bits(0x426D_1A94_A200_0000),
13 => f64::from_bits(0x42A2_309C_E540_0000),
14 => f64::from_bits(0x42D6_BCC4_1E90_0000),
15 => f64::from_bits(0x430C_6BF5_2634_0000),
16 => f64::from_bits(0x4341_C379_37E0_8000),
17 => f64::from_bits(0x4376_3457_85D8_A000),
18 => f64::from_bits(0x43AB_C16D_674E_C800),
19 => f64::from_bits(0x43E1_58E4_6091_3D00),
20 => f64::from_bits(0x4415_AF1D_78B5_8C40),
21 => f64::from_bits(0x444B_1AE4_D6E2_EF50),
22 => f64::from_bits(0x4480_F0CF_064D_D592),
_ => f64::from_bits(0),
}
}
fn biased_fp_to_float<F: FloatExt>(x: BiasedFp) -> F {
let mut word = x.m;
word |= (x.p_biased as u64) << F::SIG_BITS;
F::from_u64_bits(word)
}
Exact native-call excerpt from crate/dec2flt/decimal.rs:
fn can_use_fast_path<F: Lemire>(&self) -> bool {
F::MIN_EXPONENT_FAST_PATH <= self.exponent
&& self.exponent <= F::MAX_EXPONENT_DISGUISED_FAST_PATH
&& self.mantissa <= F::MAX_MANTISSA_FAST_PATH
&& !self.many_digits
}
if !self.can_use_fast_path::<F>() {
return None;
}
let value = if self.exponent <= F::MAX_EXPONENT_FAST_PATH {
// normal fast path
let value = F::from_u64(self.mantissa);
if self.exponent < 0 {
// Explicit trait calls preserve Rust arithmetic and resolve
// the generic output type that Charon leaves ambiguous.
core::ops::Div::div(value, F::pow10_fast_path((-self.exponent) as _))
} else {
core::ops::Mul::mul(value, F::pow10_fast_path(self.exponent as _))
}
} else {
// disguised fast path
let shift = self.exponent - F::MAX_EXPONENT_FAST_PATH;
let mantissa = self.mantissa.checked_mul(INT_POW10[shift as usize])?;
if mantissa > F::MAX_MANTISSA_FAST_PATH {
return None;
}
core::ops::Mul::mul(
F::from_u64(mantissa),
F::pow10_fast_path(F::MAX_EXPONENT_FAST_PATH as _),
)
};
if self.negative {
Some(core::ops::Neg::neg(value))
} else {
Some(value)
}
The preceding can_use_fast_path body, together with
MAX_MANTISSA_FAST_PATH = 1 << SIG_TOTAL_BITS and SIG_TOTAL_BITS = 53 for f64,
requires the exponent to lie between -22 and 37, the input mantissa to be at
most 2^53, and many_digits to be false. Consequently an ordinary arithmetic
call has a from_u64 operand in 0..=2^53. In its negative-exponent arm,
`-self.exponent` lies in 1..=22; in its nonnegative arm, `self.exponent` lies
in 0..=22. The disguised branch checks its multiplied mantissa against 2^53
before from_u64 and uses table index 22. The paired statement
Binary64NativeCallDomain does not assert this source reachability. It says
conditionally that a from_u64 argument at most 2^53 succeeds with a finite,
non-NaN word and that a table index at most 22 succeeds with a positive,
nonzero, finite, non-NaN word. Applying that conditional statement to the
guards just derived establishes those properties for the actual ordinary and
disguised calls, and in particular establishes that every executed divisor is
nonzero.
Exact special-value excerpt from crate/dec2flt/parse.rs:
let float = match (register, len) {
(INF_3, 3) => F::INFINITY,
(INF_8, 8) => F::INFINITY,
(NAN, 3) => F::NAN,
_ => return None,
};
if negative { Some(-float) } else { Some(float) }
Thus the executed special route is INFINITY or NAN followed by conditional
negation; it does not select NEG_INFINITY or NEG_NAN directly.
The number helper has the exact source body
pub fn parse_number(s: &[u8]) -> Option<Decimal> {
if let Some((float, rest)) = parse_partial_number(s) {
if rest == s.len() {
return Some(float);
}
}
None
}
It returns only the Decimal produced by parse_partial_number; there is no
float type parameter or float operation at this boundary.
The integer-tier helper has the source type and exact executable excerpts
below (long explanatory comments are elided). In particular it returns a raw
BiasedFp and contains no from_u64 cast, primitive float multiplication,
division, negation, or from_bits call:
pub fn compute_float<F: Float>(q: i64, mut w: u64) -> BiasedFp {
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let fp_error = BiasedFp::zero_pow2(-1);
// Short-circuit if the value can only be a literal 0 or infinity.
if w == 0 || q < F::SMALLEST_POWER_OF_TEN as i64 {
return fp_zero;
} else if q > F::LARGEST_POWER_OF_TEN as i64 {
return fp_inf;
}
// Normalize our significant digits, so the most-significant bit is set.
let lz = w.leading_zeros();
w <<= lz;
let (lo, hi) = compute_product_approx(q, w, F::SIG_BITS as usize + 3);
if lo == 0xFFFF_FFFF_FFFF_FFFF {
let inside_safe_exponent = (q >= -27) && (q <= 55);
if !inside_safe_exponent {
return fp_error;
}
}
let upperbit = (hi >> 63) as i32;
let mut mantissa = hi >> (upperbit + 64 - F::SIG_BITS as i32 - 3);
let mut power2 = power(q as i32) + upperbit - lz as i32 - F::EXP_MIN + 1;
if power2 <= 0 {
if -power2 + 1 >= 64 {
// Have more than 64 bits below the minimum exponent, must be 0.
return fp_zero;
}
// Have a subnormal value.
mantissa >>= -power2 + 1;
mantissa += mantissa & 1;
mantissa >>= 1;
power2 = (mantissa >= (1_u64 << F::SIG_BITS)) as i32;
return BiasedFp { m: mantissa, p_biased: power2 };
}
// Need to handle rounding ties. Normally, we need to round up,
// but if we fall right in between and we have an even basis, we
// need to round down.
if lo <= 1
&& q >= F::MIN_EXPONENT_ROUND_TO_EVEN as i64
&& q <= F::MAX_EXPONENT_ROUND_TO_EVEN as i64
&& mantissa & 0b11 == 0b01
&& (mantissa << (upperbit + 64 - F::SIG_BITS as i32 - 3)) == hi
{
// Zero the lowest bit, so we don't round up.
mantissa &= !1_u64;
}
// Round-to-even, then shift the significant digits into place.
mantissa += mantissa & 1;
mantissa >>= 1;
if mantissa >= (2_u64 << F::SIG_BITS) {
// Rounding up overflowed, so the carry bit is set. Set the
// mantissa to 1 (only the implicit, hidden bit is set) and
// increase the exponent.
mantissa = 1_u64 << F::SIG_BITS;
power2 += 1;
}
// Zero out the hidden bit.
mantissa &= !(1_u64 << F::SIG_BITS);
if power2 >= F::INFINITE_POWER {
// Exponent is above largest normal value, must be infinite.
return fp_inf;
}
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact slow-tier source body from crate/dec2flt/slow.rs:
pub(crate) fn parse_long_mantissa<F: Float>(s: &[u8]) -> BiasedFp {
const MAX_SHIFT: usize = 60;
const NUM_POWERS: usize = 19;
const POWERS: [u8; 19] =
[0, 3, 6, 9, 13, 16, 19, 23, 26, 29, 33, 36, 39, 43, 46, 49, 53, 56, 59];
let get_shift = |n| {
if n < NUM_POWERS { POWERS[n] as usize } else { MAX_SHIFT }
};
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let mut d = parse_decimal_seq(s);
// Short-circuit if the value can only be a literal 0 or infinity.
if d.num_digits == 0 || d.decimal_point < -324 {
return fp_zero;
} else if d.decimal_point >= 310 {
return fp_inf;
}
let mut exp2 = 0_i32;
let mut loop_result = None;
// Shift right toward (1/2 ... 1].
while d.decimal_point > 0 && loop_result.is_none() {
let n = d.decimal_point as usize;
let shift = get_shift(n);
d.right_shift(shift);
if d.decimal_point < -DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_zero);
} else {
exp2 += shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// Shift left toward (1/2 ... 1].
while d.decimal_point <= 0 && loop_result.is_none() {
let shift = if d.decimal_point == 0 {
match d.digits[0] {
digit if digit >= 5 => break,
0 | 1 => 2,
_ => 1,
}
} else {
get_shift((-d.decimal_point) as _)
};
d.left_shift(shift);
if d.decimal_point > DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_inf);
} else {
exp2 -= shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// We are now in the range [1/2 ... 1] but the binary format uses [1 ... 2].
exp2 -= 1;
while F::EXP_MIN > exp2 {
let mut n = (F::EXP_MIN - exp2) as usize;
if n > MAX_SHIFT {
n = MAX_SHIFT;
}
d.right_shift(n);
exp2 += n as i32;
}
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
// Shift the decimal to the hidden bit, and then round the value
// to get the high mantissa+1 bits.
d.left_shift(F::SIG_BITS as usize + 1);
let mut mantissa = d.round();
if mantissa >= (1_u64 << (F::SIG_BITS + 1)) {
// Rounding up overflowed to the carry bit, need to
// shift back to the hidden bit.
d.right_shift(1);
exp2 += 1;
mantissa = d.round();
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
}
let mut power2 = exp2 - F::EXP_MIN + 1;
if mantissa < (1_u64 << F::SIG_BITS) {
power2 -= 1;
}
// Zero out all the bits above the explicit mantissa bits.
mantissa &= (1_u64 << F::SIG_BITS) - 1;
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact final numeric-sign excerpt from crate/dec2flt/mod.rs:
let assembled_word = fp.m | ((fp.p_biased as u64) << F::SIG_BITS);
let assembly_result = biased_fp_to_float::<F>(fp);
let lexical_sign_applied = num.negative;
let result = if lexical_sign_applied {
core::ops::Neg::neg(assembly_result)
} else {
assembly_result
};
Thus a numeric execution that reaches the integer/slow selection route
assembles its selected pair with from_bits through biased_fp_to_float and only
then conditionally negates it. A successful try_fast_path returns earlier and
does not perform this assembly. compute_float and parse_long_mantissa produce
raw BiasedFp pairs and do not call from_u64, primitive float multiplication,
division, negation, or from_bits; they do, however, execute constants derived
from SIG_TOTAL_BITS before producing those pairs.
Retained structural-boundary evidence
-------------------------------------
Several adjacent structural bindings cite this same evidence record. Their
pinned library source identities are:
core/src/num/mod.rs
f0820f9dfb94999440c8cb4a349736fa21df7e5668e19b6b49e016ff67c05ce3
core/src/option.rs
7cf61204b05d98a95bc2e322d5fbfc1f4f91505109971917d9a7fb47151c50e6
core/src/slice/mod.rs
354992a6a3d69a0185eef9044a07ea5180e767bdb467aef55e69ee3d44317840
core/src/str/mod.rs
284b4c147b5d0497ce9146f6b96e564f196aed10411a62cdccf5fc5243d40f78
Exact ASCII-digit body from core/src/num/mod.rs:
pub const fn is_ascii_digit(&self) -> bool {
matches!(*self, b'0'..=b'9')
}
Exact Option control-flow bodies from core/src/option.rs:
fn branch(self) -> ControlFlow<Self::Residual, Self::Output> {
match self {
Some(v) => ControlFlow::Continue(v),
None => ControlFlow::Break(None),
}
}
fn from_residual(residual: Option<convert::Infallible>) -> Self {
match residual {
None => None,
}
}
Exact slice observation bodies from core/src/slice/mod.rs:
pub const fn first(&self) -> Option<&T> {
if let [first, ..] = self { Some(first) } else { None }
}
pub const fn split_first(&self) -> Option<(&T, &[T])> {
if let [first, tail @ ..] = self { Some((first, tail)) } else { None }
}
Exact string-byte body from core/src/str/mod.rs:
pub const fn as_bytes(&self) -> &[u8] {
// SAFETY: const sound because we transmute two types with the same layout
unsafe { mem::transmute(self) }
}
reference/model-evidence/binary64-probe.rs
#![feature(float_masks)]
use std::num::FpCategory;
fn bits(label: &str, value: f64) {
println!("{label}={:016x}", value.to_bits());
}
fn main() {
println!("target_arch={}", std::env::consts::ARCH);
println!("mantissa_digits={}", f64::MANTISSA_DIGITS);
println!("exponent_mask={:016x}", f64::EXPONENT_MASK);
println!("mantissa_mask={:016x}", f64::MANTISSA_MASK);
bits("nan", f64::NAN);
bits("infinity", f64::INFINITY);
bits("neg_infinity", f64::NEG_INFINITY);
for (label, value) in [
("nan_category", f64::NAN),
("infinity_category", f64::INFINITY),
("zero_category", 0.0),
("subnormal_category", f64::from_bits(1)),
("normal_category", 1.0),
] {
let category = match value.classify() {
FpCategory::Nan => "Nan",
FpCategory::Infinite => "Infinite",
FpCategory::Zero => "Zero",
FpCategory::Subnormal => "Subnormal",
FpCategory::Normal => "Normal",
};
println!("{label}={category}");
}
let payload_nan_word = 0x7ff0_0000_0000_0001_u64;
println!(
"from_bits_to_bits={:016x}",
f64::from_bits(payload_nan_word).to_bits()
);
bits("neg_payload_nan", -f64::from_bits(payload_nan_word));
bits("neg_zero", -0.0);
bits("subnormal_tie_to_even_zero", f64::from_bits(1) * 0.5);
bits("subnormal_tie_to_even_two", f64::from_bits(3) * 0.5);
bits("normal_division", 1.0 / 10.0);
bits("mul_negative_zero", -0.0 * 2.0);
bits("div_negative_zero", -1.0 / f64::INFINITY);
bits("div_negative_infinity", 1.0 / -0.0);
bits("mul_overflow", f64::MAX * (1.0 + f64::EPSILON));
println!("mul_zero_infinity_is_nan={}", (0.0 * f64::INFINITY).is_nan());
println!("div_zero_zero_is_nan={}", (0.0_f64 / 0.0_f64).is_nan());
println!("mul_nan_is_nan={}", (f64::NAN * 1.0).is_nan());
bits("cast_2_pow_53", (1_u64 << 53) as f64);
bits("cast_2_pow_53_plus_1", ((1_u64 << 53) + 1) as f64);
}
reference/model-evidence/setup-reproduction.txt
Fresh extraction and composition evidence for Preamble
======================================================
Scope
-----
This record was produced from the repository root on 2026-09-24. It records
the current frozen extraction configuration and a fresh execution of the
Cargo, Charon, and Aeneas stages. It is evidence about the bytes and commands
used to build the model, not evidence that any supplied GOAL is true.
Pinned configuration
--------------------
modeling-input/extraction.json contains exactly:
{
"crate": "crate",
"cargo_args": [],
"charon_args": [],
"aeneas_args": []
}
crate/Cargo.toml:5-22 names one edition-2024 library package, gives the
"default" feature an empty definition, gives "optimize_for_size" a distinct
feature, and sets overflow-checks=true in both development and release
profiles. The fresh run used the development profile. The configuration
probe below reported debug_assertions, overflow_checks, target_arch="x86_64",
target_pointer_width="64", target_env="gnu", and target_feature="sse2"; it
did not report feature="optimize_for_size". Its final Cargo line was:
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.08s
The exact probe command was:
env RUSTUP_TOOLCHAIN=nightly-2026-06-01 \
CARGO_TARGET_DIR=.trellis/scratch/preamble-cfg-target \
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/cargo \
rustc --offline \
--manifest-path .trellis/scratch/provenance-evidence-1790263924955098840/extraction/source/Cargo.toml \
--lib -- --print cfg
The materialized source used by that command is the source copy made by the
fresh extraction run described below. Relevant raw stdout was:
debug_assertions
feature="default"
overflow_checks
target_arch="x86_64"
target_endian="little"
target_env="gnu"
target_family="unix"
target_feature="sse"
target_feature="sse2"
target_feature="x87"
target_os="linux"
target_pointer_width="64"
Tool identities
---------------
These are the executable identities in modeling-input/tool-identities.json,
rechecked with sha256sum:
cargo
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/cargo
54e05dce8c9ca2f638cc3d87ec1a19425b5d0bf1f31aeb48cf4792aec5cadf27
cargo 1.98.0-nightly (fbb61be30 2026-05-26)
rustc
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
rustc 1.98.0-nightly (14210df0e 2026-05-31), LLVM 22.1.6
rustdoc
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc
2bf660d140310e28146e2c002dc6fcabd957c0a3b740be0419e6f8e5a9c87523
rustdoc 1.98.0-nightly (14210df0e 2026-05-31)
Charon
/home/leanagent/pv_spike/tools/charon/bin/charon
6490034f368ce98f3e7ae5a28bf71ed56d03bdf1e3712e71376b96fc55baeade
Charon 0.1.216, toolchain nightly-2026-06-01
Aeneas
/home/leanagent/pv_spike/tools/aeneas/bin/aeneas
9f446d2aaf59e8e705e36d05cb993f1c6ab0e97f8dc6fd2f19907a86ede30922
aeneas fa699427
Lean
/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin/lean
3e0d0d3d801675359f2d4cf9815bfdb417b20b92fdd9d48b3b14c95bbae28bbf
Lean 4.30.0-rc2, commit 3dc1a088b6d2d8eafe25a7cd7ec7b58d731bd7cc
Fresh extraction
----------------
The public reproduction command recorded by modeling-input/manifest.json is:
python3 .trellis/scripts/pv_modeling.py check-native . --fresh
For this record the same check_provenance implementation was invoked directly
so that its complete result could be retained without the CLI's bounded JSON
preview. It wrote:
.trellis/scratch/provenance-evidence-1790263924955098840/provenance.json
.trellis/scratch/provenance-evidence-1790263924955098840/extraction/observation.json
The extractor instantiated the empty argument lists above as these commands
(the output and cache paths are those beneath that scratch directory):
<cargo> check --offline
<charon> cargo --preset=aeneas --dest-file Generated/m.llbc -- --offline
<aeneas> -backend lean -dest Generated -emit-json Generated/m.llbc
The observation records exit code 0 for Cargo, Charon, and Aeneas. Cargo's raw
terminal result was:
Checking dec2flt-model v0.1.0 (.../extraction/source)
warning: feature `f16` is declared but not used
warning: `dec2flt-model` (lib) generated 1 warning
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.14s
Charon's raw terminal result was:
Compiling dec2flt-model v0.1.0 (.../extraction/source)
warning: feature `f16` is declared but not used
warning: `dec2flt-model` (lib) generated 1 warning
Finished `dev` profile [unoptimized + debuginfo] target(s) in 15.24s
Aeneas reported 203 prepasses, 50 globals, 87 opaque functions, 107
transparent functions, 49 trait declarations, and 85 trait implementations.
Its raw terminal result ended:
Generated: .../extraction/Generated/M.lean
Generated: .../extraction/Generated/translation.json
[Warn ] The crate contains extracted external, unknown definitions: ...
[Info ] Total execution time: 7.332373 seconds
The warning is the inventoried external boundary below. The fresh provenance
result had an empty error string, passed=true, no tool-identity differences,
and true values for every check, including fresh_extraction_succeeds,
fresh_model_export, crate_export, upstream_export, tool_identities_current,
bootstrap_receipt, and model_support_composition. The canonical current crate
tree digest reported by that result was:
b5ecf4d7e9dfa0337f1586ae0e865fbbe2dd384137ee6e2ad635f0d5d6e916a9
Generated bytes, placeholders, and axioms
-----------------------------------------
sha256sum gave the same digest for the fresh Generated/M.lean and the frozen
generated.lean:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692
The observation's raw-source placeholder count was 0. Compiling raw M.lean
without model support fails as diagnosed because F64 and the external boundary
are absent; four "declaration uses sorry" diagnostics are Lean error-recovery
consequences for F64-valued constants, not tokens in the generated source.
The pinned compatibility report has SHA-256
557a4924d55becf1b33d7dc7f9dfdf2b675c895ce4a9b6bee8a0622378e48d6a,
checks 2225 declarations, reports no unapproved axiom, and marks only the 64
declarations downstream of the missing boundary as pending. This is why the
24 operations below have separate authored model-support owners.
External boundary
-----------------
The exact command
python3 .trellis/scripts/pv_modeling.py inspect-native .
returned declaration_count=24 and retained the full index at
.trellis/scratch/inspect-native-1790264067166282471.json. The 24 names are:
F64.Insts.CoreCloneClone.clone
core.f64.F64.MANTISSA_DIGITS
core.f64.F64.NAN
core.f64.F64.INFINITY
core.f64.F64.NEG_INFINITY
core.f64.F64.EXPONENT_MASK
core.f64.F64.MANTISSA_MASK
core.f64.F64.classify
core.f64.F64.to_bits
core.f64.F64.from_bits
core.num.U8.is_ascii_digit
F64.Insts.CoreOpsArithMulF64F64.mul
F64.Insts.CoreOpsArithDivF64F64.div
F64.Insts.CoreOpsArithNegF64.neg
U64.Insts.CoreOpsBitBitAndU64U64.bitand
U64.Insts.CoreOpsBitBitOrU64U64.bitor
U64.Insts.CoreOpsBitShlU32U64.shl
U64.Insts.CoreOpsBitShrU32U64.shr
core.option.Option.Insts.CoreOpsTry_traitTry.branch
core.option.Option.Insts.CoreOpsTry_traitFromResidualOptionInfallible.from_residual
core.slice.Slice.first
core.slice.Slice.split_first
core.str.Str.as_bytes
F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64.from_u64
Tablet/model-support.json has exactly 24 bindings, one for each name. This
record establishes completeness of that inventory and its composition; the
semantic justification for an individual binding remains the responsibility
of that binding's paired definition node.
Composition
-----------
The exact command
python3 .trellis/scripts/pv_modeling.py compose-native . --check
returned matches=true, changed=false, no mismatched files, raw extraction hash
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692,
and both expected and actual Preamble hashes
15adb2db06b06e099d17070c2a373619ecdc481e32fc78d34054cd01fc7b492a.
The complete receipt is retained at
.trellis/scratch/compose-native-1790264071122343238.json.
reference/model-evidence/source-adaptation-delta.txt
Primary inventory and preservation analysis of the upstream-to-crate delta
============================================================================
Method and complete file inventory
----------------------------------
This record compares the supplied files in upstream/ with the frozen adapted
crate/. It treats the sources and their control flow as primary evidence; it
does not use a prior route decision as semantic proof and makes no assertion
that a supplied GOAL is true. The commands used were:
find upstream crate -type f ! -path '*/target/*' -print0 | sort -z |
xargs -0 sha256sum
for each supplied file f:
cmp -s upstream/$f crate/$f
diff -U0 upstream/$f crate/$f
The concatenated contextual diff of every supplied file has SHA-256
2eb0202ba9ae8092d6727dd2f3b824c29cb160b005960ccf2b15bfb804ed1217.
The complete inventory is:
supplied path upstream SHA-256 crate SHA-256 status
dec2flt/common.rs fc64094721ff23e08fcba013154d04dec3fe986cae5ffd73a20f86049980aace 4c4be815335a7b176527b1345e662890caa48181a0a4f814594339016cab18e changed
dec2flt/decimal.rs 3c164785e1bc3f3b48aa9c212dd6c4ab535fe828523af9fa584df4c7b1e60e0d 633658be803b7369b18feb098a8aa1b5f714a933d3b79ecbc4899a1b05f35beb changed
dec2flt/decimal_seq.rs c0c1c6028e3f57cefc3de7635a94788e9180f5ebcedc7a334ec8dbac786ec788 4aa4ecf9f31970033093d73238d4f2c72d433639bbe467c0741b185807380bd9 changed
dec2flt/fpu.rs 16cf9ec154d477ab3d4184a01fb4b9ed7c59f0228cc55589d393c40a61b19d8f 16cf9ec154d477ab3d4184a01fb4b9ed7c59f0228cc55589d393c40a61b19d8f identical
dec2flt/lemire.rs fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1 fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1 identical
dec2flt/mod.rs 7198e238c554b692405537a446b3526ad66805ec2900cd0e299f10c51402a44a b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012 changed
dec2flt/parse.rs 9daf21ab9445a84552535152f376eef8c30f3d5827296c0645f5952d3b22bbf1 50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f changed
dec2flt/slow.rs 43e7aba32d7431bbf0e1bbcb4c334eaffb23eb66891c7e45abe799c5235cc0d2 93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485 changed
dec2flt/table.rs 6eb59023784bd84cb6fb074c70da8a99bef72bc2a2ea179b0da457ca1ee00abb 6eb59023784bd84cb6fb074c70da8a99bef72bc2a2ea179b0da457ca1ee00abb identical
traits.rs 66a02c44d72dfcc3ddae7e34a290e390dabaf98c5911b283d2d97f2f0075a44e 9013270fb846edcb0bdf2abd0353f575fdd727974cba9e89bdab8bb4c2b4f0bf changed
The standalone package adds four files having no supplied counterpart:
crate/Cargo.toml 2040ce5dc92c51b5245113f97682b692b876aa57708b5c7c483425ba152943c8
crate/lib.rs 1df2b8bcb2f52068d05a6343923716d0ef4475abdef34a0de3fe7cb8dc2ba95b
crate/num/mod.rs d9ac4f964d124bd4660914dc4c80bbb14f48d7851f9a8edc71a0931e9fce37b3
crate/num/imp/mod.rs df09b97393e97b23b0a558c2fcbbf4e75dd9d68338f1e83f168bab80a37a31f1
Thus fpu.rs, lemire.rs, and the complete 671-line table.rs, including their
algorithmic constants and tables, are byte-identical. The following sections
account for every other file and every changed hunk.
Namespace and error shell
-------------------------
crate/lib.rs:1-12 is a no_std crate root that re-exports core::f64 and
core::ops and introduces the same num module path expected by the supplied
slice. crate/num/imp/mod.rs:1-10 uses path attributes to place traits.rs and
dec2flt/mod.rs at core::num::imp-like module names. These declarations add no
wrapper call or computation. crate/num/mod.rs:1 re-exports
core::num::FpCategory. crate/num/mod.rs:3-26 defines a local private
FloatErrorKind and ParseFloatError shell so the standalone package can name
the parser's error type. The pursued GOALs observe only panic versus normal
return and, on normal return, the outer Result's Ok/Err discriminant; they do
not observe the private error kind or formatting. No identity is asserted
between this local shell and an unpinned core error payload.
crate/Cargo.toml:5-22 selects the package, empty default features, and
checked-overflow profiles. The configuration and fresh build are independently
reproduced in setup-reproduction.txt.
Visibility, derives, and bounds
-------------------------------
upstream/dec2flt/mod.rs:90 versus crate/dec2flt/mod.rs:90 changes only the
visibility of the existing BiasedFp import so a goal-facing caller can name the
same type. It changes neither layout nor execution.
upstream/dec2flt/common.rs:68 and decimal.rs:28 and decimal_seq.rs:17 include
Debug derives. The corresponding crate spans common.rs:48-51,
decimal.rs:28-31, and decimal_seq.rs:17-20 remove only Debug. Copy, Clone,
PartialEq, Eq, and Default used by computation remain where present, and no
accepted observation formats these records.
upstream/traits.rs:11-52 versus crate/traits.rs:11-64 removes formatting from
Int, removes a redundant Copy supertrait from CastInto, and instantiates Int
only for u64. Every call of CastInto is through Int, which still requires
Copy; all retained concrete values are primitive Copy values. The removed
u16/u32 instances are associated only with the disabled f16/f32 formats.
upstream/traits.rs:55-76 versus crate/traits.rs:67-80 removes Add, Debug,
PartialEq, PartialOrd, Default, and Clone from Float while retaining Copy, Mul,
Div, and Neg. A search of all retained generic bodies shows no call using a
removed operation. upstream/dec2flt/decimal.rs:56-89 versus
crate/dec2flt/decimal.rs:59-111 and upstream/dec2flt/mod.rs:209-256 versus
crate/dec2flt/mod.rs:352-520 add direct Div, Mul, and Neg bounds already implied
by Lemire -> Float, and replace operator notation with calls to those same
traits. Rust desugars the original /, *, and unary - to these trait calls, so
the operands, call order, result, and admitted f64 specialization are unchanged.
Exact constants, tables, and specialized decoding
-------------------------------------------------
The source formulae and decimal-literal table were evaluated directly by the
pinned rustc using the retained source
reference/model-evidence/adaptation-constants-probe.rs. The command was:
R=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
P=reference/model-evidence/adaptation-constants-probe.rs
B=.trellis/scratch/adaptation-constants-probe
"$R" --edition 2024 --target x86_64-unknown-linux-gnu -C opt-level=0 "$P" -o "$B"
sha256sum "$P" "$B"
"$B"
The source hash was
b5a4a2cba0c08053cb9a816adb1ba5dbd160bf3928bdf5ccf56b7ae83aaa2aa5
and the resulting executable hash was
b02d2f6deb675f17d0dbdc22e57a67d7692689f7a2b0d7b125556c35c4b8a4a5.
Raw output was:
largest_power_of_ten=308
max_exponent_fast_path=22
max_exponent_disguised=37
neg_nan=fff8000000000000
pow10_0=3ff0000000000000
pow10_1=4024000000000000
pow10_2=4059000000000000
pow10_3=408f400000000000
pow10_4=40c3880000000000
pow10_5=40f86a0000000000
pow10_6=412e848000000000
pow10_7=416312d000000000
pow10_8=4197d78400000000
pow10_9=41cdcd6500000000
pow10_10=4202a05f20000000
pow10_11=42374876e8000000
pow10_12=426d1a94a2000000
pow10_13=42a2309ce5400000
pow10_14=42d6bcc41e900000
pow10_15=430c6bf526340000
pow10_16=4341c37937e08000
pow10_17=4376345785d8a000
pow10_18=43abc16d674ec800
pow10_19=43e158e460913d00
pow10_20=4415af1d78b58c40
pow10_21=444b1ae4d6e2ef50
pow10_22=4480f0cf064dd592
upstream/traits.rs:134-137 computes LARGEST_POWER_OF_TEN through a Float
default, and upstream/traits.rs:175-193 gives the generic integer_decode and
the helper used by that constant. crate/traits.rs:146 makes the constant an
associated requirement; crate/traits.rs:309-359 supplies the retained f64
values and decoder after substituting BITS=64, SIG_BITS=52, EXP_BIAS=1023,
EXPONENT_MASK, MANTISSA_MASK, and the u64 operations. Each source expression
then becomes exactly the corresponding crate expression: sign is bits>>63,
exponent is (bits & mask)>>52 cast to i16, the subnormal mantissa is shifted
once, the normal mantissa receives 1<<52, and 1023+52 is subtracted. The
resulting tuple and every bit operation are unchanged. The probe output above
shows that the computed f64 LARGEST_POWER_OF_TEN is 308 and that the source
-f64::NAN word is fff8000000000000, exactly crate/traits.rs:315-327; the
independent binary64-boundary.txt record fixes the masks and primitive bit
semantics used by the decoder.
upstream/dec2flt/mod.rs:118-129 gives the two Lemire default formulae.
crate/dec2flt/mod.rs:115-128 makes them associated requirements, and the
retained f64 instance at crate/dec2flt/mod.rs:217-220 supplies 22 and 37, the
integer results of the two source formulae for 53 significand bits.
upstream/dec2flt/mod.rs:176-181 indexes a 32-entry f64 table with exponent&31.
crate/dec2flt/mod.rs:222-251 performs the same masked selection using from_bits:
cases 0 through 22 are the exact pinned binary64 words printed above for 1e0 through 1e22 and
all other cases return positive zero, as did entries 23 through 31. The full
word list and the pinned float semantics are recorded in binary64-boundary.txt.
The analogous f16/f32 replacements at crate/dec2flt/mod.rs:145-215 and
crate/traits.rs:187-307 lie under cfg(any()) and cannot enter this build.
Whole-function from_u64 opacity
-------------------------------
upstream/dec2flt/mod.rs:184-188 and crate/dec2flt/mod.rs:254-263 have the same
f64 body: the same enabled debug_assert that v <= 1<<53, followed by the same
primitive `v as f64` cast. The sole semantic-boundary annotation is
#[charon::opaque] at crate line 259, syntactically attached to the function
item. It therefore hides the entire from_u64 body from translation: neither
the debug assertion nor the cast is transparent in the extraction. The
callers, their guards, and the surrounding native-path computation remain
transparent. The fresh external inventory contains the whole method as the
single external F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64.from_u64. Its
separately reviewed ModelF64FromU64 binding supplies exactly successful integer
conversion for v <= 2^53 and assertion failure otherwise.
Digit scans, slice patterns, and helper extraction
-------------------------------------------------
upstream/dec2flt/common.rs:14-53 supplies ByteSlice::parse_digits: repeatedly
split_first, wrapping-subtract ASCII zero, invoke the closure exactly when the
result is below 10, consume that byte, and stop at the first other byte.
crate/dec2flt/common.rs:11-36 removes only this method. Its complete set of
uses is replaced as follows.
* upstream/dec2flt/parse.rs:31-48 versus crate/dec2flt/parse.rs:31-58 keeps the
eight-byte loop, wrapping multiply/add, and then performs the same digit test,
accumulator update, and one-byte progress with an index. The local rename
num to chunk is lexical only.
* upstream/dec2flt/parse.rs:83-97 versus crate/dec2flt/parse.rs:131-153 expands
matches!/parse_digits into the same nonempty first-digit guard, the same
0x10000 bounded exponent update, the same first-nondigit suffix, and the same
final sign. The bound is tested before each checked multiply and addition,
exactly as in the closure.
* upstream/dec2flt/decimal_seq.rs:220-295 versus
crate/dec2flt/decimal_seq.rs:231-359 extracts parse_digits_into_seq,
parse_decimal_exponent, and count_trailing_zeros. The digit helpers use the
same wrapping byte test, forward order, try_add_digit state transition, and
0x10000 exponent guard. The reverse helper visits indices consumed_len-1
down to zero, increments only for ASCII zero, ignores a decimal point, and
stops at the first other byte, exactly the original iter().rev() loop.
In all these replacements, indexing occurs only under count<len or !is_empty,
so it has the same bounds as split_first. Slicing advances by exactly the same
one or eight bytes. No wrapping operation is replaced by checked arithmetic,
and no checked source operation is replaced by wrapping arithmetic.
upstream/dec2flt/parse.rs:155-181 versus crate/dec2flt/parse.rs:82-119 and
212-226 moves two loops into adjust_many_digit_count and parse_many_digits.
The prefix helper visits the same start bytes in the same order, performs the
same saturating_sub and checked isize subtraction, and stops on the same byte.
The retry helper makes the same first 19-digit call, tests the same threshold,
makes the same one-byte rebase and second call in the alternate branch,
computes the same offset with the same sign, casts it to i64, and performs the
same checked addition of exp_number last. Thus any large-input panic is
preserved rather than excluded.
upstream/dec2flt/decimal_seq.rs:226-295 versus
crate/dec2flt/decimal_seq.rs:284-359 replaces literal split_first patterns by
nonempty index tests. The leading-zero scans, optional decimal point, optional
exponent marker, optional exponent sign, and suffixes occur in the same order.
The crate's exp_sign*exp_num equals the source choice between exp_num and
-exp_num because exp_num is bounded by the unchanged 0x10000 guard; the final
decimal_point checked addition is in the same position. Casts of lengths to
i32 and every subsequent checked update remain unchanged, including their
large-input behavior.
Delayed returns
---------------
upstream/dec2flt/decimal_seq.rs:173-198 versus
crate/dec2flt/decimal_seq.rs:176-203 replaces one return inside right_shift's
loop by all_zero=true, exits because !all_zero is the loop guard, and returns
immediately afterward. No decimal_point, digit, index, or arithmetic update
occurs between the original and delayed return.
upstream/dec2flt/slow.rs:46-76 versus crate/dec2flt/slow.rs:46-94 replaces two
nested-loop returns by loop_result. In the zero branch it records fp_zero,
skips the source-skipped exp2 addition, exits through is_none(), and returns.
In the infinity branch it records fp_inf, skips the source-skipped exp2
subtraction, exits, and returns. On all other iterations it performs the same
shift, checked state changes, and exponent update. Lines 95-126 after these
returns are otherwise the source lines 77-110 unchanged.
Dispatcher trace and public projection
--------------------------------------
upstream/dec2flt/mod.rs:209-256 is the whole original dispatcher.
crate/dec2flt/mod.rs:285-349 declares trace data only, lines 352-505 execute the
instrumented dispatcher, and lines 507-520 define public dec2flt as its first
projection. Comparing the bodies gives the following branch-by-branch
correspondence.
* Both call as_bytes, inspect the first byte, reject empty input before a helper,
remove at most one sign, and reject a sign-only body. The trace stores the
already obtained body and Boolean sign.
* Both call parse_number first on that exact body. Only None calls
parse_inf_nan on the same body and sign. Its Some is returned directly and
its None returns invalid. The trace stores those existing Option values.
* Both overwrite only Decimal.negative, test the same compile-time
!optimize_for_size condition, call try_fast_path once, and return its Some
directly. The trace stores the copied Decimal and Option; Decimal is Copy.
* Both call compute_float first with num.exponent and num.mantissa. The crate's
second_compute_guard is exactly the first two conjuncts of the source
short-circuit. Therefore the checked mantissa+1 and second compute_float call
occur under precisely the source guard, in the same order. The same pair
comparison either retains fp or changes only p_biased to -1.
* Both test the post-comparison p_biased<0 once, call parse_long_mantissa on the
unchanged body exactly when true, and otherwise retain the same pair. The
trace records both guard and result without another helper call.
* The extra assembled_word expression is the same cast, shift, and OR performed
by biased_fp_to_float at upstream lines 202-206 and crate lines 278-282; these
integer operations neither panic nor mutate fp. Both then call assembly once
on the selected pair and apply unary negation exactly when num.negative.
Public dec2flt returns the identical Result first component.
Consequently the trace does not infer uncomputed data: it records the exact
variant; sign-stripped body and sign; numeric/special Options; fast-path input
and result; first and conditional second integer operands and results;
comparison, forced-deferral and post-comparison pair; slow guard and result;
selected pair; assembled word; pre-sign assembly word; sign-application fact;
and final word. Special and native direct returns create no selected pair.
All source call order, guards, checked arithmetic, mutable-state transitions,
panic points, and returned Result/F64 observations remain in place.
F64-only restriction
--------------------
crate/traits.rs:187-307 and crate/dec2flt/mod.rs:140-215 add cfg(any()) to the
f16/f32 Float, FloatExt, and Lemire implementations. crate/traits.rs:59-64
retains only u64 Int. The retained f64 implementations are
crate/traits.rs:309-360 and crate/dec2flt/mod.rs:217-264. Every goal-facing
function remains generic in the source and extraction, but each pursued source
subject specializes it to f64, whose associated integer is u64. There is no
dynamic format dispatch, so removing other impl blocks cannot change an f64
call, its native decision, checks, result word, NaN classification, fields, or
trace. The fresh boundary inventory in setup-reproduction.txt confirms that
no removed-format external remains.
Conclusion
----------
The inventory is exhaustive: three supplied files are identical, seven have
all hunks classified above, and the four added files are the package shell.
For the configured f64 specialization, the adapted crate has the same input
domains, branch order, guards, checked/wrapping distinction, state transitions,
panic versus normal behavior, and public/helper observations as the supplied
source. The only new observations are the trace fields, each copied from an
existing value or computed by the same pure assembly expression. This
conclusion is independent of whether any parser-correctness GOAL is true.
reference/model-evidence/source-valid-byte-slice.txt
Source-valid byte-slice domain evidence
Pinned toolchain commands, run from the repository root:
rustc --version --verbose
rustc --print cfg | rg 'target_(arch|pointer_width)'
rustc .trellis/scratch/source_valid_slice_probe.rs -o /tmp/source_valid_slice_probe
/tmp/source_valid_slice_probe
Raw configuration and probe output:
rustc 1.98.0-nightly (14210df0e 2026-05-31)
host: x86_64-unknown-linux-gnu
target_arch="x86_64"
target_pointer_width="64"
arch=x86_64
usize_bits=64
isize_max=9223372036854775807
u8_size=1
Pinned core-library source:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:801
states that a slice is never larger than isize::MAX bytes.
The same toolchain's core/src/num/int_macros.rs:47 defines a signed
integer's MAX as the corresponding unsigned MAX shifted right by one.
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/mod.rs:507-510
requires the contents of a str to remain valid UTF-8 and states that using a
str whose contents are not valid UTF-8 is undefined behavior.
Consequently, on the configured 64-bit target a &[u8] has at most
9223372036854775807 elements. This is a byte-count condition only: &[u8]
does not impose UTF-8 validity or restrict the values of its u8 elements.
A Rust str has the same inherent byte-length bound and additionally consists
of valid UTF-8 bytes.
Upstream → extraction-crate adaptation diff
--- upstream/dec2flt/common.rs
+++ crate/dec2flt/common.rs
@@ -11,10 +11,6 @@
/// Calculate the difference in length between two slices.
fn offset_from(&self, other: &Self) -> isize;
- /// Iteratively parse and consume digits from bytes.
- ///
- /// Returns the same bytes with consumed digits being elided. Breaks on invalid digits.
- fn parse_digits(&self, func: impl FnMut(u8)) -> &Self;
}
impl ByteSlice for [u8] {
@@ -35,22 +31,6 @@
other.len() as isize - self.len() as isize
}
- #[inline]
- fn parse_digits(&self, mut func: impl FnMut(u8)) -> &Self {
- let mut s = self;
-
- while let Some((c, rest)) = s.split_first() {
- let c = c.wrapping_sub(b'0');
- if c < 10 {
- func(c);
- s = rest;
- } else {
- break;
- }
- }
-
- s
- }
}
/// Determine if all characters in an 8-byte byte string (represented as a `u64`) are all decimal
@@ -65,7 +45,10 @@
/// A custom 64-bit floating point type, representing `m * 2^p`.
/// p is biased, so it be directly shifted into the exponent bits.
-#[derive(Debug, Copy, Clone, PartialEq, Eq, Default)]
+// Debug output is not an accepted public or trace observation. Removing only
+// that implementation preserves the fields, computational derives, and every
+// algorithm operation independently of GOAL truth.
+#[derive(Copy, Clone, PartialEq, Eq, Default)]
pub struct BiasedFp {
/// The significant digits.
pub m: u64,
Record details
| Kind | source adaptation site (file-level diff) |
|---|
Captured evidence identities
[
{
"path": "extraction-evidence/COMMAND.json",
"sha256": "611f36cefb2d895e7b22bd15eaccc1bd57d1b539d54cbd6337e84d0573719a9e",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "extraction-evidence/DETERMINISM.json",
"sha256": "360301745fc66c713335320b2e6a57ef7fb71e390cc7db31a6316a3902f7ef8f",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "extraction-evidence/RESULT.json",
"sha256": "62a89492b5592f404e065d2f8c9a89fd3f83cc59b772fed0eaa475138211d641",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "extraction-evidence/STDERR.bin",
"sha256": "ab4dc202d7a8a30a83ea62ed154710a48148d62230ff8b834700919d4e679c0c",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "extraction-evidence/STDOUT.bin",
"sha256": "604aae51d5c3394417224f655c7de355cc3e699d31fff49f93734706ad43f3f8",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "reference/model-evidence/adaptation-constants-probe.rs",
"sha256": "b5a4a2cba0c08053cb9a816adb1ba5dbd160bf3928bdf5ccf56b7ae83aaa2aa5",
"cited_by": [
"reference/model-evidence/source-adaptation-delta.txt"
]
},
{
"path": "reference/model-evidence/binary64-boundary.txt",
"sha256": "a17d82e7f789ce7f1fbb3922a66ec8806999e526532d637605263882d37b7abf",
"cited_by": [
"shared extraction boundary: Tablet/Preamble.tex",
"reference/model-evidence/source-adaptation-delta.txt"
]
},
{
"path": "reference/model-evidence/binary64-probe.rs",
"sha256": "68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e",
"cited_by": [
"reference/model-evidence/binary64-boundary.txt"
]
},
{
"path": "reference/model-evidence/setup-reproduction.txt",
"sha256": "f97c87d1af65130560f67d2bfcd737106b191c8fce1ed0174569ee218c4ee8d7",
"cited_by": [
"shared extraction boundary: Tablet/Preamble.tex",
"reference/model-evidence/source-adaptation-delta.txt"
]
},
{
"path": "reference/model-evidence/source-adaptation-delta.txt",
"sha256": "5502c71eb4420211d20bd8b6aade171c56cc2dce11d758a73bb93ef1083634ad",
"cited_by": [
"shared extraction boundary: Tablet/Preamble.tex"
]
},
{
"path": "reference/model-evidence/source-valid-byte-slice.txt",
"sha256": "e7887429c66a303cbba3b4df30080ddd9ba4d54e24f25f74947deb228b32b04f",
"cited_by": [
"shared extraction boundary: Tablet/Preamble.tex"
]
}
]crate/dec2flt/decimal.rs
Historical preparation document: preparation source-adaptation audit. It describes the state and obligations at preparation. This generation is captured in Modeling. Later closure and review results appear in the proof and modeling views. This original document remains available as history.
Shared extraction-boundary explanation (Preamble)
Preservation argument
Claim
x86_64-unknown-linux-gnu, the library's empty default feature set
(so optimize_for_size is disabled), the unoptimized development
profile, enabled debug assertions and integer overflow checks, and the target's
SSE2 precision-setting branch. Interpret each of the frozen extraction's 24
external operations by the separately justified model-support definition that
owns that operation. Under those interpretations, the composed Aeneas model
represents the supplied source's f64 specialization on all of these
domains, without a correctness premise: every Rust str whose bytes
are valid UTF-8 and whose 64-bit slice length is at most
\mathtt{isize::MAX}=2^{63}-1; every Rust &[u8] whose length is at
most that bound, with arbitrary byte contents; every Decimal; every
i64/u64 pair; and every BiasedFp.dec2flt::<f64> the relation preserves panic versus normal return,
the outer returned Result's Ok/Err discriminant,
and, on success, the exact binary64 word and its NaN classification. For
parse_number it preserves panic versus normal return, the
Option discriminant, and all four returned Decimal fields.
For parse_inf_nan::<f64> and
Decimal::try_fast_path::<f64> it preserves panic versus normal
return, None versus Some, and every returned word and NaN
classification. For compute_float::<f64> and
parse_long_mantissa::<f64> it preserves panic versus normal return
and both fields of every returned BiasedFp. For
biased_fp_to_float::<f64> it preserves panic versus normal return
and the exact returned word, with no restriction on the pair fields.dec2flt_with_trace::<f64> it additionally preserves the public
result and the complete trace: its control-flow variant; sign-stripped body and
lexical sign; numeric and special helper results; signed native input and
native result; first integer operands and result; second-call guard, optional
operands and result, comparison and forced-deferral fact; post-comparison pair;
slow-path guard and optional result; selected pair; assembled unsigned word;
pre-sign assembly result; sign-application fact; and final word. Public
dec2flt::<f64> is exactly the first projection of that interface, and
direct special and native returns select no raw pair.Proof
generated.lean, with SHA-256
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692.
The raw source has no placeholder. The compatibility check reports no
unapproved axiom and isolates exactly 24 external declarations; the complete
inventory equals the 24 entries of Tablet/model-support.json.
compose-native --check reports an unchanged composition and equal
expected and actual Preamble hashes. Thus all transparent extracted
declarations come from this one pinned source and every nontransparent
operation is explicit. The premise assigning each external its owning
definition deliberately leaves that definition's primitive-semantics proof to
its own preservation record; no primitive binding is re-proved here.fpu.rs, lemire.rs, and table.rs are
byte-identical. The standalone namespace and local error shell introduce no
call. The GOALs observe only panic versus normal return and the outer
Ok/Err discriminant, so the shell's private kind and
formatting are unobserved; no identity with an unpinned core error payload is
asserted. Visibility and removed Debug derives do not affect values.
The retained generic bodies use none of the removed trait operations;
the direct Mul, Div, and Neg clauses and calls are
the operations already implied by Lemire. Only the u64
integer instance and f64 Float, FloatExt, and
Lemire instances can participate in an f64 execution, so
disabling the u16/u32 and f16/f32
instances changes no such call.f64/u64 field widths and
masks; the fast-path bounds are the source formula results; and the match over
power-of-ten words has the same masked index and exact words as the source
array. The toolchain-specific words, masks, classifications, casts, and
rounding behavior are independently pinned in
reference/model-evidence/binary64-boundary.txt. The frozen
from_u64 Rust body is the enabled assertion followed by the
u64 as f64 conversion. Because #[charon::opaque] applies to
the whole function, neither operation inside that body is transparent in the
extraction: the whole method is the single inventoried external. Its callers,
their guards, and the surrounding native computation remain transparent.
ModelF64FromU64 supplies exactly successful integer conversion for
v\leq2^{53} and assertion failure otherwise.split_first loops. Extracted helpers receive the same
slices and mutable values, visit bytes in the same forward or reverse order,
and retain every saturating, wrapping, and checked operation. Delayed returns
set a result flag, execute no intervening state update, leave the loop through
that flag, and immediately return the source value. In particular, casts and
length-derived additions on very large inputs keep their original panic or
normal behavior rather than acquiring a convenience size bound.None, overwrite only the parsed sign, try the enabled native
path, make the first integer call, and evaluate the checked
mantissa+1 and second call under exactly the source short-circuit
guard. Both force the same deferral on unequal pairs, call the slow helper on
the unchanged body exactly for a negative post-comparison exponent, assemble
the same selected pair, and apply the sign last. Every trace field is either
one of those already computed values or the same nonmutating cast/shift/OR word
used by assembly. Hence recording the trace and discarding it in the public
projection changes neither call order, guards, state, panic points, nor any
returned observation.isize::MAX, while a Rust string adds UTF-8 validity. Sub-slicing
preserves the length bound and need not preserve an independent string type.
These facts establish all domains and observations in the claim independently
of the truth or falsity of any GOAL.Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
extraction-evidence/COMMAND.json
{"declaration_reader_sha256":"76f60cf0b867fad9727d2256d32b306c8cba3725216a4225d0f83add77fd6158","extraction_provenance":{"extraction_toolchain":{"aeneas":"fa699427","aeneas_revision":"fa699427cdfa8f604b891fb0223ef42883dd7dc4","cargo_features":[{"features":["default"],"name":"dec2flt-model","source":"workspace:Cargo.toml","version":"0.1.0"}],"cargo_lock_sha256":"bc644c624ded89197356bbd65d995054b7fb08e5bdfbaa38c6e7c7a53772cecf","cfg":["debug_assertions","emscripten_wasm_eh","feature=\"default\"","fmt_debug=\"full\"","overflow_checks","panic=\"unwind\"","relocation_model=\"pic\"","target_abi=\"\"","target_arch=\"x86_64\"","target_endian=\"little\"","target_env=\"gnu\"","target_family=\"unix\"","target_feature=\"fxsr\"","target_feature=\"sse\"","target_feature=\"sse2\"","target_feature=\"x87\"","target_has_atomic","target_has_atomic=\"16\"","target_has_atomic=\"32\"","target_has_atomic=\"64\"","target_has_atomic=\"8\"","target_has_atomic=\"ptr\"","target_has_atomic_load_store","target_has_atomic_load_store=\"16\"","target_has_atomic_load_store=\"32\"","target_has_atomic_load_store=\"64\"","target_has_atomic_load_store=\"8\"","target_has_atomic_load_store=\"ptr\"","target_has_atomic_primitive_alignment=\"16\"","target_has_atomic_primitive_alignment=\"32\"","target_has_atomic_primitive_alignment=\"64\"","target_has_atomic_primitive_alignment=\"8\"","target_has_atomic_primitive_alignment=\"ptr\"","target_has_reliable_f128","target_has_reliable_f16","target_has_reliable_f16_math","target_object_format=\"elf\"","target_os=\"linux\"","target_pointer_width=\"64\"","target_thread_local","target_vendor=\"unknown\"","ub_checks","unix"],"charon":"0.1.216","charon_revision":"6f058254eb741c12e9b388df07adaf7cc8aac8ed","extraction_profile":"dev","lean":"4.30.0-rc2","overflow_checks":true,"panic_strategy":"unwind","rustc_vv":"rustc 1.98.0-nightly (14210df0e 2026-05-31)\nbinary: rustc\ncommit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65\ncommit-date: 2026-05-31\nhost: x86_64-unknown-linux-gnu\nrelease: 1.98.0-nightly\nLLVM version: 22.1.6\n","target_pointer_width":64,"target_triple":"x86_64-unknown-linux-gnu"},"extractor_stack":["charon@0.1.216","aeneas@fa699427"],"extractor_toolchain_sha256":"18657da0659dee7889ed8a937b136c9abbc3a35e9050241cd8201c94fd232323","not_recorded":[],"source_digests":[{"source_file":"lib.rs","source_sha256":"b5ecf4d7e9dfa0337f1586ae0e865fbbe2dd384137ee6e2ad635f0d5d6e916a9"}]},"extractor_script_path":"/home/leanagent/pv_runs/trellis-native-implementation-v85/scripts/extract_pv_model.py","extractor_script_sha256":"cc1fdd50a78185c7bb564b715c554cb35d9fc09ed566b6c3d4f482f2d27ef67d","kernel_gate_checkers":[],"log_concatenation_order":"runs_then_steps_in_array_order","runs":[{"run_role":"primary","steps":[{"argv":["/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","-vV"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"rustc-version","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"},{"argv":["/home/leanagent/pv_spike/tools/charon/bin/charon","cargo","--preset=aeneas","--dest-file","/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/m.llbc","--","--offline","--profile","dev","--target","x86_64-unknown-linux-gnu"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_BUILD_TARGET":"x86_64-unknown-linux-gnu","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"charon","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"},{"argv":["/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/cargo","metadata","--format-version=1","--locked","--offline","--filter-platform","x86_64-unknown-linux-gnu"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_BUILD_TARGET":"x86_64-unknown-linux-gnu","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"cargo-metadata","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"},{"argv":["/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/cargo","rustc","--lib","--locked","--offline","--profile","dev","--target","x86_64-unknown-linux-gnu","--","--print","cfg"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_BUILD_TARGET":"x86_64-unknown-linux-gnu","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"cargo-rustc-cfg","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"},{"argv":["/home/leanagent/pv_spike/tools/aeneas/bin/aeneas","-backend","lean","-dest","/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen","-emit-json","/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/m.llbc"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_BUILD_TARGET":"x86_64-unknown-linux-gnu","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"aeneas","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"}]}],"schema":"trellis-extraction-command/v1","tool_source_checkouts":[]}extraction-evidence/DETERMINISM.json
{"comparison":"generated_lean_and_complete_tablet_tree_byte_identity","generated_lean_byte_identical":false,"generated_lean_sha256":["49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692"],"kernel_filespec_gate":"not_run","kernel_prescribed_region_gate":"not_run","namespace_context_roundtrip_gate":"not_run","result_sha256":"62a89492b5592f404e065d2f8c9a89fd3f83cc59b772fed0eaa475138211d641","run_roles":["primary"],"schema":"trellis-extraction-determinism/v2","status":"not_run","tablet_root_sha256":["57e6ec9f6e8b1d9d78ab01504bad58f93cb43308edf77f73f86b986b8d07b809"],"tablet_tree_byte_identical":false}extraction-evidence/RESULT.json
{"command_sha256":"611f36cefb2d895e7b22bd15eaccc1bd57d1b539d54cbd6337e84d0573719a9e","runs":[{"generated_lean_sha256":"49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692","run_role":"primary","steps":[{"exit_status":0,"stderr_byte_length":0,"stderr_offset":0,"stderr_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","stdout_byte_length":212,"stdout_offset":0,"stdout_sha256":"e6ea0da4a3301256a0a0dc0d67d11acf4e83e0d1bff5dd987ccdaa43708714bc","tool":"rustc-version"},{"exit_status":0,"stderr_byte_length":654,"stderr_offset":0,"stderr_sha256":"263937c29ffcb9cf54e452b2d8b89e015a1fa1a5b2a2d237292d4350d0b04aed","stdout_byte_length":0,"stdout_offset":212,"stdout_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","tool":"charon"},{"exit_status":0,"stderr_byte_length":0,"stderr_offset":654,"stderr_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","stdout_byte_length":2897,"stdout_offset":212,"stdout_sha256":"ec87d2fc78972115c1b9e436f373a890f3847397a741d91d720dce4fb36c7a90","tool":"cargo-metadata"},{"exit_status":0,"stderr_byte_length":302,"stderr_offset":654,"stderr_sha256":"7025c1726c90c35a211042d6945c25ff6015acaca27ee97a063465221b792806","stdout_byte_length":1062,"stdout_offset":3109,"stdout_sha256":"4081a320e6292139b4a673d225682dc054b77cba113b8c8a8fbb0593f824b713","tool":"cargo-rustc-cfg"},{"exit_status":0,"stderr_byte_length":7084,"stderr_offset":956,"stderr_sha256":"5f41394d8b12a0d7a6c9e7115108a06b20599eb7ddd611cff4b90b31ba2fe26a","stdout_byte_length":933,"stdout_offset":4171,"stdout_sha256":"376c43fb83e40962a056e9198dba4afb0cf8ecb0238e76c78bd9dbc32fbced4a","tool":"aeneas"}],"tablet_root_sha256":"57e6ec9f6e8b1d9d78ab01504bad58f93cb43308edf77f73f86b986b8d07b809"}],"schema":"trellis-extraction-result/v2","stderr_byte_length":8040,"stderr_sha256":"ab4dc202d7a8a30a83ea62ed154710a48148d62230ff8b834700919d4e679c0c","stdout_byte_length":5104,"stdout_sha256":"604aae51d5c3394417224f655c7de355cc3e699d31fff49f93734706ad43f3f8"}extraction-evidence/STDERR.bin
Compiling dec2flt-model v0.1.0 (/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate)
warning: feature `f16` is declared but not used
--> lib.rs:2:46
|
2 | #![feature(cfg_target_has_reliable_f16_f128, f16, float_masks, register_tool, staged_api)]
| ^^^
|
= note: `#[warn(unused_features)]` (part of `#[warn(unused)]`) on by default
warning: `dec2flt-model` (lib) generated 1 warning
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.41s
Compiling dec2flt-model v0.1.0 (/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.02s
[?25lApplied prepasses: [------------------------------------------------] 0/203 ⠋
Applied prepasses: [------------------------------------------------] 1/203 ⠋
Applied prepasses: [#####-------------------------------------------] 24/203 ⠋
Applied prepasses: [########----------------------------------------] 38/203 ⠋
Applied prepasses: [##############################------------------] 128/203 ⠙
Applied prepasses: [################################################] 203/203 ✔️
[?25h[?25lTranslated globals: [-------------------------------------------------] 0/50 ⠋
Translated globals: [#################################################] 50/50 ✔️
[?25h[?25lTranslated opaque functions: [----------------------------------------] 0/87 ⠋
Translated opaque functions: [########################################] 87/87 ✔️
[?25h[?25lTranslated transparent functions: [---------------------------------] 0/107 ⠋
Translated transparent functions: [---------------------------------] 1/107 ⠋
Translated transparent functions: [###------------------------------] 10/107 ⠙
Translated transparent functions: [######---------------------------] 22/107 ⠹
Translated transparent functions: [##########-----------------------] 35/107 ⠹
Translated transparent functions: [##############-------------------] 47/107 ⠹
Translated transparent functions: [###############------------------] 51/107 ⠸
Translated transparent functions: [################-----------------] 55/107 ⠸
Translated transparent functions: [##################---------------] 60/107 ⠼
Translated transparent functions: [##################---------------] 61/107 ⠼
Translated transparent functions: [###################--------------] 64/107 ⠼
Translated transparent functions: [####################-------------] 68/107 ⠼
Translated transparent functions: [#####################------------] 69/107 ⠴
Translated transparent functions: [#####################------------] 70/107 ⠴
Translated transparent functions: [######################-----------] 72/107 ⠦
Translated transparent functions: [######################-----------] 73/107 ⠦
Translated transparent functions: [######################-----------] 74/107 ⠧
Translated transparent functions: [#######################----------] 77/107 ⠧
Translated transparent functions: [########################---------] 78/107 ⠧
Translated transparent functions: [########################---------] 80/107 ⠇
Translated transparent functions: [#########################--------] 83/107 ⠇
Translated transparent functions: [#########################--------] 84/107 ⠇
Translated transparent functions: [##########################-------] 85/107 ⠏
Translated transparent functions: [##########################-------] 86/107 ⠏
Translated transparent functions: [##########################-------] 87/107 ⠋
Translated transparent functions: [###########################------] 88/107 ⠋
Translated transparent functions: [###########################------] 90/107 ⠋
Translated transparent functions: [############################-----] 91/107 ⠙
Translated transparent functions: [############################-----] 92/107 ⠙
Translated transparent functions: [############################-----] 93/107 ⠙
Translated transparent functions: [#############################----] 95/107 ⠹
Translated transparent functions: [#############################----] 97/107 ⠹
Translated transparent functions: [##############################---] 98/107 ⠸
Translated transparent functions: [##############################---] 99/107 ⠼
Translated transparent functions: [###############################--] 101/107 ⠼
Translated transparent functions: [###############################--] 102/107 ⠴
Translated transparent functions: [###############################--] 103/107 ⠦
Translated transparent functions: [################################-] 104/107 ⠦
Translated transparent functions: [################################-] 105/107 ⠧
Translated transparent functions: [################################-] 106/107 ⠇
Translated transparent functions: [#################################] 107/107 ⠏
Translated transparent functions: [#################################] 107/107 ✔️
[?25h[?25lTranslated trait declarations: [--------------------------------------] 0/49 ⠋
Translated trait declarations: [########################--------------] 31/49 ✔️
[?25h[?25lTranslated trait impls: [---------------------------------------------] 0/85 ⠋
Translated trait impls: [#################################------------] 64/85 ✔️
[?25h[?25lPost-processed translated opaque functions: [-------------------------] 0/87 ⠋
Post-processed translated opaque functions: [-------------------------] 1/87 ⠙
Post-processed translated opaque functions: [#########################] 87/87 ✔️
[?25h[?25lPost-processed translated transparent functions: [------------------] 0/107 ⠋
Post-processed translated transparent functions: [------------------] 1/107 ⠋
Post-processed translated transparent functions: [#-----------------] 10/107 ⠙
Post-processed translated transparent functions: [##----------------] 13/107 ⠹
Post-processed translated transparent functions: [##----------------] 16/107 ⠸
Post-processed translated transparent functions: [##----------------] 17/107 ⠸
Post-processed translated transparent functions: [###---------------] 18/107 ⠼
Post-processed translated transparent functions: [###---------------] 22/107 ⠼
Post-processed translated transparent functions: [####--------------] 24/107 ⠼
Post-processed translated transparent functions: [####--------------] 29/107 ⠴
Post-processed translated transparent functions: [#####-------------] 31/107 ⠴
Post-processed translated transparent functions: [#####-------------] 33/107 ⠴
Post-processed translated transparent functions: [######------------] 39/107 ⠴
Post-processed translated transparent functions: [########----------] 48/107 ⠦
Post-processed translated transparent functions: [#########---------] 56/107 ⠦
Post-processed translated transparent functions: [##########--------] 62/107 ⠦
Post-processed translated transparent functions: [###############---] 94/107 ⠦
Post-processed translated transparent functions: [################--] 99/107 ⠧
Post-processed translated transparent functions: [################--] 100/107 ⠇
Post-processed translated transparent functions: [#################-] 102/107 ⠇
Post-processed translated transparent functions: [#################-] 104/107 ⠏
Post-processed translated transparent functions: [#################-] 105/107 ⠋
Post-processed translated transparent functions: [##################] 107/107 ⠙
Post-processed translated transparent functions: [##################] 107/107 ✔️
[?25hextraction-evidence/STDOUT.bin
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
{"packages":[{"name":"dec2flt-model","version":"0.1.0","id":"path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0","license":null,"license_file":null,"description":null,"source":null,"dependencies":[],"targets":[{"kind":["lib"],"crate_types":["lib"],"name":"dec2flt_model","src_path":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate/lib.rs","edition":"2024","doc":true,"doctest":true,"test":true}],"features":{"default":[],"optimize_for_size":[]},"manifest_path":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate/Cargo.toml","metadata":null,"publish":[],"authors":[],"categories":[],"keywords":[],"readme":null,"repository":null,"homepage":null,"documentation":null,"edition":"2024","links":null,"default_run":null,"rust_version":null}],"workspace_members":["path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0"],"workspace_default_members":["path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0"],"resolve":{"nodes":[{"id":"path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0","dependencies":[],"deps":[],"features":["default"]}],"root":"path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0"},"target_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","build_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","version":1,"workspace_root":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate","metadata":null}
debug_assertions
emscripten_wasm_eh
feature="default"
fmt_debug="full"
overflow_checks
panic="unwind"
relocation_model="pic"
target_abi=""
target_arch="x86_64"
target_endian="little"
target_env="gnu"
target_family="unix"
target_feature="fxsr"
target_feature="sse"
target_feature="sse2"
target_feature="x87"
target_has_atomic
target_has_atomic="16"
target_has_atomic="32"
target_has_atomic="64"
target_has_atomic="8"
target_has_atomic="ptr"
target_has_atomic_load_store
target_has_atomic_load_store="16"
target_has_atomic_load_store="32"
target_has_atomic_load_store="64"
target_has_atomic_load_store="8"
target_has_atomic_load_store="ptr"
target_has_atomic_primitive_alignment="16"
target_has_atomic_primitive_alignment="32"
target_has_atomic_primitive_alignment="64"
target_has_atomic_primitive_alignment="8"
target_has_atomic_primitive_alignment="ptr"
target_has_reliable_f128
target_has_reliable_f16
target_has_reliable_f16_math
target_object_format="elf"
target_os="linux"
target_pointer_width="64"
target_thread_local
target_vendor="unknown"
ub_checks
unix
[[92mInfo[39m ] Imported: /home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/m.llbc
[[92mInfo[39m ] Generated: /home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/M.lean
[[92mInfo[39m ] Generated: /home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/translation.json
[[93mWarn[39m ] The crate contains extracted external, unknown definitions: we advise using the option -split-files to allow manually providing these definitions in separate files.
[[92mInfo[39m ] Total execution time: 7.245881 seconds
reference/model-evidence/adaptation-constants-probe.rs
fn main() {
let largest_power_of_ten = (1024_f64 / std::f64::consts::LOG2_10) as i32;
let log2_5 = std::f64::consts::LOG2_10 - 1.0;
let max_exponent_fast_path = (53_f64 / log2_5) as i64;
let max_exponent_disguised =
max_exponent_fast_path + (53_f64 / std::f64::consts::LOG2_10) as i64;
println!("largest_power_of_ten={largest_power_of_ten}");
println!("max_exponent_fast_path={max_exponent_fast_path}");
println!("max_exponent_disguised={max_exponent_disguised}");
println!("neg_nan={:016x}", (-f64::NAN).to_bits());
for (exponent, value) in IntoIterator::into_iter([
1e0_f64, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11,
1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, 1e20, 1e21, 1e22,
])
.enumerate()
{
println!("pow10_{exponent}={:016x}", value.to_bits());
}
}
reference/model-evidence/binary64-boundary.txt
Primary evidence for the binary64 boundary
==========================================
Scope and identities
--------------------
This record concerns the frozen x86_64-unknown-linux-gnu extraction, the
adapted Rust crate retained in this repository, and the installed toolchain
named by modeling-input/SETUP.md. The probe source is retained at
reference/model-evidence/binary64-probe.rs; no scratch source is required to
reproduce it.
Toolchain executable:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
Target:
x86_64-unknown-linux-gnu
rustc executable SHA-256:
162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
Probe source SHA-256:
68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
Compiled probe SHA-256:
f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
Frozen generated.lean SHA-256:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692
Frozen modeling-input/manifest.json SHA-256:
2fc182c0c7acccad30c449ca349b999759b84e8ed4ec9d590e8295e43eeec077
Approved Binary64ModelDefault.lean SHA-256 at the time of this record:
03ae48fb631e6242bd21bf95d0481b66acae05f8cab343c7ab279b3c116538a3
Exact reproduction commands
---------------------------
Run from the repository root:
R=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
P=reference/model-evidence/binary64-probe.rs
B=.trellis/scratch/binary64-probe
"$R" --version --verbose
sha256sum "$R"
sha256sum "$P"
"$R" --target x86_64-unknown-linux-gnu -C opt-level=0 "$P" -o "$B"
sha256sum "$B"
"$B"
Raw output
----------
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
rustc_sha256=162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
probe_sha256=68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
binary_sha256=f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
target_arch=x86_64
mantissa_digits=53
exponent_mask=7ff0000000000000
mantissa_mask=000fffffffffffff
nan=7ff8000000000000
infinity=7ff0000000000000
neg_infinity=fff0000000000000
nan_category=Nan
infinity_category=Infinite
zero_category=Zero
subnormal_category=Subnormal
normal_category=Normal
from_bits_to_bits=7ff0000000000001
neg_payload_nan=fff0000000000001
neg_zero=8000000000000000
subnormal_tie_to_even_zero=0000000000000000
subnormal_tie_to_even_two=0000000000000002
normal_division=3fb999999999999a
mul_negative_zero=8000000000000000
div_negative_zero=8000000000000000
div_negative_infinity=fff0000000000000
mul_overflow=7ff0000000000000
mul_zero_infinity_is_nan=true
div_zero_zero_is_nan=true
mul_nan_is_nan=true
cast_2_pow_53=4340000000000000
cast_2_pow_53_plus_1=4340000000000000
Pinned Rust library sources
---------------------------
The installed sources below belong to the same named toolchain. Their
SHA-256 identities are:
core/src/primitive_docs.rs
c4b8627dd67d5dac8f383f383a9e7ff1229ea43e7599610fc61988694cf0f3e5
core/src/num/f64.rs
84540a6a59e347c63caabe12cf895ba1239c76a50682471567007138fac1c618
core/src/clone.rs
23f9cfc80347fde6b8457d46fbf7a2b8d9f34c8c58601b0b6f714ca2f6d1976b
The exact relevant text of core/src/primitive_docs.rs is:
#[rustc_doc_primitive = "f64"]
#[doc(alias = "double")]
/// A 64-bit floating-point type (specifically, the "binary64" type defined in IEEE 754-2008).
///
/// This type is very similar to [`prim@f32`], but has increased precision by using twice as many
/// bits. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on double-precision
/// values][wikipedia] for more information.
The referenced primitive-f32 documentation supplies the common primitive
floating-point operation rules quoted next:
/// - −0.0: IEEE 754 floating-point numbers have a bit that indicates their sign, so −0.0 is a
/// possible value. For comparison −0.0 = +0.0, but floating-point operations can carry
/// the sign bit through arithmetic operations. This means −0.0 × +0.0 produces −0.0 and
/// a negative number rounded to a value smaller than a float can represent also produces −0.0.
/// - [∞](#associatedconstant.INFINITY) and
/// [−∞](#associatedconstant.NEG_INFINITY): these result from calculations
/// like `1.0 / 0.0`.
///
/// When a primitive operation (addition, subtraction, multiplication, or
/// division) is performed on this type, the result is rounded according to the
/// roundTiesToEven direction defined in IEEE 754-2008. That means:
///
/// - The result is the representable value closest to the true value, if there
/// is a unique closest representable value.
/// - If the true value is exactly half-way between two representable values,
/// the result is the one with an even least-significant binary digit.
/// - If the true value's magnitude is ≥ `f32::MAX` + 2<sup>(`f32::MAX_EXP` −
/// `f32::MANTISSA_DIGITS` − 1)</sup>, the result is ∞ or −∞ (preserving the
/// true value's sign).
The same file explicitly separates arithmetic NaN choice from exact bitwise
operations; its exact relevant text is:
/// The rules for NaN values differ between *arithmetic* and *non-arithmetic* (or "bitwise")
/// operations. The non-arithmetic operations are unary `-`, `abs`, `copysign`, `signum`,
/// `{to,from}_bits`, `{to,from}_{be,le,ne}_bytes` and `is_sign_{positive,negative}`. These
/// operations are guaranteed to exactly preserve the bit pattern of their input except for possibly
/// changing the sign bit.
///
/// The following rules apply when a NaN value is returned from an arithmetic operation:
/// - The result has a non-deterministic sign.
/// - The quiet bit and payload are non-deterministically chosen from
/// the following set of options:
///
/// - **Preferred NaN**: The quiet bit is set and the payload is all-zero.
/// - **Quieting NaN propagation**: The quiet bit is set and the payload is copied from any input
/// operand that is a NaN. If the inputs and outputs do not have the same payload size (i.e., for
/// `as` casts), then
/// - If the output is smaller than the input, low-order bits of the payload get dropped.
/// - If the output is larger than the input, the payload gets filled up with 0s in the low-order
/// bits.
/// - **Unchanged NaN propagation**: The quiet bit and payload are copied from any input operand
/// that is a NaN. If the inputs and outputs do not have the same size (i.e., for `as` casts), the
/// same rules as for "quieting NaN propagation" apply, with one caveat: if the output is smaller
/// than the input, dropping the low-order bits may result in a payload of 0; a payload of 0 is not
/// possible with a signaling NaN (the all-0 significand encodes an infinity) so unchanged NaN
/// propagation cannot occur with some inputs.
/// - **Target-specific NaN**: The quiet bit is set and the payload is picked from a target-specific
/// set of "extra" possible NaN payloads. The set can depend on the input operand values.
/// See the table below for the concrete NaNs this set contains on various targets.
///
/// | `target_arch` | Extra payloads possible on this platform |
/// |---------------|------------------------------------------|
/// | `aarch64`, `arm`, `arm64ec`, `loongarch64`, `powerpc` (except when `target_abi = "spe"`), `powerpc64`, `riscv32`, `riscv64`, `s390x`, `x86`, `x86_64` | None |
Thus the model's preferred quiet NaN is one permitted result whenever
multiplication or division returns NaN. This does not claim that arbitrary
Rust arithmetic NaNs have those exact bits. By contrast, unary negation and
bit conversion must preserve all non-sign bits exactly, including for every
NaN payload.
The exact relevant declarations in core/src/num/f64.rs are:
pub const MANTISSA_DIGITS: u32 = 53;
pub const NAN: f64 = 0.0_f64 / 0.0_f64;
pub const INFINITY: f64 = 1.0_f64 / 0.0_f64;
pub const NEG_INFINITY: f64 = -1.0_f64 / 0.0_f64;
pub const SIGN_MASK: u64 = 0x8000_0000_0000_0000;
pub const EXPONENT_MASK: u64 = 0x7ff0_0000_0000_0000;
pub const MANTISSA_MASK: u64 = 0x000f_ffff_ffff_ffff;
pub const fn classify(self) -> FpCategory {
// We used to have complicated logic here that avoids the simple bit-based tests to work
// around buggy codegen for x87 targets (see
// https://github.com/rust-lang/rust/issues/114479). However, some LLVM versions later, none
// of our tests is able to find any difference between the complicated and the naive
// version, so now we are back to the naive version.
let b = self.to_bits();
match (b & Self::MANTISSA_MASK, b & Self::EXPONENT_MASK) {
(0, Self::EXPONENT_MASK) => FpCategory::Infinite,
(_, Self::EXPONENT_MASK) => FpCategory::Nan,
(0, 0) => FpCategory::Zero,
(_, 0) => FpCategory::Subnormal,
_ => FpCategory::Normal,
}
}
pub const fn to_bits(self) -> u64 {
// SAFETY: `u64` is a plain old datatype so we can always transmute to it.
unsafe { mem::transmute(self) }
}
pub const fn from_bits(v: u64) -> Self {
// It turns out the safety issues with sNaN were overblown! Hooray!
// SAFETY: `u64` is a plain old datatype so we can always transmute from it.
unsafe { mem::transmute(v) }
}
The exact scalar clone body in core/src/clone.rs is:
impl const Clone for $t {
#[inline(always)]
fn clone(&self) -> Self {
*self
}
}
Frozen adapted source
---------------------
The relevant retained source file hashes are:
crate/traits.rs
9013270fb846edcb0bdf2abd0353f575fdd727974cba9e89bdab8bb4c2b4f0bf
crate/dec2flt/mod.rs
b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012
crate/dec2flt/parse.rs
50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f
crate/dec2flt/decimal.rs
633658be803b7369b18feb098a8aa1b5f714a933d3b79ecbc4899a1b05f35beb
crate/dec2flt/lemire.rs
fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1
crate/dec2flt/slow.rs
93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485
Exact constant and bit-conversion excerpt from crate/traits.rs:
impl Float for f64 {
type Int = u64;
const INFINITY: Self = Self::INFINITY;
const NEG_INFINITY: Self = Self::NEG_INFINITY;
const NAN: Self = Self::NAN;
// Bit-identical to the upstream `-f64::NAN`, without the unsupported
// compile-time float negation.
const NEG_NAN: Self = f64::from_bits(0xFFF8_0000_0000_0000);
const BITS: u32 = 64;
const SIG_TOTAL_BITS: u32 = Self::MANTISSA_DIGITS;
const EXP_MASK: Self::Int = Self::EXPONENT_MASK;
const SIG_MASK: Self::Int = Self::MANTISSA_MASK;
fn to_bits(self) -> Self::Int {
self.to_bits()
}
fn classify(self) -> FpCategory {
self.classify()
}
}
impl FloatExt for f64 {
#[inline]
fn from_u64_bits(v: u64) -> Self {
f64::from_bits(v)
}
Exact derived-constant defaults from crate/traits.rs:
/// The number of bits in the significand, *excluding* the hidden bit.
const SIG_BITS: u32 = Self::SIG_TOTAL_BITS - 1;
/// Number of bits in the exponent.
const EXP_BITS: u32 = Self::BITS - Self::SIG_BITS - 1;
/// The saturated (maximum bitpattern) value of the exponent, i.e. the infinite
/// representation.
///
/// This shifted fully right, use `EXP_MASK` for the shifted value.
const EXP_SAT: u32 = (1 << Self::EXP_BITS) - 1;
/// Signed version of `EXP_SAT` since we convert a lot.
const INFINITE_POWER: i32 = Self::EXP_SAT as i32;
/// The exponent bias value. This is also the maximum value of the exponent.
const EXP_BIAS: u32 = Self::EXP_SAT >> 1;
/// Minimum exponent value of normal values.
const EXP_MIN: i32 = -(Self::EXP_BIAS as i32 - 1);
Together with the f64-instance lines `BITS = 64` and
`SIG_TOTAL_BITS = Self::MANTISSA_DIGITS` in the preceding excerpt, these
defaults derive SIG_BITS, EXP_MIN, and INFINITE_POWER from the primitive
mantissa-digit constant rather than introducing independent parameters.
Exact checked cast excerpt from crate/dec2flt/mod.rs:
#[inline]
// This method is precisely the source `u64 as f64` primitive conversion.
// Aeneas cannot translate that cast; opacity is confined to the cast while
// the fast-path algorithm, its range proof obligation, and all calls stay
// visible in the extracted model.
#[charon::opaque]
fn from_u64(v: u64) -> Self {
debug_assert!(v <= Self::MAX_MANTISSA_FAST_PATH);
v as _
}
Here MAX_MANTISSA_FAST_PATH is the retained default 1 << 53. Therefore the
source succeeds only through the modeled branch v <= 2^53 in this debug
configuration; above it the debug assertion fails before the cast. On the
successful branch every integer is exactly representable, so the source cast
and the model rounder return the same word.
Exact power-table and assembly excerpts from crate/dec2flt/mod.rs:
/// Maximum mantissa for the fast-path (`1 << 53` for f64).
const MAX_MANTISSA_FAST_PATH: u64 = 1 << Self::SIG_TOTAL_BITS;
const MAX_EXPONENT_FAST_PATH: i64 = 22;
const MIN_EXPONENT_FAST_PATH: i64 = -Self::MAX_EXPONENT_FAST_PATH;
const MAX_EXPONENT_DISGUISED_FAST_PATH: i64 = 37;
fn pow10_fast_path(exponent: usize) -> Self {
// These bit patterns are exactly the source table's rounded binary64
// literals. The match is the same masked lookup; it merely keeps float
// constants out of Aeneas's unsupported constant interpreter.
match exponent & 31 {
0 => f64::from_bits(0x3FF0_0000_0000_0000),
1 => f64::from_bits(0x4024_0000_0000_0000),
2 => f64::from_bits(0x4059_0000_0000_0000),
3 => f64::from_bits(0x408F_4000_0000_0000),
4 => f64::from_bits(0x40C3_8800_0000_0000),
5 => f64::from_bits(0x40F8_6A00_0000_0000),
6 => f64::from_bits(0x412E_8480_0000_0000),
7 => f64::from_bits(0x4163_12D0_0000_0000),
8 => f64::from_bits(0x4197_D784_0000_0000),
9 => f64::from_bits(0x41CD_CD65_0000_0000),
10 => f64::from_bits(0x4202_A05F_2000_0000),
11 => f64::from_bits(0x4237_4876_E800_0000),
12 => f64::from_bits(0x426D_1A94_A200_0000),
13 => f64::from_bits(0x42A2_309C_E540_0000),
14 => f64::from_bits(0x42D6_BCC4_1E90_0000),
15 => f64::from_bits(0x430C_6BF5_2634_0000),
16 => f64::from_bits(0x4341_C379_37E0_8000),
17 => f64::from_bits(0x4376_3457_85D8_A000),
18 => f64::from_bits(0x43AB_C16D_674E_C800),
19 => f64::from_bits(0x43E1_58E4_6091_3D00),
20 => f64::from_bits(0x4415_AF1D_78B5_8C40),
21 => f64::from_bits(0x444B_1AE4_D6E2_EF50),
22 => f64::from_bits(0x4480_F0CF_064D_D592),
_ => f64::from_bits(0),
}
}
fn biased_fp_to_float<F: FloatExt>(x: BiasedFp) -> F {
let mut word = x.m;
word |= (x.p_biased as u64) << F::SIG_BITS;
F::from_u64_bits(word)
}
Exact native-call excerpt from crate/dec2flt/decimal.rs:
fn can_use_fast_path<F: Lemire>(&self) -> bool {
F::MIN_EXPONENT_FAST_PATH <= self.exponent
&& self.exponent <= F::MAX_EXPONENT_DISGUISED_FAST_PATH
&& self.mantissa <= F::MAX_MANTISSA_FAST_PATH
&& !self.many_digits
}
if !self.can_use_fast_path::<F>() {
return None;
}
let value = if self.exponent <= F::MAX_EXPONENT_FAST_PATH {
// normal fast path
let value = F::from_u64(self.mantissa);
if self.exponent < 0 {
// Explicit trait calls preserve Rust arithmetic and resolve
// the generic output type that Charon leaves ambiguous.
core::ops::Div::div(value, F::pow10_fast_path((-self.exponent) as _))
} else {
core::ops::Mul::mul(value, F::pow10_fast_path(self.exponent as _))
}
} else {
// disguised fast path
let shift = self.exponent - F::MAX_EXPONENT_FAST_PATH;
let mantissa = self.mantissa.checked_mul(INT_POW10[shift as usize])?;
if mantissa > F::MAX_MANTISSA_FAST_PATH {
return None;
}
core::ops::Mul::mul(
F::from_u64(mantissa),
F::pow10_fast_path(F::MAX_EXPONENT_FAST_PATH as _),
)
};
if self.negative {
Some(core::ops::Neg::neg(value))
} else {
Some(value)
}
The preceding can_use_fast_path body, together with
MAX_MANTISSA_FAST_PATH = 1 << SIG_TOTAL_BITS and SIG_TOTAL_BITS = 53 for f64,
requires the exponent to lie between -22 and 37, the input mantissa to be at
most 2^53, and many_digits to be false. Consequently an ordinary arithmetic
call has a from_u64 operand in 0..=2^53. In its negative-exponent arm,
`-self.exponent` lies in 1..=22; in its nonnegative arm, `self.exponent` lies
in 0..=22. The disguised branch checks its multiplied mantissa against 2^53
before from_u64 and uses table index 22. The paired statement
Binary64NativeCallDomain does not assert this source reachability. It says
conditionally that a from_u64 argument at most 2^53 succeeds with a finite,
non-NaN word and that a table index at most 22 succeeds with a positive,
nonzero, finite, non-NaN word. Applying that conditional statement to the
guards just derived establishes those properties for the actual ordinary and
disguised calls, and in particular establishes that every executed divisor is
nonzero.
Exact special-value excerpt from crate/dec2flt/parse.rs:
let float = match (register, len) {
(INF_3, 3) => F::INFINITY,
(INF_8, 8) => F::INFINITY,
(NAN, 3) => F::NAN,
_ => return None,
};
if negative { Some(-float) } else { Some(float) }
Thus the executed special route is INFINITY or NAN followed by conditional
negation; it does not select NEG_INFINITY or NEG_NAN directly.
The number helper has the exact source body
pub fn parse_number(s: &[u8]) -> Option<Decimal> {
if let Some((float, rest)) = parse_partial_number(s) {
if rest == s.len() {
return Some(float);
}
}
None
}
It returns only the Decimal produced by parse_partial_number; there is no
float type parameter or float operation at this boundary.
The integer-tier helper has the source type and exact executable excerpts
below (long explanatory comments are elided). In particular it returns a raw
BiasedFp and contains no from_u64 cast, primitive float multiplication,
division, negation, or from_bits call:
pub fn compute_float<F: Float>(q: i64, mut w: u64) -> BiasedFp {
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let fp_error = BiasedFp::zero_pow2(-1);
// Short-circuit if the value can only be a literal 0 or infinity.
if w == 0 || q < F::SMALLEST_POWER_OF_TEN as i64 {
return fp_zero;
} else if q > F::LARGEST_POWER_OF_TEN as i64 {
return fp_inf;
}
// Normalize our significant digits, so the most-significant bit is set.
let lz = w.leading_zeros();
w <<= lz;
let (lo, hi) = compute_product_approx(q, w, F::SIG_BITS as usize + 3);
if lo == 0xFFFF_FFFF_FFFF_FFFF {
let inside_safe_exponent = (q >= -27) && (q <= 55);
if !inside_safe_exponent {
return fp_error;
}
}
let upperbit = (hi >> 63) as i32;
let mut mantissa = hi >> (upperbit + 64 - F::SIG_BITS as i32 - 3);
let mut power2 = power(q as i32) + upperbit - lz as i32 - F::EXP_MIN + 1;
if power2 <= 0 {
if -power2 + 1 >= 64 {
// Have more than 64 bits below the minimum exponent, must be 0.
return fp_zero;
}
// Have a subnormal value.
mantissa >>= -power2 + 1;
mantissa += mantissa & 1;
mantissa >>= 1;
power2 = (mantissa >= (1_u64 << F::SIG_BITS)) as i32;
return BiasedFp { m: mantissa, p_biased: power2 };
}
// Need to handle rounding ties. Normally, we need to round up,
// but if we fall right in between and we have an even basis, we
// need to round down.
if lo <= 1
&& q >= F::MIN_EXPONENT_ROUND_TO_EVEN as i64
&& q <= F::MAX_EXPONENT_ROUND_TO_EVEN as i64
&& mantissa & 0b11 == 0b01
&& (mantissa << (upperbit + 64 - F::SIG_BITS as i32 - 3)) == hi
{
// Zero the lowest bit, so we don't round up.
mantissa &= !1_u64;
}
// Round-to-even, then shift the significant digits into place.
mantissa += mantissa & 1;
mantissa >>= 1;
if mantissa >= (2_u64 << F::SIG_BITS) {
// Rounding up overflowed, so the carry bit is set. Set the
// mantissa to 1 (only the implicit, hidden bit is set) and
// increase the exponent.
mantissa = 1_u64 << F::SIG_BITS;
power2 += 1;
}
// Zero out the hidden bit.
mantissa &= !(1_u64 << F::SIG_BITS);
if power2 >= F::INFINITE_POWER {
// Exponent is above largest normal value, must be infinite.
return fp_inf;
}
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact slow-tier source body from crate/dec2flt/slow.rs:
pub(crate) fn parse_long_mantissa<F: Float>(s: &[u8]) -> BiasedFp {
const MAX_SHIFT: usize = 60;
const NUM_POWERS: usize = 19;
const POWERS: [u8; 19] =
[0, 3, 6, 9, 13, 16, 19, 23, 26, 29, 33, 36, 39, 43, 46, 49, 53, 56, 59];
let get_shift = |n| {
if n < NUM_POWERS { POWERS[n] as usize } else { MAX_SHIFT }
};
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let mut d = parse_decimal_seq(s);
// Short-circuit if the value can only be a literal 0 or infinity.
if d.num_digits == 0 || d.decimal_point < -324 {
return fp_zero;
} else if d.decimal_point >= 310 {
return fp_inf;
}
let mut exp2 = 0_i32;
let mut loop_result = None;
// Shift right toward (1/2 ... 1].
while d.decimal_point > 0 && loop_result.is_none() {
let n = d.decimal_point as usize;
let shift = get_shift(n);
d.right_shift(shift);
if d.decimal_point < -DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_zero);
} else {
exp2 += shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// Shift left toward (1/2 ... 1].
while d.decimal_point <= 0 && loop_result.is_none() {
let shift = if d.decimal_point == 0 {
match d.digits[0] {
digit if digit >= 5 => break,
0 | 1 => 2,
_ => 1,
}
} else {
get_shift((-d.decimal_point) as _)
};
d.left_shift(shift);
if d.decimal_point > DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_inf);
} else {
exp2 -= shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// We are now in the range [1/2 ... 1] but the binary format uses [1 ... 2].
exp2 -= 1;
while F::EXP_MIN > exp2 {
let mut n = (F::EXP_MIN - exp2) as usize;
if n > MAX_SHIFT {
n = MAX_SHIFT;
}
d.right_shift(n);
exp2 += n as i32;
}
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
// Shift the decimal to the hidden bit, and then round the value
// to get the high mantissa+1 bits.
d.left_shift(F::SIG_BITS as usize + 1);
let mut mantissa = d.round();
if mantissa >= (1_u64 << (F::SIG_BITS + 1)) {
// Rounding up overflowed to the carry bit, need to
// shift back to the hidden bit.
d.right_shift(1);
exp2 += 1;
mantissa = d.round();
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
}
let mut power2 = exp2 - F::EXP_MIN + 1;
if mantissa < (1_u64 << F::SIG_BITS) {
power2 -= 1;
}
// Zero out all the bits above the explicit mantissa bits.
mantissa &= (1_u64 << F::SIG_BITS) - 1;
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact final numeric-sign excerpt from crate/dec2flt/mod.rs:
let assembled_word = fp.m | ((fp.p_biased as u64) << F::SIG_BITS);
let assembly_result = biased_fp_to_float::<F>(fp);
let lexical_sign_applied = num.negative;
let result = if lexical_sign_applied {
core::ops::Neg::neg(assembly_result)
} else {
assembly_result
};
Thus a numeric execution that reaches the integer/slow selection route
assembles its selected pair with from_bits through biased_fp_to_float and only
then conditionally negates it. A successful try_fast_path returns earlier and
does not perform this assembly. compute_float and parse_long_mantissa produce
raw BiasedFp pairs and do not call from_u64, primitive float multiplication,
division, negation, or from_bits; they do, however, execute constants derived
from SIG_TOTAL_BITS before producing those pairs.
Retained structural-boundary evidence
-------------------------------------
Several adjacent structural bindings cite this same evidence record. Their
pinned library source identities are:
core/src/num/mod.rs
f0820f9dfb94999440c8cb4a349736fa21df7e5668e19b6b49e016ff67c05ce3
core/src/option.rs
7cf61204b05d98a95bc2e322d5fbfc1f4f91505109971917d9a7fb47151c50e6
core/src/slice/mod.rs
354992a6a3d69a0185eef9044a07ea5180e767bdb467aef55e69ee3d44317840
core/src/str/mod.rs
284b4c147b5d0497ce9146f6b96e564f196aed10411a62cdccf5fc5243d40f78
Exact ASCII-digit body from core/src/num/mod.rs:
pub const fn is_ascii_digit(&self) -> bool {
matches!(*self, b'0'..=b'9')
}
Exact Option control-flow bodies from core/src/option.rs:
fn branch(self) -> ControlFlow<Self::Residual, Self::Output> {
match self {
Some(v) => ControlFlow::Continue(v),
None => ControlFlow::Break(None),
}
}
fn from_residual(residual: Option<convert::Infallible>) -> Self {
match residual {
None => None,
}
}
Exact slice observation bodies from core/src/slice/mod.rs:
pub const fn first(&self) -> Option<&T> {
if let [first, ..] = self { Some(first) } else { None }
}
pub const fn split_first(&self) -> Option<(&T, &[T])> {
if let [first, tail @ ..] = self { Some((first, tail)) } else { None }
}
Exact string-byte body from core/src/str/mod.rs:
pub const fn as_bytes(&self) -> &[u8] {
// SAFETY: const sound because we transmute two types with the same layout
unsafe { mem::transmute(self) }
}
reference/model-evidence/binary64-probe.rs
#![feature(float_masks)]
use std::num::FpCategory;
fn bits(label: &str, value: f64) {
println!("{label}={:016x}", value.to_bits());
}
fn main() {
println!("target_arch={}", std::env::consts::ARCH);
println!("mantissa_digits={}", f64::MANTISSA_DIGITS);
println!("exponent_mask={:016x}", f64::EXPONENT_MASK);
println!("mantissa_mask={:016x}", f64::MANTISSA_MASK);
bits("nan", f64::NAN);
bits("infinity", f64::INFINITY);
bits("neg_infinity", f64::NEG_INFINITY);
for (label, value) in [
("nan_category", f64::NAN),
("infinity_category", f64::INFINITY),
("zero_category", 0.0),
("subnormal_category", f64::from_bits(1)),
("normal_category", 1.0),
] {
let category = match value.classify() {
FpCategory::Nan => "Nan",
FpCategory::Infinite => "Infinite",
FpCategory::Zero => "Zero",
FpCategory::Subnormal => "Subnormal",
FpCategory::Normal => "Normal",
};
println!("{label}={category}");
}
let payload_nan_word = 0x7ff0_0000_0000_0001_u64;
println!(
"from_bits_to_bits={:016x}",
f64::from_bits(payload_nan_word).to_bits()
);
bits("neg_payload_nan", -f64::from_bits(payload_nan_word));
bits("neg_zero", -0.0);
bits("subnormal_tie_to_even_zero", f64::from_bits(1) * 0.5);
bits("subnormal_tie_to_even_two", f64::from_bits(3) * 0.5);
bits("normal_division", 1.0 / 10.0);
bits("mul_negative_zero", -0.0 * 2.0);
bits("div_negative_zero", -1.0 / f64::INFINITY);
bits("div_negative_infinity", 1.0 / -0.0);
bits("mul_overflow", f64::MAX * (1.0 + f64::EPSILON));
println!("mul_zero_infinity_is_nan={}", (0.0 * f64::INFINITY).is_nan());
println!("div_zero_zero_is_nan={}", (0.0_f64 / 0.0_f64).is_nan());
println!("mul_nan_is_nan={}", (f64::NAN * 1.0).is_nan());
bits("cast_2_pow_53", (1_u64 << 53) as f64);
bits("cast_2_pow_53_plus_1", ((1_u64 << 53) + 1) as f64);
}
reference/model-evidence/setup-reproduction.txt
Fresh extraction and composition evidence for Preamble
======================================================
Scope
-----
This record was produced from the repository root on 2026-09-24. It records
the current frozen extraction configuration and a fresh execution of the
Cargo, Charon, and Aeneas stages. It is evidence about the bytes and commands
used to build the model, not evidence that any supplied GOAL is true.
Pinned configuration
--------------------
modeling-input/extraction.json contains exactly:
{
"crate": "crate",
"cargo_args": [],
"charon_args": [],
"aeneas_args": []
}
crate/Cargo.toml:5-22 names one edition-2024 library package, gives the
"default" feature an empty definition, gives "optimize_for_size" a distinct
feature, and sets overflow-checks=true in both development and release
profiles. The fresh run used the development profile. The configuration
probe below reported debug_assertions, overflow_checks, target_arch="x86_64",
target_pointer_width="64", target_env="gnu", and target_feature="sse2"; it
did not report feature="optimize_for_size". Its final Cargo line was:
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.08s
The exact probe command was:
env RUSTUP_TOOLCHAIN=nightly-2026-06-01 \
CARGO_TARGET_DIR=.trellis/scratch/preamble-cfg-target \
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/cargo \
rustc --offline \
--manifest-path .trellis/scratch/provenance-evidence-1790263924955098840/extraction/source/Cargo.toml \
--lib -- --print cfg
The materialized source used by that command is the source copy made by the
fresh extraction run described below. Relevant raw stdout was:
debug_assertions
feature="default"
overflow_checks
target_arch="x86_64"
target_endian="little"
target_env="gnu"
target_family="unix"
target_feature="sse"
target_feature="sse2"
target_feature="x87"
target_os="linux"
target_pointer_width="64"
Tool identities
---------------
These are the executable identities in modeling-input/tool-identities.json,
rechecked with sha256sum:
cargo
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/cargo
54e05dce8c9ca2f638cc3d87ec1a19425b5d0bf1f31aeb48cf4792aec5cadf27
cargo 1.98.0-nightly (fbb61be30 2026-05-26)
rustc
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
rustc 1.98.0-nightly (14210df0e 2026-05-31), LLVM 22.1.6
rustdoc
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc
2bf660d140310e28146e2c002dc6fcabd957c0a3b740be0419e6f8e5a9c87523
rustdoc 1.98.0-nightly (14210df0e 2026-05-31)
Charon
/home/leanagent/pv_spike/tools/charon/bin/charon
6490034f368ce98f3e7ae5a28bf71ed56d03bdf1e3712e71376b96fc55baeade
Charon 0.1.216, toolchain nightly-2026-06-01
Aeneas
/home/leanagent/pv_spike/tools/aeneas/bin/aeneas
9f446d2aaf59e8e705e36d05cb993f1c6ab0e97f8dc6fd2f19907a86ede30922
aeneas fa699427
Lean
/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin/lean
3e0d0d3d801675359f2d4cf9815bfdb417b20b92fdd9d48b3b14c95bbae28bbf
Lean 4.30.0-rc2, commit 3dc1a088b6d2d8eafe25a7cd7ec7b58d731bd7cc
Fresh extraction
----------------
The public reproduction command recorded by modeling-input/manifest.json is:
python3 .trellis/scripts/pv_modeling.py check-native . --fresh
For this record the same check_provenance implementation was invoked directly
so that its complete result could be retained without the CLI's bounded JSON
preview. It wrote:
.trellis/scratch/provenance-evidence-1790263924955098840/provenance.json
.trellis/scratch/provenance-evidence-1790263924955098840/extraction/observation.json
The extractor instantiated the empty argument lists above as these commands
(the output and cache paths are those beneath that scratch directory):
<cargo> check --offline
<charon> cargo --preset=aeneas --dest-file Generated/m.llbc -- --offline
<aeneas> -backend lean -dest Generated -emit-json Generated/m.llbc
The observation records exit code 0 for Cargo, Charon, and Aeneas. Cargo's raw
terminal result was:
Checking dec2flt-model v0.1.0 (.../extraction/source)
warning: feature `f16` is declared but not used
warning: `dec2flt-model` (lib) generated 1 warning
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.14s
Charon's raw terminal result was:
Compiling dec2flt-model v0.1.0 (.../extraction/source)
warning: feature `f16` is declared but not used
warning: `dec2flt-model` (lib) generated 1 warning
Finished `dev` profile [unoptimized + debuginfo] target(s) in 15.24s
Aeneas reported 203 prepasses, 50 globals, 87 opaque functions, 107
transparent functions, 49 trait declarations, and 85 trait implementations.
Its raw terminal result ended:
Generated: .../extraction/Generated/M.lean
Generated: .../extraction/Generated/translation.json
[Warn ] The crate contains extracted external, unknown definitions: ...
[Info ] Total execution time: 7.332373 seconds
The warning is the inventoried external boundary below. The fresh provenance
result had an empty error string, passed=true, no tool-identity differences,
and true values for every check, including fresh_extraction_succeeds,
fresh_model_export, crate_export, upstream_export, tool_identities_current,
bootstrap_receipt, and model_support_composition. The canonical current crate
tree digest reported by that result was:
b5ecf4d7e9dfa0337f1586ae0e865fbbe2dd384137ee6e2ad635f0d5d6e916a9
Generated bytes, placeholders, and axioms
-----------------------------------------
sha256sum gave the same digest for the fresh Generated/M.lean and the frozen
generated.lean:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692
The observation's raw-source placeholder count was 0. Compiling raw M.lean
without model support fails as diagnosed because F64 and the external boundary
are absent; four "declaration uses sorry" diagnostics are Lean error-recovery
consequences for F64-valued constants, not tokens in the generated source.
The pinned compatibility report has SHA-256
557a4924d55becf1b33d7dc7f9dfdf2b675c895ce4a9b6bee8a0622378e48d6a,
checks 2225 declarations, reports no unapproved axiom, and marks only the 64
declarations downstream of the missing boundary as pending. This is why the
24 operations below have separate authored model-support owners.
External boundary
-----------------
The exact command
python3 .trellis/scripts/pv_modeling.py inspect-native .
returned declaration_count=24 and retained the full index at
.trellis/scratch/inspect-native-1790264067166282471.json. The 24 names are:
F64.Insts.CoreCloneClone.clone
core.f64.F64.MANTISSA_DIGITS
core.f64.F64.NAN
core.f64.F64.INFINITY
core.f64.F64.NEG_INFINITY
core.f64.F64.EXPONENT_MASK
core.f64.F64.MANTISSA_MASK
core.f64.F64.classify
core.f64.F64.to_bits
core.f64.F64.from_bits
core.num.U8.is_ascii_digit
F64.Insts.CoreOpsArithMulF64F64.mul
F64.Insts.CoreOpsArithDivF64F64.div
F64.Insts.CoreOpsArithNegF64.neg
U64.Insts.CoreOpsBitBitAndU64U64.bitand
U64.Insts.CoreOpsBitBitOrU64U64.bitor
U64.Insts.CoreOpsBitShlU32U64.shl
U64.Insts.CoreOpsBitShrU32U64.shr
core.option.Option.Insts.CoreOpsTry_traitTry.branch
core.option.Option.Insts.CoreOpsTry_traitFromResidualOptionInfallible.from_residual
core.slice.Slice.first
core.slice.Slice.split_first
core.str.Str.as_bytes
F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64.from_u64
Tablet/model-support.json has exactly 24 bindings, one for each name. This
record establishes completeness of that inventory and its composition; the
semantic justification for an individual binding remains the responsibility
of that binding's paired definition node.
Composition
-----------
The exact command
python3 .trellis/scripts/pv_modeling.py compose-native . --check
returned matches=true, changed=false, no mismatched files, raw extraction hash
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692,
and both expected and actual Preamble hashes
15adb2db06b06e099d17070c2a373619ecdc481e32fc78d34054cd01fc7b492a.
The complete receipt is retained at
.trellis/scratch/compose-native-1790264071122343238.json.
reference/model-evidence/source-adaptation-delta.txt
Primary inventory and preservation analysis of the upstream-to-crate delta
============================================================================
Method and complete file inventory
----------------------------------
This record compares the supplied files in upstream/ with the frozen adapted
crate/. It treats the sources and their control flow as primary evidence; it
does not use a prior route decision as semantic proof and makes no assertion
that a supplied GOAL is true. The commands used were:
find upstream crate -type f ! -path '*/target/*' -print0 | sort -z |
xargs -0 sha256sum
for each supplied file f:
cmp -s upstream/$f crate/$f
diff -U0 upstream/$f crate/$f
The concatenated contextual diff of every supplied file has SHA-256
2eb0202ba9ae8092d6727dd2f3b824c29cb160b005960ccf2b15bfb804ed1217.
The complete inventory is:
supplied path upstream SHA-256 crate SHA-256 status
dec2flt/common.rs fc64094721ff23e08fcba013154d04dec3fe986cae5ffd73a20f86049980aace 4c4be815335a7b176527b1345e662890caa48181a0a4f814594339016cab18e changed
dec2flt/decimal.rs 3c164785e1bc3f3b48aa9c212dd6c4ab535fe828523af9fa584df4c7b1e60e0d 633658be803b7369b18feb098a8aa1b5f714a933d3b79ecbc4899a1b05f35beb changed
dec2flt/decimal_seq.rs c0c1c6028e3f57cefc3de7635a94788e9180f5ebcedc7a334ec8dbac786ec788 4aa4ecf9f31970033093d73238d4f2c72d433639bbe467c0741b185807380bd9 changed
dec2flt/fpu.rs 16cf9ec154d477ab3d4184a01fb4b9ed7c59f0228cc55589d393c40a61b19d8f 16cf9ec154d477ab3d4184a01fb4b9ed7c59f0228cc55589d393c40a61b19d8f identical
dec2flt/lemire.rs fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1 fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1 identical
dec2flt/mod.rs 7198e238c554b692405537a446b3526ad66805ec2900cd0e299f10c51402a44a b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012 changed
dec2flt/parse.rs 9daf21ab9445a84552535152f376eef8c30f3d5827296c0645f5952d3b22bbf1 50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f changed
dec2flt/slow.rs 43e7aba32d7431bbf0e1bbcb4c334eaffb23eb66891c7e45abe799c5235cc0d2 93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485 changed
dec2flt/table.rs 6eb59023784bd84cb6fb074c70da8a99bef72bc2a2ea179b0da457ca1ee00abb 6eb59023784bd84cb6fb074c70da8a99bef72bc2a2ea179b0da457ca1ee00abb identical
traits.rs 66a02c44d72dfcc3ddae7e34a290e390dabaf98c5911b283d2d97f2f0075a44e 9013270fb846edcb0bdf2abd0353f575fdd727974cba9e89bdab8bb4c2b4f0bf changed
The standalone package adds four files having no supplied counterpart:
crate/Cargo.toml 2040ce5dc92c51b5245113f97682b692b876aa57708b5c7c483425ba152943c8
crate/lib.rs 1df2b8bcb2f52068d05a6343923716d0ef4475abdef34a0de3fe7cb8dc2ba95b
crate/num/mod.rs d9ac4f964d124bd4660914dc4c80bbb14f48d7851f9a8edc71a0931e9fce37b3
crate/num/imp/mod.rs df09b97393e97b23b0a558c2fcbbf4e75dd9d68338f1e83f168bab80a37a31f1
Thus fpu.rs, lemire.rs, and the complete 671-line table.rs, including their
algorithmic constants and tables, are byte-identical. The following sections
account for every other file and every changed hunk.
Namespace and error shell
-------------------------
crate/lib.rs:1-12 is a no_std crate root that re-exports core::f64 and
core::ops and introduces the same num module path expected by the supplied
slice. crate/num/imp/mod.rs:1-10 uses path attributes to place traits.rs and
dec2flt/mod.rs at core::num::imp-like module names. These declarations add no
wrapper call or computation. crate/num/mod.rs:1 re-exports
core::num::FpCategory. crate/num/mod.rs:3-26 defines a local private
FloatErrorKind and ParseFloatError shell so the standalone package can name
the parser's error type. The pursued GOALs observe only panic versus normal
return and, on normal return, the outer Result's Ok/Err discriminant; they do
not observe the private error kind or formatting. No identity is asserted
between this local shell and an unpinned core error payload.
crate/Cargo.toml:5-22 selects the package, empty default features, and
checked-overflow profiles. The configuration and fresh build are independently
reproduced in setup-reproduction.txt.
Visibility, derives, and bounds
-------------------------------
upstream/dec2flt/mod.rs:90 versus crate/dec2flt/mod.rs:90 changes only the
visibility of the existing BiasedFp import so a goal-facing caller can name the
same type. It changes neither layout nor execution.
upstream/dec2flt/common.rs:68 and decimal.rs:28 and decimal_seq.rs:17 include
Debug derives. The corresponding crate spans common.rs:48-51,
decimal.rs:28-31, and decimal_seq.rs:17-20 remove only Debug. Copy, Clone,
PartialEq, Eq, and Default used by computation remain where present, and no
accepted observation formats these records.
upstream/traits.rs:11-52 versus crate/traits.rs:11-64 removes formatting from
Int, removes a redundant Copy supertrait from CastInto, and instantiates Int
only for u64. Every call of CastInto is through Int, which still requires
Copy; all retained concrete values are primitive Copy values. The removed
u16/u32 instances are associated only with the disabled f16/f32 formats.
upstream/traits.rs:55-76 versus crate/traits.rs:67-80 removes Add, Debug,
PartialEq, PartialOrd, Default, and Clone from Float while retaining Copy, Mul,
Div, and Neg. A search of all retained generic bodies shows no call using a
removed operation. upstream/dec2flt/decimal.rs:56-89 versus
crate/dec2flt/decimal.rs:59-111 and upstream/dec2flt/mod.rs:209-256 versus
crate/dec2flt/mod.rs:352-520 add direct Div, Mul, and Neg bounds already implied
by Lemire -> Float, and replace operator notation with calls to those same
traits. Rust desugars the original /, *, and unary - to these trait calls, so
the operands, call order, result, and admitted f64 specialization are unchanged.
Exact constants, tables, and specialized decoding
-------------------------------------------------
The source formulae and decimal-literal table were evaluated directly by the
pinned rustc using the retained source
reference/model-evidence/adaptation-constants-probe.rs. The command was:
R=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
P=reference/model-evidence/adaptation-constants-probe.rs
B=.trellis/scratch/adaptation-constants-probe
"$R" --edition 2024 --target x86_64-unknown-linux-gnu -C opt-level=0 "$P" -o "$B"
sha256sum "$P" "$B"
"$B"
The source hash was
b5a4a2cba0c08053cb9a816adb1ba5dbd160bf3928bdf5ccf56b7ae83aaa2aa5
and the resulting executable hash was
b02d2f6deb675f17d0dbdc22e57a67d7692689f7a2b0d7b125556c35c4b8a4a5.
Raw output was:
largest_power_of_ten=308
max_exponent_fast_path=22
max_exponent_disguised=37
neg_nan=fff8000000000000
pow10_0=3ff0000000000000
pow10_1=4024000000000000
pow10_2=4059000000000000
pow10_3=408f400000000000
pow10_4=40c3880000000000
pow10_5=40f86a0000000000
pow10_6=412e848000000000
pow10_7=416312d000000000
pow10_8=4197d78400000000
pow10_9=41cdcd6500000000
pow10_10=4202a05f20000000
pow10_11=42374876e8000000
pow10_12=426d1a94a2000000
pow10_13=42a2309ce5400000
pow10_14=42d6bcc41e900000
pow10_15=430c6bf526340000
pow10_16=4341c37937e08000
pow10_17=4376345785d8a000
pow10_18=43abc16d674ec800
pow10_19=43e158e460913d00
pow10_20=4415af1d78b58c40
pow10_21=444b1ae4d6e2ef50
pow10_22=4480f0cf064dd592
upstream/traits.rs:134-137 computes LARGEST_POWER_OF_TEN through a Float
default, and upstream/traits.rs:175-193 gives the generic integer_decode and
the helper used by that constant. crate/traits.rs:146 makes the constant an
associated requirement; crate/traits.rs:309-359 supplies the retained f64
values and decoder after substituting BITS=64, SIG_BITS=52, EXP_BIAS=1023,
EXPONENT_MASK, MANTISSA_MASK, and the u64 operations. Each source expression
then becomes exactly the corresponding crate expression: sign is bits>>63,
exponent is (bits & mask)>>52 cast to i16, the subnormal mantissa is shifted
once, the normal mantissa receives 1<<52, and 1023+52 is subtracted. The
resulting tuple and every bit operation are unchanged. The probe output above
shows that the computed f64 LARGEST_POWER_OF_TEN is 308 and that the source
-f64::NAN word is fff8000000000000, exactly crate/traits.rs:315-327; the
independent binary64-boundary.txt record fixes the masks and primitive bit
semantics used by the decoder.
upstream/dec2flt/mod.rs:118-129 gives the two Lemire default formulae.
crate/dec2flt/mod.rs:115-128 makes them associated requirements, and the
retained f64 instance at crate/dec2flt/mod.rs:217-220 supplies 22 and 37, the
integer results of the two source formulae for 53 significand bits.
upstream/dec2flt/mod.rs:176-181 indexes a 32-entry f64 table with exponent&31.
crate/dec2flt/mod.rs:222-251 performs the same masked selection using from_bits:
cases 0 through 22 are the exact pinned binary64 words printed above for 1e0 through 1e22 and
all other cases return positive zero, as did entries 23 through 31. The full
word list and the pinned float semantics are recorded in binary64-boundary.txt.
The analogous f16/f32 replacements at crate/dec2flt/mod.rs:145-215 and
crate/traits.rs:187-307 lie under cfg(any()) and cannot enter this build.
Whole-function from_u64 opacity
-------------------------------
upstream/dec2flt/mod.rs:184-188 and crate/dec2flt/mod.rs:254-263 have the same
f64 body: the same enabled debug_assert that v <= 1<<53, followed by the same
primitive `v as f64` cast. The sole semantic-boundary annotation is
#[charon::opaque] at crate line 259, syntactically attached to the function
item. It therefore hides the entire from_u64 body from translation: neither
the debug assertion nor the cast is transparent in the extraction. The
callers, their guards, and the surrounding native-path computation remain
transparent. The fresh external inventory contains the whole method as the
single external F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64.from_u64. Its
separately reviewed ModelF64FromU64 binding supplies exactly successful integer
conversion for v <= 2^53 and assertion failure otherwise.
Digit scans, slice patterns, and helper extraction
-------------------------------------------------
upstream/dec2flt/common.rs:14-53 supplies ByteSlice::parse_digits: repeatedly
split_first, wrapping-subtract ASCII zero, invoke the closure exactly when the
result is below 10, consume that byte, and stop at the first other byte.
crate/dec2flt/common.rs:11-36 removes only this method. Its complete set of
uses is replaced as follows.
* upstream/dec2flt/parse.rs:31-48 versus crate/dec2flt/parse.rs:31-58 keeps the
eight-byte loop, wrapping multiply/add, and then performs the same digit test,
accumulator update, and one-byte progress with an index. The local rename
num to chunk is lexical only.
* upstream/dec2flt/parse.rs:83-97 versus crate/dec2flt/parse.rs:131-153 expands
matches!/parse_digits into the same nonempty first-digit guard, the same
0x10000 bounded exponent update, the same first-nondigit suffix, and the same
final sign. The bound is tested before each checked multiply and addition,
exactly as in the closure.
* upstream/dec2flt/decimal_seq.rs:220-295 versus
crate/dec2flt/decimal_seq.rs:231-359 extracts parse_digits_into_seq,
parse_decimal_exponent, and count_trailing_zeros. The digit helpers use the
same wrapping byte test, forward order, try_add_digit state transition, and
0x10000 exponent guard. The reverse helper visits indices consumed_len-1
down to zero, increments only for ASCII zero, ignores a decimal point, and
stops at the first other byte, exactly the original iter().rev() loop.
In all these replacements, indexing occurs only under count<len or !is_empty,
so it has the same bounds as split_first. Slicing advances by exactly the same
one or eight bytes. No wrapping operation is replaced by checked arithmetic,
and no checked source operation is replaced by wrapping arithmetic.
upstream/dec2flt/parse.rs:155-181 versus crate/dec2flt/parse.rs:82-119 and
212-226 moves two loops into adjust_many_digit_count and parse_many_digits.
The prefix helper visits the same start bytes in the same order, performs the
same saturating_sub and checked isize subtraction, and stops on the same byte.
The retry helper makes the same first 19-digit call, tests the same threshold,
makes the same one-byte rebase and second call in the alternate branch,
computes the same offset with the same sign, casts it to i64, and performs the
same checked addition of exp_number last. Thus any large-input panic is
preserved rather than excluded.
upstream/dec2flt/decimal_seq.rs:226-295 versus
crate/dec2flt/decimal_seq.rs:284-359 replaces literal split_first patterns by
nonempty index tests. The leading-zero scans, optional decimal point, optional
exponent marker, optional exponent sign, and suffixes occur in the same order.
The crate's exp_sign*exp_num equals the source choice between exp_num and
-exp_num because exp_num is bounded by the unchanged 0x10000 guard; the final
decimal_point checked addition is in the same position. Casts of lengths to
i32 and every subsequent checked update remain unchanged, including their
large-input behavior.
Delayed returns
---------------
upstream/dec2flt/decimal_seq.rs:173-198 versus
crate/dec2flt/decimal_seq.rs:176-203 replaces one return inside right_shift's
loop by all_zero=true, exits because !all_zero is the loop guard, and returns
immediately afterward. No decimal_point, digit, index, or arithmetic update
occurs between the original and delayed return.
upstream/dec2flt/slow.rs:46-76 versus crate/dec2flt/slow.rs:46-94 replaces two
nested-loop returns by loop_result. In the zero branch it records fp_zero,
skips the source-skipped exp2 addition, exits through is_none(), and returns.
In the infinity branch it records fp_inf, skips the source-skipped exp2
subtraction, exits, and returns. On all other iterations it performs the same
shift, checked state changes, and exponent update. Lines 95-126 after these
returns are otherwise the source lines 77-110 unchanged.
Dispatcher trace and public projection
--------------------------------------
upstream/dec2flt/mod.rs:209-256 is the whole original dispatcher.
crate/dec2flt/mod.rs:285-349 declares trace data only, lines 352-505 execute the
instrumented dispatcher, and lines 507-520 define public dec2flt as its first
projection. Comparing the bodies gives the following branch-by-branch
correspondence.
* Both call as_bytes, inspect the first byte, reject empty input before a helper,
remove at most one sign, and reject a sign-only body. The trace stores the
already obtained body and Boolean sign.
* Both call parse_number first on that exact body. Only None calls
parse_inf_nan on the same body and sign. Its Some is returned directly and
its None returns invalid. The trace stores those existing Option values.
* Both overwrite only Decimal.negative, test the same compile-time
!optimize_for_size condition, call try_fast_path once, and return its Some
directly. The trace stores the copied Decimal and Option; Decimal is Copy.
* Both call compute_float first with num.exponent and num.mantissa. The crate's
second_compute_guard is exactly the first two conjuncts of the source
short-circuit. Therefore the checked mantissa+1 and second compute_float call
occur under precisely the source guard, in the same order. The same pair
comparison either retains fp or changes only p_biased to -1.
* Both test the post-comparison p_biased<0 once, call parse_long_mantissa on the
unchanged body exactly when true, and otherwise retain the same pair. The
trace records both guard and result without another helper call.
* The extra assembled_word expression is the same cast, shift, and OR performed
by biased_fp_to_float at upstream lines 202-206 and crate lines 278-282; these
integer operations neither panic nor mutate fp. Both then call assembly once
on the selected pair and apply unary negation exactly when num.negative.
Public dec2flt returns the identical Result first component.
Consequently the trace does not infer uncomputed data: it records the exact
variant; sign-stripped body and sign; numeric/special Options; fast-path input
and result; first and conditional second integer operands and results;
comparison, forced-deferral and post-comparison pair; slow guard and result;
selected pair; assembled word; pre-sign assembly word; sign-application fact;
and final word. Special and native direct returns create no selected pair.
All source call order, guards, checked arithmetic, mutable-state transitions,
panic points, and returned Result/F64 observations remain in place.
F64-only restriction
--------------------
crate/traits.rs:187-307 and crate/dec2flt/mod.rs:140-215 add cfg(any()) to the
f16/f32 Float, FloatExt, and Lemire implementations. crate/traits.rs:59-64
retains only u64 Int. The retained f64 implementations are
crate/traits.rs:309-360 and crate/dec2flt/mod.rs:217-264. Every goal-facing
function remains generic in the source and extraction, but each pursued source
subject specializes it to f64, whose associated integer is u64. There is no
dynamic format dispatch, so removing other impl blocks cannot change an f64
call, its native decision, checks, result word, NaN classification, fields, or
trace. The fresh boundary inventory in setup-reproduction.txt confirms that
no removed-format external remains.
Conclusion
----------
The inventory is exhaustive: three supplied files are identical, seven have
all hunks classified above, and the four added files are the package shell.
For the configured f64 specialization, the adapted crate has the same input
domains, branch order, guards, checked/wrapping distinction, state transitions,
panic versus normal behavior, and public/helper observations as the supplied
source. The only new observations are the trace fields, each copied from an
existing value or computed by the same pure assembly expression. This
conclusion is independent of whether any parser-correctness GOAL is true.
reference/model-evidence/source-valid-byte-slice.txt
Source-valid byte-slice domain evidence
Pinned toolchain commands, run from the repository root:
rustc --version --verbose
rustc --print cfg | rg 'target_(arch|pointer_width)'
rustc .trellis/scratch/source_valid_slice_probe.rs -o /tmp/source_valid_slice_probe
/tmp/source_valid_slice_probe
Raw configuration and probe output:
rustc 1.98.0-nightly (14210df0e 2026-05-31)
host: x86_64-unknown-linux-gnu
target_arch="x86_64"
target_pointer_width="64"
arch=x86_64
usize_bits=64
isize_max=9223372036854775807
u8_size=1
Pinned core-library source:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:801
states that a slice is never larger than isize::MAX bytes.
The same toolchain's core/src/num/int_macros.rs:47 defines a signed
integer's MAX as the corresponding unsigned MAX shifted right by one.
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/mod.rs:507-510
requires the contents of a str to remain valid UTF-8 and states that using a
str whose contents are not valid UTF-8 is undefined behavior.
Consequently, on the configured 64-bit target a &[u8] has at most
9223372036854775807 elements. This is a byte-count condition only: &[u8]
does not impose UTF-8 validity or restrict the values of its u8 elements.
A Rust str has the same inherent byte-length bound and additionally consists
of valid UTF-8 bytes.
Upstream → extraction-crate adaptation diff
--- upstream/dec2flt/decimal.rs
+++ crate/dec2flt/decimal.rs
@@ -25,7 +25,10 @@
];
/// A floating point number with up to 64 bits of mantissa and an `i64` exponent.
-#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
+// Debug output is absent from the accepted observations. Removing only that
+// implementation leaves all fields, computational derives, and parser
+// operations unchanged independently of GOAL truth.
+#[derive(Clone, Copy, Default, PartialEq, Eq)]
pub struct Decimal {
pub exponent: i64,
pub mantissa: u64,
@@ -53,7 +56,17 @@
///
/// There is an exception: disguised fast-path cases, where we can shift
/// powers-of-10 from the exponent to the significant digits.
- pub fn try_fast_path<F: Lemire>(&self) -> Option<F> {
+ pub fn try_fast_path<
+ F: Lemire
+ + core::ops::Div<Output = F>
+ + core::ops::Mul<Output = F>
+ + core::ops::Neg<Output = F>,
+ >(
+ &self,
+ ) -> Option<F> {
+ // `Lemire` already entails these three operator bounds through
+ // `Float`; spelling them directly changes no admitted type. Charon
+ // needs the direct clauses to resolve each explicit call's `Output`.
// Here we need to work around <https://github.com/rust-lang/rust/issues/114479>.
// The fast path crucially depends on arithmetic being rounded to the correct number of bits
// without any intermediate rounding. On x86 (without SSE or SSE2) this requires the precision
@@ -70,9 +83,11 @@
// normal fast path
let value = F::from_u64(self.mantissa);
if self.exponent < 0 {
- value / F::pow10_fast_path((-self.exponent) as _)
+ // Explicit trait calls preserve Rust arithmetic and resolve
+ // the generic output type that Charon leaves ambiguous.
+ core::ops::Div::div(value, F::pow10_fast_path((-self.exponent) as _))
} else {
- value * F::pow10_fast_path(self.exponent as _)
+ core::ops::Mul::mul(value, F::pow10_fast_path(self.exponent as _))
}
} else {
// disguised fast path
@@ -81,9 +96,16 @@
if mantissa > F::MAX_MANTISSA_FAST_PATH {
return None;
}
- F::from_u64(mantissa) * F::pow10_fast_path(F::MAX_EXPONENT_FAST_PATH as _)
+ core::ops::Mul::mul(
+ F::from_u64(mantissa),
+ F::pow10_fast_path(F::MAX_EXPONENT_FAST_PATH as _),
+ )
};
- if self.negative { Some(-value) } else { Some(value) }
+ if self.negative {
+ Some(core::ops::Neg::neg(value))
+ } else {
+ Some(value)
+ }
}
}
Record details
| Kind | source adaptation site (file-level diff) |
|---|
Captured evidence identities
[
{
"path": "extraction-evidence/COMMAND.json",
"sha256": "611f36cefb2d895e7b22bd15eaccc1bd57d1b539d54cbd6337e84d0573719a9e",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "extraction-evidence/DETERMINISM.json",
"sha256": "360301745fc66c713335320b2e6a57ef7fb71e390cc7db31a6316a3902f7ef8f",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "extraction-evidence/RESULT.json",
"sha256": "62a89492b5592f404e065d2f8c9a89fd3f83cc59b772fed0eaa475138211d641",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "extraction-evidence/STDERR.bin",
"sha256": "ab4dc202d7a8a30a83ea62ed154710a48148d62230ff8b834700919d4e679c0c",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "extraction-evidence/STDOUT.bin",
"sha256": "604aae51d5c3394417224f655c7de355cc3e699d31fff49f93734706ad43f3f8",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "reference/model-evidence/adaptation-constants-probe.rs",
"sha256": "b5a4a2cba0c08053cb9a816adb1ba5dbd160bf3928bdf5ccf56b7ae83aaa2aa5",
"cited_by": [
"reference/model-evidence/source-adaptation-delta.txt"
]
},
{
"path": "reference/model-evidence/binary64-boundary.txt",
"sha256": "a17d82e7f789ce7f1fbb3922a66ec8806999e526532d637605263882d37b7abf",
"cited_by": [
"shared extraction boundary: Tablet/Preamble.tex",
"reference/model-evidence/source-adaptation-delta.txt"
]
},
{
"path": "reference/model-evidence/binary64-probe.rs",
"sha256": "68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e",
"cited_by": [
"reference/model-evidence/binary64-boundary.txt"
]
},
{
"path": "reference/model-evidence/setup-reproduction.txt",
"sha256": "f97c87d1af65130560f67d2bfcd737106b191c8fce1ed0174569ee218c4ee8d7",
"cited_by": [
"shared extraction boundary: Tablet/Preamble.tex",
"reference/model-evidence/source-adaptation-delta.txt"
]
},
{
"path": "reference/model-evidence/source-adaptation-delta.txt",
"sha256": "5502c71eb4420211d20bd8b6aade171c56cc2dce11d758a73bb93ef1083634ad",
"cited_by": [
"shared extraction boundary: Tablet/Preamble.tex"
]
},
{
"path": "reference/model-evidence/source-valid-byte-slice.txt",
"sha256": "e7887429c66a303cbba3b4df30080ddd9ba4d54e24f25f74947deb228b32b04f",
"cited_by": [
"shared extraction boundary: Tablet/Preamble.tex"
]
}
]crate/dec2flt/decimal_seq.rs
Historical preparation document: preparation source-adaptation audit. It describes the state and obligations at preparation. This generation is captured in Modeling. Later closure and review results appear in the proof and modeling views. This original document remains available as history.
Shared extraction-boundary explanation (Preamble)
Preservation argument
Claim
x86_64-unknown-linux-gnu, the library's empty default feature set
(so optimize_for_size is disabled), the unoptimized development
profile, enabled debug assertions and integer overflow checks, and the target's
SSE2 precision-setting branch. Interpret each of the frozen extraction's 24
external operations by the separately justified model-support definition that
owns that operation. Under those interpretations, the composed Aeneas model
represents the supplied source's f64 specialization on all of these
domains, without a correctness premise: every Rust str whose bytes
are valid UTF-8 and whose 64-bit slice length is at most
\mathtt{isize::MAX}=2^{63}-1; every Rust &[u8] whose length is at
most that bound, with arbitrary byte contents; every Decimal; every
i64/u64 pair; and every BiasedFp.dec2flt::<f64> the relation preserves panic versus normal return,
the outer returned Result's Ok/Err discriminant,
and, on success, the exact binary64 word and its NaN classification. For
parse_number it preserves panic versus normal return, the
Option discriminant, and all four returned Decimal fields.
For parse_inf_nan::<f64> and
Decimal::try_fast_path::<f64> it preserves panic versus normal
return, None versus Some, and every returned word and NaN
classification. For compute_float::<f64> and
parse_long_mantissa::<f64> it preserves panic versus normal return
and both fields of every returned BiasedFp. For
biased_fp_to_float::<f64> it preserves panic versus normal return
and the exact returned word, with no restriction on the pair fields.dec2flt_with_trace::<f64> it additionally preserves the public
result and the complete trace: its control-flow variant; sign-stripped body and
lexical sign; numeric and special helper results; signed native input and
native result; first integer operands and result; second-call guard, optional
operands and result, comparison and forced-deferral fact; post-comparison pair;
slow-path guard and optional result; selected pair; assembled unsigned word;
pre-sign assembly result; sign-application fact; and final word. Public
dec2flt::<f64> is exactly the first projection of that interface, and
direct special and native returns select no raw pair.Proof
generated.lean, with SHA-256
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692.
The raw source has no placeholder. The compatibility check reports no
unapproved axiom and isolates exactly 24 external declarations; the complete
inventory equals the 24 entries of Tablet/model-support.json.
compose-native --check reports an unchanged composition and equal
expected and actual Preamble hashes. Thus all transparent extracted
declarations come from this one pinned source and every nontransparent
operation is explicit. The premise assigning each external its owning
definition deliberately leaves that definition's primitive-semantics proof to
its own preservation record; no primitive binding is re-proved here.fpu.rs, lemire.rs, and table.rs are
byte-identical. The standalone namespace and local error shell introduce no
call. The GOALs observe only panic versus normal return and the outer
Ok/Err discriminant, so the shell's private kind and
formatting are unobserved; no identity with an unpinned core error payload is
asserted. Visibility and removed Debug derives do not affect values.
The retained generic bodies use none of the removed trait operations;
the direct Mul, Div, and Neg clauses and calls are
the operations already implied by Lemire. Only the u64
integer instance and f64 Float, FloatExt, and
Lemire instances can participate in an f64 execution, so
disabling the u16/u32 and f16/f32
instances changes no such call.f64/u64 field widths and
masks; the fast-path bounds are the source formula results; and the match over
power-of-ten words has the same masked index and exact words as the source
array. The toolchain-specific words, masks, classifications, casts, and
rounding behavior are independently pinned in
reference/model-evidence/binary64-boundary.txt. The frozen
from_u64 Rust body is the enabled assertion followed by the
u64 as f64 conversion. Because #[charon::opaque] applies to
the whole function, neither operation inside that body is transparent in the
extraction: the whole method is the single inventoried external. Its callers,
their guards, and the surrounding native computation remain transparent.
ModelF64FromU64 supplies exactly successful integer conversion for
v\leq2^{53} and assertion failure otherwise.split_first loops. Extracted helpers receive the same
slices and mutable values, visit bytes in the same forward or reverse order,
and retain every saturating, wrapping, and checked operation. Delayed returns
set a result flag, execute no intervening state update, leave the loop through
that flag, and immediately return the source value. In particular, casts and
length-derived additions on very large inputs keep their original panic or
normal behavior rather than acquiring a convenience size bound.None, overwrite only the parsed sign, try the enabled native
path, make the first integer call, and evaluate the checked
mantissa+1 and second call under exactly the source short-circuit
guard. Both force the same deferral on unequal pairs, call the slow helper on
the unchanged body exactly for a negative post-comparison exponent, assemble
the same selected pair, and apply the sign last. Every trace field is either
one of those already computed values or the same nonmutating cast/shift/OR word
used by assembly. Hence recording the trace and discarding it in the public
projection changes neither call order, guards, state, panic points, nor any
returned observation.isize::MAX, while a Rust string adds UTF-8 validity. Sub-slicing
preserves the length bound and need not preserve an independent string type.
These facts establish all domains and observations in the claim independently
of the truth or falsity of any GOAL.Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
extraction-evidence/COMMAND.json
{"declaration_reader_sha256":"76f60cf0b867fad9727d2256d32b306c8cba3725216a4225d0f83add77fd6158","extraction_provenance":{"extraction_toolchain":{"aeneas":"fa699427","aeneas_revision":"fa699427cdfa8f604b891fb0223ef42883dd7dc4","cargo_features":[{"features":["default"],"name":"dec2flt-model","source":"workspace:Cargo.toml","version":"0.1.0"}],"cargo_lock_sha256":"bc644c624ded89197356bbd65d995054b7fb08e5bdfbaa38c6e7c7a53772cecf","cfg":["debug_assertions","emscripten_wasm_eh","feature=\"default\"","fmt_debug=\"full\"","overflow_checks","panic=\"unwind\"","relocation_model=\"pic\"","target_abi=\"\"","target_arch=\"x86_64\"","target_endian=\"little\"","target_env=\"gnu\"","target_family=\"unix\"","target_feature=\"fxsr\"","target_feature=\"sse\"","target_feature=\"sse2\"","target_feature=\"x87\"","target_has_atomic","target_has_atomic=\"16\"","target_has_atomic=\"32\"","target_has_atomic=\"64\"","target_has_atomic=\"8\"","target_has_atomic=\"ptr\"","target_has_atomic_load_store","target_has_atomic_load_store=\"16\"","target_has_atomic_load_store=\"32\"","target_has_atomic_load_store=\"64\"","target_has_atomic_load_store=\"8\"","target_has_atomic_load_store=\"ptr\"","target_has_atomic_primitive_alignment=\"16\"","target_has_atomic_primitive_alignment=\"32\"","target_has_atomic_primitive_alignment=\"64\"","target_has_atomic_primitive_alignment=\"8\"","target_has_atomic_primitive_alignment=\"ptr\"","target_has_reliable_f128","target_has_reliable_f16","target_has_reliable_f16_math","target_object_format=\"elf\"","target_os=\"linux\"","target_pointer_width=\"64\"","target_thread_local","target_vendor=\"unknown\"","ub_checks","unix"],"charon":"0.1.216","charon_revision":"6f058254eb741c12e9b388df07adaf7cc8aac8ed","extraction_profile":"dev","lean":"4.30.0-rc2","overflow_checks":true,"panic_strategy":"unwind","rustc_vv":"rustc 1.98.0-nightly (14210df0e 2026-05-31)\nbinary: rustc\ncommit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65\ncommit-date: 2026-05-31\nhost: x86_64-unknown-linux-gnu\nrelease: 1.98.0-nightly\nLLVM version: 22.1.6\n","target_pointer_width":64,"target_triple":"x86_64-unknown-linux-gnu"},"extractor_stack":["charon@0.1.216","aeneas@fa699427"],"extractor_toolchain_sha256":"18657da0659dee7889ed8a937b136c9abbc3a35e9050241cd8201c94fd232323","not_recorded":[],"source_digests":[{"source_file":"lib.rs","source_sha256":"b5ecf4d7e9dfa0337f1586ae0e865fbbe2dd384137ee6e2ad635f0d5d6e916a9"}]},"extractor_script_path":"/home/leanagent/pv_runs/trellis-native-implementation-v85/scripts/extract_pv_model.py","extractor_script_sha256":"cc1fdd50a78185c7bb564b715c554cb35d9fc09ed566b6c3d4f482f2d27ef67d","kernel_gate_checkers":[],"log_concatenation_order":"runs_then_steps_in_array_order","runs":[{"run_role":"primary","steps":[{"argv":["/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","-vV"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"rustc-version","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"},{"argv":["/home/leanagent/pv_spike/tools/charon/bin/charon","cargo","--preset=aeneas","--dest-file","/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/m.llbc","--","--offline","--profile","dev","--target","x86_64-unknown-linux-gnu"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_BUILD_TARGET":"x86_64-unknown-linux-gnu","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"charon","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"},{"argv":["/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/cargo","metadata","--format-version=1","--locked","--offline","--filter-platform","x86_64-unknown-linux-gnu"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_BUILD_TARGET":"x86_64-unknown-linux-gnu","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"cargo-metadata","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"},{"argv":["/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/cargo","rustc","--lib","--locked","--offline","--profile","dev","--target","x86_64-unknown-linux-gnu","--","--print","cfg"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_BUILD_TARGET":"x86_64-unknown-linux-gnu","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"cargo-rustc-cfg","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"},{"argv":["/home/leanagent/pv_spike/tools/aeneas/bin/aeneas","-backend","lean","-dest","/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen","-emit-json","/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/m.llbc"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_BUILD_TARGET":"x86_64-unknown-linux-gnu","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"aeneas","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"}]}],"schema":"trellis-extraction-command/v1","tool_source_checkouts":[]}extraction-evidence/DETERMINISM.json
{"comparison":"generated_lean_and_complete_tablet_tree_byte_identity","generated_lean_byte_identical":false,"generated_lean_sha256":["49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692"],"kernel_filespec_gate":"not_run","kernel_prescribed_region_gate":"not_run","namespace_context_roundtrip_gate":"not_run","result_sha256":"62a89492b5592f404e065d2f8c9a89fd3f83cc59b772fed0eaa475138211d641","run_roles":["primary"],"schema":"trellis-extraction-determinism/v2","status":"not_run","tablet_root_sha256":["57e6ec9f6e8b1d9d78ab01504bad58f93cb43308edf77f73f86b986b8d07b809"],"tablet_tree_byte_identical":false}extraction-evidence/RESULT.json
{"command_sha256":"611f36cefb2d895e7b22bd15eaccc1bd57d1b539d54cbd6337e84d0573719a9e","runs":[{"generated_lean_sha256":"49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692","run_role":"primary","steps":[{"exit_status":0,"stderr_byte_length":0,"stderr_offset":0,"stderr_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","stdout_byte_length":212,"stdout_offset":0,"stdout_sha256":"e6ea0da4a3301256a0a0dc0d67d11acf4e83e0d1bff5dd987ccdaa43708714bc","tool":"rustc-version"},{"exit_status":0,"stderr_byte_length":654,"stderr_offset":0,"stderr_sha256":"263937c29ffcb9cf54e452b2d8b89e015a1fa1a5b2a2d237292d4350d0b04aed","stdout_byte_length":0,"stdout_offset":212,"stdout_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","tool":"charon"},{"exit_status":0,"stderr_byte_length":0,"stderr_offset":654,"stderr_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","stdout_byte_length":2897,"stdout_offset":212,"stdout_sha256":"ec87d2fc78972115c1b9e436f373a890f3847397a741d91d720dce4fb36c7a90","tool":"cargo-metadata"},{"exit_status":0,"stderr_byte_length":302,"stderr_offset":654,"stderr_sha256":"7025c1726c90c35a211042d6945c25ff6015acaca27ee97a063465221b792806","stdout_byte_length":1062,"stdout_offset":3109,"stdout_sha256":"4081a320e6292139b4a673d225682dc054b77cba113b8c8a8fbb0593f824b713","tool":"cargo-rustc-cfg"},{"exit_status":0,"stderr_byte_length":7084,"stderr_offset":956,"stderr_sha256":"5f41394d8b12a0d7a6c9e7115108a06b20599eb7ddd611cff4b90b31ba2fe26a","stdout_byte_length":933,"stdout_offset":4171,"stdout_sha256":"376c43fb83e40962a056e9198dba4afb0cf8ecb0238e76c78bd9dbc32fbced4a","tool":"aeneas"}],"tablet_root_sha256":"57e6ec9f6e8b1d9d78ab01504bad58f93cb43308edf77f73f86b986b8d07b809"}],"schema":"trellis-extraction-result/v2","stderr_byte_length":8040,"stderr_sha256":"ab4dc202d7a8a30a83ea62ed154710a48148d62230ff8b834700919d4e679c0c","stdout_byte_length":5104,"stdout_sha256":"604aae51d5c3394417224f655c7de355cc3e699d31fff49f93734706ad43f3f8"}extraction-evidence/STDERR.bin
Compiling dec2flt-model v0.1.0 (/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate)
warning: feature `f16` is declared but not used
--> lib.rs:2:46
|
2 | #![feature(cfg_target_has_reliable_f16_f128, f16, float_masks, register_tool, staged_api)]
| ^^^
|
= note: `#[warn(unused_features)]` (part of `#[warn(unused)]`) on by default
warning: `dec2flt-model` (lib) generated 1 warning
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.41s
Compiling dec2flt-model v0.1.0 (/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.02s
[?25lApplied prepasses: [------------------------------------------------] 0/203 ⠋
Applied prepasses: [------------------------------------------------] 1/203 ⠋
Applied prepasses: [#####-------------------------------------------] 24/203 ⠋
Applied prepasses: [########----------------------------------------] 38/203 ⠋
Applied prepasses: [##############################------------------] 128/203 ⠙
Applied prepasses: [################################################] 203/203 ✔️
[?25h[?25lTranslated globals: [-------------------------------------------------] 0/50 ⠋
Translated globals: [#################################################] 50/50 ✔️
[?25h[?25lTranslated opaque functions: [----------------------------------------] 0/87 ⠋
Translated opaque functions: [########################################] 87/87 ✔️
[?25h[?25lTranslated transparent functions: [---------------------------------] 0/107 ⠋
Translated transparent functions: [---------------------------------] 1/107 ⠋
Translated transparent functions: [###------------------------------] 10/107 ⠙
Translated transparent functions: [######---------------------------] 22/107 ⠹
Translated transparent functions: [##########-----------------------] 35/107 ⠹
Translated transparent functions: [##############-------------------] 47/107 ⠹
Translated transparent functions: [###############------------------] 51/107 ⠸
Translated transparent functions: [################-----------------] 55/107 ⠸
Translated transparent functions: [##################---------------] 60/107 ⠼
Translated transparent functions: [##################---------------] 61/107 ⠼
Translated transparent functions: [###################--------------] 64/107 ⠼
Translated transparent functions: [####################-------------] 68/107 ⠼
Translated transparent functions: [#####################------------] 69/107 ⠴
Translated transparent functions: [#####################------------] 70/107 ⠴
Translated transparent functions: [######################-----------] 72/107 ⠦
Translated transparent functions: [######################-----------] 73/107 ⠦
Translated transparent functions: [######################-----------] 74/107 ⠧
Translated transparent functions: [#######################----------] 77/107 ⠧
Translated transparent functions: [########################---------] 78/107 ⠧
Translated transparent functions: [########################---------] 80/107 ⠇
Translated transparent functions: [#########################--------] 83/107 ⠇
Translated transparent functions: [#########################--------] 84/107 ⠇
Translated transparent functions: [##########################-------] 85/107 ⠏
Translated transparent functions: [##########################-------] 86/107 ⠏
Translated transparent functions: [##########################-------] 87/107 ⠋
Translated transparent functions: [###########################------] 88/107 ⠋
Translated transparent functions: [###########################------] 90/107 ⠋
Translated transparent functions: [############################-----] 91/107 ⠙
Translated transparent functions: [############################-----] 92/107 ⠙
Translated transparent functions: [############################-----] 93/107 ⠙
Translated transparent functions: [#############################----] 95/107 ⠹
Translated transparent functions: [#############################----] 97/107 ⠹
Translated transparent functions: [##############################---] 98/107 ⠸
Translated transparent functions: [##############################---] 99/107 ⠼
Translated transparent functions: [###############################--] 101/107 ⠼
Translated transparent functions: [###############################--] 102/107 ⠴
Translated transparent functions: [###############################--] 103/107 ⠦
Translated transparent functions: [################################-] 104/107 ⠦
Translated transparent functions: [################################-] 105/107 ⠧
Translated transparent functions: [################################-] 106/107 ⠇
Translated transparent functions: [#################################] 107/107 ⠏
Translated transparent functions: [#################################] 107/107 ✔️
[?25h[?25lTranslated trait declarations: [--------------------------------------] 0/49 ⠋
Translated trait declarations: [########################--------------] 31/49 ✔️
[?25h[?25lTranslated trait impls: [---------------------------------------------] 0/85 ⠋
Translated trait impls: [#################################------------] 64/85 ✔️
[?25h[?25lPost-processed translated opaque functions: [-------------------------] 0/87 ⠋
Post-processed translated opaque functions: [-------------------------] 1/87 ⠙
Post-processed translated opaque functions: [#########################] 87/87 ✔️
[?25h[?25lPost-processed translated transparent functions: [------------------] 0/107 ⠋
Post-processed translated transparent functions: [------------------] 1/107 ⠋
Post-processed translated transparent functions: [#-----------------] 10/107 ⠙
Post-processed translated transparent functions: [##----------------] 13/107 ⠹
Post-processed translated transparent functions: [##----------------] 16/107 ⠸
Post-processed translated transparent functions: [##----------------] 17/107 ⠸
Post-processed translated transparent functions: [###---------------] 18/107 ⠼
Post-processed translated transparent functions: [###---------------] 22/107 ⠼
Post-processed translated transparent functions: [####--------------] 24/107 ⠼
Post-processed translated transparent functions: [####--------------] 29/107 ⠴
Post-processed translated transparent functions: [#####-------------] 31/107 ⠴
Post-processed translated transparent functions: [#####-------------] 33/107 ⠴
Post-processed translated transparent functions: [######------------] 39/107 ⠴
Post-processed translated transparent functions: [########----------] 48/107 ⠦
Post-processed translated transparent functions: [#########---------] 56/107 ⠦
Post-processed translated transparent functions: [##########--------] 62/107 ⠦
Post-processed translated transparent functions: [###############---] 94/107 ⠦
Post-processed translated transparent functions: [################--] 99/107 ⠧
Post-processed translated transparent functions: [################--] 100/107 ⠇
Post-processed translated transparent functions: [#################-] 102/107 ⠇
Post-processed translated transparent functions: [#################-] 104/107 ⠏
Post-processed translated transparent functions: [#################-] 105/107 ⠋
Post-processed translated transparent functions: [##################] 107/107 ⠙
Post-processed translated transparent functions: [##################] 107/107 ✔️
[?25hextraction-evidence/STDOUT.bin
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
{"packages":[{"name":"dec2flt-model","version":"0.1.0","id":"path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0","license":null,"license_file":null,"description":null,"source":null,"dependencies":[],"targets":[{"kind":["lib"],"crate_types":["lib"],"name":"dec2flt_model","src_path":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate/lib.rs","edition":"2024","doc":true,"doctest":true,"test":true}],"features":{"default":[],"optimize_for_size":[]},"manifest_path":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate/Cargo.toml","metadata":null,"publish":[],"authors":[],"categories":[],"keywords":[],"readme":null,"repository":null,"homepage":null,"documentation":null,"edition":"2024","links":null,"default_run":null,"rust_version":null}],"workspace_members":["path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0"],"workspace_default_members":["path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0"],"resolve":{"nodes":[{"id":"path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0","dependencies":[],"deps":[],"features":["default"]}],"root":"path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0"},"target_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","build_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","version":1,"workspace_root":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate","metadata":null}
debug_assertions
emscripten_wasm_eh
feature="default"
fmt_debug="full"
overflow_checks
panic="unwind"
relocation_model="pic"
target_abi=""
target_arch="x86_64"
target_endian="little"
target_env="gnu"
target_family="unix"
target_feature="fxsr"
target_feature="sse"
target_feature="sse2"
target_feature="x87"
target_has_atomic
target_has_atomic="16"
target_has_atomic="32"
target_has_atomic="64"
target_has_atomic="8"
target_has_atomic="ptr"
target_has_atomic_load_store
target_has_atomic_load_store="16"
target_has_atomic_load_store="32"
target_has_atomic_load_store="64"
target_has_atomic_load_store="8"
target_has_atomic_load_store="ptr"
target_has_atomic_primitive_alignment="16"
target_has_atomic_primitive_alignment="32"
target_has_atomic_primitive_alignment="64"
target_has_atomic_primitive_alignment="8"
target_has_atomic_primitive_alignment="ptr"
target_has_reliable_f128
target_has_reliable_f16
target_has_reliable_f16_math
target_object_format="elf"
target_os="linux"
target_pointer_width="64"
target_thread_local
target_vendor="unknown"
ub_checks
unix
[[92mInfo[39m ] Imported: /home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/m.llbc
[[92mInfo[39m ] Generated: /home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/M.lean
[[92mInfo[39m ] Generated: /home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/translation.json
[[93mWarn[39m ] The crate contains extracted external, unknown definitions: we advise using the option -split-files to allow manually providing these definitions in separate files.
[[92mInfo[39m ] Total execution time: 7.245881 seconds
reference/model-evidence/adaptation-constants-probe.rs
fn main() {
let largest_power_of_ten = (1024_f64 / std::f64::consts::LOG2_10) as i32;
let log2_5 = std::f64::consts::LOG2_10 - 1.0;
let max_exponent_fast_path = (53_f64 / log2_5) as i64;
let max_exponent_disguised =
max_exponent_fast_path + (53_f64 / std::f64::consts::LOG2_10) as i64;
println!("largest_power_of_ten={largest_power_of_ten}");
println!("max_exponent_fast_path={max_exponent_fast_path}");
println!("max_exponent_disguised={max_exponent_disguised}");
println!("neg_nan={:016x}", (-f64::NAN).to_bits());
for (exponent, value) in IntoIterator::into_iter([
1e0_f64, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11,
1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, 1e20, 1e21, 1e22,
])
.enumerate()
{
println!("pow10_{exponent}={:016x}", value.to_bits());
}
}
reference/model-evidence/binary64-boundary.txt
Primary evidence for the binary64 boundary
==========================================
Scope and identities
--------------------
This record concerns the frozen x86_64-unknown-linux-gnu extraction, the
adapted Rust crate retained in this repository, and the installed toolchain
named by modeling-input/SETUP.md. The probe source is retained at
reference/model-evidence/binary64-probe.rs; no scratch source is required to
reproduce it.
Toolchain executable:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
Target:
x86_64-unknown-linux-gnu
rustc executable SHA-256:
162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
Probe source SHA-256:
68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
Compiled probe SHA-256:
f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
Frozen generated.lean SHA-256:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692
Frozen modeling-input/manifest.json SHA-256:
2fc182c0c7acccad30c449ca349b999759b84e8ed4ec9d590e8295e43eeec077
Approved Binary64ModelDefault.lean SHA-256 at the time of this record:
03ae48fb631e6242bd21bf95d0481b66acae05f8cab343c7ab279b3c116538a3
Exact reproduction commands
---------------------------
Run from the repository root:
R=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
P=reference/model-evidence/binary64-probe.rs
B=.trellis/scratch/binary64-probe
"$R" --version --verbose
sha256sum "$R"
sha256sum "$P"
"$R" --target x86_64-unknown-linux-gnu -C opt-level=0 "$P" -o "$B"
sha256sum "$B"
"$B"
Raw output
----------
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
rustc_sha256=162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
probe_sha256=68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
binary_sha256=f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
target_arch=x86_64
mantissa_digits=53
exponent_mask=7ff0000000000000
mantissa_mask=000fffffffffffff
nan=7ff8000000000000
infinity=7ff0000000000000
neg_infinity=fff0000000000000
nan_category=Nan
infinity_category=Infinite
zero_category=Zero
subnormal_category=Subnormal
normal_category=Normal
from_bits_to_bits=7ff0000000000001
neg_payload_nan=fff0000000000001
neg_zero=8000000000000000
subnormal_tie_to_even_zero=0000000000000000
subnormal_tie_to_even_two=0000000000000002
normal_division=3fb999999999999a
mul_negative_zero=8000000000000000
div_negative_zero=8000000000000000
div_negative_infinity=fff0000000000000
mul_overflow=7ff0000000000000
mul_zero_infinity_is_nan=true
div_zero_zero_is_nan=true
mul_nan_is_nan=true
cast_2_pow_53=4340000000000000
cast_2_pow_53_plus_1=4340000000000000
Pinned Rust library sources
---------------------------
The installed sources below belong to the same named toolchain. Their
SHA-256 identities are:
core/src/primitive_docs.rs
c4b8627dd67d5dac8f383f383a9e7ff1229ea43e7599610fc61988694cf0f3e5
core/src/num/f64.rs
84540a6a59e347c63caabe12cf895ba1239c76a50682471567007138fac1c618
core/src/clone.rs
23f9cfc80347fde6b8457d46fbf7a2b8d9f34c8c58601b0b6f714ca2f6d1976b
The exact relevant text of core/src/primitive_docs.rs is:
#[rustc_doc_primitive = "f64"]
#[doc(alias = "double")]
/// A 64-bit floating-point type (specifically, the "binary64" type defined in IEEE 754-2008).
///
/// This type is very similar to [`prim@f32`], but has increased precision by using twice as many
/// bits. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on double-precision
/// values][wikipedia] for more information.
The referenced primitive-f32 documentation supplies the common primitive
floating-point operation rules quoted next:
/// - −0.0: IEEE 754 floating-point numbers have a bit that indicates their sign, so −0.0 is a
/// possible value. For comparison −0.0 = +0.0, but floating-point operations can carry
/// the sign bit through arithmetic operations. This means −0.0 × +0.0 produces −0.0 and
/// a negative number rounded to a value smaller than a float can represent also produces −0.0.
/// - [∞](#associatedconstant.INFINITY) and
/// [−∞](#associatedconstant.NEG_INFINITY): these result from calculations
/// like `1.0 / 0.0`.
///
/// When a primitive operation (addition, subtraction, multiplication, or
/// division) is performed on this type, the result is rounded according to the
/// roundTiesToEven direction defined in IEEE 754-2008. That means:
///
/// - The result is the representable value closest to the true value, if there
/// is a unique closest representable value.
/// - If the true value is exactly half-way between two representable values,
/// the result is the one with an even least-significant binary digit.
/// - If the true value's magnitude is ≥ `f32::MAX` + 2<sup>(`f32::MAX_EXP` −
/// `f32::MANTISSA_DIGITS` − 1)</sup>, the result is ∞ or −∞ (preserving the
/// true value's sign).
The same file explicitly separates arithmetic NaN choice from exact bitwise
operations; its exact relevant text is:
/// The rules for NaN values differ between *arithmetic* and *non-arithmetic* (or "bitwise")
/// operations. The non-arithmetic operations are unary `-`, `abs`, `copysign`, `signum`,
/// `{to,from}_bits`, `{to,from}_{be,le,ne}_bytes` and `is_sign_{positive,negative}`. These
/// operations are guaranteed to exactly preserve the bit pattern of their input except for possibly
/// changing the sign bit.
///
/// The following rules apply when a NaN value is returned from an arithmetic operation:
/// - The result has a non-deterministic sign.
/// - The quiet bit and payload are non-deterministically chosen from
/// the following set of options:
///
/// - **Preferred NaN**: The quiet bit is set and the payload is all-zero.
/// - **Quieting NaN propagation**: The quiet bit is set and the payload is copied from any input
/// operand that is a NaN. If the inputs and outputs do not have the same payload size (i.e., for
/// `as` casts), then
/// - If the output is smaller than the input, low-order bits of the payload get dropped.
/// - If the output is larger than the input, the payload gets filled up with 0s in the low-order
/// bits.
/// - **Unchanged NaN propagation**: The quiet bit and payload are copied from any input operand
/// that is a NaN. If the inputs and outputs do not have the same size (i.e., for `as` casts), the
/// same rules as for "quieting NaN propagation" apply, with one caveat: if the output is smaller
/// than the input, dropping the low-order bits may result in a payload of 0; a payload of 0 is not
/// possible with a signaling NaN (the all-0 significand encodes an infinity) so unchanged NaN
/// propagation cannot occur with some inputs.
/// - **Target-specific NaN**: The quiet bit is set and the payload is picked from a target-specific
/// set of "extra" possible NaN payloads. The set can depend on the input operand values.
/// See the table below for the concrete NaNs this set contains on various targets.
///
/// | `target_arch` | Extra payloads possible on this platform |
/// |---------------|------------------------------------------|
/// | `aarch64`, `arm`, `arm64ec`, `loongarch64`, `powerpc` (except when `target_abi = "spe"`), `powerpc64`, `riscv32`, `riscv64`, `s390x`, `x86`, `x86_64` | None |
Thus the model's preferred quiet NaN is one permitted result whenever
multiplication or division returns NaN. This does not claim that arbitrary
Rust arithmetic NaNs have those exact bits. By contrast, unary negation and
bit conversion must preserve all non-sign bits exactly, including for every
NaN payload.
The exact relevant declarations in core/src/num/f64.rs are:
pub const MANTISSA_DIGITS: u32 = 53;
pub const NAN: f64 = 0.0_f64 / 0.0_f64;
pub const INFINITY: f64 = 1.0_f64 / 0.0_f64;
pub const NEG_INFINITY: f64 = -1.0_f64 / 0.0_f64;
pub const SIGN_MASK: u64 = 0x8000_0000_0000_0000;
pub const EXPONENT_MASK: u64 = 0x7ff0_0000_0000_0000;
pub const MANTISSA_MASK: u64 = 0x000f_ffff_ffff_ffff;
pub const fn classify(self) -> FpCategory {
// We used to have complicated logic here that avoids the simple bit-based tests to work
// around buggy codegen for x87 targets (see
// https://github.com/rust-lang/rust/issues/114479). However, some LLVM versions later, none
// of our tests is able to find any difference between the complicated and the naive
// version, so now we are back to the naive version.
let b = self.to_bits();
match (b & Self::MANTISSA_MASK, b & Self::EXPONENT_MASK) {
(0, Self::EXPONENT_MASK) => FpCategory::Infinite,
(_, Self::EXPONENT_MASK) => FpCategory::Nan,
(0, 0) => FpCategory::Zero,
(_, 0) => FpCategory::Subnormal,
_ => FpCategory::Normal,
}
}
pub const fn to_bits(self) -> u64 {
// SAFETY: `u64` is a plain old datatype so we can always transmute to it.
unsafe { mem::transmute(self) }
}
pub const fn from_bits(v: u64) -> Self {
// It turns out the safety issues with sNaN were overblown! Hooray!
// SAFETY: `u64` is a plain old datatype so we can always transmute from it.
unsafe { mem::transmute(v) }
}
The exact scalar clone body in core/src/clone.rs is:
impl const Clone for $t {
#[inline(always)]
fn clone(&self) -> Self {
*self
}
}
Frozen adapted source
---------------------
The relevant retained source file hashes are:
crate/traits.rs
9013270fb846edcb0bdf2abd0353f575fdd727974cba9e89bdab8bb4c2b4f0bf
crate/dec2flt/mod.rs
b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012
crate/dec2flt/parse.rs
50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f
crate/dec2flt/decimal.rs
633658be803b7369b18feb098a8aa1b5f714a933d3b79ecbc4899a1b05f35beb
crate/dec2flt/lemire.rs
fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1
crate/dec2flt/slow.rs
93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485
Exact constant and bit-conversion excerpt from crate/traits.rs:
impl Float for f64 {
type Int = u64;
const INFINITY: Self = Self::INFINITY;
const NEG_INFINITY: Self = Self::NEG_INFINITY;
const NAN: Self = Self::NAN;
// Bit-identical to the upstream `-f64::NAN`, without the unsupported
// compile-time float negation.
const NEG_NAN: Self = f64::from_bits(0xFFF8_0000_0000_0000);
const BITS: u32 = 64;
const SIG_TOTAL_BITS: u32 = Self::MANTISSA_DIGITS;
const EXP_MASK: Self::Int = Self::EXPONENT_MASK;
const SIG_MASK: Self::Int = Self::MANTISSA_MASK;
fn to_bits(self) -> Self::Int {
self.to_bits()
}
fn classify(self) -> FpCategory {
self.classify()
}
}
impl FloatExt for f64 {
#[inline]
fn from_u64_bits(v: u64) -> Self {
f64::from_bits(v)
}
Exact derived-constant defaults from crate/traits.rs:
/// The number of bits in the significand, *excluding* the hidden bit.
const SIG_BITS: u32 = Self::SIG_TOTAL_BITS - 1;
/// Number of bits in the exponent.
const EXP_BITS: u32 = Self::BITS - Self::SIG_BITS - 1;
/// The saturated (maximum bitpattern) value of the exponent, i.e. the infinite
/// representation.
///
/// This shifted fully right, use `EXP_MASK` for the shifted value.
const EXP_SAT: u32 = (1 << Self::EXP_BITS) - 1;
/// Signed version of `EXP_SAT` since we convert a lot.
const INFINITE_POWER: i32 = Self::EXP_SAT as i32;
/// The exponent bias value. This is also the maximum value of the exponent.
const EXP_BIAS: u32 = Self::EXP_SAT >> 1;
/// Minimum exponent value of normal values.
const EXP_MIN: i32 = -(Self::EXP_BIAS as i32 - 1);
Together with the f64-instance lines `BITS = 64` and
`SIG_TOTAL_BITS = Self::MANTISSA_DIGITS` in the preceding excerpt, these
defaults derive SIG_BITS, EXP_MIN, and INFINITE_POWER from the primitive
mantissa-digit constant rather than introducing independent parameters.
Exact checked cast excerpt from crate/dec2flt/mod.rs:
#[inline]
// This method is precisely the source `u64 as f64` primitive conversion.
// Aeneas cannot translate that cast; opacity is confined to the cast while
// the fast-path algorithm, its range proof obligation, and all calls stay
// visible in the extracted model.
#[charon::opaque]
fn from_u64(v: u64) -> Self {
debug_assert!(v <= Self::MAX_MANTISSA_FAST_PATH);
v as _
}
Here MAX_MANTISSA_FAST_PATH is the retained default 1 << 53. Therefore the
source succeeds only through the modeled branch v <= 2^53 in this debug
configuration; above it the debug assertion fails before the cast. On the
successful branch every integer is exactly representable, so the source cast
and the model rounder return the same word.
Exact power-table and assembly excerpts from crate/dec2flt/mod.rs:
/// Maximum mantissa for the fast-path (`1 << 53` for f64).
const MAX_MANTISSA_FAST_PATH: u64 = 1 << Self::SIG_TOTAL_BITS;
const MAX_EXPONENT_FAST_PATH: i64 = 22;
const MIN_EXPONENT_FAST_PATH: i64 = -Self::MAX_EXPONENT_FAST_PATH;
const MAX_EXPONENT_DISGUISED_FAST_PATH: i64 = 37;
fn pow10_fast_path(exponent: usize) -> Self {
// These bit patterns are exactly the source table's rounded binary64
// literals. The match is the same masked lookup; it merely keeps float
// constants out of Aeneas's unsupported constant interpreter.
match exponent & 31 {
0 => f64::from_bits(0x3FF0_0000_0000_0000),
1 => f64::from_bits(0x4024_0000_0000_0000),
2 => f64::from_bits(0x4059_0000_0000_0000),
3 => f64::from_bits(0x408F_4000_0000_0000),
4 => f64::from_bits(0x40C3_8800_0000_0000),
5 => f64::from_bits(0x40F8_6A00_0000_0000),
6 => f64::from_bits(0x412E_8480_0000_0000),
7 => f64::from_bits(0x4163_12D0_0000_0000),
8 => f64::from_bits(0x4197_D784_0000_0000),
9 => f64::from_bits(0x41CD_CD65_0000_0000),
10 => f64::from_bits(0x4202_A05F_2000_0000),
11 => f64::from_bits(0x4237_4876_E800_0000),
12 => f64::from_bits(0x426D_1A94_A200_0000),
13 => f64::from_bits(0x42A2_309C_E540_0000),
14 => f64::from_bits(0x42D6_BCC4_1E90_0000),
15 => f64::from_bits(0x430C_6BF5_2634_0000),
16 => f64::from_bits(0x4341_C379_37E0_8000),
17 => f64::from_bits(0x4376_3457_85D8_A000),
18 => f64::from_bits(0x43AB_C16D_674E_C800),
19 => f64::from_bits(0x43E1_58E4_6091_3D00),
20 => f64::from_bits(0x4415_AF1D_78B5_8C40),
21 => f64::from_bits(0x444B_1AE4_D6E2_EF50),
22 => f64::from_bits(0x4480_F0CF_064D_D592),
_ => f64::from_bits(0),
}
}
fn biased_fp_to_float<F: FloatExt>(x: BiasedFp) -> F {
let mut word = x.m;
word |= (x.p_biased as u64) << F::SIG_BITS;
F::from_u64_bits(word)
}
Exact native-call excerpt from crate/dec2flt/decimal.rs:
fn can_use_fast_path<F: Lemire>(&self) -> bool {
F::MIN_EXPONENT_FAST_PATH <= self.exponent
&& self.exponent <= F::MAX_EXPONENT_DISGUISED_FAST_PATH
&& self.mantissa <= F::MAX_MANTISSA_FAST_PATH
&& !self.many_digits
}
if !self.can_use_fast_path::<F>() {
return None;
}
let value = if self.exponent <= F::MAX_EXPONENT_FAST_PATH {
// normal fast path
let value = F::from_u64(self.mantissa);
if self.exponent < 0 {
// Explicit trait calls preserve Rust arithmetic and resolve
// the generic output type that Charon leaves ambiguous.
core::ops::Div::div(value, F::pow10_fast_path((-self.exponent) as _))
} else {
core::ops::Mul::mul(value, F::pow10_fast_path(self.exponent as _))
}
} else {
// disguised fast path
let shift = self.exponent - F::MAX_EXPONENT_FAST_PATH;
let mantissa = self.mantissa.checked_mul(INT_POW10[shift as usize])?;
if mantissa > F::MAX_MANTISSA_FAST_PATH {
return None;
}
core::ops::Mul::mul(
F::from_u64(mantissa),
F::pow10_fast_path(F::MAX_EXPONENT_FAST_PATH as _),
)
};
if self.negative {
Some(core::ops::Neg::neg(value))
} else {
Some(value)
}
The preceding can_use_fast_path body, together with
MAX_MANTISSA_FAST_PATH = 1 << SIG_TOTAL_BITS and SIG_TOTAL_BITS = 53 for f64,
requires the exponent to lie between -22 and 37, the input mantissa to be at
most 2^53, and many_digits to be false. Consequently an ordinary arithmetic
call has a from_u64 operand in 0..=2^53. In its negative-exponent arm,
`-self.exponent` lies in 1..=22; in its nonnegative arm, `self.exponent` lies
in 0..=22. The disguised branch checks its multiplied mantissa against 2^53
before from_u64 and uses table index 22. The paired statement
Binary64NativeCallDomain does not assert this source reachability. It says
conditionally that a from_u64 argument at most 2^53 succeeds with a finite,
non-NaN word and that a table index at most 22 succeeds with a positive,
nonzero, finite, non-NaN word. Applying that conditional statement to the
guards just derived establishes those properties for the actual ordinary and
disguised calls, and in particular establishes that every executed divisor is
nonzero.
Exact special-value excerpt from crate/dec2flt/parse.rs:
let float = match (register, len) {
(INF_3, 3) => F::INFINITY,
(INF_8, 8) => F::INFINITY,
(NAN, 3) => F::NAN,
_ => return None,
};
if negative { Some(-float) } else { Some(float) }
Thus the executed special route is INFINITY or NAN followed by conditional
negation; it does not select NEG_INFINITY or NEG_NAN directly.
The number helper has the exact source body
pub fn parse_number(s: &[u8]) -> Option<Decimal> {
if let Some((float, rest)) = parse_partial_number(s) {
if rest == s.len() {
return Some(float);
}
}
None
}
It returns only the Decimal produced by parse_partial_number; there is no
float type parameter or float operation at this boundary.
The integer-tier helper has the source type and exact executable excerpts
below (long explanatory comments are elided). In particular it returns a raw
BiasedFp and contains no from_u64 cast, primitive float multiplication,
division, negation, or from_bits call:
pub fn compute_float<F: Float>(q: i64, mut w: u64) -> BiasedFp {
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let fp_error = BiasedFp::zero_pow2(-1);
// Short-circuit if the value can only be a literal 0 or infinity.
if w == 0 || q < F::SMALLEST_POWER_OF_TEN as i64 {
return fp_zero;
} else if q > F::LARGEST_POWER_OF_TEN as i64 {
return fp_inf;
}
// Normalize our significant digits, so the most-significant bit is set.
let lz = w.leading_zeros();
w <<= lz;
let (lo, hi) = compute_product_approx(q, w, F::SIG_BITS as usize + 3);
if lo == 0xFFFF_FFFF_FFFF_FFFF {
let inside_safe_exponent = (q >= -27) && (q <= 55);
if !inside_safe_exponent {
return fp_error;
}
}
let upperbit = (hi >> 63) as i32;
let mut mantissa = hi >> (upperbit + 64 - F::SIG_BITS as i32 - 3);
let mut power2 = power(q as i32) + upperbit - lz as i32 - F::EXP_MIN + 1;
if power2 <= 0 {
if -power2 + 1 >= 64 {
// Have more than 64 bits below the minimum exponent, must be 0.
return fp_zero;
}
// Have a subnormal value.
mantissa >>= -power2 + 1;
mantissa += mantissa & 1;
mantissa >>= 1;
power2 = (mantissa >= (1_u64 << F::SIG_BITS)) as i32;
return BiasedFp { m: mantissa, p_biased: power2 };
}
// Need to handle rounding ties. Normally, we need to round up,
// but if we fall right in between and we have an even basis, we
// need to round down.
if lo <= 1
&& q >= F::MIN_EXPONENT_ROUND_TO_EVEN as i64
&& q <= F::MAX_EXPONENT_ROUND_TO_EVEN as i64
&& mantissa & 0b11 == 0b01
&& (mantissa << (upperbit + 64 - F::SIG_BITS as i32 - 3)) == hi
{
// Zero the lowest bit, so we don't round up.
mantissa &= !1_u64;
}
// Round-to-even, then shift the significant digits into place.
mantissa += mantissa & 1;
mantissa >>= 1;
if mantissa >= (2_u64 << F::SIG_BITS) {
// Rounding up overflowed, so the carry bit is set. Set the
// mantissa to 1 (only the implicit, hidden bit is set) and
// increase the exponent.
mantissa = 1_u64 << F::SIG_BITS;
power2 += 1;
}
// Zero out the hidden bit.
mantissa &= !(1_u64 << F::SIG_BITS);
if power2 >= F::INFINITE_POWER {
// Exponent is above largest normal value, must be infinite.
return fp_inf;
}
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact slow-tier source body from crate/dec2flt/slow.rs:
pub(crate) fn parse_long_mantissa<F: Float>(s: &[u8]) -> BiasedFp {
const MAX_SHIFT: usize = 60;
const NUM_POWERS: usize = 19;
const POWERS: [u8; 19] =
[0, 3, 6, 9, 13, 16, 19, 23, 26, 29, 33, 36, 39, 43, 46, 49, 53, 56, 59];
let get_shift = |n| {
if n < NUM_POWERS { POWERS[n] as usize } else { MAX_SHIFT }
};
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let mut d = parse_decimal_seq(s);
// Short-circuit if the value can only be a literal 0 or infinity.
if d.num_digits == 0 || d.decimal_point < -324 {
return fp_zero;
} else if d.decimal_point >= 310 {
return fp_inf;
}
let mut exp2 = 0_i32;
let mut loop_result = None;
// Shift right toward (1/2 ... 1].
while d.decimal_point > 0 && loop_result.is_none() {
let n = d.decimal_point as usize;
let shift = get_shift(n);
d.right_shift(shift);
if d.decimal_point < -DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_zero);
} else {
exp2 += shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// Shift left toward (1/2 ... 1].
while d.decimal_point <= 0 && loop_result.is_none() {
let shift = if d.decimal_point == 0 {
match d.digits[0] {
digit if digit >= 5 => break,
0 | 1 => 2,
_ => 1,
}
} else {
get_shift((-d.decimal_point) as _)
};
d.left_shift(shift);
if d.decimal_point > DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_inf);
} else {
exp2 -= shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// We are now in the range [1/2 ... 1] but the binary format uses [1 ... 2].
exp2 -= 1;
while F::EXP_MIN > exp2 {
let mut n = (F::EXP_MIN - exp2) as usize;
if n > MAX_SHIFT {
n = MAX_SHIFT;
}
d.right_shift(n);
exp2 += n as i32;
}
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
// Shift the decimal to the hidden bit, and then round the value
// to get the high mantissa+1 bits.
d.left_shift(F::SIG_BITS as usize + 1);
let mut mantissa = d.round();
if mantissa >= (1_u64 << (F::SIG_BITS + 1)) {
// Rounding up overflowed to the carry bit, need to
// shift back to the hidden bit.
d.right_shift(1);
exp2 += 1;
mantissa = d.round();
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
}
let mut power2 = exp2 - F::EXP_MIN + 1;
if mantissa < (1_u64 << F::SIG_BITS) {
power2 -= 1;
}
// Zero out all the bits above the explicit mantissa bits.
mantissa &= (1_u64 << F::SIG_BITS) - 1;
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact final numeric-sign excerpt from crate/dec2flt/mod.rs:
let assembled_word = fp.m | ((fp.p_biased as u64) << F::SIG_BITS);
let assembly_result = biased_fp_to_float::<F>(fp);
let lexical_sign_applied = num.negative;
let result = if lexical_sign_applied {
core::ops::Neg::neg(assembly_result)
} else {
assembly_result
};
Thus a numeric execution that reaches the integer/slow selection route
assembles its selected pair with from_bits through biased_fp_to_float and only
then conditionally negates it. A successful try_fast_path returns earlier and
does not perform this assembly. compute_float and parse_long_mantissa produce
raw BiasedFp pairs and do not call from_u64, primitive float multiplication,
division, negation, or from_bits; they do, however, execute constants derived
from SIG_TOTAL_BITS before producing those pairs.
Retained structural-boundary evidence
-------------------------------------
Several adjacent structural bindings cite this same evidence record. Their
pinned library source identities are:
core/src/num/mod.rs
f0820f9dfb94999440c8cb4a349736fa21df7e5668e19b6b49e016ff67c05ce3
core/src/option.rs
7cf61204b05d98a95bc2e322d5fbfc1f4f91505109971917d9a7fb47151c50e6
core/src/slice/mod.rs
354992a6a3d69a0185eef9044a07ea5180e767bdb467aef55e69ee3d44317840
core/src/str/mod.rs
284b4c147b5d0497ce9146f6b96e564f196aed10411a62cdccf5fc5243d40f78
Exact ASCII-digit body from core/src/num/mod.rs:
pub const fn is_ascii_digit(&self) -> bool {
matches!(*self, b'0'..=b'9')
}
Exact Option control-flow bodies from core/src/option.rs:
fn branch(self) -> ControlFlow<Self::Residual, Self::Output> {
match self {
Some(v) => ControlFlow::Continue(v),
None => ControlFlow::Break(None),
}
}
fn from_residual(residual: Option<convert::Infallible>) -> Self {
match residual {
None => None,
}
}
Exact slice observation bodies from core/src/slice/mod.rs:
pub const fn first(&self) -> Option<&T> {
if let [first, ..] = self { Some(first) } else { None }
}
pub const fn split_first(&self) -> Option<(&T, &[T])> {
if let [first, tail @ ..] = self { Some((first, tail)) } else { None }
}
Exact string-byte body from core/src/str/mod.rs:
pub const fn as_bytes(&self) -> &[u8] {
// SAFETY: const sound because we transmute two types with the same layout
unsafe { mem::transmute(self) }
}
reference/model-evidence/binary64-probe.rs
#![feature(float_masks)]
use std::num::FpCategory;
fn bits(label: &str, value: f64) {
println!("{label}={:016x}", value.to_bits());
}
fn main() {
println!("target_arch={}", std::env::consts::ARCH);
println!("mantissa_digits={}", f64::MANTISSA_DIGITS);
println!("exponent_mask={:016x}", f64::EXPONENT_MASK);
println!("mantissa_mask={:016x}", f64::MANTISSA_MASK);
bits("nan", f64::NAN);
bits("infinity", f64::INFINITY);
bits("neg_infinity", f64::NEG_INFINITY);
for (label, value) in [
("nan_category", f64::NAN),
("infinity_category", f64::INFINITY),
("zero_category", 0.0),
("subnormal_category", f64::from_bits(1)),
("normal_category", 1.0),
] {
let category = match value.classify() {
FpCategory::Nan => "Nan",
FpCategory::Infinite => "Infinite",
FpCategory::Zero => "Zero",
FpCategory::Subnormal => "Subnormal",
FpCategory::Normal => "Normal",
};
println!("{label}={category}");
}
let payload_nan_word = 0x7ff0_0000_0000_0001_u64;
println!(
"from_bits_to_bits={:016x}",
f64::from_bits(payload_nan_word).to_bits()
);
bits("neg_payload_nan", -f64::from_bits(payload_nan_word));
bits("neg_zero", -0.0);
bits("subnormal_tie_to_even_zero", f64::from_bits(1) * 0.5);
bits("subnormal_tie_to_even_two", f64::from_bits(3) * 0.5);
bits("normal_division", 1.0 / 10.0);
bits("mul_negative_zero", -0.0 * 2.0);
bits("div_negative_zero", -1.0 / f64::INFINITY);
bits("div_negative_infinity", 1.0 / -0.0);
bits("mul_overflow", f64::MAX * (1.0 + f64::EPSILON));
println!("mul_zero_infinity_is_nan={}", (0.0 * f64::INFINITY).is_nan());
println!("div_zero_zero_is_nan={}", (0.0_f64 / 0.0_f64).is_nan());
println!("mul_nan_is_nan={}", (f64::NAN * 1.0).is_nan());
bits("cast_2_pow_53", (1_u64 << 53) as f64);
bits("cast_2_pow_53_plus_1", ((1_u64 << 53) + 1) as f64);
}
reference/model-evidence/setup-reproduction.txt
Fresh extraction and composition evidence for Preamble
======================================================
Scope
-----
This record was produced from the repository root on 2026-09-24. It records
the current frozen extraction configuration and a fresh execution of the
Cargo, Charon, and Aeneas stages. It is evidence about the bytes and commands
used to build the model, not evidence that any supplied GOAL is true.
Pinned configuration
--------------------
modeling-input/extraction.json contains exactly:
{
"crate": "crate",
"cargo_args": [],
"charon_args": [],
"aeneas_args": []
}
crate/Cargo.toml:5-22 names one edition-2024 library package, gives the
"default" feature an empty definition, gives "optimize_for_size" a distinct
feature, and sets overflow-checks=true in both development and release
profiles. The fresh run used the development profile. The configuration
probe below reported debug_assertions, overflow_checks, target_arch="x86_64",
target_pointer_width="64", target_env="gnu", and target_feature="sse2"; it
did not report feature="optimize_for_size". Its final Cargo line was:
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.08s
The exact probe command was:
env RUSTUP_TOOLCHAIN=nightly-2026-06-01 \
CARGO_TARGET_DIR=.trellis/scratch/preamble-cfg-target \
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/cargo \
rustc --offline \
--manifest-path .trellis/scratch/provenance-evidence-1790263924955098840/extraction/source/Cargo.toml \
--lib -- --print cfg
The materialized source used by that command is the source copy made by the
fresh extraction run described below. Relevant raw stdout was:
debug_assertions
feature="default"
overflow_checks
target_arch="x86_64"
target_endian="little"
target_env="gnu"
target_family="unix"
target_feature="sse"
target_feature="sse2"
target_feature="x87"
target_os="linux"
target_pointer_width="64"
Tool identities
---------------
These are the executable identities in modeling-input/tool-identities.json,
rechecked with sha256sum:
cargo
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/cargo
54e05dce8c9ca2f638cc3d87ec1a19425b5d0bf1f31aeb48cf4792aec5cadf27
cargo 1.98.0-nightly (fbb61be30 2026-05-26)
rustc
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
rustc 1.98.0-nightly (14210df0e 2026-05-31), LLVM 22.1.6
rustdoc
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc
2bf660d140310e28146e2c002dc6fcabd957c0a3b740be0419e6f8e5a9c87523
rustdoc 1.98.0-nightly (14210df0e 2026-05-31)
Charon
/home/leanagent/pv_spike/tools/charon/bin/charon
6490034f368ce98f3e7ae5a28bf71ed56d03bdf1e3712e71376b96fc55baeade
Charon 0.1.216, toolchain nightly-2026-06-01
Aeneas
/home/leanagent/pv_spike/tools/aeneas/bin/aeneas
9f446d2aaf59e8e705e36d05cb993f1c6ab0e97f8dc6fd2f19907a86ede30922
aeneas fa699427
Lean
/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin/lean
3e0d0d3d801675359f2d4cf9815bfdb417b20b92fdd9d48b3b14c95bbae28bbf
Lean 4.30.0-rc2, commit 3dc1a088b6d2d8eafe25a7cd7ec7b58d731bd7cc
Fresh extraction
----------------
The public reproduction command recorded by modeling-input/manifest.json is:
python3 .trellis/scripts/pv_modeling.py check-native . --fresh
For this record the same check_provenance implementation was invoked directly
so that its complete result could be retained without the CLI's bounded JSON
preview. It wrote:
.trellis/scratch/provenance-evidence-1790263924955098840/provenance.json
.trellis/scratch/provenance-evidence-1790263924955098840/extraction/observation.json
The extractor instantiated the empty argument lists above as these commands
(the output and cache paths are those beneath that scratch directory):
<cargo> check --offline
<charon> cargo --preset=aeneas --dest-file Generated/m.llbc -- --offline
<aeneas> -backend lean -dest Generated -emit-json Generated/m.llbc
The observation records exit code 0 for Cargo, Charon, and Aeneas. Cargo's raw
terminal result was:
Checking dec2flt-model v0.1.0 (.../extraction/source)
warning: feature `f16` is declared but not used
warning: `dec2flt-model` (lib) generated 1 warning
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.14s
Charon's raw terminal result was:
Compiling dec2flt-model v0.1.0 (.../extraction/source)
warning: feature `f16` is declared but not used
warning: `dec2flt-model` (lib) generated 1 warning
Finished `dev` profile [unoptimized + debuginfo] target(s) in 15.24s
Aeneas reported 203 prepasses, 50 globals, 87 opaque functions, 107
transparent functions, 49 trait declarations, and 85 trait implementations.
Its raw terminal result ended:
Generated: .../extraction/Generated/M.lean
Generated: .../extraction/Generated/translation.json
[Warn ] The crate contains extracted external, unknown definitions: ...
[Info ] Total execution time: 7.332373 seconds
The warning is the inventoried external boundary below. The fresh provenance
result had an empty error string, passed=true, no tool-identity differences,
and true values for every check, including fresh_extraction_succeeds,
fresh_model_export, crate_export, upstream_export, tool_identities_current,
bootstrap_receipt, and model_support_composition. The canonical current crate
tree digest reported by that result was:
b5ecf4d7e9dfa0337f1586ae0e865fbbe2dd384137ee6e2ad635f0d5d6e916a9
Generated bytes, placeholders, and axioms
-----------------------------------------
sha256sum gave the same digest for the fresh Generated/M.lean and the frozen
generated.lean:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692
The observation's raw-source placeholder count was 0. Compiling raw M.lean
without model support fails as diagnosed because F64 and the external boundary
are absent; four "declaration uses sorry" diagnostics are Lean error-recovery
consequences for F64-valued constants, not tokens in the generated source.
The pinned compatibility report has SHA-256
557a4924d55becf1b33d7dc7f9dfdf2b675c895ce4a9b6bee8a0622378e48d6a,
checks 2225 declarations, reports no unapproved axiom, and marks only the 64
declarations downstream of the missing boundary as pending. This is why the
24 operations below have separate authored model-support owners.
External boundary
-----------------
The exact command
python3 .trellis/scripts/pv_modeling.py inspect-native .
returned declaration_count=24 and retained the full index at
.trellis/scratch/inspect-native-1790264067166282471.json. The 24 names are:
F64.Insts.CoreCloneClone.clone
core.f64.F64.MANTISSA_DIGITS
core.f64.F64.NAN
core.f64.F64.INFINITY
core.f64.F64.NEG_INFINITY
core.f64.F64.EXPONENT_MASK
core.f64.F64.MANTISSA_MASK
core.f64.F64.classify
core.f64.F64.to_bits
core.f64.F64.from_bits
core.num.U8.is_ascii_digit
F64.Insts.CoreOpsArithMulF64F64.mul
F64.Insts.CoreOpsArithDivF64F64.div
F64.Insts.CoreOpsArithNegF64.neg
U64.Insts.CoreOpsBitBitAndU64U64.bitand
U64.Insts.CoreOpsBitBitOrU64U64.bitor
U64.Insts.CoreOpsBitShlU32U64.shl
U64.Insts.CoreOpsBitShrU32U64.shr
core.option.Option.Insts.CoreOpsTry_traitTry.branch
core.option.Option.Insts.CoreOpsTry_traitFromResidualOptionInfallible.from_residual
core.slice.Slice.first
core.slice.Slice.split_first
core.str.Str.as_bytes
F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64.from_u64
Tablet/model-support.json has exactly 24 bindings, one for each name. This
record establishes completeness of that inventory and its composition; the
semantic justification for an individual binding remains the responsibility
of that binding's paired definition node.
Composition
-----------
The exact command
python3 .trellis/scripts/pv_modeling.py compose-native . --check
returned matches=true, changed=false, no mismatched files, raw extraction hash
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692,
and both expected and actual Preamble hashes
15adb2db06b06e099d17070c2a373619ecdc481e32fc78d34054cd01fc7b492a.
The complete receipt is retained at
.trellis/scratch/compose-native-1790264071122343238.json.
reference/model-evidence/source-adaptation-delta.txt
Primary inventory and preservation analysis of the upstream-to-crate delta
============================================================================
Method and complete file inventory
----------------------------------
This record compares the supplied files in upstream/ with the frozen adapted
crate/. It treats the sources and their control flow as primary evidence; it
does not use a prior route decision as semantic proof and makes no assertion
that a supplied GOAL is true. The commands used were:
find upstream crate -type f ! -path '*/target/*' -print0 | sort -z |
xargs -0 sha256sum
for each supplied file f:
cmp -s upstream/$f crate/$f
diff -U0 upstream/$f crate/$f
The concatenated contextual diff of every supplied file has SHA-256
2eb0202ba9ae8092d6727dd2f3b824c29cb160b005960ccf2b15bfb804ed1217.
The complete inventory is:
supplied path upstream SHA-256 crate SHA-256 status
dec2flt/common.rs fc64094721ff23e08fcba013154d04dec3fe986cae5ffd73a20f86049980aace 4c4be815335a7b176527b1345e662890caa48181a0a4f814594339016cab18e changed
dec2flt/decimal.rs 3c164785e1bc3f3b48aa9c212dd6c4ab535fe828523af9fa584df4c7b1e60e0d 633658be803b7369b18feb098a8aa1b5f714a933d3b79ecbc4899a1b05f35beb changed
dec2flt/decimal_seq.rs c0c1c6028e3f57cefc3de7635a94788e9180f5ebcedc7a334ec8dbac786ec788 4aa4ecf9f31970033093d73238d4f2c72d433639bbe467c0741b185807380bd9 changed
dec2flt/fpu.rs 16cf9ec154d477ab3d4184a01fb4b9ed7c59f0228cc55589d393c40a61b19d8f 16cf9ec154d477ab3d4184a01fb4b9ed7c59f0228cc55589d393c40a61b19d8f identical
dec2flt/lemire.rs fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1 fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1 identical
dec2flt/mod.rs 7198e238c554b692405537a446b3526ad66805ec2900cd0e299f10c51402a44a b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012 changed
dec2flt/parse.rs 9daf21ab9445a84552535152f376eef8c30f3d5827296c0645f5952d3b22bbf1 50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f changed
dec2flt/slow.rs 43e7aba32d7431bbf0e1bbcb4c334eaffb23eb66891c7e45abe799c5235cc0d2 93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485 changed
dec2flt/table.rs 6eb59023784bd84cb6fb074c70da8a99bef72bc2a2ea179b0da457ca1ee00abb 6eb59023784bd84cb6fb074c70da8a99bef72bc2a2ea179b0da457ca1ee00abb identical
traits.rs 66a02c44d72dfcc3ddae7e34a290e390dabaf98c5911b283d2d97f2f0075a44e 9013270fb846edcb0bdf2abd0353f575fdd727974cba9e89bdab8bb4c2b4f0bf changed
The standalone package adds four files having no supplied counterpart:
crate/Cargo.toml 2040ce5dc92c51b5245113f97682b692b876aa57708b5c7c483425ba152943c8
crate/lib.rs 1df2b8bcb2f52068d05a6343923716d0ef4475abdef34a0de3fe7cb8dc2ba95b
crate/num/mod.rs d9ac4f964d124bd4660914dc4c80bbb14f48d7851f9a8edc71a0931e9fce37b3
crate/num/imp/mod.rs df09b97393e97b23b0a558c2fcbbf4e75dd9d68338f1e83f168bab80a37a31f1
Thus fpu.rs, lemire.rs, and the complete 671-line table.rs, including their
algorithmic constants and tables, are byte-identical. The following sections
account for every other file and every changed hunk.
Namespace and error shell
-------------------------
crate/lib.rs:1-12 is a no_std crate root that re-exports core::f64 and
core::ops and introduces the same num module path expected by the supplied
slice. crate/num/imp/mod.rs:1-10 uses path attributes to place traits.rs and
dec2flt/mod.rs at core::num::imp-like module names. These declarations add no
wrapper call or computation. crate/num/mod.rs:1 re-exports
core::num::FpCategory. crate/num/mod.rs:3-26 defines a local private
FloatErrorKind and ParseFloatError shell so the standalone package can name
the parser's error type. The pursued GOALs observe only panic versus normal
return and, on normal return, the outer Result's Ok/Err discriminant; they do
not observe the private error kind or formatting. No identity is asserted
between this local shell and an unpinned core error payload.
crate/Cargo.toml:5-22 selects the package, empty default features, and
checked-overflow profiles. The configuration and fresh build are independently
reproduced in setup-reproduction.txt.
Visibility, derives, and bounds
-------------------------------
upstream/dec2flt/mod.rs:90 versus crate/dec2flt/mod.rs:90 changes only the
visibility of the existing BiasedFp import so a goal-facing caller can name the
same type. It changes neither layout nor execution.
upstream/dec2flt/common.rs:68 and decimal.rs:28 and decimal_seq.rs:17 include
Debug derives. The corresponding crate spans common.rs:48-51,
decimal.rs:28-31, and decimal_seq.rs:17-20 remove only Debug. Copy, Clone,
PartialEq, Eq, and Default used by computation remain where present, and no
accepted observation formats these records.
upstream/traits.rs:11-52 versus crate/traits.rs:11-64 removes formatting from
Int, removes a redundant Copy supertrait from CastInto, and instantiates Int
only for u64. Every call of CastInto is through Int, which still requires
Copy; all retained concrete values are primitive Copy values. The removed
u16/u32 instances are associated only with the disabled f16/f32 formats.
upstream/traits.rs:55-76 versus crate/traits.rs:67-80 removes Add, Debug,
PartialEq, PartialOrd, Default, and Clone from Float while retaining Copy, Mul,
Div, and Neg. A search of all retained generic bodies shows no call using a
removed operation. upstream/dec2flt/decimal.rs:56-89 versus
crate/dec2flt/decimal.rs:59-111 and upstream/dec2flt/mod.rs:209-256 versus
crate/dec2flt/mod.rs:352-520 add direct Div, Mul, and Neg bounds already implied
by Lemire -> Float, and replace operator notation with calls to those same
traits. Rust desugars the original /, *, and unary - to these trait calls, so
the operands, call order, result, and admitted f64 specialization are unchanged.
Exact constants, tables, and specialized decoding
-------------------------------------------------
The source formulae and decimal-literal table were evaluated directly by the
pinned rustc using the retained source
reference/model-evidence/adaptation-constants-probe.rs. The command was:
R=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
P=reference/model-evidence/adaptation-constants-probe.rs
B=.trellis/scratch/adaptation-constants-probe
"$R" --edition 2024 --target x86_64-unknown-linux-gnu -C opt-level=0 "$P" -o "$B"
sha256sum "$P" "$B"
"$B"
The source hash was
b5a4a2cba0c08053cb9a816adb1ba5dbd160bf3928bdf5ccf56b7ae83aaa2aa5
and the resulting executable hash was
b02d2f6deb675f17d0dbdc22e57a67d7692689f7a2b0d7b125556c35c4b8a4a5.
Raw output was:
largest_power_of_ten=308
max_exponent_fast_path=22
max_exponent_disguised=37
neg_nan=fff8000000000000
pow10_0=3ff0000000000000
pow10_1=4024000000000000
pow10_2=4059000000000000
pow10_3=408f400000000000
pow10_4=40c3880000000000
pow10_5=40f86a0000000000
pow10_6=412e848000000000
pow10_7=416312d000000000
pow10_8=4197d78400000000
pow10_9=41cdcd6500000000
pow10_10=4202a05f20000000
pow10_11=42374876e8000000
pow10_12=426d1a94a2000000
pow10_13=42a2309ce5400000
pow10_14=42d6bcc41e900000
pow10_15=430c6bf526340000
pow10_16=4341c37937e08000
pow10_17=4376345785d8a000
pow10_18=43abc16d674ec800
pow10_19=43e158e460913d00
pow10_20=4415af1d78b58c40
pow10_21=444b1ae4d6e2ef50
pow10_22=4480f0cf064dd592
upstream/traits.rs:134-137 computes LARGEST_POWER_OF_TEN through a Float
default, and upstream/traits.rs:175-193 gives the generic integer_decode and
the helper used by that constant. crate/traits.rs:146 makes the constant an
associated requirement; crate/traits.rs:309-359 supplies the retained f64
values and decoder after substituting BITS=64, SIG_BITS=52, EXP_BIAS=1023,
EXPONENT_MASK, MANTISSA_MASK, and the u64 operations. Each source expression
then becomes exactly the corresponding crate expression: sign is bits>>63,
exponent is (bits & mask)>>52 cast to i16, the subnormal mantissa is shifted
once, the normal mantissa receives 1<<52, and 1023+52 is subtracted. The
resulting tuple and every bit operation are unchanged. The probe output above
shows that the computed f64 LARGEST_POWER_OF_TEN is 308 and that the source
-f64::NAN word is fff8000000000000, exactly crate/traits.rs:315-327; the
independent binary64-boundary.txt record fixes the masks and primitive bit
semantics used by the decoder.
upstream/dec2flt/mod.rs:118-129 gives the two Lemire default formulae.
crate/dec2flt/mod.rs:115-128 makes them associated requirements, and the
retained f64 instance at crate/dec2flt/mod.rs:217-220 supplies 22 and 37, the
integer results of the two source formulae for 53 significand bits.
upstream/dec2flt/mod.rs:176-181 indexes a 32-entry f64 table with exponent&31.
crate/dec2flt/mod.rs:222-251 performs the same masked selection using from_bits:
cases 0 through 22 are the exact pinned binary64 words printed above for 1e0 through 1e22 and
all other cases return positive zero, as did entries 23 through 31. The full
word list and the pinned float semantics are recorded in binary64-boundary.txt.
The analogous f16/f32 replacements at crate/dec2flt/mod.rs:145-215 and
crate/traits.rs:187-307 lie under cfg(any()) and cannot enter this build.
Whole-function from_u64 opacity
-------------------------------
upstream/dec2flt/mod.rs:184-188 and crate/dec2flt/mod.rs:254-263 have the same
f64 body: the same enabled debug_assert that v <= 1<<53, followed by the same
primitive `v as f64` cast. The sole semantic-boundary annotation is
#[charon::opaque] at crate line 259, syntactically attached to the function
item. It therefore hides the entire from_u64 body from translation: neither
the debug assertion nor the cast is transparent in the extraction. The
callers, their guards, and the surrounding native-path computation remain
transparent. The fresh external inventory contains the whole method as the
single external F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64.from_u64. Its
separately reviewed ModelF64FromU64 binding supplies exactly successful integer
conversion for v <= 2^53 and assertion failure otherwise.
Digit scans, slice patterns, and helper extraction
-------------------------------------------------
upstream/dec2flt/common.rs:14-53 supplies ByteSlice::parse_digits: repeatedly
split_first, wrapping-subtract ASCII zero, invoke the closure exactly when the
result is below 10, consume that byte, and stop at the first other byte.
crate/dec2flt/common.rs:11-36 removes only this method. Its complete set of
uses is replaced as follows.
* upstream/dec2flt/parse.rs:31-48 versus crate/dec2flt/parse.rs:31-58 keeps the
eight-byte loop, wrapping multiply/add, and then performs the same digit test,
accumulator update, and one-byte progress with an index. The local rename
num to chunk is lexical only.
* upstream/dec2flt/parse.rs:83-97 versus crate/dec2flt/parse.rs:131-153 expands
matches!/parse_digits into the same nonempty first-digit guard, the same
0x10000 bounded exponent update, the same first-nondigit suffix, and the same
final sign. The bound is tested before each checked multiply and addition,
exactly as in the closure.
* upstream/dec2flt/decimal_seq.rs:220-295 versus
crate/dec2flt/decimal_seq.rs:231-359 extracts parse_digits_into_seq,
parse_decimal_exponent, and count_trailing_zeros. The digit helpers use the
same wrapping byte test, forward order, try_add_digit state transition, and
0x10000 exponent guard. The reverse helper visits indices consumed_len-1
down to zero, increments only for ASCII zero, ignores a decimal point, and
stops at the first other byte, exactly the original iter().rev() loop.
In all these replacements, indexing occurs only under count<len or !is_empty,
so it has the same bounds as split_first. Slicing advances by exactly the same
one or eight bytes. No wrapping operation is replaced by checked arithmetic,
and no checked source operation is replaced by wrapping arithmetic.
upstream/dec2flt/parse.rs:155-181 versus crate/dec2flt/parse.rs:82-119 and
212-226 moves two loops into adjust_many_digit_count and parse_many_digits.
The prefix helper visits the same start bytes in the same order, performs the
same saturating_sub and checked isize subtraction, and stops on the same byte.
The retry helper makes the same first 19-digit call, tests the same threshold,
makes the same one-byte rebase and second call in the alternate branch,
computes the same offset with the same sign, casts it to i64, and performs the
same checked addition of exp_number last. Thus any large-input panic is
preserved rather than excluded.
upstream/dec2flt/decimal_seq.rs:226-295 versus
crate/dec2flt/decimal_seq.rs:284-359 replaces literal split_first patterns by
nonempty index tests. The leading-zero scans, optional decimal point, optional
exponent marker, optional exponent sign, and suffixes occur in the same order.
The crate's exp_sign*exp_num equals the source choice between exp_num and
-exp_num because exp_num is bounded by the unchanged 0x10000 guard; the final
decimal_point checked addition is in the same position. Casts of lengths to
i32 and every subsequent checked update remain unchanged, including their
large-input behavior.
Delayed returns
---------------
upstream/dec2flt/decimal_seq.rs:173-198 versus
crate/dec2flt/decimal_seq.rs:176-203 replaces one return inside right_shift's
loop by all_zero=true, exits because !all_zero is the loop guard, and returns
immediately afterward. No decimal_point, digit, index, or arithmetic update
occurs between the original and delayed return.
upstream/dec2flt/slow.rs:46-76 versus crate/dec2flt/slow.rs:46-94 replaces two
nested-loop returns by loop_result. In the zero branch it records fp_zero,
skips the source-skipped exp2 addition, exits through is_none(), and returns.
In the infinity branch it records fp_inf, skips the source-skipped exp2
subtraction, exits, and returns. On all other iterations it performs the same
shift, checked state changes, and exponent update. Lines 95-126 after these
returns are otherwise the source lines 77-110 unchanged.
Dispatcher trace and public projection
--------------------------------------
upstream/dec2flt/mod.rs:209-256 is the whole original dispatcher.
crate/dec2flt/mod.rs:285-349 declares trace data only, lines 352-505 execute the
instrumented dispatcher, and lines 507-520 define public dec2flt as its first
projection. Comparing the bodies gives the following branch-by-branch
correspondence.
* Both call as_bytes, inspect the first byte, reject empty input before a helper,
remove at most one sign, and reject a sign-only body. The trace stores the
already obtained body and Boolean sign.
* Both call parse_number first on that exact body. Only None calls
parse_inf_nan on the same body and sign. Its Some is returned directly and
its None returns invalid. The trace stores those existing Option values.
* Both overwrite only Decimal.negative, test the same compile-time
!optimize_for_size condition, call try_fast_path once, and return its Some
directly. The trace stores the copied Decimal and Option; Decimal is Copy.
* Both call compute_float first with num.exponent and num.mantissa. The crate's
second_compute_guard is exactly the first two conjuncts of the source
short-circuit. Therefore the checked mantissa+1 and second compute_float call
occur under precisely the source guard, in the same order. The same pair
comparison either retains fp or changes only p_biased to -1.
* Both test the post-comparison p_biased<0 once, call parse_long_mantissa on the
unchanged body exactly when true, and otherwise retain the same pair. The
trace records both guard and result without another helper call.
* The extra assembled_word expression is the same cast, shift, and OR performed
by biased_fp_to_float at upstream lines 202-206 and crate lines 278-282; these
integer operations neither panic nor mutate fp. Both then call assembly once
on the selected pair and apply unary negation exactly when num.negative.
Public dec2flt returns the identical Result first component.
Consequently the trace does not infer uncomputed data: it records the exact
variant; sign-stripped body and sign; numeric/special Options; fast-path input
and result; first and conditional second integer operands and results;
comparison, forced-deferral and post-comparison pair; slow guard and result;
selected pair; assembled word; pre-sign assembly word; sign-application fact;
and final word. Special and native direct returns create no selected pair.
All source call order, guards, checked arithmetic, mutable-state transitions,
panic points, and returned Result/F64 observations remain in place.
F64-only restriction
--------------------
crate/traits.rs:187-307 and crate/dec2flt/mod.rs:140-215 add cfg(any()) to the
f16/f32 Float, FloatExt, and Lemire implementations. crate/traits.rs:59-64
retains only u64 Int. The retained f64 implementations are
crate/traits.rs:309-360 and crate/dec2flt/mod.rs:217-264. Every goal-facing
function remains generic in the source and extraction, but each pursued source
subject specializes it to f64, whose associated integer is u64. There is no
dynamic format dispatch, so removing other impl blocks cannot change an f64
call, its native decision, checks, result word, NaN classification, fields, or
trace. The fresh boundary inventory in setup-reproduction.txt confirms that
no removed-format external remains.
Conclusion
----------
The inventory is exhaustive: three supplied files are identical, seven have
all hunks classified above, and the four added files are the package shell.
For the configured f64 specialization, the adapted crate has the same input
domains, branch order, guards, checked/wrapping distinction, state transitions,
panic versus normal behavior, and public/helper observations as the supplied
source. The only new observations are the trace fields, each copied from an
existing value or computed by the same pure assembly expression. This
conclusion is independent of whether any parser-correctness GOAL is true.
reference/model-evidence/source-valid-byte-slice.txt
Source-valid byte-slice domain evidence
Pinned toolchain commands, run from the repository root:
rustc --version --verbose
rustc --print cfg | rg 'target_(arch|pointer_width)'
rustc .trellis/scratch/source_valid_slice_probe.rs -o /tmp/source_valid_slice_probe
/tmp/source_valid_slice_probe
Raw configuration and probe output:
rustc 1.98.0-nightly (14210df0e 2026-05-31)
host: x86_64-unknown-linux-gnu
target_arch="x86_64"
target_pointer_width="64"
arch=x86_64
usize_bits=64
isize_max=9223372036854775807
u8_size=1
Pinned core-library source:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:801
states that a slice is never larger than isize::MAX bytes.
The same toolchain's core/src/num/int_macros.rs:47 defines a signed
integer's MAX as the corresponding unsigned MAX shifted right by one.
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/mod.rs:507-510
requires the contents of a str to remain valid UTF-8 and states that using a
str whose contents are not valid UTF-8 is undefined behavior.
Consequently, on the configured 64-bit target a &[u8] has at most
9223372036854775807 elements. This is a byte-count condition only: &[u8]
does not impose UTF-8 validity or restrict the values of its u8 elements.
A Rust str has the same inherent byte-length bound and additionally consists
of valid UTF-8 bytes.
Upstream → extraction-crate adaptation diff
--- upstream/dec2flt/decimal_seq.rs
+++ crate/dec2flt/decimal_seq.rs
@@ -14,7 +14,10 @@
use crate::num::imp::dec2flt;
/// A decimal floating-point number, represented as a sequence of decimal digits.
-#[derive(Clone, Debug, PartialEq)]
+// Debug output is absent from the accepted observations. Removing only that
+// implementation preserves the representation, Clone/PartialEq behavior, and
+// every fallback operation independently of GOAL truth.
+#[derive(Clone, PartialEq)]
pub struct DecimalSeq {
/// The number of significant digits in the decimal.
pub num_digits: usize,
@@ -173,12 +176,16 @@
let mut read_index = 0;
let mut write_index = 0;
let mut n = 0_u64;
- while (n >> shift) == 0 {
+ let mut all_zero = false;
+ while (n >> shift) == 0 && !all_zero {
if read_index < self.num_digits {
n = (10 * n) + self.digits[read_index] as u64;
read_index += 1;
} else if n == 0 {
- return;
+ // The source returns here from inside the loop. Recording the
+ // condition and returning immediately after the loop executes
+ // no intervening operation and preserves the unchanged value.
+ all_zero = true;
} else {
while (n >> shift) == 0 {
n *= 10;
@@ -186,6 +193,9 @@
}
break;
}
+ }
+ if all_zero {
+ return;
}
self.decimal_point -= read_index as i32 - 1;
if self.decimal_point < -Self::DECIMAL_POINT_RANGE {
@@ -218,24 +228,80 @@
}
}
+// This is exactly the source reverse scan over the already-consumed prefix.
+// It is separate because Aeneas cannot join the loop while `parse_decimal_seq`
+// retains its other slice borrows. The downward index has the same visitation
+// order and counts precisely the same zero bytes while ignoring dots.
+fn count_trailing_zeros(start: &[u8], consumed_len: usize) -> usize {
+ let mut n_trailing_zeros = 0;
+ let mut i = consumed_len;
+ let mut scanning = true;
+ while i != 0 && scanning {
+ let c = start[i - 1];
+ if c == b'0' || c == b'.' {
+ i -= 1;
+ if c == b'0' {
+ n_trailing_zeros += 1;
+ }
+ } else {
+ scanning = false;
+ }
+ }
+ n_trailing_zeros
+}
+
+// Equivalent to `ByteSlice::parse_digits(|digit| d.try_add_digit(digit))`.
+// An explicit index keeps the closure's mutable borrow out of the enclosing
+// parser context while retaining the same wrapping digit test and updates.
+fn parse_digits_into_seq<'a>(s: &'a [u8], d: &mut DecimalSeq) -> &'a [u8] {
+ let mut count = 0;
+ while count < s.len() && s[count].wrapping_sub(b'0') < 10 {
+ let digit = s[count].wrapping_sub(b'0');
+ d.try_add_digit(digit);
+ count += 1;
+ }
+ &s[count..]
+}
+
+// Equivalent to the source exponent `parse_digits` closure. Bytes after the
+// first nondigit were ignored by the caller, so only the accumulated value is
+// returned; the 0x10000 guard and wrapping digit classification are identical.
+fn parse_decimal_exponent(s: &[u8]) -> i32 {
+ let mut exp_num = 0;
+ let mut count = 0;
+ while count < s.len() && s[count].wrapping_sub(b'0') < 10 {
+ let digit = s[count].wrapping_sub(b'0');
+ if exp_num < 0x10000 {
+ exp_num = 10 * exp_num + digit as i32;
+ }
+ count += 1;
+ }
+ exp_num
+}
+
/// Parse a big integer representation of the float as a decimal.
pub fn parse_decimal_seq(mut s: &[u8]) -> DecimalSeq {
let mut d = DecimalSeq::default();
let start = s;
- while let Some((&b'0', s_next)) = s.split_first() {
- s = s_next;
- }
-
- s = s.parse_digits(|digit| d.try_add_digit(digit));
-
- if let Some((b'.', s_next)) = s.split_first() {
- s = s_next;
+ // Aeneas rejects the literal-pattern `while let`; this loop performs the
+ // same nonempty check, byte comparison, and one-byte consumption in the
+ // same order, with identical slice bounds.
+ while !s.is_empty() && s[0] == b'0' {
+ s = &s[1..];
+ }
+
+ s = parse_digits_into_seq(s, &mut d);
+
+ if !s.is_empty() && s[0] == b'.' {
+ s = &s[1..];
let first = s;
// Skip leading zeros.
if d.num_digits == 0 {
- while let Some((&b'0', s_next)) = s.split_first() {
- s = s_next;
+ // As above, this is the source leading-zero loop written in the
+ // indexed form accepted by Aeneas.
+ while !s.is_empty() && s[0] == b'0' {
+ s = &s[1..];
}
}
while s.len() >= 8 && d.num_digits + 8 < DecimalSeq::MAX_DIGITS {
@@ -247,20 +313,17 @@
d.num_digits += 8;
s = &s[8..];
}
- s = s.parse_digits(|digit| d.try_add_digit(digit));
+ s = parse_digits_into_seq(s, &mut d);
d.decimal_point = s.len() as i32 - first.len() as i32;
}
if d.num_digits != 0 {
// Ignore the trailing zeros if there are any
- let mut n_trailing_zeros = 0;
- for &c in start[..(start.len() - s.len())].iter().rev() {
- if c == b'0' {
- n_trailing_zeros += 1;
- } else if c != b'.' {
- break;
- }
- }
+ let consumed_len = start.len() - s.len();
+ // Walking an index downward visits exactly the same bytes as
+ // `.iter().rev()` and stops on the same first nonzero nondot byte. It
+ // also avoids the missing extracted `Iterator::rev` library field.
+ let n_trailing_zeros = count_trailing_zeros(start, consumed_len);
d.decimal_point += n_trailing_zeros as i32;
d.num_digits -= n_trailing_zeros;
d.decimal_point += d.num_digits as i32;
@@ -270,25 +333,28 @@
}
}
- if let Some((&ch, s_next)) = s.split_first() {
+ // Indexed tests preserve `split_first`'s nonempty guard and byte order but
+ // avoid the loop-context joins Aeneas creates for nested slice patterns.
+ if !s.is_empty() {
+ let ch = s[0];
if ch == b'e' || ch == b'E' {
- s = s_next;
- let mut neg_exp = false;
- if let Some((&ch, s_next)) = s.split_first() {
- neg_exp = ch == b'-';
+ s = &s[1..];
+ let mut exp_sign = 1_i32;
+ if !s.is_empty() {
+ let ch = s[0];
+ if ch == b'-' {
+ exp_sign = -1;
+ }
if ch == b'-' || ch == b'+' {
- s = s_next;
+ s = &s[1..];
}
}
- let mut exp_num = 0_i32;
-
- s.parse_digits(|digit| {
- if exp_num < 0x10000 {
- exp_num = 10 * exp_num + digit as i32;
- }
- });
-
- d.decimal_point += if neg_exp { -exp_num } else { exp_num };
+ let exp_num = parse_decimal_exponent(s);
+
+ // `exp_num` is bounded by the source's 0x10000 guard, so this
+ // multiplication cannot overflow and equals the original Boolean
+ // choice between `-exp_num` and `exp_num` under checked arithmetic.
+ d.decimal_point += exp_sign * exp_num;
}
}
Record details
| Kind | source adaptation site (file-level diff) |
|---|
Captured evidence identities
[
{
"path": "extraction-evidence/COMMAND.json",
"sha256": "611f36cefb2d895e7b22bd15eaccc1bd57d1b539d54cbd6337e84d0573719a9e",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "extraction-evidence/DETERMINISM.json",
"sha256": "360301745fc66c713335320b2e6a57ef7fb71e390cc7db31a6316a3902f7ef8f",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "extraction-evidence/RESULT.json",
"sha256": "62a89492b5592f404e065d2f8c9a89fd3f83cc59b772fed0eaa475138211d641",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "extraction-evidence/STDERR.bin",
"sha256": "ab4dc202d7a8a30a83ea62ed154710a48148d62230ff8b834700919d4e679c0c",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "extraction-evidence/STDOUT.bin",
"sha256": "604aae51d5c3394417224f655c7de355cc3e699d31fff49f93734706ad43f3f8",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "reference/model-evidence/adaptation-constants-probe.rs",
"sha256": "b5a4a2cba0c08053cb9a816adb1ba5dbd160bf3928bdf5ccf56b7ae83aaa2aa5",
"cited_by": [
"reference/model-evidence/source-adaptation-delta.txt"
]
},
{
"path": "reference/model-evidence/binary64-boundary.txt",
"sha256": "a17d82e7f789ce7f1fbb3922a66ec8806999e526532d637605263882d37b7abf",
"cited_by": [
"shared extraction boundary: Tablet/Preamble.tex",
"reference/model-evidence/source-adaptation-delta.txt"
]
},
{
"path": "reference/model-evidence/binary64-probe.rs",
"sha256": "68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e",
"cited_by": [
"reference/model-evidence/binary64-boundary.txt"
]
},
{
"path": "reference/model-evidence/setup-reproduction.txt",
"sha256": "f97c87d1af65130560f67d2bfcd737106b191c8fce1ed0174569ee218c4ee8d7",
"cited_by": [
"shared extraction boundary: Tablet/Preamble.tex",
"reference/model-evidence/source-adaptation-delta.txt"
]
},
{
"path": "reference/model-evidence/source-adaptation-delta.txt",
"sha256": "5502c71eb4420211d20bd8b6aade171c56cc2dce11d758a73bb93ef1083634ad",
"cited_by": [
"shared extraction boundary: Tablet/Preamble.tex"
]
},
{
"path": "reference/model-evidence/source-valid-byte-slice.txt",
"sha256": "e7887429c66a303cbba3b4df30080ddd9ba4d54e24f25f74947deb228b32b04f",
"cited_by": [
"shared extraction boundary: Tablet/Preamble.tex"
]
}
]crate/dec2flt/mod.rs
Historical preparation document: preparation source-adaptation audit. It describes the state and obligations at preparation. This generation is captured in Modeling. Later closure and review results appear in the proof and modeling views. This original document remains available as history.
Shared extraction-boundary explanation (Preamble)
Preservation argument
Claim
x86_64-unknown-linux-gnu, the library's empty default feature set
(so optimize_for_size is disabled), the unoptimized development
profile, enabled debug assertions and integer overflow checks, and the target's
SSE2 precision-setting branch. Interpret each of the frozen extraction's 24
external operations by the separately justified model-support definition that
owns that operation. Under those interpretations, the composed Aeneas model
represents the supplied source's f64 specialization on all of these
domains, without a correctness premise: every Rust str whose bytes
are valid UTF-8 and whose 64-bit slice length is at most
\mathtt{isize::MAX}=2^{63}-1; every Rust &[u8] whose length is at
most that bound, with arbitrary byte contents; every Decimal; every
i64/u64 pair; and every BiasedFp.dec2flt::<f64> the relation preserves panic versus normal return,
the outer returned Result's Ok/Err discriminant,
and, on success, the exact binary64 word and its NaN classification. For
parse_number it preserves panic versus normal return, the
Option discriminant, and all four returned Decimal fields.
For parse_inf_nan::<f64> and
Decimal::try_fast_path::<f64> it preserves panic versus normal
return, None versus Some, and every returned word and NaN
classification. For compute_float::<f64> and
parse_long_mantissa::<f64> it preserves panic versus normal return
and both fields of every returned BiasedFp. For
biased_fp_to_float::<f64> it preserves panic versus normal return
and the exact returned word, with no restriction on the pair fields.dec2flt_with_trace::<f64> it additionally preserves the public
result and the complete trace: its control-flow variant; sign-stripped body and
lexical sign; numeric and special helper results; signed native input and
native result; first integer operands and result; second-call guard, optional
operands and result, comparison and forced-deferral fact; post-comparison pair;
slow-path guard and optional result; selected pair; assembled unsigned word;
pre-sign assembly result; sign-application fact; and final word. Public
dec2flt::<f64> is exactly the first projection of that interface, and
direct special and native returns select no raw pair.Proof
generated.lean, with SHA-256
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692.
The raw source has no placeholder. The compatibility check reports no
unapproved axiom and isolates exactly 24 external declarations; the complete
inventory equals the 24 entries of Tablet/model-support.json.
compose-native --check reports an unchanged composition and equal
expected and actual Preamble hashes. Thus all transparent extracted
declarations come from this one pinned source and every nontransparent
operation is explicit. The premise assigning each external its owning
definition deliberately leaves that definition's primitive-semantics proof to
its own preservation record; no primitive binding is re-proved here.fpu.rs, lemire.rs, and table.rs are
byte-identical. The standalone namespace and local error shell introduce no
call. The GOALs observe only panic versus normal return and the outer
Ok/Err discriminant, so the shell's private kind and
formatting are unobserved; no identity with an unpinned core error payload is
asserted. Visibility and removed Debug derives do not affect values.
The retained generic bodies use none of the removed trait operations;
the direct Mul, Div, and Neg clauses and calls are
the operations already implied by Lemire. Only the u64
integer instance and f64 Float, FloatExt, and
Lemire instances can participate in an f64 execution, so
disabling the u16/u32 and f16/f32
instances changes no such call.f64/u64 field widths and
masks; the fast-path bounds are the source formula results; and the match over
power-of-ten words has the same masked index and exact words as the source
array. The toolchain-specific words, masks, classifications, casts, and
rounding behavior are independently pinned in
reference/model-evidence/binary64-boundary.txt. The frozen
from_u64 Rust body is the enabled assertion followed by the
u64 as f64 conversion. Because #[charon::opaque] applies to
the whole function, neither operation inside that body is transparent in the
extraction: the whole method is the single inventoried external. Its callers,
their guards, and the surrounding native computation remain transparent.
ModelF64FromU64 supplies exactly successful integer conversion for
v\leq2^{53} and assertion failure otherwise.split_first loops. Extracted helpers receive the same
slices and mutable values, visit bytes in the same forward or reverse order,
and retain every saturating, wrapping, and checked operation. Delayed returns
set a result flag, execute no intervening state update, leave the loop through
that flag, and immediately return the source value. In particular, casts and
length-derived additions on very large inputs keep their original panic or
normal behavior rather than acquiring a convenience size bound.None, overwrite only the parsed sign, try the enabled native
path, make the first integer call, and evaluate the checked
mantissa+1 and second call under exactly the source short-circuit
guard. Both force the same deferral on unequal pairs, call the slow helper on
the unchanged body exactly for a negative post-comparison exponent, assemble
the same selected pair, and apply the sign last. Every trace field is either
one of those already computed values or the same nonmutating cast/shift/OR word
used by assembly. Hence recording the trace and discarding it in the public
projection changes neither call order, guards, state, panic points, nor any
returned observation.isize::MAX, while a Rust string adds UTF-8 validity. Sub-slicing
preserves the length bound and need not preserve an independent string type.
These facts establish all domains and observations in the claim independently
of the truth or falsity of any GOAL.Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
extraction-evidence/COMMAND.json
{"declaration_reader_sha256":"76f60cf0b867fad9727d2256d32b306c8cba3725216a4225d0f83add77fd6158","extraction_provenance":{"extraction_toolchain":{"aeneas":"fa699427","aeneas_revision":"fa699427cdfa8f604b891fb0223ef42883dd7dc4","cargo_features":[{"features":["default"],"name":"dec2flt-model","source":"workspace:Cargo.toml","version":"0.1.0"}],"cargo_lock_sha256":"bc644c624ded89197356bbd65d995054b7fb08e5bdfbaa38c6e7c7a53772cecf","cfg":["debug_assertions","emscripten_wasm_eh","feature=\"default\"","fmt_debug=\"full\"","overflow_checks","panic=\"unwind\"","relocation_model=\"pic\"","target_abi=\"\"","target_arch=\"x86_64\"","target_endian=\"little\"","target_env=\"gnu\"","target_family=\"unix\"","target_feature=\"fxsr\"","target_feature=\"sse\"","target_feature=\"sse2\"","target_feature=\"x87\"","target_has_atomic","target_has_atomic=\"16\"","target_has_atomic=\"32\"","target_has_atomic=\"64\"","target_has_atomic=\"8\"","target_has_atomic=\"ptr\"","target_has_atomic_load_store","target_has_atomic_load_store=\"16\"","target_has_atomic_load_store=\"32\"","target_has_atomic_load_store=\"64\"","target_has_atomic_load_store=\"8\"","target_has_atomic_load_store=\"ptr\"","target_has_atomic_primitive_alignment=\"16\"","target_has_atomic_primitive_alignment=\"32\"","target_has_atomic_primitive_alignment=\"64\"","target_has_atomic_primitive_alignment=\"8\"","target_has_atomic_primitive_alignment=\"ptr\"","target_has_reliable_f128","target_has_reliable_f16","target_has_reliable_f16_math","target_object_format=\"elf\"","target_os=\"linux\"","target_pointer_width=\"64\"","target_thread_local","target_vendor=\"unknown\"","ub_checks","unix"],"charon":"0.1.216","charon_revision":"6f058254eb741c12e9b388df07adaf7cc8aac8ed","extraction_profile":"dev","lean":"4.30.0-rc2","overflow_checks":true,"panic_strategy":"unwind","rustc_vv":"rustc 1.98.0-nightly (14210df0e 2026-05-31)\nbinary: rustc\ncommit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65\ncommit-date: 2026-05-31\nhost: x86_64-unknown-linux-gnu\nrelease: 1.98.0-nightly\nLLVM version: 22.1.6\n","target_pointer_width":64,"target_triple":"x86_64-unknown-linux-gnu"},"extractor_stack":["charon@0.1.216","aeneas@fa699427"],"extractor_toolchain_sha256":"18657da0659dee7889ed8a937b136c9abbc3a35e9050241cd8201c94fd232323","not_recorded":[],"source_digests":[{"source_file":"lib.rs","source_sha256":"b5ecf4d7e9dfa0337f1586ae0e865fbbe2dd384137ee6e2ad635f0d5d6e916a9"}]},"extractor_script_path":"/home/leanagent/pv_runs/trellis-native-implementation-v85/scripts/extract_pv_model.py","extractor_script_sha256":"cc1fdd50a78185c7bb564b715c554cb35d9fc09ed566b6c3d4f482f2d27ef67d","kernel_gate_checkers":[],"log_concatenation_order":"runs_then_steps_in_array_order","runs":[{"run_role":"primary","steps":[{"argv":["/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","-vV"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"rustc-version","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"},{"argv":["/home/leanagent/pv_spike/tools/charon/bin/charon","cargo","--preset=aeneas","--dest-file","/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/m.llbc","--","--offline","--profile","dev","--target","x86_64-unknown-linux-gnu"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_BUILD_TARGET":"x86_64-unknown-linux-gnu","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"charon","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"},{"argv":["/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/cargo","metadata","--format-version=1","--locked","--offline","--filter-platform","x86_64-unknown-linux-gnu"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_BUILD_TARGET":"x86_64-unknown-linux-gnu","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"cargo-metadata","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"},{"argv":["/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/cargo","rustc","--lib","--locked","--offline","--profile","dev","--target","x86_64-unknown-linux-gnu","--","--print","cfg"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_BUILD_TARGET":"x86_64-unknown-linux-gnu","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"cargo-rustc-cfg","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"},{"argv":["/home/leanagent/pv_spike/tools/aeneas/bin/aeneas","-backend","lean","-dest","/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen","-emit-json","/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/m.llbc"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_BUILD_TARGET":"x86_64-unknown-linux-gnu","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"aeneas","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"}]}],"schema":"trellis-extraction-command/v1","tool_source_checkouts":[]}extraction-evidence/DETERMINISM.json
{"comparison":"generated_lean_and_complete_tablet_tree_byte_identity","generated_lean_byte_identical":false,"generated_lean_sha256":["49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692"],"kernel_filespec_gate":"not_run","kernel_prescribed_region_gate":"not_run","namespace_context_roundtrip_gate":"not_run","result_sha256":"62a89492b5592f404e065d2f8c9a89fd3f83cc59b772fed0eaa475138211d641","run_roles":["primary"],"schema":"trellis-extraction-determinism/v2","status":"not_run","tablet_root_sha256":["57e6ec9f6e8b1d9d78ab01504bad58f93cb43308edf77f73f86b986b8d07b809"],"tablet_tree_byte_identical":false}extraction-evidence/RESULT.json
{"command_sha256":"611f36cefb2d895e7b22bd15eaccc1bd57d1b539d54cbd6337e84d0573719a9e","runs":[{"generated_lean_sha256":"49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692","run_role":"primary","steps":[{"exit_status":0,"stderr_byte_length":0,"stderr_offset":0,"stderr_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","stdout_byte_length":212,"stdout_offset":0,"stdout_sha256":"e6ea0da4a3301256a0a0dc0d67d11acf4e83e0d1bff5dd987ccdaa43708714bc","tool":"rustc-version"},{"exit_status":0,"stderr_byte_length":654,"stderr_offset":0,"stderr_sha256":"263937c29ffcb9cf54e452b2d8b89e015a1fa1a5b2a2d237292d4350d0b04aed","stdout_byte_length":0,"stdout_offset":212,"stdout_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","tool":"charon"},{"exit_status":0,"stderr_byte_length":0,"stderr_offset":654,"stderr_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","stdout_byte_length":2897,"stdout_offset":212,"stdout_sha256":"ec87d2fc78972115c1b9e436f373a890f3847397a741d91d720dce4fb36c7a90","tool":"cargo-metadata"},{"exit_status":0,"stderr_byte_length":302,"stderr_offset":654,"stderr_sha256":"7025c1726c90c35a211042d6945c25ff6015acaca27ee97a063465221b792806","stdout_byte_length":1062,"stdout_offset":3109,"stdout_sha256":"4081a320e6292139b4a673d225682dc054b77cba113b8c8a8fbb0593f824b713","tool":"cargo-rustc-cfg"},{"exit_status":0,"stderr_byte_length":7084,"stderr_offset":956,"stderr_sha256":"5f41394d8b12a0d7a6c9e7115108a06b20599eb7ddd611cff4b90b31ba2fe26a","stdout_byte_length":933,"stdout_offset":4171,"stdout_sha256":"376c43fb83e40962a056e9198dba4afb0cf8ecb0238e76c78bd9dbc32fbced4a","tool":"aeneas"}],"tablet_root_sha256":"57e6ec9f6e8b1d9d78ab01504bad58f93cb43308edf77f73f86b986b8d07b809"}],"schema":"trellis-extraction-result/v2","stderr_byte_length":8040,"stderr_sha256":"ab4dc202d7a8a30a83ea62ed154710a48148d62230ff8b834700919d4e679c0c","stdout_byte_length":5104,"stdout_sha256":"604aae51d5c3394417224f655c7de355cc3e699d31fff49f93734706ad43f3f8"}extraction-evidence/STDERR.bin
Compiling dec2flt-model v0.1.0 (/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate)
warning: feature `f16` is declared but not used
--> lib.rs:2:46
|
2 | #![feature(cfg_target_has_reliable_f16_f128, f16, float_masks, register_tool, staged_api)]
| ^^^
|
= note: `#[warn(unused_features)]` (part of `#[warn(unused)]`) on by default
warning: `dec2flt-model` (lib) generated 1 warning
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.41s
Compiling dec2flt-model v0.1.0 (/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.02s
[?25lApplied prepasses: [------------------------------------------------] 0/203 ⠋
Applied prepasses: [------------------------------------------------] 1/203 ⠋
Applied prepasses: [#####-------------------------------------------] 24/203 ⠋
Applied prepasses: [########----------------------------------------] 38/203 ⠋
Applied prepasses: [##############################------------------] 128/203 ⠙
Applied prepasses: [################################################] 203/203 ✔️
[?25h[?25lTranslated globals: [-------------------------------------------------] 0/50 ⠋
Translated globals: [#################################################] 50/50 ✔️
[?25h[?25lTranslated opaque functions: [----------------------------------------] 0/87 ⠋
Translated opaque functions: [########################################] 87/87 ✔️
[?25h[?25lTranslated transparent functions: [---------------------------------] 0/107 ⠋
Translated transparent functions: [---------------------------------] 1/107 ⠋
Translated transparent functions: [###------------------------------] 10/107 ⠙
Translated transparent functions: [######---------------------------] 22/107 ⠹
Translated transparent functions: [##########-----------------------] 35/107 ⠹
Translated transparent functions: [##############-------------------] 47/107 ⠹
Translated transparent functions: [###############------------------] 51/107 ⠸
Translated transparent functions: [################-----------------] 55/107 ⠸
Translated transparent functions: [##################---------------] 60/107 ⠼
Translated transparent functions: [##################---------------] 61/107 ⠼
Translated transparent functions: [###################--------------] 64/107 ⠼
Translated transparent functions: [####################-------------] 68/107 ⠼
Translated transparent functions: [#####################------------] 69/107 ⠴
Translated transparent functions: [#####################------------] 70/107 ⠴
Translated transparent functions: [######################-----------] 72/107 ⠦
Translated transparent functions: [######################-----------] 73/107 ⠦
Translated transparent functions: [######################-----------] 74/107 ⠧
Translated transparent functions: [#######################----------] 77/107 ⠧
Translated transparent functions: [########################---------] 78/107 ⠧
Translated transparent functions: [########################---------] 80/107 ⠇
Translated transparent functions: [#########################--------] 83/107 ⠇
Translated transparent functions: [#########################--------] 84/107 ⠇
Translated transparent functions: [##########################-------] 85/107 ⠏
Translated transparent functions: [##########################-------] 86/107 ⠏
Translated transparent functions: [##########################-------] 87/107 ⠋
Translated transparent functions: [###########################------] 88/107 ⠋
Translated transparent functions: [###########################------] 90/107 ⠋
Translated transparent functions: [############################-----] 91/107 ⠙
Translated transparent functions: [############################-----] 92/107 ⠙
Translated transparent functions: [############################-----] 93/107 ⠙
Translated transparent functions: [#############################----] 95/107 ⠹
Translated transparent functions: [#############################----] 97/107 ⠹
Translated transparent functions: [##############################---] 98/107 ⠸
Translated transparent functions: [##############################---] 99/107 ⠼
Translated transparent functions: [###############################--] 101/107 ⠼
Translated transparent functions: [###############################--] 102/107 ⠴
Translated transparent functions: [###############################--] 103/107 ⠦
Translated transparent functions: [################################-] 104/107 ⠦
Translated transparent functions: [################################-] 105/107 ⠧
Translated transparent functions: [################################-] 106/107 ⠇
Translated transparent functions: [#################################] 107/107 ⠏
Translated transparent functions: [#################################] 107/107 ✔️
[?25h[?25lTranslated trait declarations: [--------------------------------------] 0/49 ⠋
Translated trait declarations: [########################--------------] 31/49 ✔️
[?25h[?25lTranslated trait impls: [---------------------------------------------] 0/85 ⠋
Translated trait impls: [#################################------------] 64/85 ✔️
[?25h[?25lPost-processed translated opaque functions: [-------------------------] 0/87 ⠋
Post-processed translated opaque functions: [-------------------------] 1/87 ⠙
Post-processed translated opaque functions: [#########################] 87/87 ✔️
[?25h[?25lPost-processed translated transparent functions: [------------------] 0/107 ⠋
Post-processed translated transparent functions: [------------------] 1/107 ⠋
Post-processed translated transparent functions: [#-----------------] 10/107 ⠙
Post-processed translated transparent functions: [##----------------] 13/107 ⠹
Post-processed translated transparent functions: [##----------------] 16/107 ⠸
Post-processed translated transparent functions: [##----------------] 17/107 ⠸
Post-processed translated transparent functions: [###---------------] 18/107 ⠼
Post-processed translated transparent functions: [###---------------] 22/107 ⠼
Post-processed translated transparent functions: [####--------------] 24/107 ⠼
Post-processed translated transparent functions: [####--------------] 29/107 ⠴
Post-processed translated transparent functions: [#####-------------] 31/107 ⠴
Post-processed translated transparent functions: [#####-------------] 33/107 ⠴
Post-processed translated transparent functions: [######------------] 39/107 ⠴
Post-processed translated transparent functions: [########----------] 48/107 ⠦
Post-processed translated transparent functions: [#########---------] 56/107 ⠦
Post-processed translated transparent functions: [##########--------] 62/107 ⠦
Post-processed translated transparent functions: [###############---] 94/107 ⠦
Post-processed translated transparent functions: [################--] 99/107 ⠧
Post-processed translated transparent functions: [################--] 100/107 ⠇
Post-processed translated transparent functions: [#################-] 102/107 ⠇
Post-processed translated transparent functions: [#################-] 104/107 ⠏
Post-processed translated transparent functions: [#################-] 105/107 ⠋
Post-processed translated transparent functions: [##################] 107/107 ⠙
Post-processed translated transparent functions: [##################] 107/107 ✔️
[?25hextraction-evidence/STDOUT.bin
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
{"packages":[{"name":"dec2flt-model","version":"0.1.0","id":"path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0","license":null,"license_file":null,"description":null,"source":null,"dependencies":[],"targets":[{"kind":["lib"],"crate_types":["lib"],"name":"dec2flt_model","src_path":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate/lib.rs","edition":"2024","doc":true,"doctest":true,"test":true}],"features":{"default":[],"optimize_for_size":[]},"manifest_path":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate/Cargo.toml","metadata":null,"publish":[],"authors":[],"categories":[],"keywords":[],"readme":null,"repository":null,"homepage":null,"documentation":null,"edition":"2024","links":null,"default_run":null,"rust_version":null}],"workspace_members":["path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0"],"workspace_default_members":["path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0"],"resolve":{"nodes":[{"id":"path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0","dependencies":[],"deps":[],"features":["default"]}],"root":"path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0"},"target_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","build_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","version":1,"workspace_root":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate","metadata":null}
debug_assertions
emscripten_wasm_eh
feature="default"
fmt_debug="full"
overflow_checks
panic="unwind"
relocation_model="pic"
target_abi=""
target_arch="x86_64"
target_endian="little"
target_env="gnu"
target_family="unix"
target_feature="fxsr"
target_feature="sse"
target_feature="sse2"
target_feature="x87"
target_has_atomic
target_has_atomic="16"
target_has_atomic="32"
target_has_atomic="64"
target_has_atomic="8"
target_has_atomic="ptr"
target_has_atomic_load_store
target_has_atomic_load_store="16"
target_has_atomic_load_store="32"
target_has_atomic_load_store="64"
target_has_atomic_load_store="8"
target_has_atomic_load_store="ptr"
target_has_atomic_primitive_alignment="16"
target_has_atomic_primitive_alignment="32"
target_has_atomic_primitive_alignment="64"
target_has_atomic_primitive_alignment="8"
target_has_atomic_primitive_alignment="ptr"
target_has_reliable_f128
target_has_reliable_f16
target_has_reliable_f16_math
target_object_format="elf"
target_os="linux"
target_pointer_width="64"
target_thread_local
target_vendor="unknown"
ub_checks
unix
[[92mInfo[39m ] Imported: /home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/m.llbc
[[92mInfo[39m ] Generated: /home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/M.lean
[[92mInfo[39m ] Generated: /home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/translation.json
[[93mWarn[39m ] The crate contains extracted external, unknown definitions: we advise using the option -split-files to allow manually providing these definitions in separate files.
[[92mInfo[39m ] Total execution time: 7.245881 seconds
reference/model-evidence/adaptation-constants-probe.rs
fn main() {
let largest_power_of_ten = (1024_f64 / std::f64::consts::LOG2_10) as i32;
let log2_5 = std::f64::consts::LOG2_10 - 1.0;
let max_exponent_fast_path = (53_f64 / log2_5) as i64;
let max_exponent_disguised =
max_exponent_fast_path + (53_f64 / std::f64::consts::LOG2_10) as i64;
println!("largest_power_of_ten={largest_power_of_ten}");
println!("max_exponent_fast_path={max_exponent_fast_path}");
println!("max_exponent_disguised={max_exponent_disguised}");
println!("neg_nan={:016x}", (-f64::NAN).to_bits());
for (exponent, value) in IntoIterator::into_iter([
1e0_f64, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11,
1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, 1e20, 1e21, 1e22,
])
.enumerate()
{
println!("pow10_{exponent}={:016x}", value.to_bits());
}
}
reference/model-evidence/binary64-boundary.txt
Primary evidence for the binary64 boundary
==========================================
Scope and identities
--------------------
This record concerns the frozen x86_64-unknown-linux-gnu extraction, the
adapted Rust crate retained in this repository, and the installed toolchain
named by modeling-input/SETUP.md. The probe source is retained at
reference/model-evidence/binary64-probe.rs; no scratch source is required to
reproduce it.
Toolchain executable:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
Target:
x86_64-unknown-linux-gnu
rustc executable SHA-256:
162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
Probe source SHA-256:
68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
Compiled probe SHA-256:
f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
Frozen generated.lean SHA-256:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692
Frozen modeling-input/manifest.json SHA-256:
2fc182c0c7acccad30c449ca349b999759b84e8ed4ec9d590e8295e43eeec077
Approved Binary64ModelDefault.lean SHA-256 at the time of this record:
03ae48fb631e6242bd21bf95d0481b66acae05f8cab343c7ab279b3c116538a3
Exact reproduction commands
---------------------------
Run from the repository root:
R=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
P=reference/model-evidence/binary64-probe.rs
B=.trellis/scratch/binary64-probe
"$R" --version --verbose
sha256sum "$R"
sha256sum "$P"
"$R" --target x86_64-unknown-linux-gnu -C opt-level=0 "$P" -o "$B"
sha256sum "$B"
"$B"
Raw output
----------
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
rustc_sha256=162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
probe_sha256=68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
binary_sha256=f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
target_arch=x86_64
mantissa_digits=53
exponent_mask=7ff0000000000000
mantissa_mask=000fffffffffffff
nan=7ff8000000000000
infinity=7ff0000000000000
neg_infinity=fff0000000000000
nan_category=Nan
infinity_category=Infinite
zero_category=Zero
subnormal_category=Subnormal
normal_category=Normal
from_bits_to_bits=7ff0000000000001
neg_payload_nan=fff0000000000001
neg_zero=8000000000000000
subnormal_tie_to_even_zero=0000000000000000
subnormal_tie_to_even_two=0000000000000002
normal_division=3fb999999999999a
mul_negative_zero=8000000000000000
div_negative_zero=8000000000000000
div_negative_infinity=fff0000000000000
mul_overflow=7ff0000000000000
mul_zero_infinity_is_nan=true
div_zero_zero_is_nan=true
mul_nan_is_nan=true
cast_2_pow_53=4340000000000000
cast_2_pow_53_plus_1=4340000000000000
Pinned Rust library sources
---------------------------
The installed sources below belong to the same named toolchain. Their
SHA-256 identities are:
core/src/primitive_docs.rs
c4b8627dd67d5dac8f383f383a9e7ff1229ea43e7599610fc61988694cf0f3e5
core/src/num/f64.rs
84540a6a59e347c63caabe12cf895ba1239c76a50682471567007138fac1c618
core/src/clone.rs
23f9cfc80347fde6b8457d46fbf7a2b8d9f34c8c58601b0b6f714ca2f6d1976b
The exact relevant text of core/src/primitive_docs.rs is:
#[rustc_doc_primitive = "f64"]
#[doc(alias = "double")]
/// A 64-bit floating-point type (specifically, the "binary64" type defined in IEEE 754-2008).
///
/// This type is very similar to [`prim@f32`], but has increased precision by using twice as many
/// bits. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on double-precision
/// values][wikipedia] for more information.
The referenced primitive-f32 documentation supplies the common primitive
floating-point operation rules quoted next:
/// - −0.0: IEEE 754 floating-point numbers have a bit that indicates their sign, so −0.0 is a
/// possible value. For comparison −0.0 = +0.0, but floating-point operations can carry
/// the sign bit through arithmetic operations. This means −0.0 × +0.0 produces −0.0 and
/// a negative number rounded to a value smaller than a float can represent also produces −0.0.
/// - [∞](#associatedconstant.INFINITY) and
/// [−∞](#associatedconstant.NEG_INFINITY): these result from calculations
/// like `1.0 / 0.0`.
///
/// When a primitive operation (addition, subtraction, multiplication, or
/// division) is performed on this type, the result is rounded according to the
/// roundTiesToEven direction defined in IEEE 754-2008. That means:
///
/// - The result is the representable value closest to the true value, if there
/// is a unique closest representable value.
/// - If the true value is exactly half-way between two representable values,
/// the result is the one with an even least-significant binary digit.
/// - If the true value's magnitude is ≥ `f32::MAX` + 2<sup>(`f32::MAX_EXP` −
/// `f32::MANTISSA_DIGITS` − 1)</sup>, the result is ∞ or −∞ (preserving the
/// true value's sign).
The same file explicitly separates arithmetic NaN choice from exact bitwise
operations; its exact relevant text is:
/// The rules for NaN values differ between *arithmetic* and *non-arithmetic* (or "bitwise")
/// operations. The non-arithmetic operations are unary `-`, `abs`, `copysign`, `signum`,
/// `{to,from}_bits`, `{to,from}_{be,le,ne}_bytes` and `is_sign_{positive,negative}`. These
/// operations are guaranteed to exactly preserve the bit pattern of their input except for possibly
/// changing the sign bit.
///
/// The following rules apply when a NaN value is returned from an arithmetic operation:
/// - The result has a non-deterministic sign.
/// - The quiet bit and payload are non-deterministically chosen from
/// the following set of options:
///
/// - **Preferred NaN**: The quiet bit is set and the payload is all-zero.
/// - **Quieting NaN propagation**: The quiet bit is set and the payload is copied from any input
/// operand that is a NaN. If the inputs and outputs do not have the same payload size (i.e., for
/// `as` casts), then
/// - If the output is smaller than the input, low-order bits of the payload get dropped.
/// - If the output is larger than the input, the payload gets filled up with 0s in the low-order
/// bits.
/// - **Unchanged NaN propagation**: The quiet bit and payload are copied from any input operand
/// that is a NaN. If the inputs and outputs do not have the same size (i.e., for `as` casts), the
/// same rules as for "quieting NaN propagation" apply, with one caveat: if the output is smaller
/// than the input, dropping the low-order bits may result in a payload of 0; a payload of 0 is not
/// possible with a signaling NaN (the all-0 significand encodes an infinity) so unchanged NaN
/// propagation cannot occur with some inputs.
/// - **Target-specific NaN**: The quiet bit is set and the payload is picked from a target-specific
/// set of "extra" possible NaN payloads. The set can depend on the input operand values.
/// See the table below for the concrete NaNs this set contains on various targets.
///
/// | `target_arch` | Extra payloads possible on this platform |
/// |---------------|------------------------------------------|
/// | `aarch64`, `arm`, `arm64ec`, `loongarch64`, `powerpc` (except when `target_abi = "spe"`), `powerpc64`, `riscv32`, `riscv64`, `s390x`, `x86`, `x86_64` | None |
Thus the model's preferred quiet NaN is one permitted result whenever
multiplication or division returns NaN. This does not claim that arbitrary
Rust arithmetic NaNs have those exact bits. By contrast, unary negation and
bit conversion must preserve all non-sign bits exactly, including for every
NaN payload.
The exact relevant declarations in core/src/num/f64.rs are:
pub const MANTISSA_DIGITS: u32 = 53;
pub const NAN: f64 = 0.0_f64 / 0.0_f64;
pub const INFINITY: f64 = 1.0_f64 / 0.0_f64;
pub const NEG_INFINITY: f64 = -1.0_f64 / 0.0_f64;
pub const SIGN_MASK: u64 = 0x8000_0000_0000_0000;
pub const EXPONENT_MASK: u64 = 0x7ff0_0000_0000_0000;
pub const MANTISSA_MASK: u64 = 0x000f_ffff_ffff_ffff;
pub const fn classify(self) -> FpCategory {
// We used to have complicated logic here that avoids the simple bit-based tests to work
// around buggy codegen for x87 targets (see
// https://github.com/rust-lang/rust/issues/114479). However, some LLVM versions later, none
// of our tests is able to find any difference between the complicated and the naive
// version, so now we are back to the naive version.
let b = self.to_bits();
match (b & Self::MANTISSA_MASK, b & Self::EXPONENT_MASK) {
(0, Self::EXPONENT_MASK) => FpCategory::Infinite,
(_, Self::EXPONENT_MASK) => FpCategory::Nan,
(0, 0) => FpCategory::Zero,
(_, 0) => FpCategory::Subnormal,
_ => FpCategory::Normal,
}
}
pub const fn to_bits(self) -> u64 {
// SAFETY: `u64` is a plain old datatype so we can always transmute to it.
unsafe { mem::transmute(self) }
}
pub const fn from_bits(v: u64) -> Self {
// It turns out the safety issues with sNaN were overblown! Hooray!
// SAFETY: `u64` is a plain old datatype so we can always transmute from it.
unsafe { mem::transmute(v) }
}
The exact scalar clone body in core/src/clone.rs is:
impl const Clone for $t {
#[inline(always)]
fn clone(&self) -> Self {
*self
}
}
Frozen adapted source
---------------------
The relevant retained source file hashes are:
crate/traits.rs
9013270fb846edcb0bdf2abd0353f575fdd727974cba9e89bdab8bb4c2b4f0bf
crate/dec2flt/mod.rs
b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012
crate/dec2flt/parse.rs
50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f
crate/dec2flt/decimal.rs
633658be803b7369b18feb098a8aa1b5f714a933d3b79ecbc4899a1b05f35beb
crate/dec2flt/lemire.rs
fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1
crate/dec2flt/slow.rs
93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485
Exact constant and bit-conversion excerpt from crate/traits.rs:
impl Float for f64 {
type Int = u64;
const INFINITY: Self = Self::INFINITY;
const NEG_INFINITY: Self = Self::NEG_INFINITY;
const NAN: Self = Self::NAN;
// Bit-identical to the upstream `-f64::NAN`, without the unsupported
// compile-time float negation.
const NEG_NAN: Self = f64::from_bits(0xFFF8_0000_0000_0000);
const BITS: u32 = 64;
const SIG_TOTAL_BITS: u32 = Self::MANTISSA_DIGITS;
const EXP_MASK: Self::Int = Self::EXPONENT_MASK;
const SIG_MASK: Self::Int = Self::MANTISSA_MASK;
fn to_bits(self) -> Self::Int {
self.to_bits()
}
fn classify(self) -> FpCategory {
self.classify()
}
}
impl FloatExt for f64 {
#[inline]
fn from_u64_bits(v: u64) -> Self {
f64::from_bits(v)
}
Exact derived-constant defaults from crate/traits.rs:
/// The number of bits in the significand, *excluding* the hidden bit.
const SIG_BITS: u32 = Self::SIG_TOTAL_BITS - 1;
/// Number of bits in the exponent.
const EXP_BITS: u32 = Self::BITS - Self::SIG_BITS - 1;
/// The saturated (maximum bitpattern) value of the exponent, i.e. the infinite
/// representation.
///
/// This shifted fully right, use `EXP_MASK` for the shifted value.
const EXP_SAT: u32 = (1 << Self::EXP_BITS) - 1;
/// Signed version of `EXP_SAT` since we convert a lot.
const INFINITE_POWER: i32 = Self::EXP_SAT as i32;
/// The exponent bias value. This is also the maximum value of the exponent.
const EXP_BIAS: u32 = Self::EXP_SAT >> 1;
/// Minimum exponent value of normal values.
const EXP_MIN: i32 = -(Self::EXP_BIAS as i32 - 1);
Together with the f64-instance lines `BITS = 64` and
`SIG_TOTAL_BITS = Self::MANTISSA_DIGITS` in the preceding excerpt, these
defaults derive SIG_BITS, EXP_MIN, and INFINITE_POWER from the primitive
mantissa-digit constant rather than introducing independent parameters.
Exact checked cast excerpt from crate/dec2flt/mod.rs:
#[inline]
// This method is precisely the source `u64 as f64` primitive conversion.
// Aeneas cannot translate that cast; opacity is confined to the cast while
// the fast-path algorithm, its range proof obligation, and all calls stay
// visible in the extracted model.
#[charon::opaque]
fn from_u64(v: u64) -> Self {
debug_assert!(v <= Self::MAX_MANTISSA_FAST_PATH);
v as _
}
Here MAX_MANTISSA_FAST_PATH is the retained default 1 << 53. Therefore the
source succeeds only through the modeled branch v <= 2^53 in this debug
configuration; above it the debug assertion fails before the cast. On the
successful branch every integer is exactly representable, so the source cast
and the model rounder return the same word.
Exact power-table and assembly excerpts from crate/dec2flt/mod.rs:
/// Maximum mantissa for the fast-path (`1 << 53` for f64).
const MAX_MANTISSA_FAST_PATH: u64 = 1 << Self::SIG_TOTAL_BITS;
const MAX_EXPONENT_FAST_PATH: i64 = 22;
const MIN_EXPONENT_FAST_PATH: i64 = -Self::MAX_EXPONENT_FAST_PATH;
const MAX_EXPONENT_DISGUISED_FAST_PATH: i64 = 37;
fn pow10_fast_path(exponent: usize) -> Self {
// These bit patterns are exactly the source table's rounded binary64
// literals. The match is the same masked lookup; it merely keeps float
// constants out of Aeneas's unsupported constant interpreter.
match exponent & 31 {
0 => f64::from_bits(0x3FF0_0000_0000_0000),
1 => f64::from_bits(0x4024_0000_0000_0000),
2 => f64::from_bits(0x4059_0000_0000_0000),
3 => f64::from_bits(0x408F_4000_0000_0000),
4 => f64::from_bits(0x40C3_8800_0000_0000),
5 => f64::from_bits(0x40F8_6A00_0000_0000),
6 => f64::from_bits(0x412E_8480_0000_0000),
7 => f64::from_bits(0x4163_12D0_0000_0000),
8 => f64::from_bits(0x4197_D784_0000_0000),
9 => f64::from_bits(0x41CD_CD65_0000_0000),
10 => f64::from_bits(0x4202_A05F_2000_0000),
11 => f64::from_bits(0x4237_4876_E800_0000),
12 => f64::from_bits(0x426D_1A94_A200_0000),
13 => f64::from_bits(0x42A2_309C_E540_0000),
14 => f64::from_bits(0x42D6_BCC4_1E90_0000),
15 => f64::from_bits(0x430C_6BF5_2634_0000),
16 => f64::from_bits(0x4341_C379_37E0_8000),
17 => f64::from_bits(0x4376_3457_85D8_A000),
18 => f64::from_bits(0x43AB_C16D_674E_C800),
19 => f64::from_bits(0x43E1_58E4_6091_3D00),
20 => f64::from_bits(0x4415_AF1D_78B5_8C40),
21 => f64::from_bits(0x444B_1AE4_D6E2_EF50),
22 => f64::from_bits(0x4480_F0CF_064D_D592),
_ => f64::from_bits(0),
}
}
fn biased_fp_to_float<F: FloatExt>(x: BiasedFp) -> F {
let mut word = x.m;
word |= (x.p_biased as u64) << F::SIG_BITS;
F::from_u64_bits(word)
}
Exact native-call excerpt from crate/dec2flt/decimal.rs:
fn can_use_fast_path<F: Lemire>(&self) -> bool {
F::MIN_EXPONENT_FAST_PATH <= self.exponent
&& self.exponent <= F::MAX_EXPONENT_DISGUISED_FAST_PATH
&& self.mantissa <= F::MAX_MANTISSA_FAST_PATH
&& !self.many_digits
}
if !self.can_use_fast_path::<F>() {
return None;
}
let value = if self.exponent <= F::MAX_EXPONENT_FAST_PATH {
// normal fast path
let value = F::from_u64(self.mantissa);
if self.exponent < 0 {
// Explicit trait calls preserve Rust arithmetic and resolve
// the generic output type that Charon leaves ambiguous.
core::ops::Div::div(value, F::pow10_fast_path((-self.exponent) as _))
} else {
core::ops::Mul::mul(value, F::pow10_fast_path(self.exponent as _))
}
} else {
// disguised fast path
let shift = self.exponent - F::MAX_EXPONENT_FAST_PATH;
let mantissa = self.mantissa.checked_mul(INT_POW10[shift as usize])?;
if mantissa > F::MAX_MANTISSA_FAST_PATH {
return None;
}
core::ops::Mul::mul(
F::from_u64(mantissa),
F::pow10_fast_path(F::MAX_EXPONENT_FAST_PATH as _),
)
};
if self.negative {
Some(core::ops::Neg::neg(value))
} else {
Some(value)
}
The preceding can_use_fast_path body, together with
MAX_MANTISSA_FAST_PATH = 1 << SIG_TOTAL_BITS and SIG_TOTAL_BITS = 53 for f64,
requires the exponent to lie between -22 and 37, the input mantissa to be at
most 2^53, and many_digits to be false. Consequently an ordinary arithmetic
call has a from_u64 operand in 0..=2^53. In its negative-exponent arm,
`-self.exponent` lies in 1..=22; in its nonnegative arm, `self.exponent` lies
in 0..=22. The disguised branch checks its multiplied mantissa against 2^53
before from_u64 and uses table index 22. The paired statement
Binary64NativeCallDomain does not assert this source reachability. It says
conditionally that a from_u64 argument at most 2^53 succeeds with a finite,
non-NaN word and that a table index at most 22 succeeds with a positive,
nonzero, finite, non-NaN word. Applying that conditional statement to the
guards just derived establishes those properties for the actual ordinary and
disguised calls, and in particular establishes that every executed divisor is
nonzero.
Exact special-value excerpt from crate/dec2flt/parse.rs:
let float = match (register, len) {
(INF_3, 3) => F::INFINITY,
(INF_8, 8) => F::INFINITY,
(NAN, 3) => F::NAN,
_ => return None,
};
if negative { Some(-float) } else { Some(float) }
Thus the executed special route is INFINITY or NAN followed by conditional
negation; it does not select NEG_INFINITY or NEG_NAN directly.
The number helper has the exact source body
pub fn parse_number(s: &[u8]) -> Option<Decimal> {
if let Some((float, rest)) = parse_partial_number(s) {
if rest == s.len() {
return Some(float);
}
}
None
}
It returns only the Decimal produced by parse_partial_number; there is no
float type parameter or float operation at this boundary.
The integer-tier helper has the source type and exact executable excerpts
below (long explanatory comments are elided). In particular it returns a raw
BiasedFp and contains no from_u64 cast, primitive float multiplication,
division, negation, or from_bits call:
pub fn compute_float<F: Float>(q: i64, mut w: u64) -> BiasedFp {
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let fp_error = BiasedFp::zero_pow2(-1);
// Short-circuit if the value can only be a literal 0 or infinity.
if w == 0 || q < F::SMALLEST_POWER_OF_TEN as i64 {
return fp_zero;
} else if q > F::LARGEST_POWER_OF_TEN as i64 {
return fp_inf;
}
// Normalize our significant digits, so the most-significant bit is set.
let lz = w.leading_zeros();
w <<= lz;
let (lo, hi) = compute_product_approx(q, w, F::SIG_BITS as usize + 3);
if lo == 0xFFFF_FFFF_FFFF_FFFF {
let inside_safe_exponent = (q >= -27) && (q <= 55);
if !inside_safe_exponent {
return fp_error;
}
}
let upperbit = (hi >> 63) as i32;
let mut mantissa = hi >> (upperbit + 64 - F::SIG_BITS as i32 - 3);
let mut power2 = power(q as i32) + upperbit - lz as i32 - F::EXP_MIN + 1;
if power2 <= 0 {
if -power2 + 1 >= 64 {
// Have more than 64 bits below the minimum exponent, must be 0.
return fp_zero;
}
// Have a subnormal value.
mantissa >>= -power2 + 1;
mantissa += mantissa & 1;
mantissa >>= 1;
power2 = (mantissa >= (1_u64 << F::SIG_BITS)) as i32;
return BiasedFp { m: mantissa, p_biased: power2 };
}
// Need to handle rounding ties. Normally, we need to round up,
// but if we fall right in between and we have an even basis, we
// need to round down.
if lo <= 1
&& q >= F::MIN_EXPONENT_ROUND_TO_EVEN as i64
&& q <= F::MAX_EXPONENT_ROUND_TO_EVEN as i64
&& mantissa & 0b11 == 0b01
&& (mantissa << (upperbit + 64 - F::SIG_BITS as i32 - 3)) == hi
{
// Zero the lowest bit, so we don't round up.
mantissa &= !1_u64;
}
// Round-to-even, then shift the significant digits into place.
mantissa += mantissa & 1;
mantissa >>= 1;
if mantissa >= (2_u64 << F::SIG_BITS) {
// Rounding up overflowed, so the carry bit is set. Set the
// mantissa to 1 (only the implicit, hidden bit is set) and
// increase the exponent.
mantissa = 1_u64 << F::SIG_BITS;
power2 += 1;
}
// Zero out the hidden bit.
mantissa &= !(1_u64 << F::SIG_BITS);
if power2 >= F::INFINITE_POWER {
// Exponent is above largest normal value, must be infinite.
return fp_inf;
}
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact slow-tier source body from crate/dec2flt/slow.rs:
pub(crate) fn parse_long_mantissa<F: Float>(s: &[u8]) -> BiasedFp {
const MAX_SHIFT: usize = 60;
const NUM_POWERS: usize = 19;
const POWERS: [u8; 19] =
[0, 3, 6, 9, 13, 16, 19, 23, 26, 29, 33, 36, 39, 43, 46, 49, 53, 56, 59];
let get_shift = |n| {
if n < NUM_POWERS { POWERS[n] as usize } else { MAX_SHIFT }
};
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let mut d = parse_decimal_seq(s);
// Short-circuit if the value can only be a literal 0 or infinity.
if d.num_digits == 0 || d.decimal_point < -324 {
return fp_zero;
} else if d.decimal_point >= 310 {
return fp_inf;
}
let mut exp2 = 0_i32;
let mut loop_result = None;
// Shift right toward (1/2 ... 1].
while d.decimal_point > 0 && loop_result.is_none() {
let n = d.decimal_point as usize;
let shift = get_shift(n);
d.right_shift(shift);
if d.decimal_point < -DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_zero);
} else {
exp2 += shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// Shift left toward (1/2 ... 1].
while d.decimal_point <= 0 && loop_result.is_none() {
let shift = if d.decimal_point == 0 {
match d.digits[0] {
digit if digit >= 5 => break,
0 | 1 => 2,
_ => 1,
}
} else {
get_shift((-d.decimal_point) as _)
};
d.left_shift(shift);
if d.decimal_point > DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_inf);
} else {
exp2 -= shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// We are now in the range [1/2 ... 1] but the binary format uses [1 ... 2].
exp2 -= 1;
while F::EXP_MIN > exp2 {
let mut n = (F::EXP_MIN - exp2) as usize;
if n > MAX_SHIFT {
n = MAX_SHIFT;
}
d.right_shift(n);
exp2 += n as i32;
}
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
// Shift the decimal to the hidden bit, and then round the value
// to get the high mantissa+1 bits.
d.left_shift(F::SIG_BITS as usize + 1);
let mut mantissa = d.round();
if mantissa >= (1_u64 << (F::SIG_BITS + 1)) {
// Rounding up overflowed to the carry bit, need to
// shift back to the hidden bit.
d.right_shift(1);
exp2 += 1;
mantissa = d.round();
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
}
let mut power2 = exp2 - F::EXP_MIN + 1;
if mantissa < (1_u64 << F::SIG_BITS) {
power2 -= 1;
}
// Zero out all the bits above the explicit mantissa bits.
mantissa &= (1_u64 << F::SIG_BITS) - 1;
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact final numeric-sign excerpt from crate/dec2flt/mod.rs:
let assembled_word = fp.m | ((fp.p_biased as u64) << F::SIG_BITS);
let assembly_result = biased_fp_to_float::<F>(fp);
let lexical_sign_applied = num.negative;
let result = if lexical_sign_applied {
core::ops::Neg::neg(assembly_result)
} else {
assembly_result
};
Thus a numeric execution that reaches the integer/slow selection route
assembles its selected pair with from_bits through biased_fp_to_float and only
then conditionally negates it. A successful try_fast_path returns earlier and
does not perform this assembly. compute_float and parse_long_mantissa produce
raw BiasedFp pairs and do not call from_u64, primitive float multiplication,
division, negation, or from_bits; they do, however, execute constants derived
from SIG_TOTAL_BITS before producing those pairs.
Retained structural-boundary evidence
-------------------------------------
Several adjacent structural bindings cite this same evidence record. Their
pinned library source identities are:
core/src/num/mod.rs
f0820f9dfb94999440c8cb4a349736fa21df7e5668e19b6b49e016ff67c05ce3
core/src/option.rs
7cf61204b05d98a95bc2e322d5fbfc1f4f91505109971917d9a7fb47151c50e6
core/src/slice/mod.rs
354992a6a3d69a0185eef9044a07ea5180e767bdb467aef55e69ee3d44317840
core/src/str/mod.rs
284b4c147b5d0497ce9146f6b96e564f196aed10411a62cdccf5fc5243d40f78
Exact ASCII-digit body from core/src/num/mod.rs:
pub const fn is_ascii_digit(&self) -> bool {
matches!(*self, b'0'..=b'9')
}
Exact Option control-flow bodies from core/src/option.rs:
fn branch(self) -> ControlFlow<Self::Residual, Self::Output> {
match self {
Some(v) => ControlFlow::Continue(v),
None => ControlFlow::Break(None),
}
}
fn from_residual(residual: Option<convert::Infallible>) -> Self {
match residual {
None => None,
}
}
Exact slice observation bodies from core/src/slice/mod.rs:
pub const fn first(&self) -> Option<&T> {
if let [first, ..] = self { Some(first) } else { None }
}
pub const fn split_first(&self) -> Option<(&T, &[T])> {
if let [first, tail @ ..] = self { Some((first, tail)) } else { None }
}
Exact string-byte body from core/src/str/mod.rs:
pub const fn as_bytes(&self) -> &[u8] {
// SAFETY: const sound because we transmute two types with the same layout
unsafe { mem::transmute(self) }
}
reference/model-evidence/binary64-probe.rs
#![feature(float_masks)]
use std::num::FpCategory;
fn bits(label: &str, value: f64) {
println!("{label}={:016x}", value.to_bits());
}
fn main() {
println!("target_arch={}", std::env::consts::ARCH);
println!("mantissa_digits={}", f64::MANTISSA_DIGITS);
println!("exponent_mask={:016x}", f64::EXPONENT_MASK);
println!("mantissa_mask={:016x}", f64::MANTISSA_MASK);
bits("nan", f64::NAN);
bits("infinity", f64::INFINITY);
bits("neg_infinity", f64::NEG_INFINITY);
for (label, value) in [
("nan_category", f64::NAN),
("infinity_category", f64::INFINITY),
("zero_category", 0.0),
("subnormal_category", f64::from_bits(1)),
("normal_category", 1.0),
] {
let category = match value.classify() {
FpCategory::Nan => "Nan",
FpCategory::Infinite => "Infinite",
FpCategory::Zero => "Zero",
FpCategory::Subnormal => "Subnormal",
FpCategory::Normal => "Normal",
};
println!("{label}={category}");
}
let payload_nan_word = 0x7ff0_0000_0000_0001_u64;
println!(
"from_bits_to_bits={:016x}",
f64::from_bits(payload_nan_word).to_bits()
);
bits("neg_payload_nan", -f64::from_bits(payload_nan_word));
bits("neg_zero", -0.0);
bits("subnormal_tie_to_even_zero", f64::from_bits(1) * 0.5);
bits("subnormal_tie_to_even_two", f64::from_bits(3) * 0.5);
bits("normal_division", 1.0 / 10.0);
bits("mul_negative_zero", -0.0 * 2.0);
bits("div_negative_zero", -1.0 / f64::INFINITY);
bits("div_negative_infinity", 1.0 / -0.0);
bits("mul_overflow", f64::MAX * (1.0 + f64::EPSILON));
println!("mul_zero_infinity_is_nan={}", (0.0 * f64::INFINITY).is_nan());
println!("div_zero_zero_is_nan={}", (0.0_f64 / 0.0_f64).is_nan());
println!("mul_nan_is_nan={}", (f64::NAN * 1.0).is_nan());
bits("cast_2_pow_53", (1_u64 << 53) as f64);
bits("cast_2_pow_53_plus_1", ((1_u64 << 53) + 1) as f64);
}
reference/model-evidence/setup-reproduction.txt
Fresh extraction and composition evidence for Preamble
======================================================
Scope
-----
This record was produced from the repository root on 2026-09-24. It records
the current frozen extraction configuration and a fresh execution of the
Cargo, Charon, and Aeneas stages. It is evidence about the bytes and commands
used to build the model, not evidence that any supplied GOAL is true.
Pinned configuration
--------------------
modeling-input/extraction.json contains exactly:
{
"crate": "crate",
"cargo_args": [],
"charon_args": [],
"aeneas_args": []
}
crate/Cargo.toml:5-22 names one edition-2024 library package, gives the
"default" feature an empty definition, gives "optimize_for_size" a distinct
feature, and sets overflow-checks=true in both development and release
profiles. The fresh run used the development profile. The configuration
probe below reported debug_assertions, overflow_checks, target_arch="x86_64",
target_pointer_width="64", target_env="gnu", and target_feature="sse2"; it
did not report feature="optimize_for_size". Its final Cargo line was:
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.08s
The exact probe command was:
env RUSTUP_TOOLCHAIN=nightly-2026-06-01 \
CARGO_TARGET_DIR=.trellis/scratch/preamble-cfg-target \
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/cargo \
rustc --offline \
--manifest-path .trellis/scratch/provenance-evidence-1790263924955098840/extraction/source/Cargo.toml \
--lib -- --print cfg
The materialized source used by that command is the source copy made by the
fresh extraction run described below. Relevant raw stdout was:
debug_assertions
feature="default"
overflow_checks
target_arch="x86_64"
target_endian="little"
target_env="gnu"
target_family="unix"
target_feature="sse"
target_feature="sse2"
target_feature="x87"
target_os="linux"
target_pointer_width="64"
Tool identities
---------------
These are the executable identities in modeling-input/tool-identities.json,
rechecked with sha256sum:
cargo
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/cargo
54e05dce8c9ca2f638cc3d87ec1a19425b5d0bf1f31aeb48cf4792aec5cadf27
cargo 1.98.0-nightly (fbb61be30 2026-05-26)
rustc
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
rustc 1.98.0-nightly (14210df0e 2026-05-31), LLVM 22.1.6
rustdoc
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc
2bf660d140310e28146e2c002dc6fcabd957c0a3b740be0419e6f8e5a9c87523
rustdoc 1.98.0-nightly (14210df0e 2026-05-31)
Charon
/home/leanagent/pv_spike/tools/charon/bin/charon
6490034f368ce98f3e7ae5a28bf71ed56d03bdf1e3712e71376b96fc55baeade
Charon 0.1.216, toolchain nightly-2026-06-01
Aeneas
/home/leanagent/pv_spike/tools/aeneas/bin/aeneas
9f446d2aaf59e8e705e36d05cb993f1c6ab0e97f8dc6fd2f19907a86ede30922
aeneas fa699427
Lean
/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin/lean
3e0d0d3d801675359f2d4cf9815bfdb417b20b92fdd9d48b3b14c95bbae28bbf
Lean 4.30.0-rc2, commit 3dc1a088b6d2d8eafe25a7cd7ec7b58d731bd7cc
Fresh extraction
----------------
The public reproduction command recorded by modeling-input/manifest.json is:
python3 .trellis/scripts/pv_modeling.py check-native . --fresh
For this record the same check_provenance implementation was invoked directly
so that its complete result could be retained without the CLI's bounded JSON
preview. It wrote:
.trellis/scratch/provenance-evidence-1790263924955098840/provenance.json
.trellis/scratch/provenance-evidence-1790263924955098840/extraction/observation.json
The extractor instantiated the empty argument lists above as these commands
(the output and cache paths are those beneath that scratch directory):
<cargo> check --offline
<charon> cargo --preset=aeneas --dest-file Generated/m.llbc -- --offline
<aeneas> -backend lean -dest Generated -emit-json Generated/m.llbc
The observation records exit code 0 for Cargo, Charon, and Aeneas. Cargo's raw
terminal result was:
Checking dec2flt-model v0.1.0 (.../extraction/source)
warning: feature `f16` is declared but not used
warning: `dec2flt-model` (lib) generated 1 warning
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.14s
Charon's raw terminal result was:
Compiling dec2flt-model v0.1.0 (.../extraction/source)
warning: feature `f16` is declared but not used
warning: `dec2flt-model` (lib) generated 1 warning
Finished `dev` profile [unoptimized + debuginfo] target(s) in 15.24s
Aeneas reported 203 prepasses, 50 globals, 87 opaque functions, 107
transparent functions, 49 trait declarations, and 85 trait implementations.
Its raw terminal result ended:
Generated: .../extraction/Generated/M.lean
Generated: .../extraction/Generated/translation.json
[Warn ] The crate contains extracted external, unknown definitions: ...
[Info ] Total execution time: 7.332373 seconds
The warning is the inventoried external boundary below. The fresh provenance
result had an empty error string, passed=true, no tool-identity differences,
and true values for every check, including fresh_extraction_succeeds,
fresh_model_export, crate_export, upstream_export, tool_identities_current,
bootstrap_receipt, and model_support_composition. The canonical current crate
tree digest reported by that result was:
b5ecf4d7e9dfa0337f1586ae0e865fbbe2dd384137ee6e2ad635f0d5d6e916a9
Generated bytes, placeholders, and axioms
-----------------------------------------
sha256sum gave the same digest for the fresh Generated/M.lean and the frozen
generated.lean:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692
The observation's raw-source placeholder count was 0. Compiling raw M.lean
without model support fails as diagnosed because F64 and the external boundary
are absent; four "declaration uses sorry" diagnostics are Lean error-recovery
consequences for F64-valued constants, not tokens in the generated source.
The pinned compatibility report has SHA-256
557a4924d55becf1b33d7dc7f9dfdf2b675c895ce4a9b6bee8a0622378e48d6a,
checks 2225 declarations, reports no unapproved axiom, and marks only the 64
declarations downstream of the missing boundary as pending. This is why the
24 operations below have separate authored model-support owners.
External boundary
-----------------
The exact command
python3 .trellis/scripts/pv_modeling.py inspect-native .
returned declaration_count=24 and retained the full index at
.trellis/scratch/inspect-native-1790264067166282471.json. The 24 names are:
F64.Insts.CoreCloneClone.clone
core.f64.F64.MANTISSA_DIGITS
core.f64.F64.NAN
core.f64.F64.INFINITY
core.f64.F64.NEG_INFINITY
core.f64.F64.EXPONENT_MASK
core.f64.F64.MANTISSA_MASK
core.f64.F64.classify
core.f64.F64.to_bits
core.f64.F64.from_bits
core.num.U8.is_ascii_digit
F64.Insts.CoreOpsArithMulF64F64.mul
F64.Insts.CoreOpsArithDivF64F64.div
F64.Insts.CoreOpsArithNegF64.neg
U64.Insts.CoreOpsBitBitAndU64U64.bitand
U64.Insts.CoreOpsBitBitOrU64U64.bitor
U64.Insts.CoreOpsBitShlU32U64.shl
U64.Insts.CoreOpsBitShrU32U64.shr
core.option.Option.Insts.CoreOpsTry_traitTry.branch
core.option.Option.Insts.CoreOpsTry_traitFromResidualOptionInfallible.from_residual
core.slice.Slice.first
core.slice.Slice.split_first
core.str.Str.as_bytes
F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64.from_u64
Tablet/model-support.json has exactly 24 bindings, one for each name. This
record establishes completeness of that inventory and its composition; the
semantic justification for an individual binding remains the responsibility
of that binding's paired definition node.
Composition
-----------
The exact command
python3 .trellis/scripts/pv_modeling.py compose-native . --check
returned matches=true, changed=false, no mismatched files, raw extraction hash
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692,
and both expected and actual Preamble hashes
15adb2db06b06e099d17070c2a373619ecdc481e32fc78d34054cd01fc7b492a.
The complete receipt is retained at
.trellis/scratch/compose-native-1790264071122343238.json.
reference/model-evidence/source-adaptation-delta.txt
Primary inventory and preservation analysis of the upstream-to-crate delta
============================================================================
Method and complete file inventory
----------------------------------
This record compares the supplied files in upstream/ with the frozen adapted
crate/. It treats the sources and their control flow as primary evidence; it
does not use a prior route decision as semantic proof and makes no assertion
that a supplied GOAL is true. The commands used were:
find upstream crate -type f ! -path '*/target/*' -print0 | sort -z |
xargs -0 sha256sum
for each supplied file f:
cmp -s upstream/$f crate/$f
diff -U0 upstream/$f crate/$f
The concatenated contextual diff of every supplied file has SHA-256
2eb0202ba9ae8092d6727dd2f3b824c29cb160b005960ccf2b15bfb804ed1217.
The complete inventory is:
supplied path upstream SHA-256 crate SHA-256 status
dec2flt/common.rs fc64094721ff23e08fcba013154d04dec3fe986cae5ffd73a20f86049980aace 4c4be815335a7b176527b1345e662890caa48181a0a4f814594339016cab18e changed
dec2flt/decimal.rs 3c164785e1bc3f3b48aa9c212dd6c4ab535fe828523af9fa584df4c7b1e60e0d 633658be803b7369b18feb098a8aa1b5f714a933d3b79ecbc4899a1b05f35beb changed
dec2flt/decimal_seq.rs c0c1c6028e3f57cefc3de7635a94788e9180f5ebcedc7a334ec8dbac786ec788 4aa4ecf9f31970033093d73238d4f2c72d433639bbe467c0741b185807380bd9 changed
dec2flt/fpu.rs 16cf9ec154d477ab3d4184a01fb4b9ed7c59f0228cc55589d393c40a61b19d8f 16cf9ec154d477ab3d4184a01fb4b9ed7c59f0228cc55589d393c40a61b19d8f identical
dec2flt/lemire.rs fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1 fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1 identical
dec2flt/mod.rs 7198e238c554b692405537a446b3526ad66805ec2900cd0e299f10c51402a44a b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012 changed
dec2flt/parse.rs 9daf21ab9445a84552535152f376eef8c30f3d5827296c0645f5952d3b22bbf1 50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f changed
dec2flt/slow.rs 43e7aba32d7431bbf0e1bbcb4c334eaffb23eb66891c7e45abe799c5235cc0d2 93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485 changed
dec2flt/table.rs 6eb59023784bd84cb6fb074c70da8a99bef72bc2a2ea179b0da457ca1ee00abb 6eb59023784bd84cb6fb074c70da8a99bef72bc2a2ea179b0da457ca1ee00abb identical
traits.rs 66a02c44d72dfcc3ddae7e34a290e390dabaf98c5911b283d2d97f2f0075a44e 9013270fb846edcb0bdf2abd0353f575fdd727974cba9e89bdab8bb4c2b4f0bf changed
The standalone package adds four files having no supplied counterpart:
crate/Cargo.toml 2040ce5dc92c51b5245113f97682b692b876aa57708b5c7c483425ba152943c8
crate/lib.rs 1df2b8bcb2f52068d05a6343923716d0ef4475abdef34a0de3fe7cb8dc2ba95b
crate/num/mod.rs d9ac4f964d124bd4660914dc4c80bbb14f48d7851f9a8edc71a0931e9fce37b3
crate/num/imp/mod.rs df09b97393e97b23b0a558c2fcbbf4e75dd9d68338f1e83f168bab80a37a31f1
Thus fpu.rs, lemire.rs, and the complete 671-line table.rs, including their
algorithmic constants and tables, are byte-identical. The following sections
account for every other file and every changed hunk.
Namespace and error shell
-------------------------
crate/lib.rs:1-12 is a no_std crate root that re-exports core::f64 and
core::ops and introduces the same num module path expected by the supplied
slice. crate/num/imp/mod.rs:1-10 uses path attributes to place traits.rs and
dec2flt/mod.rs at core::num::imp-like module names. These declarations add no
wrapper call or computation. crate/num/mod.rs:1 re-exports
core::num::FpCategory. crate/num/mod.rs:3-26 defines a local private
FloatErrorKind and ParseFloatError shell so the standalone package can name
the parser's error type. The pursued GOALs observe only panic versus normal
return and, on normal return, the outer Result's Ok/Err discriminant; they do
not observe the private error kind or formatting. No identity is asserted
between this local shell and an unpinned core error payload.
crate/Cargo.toml:5-22 selects the package, empty default features, and
checked-overflow profiles. The configuration and fresh build are independently
reproduced in setup-reproduction.txt.
Visibility, derives, and bounds
-------------------------------
upstream/dec2flt/mod.rs:90 versus crate/dec2flt/mod.rs:90 changes only the
visibility of the existing BiasedFp import so a goal-facing caller can name the
same type. It changes neither layout nor execution.
upstream/dec2flt/common.rs:68 and decimal.rs:28 and decimal_seq.rs:17 include
Debug derives. The corresponding crate spans common.rs:48-51,
decimal.rs:28-31, and decimal_seq.rs:17-20 remove only Debug. Copy, Clone,
PartialEq, Eq, and Default used by computation remain where present, and no
accepted observation formats these records.
upstream/traits.rs:11-52 versus crate/traits.rs:11-64 removes formatting from
Int, removes a redundant Copy supertrait from CastInto, and instantiates Int
only for u64. Every call of CastInto is through Int, which still requires
Copy; all retained concrete values are primitive Copy values. The removed
u16/u32 instances are associated only with the disabled f16/f32 formats.
upstream/traits.rs:55-76 versus crate/traits.rs:67-80 removes Add, Debug,
PartialEq, PartialOrd, Default, and Clone from Float while retaining Copy, Mul,
Div, and Neg. A search of all retained generic bodies shows no call using a
removed operation. upstream/dec2flt/decimal.rs:56-89 versus
crate/dec2flt/decimal.rs:59-111 and upstream/dec2flt/mod.rs:209-256 versus
crate/dec2flt/mod.rs:352-520 add direct Div, Mul, and Neg bounds already implied
by Lemire -> Float, and replace operator notation with calls to those same
traits. Rust desugars the original /, *, and unary - to these trait calls, so
the operands, call order, result, and admitted f64 specialization are unchanged.
Exact constants, tables, and specialized decoding
-------------------------------------------------
The source formulae and decimal-literal table were evaluated directly by the
pinned rustc using the retained source
reference/model-evidence/adaptation-constants-probe.rs. The command was:
R=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
P=reference/model-evidence/adaptation-constants-probe.rs
B=.trellis/scratch/adaptation-constants-probe
"$R" --edition 2024 --target x86_64-unknown-linux-gnu -C opt-level=0 "$P" -o "$B"
sha256sum "$P" "$B"
"$B"
The source hash was
b5a4a2cba0c08053cb9a816adb1ba5dbd160bf3928bdf5ccf56b7ae83aaa2aa5
and the resulting executable hash was
b02d2f6deb675f17d0dbdc22e57a67d7692689f7a2b0d7b125556c35c4b8a4a5.
Raw output was:
largest_power_of_ten=308
max_exponent_fast_path=22
max_exponent_disguised=37
neg_nan=fff8000000000000
pow10_0=3ff0000000000000
pow10_1=4024000000000000
pow10_2=4059000000000000
pow10_3=408f400000000000
pow10_4=40c3880000000000
pow10_5=40f86a0000000000
pow10_6=412e848000000000
pow10_7=416312d000000000
pow10_8=4197d78400000000
pow10_9=41cdcd6500000000
pow10_10=4202a05f20000000
pow10_11=42374876e8000000
pow10_12=426d1a94a2000000
pow10_13=42a2309ce5400000
pow10_14=42d6bcc41e900000
pow10_15=430c6bf526340000
pow10_16=4341c37937e08000
pow10_17=4376345785d8a000
pow10_18=43abc16d674ec800
pow10_19=43e158e460913d00
pow10_20=4415af1d78b58c40
pow10_21=444b1ae4d6e2ef50
pow10_22=4480f0cf064dd592
upstream/traits.rs:134-137 computes LARGEST_POWER_OF_TEN through a Float
default, and upstream/traits.rs:175-193 gives the generic integer_decode and
the helper used by that constant. crate/traits.rs:146 makes the constant an
associated requirement; crate/traits.rs:309-359 supplies the retained f64
values and decoder after substituting BITS=64, SIG_BITS=52, EXP_BIAS=1023,
EXPONENT_MASK, MANTISSA_MASK, and the u64 operations. Each source expression
then becomes exactly the corresponding crate expression: sign is bits>>63,
exponent is (bits & mask)>>52 cast to i16, the subnormal mantissa is shifted
once, the normal mantissa receives 1<<52, and 1023+52 is subtracted. The
resulting tuple and every bit operation are unchanged. The probe output above
shows that the computed f64 LARGEST_POWER_OF_TEN is 308 and that the source
-f64::NAN word is fff8000000000000, exactly crate/traits.rs:315-327; the
independent binary64-boundary.txt record fixes the masks and primitive bit
semantics used by the decoder.
upstream/dec2flt/mod.rs:118-129 gives the two Lemire default formulae.
crate/dec2flt/mod.rs:115-128 makes them associated requirements, and the
retained f64 instance at crate/dec2flt/mod.rs:217-220 supplies 22 and 37, the
integer results of the two source formulae for 53 significand bits.
upstream/dec2flt/mod.rs:176-181 indexes a 32-entry f64 table with exponent&31.
crate/dec2flt/mod.rs:222-251 performs the same masked selection using from_bits:
cases 0 through 22 are the exact pinned binary64 words printed above for 1e0 through 1e22 and
all other cases return positive zero, as did entries 23 through 31. The full
word list and the pinned float semantics are recorded in binary64-boundary.txt.
The analogous f16/f32 replacements at crate/dec2flt/mod.rs:145-215 and
crate/traits.rs:187-307 lie under cfg(any()) and cannot enter this build.
Whole-function from_u64 opacity
-------------------------------
upstream/dec2flt/mod.rs:184-188 and crate/dec2flt/mod.rs:254-263 have the same
f64 body: the same enabled debug_assert that v <= 1<<53, followed by the same
primitive `v as f64` cast. The sole semantic-boundary annotation is
#[charon::opaque] at crate line 259, syntactically attached to the function
item. It therefore hides the entire from_u64 body from translation: neither
the debug assertion nor the cast is transparent in the extraction. The
callers, their guards, and the surrounding native-path computation remain
transparent. The fresh external inventory contains the whole method as the
single external F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64.from_u64. Its
separately reviewed ModelF64FromU64 binding supplies exactly successful integer
conversion for v <= 2^53 and assertion failure otherwise.
Digit scans, slice patterns, and helper extraction
-------------------------------------------------
upstream/dec2flt/common.rs:14-53 supplies ByteSlice::parse_digits: repeatedly
split_first, wrapping-subtract ASCII zero, invoke the closure exactly when the
result is below 10, consume that byte, and stop at the first other byte.
crate/dec2flt/common.rs:11-36 removes only this method. Its complete set of
uses is replaced as follows.
* upstream/dec2flt/parse.rs:31-48 versus crate/dec2flt/parse.rs:31-58 keeps the
eight-byte loop, wrapping multiply/add, and then performs the same digit test,
accumulator update, and one-byte progress with an index. The local rename
num to chunk is lexical only.
* upstream/dec2flt/parse.rs:83-97 versus crate/dec2flt/parse.rs:131-153 expands
matches!/parse_digits into the same nonempty first-digit guard, the same
0x10000 bounded exponent update, the same first-nondigit suffix, and the same
final sign. The bound is tested before each checked multiply and addition,
exactly as in the closure.
* upstream/dec2flt/decimal_seq.rs:220-295 versus
crate/dec2flt/decimal_seq.rs:231-359 extracts parse_digits_into_seq,
parse_decimal_exponent, and count_trailing_zeros. The digit helpers use the
same wrapping byte test, forward order, try_add_digit state transition, and
0x10000 exponent guard. The reverse helper visits indices consumed_len-1
down to zero, increments only for ASCII zero, ignores a decimal point, and
stops at the first other byte, exactly the original iter().rev() loop.
In all these replacements, indexing occurs only under count<len or !is_empty,
so it has the same bounds as split_first. Slicing advances by exactly the same
one or eight bytes. No wrapping operation is replaced by checked arithmetic,
and no checked source operation is replaced by wrapping arithmetic.
upstream/dec2flt/parse.rs:155-181 versus crate/dec2flt/parse.rs:82-119 and
212-226 moves two loops into adjust_many_digit_count and parse_many_digits.
The prefix helper visits the same start bytes in the same order, performs the
same saturating_sub and checked isize subtraction, and stops on the same byte.
The retry helper makes the same first 19-digit call, tests the same threshold,
makes the same one-byte rebase and second call in the alternate branch,
computes the same offset with the same sign, casts it to i64, and performs the
same checked addition of exp_number last. Thus any large-input panic is
preserved rather than excluded.
upstream/dec2flt/decimal_seq.rs:226-295 versus
crate/dec2flt/decimal_seq.rs:284-359 replaces literal split_first patterns by
nonempty index tests. The leading-zero scans, optional decimal point, optional
exponent marker, optional exponent sign, and suffixes occur in the same order.
The crate's exp_sign*exp_num equals the source choice between exp_num and
-exp_num because exp_num is bounded by the unchanged 0x10000 guard; the final
decimal_point checked addition is in the same position. Casts of lengths to
i32 and every subsequent checked update remain unchanged, including their
large-input behavior.
Delayed returns
---------------
upstream/dec2flt/decimal_seq.rs:173-198 versus
crate/dec2flt/decimal_seq.rs:176-203 replaces one return inside right_shift's
loop by all_zero=true, exits because !all_zero is the loop guard, and returns
immediately afterward. No decimal_point, digit, index, or arithmetic update
occurs between the original and delayed return.
upstream/dec2flt/slow.rs:46-76 versus crate/dec2flt/slow.rs:46-94 replaces two
nested-loop returns by loop_result. In the zero branch it records fp_zero,
skips the source-skipped exp2 addition, exits through is_none(), and returns.
In the infinity branch it records fp_inf, skips the source-skipped exp2
subtraction, exits, and returns. On all other iterations it performs the same
shift, checked state changes, and exponent update. Lines 95-126 after these
returns are otherwise the source lines 77-110 unchanged.
Dispatcher trace and public projection
--------------------------------------
upstream/dec2flt/mod.rs:209-256 is the whole original dispatcher.
crate/dec2flt/mod.rs:285-349 declares trace data only, lines 352-505 execute the
instrumented dispatcher, and lines 507-520 define public dec2flt as its first
projection. Comparing the bodies gives the following branch-by-branch
correspondence.
* Both call as_bytes, inspect the first byte, reject empty input before a helper,
remove at most one sign, and reject a sign-only body. The trace stores the
already obtained body and Boolean sign.
* Both call parse_number first on that exact body. Only None calls
parse_inf_nan on the same body and sign. Its Some is returned directly and
its None returns invalid. The trace stores those existing Option values.
* Both overwrite only Decimal.negative, test the same compile-time
!optimize_for_size condition, call try_fast_path once, and return its Some
directly. The trace stores the copied Decimal and Option; Decimal is Copy.
* Both call compute_float first with num.exponent and num.mantissa. The crate's
second_compute_guard is exactly the first two conjuncts of the source
short-circuit. Therefore the checked mantissa+1 and second compute_float call
occur under precisely the source guard, in the same order. The same pair
comparison either retains fp or changes only p_biased to -1.
* Both test the post-comparison p_biased<0 once, call parse_long_mantissa on the
unchanged body exactly when true, and otherwise retain the same pair. The
trace records both guard and result without another helper call.
* The extra assembled_word expression is the same cast, shift, and OR performed
by biased_fp_to_float at upstream lines 202-206 and crate lines 278-282; these
integer operations neither panic nor mutate fp. Both then call assembly once
on the selected pair and apply unary negation exactly when num.negative.
Public dec2flt returns the identical Result first component.
Consequently the trace does not infer uncomputed data: it records the exact
variant; sign-stripped body and sign; numeric/special Options; fast-path input
and result; first and conditional second integer operands and results;
comparison, forced-deferral and post-comparison pair; slow guard and result;
selected pair; assembled word; pre-sign assembly word; sign-application fact;
and final word. Special and native direct returns create no selected pair.
All source call order, guards, checked arithmetic, mutable-state transitions,
panic points, and returned Result/F64 observations remain in place.
F64-only restriction
--------------------
crate/traits.rs:187-307 and crate/dec2flt/mod.rs:140-215 add cfg(any()) to the
f16/f32 Float, FloatExt, and Lemire implementations. crate/traits.rs:59-64
retains only u64 Int. The retained f64 implementations are
crate/traits.rs:309-360 and crate/dec2flt/mod.rs:217-264. Every goal-facing
function remains generic in the source and extraction, but each pursued source
subject specializes it to f64, whose associated integer is u64. There is no
dynamic format dispatch, so removing other impl blocks cannot change an f64
call, its native decision, checks, result word, NaN classification, fields, or
trace. The fresh boundary inventory in setup-reproduction.txt confirms that
no removed-format external remains.
Conclusion
----------
The inventory is exhaustive: three supplied files are identical, seven have
all hunks classified above, and the four added files are the package shell.
For the configured f64 specialization, the adapted crate has the same input
domains, branch order, guards, checked/wrapping distinction, state transitions,
panic versus normal behavior, and public/helper observations as the supplied
source. The only new observations are the trace fields, each copied from an
existing value or computed by the same pure assembly expression. This
conclusion is independent of whether any parser-correctness GOAL is true.
reference/model-evidence/source-valid-byte-slice.txt
Source-valid byte-slice domain evidence
Pinned toolchain commands, run from the repository root:
rustc --version --verbose
rustc --print cfg | rg 'target_(arch|pointer_width)'
rustc .trellis/scratch/source_valid_slice_probe.rs -o /tmp/source_valid_slice_probe
/tmp/source_valid_slice_probe
Raw configuration and probe output:
rustc 1.98.0-nightly (14210df0e 2026-05-31)
host: x86_64-unknown-linux-gnu
target_arch="x86_64"
target_pointer_width="64"
arch=x86_64
usize_bits=64
isize_max=9223372036854775807
u8_size=1
Pinned core-library source:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:801
states that a slice is never larger than isize::MAX bytes.
The same toolchain's core/src/num/int_macros.rs:47 defines a signed
integer's MAX as the corresponding unsigned MAX shifted right by one.
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/mod.rs:507-510
requires the contents of a str to remain valid UTF-8 and states that using a
str whose contents are not valid UTF-8 is undefined behavior.
Consequently, on the configured 64-bit target a &[u8] has at most
9223372036854775807 elements. This is a byte-count condition only: &[u8]
does not impose UTF-8 validity or restrict the values of its u8 elements.
A Rust str has the same inherent byte-length bound and additionally consists
of valid UTF-8 bytes.
Upstream → extraction-crate adaptation diff
--- upstream/dec2flt/mod.rs
+++ crate/dec2flt/mod.rs
@@ -87,7 +87,7 @@
issue = "none"
)]
-use common::BiasedFp;
+pub use common::BiasedFp;
use lemire::compute_float;
use parse::{parse_inf_nan, parse_number};
use slow::parse_long_mantissa;
@@ -115,18 +115,14 @@
pub trait Lemire: FloatExt {
/// Maximum exponent for a fast path case, or `⌊(SIG_BITS+1)/log2(5)⌋`
// assuming FLT_EVAL_METHOD = 0
- const MAX_EXPONENT_FAST_PATH: i64 = {
- let log2_5 = f64::consts::LOG2_10 - 1.0;
- (Self::SIG_TOTAL_BITS as f64 / log2_5) as i64
- };
+ const MAX_EXPONENT_FAST_PATH: i64;
/// Minimum exponent for a fast path case, or `-⌊(SIG_BITS+1)/log2(5)⌋`
const MIN_EXPONENT_FAST_PATH: i64 = -Self::MAX_EXPONENT_FAST_PATH;
/// Maximum exponent that can be represented for a disguised-fast path case.
/// This is `MAX_EXPONENT_FAST_PATH + ⌊(SIG_BITS+1)/log2(10)⌋`
- const MAX_EXPONENT_DISGUISED_FAST_PATH: i64 =
- Self::MAX_EXPONENT_FAST_PATH + (Self::SIG_TOTAL_BITS as f64 / f64::consts::LOG2_10) as i64;
+ const MAX_EXPONENT_DISGUISED_FAST_PATH: i64;
/// Maximum mantissa for the fast-path (`1 << 53` for f64).
const MAX_MANTISSA_FAST_PATH: u64 = 1 << Self::SIG_TOTAL_BITS;
@@ -142,29 +138,76 @@
}
#[cfg(target_has_reliable_f16)]
+// The f16 Lemire instance is outside the exclusively f64 scope. Disabling it
+// leaves every retained f64 parser/helper/trace body, native decision, checked
+// operation, debug assertion, return value, and accepted observation unchanged.
+#[cfg(any())]
impl Lemire for f16 {
+ // These are the exact integer results of the upstream compile-time float
+ // formulae for `SIG_TOTAL_BITS = 11`: floor(11/log2(5)) = 4 and
+ // 4 + floor(11/log2(10)) = 7. Concrete integers avoid unsupported const
+ // float arithmetic without changing either fast-path guard.
+ const MAX_EXPONENT_FAST_PATH: i64 = 4;
+ const MAX_EXPONENT_DISGUISED_FAST_PATH: i64 = 7;
+
fn pow10_fast_path(exponent: usize) -> Self {
- #[allow(clippy::use_self)]
- const TABLE: [f16; 8] = [1e0, 1e1, 1e2, 1e3, 1e4, 0.0, 0.0, 0.];
- TABLE[exponent & 7]
+ // Each integer is the exact IEEE encoding of the corresponding
+ // upstream table literal; the masked lookup and fallback zeros are
+ // unchanged. Aeneas cannot translate arrays containing float values.
+ match exponent & 7 {
+ 0 => f16::from_bits(0x3C00),
+ 1 => f16::from_bits(0x4900),
+ 2 => f16::from_bits(0x5640),
+ 3 => f16::from_bits(0x63D0),
+ 4 => f16::from_bits(0x70E2),
+ _ => f16::from_bits(0),
+ }
}
#[inline]
+ // This method is exactly the upstream primitive `u64 as f16` conversion.
+ // Charon extracts the cast, but Aeneas reports it unreachable; making only
+ // this primitive boundary opaque preserves all guards and dispatcher logic.
+ #[charon::opaque]
fn from_u64(v: u64) -> Self {
debug_assert!(v <= Self::MAX_MANTISSA_FAST_PATH);
v as _
}
}
+// The f32 Lemire instance is likewise unused by the retained f64
+// specialization, so disabling it cannot affect any retained body or observed
+// f64 execution independently of the correctness GOALs.
+#[cfg(any())]
impl Lemire for f32 {
+ // Exact upstream formula results for `SIG_TOTAL_BITS = 24`.
+ const MAX_EXPONENT_FAST_PATH: i64 = 10;
+ const MAX_EXPONENT_DISGUISED_FAST_PATH: i64 = 17;
+
fn pow10_fast_path(exponent: usize) -> Self {
- #[allow(clippy::use_self)]
- const TABLE: [f32; 16] =
- [1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 0., 0., 0., 0., 0.];
- TABLE[exponent & 15]
+ // Bit constructors preserve the exact table values and masked lookup,
+ // while avoiding Aeneas's unsupported float-valued array constants.
+ match exponent & 15 {
+ 0 => f32::from_bits(0x3F80_0000),
+ 1 => f32::from_bits(0x4120_0000),
+ 2 => f32::from_bits(0x42C8_0000),
+ 3 => f32::from_bits(0x447A_0000),
+ 4 => f32::from_bits(0x461C_4000),
+ 5 => f32::from_bits(0x47C3_5000),
+ 6 => f32::from_bits(0x4974_2400),
+ 7 => f32::from_bits(0x4B18_9680),
+ 8 => f32::from_bits(0x4CBE_BC20),
+ 9 => f32::from_bits(0x4E6E_6B28),
+ 10 => f32::from_bits(0x5015_02F9),
+ _ => f32::from_bits(0),
+ }
}
#[inline]
+ // This is exactly the source `u64 as f32` conversion. The narrow opaque
+ // boundary is required because Aeneas rejects the primitive cast itself;
+ // its input guard and every caller remain transparent.
+ #[charon::opaque]
fn from_u64(v: u64) -> Self {
debug_assert!(v <= Self::MAX_MANTISSA_FAST_PATH);
v as _
@@ -172,15 +215,48 @@
}
impl Lemire for f64 {
+ // Exact upstream formula results for `SIG_TOTAL_BITS = 53`.
+ const MAX_EXPONENT_FAST_PATH: i64 = 22;
+ const MAX_EXPONENT_DISGUISED_FAST_PATH: i64 = 37;
+
fn pow10_fast_path(exponent: usize) -> Self {
- const TABLE: [f64; 32] = [
- 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13, 1e14, 1e15,
- 1e16, 1e17, 1e18, 1e19, 1e20, 1e21, 1e22, 0., 0., 0., 0., 0., 0., 0., 0., 0.,
- ];
- TABLE[exponent & 31]
+ // These bit patterns are exactly the source table's rounded binary64
+ // literals. The match is the same masked lookup; it merely keeps float
+ // constants out of Aeneas's unsupported constant interpreter.
+ match exponent & 31 {
+ 0 => f64::from_bits(0x3FF0_0000_0000_0000),
+ 1 => f64::from_bits(0x4024_0000_0000_0000),
+ 2 => f64::from_bits(0x4059_0000_0000_0000),
+ 3 => f64::from_bits(0x408F_4000_0000_0000),
+ 4 => f64::from_bits(0x40C3_8800_0000_0000),
+ 5 => f64::from_bits(0x40F8_6A00_0000_0000),
+ 6 => f64::from_bits(0x412E_8480_0000_0000),
+ 7 => f64::from_bits(0x4163_12D0_0000_0000),
+ 8 => f64::from_bits(0x4197_D784_0000_0000),
+ 9 => f64::from_bits(0x41CD_CD65_0000_0000),
+ 10 => f64::from_bits(0x4202_A05F_2000_0000),
+ 11 => f64::from_bits(0x4237_4876_E800_0000),
+ 12 => f64::from_bits(0x426D_1A94_A200_0000),
+ 13 => f64::from_bits(0x42A2_309C_E540_0000),
+ 14 => f64::from_bits(0x42D6_BCC4_1E90_0000),
+ 15 => f64::from_bits(0x430C_6BF5_2634_0000),
+ 16 => f64::from_bits(0x4341_C379_37E0_8000),
+ 17 => f64::from_bits(0x4376_3457_85D8_A000),
+ 18 => f64::from_bits(0x43AB_C16D_674E_C800),
+ 19 => f64::from_bits(0x43E1_58E4_6091_3D00),
+ 20 => f64::from_bits(0x4415_AF1D_78B5_8C40),
+ 21 => f64::from_bits(0x444B_1AE4_D6E2_EF50),
+ 22 => f64::from_bits(0x4480_F0CF_064D_D592),
+ _ => f64::from_bits(0),
+ }
}
#[inline]
+ // This method is precisely the source `u64 as f64` primitive conversion.
+ // Aeneas cannot translate that cast; opacity is confined to the cast while
+ // the fast-path algorithm, its range proof obligation, and all calls stay
+ // visible in the extracted model.
+ #[charon::opaque]
fn from_u64(v: u64) -> Self {
debug_assert!(v <= Self::MAX_MANTISSA_FAST_PATH);
v as _
@@ -206,51 +282,239 @@
F::from_u64_bits(word)
}
+/// Observable control-flow record for a dispatcher execution.
+///
+/// These variants add no decisions to the conversion: each stores values
+/// already computed at the corresponding source branch. In particular, the
+/// first component returned by `dec2flt_with_trace` is the ordinary parser
+/// result, so projecting it preserves every public source observation without
+/// assuming any correctness goal.
+pub enum Dec2FltTrace<'a, F> {
+ /// The original string was empty; no helper was called.
+ EmptyInput,
+ /// Removing one lexical sign left an empty body; no helper was called.
+ SignOnly { body: &'a [u8], negative: bool },
+ /// Both lexical helpers returned `None`; no raw pair was selected.
+ Invalid {
+ body: &'a [u8],
+ negative: bool,
+ parse_number_result: Option<decimal::Decimal>,
+ parse_inf_nan_result: Option<F>,
+ },
+ /// The special helper supplied the directly returned value; no pair was selected.
+ Special {
+ body: &'a [u8],
+ negative: bool,
+ parse_number_result: Option<decimal::Decimal>,
+ parse_inf_nan_result: Option<F>,
+ result: F,
+ },
+ /// The ordinary native shortcut supplied the directly returned value.
+ FastPath {
+ body: &'a [u8],
+ negative: bool,
+ parse_number_result: Option<decimal::Decimal>,
+ fast_path_input: decimal::Decimal,
+ fast_path_result: Option<F>,
+ result: F,
+ },
+ /// The integer/slow path selected and assembled one raw pair.
+ Assembled(Dec2FltAssemblyTrace<'a, F>),
+}
+
+/// Full observation record for the dispatcher path that performs final assembly.
+pub struct Dec2FltAssemblyTrace<'a, F> {
+ pub body: &'a [u8],
+ pub negative: bool,
+ pub parse_number_result: Option<decimal::Decimal>,
+ pub fast_path_input: decimal::Decimal,
+ pub fast_path_result: Option<F>,
+ pub first_compute_exponent: i64,
+ pub first_compute_mantissa: u64,
+ pub first_compute_result: BiasedFp,
+ pub second_compute_guard: bool,
+ pub second_compute_exponent: Option<i64>,
+ pub second_compute_mantissa: Option<u64>,
+ pub second_compute_result: Option<BiasedFp>,
+ pub second_equals_first: Option<bool>,
+ pub forced_deferral: bool,
+ pub post_comparison_pair: BiasedFp,
+ pub slow_path_guard: bool,
+ pub slow_path_result: Option<BiasedFp>,
+ pub selected_pair: BiasedFp,
+ pub assembled_word: u64,
+ pub assembly_result: F,
+ pub lexical_sign_applied: bool,
+ pub result: F,
+}
+
+/// Run the actual dispatcher while retaining its approved internal observations.
+pub fn dec2flt_with_trace<
+ 'a,
+ F: Lemire
+ + core::ops::Div<Output = F>
+ + core::ops::Mul<Output = F>
+ + core::ops::Neg<Output = F>,
+>(
+ s: &'a str,
+) -> (Result<F, ParseFloatError>, Dec2FltTrace<'a, F>) {
+ let mut body = s.as_bytes();
+ let Some(&c) = body.first() else {
+ return (Err(pfe_empty()), Dec2FltTrace::EmptyInput);
+ };
+ let negative = c == b'-';
+ if c == b'-' || c == b'+' {
+ body = &body[1..];
+ }
+ if body.is_empty() {
+ return (Err(pfe_invalid()), Dec2FltTrace::SignOnly { body, negative });
+ }
+
+ let parse_number_result = parse_number(body);
+ let parsed = match parse_number_result {
+ Some(r) => r,
+ None => {
+ let parse_inf_nan_result = parse_inf_nan(body, negative);
+ return match parse_inf_nan_result {
+ Some(value) => (
+ Ok(value),
+ Dec2FltTrace::Special {
+ body,
+ negative,
+ parse_number_result,
+ parse_inf_nan_result,
+ result: value,
+ },
+ ),
+ None => (
+ Err(pfe_invalid()),
+ Dec2FltTrace::Invalid {
+ body,
+ negative,
+ parse_number_result,
+ parse_inf_nan_result,
+ },
+ ),
+ };
+ }
+ };
+
+ let mut num = parsed;
+ num.negative = negative;
+ if !cfg!(feature = "optimize_for_size") {
+ let fast_path_result = num.try_fast_path::<F>();
+ if let Some(value) = fast_path_result {
+ return (
+ Ok(value),
+ Dec2FltTrace::FastPath {
+ body,
+ negative,
+ parse_number_result,
+ fast_path_input: num,
+ fast_path_result,
+ result: value,
+ },
+ );
+ }
+ }
+
+ let first_compute_exponent = num.exponent;
+ let first_compute_mantissa = num.mantissa;
+ let first_compute_result = compute_float::<F>(first_compute_exponent, first_compute_mantissa);
+ let mut fp = first_compute_result;
+
+ // This expands the source short-circuit conjunction without moving the
+ // checked `mantissa + 1`: that addition and the second helper call still
+ // occur exactly when `many_digits && fp.p_biased >= 0`.
+ let second_compute_guard = num.many_digits && fp.p_biased >= 0;
+ let mut second_compute_exponent = None;
+ let mut second_compute_mantissa = None;
+ let mut second_compute_result = None;
+ let mut second_equals_first = None;
+ let mut forced_deferral = false;
+ if second_compute_guard {
+ let exponent = num.exponent;
+ let mantissa = num.mantissa + 1;
+ let second = compute_float::<F>(exponent, mantissa);
+ let equal = fp == second;
+ second_compute_exponent = Some(exponent);
+ second_compute_mantissa = Some(mantissa);
+ second_compute_result = Some(second);
+ second_equals_first = Some(equal);
+ if !equal {
+ fp.p_biased = -1;
+ forced_deferral = true;
+ }
+ }
+ let post_comparison_pair = fp;
+
+ let slow_path_guard = fp.p_biased < 0;
+ let mut slow_path_result = None;
+ if slow_path_guard {
+ // The exact slow-path input is the trace's common `body`; the guard
+ // records whether this call occurred, avoiding a duplicate live slice
+ // reference that Aeneas cannot join across this branch.
+ let replacement = parse_long_mantissa::<F>(body);
+ slow_path_result = Some(replacement);
+ fp = replacement;
+ }
+
+ let selected_pair = fp;
+ // This is the same pure cast/shift/OR used by `biased_fp_to_float`; recording
+ // it neither changes the selected pair nor introduces a new branch or call.
+ let assembled_word = fp.m | ((fp.p_biased as u64) << F::SIG_BITS);
+ let assembly_result = biased_fp_to_float::<F>(fp);
+ let lexical_sign_applied = num.negative;
+ let result = if lexical_sign_applied {
+ core::ops::Neg::neg(assembly_result)
+ } else {
+ assembly_result
+ };
+
+ (
+ Ok(result),
+ Dec2FltTrace::Assembled(Dec2FltAssemblyTrace {
+ body,
+ negative,
+ parse_number_result,
+ fast_path_input: num,
+ fast_path_result: None,
+ first_compute_exponent,
+ first_compute_mantissa,
+ first_compute_result,
+ second_compute_guard,
+ second_compute_exponent,
+ second_compute_mantissa,
+ second_compute_result,
+ second_equals_first,
+ forced_deferral,
+ post_comparison_pair,
+ slow_path_guard,
+ slow_path_result,
+ selected_pair,
+ assembled_word,
+ assembly_result,
+ lexical_sign_applied,
+ result,
+ }),
+ )
+}
+
/// Converts a decimal string into a floating point number.
#[inline(always)] // Will be inlined into a function with `#[inline(never)]`, see above
-pub fn dec2flt<F: Lemire>(s: &str) -> Result<F, ParseFloatError> {
- let mut s = s.as_bytes();
- let Some(&c) = s.first() else { return Err(pfe_empty()) };
- let negative = c == b'-';
- if c == b'-' || c == b'+' {
- s = &s[1..];
- }
- if s.is_empty() {
- return Err(pfe_invalid());
- }
-
- let mut num = match parse_number(s) {
- Some(r) => r,
- None if let Some(value) = parse_inf_nan(s, negative) => return Ok(value),
- None => return Err(pfe_invalid()),
- };
- num.negative = negative;
- if !cfg!(feature = "optimize_for_size") {
- if let Some(value) = num.try_fast_path::<F>() {
- return Ok(value);
- }
- }
-
- // If significant digits were truncated, then we can have rounding error
- // only if `mantissa + 1` produces a different result. We also avoid
- // redundantly using the Eisel-Lemire algorithm if it was unable to
- // correctly round on the first pass.
- let mut fp = compute_float::<F>(num.exponent, num.mantissa);
- if num.many_digits
- && fp.p_biased >= 0
- && fp != compute_float::<F>(num.exponent, num.mantissa + 1)
- {
- fp.p_biased = -1;
- }
- // Unable to correctly round the float using the Eisel-Lemire algorithm.
- // Fallback to a slower, but always correct algorithm.
- if fp.p_biased < 0 {
- fp = parse_long_mantissa::<F>(s);
- }
-
- let mut float = biased_fp_to_float::<F>(fp);
- if num.negative {
- float = -float;
- }
- Ok(float)
-}
+pub fn dec2flt<
+ F: Lemire
+ + core::ops::Div<Output = F>
+ + core::ops::Mul<Output = F>
+ + core::ops::Neg<Output = F>,
+>(
+ s: &str,
+) -> Result<F, ParseFloatError> {
+ // `Lemire` already implies `Neg<Output = F>` through `Float`; the direct
+ // clause admits exactly the same instances and lets Charon resolve the
+ // explicit, source-equivalent final negation.
+ // The public function is now exactly the result projection of the single
+ // instrumented implementation. No conversion step is duplicated, and
+ // discarding the trace cannot affect Rust evaluation or the returned bits.
+ dec2flt_with_trace::<F>(s).0
+}
Record details
| Kind | source adaptation site (file-level diff) |
|---|
Captured evidence identities
[
{
"path": "extraction-evidence/COMMAND.json",
"sha256": "611f36cefb2d895e7b22bd15eaccc1bd57d1b539d54cbd6337e84d0573719a9e",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "extraction-evidence/DETERMINISM.json",
"sha256": "360301745fc66c713335320b2e6a57ef7fb71e390cc7db31a6316a3902f7ef8f",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "extraction-evidence/RESULT.json",
"sha256": "62a89492b5592f404e065d2f8c9a89fd3f83cc59b772fed0eaa475138211d641",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "extraction-evidence/STDERR.bin",
"sha256": "ab4dc202d7a8a30a83ea62ed154710a48148d62230ff8b834700919d4e679c0c",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "extraction-evidence/STDOUT.bin",
"sha256": "604aae51d5c3394417224f655c7de355cc3e699d31fff49f93734706ad43f3f8",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "reference/model-evidence/adaptation-constants-probe.rs",
"sha256": "b5a4a2cba0c08053cb9a816adb1ba5dbd160bf3928bdf5ccf56b7ae83aaa2aa5",
"cited_by": [
"reference/model-evidence/source-adaptation-delta.txt"
]
},
{
"path": "reference/model-evidence/binary64-boundary.txt",
"sha256": "a17d82e7f789ce7f1fbb3922a66ec8806999e526532d637605263882d37b7abf",
"cited_by": [
"shared extraction boundary: Tablet/Preamble.tex",
"reference/model-evidence/source-adaptation-delta.txt"
]
},
{
"path": "reference/model-evidence/binary64-probe.rs",
"sha256": "68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e",
"cited_by": [
"reference/model-evidence/binary64-boundary.txt"
]
},
{
"path": "reference/model-evidence/setup-reproduction.txt",
"sha256": "f97c87d1af65130560f67d2bfcd737106b191c8fce1ed0174569ee218c4ee8d7",
"cited_by": [
"shared extraction boundary: Tablet/Preamble.tex",
"reference/model-evidence/source-adaptation-delta.txt"
]
},
{
"path": "reference/model-evidence/source-adaptation-delta.txt",
"sha256": "5502c71eb4420211d20bd8b6aade171c56cc2dce11d758a73bb93ef1083634ad",
"cited_by": [
"shared extraction boundary: Tablet/Preamble.tex"
]
},
{
"path": "reference/model-evidence/source-valid-byte-slice.txt",
"sha256": "e7887429c66a303cbba3b4df30080ddd9ba4d54e24f25f74947deb228b32b04f",
"cited_by": [
"shared extraction boundary: Tablet/Preamble.tex"
]
}
]crate/dec2flt/parse.rs
Historical preparation document: preparation source-adaptation audit. It describes the state and obligations at preparation. This generation is captured in Modeling. Later closure and review results appear in the proof and modeling views. This original document remains available as history.
Shared extraction-boundary explanation (Preamble)
Preservation argument
Claim
x86_64-unknown-linux-gnu, the library's empty default feature set
(so optimize_for_size is disabled), the unoptimized development
profile, enabled debug assertions and integer overflow checks, and the target's
SSE2 precision-setting branch. Interpret each of the frozen extraction's 24
external operations by the separately justified model-support definition that
owns that operation. Under those interpretations, the composed Aeneas model
represents the supplied source's f64 specialization on all of these
domains, without a correctness premise: every Rust str whose bytes
are valid UTF-8 and whose 64-bit slice length is at most
\mathtt{isize::MAX}=2^{63}-1; every Rust &[u8] whose length is at
most that bound, with arbitrary byte contents; every Decimal; every
i64/u64 pair; and every BiasedFp.dec2flt::<f64> the relation preserves panic versus normal return,
the outer returned Result's Ok/Err discriminant,
and, on success, the exact binary64 word and its NaN classification. For
parse_number it preserves panic versus normal return, the
Option discriminant, and all four returned Decimal fields.
For parse_inf_nan::<f64> and
Decimal::try_fast_path::<f64> it preserves panic versus normal
return, None versus Some, and every returned word and NaN
classification. For compute_float::<f64> and
parse_long_mantissa::<f64> it preserves panic versus normal return
and both fields of every returned BiasedFp. For
biased_fp_to_float::<f64> it preserves panic versus normal return
and the exact returned word, with no restriction on the pair fields.dec2flt_with_trace::<f64> it additionally preserves the public
result and the complete trace: its control-flow variant; sign-stripped body and
lexical sign; numeric and special helper results; signed native input and
native result; first integer operands and result; second-call guard, optional
operands and result, comparison and forced-deferral fact; post-comparison pair;
slow-path guard and optional result; selected pair; assembled unsigned word;
pre-sign assembly result; sign-application fact; and final word. Public
dec2flt::<f64> is exactly the first projection of that interface, and
direct special and native returns select no raw pair.Proof
generated.lean, with SHA-256
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692.
The raw source has no placeholder. The compatibility check reports no
unapproved axiom and isolates exactly 24 external declarations; the complete
inventory equals the 24 entries of Tablet/model-support.json.
compose-native --check reports an unchanged composition and equal
expected and actual Preamble hashes. Thus all transparent extracted
declarations come from this one pinned source and every nontransparent
operation is explicit. The premise assigning each external its owning
definition deliberately leaves that definition's primitive-semantics proof to
its own preservation record; no primitive binding is re-proved here.fpu.rs, lemire.rs, and table.rs are
byte-identical. The standalone namespace and local error shell introduce no
call. The GOALs observe only panic versus normal return and the outer
Ok/Err discriminant, so the shell's private kind and
formatting are unobserved; no identity with an unpinned core error payload is
asserted. Visibility and removed Debug derives do not affect values.
The retained generic bodies use none of the removed trait operations;
the direct Mul, Div, and Neg clauses and calls are
the operations already implied by Lemire. Only the u64
integer instance and f64 Float, FloatExt, and
Lemire instances can participate in an f64 execution, so
disabling the u16/u32 and f16/f32
instances changes no such call.f64/u64 field widths and
masks; the fast-path bounds are the source formula results; and the match over
power-of-ten words has the same masked index and exact words as the source
array. The toolchain-specific words, masks, classifications, casts, and
rounding behavior are independently pinned in
reference/model-evidence/binary64-boundary.txt. The frozen
from_u64 Rust body is the enabled assertion followed by the
u64 as f64 conversion. Because #[charon::opaque] applies to
the whole function, neither operation inside that body is transparent in the
extraction: the whole method is the single inventoried external. Its callers,
their guards, and the surrounding native computation remain transparent.
ModelF64FromU64 supplies exactly successful integer conversion for
v\leq2^{53} and assertion failure otherwise.split_first loops. Extracted helpers receive the same
slices and mutable values, visit bytes in the same forward or reverse order,
and retain every saturating, wrapping, and checked operation. Delayed returns
set a result flag, execute no intervening state update, leave the loop through
that flag, and immediately return the source value. In particular, casts and
length-derived additions on very large inputs keep their original panic or
normal behavior rather than acquiring a convenience size bound.None, overwrite only the parsed sign, try the enabled native
path, make the first integer call, and evaluate the checked
mantissa+1 and second call under exactly the source short-circuit
guard. Both force the same deferral on unequal pairs, call the slow helper on
the unchanged body exactly for a negative post-comparison exponent, assemble
the same selected pair, and apply the sign last. Every trace field is either
one of those already computed values or the same nonmutating cast/shift/OR word
used by assembly. Hence recording the trace and discarding it in the public
projection changes neither call order, guards, state, panic points, nor any
returned observation.isize::MAX, while a Rust string adds UTF-8 validity. Sub-slicing
preserves the length bound and need not preserve an independent string type.
These facts establish all domains and observations in the claim independently
of the truth or falsity of any GOAL.Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
extraction-evidence/COMMAND.json
{"declaration_reader_sha256":"76f60cf0b867fad9727d2256d32b306c8cba3725216a4225d0f83add77fd6158","extraction_provenance":{"extraction_toolchain":{"aeneas":"fa699427","aeneas_revision":"fa699427cdfa8f604b891fb0223ef42883dd7dc4","cargo_features":[{"features":["default"],"name":"dec2flt-model","source":"workspace:Cargo.toml","version":"0.1.0"}],"cargo_lock_sha256":"bc644c624ded89197356bbd65d995054b7fb08e5bdfbaa38c6e7c7a53772cecf","cfg":["debug_assertions","emscripten_wasm_eh","feature=\"default\"","fmt_debug=\"full\"","overflow_checks","panic=\"unwind\"","relocation_model=\"pic\"","target_abi=\"\"","target_arch=\"x86_64\"","target_endian=\"little\"","target_env=\"gnu\"","target_family=\"unix\"","target_feature=\"fxsr\"","target_feature=\"sse\"","target_feature=\"sse2\"","target_feature=\"x87\"","target_has_atomic","target_has_atomic=\"16\"","target_has_atomic=\"32\"","target_has_atomic=\"64\"","target_has_atomic=\"8\"","target_has_atomic=\"ptr\"","target_has_atomic_load_store","target_has_atomic_load_store=\"16\"","target_has_atomic_load_store=\"32\"","target_has_atomic_load_store=\"64\"","target_has_atomic_load_store=\"8\"","target_has_atomic_load_store=\"ptr\"","target_has_atomic_primitive_alignment=\"16\"","target_has_atomic_primitive_alignment=\"32\"","target_has_atomic_primitive_alignment=\"64\"","target_has_atomic_primitive_alignment=\"8\"","target_has_atomic_primitive_alignment=\"ptr\"","target_has_reliable_f128","target_has_reliable_f16","target_has_reliable_f16_math","target_object_format=\"elf\"","target_os=\"linux\"","target_pointer_width=\"64\"","target_thread_local","target_vendor=\"unknown\"","ub_checks","unix"],"charon":"0.1.216","charon_revision":"6f058254eb741c12e9b388df07adaf7cc8aac8ed","extraction_profile":"dev","lean":"4.30.0-rc2","overflow_checks":true,"panic_strategy":"unwind","rustc_vv":"rustc 1.98.0-nightly (14210df0e 2026-05-31)\nbinary: rustc\ncommit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65\ncommit-date: 2026-05-31\nhost: x86_64-unknown-linux-gnu\nrelease: 1.98.0-nightly\nLLVM version: 22.1.6\n","target_pointer_width":64,"target_triple":"x86_64-unknown-linux-gnu"},"extractor_stack":["charon@0.1.216","aeneas@fa699427"],"extractor_toolchain_sha256":"18657da0659dee7889ed8a937b136c9abbc3a35e9050241cd8201c94fd232323","not_recorded":[],"source_digests":[{"source_file":"lib.rs","source_sha256":"b5ecf4d7e9dfa0337f1586ae0e865fbbe2dd384137ee6e2ad635f0d5d6e916a9"}]},"extractor_script_path":"/home/leanagent/pv_runs/trellis-native-implementation-v85/scripts/extract_pv_model.py","extractor_script_sha256":"cc1fdd50a78185c7bb564b715c554cb35d9fc09ed566b6c3d4f482f2d27ef67d","kernel_gate_checkers":[],"log_concatenation_order":"runs_then_steps_in_array_order","runs":[{"run_role":"primary","steps":[{"argv":["/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","-vV"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"rustc-version","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"},{"argv":["/home/leanagent/pv_spike/tools/charon/bin/charon","cargo","--preset=aeneas","--dest-file","/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/m.llbc","--","--offline","--profile","dev","--target","x86_64-unknown-linux-gnu"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_BUILD_TARGET":"x86_64-unknown-linux-gnu","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"charon","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"},{"argv":["/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/cargo","metadata","--format-version=1","--locked","--offline","--filter-platform","x86_64-unknown-linux-gnu"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_BUILD_TARGET":"x86_64-unknown-linux-gnu","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"cargo-metadata","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"},{"argv":["/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/cargo","rustc","--lib","--locked","--offline","--profile","dev","--target","x86_64-unknown-linux-gnu","--","--print","cfg"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_BUILD_TARGET":"x86_64-unknown-linux-gnu","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"cargo-rustc-cfg","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"},{"argv":["/home/leanagent/pv_spike/tools/aeneas/bin/aeneas","-backend","lean","-dest","/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen","-emit-json","/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/m.llbc"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_BUILD_TARGET":"x86_64-unknown-linux-gnu","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"aeneas","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"}]}],"schema":"trellis-extraction-command/v1","tool_source_checkouts":[]}extraction-evidence/DETERMINISM.json
{"comparison":"generated_lean_and_complete_tablet_tree_byte_identity","generated_lean_byte_identical":false,"generated_lean_sha256":["49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692"],"kernel_filespec_gate":"not_run","kernel_prescribed_region_gate":"not_run","namespace_context_roundtrip_gate":"not_run","result_sha256":"62a89492b5592f404e065d2f8c9a89fd3f83cc59b772fed0eaa475138211d641","run_roles":["primary"],"schema":"trellis-extraction-determinism/v2","status":"not_run","tablet_root_sha256":["57e6ec9f6e8b1d9d78ab01504bad58f93cb43308edf77f73f86b986b8d07b809"],"tablet_tree_byte_identical":false}extraction-evidence/RESULT.json
{"command_sha256":"611f36cefb2d895e7b22bd15eaccc1bd57d1b539d54cbd6337e84d0573719a9e","runs":[{"generated_lean_sha256":"49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692","run_role":"primary","steps":[{"exit_status":0,"stderr_byte_length":0,"stderr_offset":0,"stderr_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","stdout_byte_length":212,"stdout_offset":0,"stdout_sha256":"e6ea0da4a3301256a0a0dc0d67d11acf4e83e0d1bff5dd987ccdaa43708714bc","tool":"rustc-version"},{"exit_status":0,"stderr_byte_length":654,"stderr_offset":0,"stderr_sha256":"263937c29ffcb9cf54e452b2d8b89e015a1fa1a5b2a2d237292d4350d0b04aed","stdout_byte_length":0,"stdout_offset":212,"stdout_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","tool":"charon"},{"exit_status":0,"stderr_byte_length":0,"stderr_offset":654,"stderr_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","stdout_byte_length":2897,"stdout_offset":212,"stdout_sha256":"ec87d2fc78972115c1b9e436f373a890f3847397a741d91d720dce4fb36c7a90","tool":"cargo-metadata"},{"exit_status":0,"stderr_byte_length":302,"stderr_offset":654,"stderr_sha256":"7025c1726c90c35a211042d6945c25ff6015acaca27ee97a063465221b792806","stdout_byte_length":1062,"stdout_offset":3109,"stdout_sha256":"4081a320e6292139b4a673d225682dc054b77cba113b8c8a8fbb0593f824b713","tool":"cargo-rustc-cfg"},{"exit_status":0,"stderr_byte_length":7084,"stderr_offset":956,"stderr_sha256":"5f41394d8b12a0d7a6c9e7115108a06b20599eb7ddd611cff4b90b31ba2fe26a","stdout_byte_length":933,"stdout_offset":4171,"stdout_sha256":"376c43fb83e40962a056e9198dba4afb0cf8ecb0238e76c78bd9dbc32fbced4a","tool":"aeneas"}],"tablet_root_sha256":"57e6ec9f6e8b1d9d78ab01504bad58f93cb43308edf77f73f86b986b8d07b809"}],"schema":"trellis-extraction-result/v2","stderr_byte_length":8040,"stderr_sha256":"ab4dc202d7a8a30a83ea62ed154710a48148d62230ff8b834700919d4e679c0c","stdout_byte_length":5104,"stdout_sha256":"604aae51d5c3394417224f655c7de355cc3e699d31fff49f93734706ad43f3f8"}extraction-evidence/STDERR.bin
Compiling dec2flt-model v0.1.0 (/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate)
warning: feature `f16` is declared but not used
--> lib.rs:2:46
|
2 | #![feature(cfg_target_has_reliable_f16_f128, f16, float_masks, register_tool, staged_api)]
| ^^^
|
= note: `#[warn(unused_features)]` (part of `#[warn(unused)]`) on by default
warning: `dec2flt-model` (lib) generated 1 warning
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.41s
Compiling dec2flt-model v0.1.0 (/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.02s
[?25lApplied prepasses: [------------------------------------------------] 0/203 ⠋
Applied prepasses: [------------------------------------------------] 1/203 ⠋
Applied prepasses: [#####-------------------------------------------] 24/203 ⠋
Applied prepasses: [########----------------------------------------] 38/203 ⠋
Applied prepasses: [##############################------------------] 128/203 ⠙
Applied prepasses: [################################################] 203/203 ✔️
[?25h[?25lTranslated globals: [-------------------------------------------------] 0/50 ⠋
Translated globals: [#################################################] 50/50 ✔️
[?25h[?25lTranslated opaque functions: [----------------------------------------] 0/87 ⠋
Translated opaque functions: [########################################] 87/87 ✔️
[?25h[?25lTranslated transparent functions: [---------------------------------] 0/107 ⠋
Translated transparent functions: [---------------------------------] 1/107 ⠋
Translated transparent functions: [###------------------------------] 10/107 ⠙
Translated transparent functions: [######---------------------------] 22/107 ⠹
Translated transparent functions: [##########-----------------------] 35/107 ⠹
Translated transparent functions: [##############-------------------] 47/107 ⠹
Translated transparent functions: [###############------------------] 51/107 ⠸
Translated transparent functions: [################-----------------] 55/107 ⠸
Translated transparent functions: [##################---------------] 60/107 ⠼
Translated transparent functions: [##################---------------] 61/107 ⠼
Translated transparent functions: [###################--------------] 64/107 ⠼
Translated transparent functions: [####################-------------] 68/107 ⠼
Translated transparent functions: [#####################------------] 69/107 ⠴
Translated transparent functions: [#####################------------] 70/107 ⠴
Translated transparent functions: [######################-----------] 72/107 ⠦
Translated transparent functions: [######################-----------] 73/107 ⠦
Translated transparent functions: [######################-----------] 74/107 ⠧
Translated transparent functions: [#######################----------] 77/107 ⠧
Translated transparent functions: [########################---------] 78/107 ⠧
Translated transparent functions: [########################---------] 80/107 ⠇
Translated transparent functions: [#########################--------] 83/107 ⠇
Translated transparent functions: [#########################--------] 84/107 ⠇
Translated transparent functions: [##########################-------] 85/107 ⠏
Translated transparent functions: [##########################-------] 86/107 ⠏
Translated transparent functions: [##########################-------] 87/107 ⠋
Translated transparent functions: [###########################------] 88/107 ⠋
Translated transparent functions: [###########################------] 90/107 ⠋
Translated transparent functions: [############################-----] 91/107 ⠙
Translated transparent functions: [############################-----] 92/107 ⠙
Translated transparent functions: [############################-----] 93/107 ⠙
Translated transparent functions: [#############################----] 95/107 ⠹
Translated transparent functions: [#############################----] 97/107 ⠹
Translated transparent functions: [##############################---] 98/107 ⠸
Translated transparent functions: [##############################---] 99/107 ⠼
Translated transparent functions: [###############################--] 101/107 ⠼
Translated transparent functions: [###############################--] 102/107 ⠴
Translated transparent functions: [###############################--] 103/107 ⠦
Translated transparent functions: [################################-] 104/107 ⠦
Translated transparent functions: [################################-] 105/107 ⠧
Translated transparent functions: [################################-] 106/107 ⠇
Translated transparent functions: [#################################] 107/107 ⠏
Translated transparent functions: [#################################] 107/107 ✔️
[?25h[?25lTranslated trait declarations: [--------------------------------------] 0/49 ⠋
Translated trait declarations: [########################--------------] 31/49 ✔️
[?25h[?25lTranslated trait impls: [---------------------------------------------] 0/85 ⠋
Translated trait impls: [#################################------------] 64/85 ✔️
[?25h[?25lPost-processed translated opaque functions: [-------------------------] 0/87 ⠋
Post-processed translated opaque functions: [-------------------------] 1/87 ⠙
Post-processed translated opaque functions: [#########################] 87/87 ✔️
[?25h[?25lPost-processed translated transparent functions: [------------------] 0/107 ⠋
Post-processed translated transparent functions: [------------------] 1/107 ⠋
Post-processed translated transparent functions: [#-----------------] 10/107 ⠙
Post-processed translated transparent functions: [##----------------] 13/107 ⠹
Post-processed translated transparent functions: [##----------------] 16/107 ⠸
Post-processed translated transparent functions: [##----------------] 17/107 ⠸
Post-processed translated transparent functions: [###---------------] 18/107 ⠼
Post-processed translated transparent functions: [###---------------] 22/107 ⠼
Post-processed translated transparent functions: [####--------------] 24/107 ⠼
Post-processed translated transparent functions: [####--------------] 29/107 ⠴
Post-processed translated transparent functions: [#####-------------] 31/107 ⠴
Post-processed translated transparent functions: [#####-------------] 33/107 ⠴
Post-processed translated transparent functions: [######------------] 39/107 ⠴
Post-processed translated transparent functions: [########----------] 48/107 ⠦
Post-processed translated transparent functions: [#########---------] 56/107 ⠦
Post-processed translated transparent functions: [##########--------] 62/107 ⠦
Post-processed translated transparent functions: [###############---] 94/107 ⠦
Post-processed translated transparent functions: [################--] 99/107 ⠧
Post-processed translated transparent functions: [################--] 100/107 ⠇
Post-processed translated transparent functions: [#################-] 102/107 ⠇
Post-processed translated transparent functions: [#################-] 104/107 ⠏
Post-processed translated transparent functions: [#################-] 105/107 ⠋
Post-processed translated transparent functions: [##################] 107/107 ⠙
Post-processed translated transparent functions: [##################] 107/107 ✔️
[?25hextraction-evidence/STDOUT.bin
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
{"packages":[{"name":"dec2flt-model","version":"0.1.0","id":"path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0","license":null,"license_file":null,"description":null,"source":null,"dependencies":[],"targets":[{"kind":["lib"],"crate_types":["lib"],"name":"dec2flt_model","src_path":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate/lib.rs","edition":"2024","doc":true,"doctest":true,"test":true}],"features":{"default":[],"optimize_for_size":[]},"manifest_path":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate/Cargo.toml","metadata":null,"publish":[],"authors":[],"categories":[],"keywords":[],"readme":null,"repository":null,"homepage":null,"documentation":null,"edition":"2024","links":null,"default_run":null,"rust_version":null}],"workspace_members":["path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0"],"workspace_default_members":["path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0"],"resolve":{"nodes":[{"id":"path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0","dependencies":[],"deps":[],"features":["default"]}],"root":"path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0"},"target_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","build_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","version":1,"workspace_root":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate","metadata":null}
debug_assertions
emscripten_wasm_eh
feature="default"
fmt_debug="full"
overflow_checks
panic="unwind"
relocation_model="pic"
target_abi=""
target_arch="x86_64"
target_endian="little"
target_env="gnu"
target_family="unix"
target_feature="fxsr"
target_feature="sse"
target_feature="sse2"
target_feature="x87"
target_has_atomic
target_has_atomic="16"
target_has_atomic="32"
target_has_atomic="64"
target_has_atomic="8"
target_has_atomic="ptr"
target_has_atomic_load_store
target_has_atomic_load_store="16"
target_has_atomic_load_store="32"
target_has_atomic_load_store="64"
target_has_atomic_load_store="8"
target_has_atomic_load_store="ptr"
target_has_atomic_primitive_alignment="16"
target_has_atomic_primitive_alignment="32"
target_has_atomic_primitive_alignment="64"
target_has_atomic_primitive_alignment="8"
target_has_atomic_primitive_alignment="ptr"
target_has_reliable_f128
target_has_reliable_f16
target_has_reliable_f16_math
target_object_format="elf"
target_os="linux"
target_pointer_width="64"
target_thread_local
target_vendor="unknown"
ub_checks
unix
[[92mInfo[39m ] Imported: /home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/m.llbc
[[92mInfo[39m ] Generated: /home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/M.lean
[[92mInfo[39m ] Generated: /home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/translation.json
[[93mWarn[39m ] The crate contains extracted external, unknown definitions: we advise using the option -split-files to allow manually providing these definitions in separate files.
[[92mInfo[39m ] Total execution time: 7.245881 seconds
reference/model-evidence/adaptation-constants-probe.rs
fn main() {
let largest_power_of_ten = (1024_f64 / std::f64::consts::LOG2_10) as i32;
let log2_5 = std::f64::consts::LOG2_10 - 1.0;
let max_exponent_fast_path = (53_f64 / log2_5) as i64;
let max_exponent_disguised =
max_exponent_fast_path + (53_f64 / std::f64::consts::LOG2_10) as i64;
println!("largest_power_of_ten={largest_power_of_ten}");
println!("max_exponent_fast_path={max_exponent_fast_path}");
println!("max_exponent_disguised={max_exponent_disguised}");
println!("neg_nan={:016x}", (-f64::NAN).to_bits());
for (exponent, value) in IntoIterator::into_iter([
1e0_f64, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11,
1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, 1e20, 1e21, 1e22,
])
.enumerate()
{
println!("pow10_{exponent}={:016x}", value.to_bits());
}
}
reference/model-evidence/binary64-boundary.txt
Primary evidence for the binary64 boundary
==========================================
Scope and identities
--------------------
This record concerns the frozen x86_64-unknown-linux-gnu extraction, the
adapted Rust crate retained in this repository, and the installed toolchain
named by modeling-input/SETUP.md. The probe source is retained at
reference/model-evidence/binary64-probe.rs; no scratch source is required to
reproduce it.
Toolchain executable:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
Target:
x86_64-unknown-linux-gnu
rustc executable SHA-256:
162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
Probe source SHA-256:
68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
Compiled probe SHA-256:
f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
Frozen generated.lean SHA-256:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692
Frozen modeling-input/manifest.json SHA-256:
2fc182c0c7acccad30c449ca349b999759b84e8ed4ec9d590e8295e43eeec077
Approved Binary64ModelDefault.lean SHA-256 at the time of this record:
03ae48fb631e6242bd21bf95d0481b66acae05f8cab343c7ab279b3c116538a3
Exact reproduction commands
---------------------------
Run from the repository root:
R=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
P=reference/model-evidence/binary64-probe.rs
B=.trellis/scratch/binary64-probe
"$R" --version --verbose
sha256sum "$R"
sha256sum "$P"
"$R" --target x86_64-unknown-linux-gnu -C opt-level=0 "$P" -o "$B"
sha256sum "$B"
"$B"
Raw output
----------
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
rustc_sha256=162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
probe_sha256=68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
binary_sha256=f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
target_arch=x86_64
mantissa_digits=53
exponent_mask=7ff0000000000000
mantissa_mask=000fffffffffffff
nan=7ff8000000000000
infinity=7ff0000000000000
neg_infinity=fff0000000000000
nan_category=Nan
infinity_category=Infinite
zero_category=Zero
subnormal_category=Subnormal
normal_category=Normal
from_bits_to_bits=7ff0000000000001
neg_payload_nan=fff0000000000001
neg_zero=8000000000000000
subnormal_tie_to_even_zero=0000000000000000
subnormal_tie_to_even_two=0000000000000002
normal_division=3fb999999999999a
mul_negative_zero=8000000000000000
div_negative_zero=8000000000000000
div_negative_infinity=fff0000000000000
mul_overflow=7ff0000000000000
mul_zero_infinity_is_nan=true
div_zero_zero_is_nan=true
mul_nan_is_nan=true
cast_2_pow_53=4340000000000000
cast_2_pow_53_plus_1=4340000000000000
Pinned Rust library sources
---------------------------
The installed sources below belong to the same named toolchain. Their
SHA-256 identities are:
core/src/primitive_docs.rs
c4b8627dd67d5dac8f383f383a9e7ff1229ea43e7599610fc61988694cf0f3e5
core/src/num/f64.rs
84540a6a59e347c63caabe12cf895ba1239c76a50682471567007138fac1c618
core/src/clone.rs
23f9cfc80347fde6b8457d46fbf7a2b8d9f34c8c58601b0b6f714ca2f6d1976b
The exact relevant text of core/src/primitive_docs.rs is:
#[rustc_doc_primitive = "f64"]
#[doc(alias = "double")]
/// A 64-bit floating-point type (specifically, the "binary64" type defined in IEEE 754-2008).
///
/// This type is very similar to [`prim@f32`], but has increased precision by using twice as many
/// bits. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on double-precision
/// values][wikipedia] for more information.
The referenced primitive-f32 documentation supplies the common primitive
floating-point operation rules quoted next:
/// - −0.0: IEEE 754 floating-point numbers have a bit that indicates their sign, so −0.0 is a
/// possible value. For comparison −0.0 = +0.0, but floating-point operations can carry
/// the sign bit through arithmetic operations. This means −0.0 × +0.0 produces −0.0 and
/// a negative number rounded to a value smaller than a float can represent also produces −0.0.
/// - [∞](#associatedconstant.INFINITY) and
/// [−∞](#associatedconstant.NEG_INFINITY): these result from calculations
/// like `1.0 / 0.0`.
///
/// When a primitive operation (addition, subtraction, multiplication, or
/// division) is performed on this type, the result is rounded according to the
/// roundTiesToEven direction defined in IEEE 754-2008. That means:
///
/// - The result is the representable value closest to the true value, if there
/// is a unique closest representable value.
/// - If the true value is exactly half-way between two representable values,
/// the result is the one with an even least-significant binary digit.
/// - If the true value's magnitude is ≥ `f32::MAX` + 2<sup>(`f32::MAX_EXP` −
/// `f32::MANTISSA_DIGITS` − 1)</sup>, the result is ∞ or −∞ (preserving the
/// true value's sign).
The same file explicitly separates arithmetic NaN choice from exact bitwise
operations; its exact relevant text is:
/// The rules for NaN values differ between *arithmetic* and *non-arithmetic* (or "bitwise")
/// operations. The non-arithmetic operations are unary `-`, `abs`, `copysign`, `signum`,
/// `{to,from}_bits`, `{to,from}_{be,le,ne}_bytes` and `is_sign_{positive,negative}`. These
/// operations are guaranteed to exactly preserve the bit pattern of their input except for possibly
/// changing the sign bit.
///
/// The following rules apply when a NaN value is returned from an arithmetic operation:
/// - The result has a non-deterministic sign.
/// - The quiet bit and payload are non-deterministically chosen from
/// the following set of options:
///
/// - **Preferred NaN**: The quiet bit is set and the payload is all-zero.
/// - **Quieting NaN propagation**: The quiet bit is set and the payload is copied from any input
/// operand that is a NaN. If the inputs and outputs do not have the same payload size (i.e., for
/// `as` casts), then
/// - If the output is smaller than the input, low-order bits of the payload get dropped.
/// - If the output is larger than the input, the payload gets filled up with 0s in the low-order
/// bits.
/// - **Unchanged NaN propagation**: The quiet bit and payload are copied from any input operand
/// that is a NaN. If the inputs and outputs do not have the same size (i.e., for `as` casts), the
/// same rules as for "quieting NaN propagation" apply, with one caveat: if the output is smaller
/// than the input, dropping the low-order bits may result in a payload of 0; a payload of 0 is not
/// possible with a signaling NaN (the all-0 significand encodes an infinity) so unchanged NaN
/// propagation cannot occur with some inputs.
/// - **Target-specific NaN**: The quiet bit is set and the payload is picked from a target-specific
/// set of "extra" possible NaN payloads. The set can depend on the input operand values.
/// See the table below for the concrete NaNs this set contains on various targets.
///
/// | `target_arch` | Extra payloads possible on this platform |
/// |---------------|------------------------------------------|
/// | `aarch64`, `arm`, `arm64ec`, `loongarch64`, `powerpc` (except when `target_abi = "spe"`), `powerpc64`, `riscv32`, `riscv64`, `s390x`, `x86`, `x86_64` | None |
Thus the model's preferred quiet NaN is one permitted result whenever
multiplication or division returns NaN. This does not claim that arbitrary
Rust arithmetic NaNs have those exact bits. By contrast, unary negation and
bit conversion must preserve all non-sign bits exactly, including for every
NaN payload.
The exact relevant declarations in core/src/num/f64.rs are:
pub const MANTISSA_DIGITS: u32 = 53;
pub const NAN: f64 = 0.0_f64 / 0.0_f64;
pub const INFINITY: f64 = 1.0_f64 / 0.0_f64;
pub const NEG_INFINITY: f64 = -1.0_f64 / 0.0_f64;
pub const SIGN_MASK: u64 = 0x8000_0000_0000_0000;
pub const EXPONENT_MASK: u64 = 0x7ff0_0000_0000_0000;
pub const MANTISSA_MASK: u64 = 0x000f_ffff_ffff_ffff;
pub const fn classify(self) -> FpCategory {
// We used to have complicated logic here that avoids the simple bit-based tests to work
// around buggy codegen for x87 targets (see
// https://github.com/rust-lang/rust/issues/114479). However, some LLVM versions later, none
// of our tests is able to find any difference between the complicated and the naive
// version, so now we are back to the naive version.
let b = self.to_bits();
match (b & Self::MANTISSA_MASK, b & Self::EXPONENT_MASK) {
(0, Self::EXPONENT_MASK) => FpCategory::Infinite,
(_, Self::EXPONENT_MASK) => FpCategory::Nan,
(0, 0) => FpCategory::Zero,
(_, 0) => FpCategory::Subnormal,
_ => FpCategory::Normal,
}
}
pub const fn to_bits(self) -> u64 {
// SAFETY: `u64` is a plain old datatype so we can always transmute to it.
unsafe { mem::transmute(self) }
}
pub const fn from_bits(v: u64) -> Self {
// It turns out the safety issues with sNaN were overblown! Hooray!
// SAFETY: `u64` is a plain old datatype so we can always transmute from it.
unsafe { mem::transmute(v) }
}
The exact scalar clone body in core/src/clone.rs is:
impl const Clone for $t {
#[inline(always)]
fn clone(&self) -> Self {
*self
}
}
Frozen adapted source
---------------------
The relevant retained source file hashes are:
crate/traits.rs
9013270fb846edcb0bdf2abd0353f575fdd727974cba9e89bdab8bb4c2b4f0bf
crate/dec2flt/mod.rs
b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012
crate/dec2flt/parse.rs
50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f
crate/dec2flt/decimal.rs
633658be803b7369b18feb098a8aa1b5f714a933d3b79ecbc4899a1b05f35beb
crate/dec2flt/lemire.rs
fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1
crate/dec2flt/slow.rs
93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485
Exact constant and bit-conversion excerpt from crate/traits.rs:
impl Float for f64 {
type Int = u64;
const INFINITY: Self = Self::INFINITY;
const NEG_INFINITY: Self = Self::NEG_INFINITY;
const NAN: Self = Self::NAN;
// Bit-identical to the upstream `-f64::NAN`, without the unsupported
// compile-time float negation.
const NEG_NAN: Self = f64::from_bits(0xFFF8_0000_0000_0000);
const BITS: u32 = 64;
const SIG_TOTAL_BITS: u32 = Self::MANTISSA_DIGITS;
const EXP_MASK: Self::Int = Self::EXPONENT_MASK;
const SIG_MASK: Self::Int = Self::MANTISSA_MASK;
fn to_bits(self) -> Self::Int {
self.to_bits()
}
fn classify(self) -> FpCategory {
self.classify()
}
}
impl FloatExt for f64 {
#[inline]
fn from_u64_bits(v: u64) -> Self {
f64::from_bits(v)
}
Exact derived-constant defaults from crate/traits.rs:
/// The number of bits in the significand, *excluding* the hidden bit.
const SIG_BITS: u32 = Self::SIG_TOTAL_BITS - 1;
/// Number of bits in the exponent.
const EXP_BITS: u32 = Self::BITS - Self::SIG_BITS - 1;
/// The saturated (maximum bitpattern) value of the exponent, i.e. the infinite
/// representation.
///
/// This shifted fully right, use `EXP_MASK` for the shifted value.
const EXP_SAT: u32 = (1 << Self::EXP_BITS) - 1;
/// Signed version of `EXP_SAT` since we convert a lot.
const INFINITE_POWER: i32 = Self::EXP_SAT as i32;
/// The exponent bias value. This is also the maximum value of the exponent.
const EXP_BIAS: u32 = Self::EXP_SAT >> 1;
/// Minimum exponent value of normal values.
const EXP_MIN: i32 = -(Self::EXP_BIAS as i32 - 1);
Together with the f64-instance lines `BITS = 64` and
`SIG_TOTAL_BITS = Self::MANTISSA_DIGITS` in the preceding excerpt, these
defaults derive SIG_BITS, EXP_MIN, and INFINITE_POWER from the primitive
mantissa-digit constant rather than introducing independent parameters.
Exact checked cast excerpt from crate/dec2flt/mod.rs:
#[inline]
// This method is precisely the source `u64 as f64` primitive conversion.
// Aeneas cannot translate that cast; opacity is confined to the cast while
// the fast-path algorithm, its range proof obligation, and all calls stay
// visible in the extracted model.
#[charon::opaque]
fn from_u64(v: u64) -> Self {
debug_assert!(v <= Self::MAX_MANTISSA_FAST_PATH);
v as _
}
Here MAX_MANTISSA_FAST_PATH is the retained default 1 << 53. Therefore the
source succeeds only through the modeled branch v <= 2^53 in this debug
configuration; above it the debug assertion fails before the cast. On the
successful branch every integer is exactly representable, so the source cast
and the model rounder return the same word.
Exact power-table and assembly excerpts from crate/dec2flt/mod.rs:
/// Maximum mantissa for the fast-path (`1 << 53` for f64).
const MAX_MANTISSA_FAST_PATH: u64 = 1 << Self::SIG_TOTAL_BITS;
const MAX_EXPONENT_FAST_PATH: i64 = 22;
const MIN_EXPONENT_FAST_PATH: i64 = -Self::MAX_EXPONENT_FAST_PATH;
const MAX_EXPONENT_DISGUISED_FAST_PATH: i64 = 37;
fn pow10_fast_path(exponent: usize) -> Self {
// These bit patterns are exactly the source table's rounded binary64
// literals. The match is the same masked lookup; it merely keeps float
// constants out of Aeneas's unsupported constant interpreter.
match exponent & 31 {
0 => f64::from_bits(0x3FF0_0000_0000_0000),
1 => f64::from_bits(0x4024_0000_0000_0000),
2 => f64::from_bits(0x4059_0000_0000_0000),
3 => f64::from_bits(0x408F_4000_0000_0000),
4 => f64::from_bits(0x40C3_8800_0000_0000),
5 => f64::from_bits(0x40F8_6A00_0000_0000),
6 => f64::from_bits(0x412E_8480_0000_0000),
7 => f64::from_bits(0x4163_12D0_0000_0000),
8 => f64::from_bits(0x4197_D784_0000_0000),
9 => f64::from_bits(0x41CD_CD65_0000_0000),
10 => f64::from_bits(0x4202_A05F_2000_0000),
11 => f64::from_bits(0x4237_4876_E800_0000),
12 => f64::from_bits(0x426D_1A94_A200_0000),
13 => f64::from_bits(0x42A2_309C_E540_0000),
14 => f64::from_bits(0x42D6_BCC4_1E90_0000),
15 => f64::from_bits(0x430C_6BF5_2634_0000),
16 => f64::from_bits(0x4341_C379_37E0_8000),
17 => f64::from_bits(0x4376_3457_85D8_A000),
18 => f64::from_bits(0x43AB_C16D_674E_C800),
19 => f64::from_bits(0x43E1_58E4_6091_3D00),
20 => f64::from_bits(0x4415_AF1D_78B5_8C40),
21 => f64::from_bits(0x444B_1AE4_D6E2_EF50),
22 => f64::from_bits(0x4480_F0CF_064D_D592),
_ => f64::from_bits(0),
}
}
fn biased_fp_to_float<F: FloatExt>(x: BiasedFp) -> F {
let mut word = x.m;
word |= (x.p_biased as u64) << F::SIG_BITS;
F::from_u64_bits(word)
}
Exact native-call excerpt from crate/dec2flt/decimal.rs:
fn can_use_fast_path<F: Lemire>(&self) -> bool {
F::MIN_EXPONENT_FAST_PATH <= self.exponent
&& self.exponent <= F::MAX_EXPONENT_DISGUISED_FAST_PATH
&& self.mantissa <= F::MAX_MANTISSA_FAST_PATH
&& !self.many_digits
}
if !self.can_use_fast_path::<F>() {
return None;
}
let value = if self.exponent <= F::MAX_EXPONENT_FAST_PATH {
// normal fast path
let value = F::from_u64(self.mantissa);
if self.exponent < 0 {
// Explicit trait calls preserve Rust arithmetic and resolve
// the generic output type that Charon leaves ambiguous.
core::ops::Div::div(value, F::pow10_fast_path((-self.exponent) as _))
} else {
core::ops::Mul::mul(value, F::pow10_fast_path(self.exponent as _))
}
} else {
// disguised fast path
let shift = self.exponent - F::MAX_EXPONENT_FAST_PATH;
let mantissa = self.mantissa.checked_mul(INT_POW10[shift as usize])?;
if mantissa > F::MAX_MANTISSA_FAST_PATH {
return None;
}
core::ops::Mul::mul(
F::from_u64(mantissa),
F::pow10_fast_path(F::MAX_EXPONENT_FAST_PATH as _),
)
};
if self.negative {
Some(core::ops::Neg::neg(value))
} else {
Some(value)
}
The preceding can_use_fast_path body, together with
MAX_MANTISSA_FAST_PATH = 1 << SIG_TOTAL_BITS and SIG_TOTAL_BITS = 53 for f64,
requires the exponent to lie between -22 and 37, the input mantissa to be at
most 2^53, and many_digits to be false. Consequently an ordinary arithmetic
call has a from_u64 operand in 0..=2^53. In its negative-exponent arm,
`-self.exponent` lies in 1..=22; in its nonnegative arm, `self.exponent` lies
in 0..=22. The disguised branch checks its multiplied mantissa against 2^53
before from_u64 and uses table index 22. The paired statement
Binary64NativeCallDomain does not assert this source reachability. It says
conditionally that a from_u64 argument at most 2^53 succeeds with a finite,
non-NaN word and that a table index at most 22 succeeds with a positive,
nonzero, finite, non-NaN word. Applying that conditional statement to the
guards just derived establishes those properties for the actual ordinary and
disguised calls, and in particular establishes that every executed divisor is
nonzero.
Exact special-value excerpt from crate/dec2flt/parse.rs:
let float = match (register, len) {
(INF_3, 3) => F::INFINITY,
(INF_8, 8) => F::INFINITY,
(NAN, 3) => F::NAN,
_ => return None,
};
if negative { Some(-float) } else { Some(float) }
Thus the executed special route is INFINITY or NAN followed by conditional
negation; it does not select NEG_INFINITY or NEG_NAN directly.
The number helper has the exact source body
pub fn parse_number(s: &[u8]) -> Option<Decimal> {
if let Some((float, rest)) = parse_partial_number(s) {
if rest == s.len() {
return Some(float);
}
}
None
}
It returns only the Decimal produced by parse_partial_number; there is no
float type parameter or float operation at this boundary.
The integer-tier helper has the source type and exact executable excerpts
below (long explanatory comments are elided). In particular it returns a raw
BiasedFp and contains no from_u64 cast, primitive float multiplication,
division, negation, or from_bits call:
pub fn compute_float<F: Float>(q: i64, mut w: u64) -> BiasedFp {
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let fp_error = BiasedFp::zero_pow2(-1);
// Short-circuit if the value can only be a literal 0 or infinity.
if w == 0 || q < F::SMALLEST_POWER_OF_TEN as i64 {
return fp_zero;
} else if q > F::LARGEST_POWER_OF_TEN as i64 {
return fp_inf;
}
// Normalize our significant digits, so the most-significant bit is set.
let lz = w.leading_zeros();
w <<= lz;
let (lo, hi) = compute_product_approx(q, w, F::SIG_BITS as usize + 3);
if lo == 0xFFFF_FFFF_FFFF_FFFF {
let inside_safe_exponent = (q >= -27) && (q <= 55);
if !inside_safe_exponent {
return fp_error;
}
}
let upperbit = (hi >> 63) as i32;
let mut mantissa = hi >> (upperbit + 64 - F::SIG_BITS as i32 - 3);
let mut power2 = power(q as i32) + upperbit - lz as i32 - F::EXP_MIN + 1;
if power2 <= 0 {
if -power2 + 1 >= 64 {
// Have more than 64 bits below the minimum exponent, must be 0.
return fp_zero;
}
// Have a subnormal value.
mantissa >>= -power2 + 1;
mantissa += mantissa & 1;
mantissa >>= 1;
power2 = (mantissa >= (1_u64 << F::SIG_BITS)) as i32;
return BiasedFp { m: mantissa, p_biased: power2 };
}
// Need to handle rounding ties. Normally, we need to round up,
// but if we fall right in between and we have an even basis, we
// need to round down.
if lo <= 1
&& q >= F::MIN_EXPONENT_ROUND_TO_EVEN as i64
&& q <= F::MAX_EXPONENT_ROUND_TO_EVEN as i64
&& mantissa & 0b11 == 0b01
&& (mantissa << (upperbit + 64 - F::SIG_BITS as i32 - 3)) == hi
{
// Zero the lowest bit, so we don't round up.
mantissa &= !1_u64;
}
// Round-to-even, then shift the significant digits into place.
mantissa += mantissa & 1;
mantissa >>= 1;
if mantissa >= (2_u64 << F::SIG_BITS) {
// Rounding up overflowed, so the carry bit is set. Set the
// mantissa to 1 (only the implicit, hidden bit is set) and
// increase the exponent.
mantissa = 1_u64 << F::SIG_BITS;
power2 += 1;
}
// Zero out the hidden bit.
mantissa &= !(1_u64 << F::SIG_BITS);
if power2 >= F::INFINITE_POWER {
// Exponent is above largest normal value, must be infinite.
return fp_inf;
}
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact slow-tier source body from crate/dec2flt/slow.rs:
pub(crate) fn parse_long_mantissa<F: Float>(s: &[u8]) -> BiasedFp {
const MAX_SHIFT: usize = 60;
const NUM_POWERS: usize = 19;
const POWERS: [u8; 19] =
[0, 3, 6, 9, 13, 16, 19, 23, 26, 29, 33, 36, 39, 43, 46, 49, 53, 56, 59];
let get_shift = |n| {
if n < NUM_POWERS { POWERS[n] as usize } else { MAX_SHIFT }
};
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let mut d = parse_decimal_seq(s);
// Short-circuit if the value can only be a literal 0 or infinity.
if d.num_digits == 0 || d.decimal_point < -324 {
return fp_zero;
} else if d.decimal_point >= 310 {
return fp_inf;
}
let mut exp2 = 0_i32;
let mut loop_result = None;
// Shift right toward (1/2 ... 1].
while d.decimal_point > 0 && loop_result.is_none() {
let n = d.decimal_point as usize;
let shift = get_shift(n);
d.right_shift(shift);
if d.decimal_point < -DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_zero);
} else {
exp2 += shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// Shift left toward (1/2 ... 1].
while d.decimal_point <= 0 && loop_result.is_none() {
let shift = if d.decimal_point == 0 {
match d.digits[0] {
digit if digit >= 5 => break,
0 | 1 => 2,
_ => 1,
}
} else {
get_shift((-d.decimal_point) as _)
};
d.left_shift(shift);
if d.decimal_point > DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_inf);
} else {
exp2 -= shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// We are now in the range [1/2 ... 1] but the binary format uses [1 ... 2].
exp2 -= 1;
while F::EXP_MIN > exp2 {
let mut n = (F::EXP_MIN - exp2) as usize;
if n > MAX_SHIFT {
n = MAX_SHIFT;
}
d.right_shift(n);
exp2 += n as i32;
}
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
// Shift the decimal to the hidden bit, and then round the value
// to get the high mantissa+1 bits.
d.left_shift(F::SIG_BITS as usize + 1);
let mut mantissa = d.round();
if mantissa >= (1_u64 << (F::SIG_BITS + 1)) {
// Rounding up overflowed to the carry bit, need to
// shift back to the hidden bit.
d.right_shift(1);
exp2 += 1;
mantissa = d.round();
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
}
let mut power2 = exp2 - F::EXP_MIN + 1;
if mantissa < (1_u64 << F::SIG_BITS) {
power2 -= 1;
}
// Zero out all the bits above the explicit mantissa bits.
mantissa &= (1_u64 << F::SIG_BITS) - 1;
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact final numeric-sign excerpt from crate/dec2flt/mod.rs:
let assembled_word = fp.m | ((fp.p_biased as u64) << F::SIG_BITS);
let assembly_result = biased_fp_to_float::<F>(fp);
let lexical_sign_applied = num.negative;
let result = if lexical_sign_applied {
core::ops::Neg::neg(assembly_result)
} else {
assembly_result
};
Thus a numeric execution that reaches the integer/slow selection route
assembles its selected pair with from_bits through biased_fp_to_float and only
then conditionally negates it. A successful try_fast_path returns earlier and
does not perform this assembly. compute_float and parse_long_mantissa produce
raw BiasedFp pairs and do not call from_u64, primitive float multiplication,
division, negation, or from_bits; they do, however, execute constants derived
from SIG_TOTAL_BITS before producing those pairs.
Retained structural-boundary evidence
-------------------------------------
Several adjacent structural bindings cite this same evidence record. Their
pinned library source identities are:
core/src/num/mod.rs
f0820f9dfb94999440c8cb4a349736fa21df7e5668e19b6b49e016ff67c05ce3
core/src/option.rs
7cf61204b05d98a95bc2e322d5fbfc1f4f91505109971917d9a7fb47151c50e6
core/src/slice/mod.rs
354992a6a3d69a0185eef9044a07ea5180e767bdb467aef55e69ee3d44317840
core/src/str/mod.rs
284b4c147b5d0497ce9146f6b96e564f196aed10411a62cdccf5fc5243d40f78
Exact ASCII-digit body from core/src/num/mod.rs:
pub const fn is_ascii_digit(&self) -> bool {
matches!(*self, b'0'..=b'9')
}
Exact Option control-flow bodies from core/src/option.rs:
fn branch(self) -> ControlFlow<Self::Residual, Self::Output> {
match self {
Some(v) => ControlFlow::Continue(v),
None => ControlFlow::Break(None),
}
}
fn from_residual(residual: Option<convert::Infallible>) -> Self {
match residual {
None => None,
}
}
Exact slice observation bodies from core/src/slice/mod.rs:
pub const fn first(&self) -> Option<&T> {
if let [first, ..] = self { Some(first) } else { None }
}
pub const fn split_first(&self) -> Option<(&T, &[T])> {
if let [first, tail @ ..] = self { Some((first, tail)) } else { None }
}
Exact string-byte body from core/src/str/mod.rs:
pub const fn as_bytes(&self) -> &[u8] {
// SAFETY: const sound because we transmute two types with the same layout
unsafe { mem::transmute(self) }
}
reference/model-evidence/binary64-probe.rs
#![feature(float_masks)]
use std::num::FpCategory;
fn bits(label: &str, value: f64) {
println!("{label}={:016x}", value.to_bits());
}
fn main() {
println!("target_arch={}", std::env::consts::ARCH);
println!("mantissa_digits={}", f64::MANTISSA_DIGITS);
println!("exponent_mask={:016x}", f64::EXPONENT_MASK);
println!("mantissa_mask={:016x}", f64::MANTISSA_MASK);
bits("nan", f64::NAN);
bits("infinity", f64::INFINITY);
bits("neg_infinity", f64::NEG_INFINITY);
for (label, value) in [
("nan_category", f64::NAN),
("infinity_category", f64::INFINITY),
("zero_category", 0.0),
("subnormal_category", f64::from_bits(1)),
("normal_category", 1.0),
] {
let category = match value.classify() {
FpCategory::Nan => "Nan",
FpCategory::Infinite => "Infinite",
FpCategory::Zero => "Zero",
FpCategory::Subnormal => "Subnormal",
FpCategory::Normal => "Normal",
};
println!("{label}={category}");
}
let payload_nan_word = 0x7ff0_0000_0000_0001_u64;
println!(
"from_bits_to_bits={:016x}",
f64::from_bits(payload_nan_word).to_bits()
);
bits("neg_payload_nan", -f64::from_bits(payload_nan_word));
bits("neg_zero", -0.0);
bits("subnormal_tie_to_even_zero", f64::from_bits(1) * 0.5);
bits("subnormal_tie_to_even_two", f64::from_bits(3) * 0.5);
bits("normal_division", 1.0 / 10.0);
bits("mul_negative_zero", -0.0 * 2.0);
bits("div_negative_zero", -1.0 / f64::INFINITY);
bits("div_negative_infinity", 1.0 / -0.0);
bits("mul_overflow", f64::MAX * (1.0 + f64::EPSILON));
println!("mul_zero_infinity_is_nan={}", (0.0 * f64::INFINITY).is_nan());
println!("div_zero_zero_is_nan={}", (0.0_f64 / 0.0_f64).is_nan());
println!("mul_nan_is_nan={}", (f64::NAN * 1.0).is_nan());
bits("cast_2_pow_53", (1_u64 << 53) as f64);
bits("cast_2_pow_53_plus_1", ((1_u64 << 53) + 1) as f64);
}
reference/model-evidence/setup-reproduction.txt
Fresh extraction and composition evidence for Preamble
======================================================
Scope
-----
This record was produced from the repository root on 2026-09-24. It records
the current frozen extraction configuration and a fresh execution of the
Cargo, Charon, and Aeneas stages. It is evidence about the bytes and commands
used to build the model, not evidence that any supplied GOAL is true.
Pinned configuration
--------------------
modeling-input/extraction.json contains exactly:
{
"crate": "crate",
"cargo_args": [],
"charon_args": [],
"aeneas_args": []
}
crate/Cargo.toml:5-22 names one edition-2024 library package, gives the
"default" feature an empty definition, gives "optimize_for_size" a distinct
feature, and sets overflow-checks=true in both development and release
profiles. The fresh run used the development profile. The configuration
probe below reported debug_assertions, overflow_checks, target_arch="x86_64",
target_pointer_width="64", target_env="gnu", and target_feature="sse2"; it
did not report feature="optimize_for_size". Its final Cargo line was:
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.08s
The exact probe command was:
env RUSTUP_TOOLCHAIN=nightly-2026-06-01 \
CARGO_TARGET_DIR=.trellis/scratch/preamble-cfg-target \
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/cargo \
rustc --offline \
--manifest-path .trellis/scratch/provenance-evidence-1790263924955098840/extraction/source/Cargo.toml \
--lib -- --print cfg
The materialized source used by that command is the source copy made by the
fresh extraction run described below. Relevant raw stdout was:
debug_assertions
feature="default"
overflow_checks
target_arch="x86_64"
target_endian="little"
target_env="gnu"
target_family="unix"
target_feature="sse"
target_feature="sse2"
target_feature="x87"
target_os="linux"
target_pointer_width="64"
Tool identities
---------------
These are the executable identities in modeling-input/tool-identities.json,
rechecked with sha256sum:
cargo
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/cargo
54e05dce8c9ca2f638cc3d87ec1a19425b5d0bf1f31aeb48cf4792aec5cadf27
cargo 1.98.0-nightly (fbb61be30 2026-05-26)
rustc
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
rustc 1.98.0-nightly (14210df0e 2026-05-31), LLVM 22.1.6
rustdoc
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc
2bf660d140310e28146e2c002dc6fcabd957c0a3b740be0419e6f8e5a9c87523
rustdoc 1.98.0-nightly (14210df0e 2026-05-31)
Charon
/home/leanagent/pv_spike/tools/charon/bin/charon
6490034f368ce98f3e7ae5a28bf71ed56d03bdf1e3712e71376b96fc55baeade
Charon 0.1.216, toolchain nightly-2026-06-01
Aeneas
/home/leanagent/pv_spike/tools/aeneas/bin/aeneas
9f446d2aaf59e8e705e36d05cb993f1c6ab0e97f8dc6fd2f19907a86ede30922
aeneas fa699427
Lean
/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin/lean
3e0d0d3d801675359f2d4cf9815bfdb417b20b92fdd9d48b3b14c95bbae28bbf
Lean 4.30.0-rc2, commit 3dc1a088b6d2d8eafe25a7cd7ec7b58d731bd7cc
Fresh extraction
----------------
The public reproduction command recorded by modeling-input/manifest.json is:
python3 .trellis/scripts/pv_modeling.py check-native . --fresh
For this record the same check_provenance implementation was invoked directly
so that its complete result could be retained without the CLI's bounded JSON
preview. It wrote:
.trellis/scratch/provenance-evidence-1790263924955098840/provenance.json
.trellis/scratch/provenance-evidence-1790263924955098840/extraction/observation.json
The extractor instantiated the empty argument lists above as these commands
(the output and cache paths are those beneath that scratch directory):
<cargo> check --offline
<charon> cargo --preset=aeneas --dest-file Generated/m.llbc -- --offline
<aeneas> -backend lean -dest Generated -emit-json Generated/m.llbc
The observation records exit code 0 for Cargo, Charon, and Aeneas. Cargo's raw
terminal result was:
Checking dec2flt-model v0.1.0 (.../extraction/source)
warning: feature `f16` is declared but not used
warning: `dec2flt-model` (lib) generated 1 warning
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.14s
Charon's raw terminal result was:
Compiling dec2flt-model v0.1.0 (.../extraction/source)
warning: feature `f16` is declared but not used
warning: `dec2flt-model` (lib) generated 1 warning
Finished `dev` profile [unoptimized + debuginfo] target(s) in 15.24s
Aeneas reported 203 prepasses, 50 globals, 87 opaque functions, 107
transparent functions, 49 trait declarations, and 85 trait implementations.
Its raw terminal result ended:
Generated: .../extraction/Generated/M.lean
Generated: .../extraction/Generated/translation.json
[Warn ] The crate contains extracted external, unknown definitions: ...
[Info ] Total execution time: 7.332373 seconds
The warning is the inventoried external boundary below. The fresh provenance
result had an empty error string, passed=true, no tool-identity differences,
and true values for every check, including fresh_extraction_succeeds,
fresh_model_export, crate_export, upstream_export, tool_identities_current,
bootstrap_receipt, and model_support_composition. The canonical current crate
tree digest reported by that result was:
b5ecf4d7e9dfa0337f1586ae0e865fbbe2dd384137ee6e2ad635f0d5d6e916a9
Generated bytes, placeholders, and axioms
-----------------------------------------
sha256sum gave the same digest for the fresh Generated/M.lean and the frozen
generated.lean:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692
The observation's raw-source placeholder count was 0. Compiling raw M.lean
without model support fails as diagnosed because F64 and the external boundary
are absent; four "declaration uses sorry" diagnostics are Lean error-recovery
consequences for F64-valued constants, not tokens in the generated source.
The pinned compatibility report has SHA-256
557a4924d55becf1b33d7dc7f9dfdf2b675c895ce4a9b6bee8a0622378e48d6a,
checks 2225 declarations, reports no unapproved axiom, and marks only the 64
declarations downstream of the missing boundary as pending. This is why the
24 operations below have separate authored model-support owners.
External boundary
-----------------
The exact command
python3 .trellis/scripts/pv_modeling.py inspect-native .
returned declaration_count=24 and retained the full index at
.trellis/scratch/inspect-native-1790264067166282471.json. The 24 names are:
F64.Insts.CoreCloneClone.clone
core.f64.F64.MANTISSA_DIGITS
core.f64.F64.NAN
core.f64.F64.INFINITY
core.f64.F64.NEG_INFINITY
core.f64.F64.EXPONENT_MASK
core.f64.F64.MANTISSA_MASK
core.f64.F64.classify
core.f64.F64.to_bits
core.f64.F64.from_bits
core.num.U8.is_ascii_digit
F64.Insts.CoreOpsArithMulF64F64.mul
F64.Insts.CoreOpsArithDivF64F64.div
F64.Insts.CoreOpsArithNegF64.neg
U64.Insts.CoreOpsBitBitAndU64U64.bitand
U64.Insts.CoreOpsBitBitOrU64U64.bitor
U64.Insts.CoreOpsBitShlU32U64.shl
U64.Insts.CoreOpsBitShrU32U64.shr
core.option.Option.Insts.CoreOpsTry_traitTry.branch
core.option.Option.Insts.CoreOpsTry_traitFromResidualOptionInfallible.from_residual
core.slice.Slice.first
core.slice.Slice.split_first
core.str.Str.as_bytes
F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64.from_u64
Tablet/model-support.json has exactly 24 bindings, one for each name. This
record establishes completeness of that inventory and its composition; the
semantic justification for an individual binding remains the responsibility
of that binding's paired definition node.
Composition
-----------
The exact command
python3 .trellis/scripts/pv_modeling.py compose-native . --check
returned matches=true, changed=false, no mismatched files, raw extraction hash
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692,
and both expected and actual Preamble hashes
15adb2db06b06e099d17070c2a373619ecdc481e32fc78d34054cd01fc7b492a.
The complete receipt is retained at
.trellis/scratch/compose-native-1790264071122343238.json.
reference/model-evidence/source-adaptation-delta.txt
Primary inventory and preservation analysis of the upstream-to-crate delta
============================================================================
Method and complete file inventory
----------------------------------
This record compares the supplied files in upstream/ with the frozen adapted
crate/. It treats the sources and their control flow as primary evidence; it
does not use a prior route decision as semantic proof and makes no assertion
that a supplied GOAL is true. The commands used were:
find upstream crate -type f ! -path '*/target/*' -print0 | sort -z |
xargs -0 sha256sum
for each supplied file f:
cmp -s upstream/$f crate/$f
diff -U0 upstream/$f crate/$f
The concatenated contextual diff of every supplied file has SHA-256
2eb0202ba9ae8092d6727dd2f3b824c29cb160b005960ccf2b15bfb804ed1217.
The complete inventory is:
supplied path upstream SHA-256 crate SHA-256 status
dec2flt/common.rs fc64094721ff23e08fcba013154d04dec3fe986cae5ffd73a20f86049980aace 4c4be815335a7b176527b1345e662890caa48181a0a4f814594339016cab18e changed
dec2flt/decimal.rs 3c164785e1bc3f3b48aa9c212dd6c4ab535fe828523af9fa584df4c7b1e60e0d 633658be803b7369b18feb098a8aa1b5f714a933d3b79ecbc4899a1b05f35beb changed
dec2flt/decimal_seq.rs c0c1c6028e3f57cefc3de7635a94788e9180f5ebcedc7a334ec8dbac786ec788 4aa4ecf9f31970033093d73238d4f2c72d433639bbe467c0741b185807380bd9 changed
dec2flt/fpu.rs 16cf9ec154d477ab3d4184a01fb4b9ed7c59f0228cc55589d393c40a61b19d8f 16cf9ec154d477ab3d4184a01fb4b9ed7c59f0228cc55589d393c40a61b19d8f identical
dec2flt/lemire.rs fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1 fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1 identical
dec2flt/mod.rs 7198e238c554b692405537a446b3526ad66805ec2900cd0e299f10c51402a44a b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012 changed
dec2flt/parse.rs 9daf21ab9445a84552535152f376eef8c30f3d5827296c0645f5952d3b22bbf1 50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f changed
dec2flt/slow.rs 43e7aba32d7431bbf0e1bbcb4c334eaffb23eb66891c7e45abe799c5235cc0d2 93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485 changed
dec2flt/table.rs 6eb59023784bd84cb6fb074c70da8a99bef72bc2a2ea179b0da457ca1ee00abb 6eb59023784bd84cb6fb074c70da8a99bef72bc2a2ea179b0da457ca1ee00abb identical
traits.rs 66a02c44d72dfcc3ddae7e34a290e390dabaf98c5911b283d2d97f2f0075a44e 9013270fb846edcb0bdf2abd0353f575fdd727974cba9e89bdab8bb4c2b4f0bf changed
The standalone package adds four files having no supplied counterpart:
crate/Cargo.toml 2040ce5dc92c51b5245113f97682b692b876aa57708b5c7c483425ba152943c8
crate/lib.rs 1df2b8bcb2f52068d05a6343923716d0ef4475abdef34a0de3fe7cb8dc2ba95b
crate/num/mod.rs d9ac4f964d124bd4660914dc4c80bbb14f48d7851f9a8edc71a0931e9fce37b3
crate/num/imp/mod.rs df09b97393e97b23b0a558c2fcbbf4e75dd9d68338f1e83f168bab80a37a31f1
Thus fpu.rs, lemire.rs, and the complete 671-line table.rs, including their
algorithmic constants and tables, are byte-identical. The following sections
account for every other file and every changed hunk.
Namespace and error shell
-------------------------
crate/lib.rs:1-12 is a no_std crate root that re-exports core::f64 and
core::ops and introduces the same num module path expected by the supplied
slice. crate/num/imp/mod.rs:1-10 uses path attributes to place traits.rs and
dec2flt/mod.rs at core::num::imp-like module names. These declarations add no
wrapper call or computation. crate/num/mod.rs:1 re-exports
core::num::FpCategory. crate/num/mod.rs:3-26 defines a local private
FloatErrorKind and ParseFloatError shell so the standalone package can name
the parser's error type. The pursued GOALs observe only panic versus normal
return and, on normal return, the outer Result's Ok/Err discriminant; they do
not observe the private error kind or formatting. No identity is asserted
between this local shell and an unpinned core error payload.
crate/Cargo.toml:5-22 selects the package, empty default features, and
checked-overflow profiles. The configuration and fresh build are independently
reproduced in setup-reproduction.txt.
Visibility, derives, and bounds
-------------------------------
upstream/dec2flt/mod.rs:90 versus crate/dec2flt/mod.rs:90 changes only the
visibility of the existing BiasedFp import so a goal-facing caller can name the
same type. It changes neither layout nor execution.
upstream/dec2flt/common.rs:68 and decimal.rs:28 and decimal_seq.rs:17 include
Debug derives. The corresponding crate spans common.rs:48-51,
decimal.rs:28-31, and decimal_seq.rs:17-20 remove only Debug. Copy, Clone,
PartialEq, Eq, and Default used by computation remain where present, and no
accepted observation formats these records.
upstream/traits.rs:11-52 versus crate/traits.rs:11-64 removes formatting from
Int, removes a redundant Copy supertrait from CastInto, and instantiates Int
only for u64. Every call of CastInto is through Int, which still requires
Copy; all retained concrete values are primitive Copy values. The removed
u16/u32 instances are associated only with the disabled f16/f32 formats.
upstream/traits.rs:55-76 versus crate/traits.rs:67-80 removes Add, Debug,
PartialEq, PartialOrd, Default, and Clone from Float while retaining Copy, Mul,
Div, and Neg. A search of all retained generic bodies shows no call using a
removed operation. upstream/dec2flt/decimal.rs:56-89 versus
crate/dec2flt/decimal.rs:59-111 and upstream/dec2flt/mod.rs:209-256 versus
crate/dec2flt/mod.rs:352-520 add direct Div, Mul, and Neg bounds already implied
by Lemire -> Float, and replace operator notation with calls to those same
traits. Rust desugars the original /, *, and unary - to these trait calls, so
the operands, call order, result, and admitted f64 specialization are unchanged.
Exact constants, tables, and specialized decoding
-------------------------------------------------
The source formulae and decimal-literal table were evaluated directly by the
pinned rustc using the retained source
reference/model-evidence/adaptation-constants-probe.rs. The command was:
R=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
P=reference/model-evidence/adaptation-constants-probe.rs
B=.trellis/scratch/adaptation-constants-probe
"$R" --edition 2024 --target x86_64-unknown-linux-gnu -C opt-level=0 "$P" -o "$B"
sha256sum "$P" "$B"
"$B"
The source hash was
b5a4a2cba0c08053cb9a816adb1ba5dbd160bf3928bdf5ccf56b7ae83aaa2aa5
and the resulting executable hash was
b02d2f6deb675f17d0dbdc22e57a67d7692689f7a2b0d7b125556c35c4b8a4a5.
Raw output was:
largest_power_of_ten=308
max_exponent_fast_path=22
max_exponent_disguised=37
neg_nan=fff8000000000000
pow10_0=3ff0000000000000
pow10_1=4024000000000000
pow10_2=4059000000000000
pow10_3=408f400000000000
pow10_4=40c3880000000000
pow10_5=40f86a0000000000
pow10_6=412e848000000000
pow10_7=416312d000000000
pow10_8=4197d78400000000
pow10_9=41cdcd6500000000
pow10_10=4202a05f20000000
pow10_11=42374876e8000000
pow10_12=426d1a94a2000000
pow10_13=42a2309ce5400000
pow10_14=42d6bcc41e900000
pow10_15=430c6bf526340000
pow10_16=4341c37937e08000
pow10_17=4376345785d8a000
pow10_18=43abc16d674ec800
pow10_19=43e158e460913d00
pow10_20=4415af1d78b58c40
pow10_21=444b1ae4d6e2ef50
pow10_22=4480f0cf064dd592
upstream/traits.rs:134-137 computes LARGEST_POWER_OF_TEN through a Float
default, and upstream/traits.rs:175-193 gives the generic integer_decode and
the helper used by that constant. crate/traits.rs:146 makes the constant an
associated requirement; crate/traits.rs:309-359 supplies the retained f64
values and decoder after substituting BITS=64, SIG_BITS=52, EXP_BIAS=1023,
EXPONENT_MASK, MANTISSA_MASK, and the u64 operations. Each source expression
then becomes exactly the corresponding crate expression: sign is bits>>63,
exponent is (bits & mask)>>52 cast to i16, the subnormal mantissa is shifted
once, the normal mantissa receives 1<<52, and 1023+52 is subtracted. The
resulting tuple and every bit operation are unchanged. The probe output above
shows that the computed f64 LARGEST_POWER_OF_TEN is 308 and that the source
-f64::NAN word is fff8000000000000, exactly crate/traits.rs:315-327; the
independent binary64-boundary.txt record fixes the masks and primitive bit
semantics used by the decoder.
upstream/dec2flt/mod.rs:118-129 gives the two Lemire default formulae.
crate/dec2flt/mod.rs:115-128 makes them associated requirements, and the
retained f64 instance at crate/dec2flt/mod.rs:217-220 supplies 22 and 37, the
integer results of the two source formulae for 53 significand bits.
upstream/dec2flt/mod.rs:176-181 indexes a 32-entry f64 table with exponent&31.
crate/dec2flt/mod.rs:222-251 performs the same masked selection using from_bits:
cases 0 through 22 are the exact pinned binary64 words printed above for 1e0 through 1e22 and
all other cases return positive zero, as did entries 23 through 31. The full
word list and the pinned float semantics are recorded in binary64-boundary.txt.
The analogous f16/f32 replacements at crate/dec2flt/mod.rs:145-215 and
crate/traits.rs:187-307 lie under cfg(any()) and cannot enter this build.
Whole-function from_u64 opacity
-------------------------------
upstream/dec2flt/mod.rs:184-188 and crate/dec2flt/mod.rs:254-263 have the same
f64 body: the same enabled debug_assert that v <= 1<<53, followed by the same
primitive `v as f64` cast. The sole semantic-boundary annotation is
#[charon::opaque] at crate line 259, syntactically attached to the function
item. It therefore hides the entire from_u64 body from translation: neither
the debug assertion nor the cast is transparent in the extraction. The
callers, their guards, and the surrounding native-path computation remain
transparent. The fresh external inventory contains the whole method as the
single external F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64.from_u64. Its
separately reviewed ModelF64FromU64 binding supplies exactly successful integer
conversion for v <= 2^53 and assertion failure otherwise.
Digit scans, slice patterns, and helper extraction
-------------------------------------------------
upstream/dec2flt/common.rs:14-53 supplies ByteSlice::parse_digits: repeatedly
split_first, wrapping-subtract ASCII zero, invoke the closure exactly when the
result is below 10, consume that byte, and stop at the first other byte.
crate/dec2flt/common.rs:11-36 removes only this method. Its complete set of
uses is replaced as follows.
* upstream/dec2flt/parse.rs:31-48 versus crate/dec2flt/parse.rs:31-58 keeps the
eight-byte loop, wrapping multiply/add, and then performs the same digit test,
accumulator update, and one-byte progress with an index. The local rename
num to chunk is lexical only.
* upstream/dec2flt/parse.rs:83-97 versus crate/dec2flt/parse.rs:131-153 expands
matches!/parse_digits into the same nonempty first-digit guard, the same
0x10000 bounded exponent update, the same first-nondigit suffix, and the same
final sign. The bound is tested before each checked multiply and addition,
exactly as in the closure.
* upstream/dec2flt/decimal_seq.rs:220-295 versus
crate/dec2flt/decimal_seq.rs:231-359 extracts parse_digits_into_seq,
parse_decimal_exponent, and count_trailing_zeros. The digit helpers use the
same wrapping byte test, forward order, try_add_digit state transition, and
0x10000 exponent guard. The reverse helper visits indices consumed_len-1
down to zero, increments only for ASCII zero, ignores a decimal point, and
stops at the first other byte, exactly the original iter().rev() loop.
In all these replacements, indexing occurs only under count<len or !is_empty,
so it has the same bounds as split_first. Slicing advances by exactly the same
one or eight bytes. No wrapping operation is replaced by checked arithmetic,
and no checked source operation is replaced by wrapping arithmetic.
upstream/dec2flt/parse.rs:155-181 versus crate/dec2flt/parse.rs:82-119 and
212-226 moves two loops into adjust_many_digit_count and parse_many_digits.
The prefix helper visits the same start bytes in the same order, performs the
same saturating_sub and checked isize subtraction, and stops on the same byte.
The retry helper makes the same first 19-digit call, tests the same threshold,
makes the same one-byte rebase and second call in the alternate branch,
computes the same offset with the same sign, casts it to i64, and performs the
same checked addition of exp_number last. Thus any large-input panic is
preserved rather than excluded.
upstream/dec2flt/decimal_seq.rs:226-295 versus
crate/dec2flt/decimal_seq.rs:284-359 replaces literal split_first patterns by
nonempty index tests. The leading-zero scans, optional decimal point, optional
exponent marker, optional exponent sign, and suffixes occur in the same order.
The crate's exp_sign*exp_num equals the source choice between exp_num and
-exp_num because exp_num is bounded by the unchanged 0x10000 guard; the final
decimal_point checked addition is in the same position. Casts of lengths to
i32 and every subsequent checked update remain unchanged, including their
large-input behavior.
Delayed returns
---------------
upstream/dec2flt/decimal_seq.rs:173-198 versus
crate/dec2flt/decimal_seq.rs:176-203 replaces one return inside right_shift's
loop by all_zero=true, exits because !all_zero is the loop guard, and returns
immediately afterward. No decimal_point, digit, index, or arithmetic update
occurs between the original and delayed return.
upstream/dec2flt/slow.rs:46-76 versus crate/dec2flt/slow.rs:46-94 replaces two
nested-loop returns by loop_result. In the zero branch it records fp_zero,
skips the source-skipped exp2 addition, exits through is_none(), and returns.
In the infinity branch it records fp_inf, skips the source-skipped exp2
subtraction, exits, and returns. On all other iterations it performs the same
shift, checked state changes, and exponent update. Lines 95-126 after these
returns are otherwise the source lines 77-110 unchanged.
Dispatcher trace and public projection
--------------------------------------
upstream/dec2flt/mod.rs:209-256 is the whole original dispatcher.
crate/dec2flt/mod.rs:285-349 declares trace data only, lines 352-505 execute the
instrumented dispatcher, and lines 507-520 define public dec2flt as its first
projection. Comparing the bodies gives the following branch-by-branch
correspondence.
* Both call as_bytes, inspect the first byte, reject empty input before a helper,
remove at most one sign, and reject a sign-only body. The trace stores the
already obtained body and Boolean sign.
* Both call parse_number first on that exact body. Only None calls
parse_inf_nan on the same body and sign. Its Some is returned directly and
its None returns invalid. The trace stores those existing Option values.
* Both overwrite only Decimal.negative, test the same compile-time
!optimize_for_size condition, call try_fast_path once, and return its Some
directly. The trace stores the copied Decimal and Option; Decimal is Copy.
* Both call compute_float first with num.exponent and num.mantissa. The crate's
second_compute_guard is exactly the first two conjuncts of the source
short-circuit. Therefore the checked mantissa+1 and second compute_float call
occur under precisely the source guard, in the same order. The same pair
comparison either retains fp or changes only p_biased to -1.
* Both test the post-comparison p_biased<0 once, call parse_long_mantissa on the
unchanged body exactly when true, and otherwise retain the same pair. The
trace records both guard and result without another helper call.
* The extra assembled_word expression is the same cast, shift, and OR performed
by biased_fp_to_float at upstream lines 202-206 and crate lines 278-282; these
integer operations neither panic nor mutate fp. Both then call assembly once
on the selected pair and apply unary negation exactly when num.negative.
Public dec2flt returns the identical Result first component.
Consequently the trace does not infer uncomputed data: it records the exact
variant; sign-stripped body and sign; numeric/special Options; fast-path input
and result; first and conditional second integer operands and results;
comparison, forced-deferral and post-comparison pair; slow guard and result;
selected pair; assembled word; pre-sign assembly word; sign-application fact;
and final word. Special and native direct returns create no selected pair.
All source call order, guards, checked arithmetic, mutable-state transitions,
panic points, and returned Result/F64 observations remain in place.
F64-only restriction
--------------------
crate/traits.rs:187-307 and crate/dec2flt/mod.rs:140-215 add cfg(any()) to the
f16/f32 Float, FloatExt, and Lemire implementations. crate/traits.rs:59-64
retains only u64 Int. The retained f64 implementations are
crate/traits.rs:309-360 and crate/dec2flt/mod.rs:217-264. Every goal-facing
function remains generic in the source and extraction, but each pursued source
subject specializes it to f64, whose associated integer is u64. There is no
dynamic format dispatch, so removing other impl blocks cannot change an f64
call, its native decision, checks, result word, NaN classification, fields, or
trace. The fresh boundary inventory in setup-reproduction.txt confirms that
no removed-format external remains.
Conclusion
----------
The inventory is exhaustive: three supplied files are identical, seven have
all hunks classified above, and the four added files are the package shell.
For the configured f64 specialization, the adapted crate has the same input
domains, branch order, guards, checked/wrapping distinction, state transitions,
panic versus normal behavior, and public/helper observations as the supplied
source. The only new observations are the trace fields, each copied from an
existing value or computed by the same pure assembly expression. This
conclusion is independent of whether any parser-correctness GOAL is true.
reference/model-evidence/source-valid-byte-slice.txt
Source-valid byte-slice domain evidence
Pinned toolchain commands, run from the repository root:
rustc --version --verbose
rustc --print cfg | rg 'target_(arch|pointer_width)'
rustc .trellis/scratch/source_valid_slice_probe.rs -o /tmp/source_valid_slice_probe
/tmp/source_valid_slice_probe
Raw configuration and probe output:
rustc 1.98.0-nightly (14210df0e 2026-05-31)
host: x86_64-unknown-linux-gnu
target_arch="x86_64"
target_pointer_width="64"
arch=x86_64
usize_bits=64
isize_max=9223372036854775807
u8_size=1
Pinned core-library source:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:801
states that a slice is never larger than isize::MAX bytes.
The same toolchain's core/src/num/int_macros.rs:47 defines a signed
integer's MAX as the corresponding unsigned MAX shifted right by one.
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/mod.rs:507-510
requires the contents of a str to remain valid UTF-8 and states that using a
str whose contents are not valid UTF-8 is undefined behavior.
Consequently, on the configured 64-bit target a &[u8] has at most
9223372036854775807 elements. This is a byte-count condition only: &[u8]
does not impose UTF-8 validity or restrict the values of its u8 elements.
A Rust str has the same inherent byte-length bound and additionally consists
of valid UTF-8 bytes.
Upstream → extraction-crate adaptation diff
--- upstream/dec2flt/parse.rs
+++ crate/dec2flt/parse.rs
@@ -31,18 +31,28 @@
// may cause overflows, to be handled later
while s.len() >= 8 {
- let num = s.read_u64();
- if is_8digits(num) {
- x = x.wrapping_mul(1_0000_0000).wrapping_add(parse_8digits(num));
+ // `chunk` is the source's local `num` under a nonconflicting name.
+ // The rename has no Rust effect and prevents the Lean backend from
+ // resolving `num.imp...` as a field projection on this local value.
+ let chunk = s.read_u64();
+ if is_8digits(chunk) {
+ x = x.wrapping_mul(1_0000_0000).wrapping_add(parse_8digits(chunk));
s = &s[8..];
} else {
break;
}
}
- s = s.parse_digits(|digit| {
+ // This is the removed `ByteSlice::parse_digits` call specialized to its
+ // only parser use: identical wrapping digit classification, accumulator
+ // update, and first-nondigit stop, without an unsupported closure state.
+ let mut count = 0;
+ while count < s.len() && s[count].wrapping_sub(b'0') < 10 {
+ let digit = s[count].wrapping_sub(b'0');
x = x.wrapping_mul(10).wrapping_add(digit as _);
- });
+ count += 1;
+ }
+ s = &s[count..];
(s, x)
}
@@ -69,6 +79,44 @@
*s_ref = s;
}
+// This is the source prefix scan isolated from `parse_partial_number` because
+// Aeneas cannot join its loop context while the enclosing function's other
+// slice borrows are live. It visits the same bytes, in order, and performs
+// the identical checked `isize` subtraction for every leading dot or zero.
+fn adjust_many_digit_count(start: &[u8], mut n_digits: isize) -> isize {
+ let mut scan_index = 0;
+ let mut scanning = true;
+ while scan_index < start.len() && scanning {
+ let c = start[scan_index];
+ if c == b'.' || c == b'0' {
+ n_digits -= c.saturating_sub(b'0' - 1) as isize;
+ scan_index += 1;
+ } else {
+ scanning = false;
+ }
+ }
+ n_digits
+}
+
+// This is the source many-digit retry as a transparent helper. Isolating its
+// rebased slices avoids an Aeneas context-join failure; both calls, the branch,
+// the offset arithmetic, and the explicit-exponent addition are unchanged.
+fn parse_many_digits(start: &[u8], int_end: &[u8], exp_number: i64) -> (u64, i64) {
+ let mut mantissa = 0;
+ let mut s = start;
+ try_parse_19digits(&mut s, &mut mantissa);
+ let mut exponent = if mantissa >= MIN_19DIGIT_INT {
+ int_end.offset_from(s)
+ } else {
+ s = &s[1..];
+ let before = s;
+ try_parse_19digits(&mut s, &mut mantissa);
+ -s.offset_from(before)
+ } as i64;
+ exponent += exp_number;
+ (mantissa, exponent)
+}
+
/// Parse the scientific notation component of a float.
fn parse_scientific(s_ref: &mut &[u8]) -> Option<i64> {
let mut exponent = 0i64;
@@ -83,13 +131,22 @@
}
}
- if matches!(s.first(), Some(&x) if x.is_ascii_digit()) {
- *s_ref = s.parse_digits(|digit| {
- // no overflows here, saturate well before overflow
+ // `matches!` with a guarded slice pattern triggers an Aeneas internal
+ // error. This short-circuit test reads the same first byte exactly when
+ // it exists and therefore preserves both acceptance and evaluation order.
+ if !s.is_empty() && s[0].is_ascii_digit() {
+ // Specialized form of the source digit callback. `count` advances
+ // exactly once per accepted byte and the bound keeps every checked
+ // exponent operation in the same safe range as the source.
+ let mut count = 0;
+ while count < s.len() && s[count].wrapping_sub(b'0') < 10 {
+ let digit = s[count].wrapping_sub(b'0');
if exponent < 0x10000 {
exponent = 10 * exponent + digit as i64;
}
- });
+ count += 1;
+ }
+ *s_ref = &s[count..];
if negative { Some(-exponent) } else { Some(exponent) }
} else {
*s_ref = s;
@@ -152,32 +209,17 @@
n_digits -= 19;
let mut many_digits = false;
- let mut p = start;
- while let Some((&c, p_next)) = p.split_first() {
- if c == b'.' || c == b'0' {
- n_digits -= c.saturating_sub(b'0' - 1) as isize;
- p = p_next;
- } else {
- break;
- }
- }
+ // The indexed loop is equivalent to the source `while let split_first`:
+ // it tests nonemptiness before the same byte read and consumes one byte
+ // only on the two source continuation cases. This avoids Aeneas's loop
+ // context mismatch without changing checked subtraction or slice bounds.
+ n_digits = adjust_many_digit_count(start, n_digits);
if n_digits > 0 {
// at this point we have more than 19 significant digits, let's try again
many_digits = true;
- mantissa = 0;
- let mut s = start;
- try_parse_19digits(&mut s, &mut mantissa);
- exponent = if mantissa >= MIN_19DIGIT_INT {
- // big int
- int_end.offset_from(s)
- } else {
- s = &s[1..];
- let before = s;
- try_parse_19digits(&mut s, &mut mantissa);
- -s.offset_from(before)
- } as i64;
- // add back the explicit part
- exponent += exp_number;
+ let retried = parse_many_digits(start, int_end, exp_number);
+ mantissa = retried.0;
+ exponent = retried.1;
}
Some((Decimal { exponent, mantissa, negative: false, many_digits }, len))
Record details
| Kind | source adaptation site (file-level diff) |
|---|
Captured evidence identities
[
{
"path": "extraction-evidence/COMMAND.json",
"sha256": "611f36cefb2d895e7b22bd15eaccc1bd57d1b539d54cbd6337e84d0573719a9e",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "extraction-evidence/DETERMINISM.json",
"sha256": "360301745fc66c713335320b2e6a57ef7fb71e390cc7db31a6316a3902f7ef8f",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "extraction-evidence/RESULT.json",
"sha256": "62a89492b5592f404e065d2f8c9a89fd3f83cc59b772fed0eaa475138211d641",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "extraction-evidence/STDERR.bin",
"sha256": "ab4dc202d7a8a30a83ea62ed154710a48148d62230ff8b834700919d4e679c0c",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "extraction-evidence/STDOUT.bin",
"sha256": "604aae51d5c3394417224f655c7de355cc3e699d31fff49f93734706ad43f3f8",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "reference/model-evidence/adaptation-constants-probe.rs",
"sha256": "b5a4a2cba0c08053cb9a816adb1ba5dbd160bf3928bdf5ccf56b7ae83aaa2aa5",
"cited_by": [
"reference/model-evidence/source-adaptation-delta.txt"
]
},
{
"path": "reference/model-evidence/binary64-boundary.txt",
"sha256": "a17d82e7f789ce7f1fbb3922a66ec8806999e526532d637605263882d37b7abf",
"cited_by": [
"shared extraction boundary: Tablet/Preamble.tex",
"reference/model-evidence/source-adaptation-delta.txt"
]
},
{
"path": "reference/model-evidence/binary64-probe.rs",
"sha256": "68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e",
"cited_by": [
"reference/model-evidence/binary64-boundary.txt"
]
},
{
"path": "reference/model-evidence/setup-reproduction.txt",
"sha256": "f97c87d1af65130560f67d2bfcd737106b191c8fce1ed0174569ee218c4ee8d7",
"cited_by": [
"shared extraction boundary: Tablet/Preamble.tex",
"reference/model-evidence/source-adaptation-delta.txt"
]
},
{
"path": "reference/model-evidence/source-adaptation-delta.txt",
"sha256": "5502c71eb4420211d20bd8b6aade171c56cc2dce11d758a73bb93ef1083634ad",
"cited_by": [
"shared extraction boundary: Tablet/Preamble.tex"
]
},
{
"path": "reference/model-evidence/source-valid-byte-slice.txt",
"sha256": "e7887429c66a303cbba3b4df30080ddd9ba4d54e24f25f74947deb228b32b04f",
"cited_by": [
"shared extraction boundary: Tablet/Preamble.tex"
]
}
]crate/dec2flt/slow.rs
Historical preparation document: preparation source-adaptation audit. It describes the state and obligations at preparation. This generation is captured in Modeling. Later closure and review results appear in the proof and modeling views. This original document remains available as history.
Shared extraction-boundary explanation (Preamble)
Preservation argument
Claim
x86_64-unknown-linux-gnu, the library's empty default feature set
(so optimize_for_size is disabled), the unoptimized development
profile, enabled debug assertions and integer overflow checks, and the target's
SSE2 precision-setting branch. Interpret each of the frozen extraction's 24
external operations by the separately justified model-support definition that
owns that operation. Under those interpretations, the composed Aeneas model
represents the supplied source's f64 specialization on all of these
domains, without a correctness premise: every Rust str whose bytes
are valid UTF-8 and whose 64-bit slice length is at most
\mathtt{isize::MAX}=2^{63}-1; every Rust &[u8] whose length is at
most that bound, with arbitrary byte contents; every Decimal; every
i64/u64 pair; and every BiasedFp.dec2flt::<f64> the relation preserves panic versus normal return,
the outer returned Result's Ok/Err discriminant,
and, on success, the exact binary64 word and its NaN classification. For
parse_number it preserves panic versus normal return, the
Option discriminant, and all four returned Decimal fields.
For parse_inf_nan::<f64> and
Decimal::try_fast_path::<f64> it preserves panic versus normal
return, None versus Some, and every returned word and NaN
classification. For compute_float::<f64> and
parse_long_mantissa::<f64> it preserves panic versus normal return
and both fields of every returned BiasedFp. For
biased_fp_to_float::<f64> it preserves panic versus normal return
and the exact returned word, with no restriction on the pair fields.dec2flt_with_trace::<f64> it additionally preserves the public
result and the complete trace: its control-flow variant; sign-stripped body and
lexical sign; numeric and special helper results; signed native input and
native result; first integer operands and result; second-call guard, optional
operands and result, comparison and forced-deferral fact; post-comparison pair;
slow-path guard and optional result; selected pair; assembled unsigned word;
pre-sign assembly result; sign-application fact; and final word. Public
dec2flt::<f64> is exactly the first projection of that interface, and
direct special and native returns select no raw pair.Proof
generated.lean, with SHA-256
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692.
The raw source has no placeholder. The compatibility check reports no
unapproved axiom and isolates exactly 24 external declarations; the complete
inventory equals the 24 entries of Tablet/model-support.json.
compose-native --check reports an unchanged composition and equal
expected and actual Preamble hashes. Thus all transparent extracted
declarations come from this one pinned source and every nontransparent
operation is explicit. The premise assigning each external its owning
definition deliberately leaves that definition's primitive-semantics proof to
its own preservation record; no primitive binding is re-proved here.fpu.rs, lemire.rs, and table.rs are
byte-identical. The standalone namespace and local error shell introduce no
call. The GOALs observe only panic versus normal return and the outer
Ok/Err discriminant, so the shell's private kind and
formatting are unobserved; no identity with an unpinned core error payload is
asserted. Visibility and removed Debug derives do not affect values.
The retained generic bodies use none of the removed trait operations;
the direct Mul, Div, and Neg clauses and calls are
the operations already implied by Lemire. Only the u64
integer instance and f64 Float, FloatExt, and
Lemire instances can participate in an f64 execution, so
disabling the u16/u32 and f16/f32
instances changes no such call.f64/u64 field widths and
masks; the fast-path bounds are the source formula results; and the match over
power-of-ten words has the same masked index and exact words as the source
array. The toolchain-specific words, masks, classifications, casts, and
rounding behavior are independently pinned in
reference/model-evidence/binary64-boundary.txt. The frozen
from_u64 Rust body is the enabled assertion followed by the
u64 as f64 conversion. Because #[charon::opaque] applies to
the whole function, neither operation inside that body is transparent in the
extraction: the whole method is the single inventoried external. Its callers,
their guards, and the surrounding native computation remain transparent.
ModelF64FromU64 supplies exactly successful integer conversion for
v\leq2^{53} and assertion failure otherwise.split_first loops. Extracted helpers receive the same
slices and mutable values, visit bytes in the same forward or reverse order,
and retain every saturating, wrapping, and checked operation. Delayed returns
set a result flag, execute no intervening state update, leave the loop through
that flag, and immediately return the source value. In particular, casts and
length-derived additions on very large inputs keep their original panic or
normal behavior rather than acquiring a convenience size bound.None, overwrite only the parsed sign, try the enabled native
path, make the first integer call, and evaluate the checked
mantissa+1 and second call under exactly the source short-circuit
guard. Both force the same deferral on unequal pairs, call the slow helper on
the unchanged body exactly for a negative post-comparison exponent, assemble
the same selected pair, and apply the sign last. Every trace field is either
one of those already computed values or the same nonmutating cast/shift/OR word
used by assembly. Hence recording the trace and discarding it in the public
projection changes neither call order, guards, state, panic points, nor any
returned observation.isize::MAX, while a Rust string adds UTF-8 validity. Sub-slicing
preserves the length bound and need not preserve an independent string type.
These facts establish all domains and observations in the claim independently
of the truth or falsity of any GOAL.Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
extraction-evidence/COMMAND.json
{"declaration_reader_sha256":"76f60cf0b867fad9727d2256d32b306c8cba3725216a4225d0f83add77fd6158","extraction_provenance":{"extraction_toolchain":{"aeneas":"fa699427","aeneas_revision":"fa699427cdfa8f604b891fb0223ef42883dd7dc4","cargo_features":[{"features":["default"],"name":"dec2flt-model","source":"workspace:Cargo.toml","version":"0.1.0"}],"cargo_lock_sha256":"bc644c624ded89197356bbd65d995054b7fb08e5bdfbaa38c6e7c7a53772cecf","cfg":["debug_assertions","emscripten_wasm_eh","feature=\"default\"","fmt_debug=\"full\"","overflow_checks","panic=\"unwind\"","relocation_model=\"pic\"","target_abi=\"\"","target_arch=\"x86_64\"","target_endian=\"little\"","target_env=\"gnu\"","target_family=\"unix\"","target_feature=\"fxsr\"","target_feature=\"sse\"","target_feature=\"sse2\"","target_feature=\"x87\"","target_has_atomic","target_has_atomic=\"16\"","target_has_atomic=\"32\"","target_has_atomic=\"64\"","target_has_atomic=\"8\"","target_has_atomic=\"ptr\"","target_has_atomic_load_store","target_has_atomic_load_store=\"16\"","target_has_atomic_load_store=\"32\"","target_has_atomic_load_store=\"64\"","target_has_atomic_load_store=\"8\"","target_has_atomic_load_store=\"ptr\"","target_has_atomic_primitive_alignment=\"16\"","target_has_atomic_primitive_alignment=\"32\"","target_has_atomic_primitive_alignment=\"64\"","target_has_atomic_primitive_alignment=\"8\"","target_has_atomic_primitive_alignment=\"ptr\"","target_has_reliable_f128","target_has_reliable_f16","target_has_reliable_f16_math","target_object_format=\"elf\"","target_os=\"linux\"","target_pointer_width=\"64\"","target_thread_local","target_vendor=\"unknown\"","ub_checks","unix"],"charon":"0.1.216","charon_revision":"6f058254eb741c12e9b388df07adaf7cc8aac8ed","extraction_profile":"dev","lean":"4.30.0-rc2","overflow_checks":true,"panic_strategy":"unwind","rustc_vv":"rustc 1.98.0-nightly (14210df0e 2026-05-31)\nbinary: rustc\ncommit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65\ncommit-date: 2026-05-31\nhost: x86_64-unknown-linux-gnu\nrelease: 1.98.0-nightly\nLLVM version: 22.1.6\n","target_pointer_width":64,"target_triple":"x86_64-unknown-linux-gnu"},"extractor_stack":["charon@0.1.216","aeneas@fa699427"],"extractor_toolchain_sha256":"18657da0659dee7889ed8a937b136c9abbc3a35e9050241cd8201c94fd232323","not_recorded":[],"source_digests":[{"source_file":"lib.rs","source_sha256":"b5ecf4d7e9dfa0337f1586ae0e865fbbe2dd384137ee6e2ad635f0d5d6e916a9"}]},"extractor_script_path":"/home/leanagent/pv_runs/trellis-native-implementation-v85/scripts/extract_pv_model.py","extractor_script_sha256":"cc1fdd50a78185c7bb564b715c554cb35d9fc09ed566b6c3d4f482f2d27ef67d","kernel_gate_checkers":[],"log_concatenation_order":"runs_then_steps_in_array_order","runs":[{"run_role":"primary","steps":[{"argv":["/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","-vV"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"rustc-version","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"},{"argv":["/home/leanagent/pv_spike/tools/charon/bin/charon","cargo","--preset=aeneas","--dest-file","/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/m.llbc","--","--offline","--profile","dev","--target","x86_64-unknown-linux-gnu"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_BUILD_TARGET":"x86_64-unknown-linux-gnu","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"charon","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"},{"argv":["/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/cargo","metadata","--format-version=1","--locked","--offline","--filter-platform","x86_64-unknown-linux-gnu"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_BUILD_TARGET":"x86_64-unknown-linux-gnu","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"cargo-metadata","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"},{"argv":["/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/cargo","rustc","--lib","--locked","--offline","--profile","dev","--target","x86_64-unknown-linux-gnu","--","--print","cfg"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_BUILD_TARGET":"x86_64-unknown-linux-gnu","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"cargo-rustc-cfg","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"},{"argv":["/home/leanagent/pv_spike/tools/aeneas/bin/aeneas","-backend","lean","-dest","/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen","-emit-json","/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/m.llbc"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_BUILD_TARGET":"x86_64-unknown-linux-gnu","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"aeneas","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"}]}],"schema":"trellis-extraction-command/v1","tool_source_checkouts":[]}extraction-evidence/DETERMINISM.json
{"comparison":"generated_lean_and_complete_tablet_tree_byte_identity","generated_lean_byte_identical":false,"generated_lean_sha256":["49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692"],"kernel_filespec_gate":"not_run","kernel_prescribed_region_gate":"not_run","namespace_context_roundtrip_gate":"not_run","result_sha256":"62a89492b5592f404e065d2f8c9a89fd3f83cc59b772fed0eaa475138211d641","run_roles":["primary"],"schema":"trellis-extraction-determinism/v2","status":"not_run","tablet_root_sha256":["57e6ec9f6e8b1d9d78ab01504bad58f93cb43308edf77f73f86b986b8d07b809"],"tablet_tree_byte_identical":false}extraction-evidence/RESULT.json
{"command_sha256":"611f36cefb2d895e7b22bd15eaccc1bd57d1b539d54cbd6337e84d0573719a9e","runs":[{"generated_lean_sha256":"49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692","run_role":"primary","steps":[{"exit_status":0,"stderr_byte_length":0,"stderr_offset":0,"stderr_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","stdout_byte_length":212,"stdout_offset":0,"stdout_sha256":"e6ea0da4a3301256a0a0dc0d67d11acf4e83e0d1bff5dd987ccdaa43708714bc","tool":"rustc-version"},{"exit_status":0,"stderr_byte_length":654,"stderr_offset":0,"stderr_sha256":"263937c29ffcb9cf54e452b2d8b89e015a1fa1a5b2a2d237292d4350d0b04aed","stdout_byte_length":0,"stdout_offset":212,"stdout_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","tool":"charon"},{"exit_status":0,"stderr_byte_length":0,"stderr_offset":654,"stderr_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","stdout_byte_length":2897,"stdout_offset":212,"stdout_sha256":"ec87d2fc78972115c1b9e436f373a890f3847397a741d91d720dce4fb36c7a90","tool":"cargo-metadata"},{"exit_status":0,"stderr_byte_length":302,"stderr_offset":654,"stderr_sha256":"7025c1726c90c35a211042d6945c25ff6015acaca27ee97a063465221b792806","stdout_byte_length":1062,"stdout_offset":3109,"stdout_sha256":"4081a320e6292139b4a673d225682dc054b77cba113b8c8a8fbb0593f824b713","tool":"cargo-rustc-cfg"},{"exit_status":0,"stderr_byte_length":7084,"stderr_offset":956,"stderr_sha256":"5f41394d8b12a0d7a6c9e7115108a06b20599eb7ddd611cff4b90b31ba2fe26a","stdout_byte_length":933,"stdout_offset":4171,"stdout_sha256":"376c43fb83e40962a056e9198dba4afb0cf8ecb0238e76c78bd9dbc32fbced4a","tool":"aeneas"}],"tablet_root_sha256":"57e6ec9f6e8b1d9d78ab01504bad58f93cb43308edf77f73f86b986b8d07b809"}],"schema":"trellis-extraction-result/v2","stderr_byte_length":8040,"stderr_sha256":"ab4dc202d7a8a30a83ea62ed154710a48148d62230ff8b834700919d4e679c0c","stdout_byte_length":5104,"stdout_sha256":"604aae51d5c3394417224f655c7de355cc3e699d31fff49f93734706ad43f3f8"}extraction-evidence/STDERR.bin
Compiling dec2flt-model v0.1.0 (/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate)
warning: feature `f16` is declared but not used
--> lib.rs:2:46
|
2 | #![feature(cfg_target_has_reliable_f16_f128, f16, float_masks, register_tool, staged_api)]
| ^^^
|
= note: `#[warn(unused_features)]` (part of `#[warn(unused)]`) on by default
warning: `dec2flt-model` (lib) generated 1 warning
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.41s
Compiling dec2flt-model v0.1.0 (/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.02s
[?25lApplied prepasses: [------------------------------------------------] 0/203 ⠋
Applied prepasses: [------------------------------------------------] 1/203 ⠋
Applied prepasses: [#####-------------------------------------------] 24/203 ⠋
Applied prepasses: [########----------------------------------------] 38/203 ⠋
Applied prepasses: [##############################------------------] 128/203 ⠙
Applied prepasses: [################################################] 203/203 ✔️
[?25h[?25lTranslated globals: [-------------------------------------------------] 0/50 ⠋
Translated globals: [#################################################] 50/50 ✔️
[?25h[?25lTranslated opaque functions: [----------------------------------------] 0/87 ⠋
Translated opaque functions: [########################################] 87/87 ✔️
[?25h[?25lTranslated transparent functions: [---------------------------------] 0/107 ⠋
Translated transparent functions: [---------------------------------] 1/107 ⠋
Translated transparent functions: [###------------------------------] 10/107 ⠙
Translated transparent functions: [######---------------------------] 22/107 ⠹
Translated transparent functions: [##########-----------------------] 35/107 ⠹
Translated transparent functions: [##############-------------------] 47/107 ⠹
Translated transparent functions: [###############------------------] 51/107 ⠸
Translated transparent functions: [################-----------------] 55/107 ⠸
Translated transparent functions: [##################---------------] 60/107 ⠼
Translated transparent functions: [##################---------------] 61/107 ⠼
Translated transparent functions: [###################--------------] 64/107 ⠼
Translated transparent functions: [####################-------------] 68/107 ⠼
Translated transparent functions: [#####################------------] 69/107 ⠴
Translated transparent functions: [#####################------------] 70/107 ⠴
Translated transparent functions: [######################-----------] 72/107 ⠦
Translated transparent functions: [######################-----------] 73/107 ⠦
Translated transparent functions: [######################-----------] 74/107 ⠧
Translated transparent functions: [#######################----------] 77/107 ⠧
Translated transparent functions: [########################---------] 78/107 ⠧
Translated transparent functions: [########################---------] 80/107 ⠇
Translated transparent functions: [#########################--------] 83/107 ⠇
Translated transparent functions: [#########################--------] 84/107 ⠇
Translated transparent functions: [##########################-------] 85/107 ⠏
Translated transparent functions: [##########################-------] 86/107 ⠏
Translated transparent functions: [##########################-------] 87/107 ⠋
Translated transparent functions: [###########################------] 88/107 ⠋
Translated transparent functions: [###########################------] 90/107 ⠋
Translated transparent functions: [############################-----] 91/107 ⠙
Translated transparent functions: [############################-----] 92/107 ⠙
Translated transparent functions: [############################-----] 93/107 ⠙
Translated transparent functions: [#############################----] 95/107 ⠹
Translated transparent functions: [#############################----] 97/107 ⠹
Translated transparent functions: [##############################---] 98/107 ⠸
Translated transparent functions: [##############################---] 99/107 ⠼
Translated transparent functions: [###############################--] 101/107 ⠼
Translated transparent functions: [###############################--] 102/107 ⠴
Translated transparent functions: [###############################--] 103/107 ⠦
Translated transparent functions: [################################-] 104/107 ⠦
Translated transparent functions: [################################-] 105/107 ⠧
Translated transparent functions: [################################-] 106/107 ⠇
Translated transparent functions: [#################################] 107/107 ⠏
Translated transparent functions: [#################################] 107/107 ✔️
[?25h[?25lTranslated trait declarations: [--------------------------------------] 0/49 ⠋
Translated trait declarations: [########################--------------] 31/49 ✔️
[?25h[?25lTranslated trait impls: [---------------------------------------------] 0/85 ⠋
Translated trait impls: [#################################------------] 64/85 ✔️
[?25h[?25lPost-processed translated opaque functions: [-------------------------] 0/87 ⠋
Post-processed translated opaque functions: [-------------------------] 1/87 ⠙
Post-processed translated opaque functions: [#########################] 87/87 ✔️
[?25h[?25lPost-processed translated transparent functions: [------------------] 0/107 ⠋
Post-processed translated transparent functions: [------------------] 1/107 ⠋
Post-processed translated transparent functions: [#-----------------] 10/107 ⠙
Post-processed translated transparent functions: [##----------------] 13/107 ⠹
Post-processed translated transparent functions: [##----------------] 16/107 ⠸
Post-processed translated transparent functions: [##----------------] 17/107 ⠸
Post-processed translated transparent functions: [###---------------] 18/107 ⠼
Post-processed translated transparent functions: [###---------------] 22/107 ⠼
Post-processed translated transparent functions: [####--------------] 24/107 ⠼
Post-processed translated transparent functions: [####--------------] 29/107 ⠴
Post-processed translated transparent functions: [#####-------------] 31/107 ⠴
Post-processed translated transparent functions: [#####-------------] 33/107 ⠴
Post-processed translated transparent functions: [######------------] 39/107 ⠴
Post-processed translated transparent functions: [########----------] 48/107 ⠦
Post-processed translated transparent functions: [#########---------] 56/107 ⠦
Post-processed translated transparent functions: [##########--------] 62/107 ⠦
Post-processed translated transparent functions: [###############---] 94/107 ⠦
Post-processed translated transparent functions: [################--] 99/107 ⠧
Post-processed translated transparent functions: [################--] 100/107 ⠇
Post-processed translated transparent functions: [#################-] 102/107 ⠇
Post-processed translated transparent functions: [#################-] 104/107 ⠏
Post-processed translated transparent functions: [#################-] 105/107 ⠋
Post-processed translated transparent functions: [##################] 107/107 ⠙
Post-processed translated transparent functions: [##################] 107/107 ✔️
[?25hextraction-evidence/STDOUT.bin
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
{"packages":[{"name":"dec2flt-model","version":"0.1.0","id":"path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0","license":null,"license_file":null,"description":null,"source":null,"dependencies":[],"targets":[{"kind":["lib"],"crate_types":["lib"],"name":"dec2flt_model","src_path":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate/lib.rs","edition":"2024","doc":true,"doctest":true,"test":true}],"features":{"default":[],"optimize_for_size":[]},"manifest_path":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate/Cargo.toml","metadata":null,"publish":[],"authors":[],"categories":[],"keywords":[],"readme":null,"repository":null,"homepage":null,"documentation":null,"edition":"2024","links":null,"default_run":null,"rust_version":null}],"workspace_members":["path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0"],"workspace_default_members":["path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0"],"resolve":{"nodes":[{"id":"path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0","dependencies":[],"deps":[],"features":["default"]}],"root":"path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0"},"target_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","build_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","version":1,"workspace_root":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate","metadata":null}
debug_assertions
emscripten_wasm_eh
feature="default"
fmt_debug="full"
overflow_checks
panic="unwind"
relocation_model="pic"
target_abi=""
target_arch="x86_64"
target_endian="little"
target_env="gnu"
target_family="unix"
target_feature="fxsr"
target_feature="sse"
target_feature="sse2"
target_feature="x87"
target_has_atomic
target_has_atomic="16"
target_has_atomic="32"
target_has_atomic="64"
target_has_atomic="8"
target_has_atomic="ptr"
target_has_atomic_load_store
target_has_atomic_load_store="16"
target_has_atomic_load_store="32"
target_has_atomic_load_store="64"
target_has_atomic_load_store="8"
target_has_atomic_load_store="ptr"
target_has_atomic_primitive_alignment="16"
target_has_atomic_primitive_alignment="32"
target_has_atomic_primitive_alignment="64"
target_has_atomic_primitive_alignment="8"
target_has_atomic_primitive_alignment="ptr"
target_has_reliable_f128
target_has_reliable_f16
target_has_reliable_f16_math
target_object_format="elf"
target_os="linux"
target_pointer_width="64"
target_thread_local
target_vendor="unknown"
ub_checks
unix
[[92mInfo[39m ] Imported: /home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/m.llbc
[[92mInfo[39m ] Generated: /home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/M.lean
[[92mInfo[39m ] Generated: /home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/translation.json
[[93mWarn[39m ] The crate contains extracted external, unknown definitions: we advise using the option -split-files to allow manually providing these definitions in separate files.
[[92mInfo[39m ] Total execution time: 7.245881 seconds
reference/model-evidence/adaptation-constants-probe.rs
fn main() {
let largest_power_of_ten = (1024_f64 / std::f64::consts::LOG2_10) as i32;
let log2_5 = std::f64::consts::LOG2_10 - 1.0;
let max_exponent_fast_path = (53_f64 / log2_5) as i64;
let max_exponent_disguised =
max_exponent_fast_path + (53_f64 / std::f64::consts::LOG2_10) as i64;
println!("largest_power_of_ten={largest_power_of_ten}");
println!("max_exponent_fast_path={max_exponent_fast_path}");
println!("max_exponent_disguised={max_exponent_disguised}");
println!("neg_nan={:016x}", (-f64::NAN).to_bits());
for (exponent, value) in IntoIterator::into_iter([
1e0_f64, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11,
1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, 1e20, 1e21, 1e22,
])
.enumerate()
{
println!("pow10_{exponent}={:016x}", value.to_bits());
}
}
reference/model-evidence/binary64-boundary.txt
Primary evidence for the binary64 boundary
==========================================
Scope and identities
--------------------
This record concerns the frozen x86_64-unknown-linux-gnu extraction, the
adapted Rust crate retained in this repository, and the installed toolchain
named by modeling-input/SETUP.md. The probe source is retained at
reference/model-evidence/binary64-probe.rs; no scratch source is required to
reproduce it.
Toolchain executable:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
Target:
x86_64-unknown-linux-gnu
rustc executable SHA-256:
162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
Probe source SHA-256:
68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
Compiled probe SHA-256:
f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
Frozen generated.lean SHA-256:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692
Frozen modeling-input/manifest.json SHA-256:
2fc182c0c7acccad30c449ca349b999759b84e8ed4ec9d590e8295e43eeec077
Approved Binary64ModelDefault.lean SHA-256 at the time of this record:
03ae48fb631e6242bd21bf95d0481b66acae05f8cab343c7ab279b3c116538a3
Exact reproduction commands
---------------------------
Run from the repository root:
R=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
P=reference/model-evidence/binary64-probe.rs
B=.trellis/scratch/binary64-probe
"$R" --version --verbose
sha256sum "$R"
sha256sum "$P"
"$R" --target x86_64-unknown-linux-gnu -C opt-level=0 "$P" -o "$B"
sha256sum "$B"
"$B"
Raw output
----------
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
rustc_sha256=162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
probe_sha256=68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
binary_sha256=f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
target_arch=x86_64
mantissa_digits=53
exponent_mask=7ff0000000000000
mantissa_mask=000fffffffffffff
nan=7ff8000000000000
infinity=7ff0000000000000
neg_infinity=fff0000000000000
nan_category=Nan
infinity_category=Infinite
zero_category=Zero
subnormal_category=Subnormal
normal_category=Normal
from_bits_to_bits=7ff0000000000001
neg_payload_nan=fff0000000000001
neg_zero=8000000000000000
subnormal_tie_to_even_zero=0000000000000000
subnormal_tie_to_even_two=0000000000000002
normal_division=3fb999999999999a
mul_negative_zero=8000000000000000
div_negative_zero=8000000000000000
div_negative_infinity=fff0000000000000
mul_overflow=7ff0000000000000
mul_zero_infinity_is_nan=true
div_zero_zero_is_nan=true
mul_nan_is_nan=true
cast_2_pow_53=4340000000000000
cast_2_pow_53_plus_1=4340000000000000
Pinned Rust library sources
---------------------------
The installed sources below belong to the same named toolchain. Their
SHA-256 identities are:
core/src/primitive_docs.rs
c4b8627dd67d5dac8f383f383a9e7ff1229ea43e7599610fc61988694cf0f3e5
core/src/num/f64.rs
84540a6a59e347c63caabe12cf895ba1239c76a50682471567007138fac1c618
core/src/clone.rs
23f9cfc80347fde6b8457d46fbf7a2b8d9f34c8c58601b0b6f714ca2f6d1976b
The exact relevant text of core/src/primitive_docs.rs is:
#[rustc_doc_primitive = "f64"]
#[doc(alias = "double")]
/// A 64-bit floating-point type (specifically, the "binary64" type defined in IEEE 754-2008).
///
/// This type is very similar to [`prim@f32`], but has increased precision by using twice as many
/// bits. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on double-precision
/// values][wikipedia] for more information.
The referenced primitive-f32 documentation supplies the common primitive
floating-point operation rules quoted next:
/// - −0.0: IEEE 754 floating-point numbers have a bit that indicates their sign, so −0.0 is a
/// possible value. For comparison −0.0 = +0.0, but floating-point operations can carry
/// the sign bit through arithmetic operations. This means −0.0 × +0.0 produces −0.0 and
/// a negative number rounded to a value smaller than a float can represent also produces −0.0.
/// - [∞](#associatedconstant.INFINITY) and
/// [−∞](#associatedconstant.NEG_INFINITY): these result from calculations
/// like `1.0 / 0.0`.
///
/// When a primitive operation (addition, subtraction, multiplication, or
/// division) is performed on this type, the result is rounded according to the
/// roundTiesToEven direction defined in IEEE 754-2008. That means:
///
/// - The result is the representable value closest to the true value, if there
/// is a unique closest representable value.
/// - If the true value is exactly half-way between two representable values,
/// the result is the one with an even least-significant binary digit.
/// - If the true value's magnitude is ≥ `f32::MAX` + 2<sup>(`f32::MAX_EXP` −
/// `f32::MANTISSA_DIGITS` − 1)</sup>, the result is ∞ or −∞ (preserving the
/// true value's sign).
The same file explicitly separates arithmetic NaN choice from exact bitwise
operations; its exact relevant text is:
/// The rules for NaN values differ between *arithmetic* and *non-arithmetic* (or "bitwise")
/// operations. The non-arithmetic operations are unary `-`, `abs`, `copysign`, `signum`,
/// `{to,from}_bits`, `{to,from}_{be,le,ne}_bytes` and `is_sign_{positive,negative}`. These
/// operations are guaranteed to exactly preserve the bit pattern of their input except for possibly
/// changing the sign bit.
///
/// The following rules apply when a NaN value is returned from an arithmetic operation:
/// - The result has a non-deterministic sign.
/// - The quiet bit and payload are non-deterministically chosen from
/// the following set of options:
///
/// - **Preferred NaN**: The quiet bit is set and the payload is all-zero.
/// - **Quieting NaN propagation**: The quiet bit is set and the payload is copied from any input
/// operand that is a NaN. If the inputs and outputs do not have the same payload size (i.e., for
/// `as` casts), then
/// - If the output is smaller than the input, low-order bits of the payload get dropped.
/// - If the output is larger than the input, the payload gets filled up with 0s in the low-order
/// bits.
/// - **Unchanged NaN propagation**: The quiet bit and payload are copied from any input operand
/// that is a NaN. If the inputs and outputs do not have the same size (i.e., for `as` casts), the
/// same rules as for "quieting NaN propagation" apply, with one caveat: if the output is smaller
/// than the input, dropping the low-order bits may result in a payload of 0; a payload of 0 is not
/// possible with a signaling NaN (the all-0 significand encodes an infinity) so unchanged NaN
/// propagation cannot occur with some inputs.
/// - **Target-specific NaN**: The quiet bit is set and the payload is picked from a target-specific
/// set of "extra" possible NaN payloads. The set can depend on the input operand values.
/// See the table below for the concrete NaNs this set contains on various targets.
///
/// | `target_arch` | Extra payloads possible on this platform |
/// |---------------|------------------------------------------|
/// | `aarch64`, `arm`, `arm64ec`, `loongarch64`, `powerpc` (except when `target_abi = "spe"`), `powerpc64`, `riscv32`, `riscv64`, `s390x`, `x86`, `x86_64` | None |
Thus the model's preferred quiet NaN is one permitted result whenever
multiplication or division returns NaN. This does not claim that arbitrary
Rust arithmetic NaNs have those exact bits. By contrast, unary negation and
bit conversion must preserve all non-sign bits exactly, including for every
NaN payload.
The exact relevant declarations in core/src/num/f64.rs are:
pub const MANTISSA_DIGITS: u32 = 53;
pub const NAN: f64 = 0.0_f64 / 0.0_f64;
pub const INFINITY: f64 = 1.0_f64 / 0.0_f64;
pub const NEG_INFINITY: f64 = -1.0_f64 / 0.0_f64;
pub const SIGN_MASK: u64 = 0x8000_0000_0000_0000;
pub const EXPONENT_MASK: u64 = 0x7ff0_0000_0000_0000;
pub const MANTISSA_MASK: u64 = 0x000f_ffff_ffff_ffff;
pub const fn classify(self) -> FpCategory {
// We used to have complicated logic here that avoids the simple bit-based tests to work
// around buggy codegen for x87 targets (see
// https://github.com/rust-lang/rust/issues/114479). However, some LLVM versions later, none
// of our tests is able to find any difference between the complicated and the naive
// version, so now we are back to the naive version.
let b = self.to_bits();
match (b & Self::MANTISSA_MASK, b & Self::EXPONENT_MASK) {
(0, Self::EXPONENT_MASK) => FpCategory::Infinite,
(_, Self::EXPONENT_MASK) => FpCategory::Nan,
(0, 0) => FpCategory::Zero,
(_, 0) => FpCategory::Subnormal,
_ => FpCategory::Normal,
}
}
pub const fn to_bits(self) -> u64 {
// SAFETY: `u64` is a plain old datatype so we can always transmute to it.
unsafe { mem::transmute(self) }
}
pub const fn from_bits(v: u64) -> Self {
// It turns out the safety issues with sNaN were overblown! Hooray!
// SAFETY: `u64` is a plain old datatype so we can always transmute from it.
unsafe { mem::transmute(v) }
}
The exact scalar clone body in core/src/clone.rs is:
impl const Clone for $t {
#[inline(always)]
fn clone(&self) -> Self {
*self
}
}
Frozen adapted source
---------------------
The relevant retained source file hashes are:
crate/traits.rs
9013270fb846edcb0bdf2abd0353f575fdd727974cba9e89bdab8bb4c2b4f0bf
crate/dec2flt/mod.rs
b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012
crate/dec2flt/parse.rs
50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f
crate/dec2flt/decimal.rs
633658be803b7369b18feb098a8aa1b5f714a933d3b79ecbc4899a1b05f35beb
crate/dec2flt/lemire.rs
fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1
crate/dec2flt/slow.rs
93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485
Exact constant and bit-conversion excerpt from crate/traits.rs:
impl Float for f64 {
type Int = u64;
const INFINITY: Self = Self::INFINITY;
const NEG_INFINITY: Self = Self::NEG_INFINITY;
const NAN: Self = Self::NAN;
// Bit-identical to the upstream `-f64::NAN`, without the unsupported
// compile-time float negation.
const NEG_NAN: Self = f64::from_bits(0xFFF8_0000_0000_0000);
const BITS: u32 = 64;
const SIG_TOTAL_BITS: u32 = Self::MANTISSA_DIGITS;
const EXP_MASK: Self::Int = Self::EXPONENT_MASK;
const SIG_MASK: Self::Int = Self::MANTISSA_MASK;
fn to_bits(self) -> Self::Int {
self.to_bits()
}
fn classify(self) -> FpCategory {
self.classify()
}
}
impl FloatExt for f64 {
#[inline]
fn from_u64_bits(v: u64) -> Self {
f64::from_bits(v)
}
Exact derived-constant defaults from crate/traits.rs:
/// The number of bits in the significand, *excluding* the hidden bit.
const SIG_BITS: u32 = Self::SIG_TOTAL_BITS - 1;
/// Number of bits in the exponent.
const EXP_BITS: u32 = Self::BITS - Self::SIG_BITS - 1;
/// The saturated (maximum bitpattern) value of the exponent, i.e. the infinite
/// representation.
///
/// This shifted fully right, use `EXP_MASK` for the shifted value.
const EXP_SAT: u32 = (1 << Self::EXP_BITS) - 1;
/// Signed version of `EXP_SAT` since we convert a lot.
const INFINITE_POWER: i32 = Self::EXP_SAT as i32;
/// The exponent bias value. This is also the maximum value of the exponent.
const EXP_BIAS: u32 = Self::EXP_SAT >> 1;
/// Minimum exponent value of normal values.
const EXP_MIN: i32 = -(Self::EXP_BIAS as i32 - 1);
Together with the f64-instance lines `BITS = 64` and
`SIG_TOTAL_BITS = Self::MANTISSA_DIGITS` in the preceding excerpt, these
defaults derive SIG_BITS, EXP_MIN, and INFINITE_POWER from the primitive
mantissa-digit constant rather than introducing independent parameters.
Exact checked cast excerpt from crate/dec2flt/mod.rs:
#[inline]
// This method is precisely the source `u64 as f64` primitive conversion.
// Aeneas cannot translate that cast; opacity is confined to the cast while
// the fast-path algorithm, its range proof obligation, and all calls stay
// visible in the extracted model.
#[charon::opaque]
fn from_u64(v: u64) -> Self {
debug_assert!(v <= Self::MAX_MANTISSA_FAST_PATH);
v as _
}
Here MAX_MANTISSA_FAST_PATH is the retained default 1 << 53. Therefore the
source succeeds only through the modeled branch v <= 2^53 in this debug
configuration; above it the debug assertion fails before the cast. On the
successful branch every integer is exactly representable, so the source cast
and the model rounder return the same word.
Exact power-table and assembly excerpts from crate/dec2flt/mod.rs:
/// Maximum mantissa for the fast-path (`1 << 53` for f64).
const MAX_MANTISSA_FAST_PATH: u64 = 1 << Self::SIG_TOTAL_BITS;
const MAX_EXPONENT_FAST_PATH: i64 = 22;
const MIN_EXPONENT_FAST_PATH: i64 = -Self::MAX_EXPONENT_FAST_PATH;
const MAX_EXPONENT_DISGUISED_FAST_PATH: i64 = 37;
fn pow10_fast_path(exponent: usize) -> Self {
// These bit patterns are exactly the source table's rounded binary64
// literals. The match is the same masked lookup; it merely keeps float
// constants out of Aeneas's unsupported constant interpreter.
match exponent & 31 {
0 => f64::from_bits(0x3FF0_0000_0000_0000),
1 => f64::from_bits(0x4024_0000_0000_0000),
2 => f64::from_bits(0x4059_0000_0000_0000),
3 => f64::from_bits(0x408F_4000_0000_0000),
4 => f64::from_bits(0x40C3_8800_0000_0000),
5 => f64::from_bits(0x40F8_6A00_0000_0000),
6 => f64::from_bits(0x412E_8480_0000_0000),
7 => f64::from_bits(0x4163_12D0_0000_0000),
8 => f64::from_bits(0x4197_D784_0000_0000),
9 => f64::from_bits(0x41CD_CD65_0000_0000),
10 => f64::from_bits(0x4202_A05F_2000_0000),
11 => f64::from_bits(0x4237_4876_E800_0000),
12 => f64::from_bits(0x426D_1A94_A200_0000),
13 => f64::from_bits(0x42A2_309C_E540_0000),
14 => f64::from_bits(0x42D6_BCC4_1E90_0000),
15 => f64::from_bits(0x430C_6BF5_2634_0000),
16 => f64::from_bits(0x4341_C379_37E0_8000),
17 => f64::from_bits(0x4376_3457_85D8_A000),
18 => f64::from_bits(0x43AB_C16D_674E_C800),
19 => f64::from_bits(0x43E1_58E4_6091_3D00),
20 => f64::from_bits(0x4415_AF1D_78B5_8C40),
21 => f64::from_bits(0x444B_1AE4_D6E2_EF50),
22 => f64::from_bits(0x4480_F0CF_064D_D592),
_ => f64::from_bits(0),
}
}
fn biased_fp_to_float<F: FloatExt>(x: BiasedFp) -> F {
let mut word = x.m;
word |= (x.p_biased as u64) << F::SIG_BITS;
F::from_u64_bits(word)
}
Exact native-call excerpt from crate/dec2flt/decimal.rs:
fn can_use_fast_path<F: Lemire>(&self) -> bool {
F::MIN_EXPONENT_FAST_PATH <= self.exponent
&& self.exponent <= F::MAX_EXPONENT_DISGUISED_FAST_PATH
&& self.mantissa <= F::MAX_MANTISSA_FAST_PATH
&& !self.many_digits
}
if !self.can_use_fast_path::<F>() {
return None;
}
let value = if self.exponent <= F::MAX_EXPONENT_FAST_PATH {
// normal fast path
let value = F::from_u64(self.mantissa);
if self.exponent < 0 {
// Explicit trait calls preserve Rust arithmetic and resolve
// the generic output type that Charon leaves ambiguous.
core::ops::Div::div(value, F::pow10_fast_path((-self.exponent) as _))
} else {
core::ops::Mul::mul(value, F::pow10_fast_path(self.exponent as _))
}
} else {
// disguised fast path
let shift = self.exponent - F::MAX_EXPONENT_FAST_PATH;
let mantissa = self.mantissa.checked_mul(INT_POW10[shift as usize])?;
if mantissa > F::MAX_MANTISSA_FAST_PATH {
return None;
}
core::ops::Mul::mul(
F::from_u64(mantissa),
F::pow10_fast_path(F::MAX_EXPONENT_FAST_PATH as _),
)
};
if self.negative {
Some(core::ops::Neg::neg(value))
} else {
Some(value)
}
The preceding can_use_fast_path body, together with
MAX_MANTISSA_FAST_PATH = 1 << SIG_TOTAL_BITS and SIG_TOTAL_BITS = 53 for f64,
requires the exponent to lie between -22 and 37, the input mantissa to be at
most 2^53, and many_digits to be false. Consequently an ordinary arithmetic
call has a from_u64 operand in 0..=2^53. In its negative-exponent arm,
`-self.exponent` lies in 1..=22; in its nonnegative arm, `self.exponent` lies
in 0..=22. The disguised branch checks its multiplied mantissa against 2^53
before from_u64 and uses table index 22. The paired statement
Binary64NativeCallDomain does not assert this source reachability. It says
conditionally that a from_u64 argument at most 2^53 succeeds with a finite,
non-NaN word and that a table index at most 22 succeeds with a positive,
nonzero, finite, non-NaN word. Applying that conditional statement to the
guards just derived establishes those properties for the actual ordinary and
disguised calls, and in particular establishes that every executed divisor is
nonzero.
Exact special-value excerpt from crate/dec2flt/parse.rs:
let float = match (register, len) {
(INF_3, 3) => F::INFINITY,
(INF_8, 8) => F::INFINITY,
(NAN, 3) => F::NAN,
_ => return None,
};
if negative { Some(-float) } else { Some(float) }
Thus the executed special route is INFINITY or NAN followed by conditional
negation; it does not select NEG_INFINITY or NEG_NAN directly.
The number helper has the exact source body
pub fn parse_number(s: &[u8]) -> Option<Decimal> {
if let Some((float, rest)) = parse_partial_number(s) {
if rest == s.len() {
return Some(float);
}
}
None
}
It returns only the Decimal produced by parse_partial_number; there is no
float type parameter or float operation at this boundary.
The integer-tier helper has the source type and exact executable excerpts
below (long explanatory comments are elided). In particular it returns a raw
BiasedFp and contains no from_u64 cast, primitive float multiplication,
division, negation, or from_bits call:
pub fn compute_float<F: Float>(q: i64, mut w: u64) -> BiasedFp {
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let fp_error = BiasedFp::zero_pow2(-1);
// Short-circuit if the value can only be a literal 0 or infinity.
if w == 0 || q < F::SMALLEST_POWER_OF_TEN as i64 {
return fp_zero;
} else if q > F::LARGEST_POWER_OF_TEN as i64 {
return fp_inf;
}
// Normalize our significant digits, so the most-significant bit is set.
let lz = w.leading_zeros();
w <<= lz;
let (lo, hi) = compute_product_approx(q, w, F::SIG_BITS as usize + 3);
if lo == 0xFFFF_FFFF_FFFF_FFFF {
let inside_safe_exponent = (q >= -27) && (q <= 55);
if !inside_safe_exponent {
return fp_error;
}
}
let upperbit = (hi >> 63) as i32;
let mut mantissa = hi >> (upperbit + 64 - F::SIG_BITS as i32 - 3);
let mut power2 = power(q as i32) + upperbit - lz as i32 - F::EXP_MIN + 1;
if power2 <= 0 {
if -power2 + 1 >= 64 {
// Have more than 64 bits below the minimum exponent, must be 0.
return fp_zero;
}
// Have a subnormal value.
mantissa >>= -power2 + 1;
mantissa += mantissa & 1;
mantissa >>= 1;
power2 = (mantissa >= (1_u64 << F::SIG_BITS)) as i32;
return BiasedFp { m: mantissa, p_biased: power2 };
}
// Need to handle rounding ties. Normally, we need to round up,
// but if we fall right in between and we have an even basis, we
// need to round down.
if lo <= 1
&& q >= F::MIN_EXPONENT_ROUND_TO_EVEN as i64
&& q <= F::MAX_EXPONENT_ROUND_TO_EVEN as i64
&& mantissa & 0b11 == 0b01
&& (mantissa << (upperbit + 64 - F::SIG_BITS as i32 - 3)) == hi
{
// Zero the lowest bit, so we don't round up.
mantissa &= !1_u64;
}
// Round-to-even, then shift the significant digits into place.
mantissa += mantissa & 1;
mantissa >>= 1;
if mantissa >= (2_u64 << F::SIG_BITS) {
// Rounding up overflowed, so the carry bit is set. Set the
// mantissa to 1 (only the implicit, hidden bit is set) and
// increase the exponent.
mantissa = 1_u64 << F::SIG_BITS;
power2 += 1;
}
// Zero out the hidden bit.
mantissa &= !(1_u64 << F::SIG_BITS);
if power2 >= F::INFINITE_POWER {
// Exponent is above largest normal value, must be infinite.
return fp_inf;
}
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact slow-tier source body from crate/dec2flt/slow.rs:
pub(crate) fn parse_long_mantissa<F: Float>(s: &[u8]) -> BiasedFp {
const MAX_SHIFT: usize = 60;
const NUM_POWERS: usize = 19;
const POWERS: [u8; 19] =
[0, 3, 6, 9, 13, 16, 19, 23, 26, 29, 33, 36, 39, 43, 46, 49, 53, 56, 59];
let get_shift = |n| {
if n < NUM_POWERS { POWERS[n] as usize } else { MAX_SHIFT }
};
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let mut d = parse_decimal_seq(s);
// Short-circuit if the value can only be a literal 0 or infinity.
if d.num_digits == 0 || d.decimal_point < -324 {
return fp_zero;
} else if d.decimal_point >= 310 {
return fp_inf;
}
let mut exp2 = 0_i32;
let mut loop_result = None;
// Shift right toward (1/2 ... 1].
while d.decimal_point > 0 && loop_result.is_none() {
let n = d.decimal_point as usize;
let shift = get_shift(n);
d.right_shift(shift);
if d.decimal_point < -DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_zero);
} else {
exp2 += shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// Shift left toward (1/2 ... 1].
while d.decimal_point <= 0 && loop_result.is_none() {
let shift = if d.decimal_point == 0 {
match d.digits[0] {
digit if digit >= 5 => break,
0 | 1 => 2,
_ => 1,
}
} else {
get_shift((-d.decimal_point) as _)
};
d.left_shift(shift);
if d.decimal_point > DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_inf);
} else {
exp2 -= shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// We are now in the range [1/2 ... 1] but the binary format uses [1 ... 2].
exp2 -= 1;
while F::EXP_MIN > exp2 {
let mut n = (F::EXP_MIN - exp2) as usize;
if n > MAX_SHIFT {
n = MAX_SHIFT;
}
d.right_shift(n);
exp2 += n as i32;
}
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
// Shift the decimal to the hidden bit, and then round the value
// to get the high mantissa+1 bits.
d.left_shift(F::SIG_BITS as usize + 1);
let mut mantissa = d.round();
if mantissa >= (1_u64 << (F::SIG_BITS + 1)) {
// Rounding up overflowed to the carry bit, need to
// shift back to the hidden bit.
d.right_shift(1);
exp2 += 1;
mantissa = d.round();
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
}
let mut power2 = exp2 - F::EXP_MIN + 1;
if mantissa < (1_u64 << F::SIG_BITS) {
power2 -= 1;
}
// Zero out all the bits above the explicit mantissa bits.
mantissa &= (1_u64 << F::SIG_BITS) - 1;
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact final numeric-sign excerpt from crate/dec2flt/mod.rs:
let assembled_word = fp.m | ((fp.p_biased as u64) << F::SIG_BITS);
let assembly_result = biased_fp_to_float::<F>(fp);
let lexical_sign_applied = num.negative;
let result = if lexical_sign_applied {
core::ops::Neg::neg(assembly_result)
} else {
assembly_result
};
Thus a numeric execution that reaches the integer/slow selection route
assembles its selected pair with from_bits through biased_fp_to_float and only
then conditionally negates it. A successful try_fast_path returns earlier and
does not perform this assembly. compute_float and parse_long_mantissa produce
raw BiasedFp pairs and do not call from_u64, primitive float multiplication,
division, negation, or from_bits; they do, however, execute constants derived
from SIG_TOTAL_BITS before producing those pairs.
Retained structural-boundary evidence
-------------------------------------
Several adjacent structural bindings cite this same evidence record. Their
pinned library source identities are:
core/src/num/mod.rs
f0820f9dfb94999440c8cb4a349736fa21df7e5668e19b6b49e016ff67c05ce3
core/src/option.rs
7cf61204b05d98a95bc2e322d5fbfc1f4f91505109971917d9a7fb47151c50e6
core/src/slice/mod.rs
354992a6a3d69a0185eef9044a07ea5180e767bdb467aef55e69ee3d44317840
core/src/str/mod.rs
284b4c147b5d0497ce9146f6b96e564f196aed10411a62cdccf5fc5243d40f78
Exact ASCII-digit body from core/src/num/mod.rs:
pub const fn is_ascii_digit(&self) -> bool {
matches!(*self, b'0'..=b'9')
}
Exact Option control-flow bodies from core/src/option.rs:
fn branch(self) -> ControlFlow<Self::Residual, Self::Output> {
match self {
Some(v) => ControlFlow::Continue(v),
None => ControlFlow::Break(None),
}
}
fn from_residual(residual: Option<convert::Infallible>) -> Self {
match residual {
None => None,
}
}
Exact slice observation bodies from core/src/slice/mod.rs:
pub const fn first(&self) -> Option<&T> {
if let [first, ..] = self { Some(first) } else { None }
}
pub const fn split_first(&self) -> Option<(&T, &[T])> {
if let [first, tail @ ..] = self { Some((first, tail)) } else { None }
}
Exact string-byte body from core/src/str/mod.rs:
pub const fn as_bytes(&self) -> &[u8] {
// SAFETY: const sound because we transmute two types with the same layout
unsafe { mem::transmute(self) }
}
reference/model-evidence/binary64-probe.rs
#![feature(float_masks)]
use std::num::FpCategory;
fn bits(label: &str, value: f64) {
println!("{label}={:016x}", value.to_bits());
}
fn main() {
println!("target_arch={}", std::env::consts::ARCH);
println!("mantissa_digits={}", f64::MANTISSA_DIGITS);
println!("exponent_mask={:016x}", f64::EXPONENT_MASK);
println!("mantissa_mask={:016x}", f64::MANTISSA_MASK);
bits("nan", f64::NAN);
bits("infinity", f64::INFINITY);
bits("neg_infinity", f64::NEG_INFINITY);
for (label, value) in [
("nan_category", f64::NAN),
("infinity_category", f64::INFINITY),
("zero_category", 0.0),
("subnormal_category", f64::from_bits(1)),
("normal_category", 1.0),
] {
let category = match value.classify() {
FpCategory::Nan => "Nan",
FpCategory::Infinite => "Infinite",
FpCategory::Zero => "Zero",
FpCategory::Subnormal => "Subnormal",
FpCategory::Normal => "Normal",
};
println!("{label}={category}");
}
let payload_nan_word = 0x7ff0_0000_0000_0001_u64;
println!(
"from_bits_to_bits={:016x}",
f64::from_bits(payload_nan_word).to_bits()
);
bits("neg_payload_nan", -f64::from_bits(payload_nan_word));
bits("neg_zero", -0.0);
bits("subnormal_tie_to_even_zero", f64::from_bits(1) * 0.5);
bits("subnormal_tie_to_even_two", f64::from_bits(3) * 0.5);
bits("normal_division", 1.0 / 10.0);
bits("mul_negative_zero", -0.0 * 2.0);
bits("div_negative_zero", -1.0 / f64::INFINITY);
bits("div_negative_infinity", 1.0 / -0.0);
bits("mul_overflow", f64::MAX * (1.0 + f64::EPSILON));
println!("mul_zero_infinity_is_nan={}", (0.0 * f64::INFINITY).is_nan());
println!("div_zero_zero_is_nan={}", (0.0_f64 / 0.0_f64).is_nan());
println!("mul_nan_is_nan={}", (f64::NAN * 1.0).is_nan());
bits("cast_2_pow_53", (1_u64 << 53) as f64);
bits("cast_2_pow_53_plus_1", ((1_u64 << 53) + 1) as f64);
}
reference/model-evidence/setup-reproduction.txt
Fresh extraction and composition evidence for Preamble
======================================================
Scope
-----
This record was produced from the repository root on 2026-09-24. It records
the current frozen extraction configuration and a fresh execution of the
Cargo, Charon, and Aeneas stages. It is evidence about the bytes and commands
used to build the model, not evidence that any supplied GOAL is true.
Pinned configuration
--------------------
modeling-input/extraction.json contains exactly:
{
"crate": "crate",
"cargo_args": [],
"charon_args": [],
"aeneas_args": []
}
crate/Cargo.toml:5-22 names one edition-2024 library package, gives the
"default" feature an empty definition, gives "optimize_for_size" a distinct
feature, and sets overflow-checks=true in both development and release
profiles. The fresh run used the development profile. The configuration
probe below reported debug_assertions, overflow_checks, target_arch="x86_64",
target_pointer_width="64", target_env="gnu", and target_feature="sse2"; it
did not report feature="optimize_for_size". Its final Cargo line was:
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.08s
The exact probe command was:
env RUSTUP_TOOLCHAIN=nightly-2026-06-01 \
CARGO_TARGET_DIR=.trellis/scratch/preamble-cfg-target \
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/cargo \
rustc --offline \
--manifest-path .trellis/scratch/provenance-evidence-1790263924955098840/extraction/source/Cargo.toml \
--lib -- --print cfg
The materialized source used by that command is the source copy made by the
fresh extraction run described below. Relevant raw stdout was:
debug_assertions
feature="default"
overflow_checks
target_arch="x86_64"
target_endian="little"
target_env="gnu"
target_family="unix"
target_feature="sse"
target_feature="sse2"
target_feature="x87"
target_os="linux"
target_pointer_width="64"
Tool identities
---------------
These are the executable identities in modeling-input/tool-identities.json,
rechecked with sha256sum:
cargo
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/cargo
54e05dce8c9ca2f638cc3d87ec1a19425b5d0bf1f31aeb48cf4792aec5cadf27
cargo 1.98.0-nightly (fbb61be30 2026-05-26)
rustc
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
rustc 1.98.0-nightly (14210df0e 2026-05-31), LLVM 22.1.6
rustdoc
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc
2bf660d140310e28146e2c002dc6fcabd957c0a3b740be0419e6f8e5a9c87523
rustdoc 1.98.0-nightly (14210df0e 2026-05-31)
Charon
/home/leanagent/pv_spike/tools/charon/bin/charon
6490034f368ce98f3e7ae5a28bf71ed56d03bdf1e3712e71376b96fc55baeade
Charon 0.1.216, toolchain nightly-2026-06-01
Aeneas
/home/leanagent/pv_spike/tools/aeneas/bin/aeneas
9f446d2aaf59e8e705e36d05cb993f1c6ab0e97f8dc6fd2f19907a86ede30922
aeneas fa699427
Lean
/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin/lean
3e0d0d3d801675359f2d4cf9815bfdb417b20b92fdd9d48b3b14c95bbae28bbf
Lean 4.30.0-rc2, commit 3dc1a088b6d2d8eafe25a7cd7ec7b58d731bd7cc
Fresh extraction
----------------
The public reproduction command recorded by modeling-input/manifest.json is:
python3 .trellis/scripts/pv_modeling.py check-native . --fresh
For this record the same check_provenance implementation was invoked directly
so that its complete result could be retained without the CLI's bounded JSON
preview. It wrote:
.trellis/scratch/provenance-evidence-1790263924955098840/provenance.json
.trellis/scratch/provenance-evidence-1790263924955098840/extraction/observation.json
The extractor instantiated the empty argument lists above as these commands
(the output and cache paths are those beneath that scratch directory):
<cargo> check --offline
<charon> cargo --preset=aeneas --dest-file Generated/m.llbc -- --offline
<aeneas> -backend lean -dest Generated -emit-json Generated/m.llbc
The observation records exit code 0 for Cargo, Charon, and Aeneas. Cargo's raw
terminal result was:
Checking dec2flt-model v0.1.0 (.../extraction/source)
warning: feature `f16` is declared but not used
warning: `dec2flt-model` (lib) generated 1 warning
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.14s
Charon's raw terminal result was:
Compiling dec2flt-model v0.1.0 (.../extraction/source)
warning: feature `f16` is declared but not used
warning: `dec2flt-model` (lib) generated 1 warning
Finished `dev` profile [unoptimized + debuginfo] target(s) in 15.24s
Aeneas reported 203 prepasses, 50 globals, 87 opaque functions, 107
transparent functions, 49 trait declarations, and 85 trait implementations.
Its raw terminal result ended:
Generated: .../extraction/Generated/M.lean
Generated: .../extraction/Generated/translation.json
[Warn ] The crate contains extracted external, unknown definitions: ...
[Info ] Total execution time: 7.332373 seconds
The warning is the inventoried external boundary below. The fresh provenance
result had an empty error string, passed=true, no tool-identity differences,
and true values for every check, including fresh_extraction_succeeds,
fresh_model_export, crate_export, upstream_export, tool_identities_current,
bootstrap_receipt, and model_support_composition. The canonical current crate
tree digest reported by that result was:
b5ecf4d7e9dfa0337f1586ae0e865fbbe2dd384137ee6e2ad635f0d5d6e916a9
Generated bytes, placeholders, and axioms
-----------------------------------------
sha256sum gave the same digest for the fresh Generated/M.lean and the frozen
generated.lean:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692
The observation's raw-source placeholder count was 0. Compiling raw M.lean
without model support fails as diagnosed because F64 and the external boundary
are absent; four "declaration uses sorry" diagnostics are Lean error-recovery
consequences for F64-valued constants, not tokens in the generated source.
The pinned compatibility report has SHA-256
557a4924d55becf1b33d7dc7f9dfdf2b675c895ce4a9b6bee8a0622378e48d6a,
checks 2225 declarations, reports no unapproved axiom, and marks only the 64
declarations downstream of the missing boundary as pending. This is why the
24 operations below have separate authored model-support owners.
External boundary
-----------------
The exact command
python3 .trellis/scripts/pv_modeling.py inspect-native .
returned declaration_count=24 and retained the full index at
.trellis/scratch/inspect-native-1790264067166282471.json. The 24 names are:
F64.Insts.CoreCloneClone.clone
core.f64.F64.MANTISSA_DIGITS
core.f64.F64.NAN
core.f64.F64.INFINITY
core.f64.F64.NEG_INFINITY
core.f64.F64.EXPONENT_MASK
core.f64.F64.MANTISSA_MASK
core.f64.F64.classify
core.f64.F64.to_bits
core.f64.F64.from_bits
core.num.U8.is_ascii_digit
F64.Insts.CoreOpsArithMulF64F64.mul
F64.Insts.CoreOpsArithDivF64F64.div
F64.Insts.CoreOpsArithNegF64.neg
U64.Insts.CoreOpsBitBitAndU64U64.bitand
U64.Insts.CoreOpsBitBitOrU64U64.bitor
U64.Insts.CoreOpsBitShlU32U64.shl
U64.Insts.CoreOpsBitShrU32U64.shr
core.option.Option.Insts.CoreOpsTry_traitTry.branch
core.option.Option.Insts.CoreOpsTry_traitFromResidualOptionInfallible.from_residual
core.slice.Slice.first
core.slice.Slice.split_first
core.str.Str.as_bytes
F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64.from_u64
Tablet/model-support.json has exactly 24 bindings, one for each name. This
record establishes completeness of that inventory and its composition; the
semantic justification for an individual binding remains the responsibility
of that binding's paired definition node.
Composition
-----------
The exact command
python3 .trellis/scripts/pv_modeling.py compose-native . --check
returned matches=true, changed=false, no mismatched files, raw extraction hash
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692,
and both expected and actual Preamble hashes
15adb2db06b06e099d17070c2a373619ecdc481e32fc78d34054cd01fc7b492a.
The complete receipt is retained at
.trellis/scratch/compose-native-1790264071122343238.json.
reference/model-evidence/source-adaptation-delta.txt
Primary inventory and preservation analysis of the upstream-to-crate delta
============================================================================
Method and complete file inventory
----------------------------------
This record compares the supplied files in upstream/ with the frozen adapted
crate/. It treats the sources and their control flow as primary evidence; it
does not use a prior route decision as semantic proof and makes no assertion
that a supplied GOAL is true. The commands used were:
find upstream crate -type f ! -path '*/target/*' -print0 | sort -z |
xargs -0 sha256sum
for each supplied file f:
cmp -s upstream/$f crate/$f
diff -U0 upstream/$f crate/$f
The concatenated contextual diff of every supplied file has SHA-256
2eb0202ba9ae8092d6727dd2f3b824c29cb160b005960ccf2b15bfb804ed1217.
The complete inventory is:
supplied path upstream SHA-256 crate SHA-256 status
dec2flt/common.rs fc64094721ff23e08fcba013154d04dec3fe986cae5ffd73a20f86049980aace 4c4be815335a7b176527b1345e662890caa48181a0a4f814594339016cab18e changed
dec2flt/decimal.rs 3c164785e1bc3f3b48aa9c212dd6c4ab535fe828523af9fa584df4c7b1e60e0d 633658be803b7369b18feb098a8aa1b5f714a933d3b79ecbc4899a1b05f35beb changed
dec2flt/decimal_seq.rs c0c1c6028e3f57cefc3de7635a94788e9180f5ebcedc7a334ec8dbac786ec788 4aa4ecf9f31970033093d73238d4f2c72d433639bbe467c0741b185807380bd9 changed
dec2flt/fpu.rs 16cf9ec154d477ab3d4184a01fb4b9ed7c59f0228cc55589d393c40a61b19d8f 16cf9ec154d477ab3d4184a01fb4b9ed7c59f0228cc55589d393c40a61b19d8f identical
dec2flt/lemire.rs fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1 fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1 identical
dec2flt/mod.rs 7198e238c554b692405537a446b3526ad66805ec2900cd0e299f10c51402a44a b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012 changed
dec2flt/parse.rs 9daf21ab9445a84552535152f376eef8c30f3d5827296c0645f5952d3b22bbf1 50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f changed
dec2flt/slow.rs 43e7aba32d7431bbf0e1bbcb4c334eaffb23eb66891c7e45abe799c5235cc0d2 93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485 changed
dec2flt/table.rs 6eb59023784bd84cb6fb074c70da8a99bef72bc2a2ea179b0da457ca1ee00abb 6eb59023784bd84cb6fb074c70da8a99bef72bc2a2ea179b0da457ca1ee00abb identical
traits.rs 66a02c44d72dfcc3ddae7e34a290e390dabaf98c5911b283d2d97f2f0075a44e 9013270fb846edcb0bdf2abd0353f575fdd727974cba9e89bdab8bb4c2b4f0bf changed
The standalone package adds four files having no supplied counterpart:
crate/Cargo.toml 2040ce5dc92c51b5245113f97682b692b876aa57708b5c7c483425ba152943c8
crate/lib.rs 1df2b8bcb2f52068d05a6343923716d0ef4475abdef34a0de3fe7cb8dc2ba95b
crate/num/mod.rs d9ac4f964d124bd4660914dc4c80bbb14f48d7851f9a8edc71a0931e9fce37b3
crate/num/imp/mod.rs df09b97393e97b23b0a558c2fcbbf4e75dd9d68338f1e83f168bab80a37a31f1
Thus fpu.rs, lemire.rs, and the complete 671-line table.rs, including their
algorithmic constants and tables, are byte-identical. The following sections
account for every other file and every changed hunk.
Namespace and error shell
-------------------------
crate/lib.rs:1-12 is a no_std crate root that re-exports core::f64 and
core::ops and introduces the same num module path expected by the supplied
slice. crate/num/imp/mod.rs:1-10 uses path attributes to place traits.rs and
dec2flt/mod.rs at core::num::imp-like module names. These declarations add no
wrapper call or computation. crate/num/mod.rs:1 re-exports
core::num::FpCategory. crate/num/mod.rs:3-26 defines a local private
FloatErrorKind and ParseFloatError shell so the standalone package can name
the parser's error type. The pursued GOALs observe only panic versus normal
return and, on normal return, the outer Result's Ok/Err discriminant; they do
not observe the private error kind or formatting. No identity is asserted
between this local shell and an unpinned core error payload.
crate/Cargo.toml:5-22 selects the package, empty default features, and
checked-overflow profiles. The configuration and fresh build are independently
reproduced in setup-reproduction.txt.
Visibility, derives, and bounds
-------------------------------
upstream/dec2flt/mod.rs:90 versus crate/dec2flt/mod.rs:90 changes only the
visibility of the existing BiasedFp import so a goal-facing caller can name the
same type. It changes neither layout nor execution.
upstream/dec2flt/common.rs:68 and decimal.rs:28 and decimal_seq.rs:17 include
Debug derives. The corresponding crate spans common.rs:48-51,
decimal.rs:28-31, and decimal_seq.rs:17-20 remove only Debug. Copy, Clone,
PartialEq, Eq, and Default used by computation remain where present, and no
accepted observation formats these records.
upstream/traits.rs:11-52 versus crate/traits.rs:11-64 removes formatting from
Int, removes a redundant Copy supertrait from CastInto, and instantiates Int
only for u64. Every call of CastInto is through Int, which still requires
Copy; all retained concrete values are primitive Copy values. The removed
u16/u32 instances are associated only with the disabled f16/f32 formats.
upstream/traits.rs:55-76 versus crate/traits.rs:67-80 removes Add, Debug,
PartialEq, PartialOrd, Default, and Clone from Float while retaining Copy, Mul,
Div, and Neg. A search of all retained generic bodies shows no call using a
removed operation. upstream/dec2flt/decimal.rs:56-89 versus
crate/dec2flt/decimal.rs:59-111 and upstream/dec2flt/mod.rs:209-256 versus
crate/dec2flt/mod.rs:352-520 add direct Div, Mul, and Neg bounds already implied
by Lemire -> Float, and replace operator notation with calls to those same
traits. Rust desugars the original /, *, and unary - to these trait calls, so
the operands, call order, result, and admitted f64 specialization are unchanged.
Exact constants, tables, and specialized decoding
-------------------------------------------------
The source formulae and decimal-literal table were evaluated directly by the
pinned rustc using the retained source
reference/model-evidence/adaptation-constants-probe.rs. The command was:
R=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
P=reference/model-evidence/adaptation-constants-probe.rs
B=.trellis/scratch/adaptation-constants-probe
"$R" --edition 2024 --target x86_64-unknown-linux-gnu -C opt-level=0 "$P" -o "$B"
sha256sum "$P" "$B"
"$B"
The source hash was
b5a4a2cba0c08053cb9a816adb1ba5dbd160bf3928bdf5ccf56b7ae83aaa2aa5
and the resulting executable hash was
b02d2f6deb675f17d0dbdc22e57a67d7692689f7a2b0d7b125556c35c4b8a4a5.
Raw output was:
largest_power_of_ten=308
max_exponent_fast_path=22
max_exponent_disguised=37
neg_nan=fff8000000000000
pow10_0=3ff0000000000000
pow10_1=4024000000000000
pow10_2=4059000000000000
pow10_3=408f400000000000
pow10_4=40c3880000000000
pow10_5=40f86a0000000000
pow10_6=412e848000000000
pow10_7=416312d000000000
pow10_8=4197d78400000000
pow10_9=41cdcd6500000000
pow10_10=4202a05f20000000
pow10_11=42374876e8000000
pow10_12=426d1a94a2000000
pow10_13=42a2309ce5400000
pow10_14=42d6bcc41e900000
pow10_15=430c6bf526340000
pow10_16=4341c37937e08000
pow10_17=4376345785d8a000
pow10_18=43abc16d674ec800
pow10_19=43e158e460913d00
pow10_20=4415af1d78b58c40
pow10_21=444b1ae4d6e2ef50
pow10_22=4480f0cf064dd592
upstream/traits.rs:134-137 computes LARGEST_POWER_OF_TEN through a Float
default, and upstream/traits.rs:175-193 gives the generic integer_decode and
the helper used by that constant. crate/traits.rs:146 makes the constant an
associated requirement; crate/traits.rs:309-359 supplies the retained f64
values and decoder after substituting BITS=64, SIG_BITS=52, EXP_BIAS=1023,
EXPONENT_MASK, MANTISSA_MASK, and the u64 operations. Each source expression
then becomes exactly the corresponding crate expression: sign is bits>>63,
exponent is (bits & mask)>>52 cast to i16, the subnormal mantissa is shifted
once, the normal mantissa receives 1<<52, and 1023+52 is subtracted. The
resulting tuple and every bit operation are unchanged. The probe output above
shows that the computed f64 LARGEST_POWER_OF_TEN is 308 and that the source
-f64::NAN word is fff8000000000000, exactly crate/traits.rs:315-327; the
independent binary64-boundary.txt record fixes the masks and primitive bit
semantics used by the decoder.
upstream/dec2flt/mod.rs:118-129 gives the two Lemire default formulae.
crate/dec2flt/mod.rs:115-128 makes them associated requirements, and the
retained f64 instance at crate/dec2flt/mod.rs:217-220 supplies 22 and 37, the
integer results of the two source formulae for 53 significand bits.
upstream/dec2flt/mod.rs:176-181 indexes a 32-entry f64 table with exponent&31.
crate/dec2flt/mod.rs:222-251 performs the same masked selection using from_bits:
cases 0 through 22 are the exact pinned binary64 words printed above for 1e0 through 1e22 and
all other cases return positive zero, as did entries 23 through 31. The full
word list and the pinned float semantics are recorded in binary64-boundary.txt.
The analogous f16/f32 replacements at crate/dec2flt/mod.rs:145-215 and
crate/traits.rs:187-307 lie under cfg(any()) and cannot enter this build.
Whole-function from_u64 opacity
-------------------------------
upstream/dec2flt/mod.rs:184-188 and crate/dec2flt/mod.rs:254-263 have the same
f64 body: the same enabled debug_assert that v <= 1<<53, followed by the same
primitive `v as f64` cast. The sole semantic-boundary annotation is
#[charon::opaque] at crate line 259, syntactically attached to the function
item. It therefore hides the entire from_u64 body from translation: neither
the debug assertion nor the cast is transparent in the extraction. The
callers, their guards, and the surrounding native-path computation remain
transparent. The fresh external inventory contains the whole method as the
single external F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64.from_u64. Its
separately reviewed ModelF64FromU64 binding supplies exactly successful integer
conversion for v <= 2^53 and assertion failure otherwise.
Digit scans, slice patterns, and helper extraction
-------------------------------------------------
upstream/dec2flt/common.rs:14-53 supplies ByteSlice::parse_digits: repeatedly
split_first, wrapping-subtract ASCII zero, invoke the closure exactly when the
result is below 10, consume that byte, and stop at the first other byte.
crate/dec2flt/common.rs:11-36 removes only this method. Its complete set of
uses is replaced as follows.
* upstream/dec2flt/parse.rs:31-48 versus crate/dec2flt/parse.rs:31-58 keeps the
eight-byte loop, wrapping multiply/add, and then performs the same digit test,
accumulator update, and one-byte progress with an index. The local rename
num to chunk is lexical only.
* upstream/dec2flt/parse.rs:83-97 versus crate/dec2flt/parse.rs:131-153 expands
matches!/parse_digits into the same nonempty first-digit guard, the same
0x10000 bounded exponent update, the same first-nondigit suffix, and the same
final sign. The bound is tested before each checked multiply and addition,
exactly as in the closure.
* upstream/dec2flt/decimal_seq.rs:220-295 versus
crate/dec2flt/decimal_seq.rs:231-359 extracts parse_digits_into_seq,
parse_decimal_exponent, and count_trailing_zeros. The digit helpers use the
same wrapping byte test, forward order, try_add_digit state transition, and
0x10000 exponent guard. The reverse helper visits indices consumed_len-1
down to zero, increments only for ASCII zero, ignores a decimal point, and
stops at the first other byte, exactly the original iter().rev() loop.
In all these replacements, indexing occurs only under count<len or !is_empty,
so it has the same bounds as split_first. Slicing advances by exactly the same
one or eight bytes. No wrapping operation is replaced by checked arithmetic,
and no checked source operation is replaced by wrapping arithmetic.
upstream/dec2flt/parse.rs:155-181 versus crate/dec2flt/parse.rs:82-119 and
212-226 moves two loops into adjust_many_digit_count and parse_many_digits.
The prefix helper visits the same start bytes in the same order, performs the
same saturating_sub and checked isize subtraction, and stops on the same byte.
The retry helper makes the same first 19-digit call, tests the same threshold,
makes the same one-byte rebase and second call in the alternate branch,
computes the same offset with the same sign, casts it to i64, and performs the
same checked addition of exp_number last. Thus any large-input panic is
preserved rather than excluded.
upstream/dec2flt/decimal_seq.rs:226-295 versus
crate/dec2flt/decimal_seq.rs:284-359 replaces literal split_first patterns by
nonempty index tests. The leading-zero scans, optional decimal point, optional
exponent marker, optional exponent sign, and suffixes occur in the same order.
The crate's exp_sign*exp_num equals the source choice between exp_num and
-exp_num because exp_num is bounded by the unchanged 0x10000 guard; the final
decimal_point checked addition is in the same position. Casts of lengths to
i32 and every subsequent checked update remain unchanged, including their
large-input behavior.
Delayed returns
---------------
upstream/dec2flt/decimal_seq.rs:173-198 versus
crate/dec2flt/decimal_seq.rs:176-203 replaces one return inside right_shift's
loop by all_zero=true, exits because !all_zero is the loop guard, and returns
immediately afterward. No decimal_point, digit, index, or arithmetic update
occurs between the original and delayed return.
upstream/dec2flt/slow.rs:46-76 versus crate/dec2flt/slow.rs:46-94 replaces two
nested-loop returns by loop_result. In the zero branch it records fp_zero,
skips the source-skipped exp2 addition, exits through is_none(), and returns.
In the infinity branch it records fp_inf, skips the source-skipped exp2
subtraction, exits, and returns. On all other iterations it performs the same
shift, checked state changes, and exponent update. Lines 95-126 after these
returns are otherwise the source lines 77-110 unchanged.
Dispatcher trace and public projection
--------------------------------------
upstream/dec2flt/mod.rs:209-256 is the whole original dispatcher.
crate/dec2flt/mod.rs:285-349 declares trace data only, lines 352-505 execute the
instrumented dispatcher, and lines 507-520 define public dec2flt as its first
projection. Comparing the bodies gives the following branch-by-branch
correspondence.
* Both call as_bytes, inspect the first byte, reject empty input before a helper,
remove at most one sign, and reject a sign-only body. The trace stores the
already obtained body and Boolean sign.
* Both call parse_number first on that exact body. Only None calls
parse_inf_nan on the same body and sign. Its Some is returned directly and
its None returns invalid. The trace stores those existing Option values.
* Both overwrite only Decimal.negative, test the same compile-time
!optimize_for_size condition, call try_fast_path once, and return its Some
directly. The trace stores the copied Decimal and Option; Decimal is Copy.
* Both call compute_float first with num.exponent and num.mantissa. The crate's
second_compute_guard is exactly the first two conjuncts of the source
short-circuit. Therefore the checked mantissa+1 and second compute_float call
occur under precisely the source guard, in the same order. The same pair
comparison either retains fp or changes only p_biased to -1.
* Both test the post-comparison p_biased<0 once, call parse_long_mantissa on the
unchanged body exactly when true, and otherwise retain the same pair. The
trace records both guard and result without another helper call.
* The extra assembled_word expression is the same cast, shift, and OR performed
by biased_fp_to_float at upstream lines 202-206 and crate lines 278-282; these
integer operations neither panic nor mutate fp. Both then call assembly once
on the selected pair and apply unary negation exactly when num.negative.
Public dec2flt returns the identical Result first component.
Consequently the trace does not infer uncomputed data: it records the exact
variant; sign-stripped body and sign; numeric/special Options; fast-path input
and result; first and conditional second integer operands and results;
comparison, forced-deferral and post-comparison pair; slow guard and result;
selected pair; assembled word; pre-sign assembly word; sign-application fact;
and final word. Special and native direct returns create no selected pair.
All source call order, guards, checked arithmetic, mutable-state transitions,
panic points, and returned Result/F64 observations remain in place.
F64-only restriction
--------------------
crate/traits.rs:187-307 and crate/dec2flt/mod.rs:140-215 add cfg(any()) to the
f16/f32 Float, FloatExt, and Lemire implementations. crate/traits.rs:59-64
retains only u64 Int. The retained f64 implementations are
crate/traits.rs:309-360 and crate/dec2flt/mod.rs:217-264. Every goal-facing
function remains generic in the source and extraction, but each pursued source
subject specializes it to f64, whose associated integer is u64. There is no
dynamic format dispatch, so removing other impl blocks cannot change an f64
call, its native decision, checks, result word, NaN classification, fields, or
trace. The fresh boundary inventory in setup-reproduction.txt confirms that
no removed-format external remains.
Conclusion
----------
The inventory is exhaustive: three supplied files are identical, seven have
all hunks classified above, and the four added files are the package shell.
For the configured f64 specialization, the adapted crate has the same input
domains, branch order, guards, checked/wrapping distinction, state transitions,
panic versus normal behavior, and public/helper observations as the supplied
source. The only new observations are the trace fields, each copied from an
existing value or computed by the same pure assembly expression. This
conclusion is independent of whether any parser-correctness GOAL is true.
reference/model-evidence/source-valid-byte-slice.txt
Source-valid byte-slice domain evidence
Pinned toolchain commands, run from the repository root:
rustc --version --verbose
rustc --print cfg | rg 'target_(arch|pointer_width)'
rustc .trellis/scratch/source_valid_slice_probe.rs -o /tmp/source_valid_slice_probe
/tmp/source_valid_slice_probe
Raw configuration and probe output:
rustc 1.98.0-nightly (14210df0e 2026-05-31)
host: x86_64-unknown-linux-gnu
target_arch="x86_64"
target_pointer_width="64"
arch=x86_64
usize_bits=64
isize_max=9223372036854775807
u8_size=1
Pinned core-library source:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:801
states that a slice is never larger than isize::MAX bytes.
The same toolchain's core/src/num/int_macros.rs:47 defines a signed
integer's MAX as the corresponding unsigned MAX shifted right by one.
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/mod.rs:507-510
requires the contents of a str to remain valid UTF-8 and states that using a
str whose contents are not valid UTF-8 is undefined behavior.
Consequently, on the configured 64-bit target a &[u8] has at most
9223372036854775807 elements. This is a byte-count condition only: &[u8]
does not impose UTF-8 validity or restrict the values of its u8 elements.
A Rust str has the same inherent byte-length bound and additionally consists
of valid UTF-8 bytes.
Upstream → extraction-crate adaptation diff
--- upstream/dec2flt/slow.rs
+++ crate/dec2flt/slow.rs
@@ -46,18 +46,27 @@
return fp_inf;
}
let mut exp2 = 0_i32;
+ let mut loop_result = None;
// Shift right toward (1/2 ... 1].
- while d.decimal_point > 0 {
+ while d.decimal_point > 0 && loop_result.is_none() {
let n = d.decimal_point as usize;
let shift = get_shift(n);
d.right_shift(shift);
if d.decimal_point < -DecimalSeq::DECIMAL_POINT_RANGE {
- return fp_zero;
+ // The source returns `fp_zero` at this exact point. Storing that
+ // result and terminating the loop performs no later loop update;
+ // the return below is therefore behavior-identical and avoids an
+ // Aeneas restriction on returns from nested loop translation.
+ loop_result = Some(fp_zero);
+ } else {
+ exp2 += shift as i32;
}
- exp2 += shift as i32;
+ }
+ if let Some(result) = loop_result {
+ return result;
}
// Shift left toward (1/2 ... 1].
- while d.decimal_point <= 0 {
+ while d.decimal_point <= 0 && loop_result.is_none() {
let shift = if d.decimal_point == 0 {
match d.digits[0] {
digit if digit >= 5 => break,
@@ -69,9 +78,16 @@
};
d.left_shift(shift);
if d.decimal_point > DecimalSeq::DECIMAL_POINT_RANGE {
- return fp_inf;
+ // This records the source's immediate `fp_inf` return. Since the
+ // guarded loop exits before the exponent update, moving the return
+ // just below the loop preserves every state transition.
+ loop_result = Some(fp_inf);
+ } else {
+ exp2 -= shift as i32;
}
- exp2 -= shift as i32;
+ }
+ if let Some(result) = loop_result {
+ return result;
}
// We are now in the range [1/2 ... 1] but the binary format uses [1 ... 2].
exp2 -= 1;
Record details
| Kind | source adaptation site (file-level diff) |
|---|
Captured evidence identities
[
{
"path": "extraction-evidence/COMMAND.json",
"sha256": "611f36cefb2d895e7b22bd15eaccc1bd57d1b539d54cbd6337e84d0573719a9e",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "extraction-evidence/DETERMINISM.json",
"sha256": "360301745fc66c713335320b2e6a57ef7fb71e390cc7db31a6316a3902f7ef8f",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "extraction-evidence/RESULT.json",
"sha256": "62a89492b5592f404e065d2f8c9a89fd3f83cc59b772fed0eaa475138211d641",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "extraction-evidence/STDERR.bin",
"sha256": "ab4dc202d7a8a30a83ea62ed154710a48148d62230ff8b834700919d4e679c0c",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "extraction-evidence/STDOUT.bin",
"sha256": "604aae51d5c3394417224f655c7de355cc3e699d31fff49f93734706ad43f3f8",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "reference/model-evidence/adaptation-constants-probe.rs",
"sha256": "b5a4a2cba0c08053cb9a816adb1ba5dbd160bf3928bdf5ccf56b7ae83aaa2aa5",
"cited_by": [
"reference/model-evidence/source-adaptation-delta.txt"
]
},
{
"path": "reference/model-evidence/binary64-boundary.txt",
"sha256": "a17d82e7f789ce7f1fbb3922a66ec8806999e526532d637605263882d37b7abf",
"cited_by": [
"shared extraction boundary: Tablet/Preamble.tex",
"reference/model-evidence/source-adaptation-delta.txt"
]
},
{
"path": "reference/model-evidence/binary64-probe.rs",
"sha256": "68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e",
"cited_by": [
"reference/model-evidence/binary64-boundary.txt"
]
},
{
"path": "reference/model-evidence/setup-reproduction.txt",
"sha256": "f97c87d1af65130560f67d2bfcd737106b191c8fce1ed0174569ee218c4ee8d7",
"cited_by": [
"shared extraction boundary: Tablet/Preamble.tex",
"reference/model-evidence/source-adaptation-delta.txt"
]
},
{
"path": "reference/model-evidence/source-adaptation-delta.txt",
"sha256": "5502c71eb4420211d20bd8b6aade171c56cc2dce11d758a73bb93ef1083634ad",
"cited_by": [
"shared extraction boundary: Tablet/Preamble.tex"
]
},
{
"path": "reference/model-evidence/source-valid-byte-slice.txt",
"sha256": "e7887429c66a303cbba3b4df30080ddd9ba4d54e24f25f74947deb228b32b04f",
"cited_by": [
"shared extraction boundary: Tablet/Preamble.tex"
]
}
]crate/traits.rs
Historical preparation document: preparation source-adaptation audit. It describes the state and obligations at preparation. This generation is captured in Modeling. Later closure and review results appear in the proof and modeling views. This original document remains available as history.
Shared extraction-boundary explanation (Preamble)
Preservation argument
Claim
x86_64-unknown-linux-gnu, the library's empty default feature set
(so optimize_for_size is disabled), the unoptimized development
profile, enabled debug assertions and integer overflow checks, and the target's
SSE2 precision-setting branch. Interpret each of the frozen extraction's 24
external operations by the separately justified model-support definition that
owns that operation. Under those interpretations, the composed Aeneas model
represents the supplied source's f64 specialization on all of these
domains, without a correctness premise: every Rust str whose bytes
are valid UTF-8 and whose 64-bit slice length is at most
\mathtt{isize::MAX}=2^{63}-1; every Rust &[u8] whose length is at
most that bound, with arbitrary byte contents; every Decimal; every
i64/u64 pair; and every BiasedFp.dec2flt::<f64> the relation preserves panic versus normal return,
the outer returned Result's Ok/Err discriminant,
and, on success, the exact binary64 word and its NaN classification. For
parse_number it preserves panic versus normal return, the
Option discriminant, and all four returned Decimal fields.
For parse_inf_nan::<f64> and
Decimal::try_fast_path::<f64> it preserves panic versus normal
return, None versus Some, and every returned word and NaN
classification. For compute_float::<f64> and
parse_long_mantissa::<f64> it preserves panic versus normal return
and both fields of every returned BiasedFp. For
biased_fp_to_float::<f64> it preserves panic versus normal return
and the exact returned word, with no restriction on the pair fields.dec2flt_with_trace::<f64> it additionally preserves the public
result and the complete trace: its control-flow variant; sign-stripped body and
lexical sign; numeric and special helper results; signed native input and
native result; first integer operands and result; second-call guard, optional
operands and result, comparison and forced-deferral fact; post-comparison pair;
slow-path guard and optional result; selected pair; assembled unsigned word;
pre-sign assembly result; sign-application fact; and final word. Public
dec2flt::<f64> is exactly the first projection of that interface, and
direct special and native returns select no raw pair.Proof
generated.lean, with SHA-256
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692.
The raw source has no placeholder. The compatibility check reports no
unapproved axiom and isolates exactly 24 external declarations; the complete
inventory equals the 24 entries of Tablet/model-support.json.
compose-native --check reports an unchanged composition and equal
expected and actual Preamble hashes. Thus all transparent extracted
declarations come from this one pinned source and every nontransparent
operation is explicit. The premise assigning each external its owning
definition deliberately leaves that definition's primitive-semantics proof to
its own preservation record; no primitive binding is re-proved here.fpu.rs, lemire.rs, and table.rs are
byte-identical. The standalone namespace and local error shell introduce no
call. The GOALs observe only panic versus normal return and the outer
Ok/Err discriminant, so the shell's private kind and
formatting are unobserved; no identity with an unpinned core error payload is
asserted. Visibility and removed Debug derives do not affect values.
The retained generic bodies use none of the removed trait operations;
the direct Mul, Div, and Neg clauses and calls are
the operations already implied by Lemire. Only the u64
integer instance and f64 Float, FloatExt, and
Lemire instances can participate in an f64 execution, so
disabling the u16/u32 and f16/f32
instances changes no such call.f64/u64 field widths and
masks; the fast-path bounds are the source formula results; and the match over
power-of-ten words has the same masked index and exact words as the source
array. The toolchain-specific words, masks, classifications, casts, and
rounding behavior are independently pinned in
reference/model-evidence/binary64-boundary.txt. The frozen
from_u64 Rust body is the enabled assertion followed by the
u64 as f64 conversion. Because #[charon::opaque] applies to
the whole function, neither operation inside that body is transparent in the
extraction: the whole method is the single inventoried external. Its callers,
their guards, and the surrounding native computation remain transparent.
ModelF64FromU64 supplies exactly successful integer conversion for
v\leq2^{53} and assertion failure otherwise.split_first loops. Extracted helpers receive the same
slices and mutable values, visit bytes in the same forward or reverse order,
and retain every saturating, wrapping, and checked operation. Delayed returns
set a result flag, execute no intervening state update, leave the loop through
that flag, and immediately return the source value. In particular, casts and
length-derived additions on very large inputs keep their original panic or
normal behavior rather than acquiring a convenience size bound.None, overwrite only the parsed sign, try the enabled native
path, make the first integer call, and evaluate the checked
mantissa+1 and second call under exactly the source short-circuit
guard. Both force the same deferral on unequal pairs, call the slow helper on
the unchanged body exactly for a negative post-comparison exponent, assemble
the same selected pair, and apply the sign last. Every trace field is either
one of those already computed values or the same nonmutating cast/shift/OR word
used by assembly. Hence recording the trace and discarding it in the public
projection changes neither call order, guards, state, panic points, nor any
returned observation.isize::MAX, while a Rust string adds UTF-8 validity. Sub-slicing
preserves the length bound and need not preserve an independent string type.
These facts establish all domains and observations in the claim independently
of the truth or falsity of any GOAL.Evidence and probes
These programs and outputs were produced during modeling to examine specific behavior and support the modeling arguments.
extraction-evidence/COMMAND.json
{"declaration_reader_sha256":"76f60cf0b867fad9727d2256d32b306c8cba3725216a4225d0f83add77fd6158","extraction_provenance":{"extraction_toolchain":{"aeneas":"fa699427","aeneas_revision":"fa699427cdfa8f604b891fb0223ef42883dd7dc4","cargo_features":[{"features":["default"],"name":"dec2flt-model","source":"workspace:Cargo.toml","version":"0.1.0"}],"cargo_lock_sha256":"bc644c624ded89197356bbd65d995054b7fb08e5bdfbaa38c6e7c7a53772cecf","cfg":["debug_assertions","emscripten_wasm_eh","feature=\"default\"","fmt_debug=\"full\"","overflow_checks","panic=\"unwind\"","relocation_model=\"pic\"","target_abi=\"\"","target_arch=\"x86_64\"","target_endian=\"little\"","target_env=\"gnu\"","target_family=\"unix\"","target_feature=\"fxsr\"","target_feature=\"sse\"","target_feature=\"sse2\"","target_feature=\"x87\"","target_has_atomic","target_has_atomic=\"16\"","target_has_atomic=\"32\"","target_has_atomic=\"64\"","target_has_atomic=\"8\"","target_has_atomic=\"ptr\"","target_has_atomic_load_store","target_has_atomic_load_store=\"16\"","target_has_atomic_load_store=\"32\"","target_has_atomic_load_store=\"64\"","target_has_atomic_load_store=\"8\"","target_has_atomic_load_store=\"ptr\"","target_has_atomic_primitive_alignment=\"16\"","target_has_atomic_primitive_alignment=\"32\"","target_has_atomic_primitive_alignment=\"64\"","target_has_atomic_primitive_alignment=\"8\"","target_has_atomic_primitive_alignment=\"ptr\"","target_has_reliable_f128","target_has_reliable_f16","target_has_reliable_f16_math","target_object_format=\"elf\"","target_os=\"linux\"","target_pointer_width=\"64\"","target_thread_local","target_vendor=\"unknown\"","ub_checks","unix"],"charon":"0.1.216","charon_revision":"6f058254eb741c12e9b388df07adaf7cc8aac8ed","extraction_profile":"dev","lean":"4.30.0-rc2","overflow_checks":true,"panic_strategy":"unwind","rustc_vv":"rustc 1.98.0-nightly (14210df0e 2026-05-31)\nbinary: rustc\ncommit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65\ncommit-date: 2026-05-31\nhost: x86_64-unknown-linux-gnu\nrelease: 1.98.0-nightly\nLLVM version: 22.1.6\n","target_pointer_width":64,"target_triple":"x86_64-unknown-linux-gnu"},"extractor_stack":["charon@0.1.216","aeneas@fa699427"],"extractor_toolchain_sha256":"18657da0659dee7889ed8a937b136c9abbc3a35e9050241cd8201c94fd232323","not_recorded":[],"source_digests":[{"source_file":"lib.rs","source_sha256":"b5ecf4d7e9dfa0337f1586ae0e865fbbe2dd384137ee6e2ad635f0d5d6e916a9"}]},"extractor_script_path":"/home/leanagent/pv_runs/trellis-native-implementation-v85/scripts/extract_pv_model.py","extractor_script_sha256":"cc1fdd50a78185c7bb564b715c554cb35d9fc09ed566b6c3d4f482f2d27ef67d","kernel_gate_checkers":[],"log_concatenation_order":"runs_then_steps_in_array_order","runs":[{"run_role":"primary","steps":[{"argv":["/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","-vV"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"rustc-version","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"},{"argv":["/home/leanagent/pv_spike/tools/charon/bin/charon","cargo","--preset=aeneas","--dest-file","/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/m.llbc","--","--offline","--profile","dev","--target","x86_64-unknown-linux-gnu"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_BUILD_TARGET":"x86_64-unknown-linux-gnu","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"charon","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"},{"argv":["/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/cargo","metadata","--format-version=1","--locked","--offline","--filter-platform","x86_64-unknown-linux-gnu"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_BUILD_TARGET":"x86_64-unknown-linux-gnu","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"cargo-metadata","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"},{"argv":["/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/cargo","rustc","--lib","--locked","--offline","--profile","dev","--target","x86_64-unknown-linux-gnu","--","--print","cfg"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_BUILD_TARGET":"x86_64-unknown-linux-gnu","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"cargo-rustc-cfg","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"},{"argv":["/home/leanagent/pv_spike/tools/aeneas/bin/aeneas","-backend","lean","-dest","/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen","-emit-json","/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/m.llbc"],"effective_environment":{"CAML_LD_LIBRARY_PATH":"/home/leanagent/.opam/5.3.0/lib/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml/stublibs:/home/leanagent/.opam/5.3.0/lib/ocaml","CARGO_BUILD_TARGET":"x86_64-unknown-linux-gnu","CARGO_HOME":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/cargo-home","CARGO_NET_OFFLINE":"true","CARGO_TARGET_DIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","CHARON_TOOLCHAIN_IS_IN_PATH":"1","HOME":"/home/leanagent","LANG":"C.UTF-8","LC_ALL":"C.UTF-8","LD_LIBRARY_PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib","LEAN_PATH":"/home/leanagent/pv_spike/tools/aeneas/backends/lean/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/batteries/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/mathlib/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/plausible/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/aesop/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/LeanSearchClient/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/Qq/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/proofwidgets/.lake/build/lib/lean:/home/leanagent/pv_genesis/dec2flt-trust-v1-20260729T150751Z/.lake/packages/importGraph/.lake/build/lib/lean","LOGNAME":"leanagent","MANPATH":":/home/leanagent/.opam/5.3.0/man","OCAMLTOP_INCLUDE_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OCAML_TOPLEVEL_PATH":"/home/leanagent/.opam/5.3.0/lib/toplevel","OPAMSWITCH":"5.3.0","OPAM_LAST_ENV":"/home/leanagent/.opam/.last-env/env-b63c98443275b747a73beff03ead5f21-0","OPAM_SWITCH_PREFIX":"/home/leanagent/.opam/5.3.0","PATH":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/pv_spike/tools/aeneas/bin:/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin:/home/leanagent/pv_spike/tools/charon/bin:/home/leanagent/.opam/5.3.0/bin:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.codex/packages/standalone/releases/0.153.4-x86_64-unknown-linux-musl/codex-path:/home/leanagent/.codex/tmp/arg0/codex-arg0wieG7X:/home/leanagent/.elan/bin:/home/leanagent/.local/bin:/home/leanagent/.cargo/bin:/home/leanagent/.nvm/versions/node/v22.23.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","RUSTC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc","RUSTDOC":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc","RUSTUP_TOOLCHAIN":"/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu","SHELL":"/bin/bash","TEMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMP":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","TMPDIR":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/execution/tmp","USER":"leanagent"},"tool":"aeneas","working_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate"}]}],"schema":"trellis-extraction-command/v1","tool_source_checkouts":[]}extraction-evidence/DETERMINISM.json
{"comparison":"generated_lean_and_complete_tablet_tree_byte_identity","generated_lean_byte_identical":false,"generated_lean_sha256":["49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692"],"kernel_filespec_gate":"not_run","kernel_prescribed_region_gate":"not_run","namespace_context_roundtrip_gate":"not_run","result_sha256":"62a89492b5592f404e065d2f8c9a89fd3f83cc59b772fed0eaa475138211d641","run_roles":["primary"],"schema":"trellis-extraction-determinism/v2","status":"not_run","tablet_root_sha256":["57e6ec9f6e8b1d9d78ab01504bad58f93cb43308edf77f73f86b986b8d07b809"],"tablet_tree_byte_identical":false}extraction-evidence/RESULT.json
{"command_sha256":"611f36cefb2d895e7b22bd15eaccc1bd57d1b539d54cbd6337e84d0573719a9e","runs":[{"generated_lean_sha256":"49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692","run_role":"primary","steps":[{"exit_status":0,"stderr_byte_length":0,"stderr_offset":0,"stderr_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","stdout_byte_length":212,"stdout_offset":0,"stdout_sha256":"e6ea0da4a3301256a0a0dc0d67d11acf4e83e0d1bff5dd987ccdaa43708714bc","tool":"rustc-version"},{"exit_status":0,"stderr_byte_length":654,"stderr_offset":0,"stderr_sha256":"263937c29ffcb9cf54e452b2d8b89e015a1fa1a5b2a2d237292d4350d0b04aed","stdout_byte_length":0,"stdout_offset":212,"stdout_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","tool":"charon"},{"exit_status":0,"stderr_byte_length":0,"stderr_offset":654,"stderr_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","stdout_byte_length":2897,"stdout_offset":212,"stdout_sha256":"ec87d2fc78972115c1b9e436f373a890f3847397a741d91d720dce4fb36c7a90","tool":"cargo-metadata"},{"exit_status":0,"stderr_byte_length":302,"stderr_offset":654,"stderr_sha256":"7025c1726c90c35a211042d6945c25ff6015acaca27ee97a063465221b792806","stdout_byte_length":1062,"stdout_offset":3109,"stdout_sha256":"4081a320e6292139b4a673d225682dc054b77cba113b8c8a8fbb0593f824b713","tool":"cargo-rustc-cfg"},{"exit_status":0,"stderr_byte_length":7084,"stderr_offset":956,"stderr_sha256":"5f41394d8b12a0d7a6c9e7115108a06b20599eb7ddd611cff4b90b31ba2fe26a","stdout_byte_length":933,"stdout_offset":4171,"stdout_sha256":"376c43fb83e40962a056e9198dba4afb0cf8ecb0238e76c78bd9dbc32fbced4a","tool":"aeneas"}],"tablet_root_sha256":"57e6ec9f6e8b1d9d78ab01504bad58f93cb43308edf77f73f86b986b8d07b809"}],"schema":"trellis-extraction-result/v2","stderr_byte_length":8040,"stderr_sha256":"ab4dc202d7a8a30a83ea62ed154710a48148d62230ff8b834700919d4e679c0c","stdout_byte_length":5104,"stdout_sha256":"604aae51d5c3394417224f655c7de355cc3e699d31fff49f93734706ad43f3f8"}extraction-evidence/STDERR.bin
Compiling dec2flt-model v0.1.0 (/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate)
warning: feature `f16` is declared but not used
--> lib.rs:2:46
|
2 | #![feature(cfg_target_has_reliable_f16_f128, f16, float_masks, register_tool, staged_api)]
| ^^^
|
= note: `#[warn(unused_features)]` (part of `#[warn(unused)]`) on by default
warning: `dec2flt-model` (lib) generated 1 warning
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.41s
Compiling dec2flt-model v0.1.0 (/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.02s
[?25lApplied prepasses: [------------------------------------------------] 0/203 ⠋
Applied prepasses: [------------------------------------------------] 1/203 ⠋
Applied prepasses: [#####-------------------------------------------] 24/203 ⠋
Applied prepasses: [########----------------------------------------] 38/203 ⠋
Applied prepasses: [##############################------------------] 128/203 ⠙
Applied prepasses: [################################################] 203/203 ✔️
[?25h[?25lTranslated globals: [-------------------------------------------------] 0/50 ⠋
Translated globals: [#################################################] 50/50 ✔️
[?25h[?25lTranslated opaque functions: [----------------------------------------] 0/87 ⠋
Translated opaque functions: [########################################] 87/87 ✔️
[?25h[?25lTranslated transparent functions: [---------------------------------] 0/107 ⠋
Translated transparent functions: [---------------------------------] 1/107 ⠋
Translated transparent functions: [###------------------------------] 10/107 ⠙
Translated transparent functions: [######---------------------------] 22/107 ⠹
Translated transparent functions: [##########-----------------------] 35/107 ⠹
Translated transparent functions: [##############-------------------] 47/107 ⠹
Translated transparent functions: [###############------------------] 51/107 ⠸
Translated transparent functions: [################-----------------] 55/107 ⠸
Translated transparent functions: [##################---------------] 60/107 ⠼
Translated transparent functions: [##################---------------] 61/107 ⠼
Translated transparent functions: [###################--------------] 64/107 ⠼
Translated transparent functions: [####################-------------] 68/107 ⠼
Translated transparent functions: [#####################------------] 69/107 ⠴
Translated transparent functions: [#####################------------] 70/107 ⠴
Translated transparent functions: [######################-----------] 72/107 ⠦
Translated transparent functions: [######################-----------] 73/107 ⠦
Translated transparent functions: [######################-----------] 74/107 ⠧
Translated transparent functions: [#######################----------] 77/107 ⠧
Translated transparent functions: [########################---------] 78/107 ⠧
Translated transparent functions: [########################---------] 80/107 ⠇
Translated transparent functions: [#########################--------] 83/107 ⠇
Translated transparent functions: [#########################--------] 84/107 ⠇
Translated transparent functions: [##########################-------] 85/107 ⠏
Translated transparent functions: [##########################-------] 86/107 ⠏
Translated transparent functions: [##########################-------] 87/107 ⠋
Translated transparent functions: [###########################------] 88/107 ⠋
Translated transparent functions: [###########################------] 90/107 ⠋
Translated transparent functions: [############################-----] 91/107 ⠙
Translated transparent functions: [############################-----] 92/107 ⠙
Translated transparent functions: [############################-----] 93/107 ⠙
Translated transparent functions: [#############################----] 95/107 ⠹
Translated transparent functions: [#############################----] 97/107 ⠹
Translated transparent functions: [##############################---] 98/107 ⠸
Translated transparent functions: [##############################---] 99/107 ⠼
Translated transparent functions: [###############################--] 101/107 ⠼
Translated transparent functions: [###############################--] 102/107 ⠴
Translated transparent functions: [###############################--] 103/107 ⠦
Translated transparent functions: [################################-] 104/107 ⠦
Translated transparent functions: [################################-] 105/107 ⠧
Translated transparent functions: [################################-] 106/107 ⠇
Translated transparent functions: [#################################] 107/107 ⠏
Translated transparent functions: [#################################] 107/107 ✔️
[?25h[?25lTranslated trait declarations: [--------------------------------------] 0/49 ⠋
Translated trait declarations: [########################--------------] 31/49 ✔️
[?25h[?25lTranslated trait impls: [---------------------------------------------] 0/85 ⠋
Translated trait impls: [#################################------------] 64/85 ✔️
[?25h[?25lPost-processed translated opaque functions: [-------------------------] 0/87 ⠋
Post-processed translated opaque functions: [-------------------------] 1/87 ⠙
Post-processed translated opaque functions: [#########################] 87/87 ✔️
[?25h[?25lPost-processed translated transparent functions: [------------------] 0/107 ⠋
Post-processed translated transparent functions: [------------------] 1/107 ⠋
Post-processed translated transparent functions: [#-----------------] 10/107 ⠙
Post-processed translated transparent functions: [##----------------] 13/107 ⠹
Post-processed translated transparent functions: [##----------------] 16/107 ⠸
Post-processed translated transparent functions: [##----------------] 17/107 ⠸
Post-processed translated transparent functions: [###---------------] 18/107 ⠼
Post-processed translated transparent functions: [###---------------] 22/107 ⠼
Post-processed translated transparent functions: [####--------------] 24/107 ⠼
Post-processed translated transparent functions: [####--------------] 29/107 ⠴
Post-processed translated transparent functions: [#####-------------] 31/107 ⠴
Post-processed translated transparent functions: [#####-------------] 33/107 ⠴
Post-processed translated transparent functions: [######------------] 39/107 ⠴
Post-processed translated transparent functions: [########----------] 48/107 ⠦
Post-processed translated transparent functions: [#########---------] 56/107 ⠦
Post-processed translated transparent functions: [##########--------] 62/107 ⠦
Post-processed translated transparent functions: [###############---] 94/107 ⠦
Post-processed translated transparent functions: [################--] 99/107 ⠧
Post-processed translated transparent functions: [################--] 100/107 ⠇
Post-processed translated transparent functions: [#################-] 102/107 ⠇
Post-processed translated transparent functions: [#################-] 104/107 ⠏
Post-processed translated transparent functions: [#################-] 105/107 ⠋
Post-processed translated transparent functions: [##################] 107/107 ⠙
Post-processed translated transparent functions: [##################] 107/107 ✔️
[?25hextraction-evidence/STDOUT.bin
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
{"packages":[{"name":"dec2flt-model","version":"0.1.0","id":"path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0","license":null,"license_file":null,"description":null,"source":null,"dependencies":[],"targets":[{"kind":["lib"],"crate_types":["lib"],"name":"dec2flt_model","src_path":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate/lib.rs","edition":"2024","doc":true,"doctest":true,"test":true}],"features":{"default":[],"optimize_for_size":[]},"manifest_path":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate/Cargo.toml","metadata":null,"publish":[],"authors":[],"categories":[],"keywords":[],"readme":null,"repository":null,"homepage":null,"documentation":null,"edition":"2024","links":null,"default_run":null,"rust_version":null}],"workspace_members":["path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0"],"workspace_default_members":["path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0"],"resolve":{"nodes":[{"id":"path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0","dependencies":[],"deps":[],"features":["default"]}],"root":"path+file:///home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate#dec2flt-model@0.1.0"},"target_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","build_directory":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/cargo-target/extract","version":1,"workspace_root":"/home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/crate","metadata":null}
debug_assertions
emscripten_wasm_eh
feature="default"
fmt_debug="full"
overflow_checks
panic="unwind"
relocation_model="pic"
target_abi=""
target_arch="x86_64"
target_endian="little"
target_env="gnu"
target_family="unix"
target_feature="fxsr"
target_feature="sse"
target_feature="sse2"
target_feature="x87"
target_has_atomic
target_has_atomic="16"
target_has_atomic="32"
target_has_atomic="64"
target_has_atomic="8"
target_has_atomic="ptr"
target_has_atomic_load_store
target_has_atomic_load_store="16"
target_has_atomic_load_store="32"
target_has_atomic_load_store="64"
target_has_atomic_load_store="8"
target_has_atomic_load_store="ptr"
target_has_atomic_primitive_alignment="16"
target_has_atomic_primitive_alignment="32"
target_has_atomic_primitive_alignment="64"
target_has_atomic_primitive_alignment="8"
target_has_atomic_primitive_alignment="ptr"
target_has_reliable_f128
target_has_reliable_f16
target_has_reliable_f16_math
target_object_format="elf"
target_os="linux"
target_pointer_width="64"
target_thread_local
target_vendor="unknown"
ub_checks
unix
[[92mInfo[39m ] Imported: /home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/m.llbc
[[92mInfo[39m ] Generated: /home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/M.lean
[[92mInfo[39m ] Generated: /home/leanagent/math/.trellis-viewer/create-jobs/dec2flt/native/generations/0001/dec2flt-r0001-preparation/.trellis/modeling/exports/dec2flt-r0001-1c8836879e0e/extraction/extract.r_kom8bq/gen/translation.json
[[93mWarn[39m ] The crate contains extracted external, unknown definitions: we advise using the option -split-files to allow manually providing these definitions in separate files.
[[92mInfo[39m ] Total execution time: 7.245881 seconds
reference/model-evidence/adaptation-constants-probe.rs
fn main() {
let largest_power_of_ten = (1024_f64 / std::f64::consts::LOG2_10) as i32;
let log2_5 = std::f64::consts::LOG2_10 - 1.0;
let max_exponent_fast_path = (53_f64 / log2_5) as i64;
let max_exponent_disguised =
max_exponent_fast_path + (53_f64 / std::f64::consts::LOG2_10) as i64;
println!("largest_power_of_ten={largest_power_of_ten}");
println!("max_exponent_fast_path={max_exponent_fast_path}");
println!("max_exponent_disguised={max_exponent_disguised}");
println!("neg_nan={:016x}", (-f64::NAN).to_bits());
for (exponent, value) in IntoIterator::into_iter([
1e0_f64, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11,
1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, 1e20, 1e21, 1e22,
])
.enumerate()
{
println!("pow10_{exponent}={:016x}", value.to_bits());
}
}
reference/model-evidence/binary64-boundary.txt
Primary evidence for the binary64 boundary
==========================================
Scope and identities
--------------------
This record concerns the frozen x86_64-unknown-linux-gnu extraction, the
adapted Rust crate retained in this repository, and the installed toolchain
named by modeling-input/SETUP.md. The probe source is retained at
reference/model-evidence/binary64-probe.rs; no scratch source is required to
reproduce it.
Toolchain executable:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
Target:
x86_64-unknown-linux-gnu
rustc executable SHA-256:
162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
Probe source SHA-256:
68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
Compiled probe SHA-256:
f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
Frozen generated.lean SHA-256:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692
Frozen modeling-input/manifest.json SHA-256:
2fc182c0c7acccad30c449ca349b999759b84e8ed4ec9d590e8295e43eeec077
Approved Binary64ModelDefault.lean SHA-256 at the time of this record:
03ae48fb631e6242bd21bf95d0481b66acae05f8cab343c7ab279b3c116538a3
Exact reproduction commands
---------------------------
Run from the repository root:
R=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
P=reference/model-evidence/binary64-probe.rs
B=.trellis/scratch/binary64-probe
"$R" --version --verbose
sha256sum "$R"
sha256sum "$P"
"$R" --target x86_64-unknown-linux-gnu -C opt-level=0 "$P" -o "$B"
sha256sum "$B"
"$B"
Raw output
----------
rustc 1.98.0-nightly (14210df0e 2026-05-31)
binary: rustc
commit-hash: 14210df0e27ccd7d9e6a05b8085cbd438e4bbc65
commit-date: 2026-05-31
host: x86_64-unknown-linux-gnu
release: 1.98.0-nightly
LLVM version: 22.1.6
rustc_sha256=162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
probe_sha256=68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e
binary_sha256=f49942b5558d9073d879c724067a771cddd07f1543efc6d1d8ee691f8e25a322
target_arch=x86_64
mantissa_digits=53
exponent_mask=7ff0000000000000
mantissa_mask=000fffffffffffff
nan=7ff8000000000000
infinity=7ff0000000000000
neg_infinity=fff0000000000000
nan_category=Nan
infinity_category=Infinite
zero_category=Zero
subnormal_category=Subnormal
normal_category=Normal
from_bits_to_bits=7ff0000000000001
neg_payload_nan=fff0000000000001
neg_zero=8000000000000000
subnormal_tie_to_even_zero=0000000000000000
subnormal_tie_to_even_two=0000000000000002
normal_division=3fb999999999999a
mul_negative_zero=8000000000000000
div_negative_zero=8000000000000000
div_negative_infinity=fff0000000000000
mul_overflow=7ff0000000000000
mul_zero_infinity_is_nan=true
div_zero_zero_is_nan=true
mul_nan_is_nan=true
cast_2_pow_53=4340000000000000
cast_2_pow_53_plus_1=4340000000000000
Pinned Rust library sources
---------------------------
The installed sources below belong to the same named toolchain. Their
SHA-256 identities are:
core/src/primitive_docs.rs
c4b8627dd67d5dac8f383f383a9e7ff1229ea43e7599610fc61988694cf0f3e5
core/src/num/f64.rs
84540a6a59e347c63caabe12cf895ba1239c76a50682471567007138fac1c618
core/src/clone.rs
23f9cfc80347fde6b8457d46fbf7a2b8d9f34c8c58601b0b6f714ca2f6d1976b
The exact relevant text of core/src/primitive_docs.rs is:
#[rustc_doc_primitive = "f64"]
#[doc(alias = "double")]
/// A 64-bit floating-point type (specifically, the "binary64" type defined in IEEE 754-2008).
///
/// This type is very similar to [`prim@f32`], but has increased precision by using twice as many
/// bits. Please see [the documentation for `f32`](prim@f32) or [Wikipedia on double-precision
/// values][wikipedia] for more information.
The referenced primitive-f32 documentation supplies the common primitive
floating-point operation rules quoted next:
/// - −0.0: IEEE 754 floating-point numbers have a bit that indicates their sign, so −0.0 is a
/// possible value. For comparison −0.0 = +0.0, but floating-point operations can carry
/// the sign bit through arithmetic operations. This means −0.0 × +0.0 produces −0.0 and
/// a negative number rounded to a value smaller than a float can represent also produces −0.0.
/// - [∞](#associatedconstant.INFINITY) and
/// [−∞](#associatedconstant.NEG_INFINITY): these result from calculations
/// like `1.0 / 0.0`.
///
/// When a primitive operation (addition, subtraction, multiplication, or
/// division) is performed on this type, the result is rounded according to the
/// roundTiesToEven direction defined in IEEE 754-2008. That means:
///
/// - The result is the representable value closest to the true value, if there
/// is a unique closest representable value.
/// - If the true value is exactly half-way between two representable values,
/// the result is the one with an even least-significant binary digit.
/// - If the true value's magnitude is ≥ `f32::MAX` + 2<sup>(`f32::MAX_EXP` −
/// `f32::MANTISSA_DIGITS` − 1)</sup>, the result is ∞ or −∞ (preserving the
/// true value's sign).
The same file explicitly separates arithmetic NaN choice from exact bitwise
operations; its exact relevant text is:
/// The rules for NaN values differ between *arithmetic* and *non-arithmetic* (or "bitwise")
/// operations. The non-arithmetic operations are unary `-`, `abs`, `copysign`, `signum`,
/// `{to,from}_bits`, `{to,from}_{be,le,ne}_bytes` and `is_sign_{positive,negative}`. These
/// operations are guaranteed to exactly preserve the bit pattern of their input except for possibly
/// changing the sign bit.
///
/// The following rules apply when a NaN value is returned from an arithmetic operation:
/// - The result has a non-deterministic sign.
/// - The quiet bit and payload are non-deterministically chosen from
/// the following set of options:
///
/// - **Preferred NaN**: The quiet bit is set and the payload is all-zero.
/// - **Quieting NaN propagation**: The quiet bit is set and the payload is copied from any input
/// operand that is a NaN. If the inputs and outputs do not have the same payload size (i.e., for
/// `as` casts), then
/// - If the output is smaller than the input, low-order bits of the payload get dropped.
/// - If the output is larger than the input, the payload gets filled up with 0s in the low-order
/// bits.
/// - **Unchanged NaN propagation**: The quiet bit and payload are copied from any input operand
/// that is a NaN. If the inputs and outputs do not have the same size (i.e., for `as` casts), the
/// same rules as for "quieting NaN propagation" apply, with one caveat: if the output is smaller
/// than the input, dropping the low-order bits may result in a payload of 0; a payload of 0 is not
/// possible with a signaling NaN (the all-0 significand encodes an infinity) so unchanged NaN
/// propagation cannot occur with some inputs.
/// - **Target-specific NaN**: The quiet bit is set and the payload is picked from a target-specific
/// set of "extra" possible NaN payloads. The set can depend on the input operand values.
/// See the table below for the concrete NaNs this set contains on various targets.
///
/// | `target_arch` | Extra payloads possible on this platform |
/// |---------------|------------------------------------------|
/// | `aarch64`, `arm`, `arm64ec`, `loongarch64`, `powerpc` (except when `target_abi = "spe"`), `powerpc64`, `riscv32`, `riscv64`, `s390x`, `x86`, `x86_64` | None |
Thus the model's preferred quiet NaN is one permitted result whenever
multiplication or division returns NaN. This does not claim that arbitrary
Rust arithmetic NaNs have those exact bits. By contrast, unary negation and
bit conversion must preserve all non-sign bits exactly, including for every
NaN payload.
The exact relevant declarations in core/src/num/f64.rs are:
pub const MANTISSA_DIGITS: u32 = 53;
pub const NAN: f64 = 0.0_f64 / 0.0_f64;
pub const INFINITY: f64 = 1.0_f64 / 0.0_f64;
pub const NEG_INFINITY: f64 = -1.0_f64 / 0.0_f64;
pub const SIGN_MASK: u64 = 0x8000_0000_0000_0000;
pub const EXPONENT_MASK: u64 = 0x7ff0_0000_0000_0000;
pub const MANTISSA_MASK: u64 = 0x000f_ffff_ffff_ffff;
pub const fn classify(self) -> FpCategory {
// We used to have complicated logic here that avoids the simple bit-based tests to work
// around buggy codegen for x87 targets (see
// https://github.com/rust-lang/rust/issues/114479). However, some LLVM versions later, none
// of our tests is able to find any difference between the complicated and the naive
// version, so now we are back to the naive version.
let b = self.to_bits();
match (b & Self::MANTISSA_MASK, b & Self::EXPONENT_MASK) {
(0, Self::EXPONENT_MASK) => FpCategory::Infinite,
(_, Self::EXPONENT_MASK) => FpCategory::Nan,
(0, 0) => FpCategory::Zero,
(_, 0) => FpCategory::Subnormal,
_ => FpCategory::Normal,
}
}
pub const fn to_bits(self) -> u64 {
// SAFETY: `u64` is a plain old datatype so we can always transmute to it.
unsafe { mem::transmute(self) }
}
pub const fn from_bits(v: u64) -> Self {
// It turns out the safety issues with sNaN were overblown! Hooray!
// SAFETY: `u64` is a plain old datatype so we can always transmute from it.
unsafe { mem::transmute(v) }
}
The exact scalar clone body in core/src/clone.rs is:
impl const Clone for $t {
#[inline(always)]
fn clone(&self) -> Self {
*self
}
}
Frozen adapted source
---------------------
The relevant retained source file hashes are:
crate/traits.rs
9013270fb846edcb0bdf2abd0353f575fdd727974cba9e89bdab8bb4c2b4f0bf
crate/dec2flt/mod.rs
b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012
crate/dec2flt/parse.rs
50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f
crate/dec2flt/decimal.rs
633658be803b7369b18feb098a8aa1b5f714a933d3b79ecbc4899a1b05f35beb
crate/dec2flt/lemire.rs
fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1
crate/dec2flt/slow.rs
93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485
Exact constant and bit-conversion excerpt from crate/traits.rs:
impl Float for f64 {
type Int = u64;
const INFINITY: Self = Self::INFINITY;
const NEG_INFINITY: Self = Self::NEG_INFINITY;
const NAN: Self = Self::NAN;
// Bit-identical to the upstream `-f64::NAN`, without the unsupported
// compile-time float negation.
const NEG_NAN: Self = f64::from_bits(0xFFF8_0000_0000_0000);
const BITS: u32 = 64;
const SIG_TOTAL_BITS: u32 = Self::MANTISSA_DIGITS;
const EXP_MASK: Self::Int = Self::EXPONENT_MASK;
const SIG_MASK: Self::Int = Self::MANTISSA_MASK;
fn to_bits(self) -> Self::Int {
self.to_bits()
}
fn classify(self) -> FpCategory {
self.classify()
}
}
impl FloatExt for f64 {
#[inline]
fn from_u64_bits(v: u64) -> Self {
f64::from_bits(v)
}
Exact derived-constant defaults from crate/traits.rs:
/// The number of bits in the significand, *excluding* the hidden bit.
const SIG_BITS: u32 = Self::SIG_TOTAL_BITS - 1;
/// Number of bits in the exponent.
const EXP_BITS: u32 = Self::BITS - Self::SIG_BITS - 1;
/// The saturated (maximum bitpattern) value of the exponent, i.e. the infinite
/// representation.
///
/// This shifted fully right, use `EXP_MASK` for the shifted value.
const EXP_SAT: u32 = (1 << Self::EXP_BITS) - 1;
/// Signed version of `EXP_SAT` since we convert a lot.
const INFINITE_POWER: i32 = Self::EXP_SAT as i32;
/// The exponent bias value. This is also the maximum value of the exponent.
const EXP_BIAS: u32 = Self::EXP_SAT >> 1;
/// Minimum exponent value of normal values.
const EXP_MIN: i32 = -(Self::EXP_BIAS as i32 - 1);
Together with the f64-instance lines `BITS = 64` and
`SIG_TOTAL_BITS = Self::MANTISSA_DIGITS` in the preceding excerpt, these
defaults derive SIG_BITS, EXP_MIN, and INFINITE_POWER from the primitive
mantissa-digit constant rather than introducing independent parameters.
Exact checked cast excerpt from crate/dec2flt/mod.rs:
#[inline]
// This method is precisely the source `u64 as f64` primitive conversion.
// Aeneas cannot translate that cast; opacity is confined to the cast while
// the fast-path algorithm, its range proof obligation, and all calls stay
// visible in the extracted model.
#[charon::opaque]
fn from_u64(v: u64) -> Self {
debug_assert!(v <= Self::MAX_MANTISSA_FAST_PATH);
v as _
}
Here MAX_MANTISSA_FAST_PATH is the retained default 1 << 53. Therefore the
source succeeds only through the modeled branch v <= 2^53 in this debug
configuration; above it the debug assertion fails before the cast. On the
successful branch every integer is exactly representable, so the source cast
and the model rounder return the same word.
Exact power-table and assembly excerpts from crate/dec2flt/mod.rs:
/// Maximum mantissa for the fast-path (`1 << 53` for f64).
const MAX_MANTISSA_FAST_PATH: u64 = 1 << Self::SIG_TOTAL_BITS;
const MAX_EXPONENT_FAST_PATH: i64 = 22;
const MIN_EXPONENT_FAST_PATH: i64 = -Self::MAX_EXPONENT_FAST_PATH;
const MAX_EXPONENT_DISGUISED_FAST_PATH: i64 = 37;
fn pow10_fast_path(exponent: usize) -> Self {
// These bit patterns are exactly the source table's rounded binary64
// literals. The match is the same masked lookup; it merely keeps float
// constants out of Aeneas's unsupported constant interpreter.
match exponent & 31 {
0 => f64::from_bits(0x3FF0_0000_0000_0000),
1 => f64::from_bits(0x4024_0000_0000_0000),
2 => f64::from_bits(0x4059_0000_0000_0000),
3 => f64::from_bits(0x408F_4000_0000_0000),
4 => f64::from_bits(0x40C3_8800_0000_0000),
5 => f64::from_bits(0x40F8_6A00_0000_0000),
6 => f64::from_bits(0x412E_8480_0000_0000),
7 => f64::from_bits(0x4163_12D0_0000_0000),
8 => f64::from_bits(0x4197_D784_0000_0000),
9 => f64::from_bits(0x41CD_CD65_0000_0000),
10 => f64::from_bits(0x4202_A05F_2000_0000),
11 => f64::from_bits(0x4237_4876_E800_0000),
12 => f64::from_bits(0x426D_1A94_A200_0000),
13 => f64::from_bits(0x42A2_309C_E540_0000),
14 => f64::from_bits(0x42D6_BCC4_1E90_0000),
15 => f64::from_bits(0x430C_6BF5_2634_0000),
16 => f64::from_bits(0x4341_C379_37E0_8000),
17 => f64::from_bits(0x4376_3457_85D8_A000),
18 => f64::from_bits(0x43AB_C16D_674E_C800),
19 => f64::from_bits(0x43E1_58E4_6091_3D00),
20 => f64::from_bits(0x4415_AF1D_78B5_8C40),
21 => f64::from_bits(0x444B_1AE4_D6E2_EF50),
22 => f64::from_bits(0x4480_F0CF_064D_D592),
_ => f64::from_bits(0),
}
}
fn biased_fp_to_float<F: FloatExt>(x: BiasedFp) -> F {
let mut word = x.m;
word |= (x.p_biased as u64) << F::SIG_BITS;
F::from_u64_bits(word)
}
Exact native-call excerpt from crate/dec2flt/decimal.rs:
fn can_use_fast_path<F: Lemire>(&self) -> bool {
F::MIN_EXPONENT_FAST_PATH <= self.exponent
&& self.exponent <= F::MAX_EXPONENT_DISGUISED_FAST_PATH
&& self.mantissa <= F::MAX_MANTISSA_FAST_PATH
&& !self.many_digits
}
if !self.can_use_fast_path::<F>() {
return None;
}
let value = if self.exponent <= F::MAX_EXPONENT_FAST_PATH {
// normal fast path
let value = F::from_u64(self.mantissa);
if self.exponent < 0 {
// Explicit trait calls preserve Rust arithmetic and resolve
// the generic output type that Charon leaves ambiguous.
core::ops::Div::div(value, F::pow10_fast_path((-self.exponent) as _))
} else {
core::ops::Mul::mul(value, F::pow10_fast_path(self.exponent as _))
}
} else {
// disguised fast path
let shift = self.exponent - F::MAX_EXPONENT_FAST_PATH;
let mantissa = self.mantissa.checked_mul(INT_POW10[shift as usize])?;
if mantissa > F::MAX_MANTISSA_FAST_PATH {
return None;
}
core::ops::Mul::mul(
F::from_u64(mantissa),
F::pow10_fast_path(F::MAX_EXPONENT_FAST_PATH as _),
)
};
if self.negative {
Some(core::ops::Neg::neg(value))
} else {
Some(value)
}
The preceding can_use_fast_path body, together with
MAX_MANTISSA_FAST_PATH = 1 << SIG_TOTAL_BITS and SIG_TOTAL_BITS = 53 for f64,
requires the exponent to lie between -22 and 37, the input mantissa to be at
most 2^53, and many_digits to be false. Consequently an ordinary arithmetic
call has a from_u64 operand in 0..=2^53. In its negative-exponent arm,
`-self.exponent` lies in 1..=22; in its nonnegative arm, `self.exponent` lies
in 0..=22. The disguised branch checks its multiplied mantissa against 2^53
before from_u64 and uses table index 22. The paired statement
Binary64NativeCallDomain does not assert this source reachability. It says
conditionally that a from_u64 argument at most 2^53 succeeds with a finite,
non-NaN word and that a table index at most 22 succeeds with a positive,
nonzero, finite, non-NaN word. Applying that conditional statement to the
guards just derived establishes those properties for the actual ordinary and
disguised calls, and in particular establishes that every executed divisor is
nonzero.
Exact special-value excerpt from crate/dec2flt/parse.rs:
let float = match (register, len) {
(INF_3, 3) => F::INFINITY,
(INF_8, 8) => F::INFINITY,
(NAN, 3) => F::NAN,
_ => return None,
};
if negative { Some(-float) } else { Some(float) }
Thus the executed special route is INFINITY or NAN followed by conditional
negation; it does not select NEG_INFINITY or NEG_NAN directly.
The number helper has the exact source body
pub fn parse_number(s: &[u8]) -> Option<Decimal> {
if let Some((float, rest)) = parse_partial_number(s) {
if rest == s.len() {
return Some(float);
}
}
None
}
It returns only the Decimal produced by parse_partial_number; there is no
float type parameter or float operation at this boundary.
The integer-tier helper has the source type and exact executable excerpts
below (long explanatory comments are elided). In particular it returns a raw
BiasedFp and contains no from_u64 cast, primitive float multiplication,
division, negation, or from_bits call:
pub fn compute_float<F: Float>(q: i64, mut w: u64) -> BiasedFp {
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let fp_error = BiasedFp::zero_pow2(-1);
// Short-circuit if the value can only be a literal 0 or infinity.
if w == 0 || q < F::SMALLEST_POWER_OF_TEN as i64 {
return fp_zero;
} else if q > F::LARGEST_POWER_OF_TEN as i64 {
return fp_inf;
}
// Normalize our significant digits, so the most-significant bit is set.
let lz = w.leading_zeros();
w <<= lz;
let (lo, hi) = compute_product_approx(q, w, F::SIG_BITS as usize + 3);
if lo == 0xFFFF_FFFF_FFFF_FFFF {
let inside_safe_exponent = (q >= -27) && (q <= 55);
if !inside_safe_exponent {
return fp_error;
}
}
let upperbit = (hi >> 63) as i32;
let mut mantissa = hi >> (upperbit + 64 - F::SIG_BITS as i32 - 3);
let mut power2 = power(q as i32) + upperbit - lz as i32 - F::EXP_MIN + 1;
if power2 <= 0 {
if -power2 + 1 >= 64 {
// Have more than 64 bits below the minimum exponent, must be 0.
return fp_zero;
}
// Have a subnormal value.
mantissa >>= -power2 + 1;
mantissa += mantissa & 1;
mantissa >>= 1;
power2 = (mantissa >= (1_u64 << F::SIG_BITS)) as i32;
return BiasedFp { m: mantissa, p_biased: power2 };
}
// Need to handle rounding ties. Normally, we need to round up,
// but if we fall right in between and we have an even basis, we
// need to round down.
if lo <= 1
&& q >= F::MIN_EXPONENT_ROUND_TO_EVEN as i64
&& q <= F::MAX_EXPONENT_ROUND_TO_EVEN as i64
&& mantissa & 0b11 == 0b01
&& (mantissa << (upperbit + 64 - F::SIG_BITS as i32 - 3)) == hi
{
// Zero the lowest bit, so we don't round up.
mantissa &= !1_u64;
}
// Round-to-even, then shift the significant digits into place.
mantissa += mantissa & 1;
mantissa >>= 1;
if mantissa >= (2_u64 << F::SIG_BITS) {
// Rounding up overflowed, so the carry bit is set. Set the
// mantissa to 1 (only the implicit, hidden bit is set) and
// increase the exponent.
mantissa = 1_u64 << F::SIG_BITS;
power2 += 1;
}
// Zero out the hidden bit.
mantissa &= !(1_u64 << F::SIG_BITS);
if power2 >= F::INFINITE_POWER {
// Exponent is above largest normal value, must be infinite.
return fp_inf;
}
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact slow-tier source body from crate/dec2flt/slow.rs:
pub(crate) fn parse_long_mantissa<F: Float>(s: &[u8]) -> BiasedFp {
const MAX_SHIFT: usize = 60;
const NUM_POWERS: usize = 19;
const POWERS: [u8; 19] =
[0, 3, 6, 9, 13, 16, 19, 23, 26, 29, 33, 36, 39, 43, 46, 49, 53, 56, 59];
let get_shift = |n| {
if n < NUM_POWERS { POWERS[n] as usize } else { MAX_SHIFT }
};
let fp_zero = BiasedFp::zero_pow2(0);
let fp_inf = BiasedFp::zero_pow2(F::INFINITE_POWER);
let mut d = parse_decimal_seq(s);
// Short-circuit if the value can only be a literal 0 or infinity.
if d.num_digits == 0 || d.decimal_point < -324 {
return fp_zero;
} else if d.decimal_point >= 310 {
return fp_inf;
}
let mut exp2 = 0_i32;
let mut loop_result = None;
// Shift right toward (1/2 ... 1].
while d.decimal_point > 0 && loop_result.is_none() {
let n = d.decimal_point as usize;
let shift = get_shift(n);
d.right_shift(shift);
if d.decimal_point < -DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_zero);
} else {
exp2 += shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// Shift left toward (1/2 ... 1].
while d.decimal_point <= 0 && loop_result.is_none() {
let shift = if d.decimal_point == 0 {
match d.digits[0] {
digit if digit >= 5 => break,
0 | 1 => 2,
_ => 1,
}
} else {
get_shift((-d.decimal_point) as _)
};
d.left_shift(shift);
if d.decimal_point > DecimalSeq::DECIMAL_POINT_RANGE {
loop_result = Some(fp_inf);
} else {
exp2 -= shift as i32;
}
}
if let Some(result) = loop_result {
return result;
}
// We are now in the range [1/2 ... 1] but the binary format uses [1 ... 2].
exp2 -= 1;
while F::EXP_MIN > exp2 {
let mut n = (F::EXP_MIN - exp2) as usize;
if n > MAX_SHIFT {
n = MAX_SHIFT;
}
d.right_shift(n);
exp2 += n as i32;
}
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
// Shift the decimal to the hidden bit, and then round the value
// to get the high mantissa+1 bits.
d.left_shift(F::SIG_BITS as usize + 1);
let mut mantissa = d.round();
if mantissa >= (1_u64 << (F::SIG_BITS + 1)) {
// Rounding up overflowed to the carry bit, need to
// shift back to the hidden bit.
d.right_shift(1);
exp2 += 1;
mantissa = d.round();
if (exp2 - F::EXP_MIN + 1) >= F::INFINITE_POWER {
return fp_inf;
}
}
let mut power2 = exp2 - F::EXP_MIN + 1;
if mantissa < (1_u64 << F::SIG_BITS) {
power2 -= 1;
}
// Zero out all the bits above the explicit mantissa bits.
mantissa &= (1_u64 << F::SIG_BITS) - 1;
BiasedFp { m: mantissa, p_biased: power2 }
}
Exact final numeric-sign excerpt from crate/dec2flt/mod.rs:
let assembled_word = fp.m | ((fp.p_biased as u64) << F::SIG_BITS);
let assembly_result = biased_fp_to_float::<F>(fp);
let lexical_sign_applied = num.negative;
let result = if lexical_sign_applied {
core::ops::Neg::neg(assembly_result)
} else {
assembly_result
};
Thus a numeric execution that reaches the integer/slow selection route
assembles its selected pair with from_bits through biased_fp_to_float and only
then conditionally negates it. A successful try_fast_path returns earlier and
does not perform this assembly. compute_float and parse_long_mantissa produce
raw BiasedFp pairs and do not call from_u64, primitive float multiplication,
division, negation, or from_bits; they do, however, execute constants derived
from SIG_TOTAL_BITS before producing those pairs.
Retained structural-boundary evidence
-------------------------------------
Several adjacent structural bindings cite this same evidence record. Their
pinned library source identities are:
core/src/num/mod.rs
f0820f9dfb94999440c8cb4a349736fa21df7e5668e19b6b49e016ff67c05ce3
core/src/option.rs
7cf61204b05d98a95bc2e322d5fbfc1f4f91505109971917d9a7fb47151c50e6
core/src/slice/mod.rs
354992a6a3d69a0185eef9044a07ea5180e767bdb467aef55e69ee3d44317840
core/src/str/mod.rs
284b4c147b5d0497ce9146f6b96e564f196aed10411a62cdccf5fc5243d40f78
Exact ASCII-digit body from core/src/num/mod.rs:
pub const fn is_ascii_digit(&self) -> bool {
matches!(*self, b'0'..=b'9')
}
Exact Option control-flow bodies from core/src/option.rs:
fn branch(self) -> ControlFlow<Self::Residual, Self::Output> {
match self {
Some(v) => ControlFlow::Continue(v),
None => ControlFlow::Break(None),
}
}
fn from_residual(residual: Option<convert::Infallible>) -> Self {
match residual {
None => None,
}
}
Exact slice observation bodies from core/src/slice/mod.rs:
pub const fn first(&self) -> Option<&T> {
if let [first, ..] = self { Some(first) } else { None }
}
pub const fn split_first(&self) -> Option<(&T, &[T])> {
if let [first, tail @ ..] = self { Some((first, tail)) } else { None }
}
Exact string-byte body from core/src/str/mod.rs:
pub const fn as_bytes(&self) -> &[u8] {
// SAFETY: const sound because we transmute two types with the same layout
unsafe { mem::transmute(self) }
}
reference/model-evidence/binary64-probe.rs
#![feature(float_masks)]
use std::num::FpCategory;
fn bits(label: &str, value: f64) {
println!("{label}={:016x}", value.to_bits());
}
fn main() {
println!("target_arch={}", std::env::consts::ARCH);
println!("mantissa_digits={}", f64::MANTISSA_DIGITS);
println!("exponent_mask={:016x}", f64::EXPONENT_MASK);
println!("mantissa_mask={:016x}", f64::MANTISSA_MASK);
bits("nan", f64::NAN);
bits("infinity", f64::INFINITY);
bits("neg_infinity", f64::NEG_INFINITY);
for (label, value) in [
("nan_category", f64::NAN),
("infinity_category", f64::INFINITY),
("zero_category", 0.0),
("subnormal_category", f64::from_bits(1)),
("normal_category", 1.0),
] {
let category = match value.classify() {
FpCategory::Nan => "Nan",
FpCategory::Infinite => "Infinite",
FpCategory::Zero => "Zero",
FpCategory::Subnormal => "Subnormal",
FpCategory::Normal => "Normal",
};
println!("{label}={category}");
}
let payload_nan_word = 0x7ff0_0000_0000_0001_u64;
println!(
"from_bits_to_bits={:016x}",
f64::from_bits(payload_nan_word).to_bits()
);
bits("neg_payload_nan", -f64::from_bits(payload_nan_word));
bits("neg_zero", -0.0);
bits("subnormal_tie_to_even_zero", f64::from_bits(1) * 0.5);
bits("subnormal_tie_to_even_two", f64::from_bits(3) * 0.5);
bits("normal_division", 1.0 / 10.0);
bits("mul_negative_zero", -0.0 * 2.0);
bits("div_negative_zero", -1.0 / f64::INFINITY);
bits("div_negative_infinity", 1.0 / -0.0);
bits("mul_overflow", f64::MAX * (1.0 + f64::EPSILON));
println!("mul_zero_infinity_is_nan={}", (0.0 * f64::INFINITY).is_nan());
println!("div_zero_zero_is_nan={}", (0.0_f64 / 0.0_f64).is_nan());
println!("mul_nan_is_nan={}", (f64::NAN * 1.0).is_nan());
bits("cast_2_pow_53", (1_u64 << 53) as f64);
bits("cast_2_pow_53_plus_1", ((1_u64 << 53) + 1) as f64);
}
reference/model-evidence/setup-reproduction.txt
Fresh extraction and composition evidence for Preamble
======================================================
Scope
-----
This record was produced from the repository root on 2026-09-24. It records
the current frozen extraction configuration and a fresh execution of the
Cargo, Charon, and Aeneas stages. It is evidence about the bytes and commands
used to build the model, not evidence that any supplied GOAL is true.
Pinned configuration
--------------------
modeling-input/extraction.json contains exactly:
{
"crate": "crate",
"cargo_args": [],
"charon_args": [],
"aeneas_args": []
}
crate/Cargo.toml:5-22 names one edition-2024 library package, gives the
"default" feature an empty definition, gives "optimize_for_size" a distinct
feature, and sets overflow-checks=true in both development and release
profiles. The fresh run used the development profile. The configuration
probe below reported debug_assertions, overflow_checks, target_arch="x86_64",
target_pointer_width="64", target_env="gnu", and target_feature="sse2"; it
did not report feature="optimize_for_size". Its final Cargo line was:
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.08s
The exact probe command was:
env RUSTUP_TOOLCHAIN=nightly-2026-06-01 \
CARGO_TARGET_DIR=.trellis/scratch/preamble-cfg-target \
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/cargo \
rustc --offline \
--manifest-path .trellis/scratch/provenance-evidence-1790263924955098840/extraction/source/Cargo.toml \
--lib -- --print cfg
The materialized source used by that command is the source copy made by the
fresh extraction run described below. Relevant raw stdout was:
debug_assertions
feature="default"
overflow_checks
target_arch="x86_64"
target_endian="little"
target_env="gnu"
target_family="unix"
target_feature="sse"
target_feature="sse2"
target_feature="x87"
target_os="linux"
target_pointer_width="64"
Tool identities
---------------
These are the executable identities in modeling-input/tool-identities.json,
rechecked with sha256sum:
cargo
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/cargo
54e05dce8c9ca2f638cc3d87ec1a19425b5d0bf1f31aeb48cf4792aec5cadf27
cargo 1.98.0-nightly (fbb61be30 2026-05-26)
rustc
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
162c2a2d2d89b94e5bc2ec6b179a49d12a7ea1527db9ff1df20b5d09c432924b
rustc 1.98.0-nightly (14210df0e 2026-05-31), LLVM 22.1.6
rustdoc
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustdoc
2bf660d140310e28146e2c002dc6fcabd957c0a3b740be0419e6f8e5a9c87523
rustdoc 1.98.0-nightly (14210df0e 2026-05-31)
Charon
/home/leanagent/pv_spike/tools/charon/bin/charon
6490034f368ce98f3e7ae5a28bf71ed56d03bdf1e3712e71376b96fc55baeade
Charon 0.1.216, toolchain nightly-2026-06-01
Aeneas
/home/leanagent/pv_spike/tools/aeneas/bin/aeneas
9f446d2aaf59e8e705e36d05cb993f1c6ab0e97f8dc6fd2f19907a86ede30922
aeneas fa699427
Lean
/home/leanagent/.elan/toolchains/leanprover--lean4---v4.30.0-rc2/bin/lean
3e0d0d3d801675359f2d4cf9815bfdb417b20b92fdd9d48b3b14c95bbae28bbf
Lean 4.30.0-rc2, commit 3dc1a088b6d2d8eafe25a7cd7ec7b58d731bd7cc
Fresh extraction
----------------
The public reproduction command recorded by modeling-input/manifest.json is:
python3 .trellis/scripts/pv_modeling.py check-native . --fresh
For this record the same check_provenance implementation was invoked directly
so that its complete result could be retained without the CLI's bounded JSON
preview. It wrote:
.trellis/scratch/provenance-evidence-1790263924955098840/provenance.json
.trellis/scratch/provenance-evidence-1790263924955098840/extraction/observation.json
The extractor instantiated the empty argument lists above as these commands
(the output and cache paths are those beneath that scratch directory):
<cargo> check --offline
<charon> cargo --preset=aeneas --dest-file Generated/m.llbc -- --offline
<aeneas> -backend lean -dest Generated -emit-json Generated/m.llbc
The observation records exit code 0 for Cargo, Charon, and Aeneas. Cargo's raw
terminal result was:
Checking dec2flt-model v0.1.0 (.../extraction/source)
warning: feature `f16` is declared but not used
warning: `dec2flt-model` (lib) generated 1 warning
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.14s
Charon's raw terminal result was:
Compiling dec2flt-model v0.1.0 (.../extraction/source)
warning: feature `f16` is declared but not used
warning: `dec2flt-model` (lib) generated 1 warning
Finished `dev` profile [unoptimized + debuginfo] target(s) in 15.24s
Aeneas reported 203 prepasses, 50 globals, 87 opaque functions, 107
transparent functions, 49 trait declarations, and 85 trait implementations.
Its raw terminal result ended:
Generated: .../extraction/Generated/M.lean
Generated: .../extraction/Generated/translation.json
[Warn ] The crate contains extracted external, unknown definitions: ...
[Info ] Total execution time: 7.332373 seconds
The warning is the inventoried external boundary below. The fresh provenance
result had an empty error string, passed=true, no tool-identity differences,
and true values for every check, including fresh_extraction_succeeds,
fresh_model_export, crate_export, upstream_export, tool_identities_current,
bootstrap_receipt, and model_support_composition. The canonical current crate
tree digest reported by that result was:
b5ecf4d7e9dfa0337f1586ae0e865fbbe2dd384137ee6e2ad635f0d5d6e916a9
Generated bytes, placeholders, and axioms
-----------------------------------------
sha256sum gave the same digest for the fresh Generated/M.lean and the frozen
generated.lean:
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692
The observation's raw-source placeholder count was 0. Compiling raw M.lean
without model support fails as diagnosed because F64 and the external boundary
are absent; four "declaration uses sorry" diagnostics are Lean error-recovery
consequences for F64-valued constants, not tokens in the generated source.
The pinned compatibility report has SHA-256
557a4924d55becf1b33d7dc7f9dfdf2b675c895ce4a9b6bee8a0622378e48d6a,
checks 2225 declarations, reports no unapproved axiom, and marks only the 64
declarations downstream of the missing boundary as pending. This is why the
24 operations below have separate authored model-support owners.
External boundary
-----------------
The exact command
python3 .trellis/scripts/pv_modeling.py inspect-native .
returned declaration_count=24 and retained the full index at
.trellis/scratch/inspect-native-1790264067166282471.json. The 24 names are:
F64.Insts.CoreCloneClone.clone
core.f64.F64.MANTISSA_DIGITS
core.f64.F64.NAN
core.f64.F64.INFINITY
core.f64.F64.NEG_INFINITY
core.f64.F64.EXPONENT_MASK
core.f64.F64.MANTISSA_MASK
core.f64.F64.classify
core.f64.F64.to_bits
core.f64.F64.from_bits
core.num.U8.is_ascii_digit
F64.Insts.CoreOpsArithMulF64F64.mul
F64.Insts.CoreOpsArithDivF64F64.div
F64.Insts.CoreOpsArithNegF64.neg
U64.Insts.CoreOpsBitBitAndU64U64.bitand
U64.Insts.CoreOpsBitBitOrU64U64.bitor
U64.Insts.CoreOpsBitShlU32U64.shl
U64.Insts.CoreOpsBitShrU32U64.shr
core.option.Option.Insts.CoreOpsTry_traitTry.branch
core.option.Option.Insts.CoreOpsTry_traitFromResidualOptionInfallible.from_residual
core.slice.Slice.first
core.slice.Slice.split_first
core.str.Str.as_bytes
F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64.from_u64
Tablet/model-support.json has exactly 24 bindings, one for each name. This
record establishes completeness of that inventory and its composition; the
semantic justification for an individual binding remains the responsibility
of that binding's paired definition node.
Composition
-----------
The exact command
python3 .trellis/scripts/pv_modeling.py compose-native . --check
returned matches=true, changed=false, no mismatched files, raw extraction hash
49949682d8e6c7a75a58e7f2535322d51f0af7513b8dad0f865ff3fa4387b692,
and both expected and actual Preamble hashes
15adb2db06b06e099d17070c2a373619ecdc481e32fc78d34054cd01fc7b492a.
The complete receipt is retained at
.trellis/scratch/compose-native-1790264071122343238.json.
reference/model-evidence/source-adaptation-delta.txt
Primary inventory and preservation analysis of the upstream-to-crate delta
============================================================================
Method and complete file inventory
----------------------------------
This record compares the supplied files in upstream/ with the frozen adapted
crate/. It treats the sources and their control flow as primary evidence; it
does not use a prior route decision as semantic proof and makes no assertion
that a supplied GOAL is true. The commands used were:
find upstream crate -type f ! -path '*/target/*' -print0 | sort -z |
xargs -0 sha256sum
for each supplied file f:
cmp -s upstream/$f crate/$f
diff -U0 upstream/$f crate/$f
The concatenated contextual diff of every supplied file has SHA-256
2eb0202ba9ae8092d6727dd2f3b824c29cb160b005960ccf2b15bfb804ed1217.
The complete inventory is:
supplied path upstream SHA-256 crate SHA-256 status
dec2flt/common.rs fc64094721ff23e08fcba013154d04dec3fe986cae5ffd73a20f86049980aace 4c4be815335a7b176527b1345e662890caa48181a0a4f814594339016cab18e changed
dec2flt/decimal.rs 3c164785e1bc3f3b48aa9c212dd6c4ab535fe828523af9fa584df4c7b1e60e0d 633658be803b7369b18feb098a8aa1b5f714a933d3b79ecbc4899a1b05f35beb changed
dec2flt/decimal_seq.rs c0c1c6028e3f57cefc3de7635a94788e9180f5ebcedc7a334ec8dbac786ec788 4aa4ecf9f31970033093d73238d4f2c72d433639bbe467c0741b185807380bd9 changed
dec2flt/fpu.rs 16cf9ec154d477ab3d4184a01fb4b9ed7c59f0228cc55589d393c40a61b19d8f 16cf9ec154d477ab3d4184a01fb4b9ed7c59f0228cc55589d393c40a61b19d8f identical
dec2flt/lemire.rs fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1 fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1 identical
dec2flt/mod.rs 7198e238c554b692405537a446b3526ad66805ec2900cd0e299f10c51402a44a b073a0bb586a84d06878783656218c7a607fdaf58747035f92532609c6548012 changed
dec2flt/parse.rs 9daf21ab9445a84552535152f376eef8c30f3d5827296c0645f5952d3b22bbf1 50d95265e5b1af43ee4f0033c9ff8d1b8dfd62d766ab14668ceec19955adba1f changed
dec2flt/slow.rs 43e7aba32d7431bbf0e1bbcb4c334eaffb23eb66891c7e45abe799c5235cc0d2 93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485 changed
dec2flt/table.rs 6eb59023784bd84cb6fb074c70da8a99bef72bc2a2ea179b0da457ca1ee00abb 6eb59023784bd84cb6fb074c70da8a99bef72bc2a2ea179b0da457ca1ee00abb identical
traits.rs 66a02c44d72dfcc3ddae7e34a290e390dabaf98c5911b283d2d97f2f0075a44e 9013270fb846edcb0bdf2abd0353f575fdd727974cba9e89bdab8bb4c2b4f0bf changed
The standalone package adds four files having no supplied counterpart:
crate/Cargo.toml 2040ce5dc92c51b5245113f97682b692b876aa57708b5c7c483425ba152943c8
crate/lib.rs 1df2b8bcb2f52068d05a6343923716d0ef4475abdef34a0de3fe7cb8dc2ba95b
crate/num/mod.rs d9ac4f964d124bd4660914dc4c80bbb14f48d7851f9a8edc71a0931e9fce37b3
crate/num/imp/mod.rs df09b97393e97b23b0a558c2fcbbf4e75dd9d68338f1e83f168bab80a37a31f1
Thus fpu.rs, lemire.rs, and the complete 671-line table.rs, including their
algorithmic constants and tables, are byte-identical. The following sections
account for every other file and every changed hunk.
Namespace and error shell
-------------------------
crate/lib.rs:1-12 is a no_std crate root that re-exports core::f64 and
core::ops and introduces the same num module path expected by the supplied
slice. crate/num/imp/mod.rs:1-10 uses path attributes to place traits.rs and
dec2flt/mod.rs at core::num::imp-like module names. These declarations add no
wrapper call or computation. crate/num/mod.rs:1 re-exports
core::num::FpCategory. crate/num/mod.rs:3-26 defines a local private
FloatErrorKind and ParseFloatError shell so the standalone package can name
the parser's error type. The pursued GOALs observe only panic versus normal
return and, on normal return, the outer Result's Ok/Err discriminant; they do
not observe the private error kind or formatting. No identity is asserted
between this local shell and an unpinned core error payload.
crate/Cargo.toml:5-22 selects the package, empty default features, and
checked-overflow profiles. The configuration and fresh build are independently
reproduced in setup-reproduction.txt.
Visibility, derives, and bounds
-------------------------------
upstream/dec2flt/mod.rs:90 versus crate/dec2flt/mod.rs:90 changes only the
visibility of the existing BiasedFp import so a goal-facing caller can name the
same type. It changes neither layout nor execution.
upstream/dec2flt/common.rs:68 and decimal.rs:28 and decimal_seq.rs:17 include
Debug derives. The corresponding crate spans common.rs:48-51,
decimal.rs:28-31, and decimal_seq.rs:17-20 remove only Debug. Copy, Clone,
PartialEq, Eq, and Default used by computation remain where present, and no
accepted observation formats these records.
upstream/traits.rs:11-52 versus crate/traits.rs:11-64 removes formatting from
Int, removes a redundant Copy supertrait from CastInto, and instantiates Int
only for u64. Every call of CastInto is through Int, which still requires
Copy; all retained concrete values are primitive Copy values. The removed
u16/u32 instances are associated only with the disabled f16/f32 formats.
upstream/traits.rs:55-76 versus crate/traits.rs:67-80 removes Add, Debug,
PartialEq, PartialOrd, Default, and Clone from Float while retaining Copy, Mul,
Div, and Neg. A search of all retained generic bodies shows no call using a
removed operation. upstream/dec2flt/decimal.rs:56-89 versus
crate/dec2flt/decimal.rs:59-111 and upstream/dec2flt/mod.rs:209-256 versus
crate/dec2flt/mod.rs:352-520 add direct Div, Mul, and Neg bounds already implied
by Lemire -> Float, and replace operator notation with calls to those same
traits. Rust desugars the original /, *, and unary - to these trait calls, so
the operands, call order, result, and admitted f64 specialization are unchanged.
Exact constants, tables, and specialized decoding
-------------------------------------------------
The source formulae and decimal-literal table were evaluated directly by the
pinned rustc using the retained source
reference/model-evidence/adaptation-constants-probe.rs. The command was:
R=/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/bin/rustc
P=reference/model-evidence/adaptation-constants-probe.rs
B=.trellis/scratch/adaptation-constants-probe
"$R" --edition 2024 --target x86_64-unknown-linux-gnu -C opt-level=0 "$P" -o "$B"
sha256sum "$P" "$B"
"$B"
The source hash was
b5a4a2cba0c08053cb9a816adb1ba5dbd160bf3928bdf5ccf56b7ae83aaa2aa5
and the resulting executable hash was
b02d2f6deb675f17d0dbdc22e57a67d7692689f7a2b0d7b125556c35c4b8a4a5.
Raw output was:
largest_power_of_ten=308
max_exponent_fast_path=22
max_exponent_disguised=37
neg_nan=fff8000000000000
pow10_0=3ff0000000000000
pow10_1=4024000000000000
pow10_2=4059000000000000
pow10_3=408f400000000000
pow10_4=40c3880000000000
pow10_5=40f86a0000000000
pow10_6=412e848000000000
pow10_7=416312d000000000
pow10_8=4197d78400000000
pow10_9=41cdcd6500000000
pow10_10=4202a05f20000000
pow10_11=42374876e8000000
pow10_12=426d1a94a2000000
pow10_13=42a2309ce5400000
pow10_14=42d6bcc41e900000
pow10_15=430c6bf526340000
pow10_16=4341c37937e08000
pow10_17=4376345785d8a000
pow10_18=43abc16d674ec800
pow10_19=43e158e460913d00
pow10_20=4415af1d78b58c40
pow10_21=444b1ae4d6e2ef50
pow10_22=4480f0cf064dd592
upstream/traits.rs:134-137 computes LARGEST_POWER_OF_TEN through a Float
default, and upstream/traits.rs:175-193 gives the generic integer_decode and
the helper used by that constant. crate/traits.rs:146 makes the constant an
associated requirement; crate/traits.rs:309-359 supplies the retained f64
values and decoder after substituting BITS=64, SIG_BITS=52, EXP_BIAS=1023,
EXPONENT_MASK, MANTISSA_MASK, and the u64 operations. Each source expression
then becomes exactly the corresponding crate expression: sign is bits>>63,
exponent is (bits & mask)>>52 cast to i16, the subnormal mantissa is shifted
once, the normal mantissa receives 1<<52, and 1023+52 is subtracted. The
resulting tuple and every bit operation are unchanged. The probe output above
shows that the computed f64 LARGEST_POWER_OF_TEN is 308 and that the source
-f64::NAN word is fff8000000000000, exactly crate/traits.rs:315-327; the
independent binary64-boundary.txt record fixes the masks and primitive bit
semantics used by the decoder.
upstream/dec2flt/mod.rs:118-129 gives the two Lemire default formulae.
crate/dec2flt/mod.rs:115-128 makes them associated requirements, and the
retained f64 instance at crate/dec2flt/mod.rs:217-220 supplies 22 and 37, the
integer results of the two source formulae for 53 significand bits.
upstream/dec2flt/mod.rs:176-181 indexes a 32-entry f64 table with exponent&31.
crate/dec2flt/mod.rs:222-251 performs the same masked selection using from_bits:
cases 0 through 22 are the exact pinned binary64 words printed above for 1e0 through 1e22 and
all other cases return positive zero, as did entries 23 through 31. The full
word list and the pinned float semantics are recorded in binary64-boundary.txt.
The analogous f16/f32 replacements at crate/dec2flt/mod.rs:145-215 and
crate/traits.rs:187-307 lie under cfg(any()) and cannot enter this build.
Whole-function from_u64 opacity
-------------------------------
upstream/dec2flt/mod.rs:184-188 and crate/dec2flt/mod.rs:254-263 have the same
f64 body: the same enabled debug_assert that v <= 1<<53, followed by the same
primitive `v as f64` cast. The sole semantic-boundary annotation is
#[charon::opaque] at crate line 259, syntactically attached to the function
item. It therefore hides the entire from_u64 body from translation: neither
the debug assertion nor the cast is transparent in the extraction. The
callers, their guards, and the surrounding native-path computation remain
transparent. The fresh external inventory contains the whole method as the
single external F64.Insts.Dec2flt_modelNumImpDec2fltLemireU64.from_u64. Its
separately reviewed ModelF64FromU64 binding supplies exactly successful integer
conversion for v <= 2^53 and assertion failure otherwise.
Digit scans, slice patterns, and helper extraction
-------------------------------------------------
upstream/dec2flt/common.rs:14-53 supplies ByteSlice::parse_digits: repeatedly
split_first, wrapping-subtract ASCII zero, invoke the closure exactly when the
result is below 10, consume that byte, and stop at the first other byte.
crate/dec2flt/common.rs:11-36 removes only this method. Its complete set of
uses is replaced as follows.
* upstream/dec2flt/parse.rs:31-48 versus crate/dec2flt/parse.rs:31-58 keeps the
eight-byte loop, wrapping multiply/add, and then performs the same digit test,
accumulator update, and one-byte progress with an index. The local rename
num to chunk is lexical only.
* upstream/dec2flt/parse.rs:83-97 versus crate/dec2flt/parse.rs:131-153 expands
matches!/parse_digits into the same nonempty first-digit guard, the same
0x10000 bounded exponent update, the same first-nondigit suffix, and the same
final sign. The bound is tested before each checked multiply and addition,
exactly as in the closure.
* upstream/dec2flt/decimal_seq.rs:220-295 versus
crate/dec2flt/decimal_seq.rs:231-359 extracts parse_digits_into_seq,
parse_decimal_exponent, and count_trailing_zeros. The digit helpers use the
same wrapping byte test, forward order, try_add_digit state transition, and
0x10000 exponent guard. The reverse helper visits indices consumed_len-1
down to zero, increments only for ASCII zero, ignores a decimal point, and
stops at the first other byte, exactly the original iter().rev() loop.
In all these replacements, indexing occurs only under count<len or !is_empty,
so it has the same bounds as split_first. Slicing advances by exactly the same
one or eight bytes. No wrapping operation is replaced by checked arithmetic,
and no checked source operation is replaced by wrapping arithmetic.
upstream/dec2flt/parse.rs:155-181 versus crate/dec2flt/parse.rs:82-119 and
212-226 moves two loops into adjust_many_digit_count and parse_many_digits.
The prefix helper visits the same start bytes in the same order, performs the
same saturating_sub and checked isize subtraction, and stops on the same byte.
The retry helper makes the same first 19-digit call, tests the same threshold,
makes the same one-byte rebase and second call in the alternate branch,
computes the same offset with the same sign, casts it to i64, and performs the
same checked addition of exp_number last. Thus any large-input panic is
preserved rather than excluded.
upstream/dec2flt/decimal_seq.rs:226-295 versus
crate/dec2flt/decimal_seq.rs:284-359 replaces literal split_first patterns by
nonempty index tests. The leading-zero scans, optional decimal point, optional
exponent marker, optional exponent sign, and suffixes occur in the same order.
The crate's exp_sign*exp_num equals the source choice between exp_num and
-exp_num because exp_num is bounded by the unchanged 0x10000 guard; the final
decimal_point checked addition is in the same position. Casts of lengths to
i32 and every subsequent checked update remain unchanged, including their
large-input behavior.
Delayed returns
---------------
upstream/dec2flt/decimal_seq.rs:173-198 versus
crate/dec2flt/decimal_seq.rs:176-203 replaces one return inside right_shift's
loop by all_zero=true, exits because !all_zero is the loop guard, and returns
immediately afterward. No decimal_point, digit, index, or arithmetic update
occurs between the original and delayed return.
upstream/dec2flt/slow.rs:46-76 versus crate/dec2flt/slow.rs:46-94 replaces two
nested-loop returns by loop_result. In the zero branch it records fp_zero,
skips the source-skipped exp2 addition, exits through is_none(), and returns.
In the infinity branch it records fp_inf, skips the source-skipped exp2
subtraction, exits, and returns. On all other iterations it performs the same
shift, checked state changes, and exponent update. Lines 95-126 after these
returns are otherwise the source lines 77-110 unchanged.
Dispatcher trace and public projection
--------------------------------------
upstream/dec2flt/mod.rs:209-256 is the whole original dispatcher.
crate/dec2flt/mod.rs:285-349 declares trace data only, lines 352-505 execute the
instrumented dispatcher, and lines 507-520 define public dec2flt as its first
projection. Comparing the bodies gives the following branch-by-branch
correspondence.
* Both call as_bytes, inspect the first byte, reject empty input before a helper,
remove at most one sign, and reject a sign-only body. The trace stores the
already obtained body and Boolean sign.
* Both call parse_number first on that exact body. Only None calls
parse_inf_nan on the same body and sign. Its Some is returned directly and
its None returns invalid. The trace stores those existing Option values.
* Both overwrite only Decimal.negative, test the same compile-time
!optimize_for_size condition, call try_fast_path once, and return its Some
directly. The trace stores the copied Decimal and Option; Decimal is Copy.
* Both call compute_float first with num.exponent and num.mantissa. The crate's
second_compute_guard is exactly the first two conjuncts of the source
short-circuit. Therefore the checked mantissa+1 and second compute_float call
occur under precisely the source guard, in the same order. The same pair
comparison either retains fp or changes only p_biased to -1.
* Both test the post-comparison p_biased<0 once, call parse_long_mantissa on the
unchanged body exactly when true, and otherwise retain the same pair. The
trace records both guard and result without another helper call.
* The extra assembled_word expression is the same cast, shift, and OR performed
by biased_fp_to_float at upstream lines 202-206 and crate lines 278-282; these
integer operations neither panic nor mutate fp. Both then call assembly once
on the selected pair and apply unary negation exactly when num.negative.
Public dec2flt returns the identical Result first component.
Consequently the trace does not infer uncomputed data: it records the exact
variant; sign-stripped body and sign; numeric/special Options; fast-path input
and result; first and conditional second integer operands and results;
comparison, forced-deferral and post-comparison pair; slow guard and result;
selected pair; assembled word; pre-sign assembly word; sign-application fact;
and final word. Special and native direct returns create no selected pair.
All source call order, guards, checked arithmetic, mutable-state transitions,
panic points, and returned Result/F64 observations remain in place.
F64-only restriction
--------------------
crate/traits.rs:187-307 and crate/dec2flt/mod.rs:140-215 add cfg(any()) to the
f16/f32 Float, FloatExt, and Lemire implementations. crate/traits.rs:59-64
retains only u64 Int. The retained f64 implementations are
crate/traits.rs:309-360 and crate/dec2flt/mod.rs:217-264. Every goal-facing
function remains generic in the source and extraction, but each pursued source
subject specializes it to f64, whose associated integer is u64. There is no
dynamic format dispatch, so removing other impl blocks cannot change an f64
call, its native decision, checks, result word, NaN classification, fields, or
trace. The fresh boundary inventory in setup-reproduction.txt confirms that
no removed-format external remains.
Conclusion
----------
The inventory is exhaustive: three supplied files are identical, seven have
all hunks classified above, and the four added files are the package shell.
For the configured f64 specialization, the adapted crate has the same input
domains, branch order, guards, checked/wrapping distinction, state transitions,
panic versus normal behavior, and public/helper observations as the supplied
source. The only new observations are the trace fields, each copied from an
existing value or computed by the same pure assembly expression. This
conclusion is independent of whether any parser-correctness GOAL is true.
reference/model-evidence/source-valid-byte-slice.txt
Source-valid byte-slice domain evidence
Pinned toolchain commands, run from the repository root:
rustc --version --verbose
rustc --print cfg | rg 'target_(arch|pointer_width)'
rustc .trellis/scratch/source_valid_slice_probe.rs -o /tmp/source_valid_slice_probe
/tmp/source_valid_slice_probe
Raw configuration and probe output:
rustc 1.98.0-nightly (14210df0e 2026-05-31)
host: x86_64-unknown-linux-gnu
target_arch="x86_64"
target_pointer_width="64"
arch=x86_64
usize_bits=64
isize_max=9223372036854775807
u8_size=1
Pinned core-library source:
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:801
states that a slice is never larger than isize::MAX bytes.
The same toolchain's core/src/num/int_macros.rs:47 defines a signed
integer's MAX as the corresponding unsigned MAX shifted right by one.
/home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/mod.rs:507-510
requires the contents of a str to remain valid UTF-8 and states that using a
str whose contents are not valid UTF-8 is undefined behavior.
Consequently, on the configured 64-bit target a &[u8] has at most
9223372036854775807 elements. This is a byte-count condition only: &[u8]
does not impose UTF-8 validity or restrict the values of its u8 elements.
A Rust str has the same inherent byte-length bound and additionally consists
of valid UTF-8 bytes.
Upstream → extraction-crate adaptation diff
--- upstream/traits.rs
+++ crate/traits.rs
@@ -8,19 +8,26 @@
)]
use crate::num::FpCategory;
-use crate::{f64, fmt, ops};
+use crate::{f64, ops};
/// Lossy `as` casting between two types.
-pub trait CastInto<T: Copy>: Copy {
+// All uses are through `Int`, which independently requires `Self: Copy`, and
+// every implementation here is a primitive Copy type. Removing that redundant
+// supertrait changes no call or value but prevents Aeneas from emitting two
+// identically named `Copy` fields for `Self` and `T` in the Lean structure.
+pub trait CastInto<T: Copy> {
fn cast(self) -> T;
}
/// Collection of traits that allow us to be generic over integer size.
+// The accepted observations contain no formatting behavior. Removing the
+// `Debug` supertrait changes neither the concrete primitive integer instances
+// nor any operation used by the algorithms, so it preserves the f64
+// specialization and every inventoried observation independently of GOAL truth.
pub trait Int:
Sized
+ Clone
+ Copy
- + fmt::Debug
+ ops::Shr<u32, Output = Self>
+ ops::Shl<u32, Output = Self>
+ ops::BitAnd<Output = Self>
@@ -49,21 +56,26 @@
}
}
-int!(u16, u32, u64);
+// Only `u64` is the associated integer of the retained `f64` specialization.
+// The removed `u16`/`u32` instances served only the excluded `f16`/`f32`
+// implementations, so their removal changes no f64 public, helper, or trace
+// body, native decision, checked arithmetic, debug assertion, return value, or
+// accepted observation.
+int!(u64);
/// A helper trait to avoid duplicating basically all the conversion code for IEEE floats.
#[doc(hidden)]
+// Formatting is outside every accepted public and trace observation. `Add`,
+// equality, ordering, default construction, and cloning are also unused by all
+// retained generic bodies; only `Copy`, `Mul`, `Div`, and `Neg` are required.
+// Removing those unused requirements admits the same f64 implementation and
+// changes no f64 body, native decision, checked arithmetic, debug assertion,
+// return value, or trace observation, independently of any GOAL's truth.
pub trait Float:
Sized
+ ops::Div<Output = Self>
+ ops::Neg<Output = Self>
+ ops::Mul<Output = Self>
- + ops::Add<Output = Self>
- + fmt::Debug
- + PartialEq
- + PartialOrd
- + Default
- + Clone
+ Copy
{
/// The unsigned integer with the same size as the float
@@ -131,10 +143,7 @@
///
/// This is the max exponent in binary converted to the max exponent in decimal. Allows fast
/// pathing anything larger than `10^LARGEST_POWER_OF_TEN`, which will round to infinity.
- const LARGEST_POWER_OF_TEN: i32 = {
- let largest_pow2 = Self::EXP_BIAS + 1;
- pow2_to_pow10(largest_pow2 as i64) as i32
- };
+ const LARGEST_POWER_OF_TEN: i32;
/// Smallest decimal exponent for a non-zero value. This allows for fast pathing anything
/// smaller than `10^SMALLEST_POWER_OF_TEN`, which will round to zero.
@@ -172,35 +181,24 @@
/// with the explicit bit set but otherwise unshifted
///
/// `s` is only ever +/-1.
- fn integer_decode(self) -> (u64, i16, i8) {
- let bits = self.to_bits();
- let sign: i8 = if bits >> (Self::BITS - 1) == Self::Int::ZERO { 1 } else { -1 };
- let mut exponent: i16 = ((bits & Self::EXP_MASK) >> Self::SIG_BITS).cast();
- let mantissa = if exponent == 0 {
- (bits & Self::SIG_MASK) << 1
- } else {
- (bits & Self::SIG_MASK) | (Self::Int::ONE << Self::SIG_BITS)
- };
- // Exponent bias + mantissa shift
- exponent -= (Self::EXP_BIAS + Self::SIG_BITS) as i16;
- (mantissa.into(), exponent, sign)
- }
-}
-
-/// Solve for `b` in `10^b = 2^a`
-const fn pow2_to_pow10(a: i64) -> i64 {
- let res = (a as f64) / f64::consts::LOG2_10;
- res as i64
+ fn integer_decode(self) -> (u64, i16, i8);
}
#[cfg(target_has_reliable_f16)]
+// The f16 implementation is outside the exclusively f64 scope. Disabling it
+// leaves every retained f64 public/helper/trace body and all of its decisions,
+// checked operations, assertions, return values, and observations unchanged.
+#[cfg(any())]
impl Float for f16 {
type Int = u16;
const INFINITY: Self = Self::INFINITY;
const NEG_INFINITY: Self = Self::NEG_INFINITY;
const NAN: Self = Self::NAN;
- const NEG_NAN: Self = -Self::NAN;
+ // `from_bits` produces exactly the bit pattern obtained by negating the
+ // upstream canonical NaN. This avoids Aeneas's unsupported float unop
+ // while preserving the constant, including its sign and payload bits.
+ const NEG_NAN: Self = f16::from_bits(0xFE00);
const BITS: u32 = 16;
const SIG_TOTAL_BITS: u32 = Self::MANTISSA_DIGITS;
@@ -209,6 +207,8 @@
const MIN_EXPONENT_ROUND_TO_EVEN: i32 = -22;
const MAX_EXPONENT_ROUND_TO_EVEN: i32 = 5;
+ // Exact value of trunc(16 / log2(10)) from the upstream default.
+ const LARGEST_POWER_OF_TEN: i32 = 4;
const SMALLEST_POWER_OF_TEN: i32 = -27;
fn to_bits(self) -> Self::Int {
@@ -221,20 +221,44 @@
}
#[cfg(target_has_reliable_f16)]
+// `FloatExt for f16` is used only by the excluded f16 specialization; it is
+// irrelevant to all retained f64 computation and observations listed above.
+#[cfg(any())]
impl FloatExt for f16 {
#[inline]
fn from_u64_bits(v: u64) -> Self {
Self::from_bits((v & 0xFFFF) as u16)
}
-}
-
+
+ // Specializing the upstream default removes only unsupported associated-
+ // integer operator resolution; these are the same bit operations with
+ // `Self::Int = u16` and the same exponent-bias subtraction.
+ fn integer_decode(self) -> (u64, i16, i8) {
+ let bits = self.to_bits();
+ let sign = if bits >> 15 == 0 { 1 } else { -1 };
+ let mut exponent = ((bits & Self::EXPONENT_MASK) >> 10) as i16;
+ let mantissa = if exponent == 0 {
+ (bits & Self::MANTISSA_MASK) << 1
+ } else {
+ (bits & Self::MANTISSA_MASK) | (1_u16 << 10)
+ };
+ exponent -= 15 + 10;
+ (mantissa as u64, exponent, sign)
+ }
+}
+
+// The f32 implementation is outside the exclusively f64 scope. Disabling it
+// does not alter any retained f64 computation, assertion, result, or trace.
+#[cfg(any())]
impl Float for f32 {
type Int = u32;
const INFINITY: Self = f32::INFINITY;
const NEG_INFINITY: Self = f32::NEG_INFINITY;
const NAN: Self = f32::NAN;
- const NEG_NAN: Self = -f32::NAN;
+ // Bit-identical to the upstream `-f32::NAN`, without the unsupported
+ // compile-time float negation.
+ const NEG_NAN: Self = f32::from_bits(0xFFC0_0000);
const BITS: u32 = 32;
const SIG_TOTAL_BITS: u32 = Self::MANTISSA_DIGITS;
@@ -243,6 +267,8 @@
const MIN_EXPONENT_ROUND_TO_EVEN: i32 = -17;
const MAX_EXPONENT_ROUND_TO_EVEN: i32 = 10;
+ // Exact value of trunc(128 / log2(10)) from the upstream default.
+ const LARGEST_POWER_OF_TEN: i32 = 38;
const SMALLEST_POWER_OF_TEN: i32 = -65;
fn to_bits(self) -> Self::Int {
@@ -254,11 +280,30 @@
}
}
+// `FloatExt for f32` likewise has no use in any retained f64 body or accepted
+// observation and is disabled without changing f64 execution.
+#[cfg(any())]
impl FloatExt for f32 {
#[inline]
fn from_u64_bits(v: u64) -> Self {
f32::from_bits((v & 0xFFFFFFFF) as u32)
}
+
+ // This is the upstream default after substituting `Self::Int = u32`;
+ // concreteness is needed only because Charon cannot resolve the generic
+ // associated-integer shifts and bit operators for Aeneas.
+ fn integer_decode(self) -> (u64, i16, i8) {
+ let bits = self.to_bits();
+ let sign = if bits >> 31 == 0 { 1 } else { -1 };
+ let mut exponent = ((bits & Self::EXPONENT_MASK) >> 23) as i16;
+ let mantissa = if exponent == 0 {
+ (bits & Self::MANTISSA_MASK) << 1
+ } else {
+ (bits & Self::MANTISSA_MASK) | (1_u32 << 23)
+ };
+ exponent -= 127 + 23;
+ (mantissa as u64, exponent, sign)
+ }
}
impl Float for f64 {
@@ -267,7 +312,9 @@
const INFINITY: Self = Self::INFINITY;
const NEG_INFINITY: Self = Self::NEG_INFINITY;
const NAN: Self = Self::NAN;
- const NEG_NAN: Self = -Self::NAN;
+ // Bit-identical to the upstream `-f64::NAN`, without the unsupported
+ // compile-time float negation.
+ const NEG_NAN: Self = f64::from_bits(0xFFF8_0000_0000_0000);
const BITS: u32 = 64;
const SIG_TOTAL_BITS: u32 = Self::MANTISSA_DIGITS;
@@ -276,6 +323,8 @@
const MIN_EXPONENT_ROUND_TO_EVEN: i32 = -4;
const MAX_EXPONENT_ROUND_TO_EVEN: i32 = 23;
+ // Exact value of trunc(1024 / log2(10)) from the upstream default.
+ const LARGEST_POWER_OF_TEN: i32 = 308;
const SMALLEST_POWER_OF_TEN: i32 = -342;
fn to_bits(self) -> Self::Int {
@@ -292,4 +341,20 @@
fn from_u64_bits(v: u64) -> Self {
f64::from_bits(v)
}
-}
+
+ // This is the upstream default after substituting `Self::Int = u64`;
+ // it preserves every decoded field while avoiding unsupported generic
+ // associated-integer operator resolution.
+ fn integer_decode(self) -> (u64, i16, i8) {
+ let bits = self.to_bits();
+ let sign = if bits >> 63 == 0 { 1 } else { -1 };
+ let mut exponent = ((bits & Self::EXPONENT_MASK) >> 52) as i16;
+ let mantissa = if exponent == 0 {
+ (bits & Self::MANTISSA_MASK) << 1
+ } else {
+ (bits & Self::MANTISSA_MASK) | (1_u64 << 52)
+ };
+ exponent -= 1023 + 52;
+ (mantissa, exponent, sign)
+ }
+}
Record details
| Kind | source adaptation site (file-level diff) |
|---|
Captured evidence identities
[
{
"path": "extraction-evidence/COMMAND.json",
"sha256": "611f36cefb2d895e7b22bd15eaccc1bd57d1b539d54cbd6337e84d0573719a9e",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "extraction-evidence/DETERMINISM.json",
"sha256": "360301745fc66c713335320b2e6a57ef7fb71e390cc7db31a6316a3902f7ef8f",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "extraction-evidence/RESULT.json",
"sha256": "62a89492b5592f404e065d2f8c9a89fd3f83cc59b772fed0eaa475138211d641",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "extraction-evidence/STDERR.bin",
"sha256": "ab4dc202d7a8a30a83ea62ed154710a48148d62230ff8b834700919d4e679c0c",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "extraction-evidence/STDOUT.bin",
"sha256": "604aae51d5c3394417224f655c7de355cc3e699d31fff49f93734706ad43f3f8",
"cited_by": [
"shared mechanical extraction record"
]
},
{
"path": "reference/model-evidence/adaptation-constants-probe.rs",
"sha256": "b5a4a2cba0c08053cb9a816adb1ba5dbd160bf3928bdf5ccf56b7ae83aaa2aa5",
"cited_by": [
"reference/model-evidence/source-adaptation-delta.txt"
]
},
{
"path": "reference/model-evidence/binary64-boundary.txt",
"sha256": "a17d82e7f789ce7f1fbb3922a66ec8806999e526532d637605263882d37b7abf",
"cited_by": [
"shared extraction boundary: Tablet/Preamble.tex",
"reference/model-evidence/source-adaptation-delta.txt"
]
},
{
"path": "reference/model-evidence/binary64-probe.rs",
"sha256": "68e70be70faa44c2781990457f09ef5fc7815e120fda0a468eaa85f9b634ad7e",
"cited_by": [
"reference/model-evidence/binary64-boundary.txt"
]
},
{
"path": "reference/model-evidence/setup-reproduction.txt",
"sha256": "f97c87d1af65130560f67d2bfcd737106b191c8fce1ed0174569ee218c4ee8d7",
"cited_by": [
"shared extraction boundary: Tablet/Preamble.tex",
"reference/model-evidence/source-adaptation-delta.txt"
]
},
{
"path": "reference/model-evidence/source-adaptation-delta.txt",
"sha256": "5502c71eb4420211d20bd8b6aade171c56cc2dce11d758a73bb93ef1083634ad",
"cited_by": [
"shared extraction boundary: Tablet/Preamble.tex"
]
},
{
"path": "reference/model-evidence/source-valid-byte-slice.txt",
"sha256": "e7887429c66a303cbba3b4df30080ddd9ba4d54e24f25f74947deb228b32b04f",
"cited_by": [
"shared extraction boundary: Tablet/Preamble.tex"
]
}
]