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 exact raw aggregate diff is retained as reference/model-evidence/source-adaptation-delta.diff. It was generated from the repository root by this exact command (the for-list is the complete LC_ALL=C-sorted upstream inventory, identical files contribute zero bytes, labels are literal root-relative paths, hunks are concatenated in listed order, status 1 is accepted as diff's expected ``files differ'' status, and every other nonzero status aborts): export LC_ALL=C artifact=reference/model-evidence/source-adaptation-delta.diff : > "$artifact" saw_difference=0 for supplied in \ dec2flt/common.rs \ dec2flt/decimal.rs \ dec2flt/decimal_seq.rs \ dec2flt/fpu.rs \ dec2flt/lemire.rs \ dec2flt/mod.rs \ dec2flt/parse.rs \ dec2flt/slow.rs \ dec2flt/table.rs \ traits.rs do if diff --unified=0 --label "upstream/$supplied" --label "crate/$supplied" \ "upstream/$supplied" "crate/$supplied" >> "$artifact"; then : else diff_status=$? if [ "$diff_status" -ne 1 ]; then exit "$diff_status" fi saw_difference=1 fi done test "$saw_difference" -eq 1 sha256sum "$artifact" The command used GNU diffutils 3.12 at /usr/bin/diff, whose SHA-256 is dfab4814355b488934cf8c63ce96d94184ea3d9b5e4f9be50278ad8e080168f5. Its actual final output was: 1c0081e1e32d015be3c7e54e12e897c27d3588ad105e6f614782450f383590e6 reference/model-evidence/source-adaptation-delta.diff The retained current byte stream is the exact aggregate of GNU diff --unified=0 on all ten supplied paths, with the same labels and order as above. The current full source inventory has these SHA-256 identities: fc64094721ff23e08fcba013154d04dec3fe986cae5ffd73a20f86049980aace upstream/dec2flt/common.rs 1630bcba29ed89ed899cf814d6a36567df612e16af7c68f04bde715d1eb15593 crate/dec2flt/common.rs 3c164785e1bc3f3b48aa9c212dd6c4ab535fe828523af9fa584df4c7b1e60e0d upstream/dec2flt/decimal.rs f8b69dc3816e99391e45dfa95d4bfa02eafe9f5b1ef8e216d0cbc30d335a0025 crate/dec2flt/decimal.rs 7b1b28b8c439afb4628411af12920b7c0ecd19036fa530dc74c6a356ec6e351d upstream/dec2flt/decimal_seq.rs 193ca485206899f913a3da75b6ac6484ee90b35c3a5d1c7059ae3d5c61110ad9 crate/dec2flt/decimal_seq.rs 16cf9ec154d477ab3d4184a01fb4b9ed7c59f0228cc55589d393c40a61b19d8f upstream/dec2flt/fpu.rs 16cf9ec154d477ab3d4184a01fb4b9ed7c59f0228cc55589d393c40a61b19d8f crate/dec2flt/fpu.rs fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1 upstream/dec2flt/lemire.rs fee1397d264fe4c5af5fa27efae0af7c5ad453be7cff8389abc24b9b252aead1 crate/dec2flt/lemire.rs 7198e238c554b692405537a446b3526ad66805ec2900cd0e299f10c51402a44a upstream/dec2flt/mod.rs 6ce998fb79493021a6b7af183ba03934fa699ddb6f9c2bfafcea17d26e5c608a crate/dec2flt/mod.rs a9303bac61a5e8e7b610632925bb0d04483374a91f9ec38a7305fd4a1ca0b5f3 upstream/dec2flt/parse.rs fb5f09bf0bc9742dae352ae0c3bf6706e8855ff22079765f6233fd16f975b669 crate/dec2flt/parse.rs 43e7aba32d7431bbf0e1bbcb4c334eaffb23eb66891c7e45abe799c5235cc0d2 upstream/dec2flt/slow.rs 93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485 crate/dec2flt/slow.rs 6eb59023784bd84cb6fb074c70da8a99bef72bc2a2ea179b0da457ca1ee00abb upstream/dec2flt/table.rs 6eb59023784bd84cb6fb074c70da8a99bef72bc2a2ea179b0da457ca1ee00abb crate/dec2flt/table.rs 66a02c44d72dfcc3ddae7e34a290e390dabaf98c5911b283d2d97f2f0075a44e upstream/traits.rs 41724d52fd1408515cc8d0996b3817cf2fdc95ef8bc7ba4431f4116bb816bc66 crate/traits.rs 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:263-266 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 262, 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:73-102 versus crate/dec2flt/parse.rs:121-158 expands the same optional sign and first-digit test, pre-update 2^59 accumulator cutoff, exact first-nondigit suffix and final sign. Each update stays at most 10*2^59-1 below I64 maximum; the cutoff does not stop scanning. * upstream/dec2flt/decimal_seq.rs:224-304 versus crate/dec2flt/decimal_seq.rs:269-373 preserves the repaired upstream final_decimal_point body and calls the same parse_scientific with normal Option None defaulting to zero. It extracts parse_digits_into_seq and count_trailing_zeros, not an obsolete separate decimal exponent fold. The digit helper preserves digit tests, forward order, try_add_digit and logical count increments. The reverse helper visits the same consumed bytes in reverse order, counts zeros, ignores dots and stops at a nonzero nondot byte. In all these replacements, indexing occurs only under count 0000000000000000; crate wildcard -> 0000000000000000 index 24: upstream 0. -> 0000000000000000; crate wildcard -> 0000000000000000 index 25: upstream 0. -> 0000000000000000; crate wildcard -> 0000000000000000 index 26: upstream 0. -> 0000000000000000; crate wildcard -> 0000000000000000 index 27: upstream 0. -> 0000000000000000; crate wildcard -> 0000000000000000 index 28: upstream 0. -> 0000000000000000; crate wildcard -> 0000000000000000 index 29: upstream 0. -> 0000000000000000; crate wildcard -> 0000000000000000 index 30: upstream 0. -> 0000000000000000; crate wildcard -> 0000000000000000 index 31: upstream 0. -> 0000000000000000; crate wildcard -> 0000000000000000 Both bodies use exponent & 31, so this covers every possible usize argument by the identical finite selection rule. The restored probe establishes only these fixed constant computations and nonzero literal words; the zero cases and masking come from the current source inspection. It is not an allocation experiment, a GOAL proof, or a certification of the full adaptation claim. All Tablet files, source/extraction/provenance files, model-support bindings, original GOAL meanings and existing configuration delta are unchanged.