Current first/split_first/as_bytes applicability ============================================== This is CURRENT primary source/extraction inspection, not a parser execution or a GOAL verdict. It was independently checked in request 99, task 10, from /home/leanagent/math/dec2flt-r0003-runtime/dispatch/10/repo. The prior task-8 candidate was accepted=false and is only advisory. All commands in the fresh inspection transcript below exited 0; their unmodified outputs are recorded separately from the historical predecessor records. The predecessor records aeneas-slice-observations.txt and aeneas-string-bytes.txt retain their original 45b5027c... extraction identity; their old call locations are not used as current inventory. 1. Identities and unchanged library meanings ------------------------------------------- Command: sha256sum generated.lean upstream/dec2flt/parse.rs upstream/dec2flt/decimal_seq.rs crate/dec2flt/parse.rs crate/dec2flt/decimal_seq.rs crate/dec2flt/mod.rs crate/dec2flt/slow.rs Tablet/model-support.json Tablet/ModelSliceFirst.lean Tablet/ModelSliceSplitFirst.lean Tablet/ModelStrAsBytes.lean Raw output: 438af8398703b81aa311d7885dfb34f1909125bee48b096dacc93baefcc4bcf9 generated.lean a9303bac61a5e8e7b610632925bb0d04483374a91f9ec38a7305fd4a1ca0b5f3 upstream/dec2flt/parse.rs 7b1b28b8c439afb4628411af12920b7c0ecd19036fa530dc74c6a356ec6e351d upstream/dec2flt/decimal_seq.rs fb5f09bf0bc9742dae352ae0c3bf6706e8855ff22079765f6233fd16f975b669 crate/dec2flt/parse.rs 193ca485206899f913a3da75b6ac6484ee90b35c3a5d1c7059ae3d5c61110ad9 crate/dec2flt/decimal_seq.rs 6ce998fb79493021a6b7af183ba03934fa699ddb6f9c2bfafcea17d26e5c608a crate/dec2flt/mod.rs 93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485 crate/dec2flt/slow.rs c099ae8478fe2cea91a3f82f51a5d3369270ded2bc08a7596ba8cca0c8382e87 Tablet/model-support.json f38dbcad0a84ab884eec3f16d86eb111712b828a19dccf0bf5974d6d1e02bd18 Tablet/ModelSliceFirst.lean f2b66ed1eafca9de7351e962dd2a28ef015b982da6ac255c70d5e9623e05199e Tablet/ModelSliceSplitFirst.lean 8021e96ef85ff3c69be4b89e2bcdd08beb0207aed3c1c3c141e633c44ade6981 Tablet/ModelStrAsBytes.lean Command: git -C /home/leanagent/pv_spike/tools/aeneas rev-parse HEAD Raw output: fa699427cdfa8f604b891fb0223ef42883dd7dc4 Command: sha256sum /home/leanagent/pv_spike/tools/aeneas/bin/aeneas /home/leanagent/pv_spike/tools/aeneas/backends/lean/Aeneas/Std/Slice.lean /home/leanagent/pv_spike/tools/aeneas/backends/lean/Aeneas/Std/String.lean /home/leanagent/pv_spike/tools/aeneas/documentation/aeneas-overview.md /home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs /home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/mod.rs Raw output (path suffixes abbreviated only here): 9f446d2aaf59e8e705e36d05cb993f1c6ab0e97f8dc6fd2f19907a86ede30922 aeneas/bin/aeneas c941826e8da78e1c517cae719b9f58e64671331957cce0b3c22c321a6c62c328 Aeneas/Std/Slice.lean 412329294f15a509ea526c7506c5f0c2d1a00f45e719049e87c6977b2e365978 Aeneas/Std/String.lean 8ba474e55ec3375f6eaccc7532715e29dc1d0d6473423a02100bb805a446c3a7 documentation/aeneas-overview.md 354992a6a3d69a0185eef9044a07ea5180e767bdb467aef55e69ee3d44317840 core/src/slice/mod.rs 284b4c147b5d0497ce9146f6b96e564f196aed10411a62cdccf5fc5243d40f78 core/src/str/mod.rs These are the same executable/library/core-source identities as the historical records. Slice.lean:22 still defines def Slice (a : Type u) := { l : List a // l.length <= Usize.max } (ASCII rendering of the Lean alpha and inequality). String.lean:6 defines def Str := Slice U8 The overview:240 says shared borrows (&T) become plain T parameters, which may be copied; its table:432 describes them as immutable. The actual pinned core bodies (sed -n '155,157p' .../core/src/slice/mod.rs, sed -n '198,200p' .../core/src/slice/mod.rs, and sed -n '498,501p' .../core/src/str/mod.rs) are: 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 } } pub const fn as_bytes(&self) -> &[u8] { // SAFETY: const sound because we transmute two types with the same layout unsafe { mem::transmute(self) } } No primitive body or representation change is being introduced. These are read-only inspections with no compiler invocation, new build setting or extraction invocation. The audited manifest, toolchain, target and extraction configuration remain fixed. The full paths and exact Unicode representations are retained in the fresh inspection transcript below. The separate source-valid-byte-slice.txt record supplies the target isize::MAX bound and Rust str's UTF-8 condition; a general &[u8] does not require UTF-8. 2. Exact current externals and support reconciliation ---------------------------------------------------- Command: python3 .trellis/scripts/pv_modeling.py inspect-native . Result: declaration_count=24; full inventory retained at .trellis/scratch/inspect-native-1791579714814493776.json The three entries selected by their exact names have the following unchanged signatures, Rust symbols and raw declaration SHA256 values. Unicode below is retained to copy the exact inventory signatures. name: core.slice.Slice.first extracted_signature: {T : Type} : Slice T → Result (Option T) rust_symbol: core::slice::{[T]}::first raw_declaration_sha256: 221298364b1df3a924d1ee3951ad3e7d786065b4aa48e2b74eedb0a49f643105 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 name: core.str.Str.as_bytes extracted_signature: : Str → Result (Slice Std.U8) rust_symbol: core::str::{str}::as_bytes raw_declaration_sha256: 11bae0b1f519e9d892c9835bacc776977e8d5dbf1013af4a24178a41025a8b3f The corresponding complete raw declaration text is generated.lean:311-316, 318-324 and 326-331, respectively (sed -n for each range): /-- [core::slice::{[T]}::first]: Source: '/rustc/library/core/src/slice/mod.rs', lines 155:4-155:43 Name pattern: [core::slice::{[@T]}::first] Visibility: public -/ @[rust_fun "core::slice::{[@T]}::first"] axiom core.slice.Slice.first {T : Type} : Slice T → Result (Option T) /-- [core::slice::{[T]}::split_first]: Source: '/rustc/library/core/src/slice/mod.rs', lines 198:4-198:57 Name pattern: [core::slice::{[@T]}::split_first] Visibility: public -/ @[rust_fun "core::slice::{[@T]}::split_first"] axiom core.slice.Slice.split_first {T : Type} : Slice T → Result (Option (T × (Slice T))) /-- [core::str::{str}::as_bytes]: Source: '/rustc/library/core/src/str/mod.rs', lines 498:4-498:41 Name pattern: [core::str::{str}::as_bytes] Visibility: public -/ @[rust_fun "core::str::{str}::as_bytes"] axiom core.str.Str.as_bytes : Str → Result (Slice Std.U8) Recomputing each declaration digest, including its final newline: sed -n '311,316p' generated.lean | sha256sum 221298364b1df3a924d1ee3951ad3e7d786065b4aa48e2b74eedb0a49f643105 - sed -n '318,324p' generated.lean | sha256sum f983904621cafa667f0bfd9822b4d95fb0bd6820ee84b107130e7c4f7bac3c49 - sed -n '326,331p' generated.lean | sha256sum 11bae0b1f519e9d892c9835bacc776977e8d5dbf1013af4a24178a41025a8b3f - Command: jq '.bindings[] | select(.node == "ModelSliceFirst" or .node == "ModelSliceSplitFirst" or .node == "ModelStrAsBytes")' Tablet/model-support.json Each binding copies precisely the name, extracted_signature, rust_symbol and raw_declaration_sha256 above. Its node/declaration pair is, respectively: ModelSliceFirst / dec2flt_model.ModelSliceFirst ModelSliceSplitFirst / dec2flt_model.ModelSliceSplitFirst ModelStrAsBytes / dec2flt_model.ModelStrAsBytes This reconciles the full raw declarations, not merely the identifier spelling. In the current composed Preamble.lean:212,219,226 the externals are typed references to exactly these principal definitions. Their bodies are, in order, ok s.val.head?, empty/head-tail list matching (tail bound from s.property), and ok s. No external axiom for these operations remains in the composition. 3. Complete current bound-call inventory --------------------------------------- Command: rg -n 'core\.slice\.Slice\.(first|split_first)|core\.str\.Str\.as_bytes' generated.lean Complete raw output: 316:axiom core.slice.Slice.first {T : Type} : Slice T → Result (Option T) 323:axiom core.slice.Slice.split_first 331:axiom core.str.Str.as_bytes : Str → Result (Slice Std.U8) 1734: let o ← core.slice.Slice.split_first s_ref 4094: let o ← core.slice.Slice.split_first s 4347: let o ← core.slice.Slice.split_first s1 4369: let o1 ← core.slice.Slice.split_first s2 4567: let body ← core.str.Str.as_bytes s 4568: let o ← core.slice.Slice.first body Rust call / current extracted function and input: crate/dec2flt/parse.rs:127 / parse_scientific:1732-1765, s_ref : Slice Std.U8 crate/dec2flt/parse.rs:65 / try_parse_19digits_loop.body:4087-4110, s : Slice Std.U8 crate/dec2flt/parse.rs:180 / parse_partial_number:4337-4364, s1 : Slice Std.U8 crate/dec2flt/parse.rs:197 / parse_partial_number:4369, s2 : Slice Std.U8 crate/dec2flt/mod.rs:364 / dec2flt_with_trace:4567, s : Str crate/dec2flt/mod.rs:365 / dec2flt_with_trace:4568, body : Slice Std.U8 The s1 argument is returned by try_parse_digits; s2 is s1 or the returned Std.U8 suffix after fractional scanning. Every bound slice call infers T=Std.U8. Returned heads are copied/read, and tails are immutable next slices; none of these calls observes pointer identity or mutates the returned borrow. The dispatcher strips at most one leading sign after as_bytes and first. The authored fixed frame mirrors these same two initial operations at Tablet/P9_T1_DispatchFrame.lean:15-16. It uses the same bound as_bytes and first definitions even with abstract helper components; it has no split_first call of its own. These are authored frame uses, not additional call sites in the raw generated module enumerated above. 4. Original observations versus audited indexed replacements ------------------------------------------------------------ Command: rg -n 'first\(|split_first\(|as_bytes\(' crate/dec2flt upstream/dec2flt Complete raw output: crate/dec2flt/mod.rs:364: let mut body = s.as_bytes(); crate/dec2flt/mod.rs:365: let Some(&c) = body.first() else { upstream/dec2flt/mod.rs:212: let mut s = s.as_bytes(); upstream/dec2flt/mod.rs:213: let Some(&c) = s.first() else { return Err(pfe_empty()) }; upstream/dec2flt/decimal_seq.rs:244: while let Some((&b'0', s_next)) = s.split_first() { upstream/dec2flt/decimal_seq.rs:250: if let Some((b'.', s_next)) = s.split_first() { upstream/dec2flt/decimal_seq.rs:255: while let Some((&b'0', s_next)) = s.split_first() { upstream/dec2flt/decimal_seq.rs:291: if let Some((&ch, s_next)) = s.split_first() { upstream/dec2flt/parse.rs:55: if let Some((c, s_next)) = s.split_first() { upstream/dec2flt/parse.rs:79: if let Some((&c, s_next)) = s.split_first() { upstream/dec2flt/parse.rs:86: if matches!(s.first(), Some(&x) if x.is_ascii_digit()) { upstream/dec2flt/parse.rs:120: if let Some((&b'.', s_next)) = s.split_first() { upstream/dec2flt/parse.rs:137: if let Some((&c, s_next)) = s.split_first() { upstream/dec2flt/parse.rs:156: while let Some((&c, p_next)) = p.split_first() { upstream/dec2flt/common.rs:42: while let Some((c, rest)) = s.split_first() { crate/dec2flt/parse.rs:65: if let Some((c, s_next)) = s.split_first() { crate/dec2flt/parse.rs:127: if let Some((&c, s_next)) = s.split_first() { crate/dec2flt/parse.rs:180: if let Some((&b'.', s_next)) = s.split_first() { crate/dec2flt/parse.rs:197: if let Some((&c, s_next)) = s.split_first() { The output ordering is the recorded rg ordering, not program evaluation order. The original scientific digit-entry test at upstream/dec2flt/parse.rs:86 uses first(). Its audited replacement at crate/dec2flt/parse.rs:134-137 is: // `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() { For [] both tests are false without a byte read; for x::xs both test the identical x for is_ascii_digit. Therefore this original first observation still exists semantically, but is not a call to the bound first external. The extraction:1747-1753 uses is_empty, then index_usize 0, then the digit test. Likewise original decimal-sequence split observations at upstream lines 244,250,255,291 become guarded indexing in crate lines 296,302,309,348-363; the leading-dot/zero adjustment at upstream parse.rs:156 becomes adjust_many_digit_count:86-99. Original common.rs:39-52 scans by split_first and consumes a digit only when c.wrapping_sub(b'0')<10; the specialized indexed scans retain that order and first-nondigit stop. These adaptations are distinct from the four bound split calls. Their audited source comments and Preamble preservation remain separate obligations, not claims proved by absence from the external inventory. 5. Slow scientific path, residual and outer outcomes --------------------------------------------------- The source call chain is crate/dec2flt/slow.rs:40 -> crate/dec2flt/decimal_seq.rs:362-363 -> crate/dec2flt/parse.rs:127. The extracted chain starts at generated.lean:3941: let d <- num.imp.dec2flt.decimal_seq.parse_decimal_seq s and reaches parse_scientific exponent_suffix in all eight e/E branches: 2084/2094, 2156/2166, 2224/2234, 2281/2292. The <- here is ASCII rendering; the raw extraction uses Lean's left arrow. Inspect each branch with sed -n; rg -n -A 1 'parse_scientific exponent_suffix|let \(o, _\) ←$' generated.lean shows each call immediately followed by ok (core.option.Option.unwrap_or o 0#i64) The scientific call itself reaches the bound split_first at 1734. The numeric parser also calls this same scientific function at 4412 and 4459, but observes its returned residual in its consumed-length calculation; crate/dec2flt/parse.rs:234-240 requires rest == s.len() for Some. The source at crate/dec2flt/decimal_seq.rs:350-366 reads: if ch == b'e' || ch == b'E' { // [preservation comments at 351-361, retained in the pinned file] let mut exponent_suffix = &s[1..]; explicit = parse_scientific(&mut exponent_suffix).unwrap_or(0); } d.decimal_point = final_decimal_point(significant_count, fractional_count, explicit); Counts have been saved before this call. The residual mutation is unobserved only after the scientific call returns; the call is not elided. Original upstream/dec2flt/decimal_seq.rs:291-295 likewise calls parse_scientific then unwrap_or. The later generated.lean:3942 test for d.num_digits=0 is after the bind at 3941, so zero-significand inputs do not bypass scientific parsing. The unsigned numeric literal 1e-2 passes -2 as the exponent suffix, despite having no leading sign. This is source inspection, not a newly run test. The exact loop body at generated.lean:1692-1716 / crate/dec2flt/parse.rs:145-151 tests count f v | fail v => fail v | div => div Core/Core.lean:100-104 unwrap_or takes an Option T, not a Result: def core.option.Option.unwrap_or (self : Option T) (default : T) : T := match self with | none => default | some self => self Thus normal None becomes zero after the call; failure/divergence skips that continuation and propagates outward. No Option Try/residual conversion is used for the slow None-to-zero behavior. Equal head/tail observations preserve this distinction without assuming termination or rounding of the slow helper. Applicability conclusion ------------------------ The unchanged list representations, core bodies, exact declarations and bindings justify reuse of the predecessor's immutable head/tail and byte-list arguments, with this current inventory instead of predecessor call locations. Primitive equivalence is extensional on every source-valid byte slice/string, not conditioned on lexical acceptance, native/slow rounding, component package inhabitability, A/B length bounds, or public reachability. A/B are used only where the individual original GOAL requires them, and public bounds concern the complete string before optional sign removal. The direct slow application retains every source-valid unsigned numeric literal, with its independently signed exponent and full significand, and is only on normal return. This evidence supplies neither a GOAL proof nor a new model assumption. Fresh request-99 inspection transcript -------------------------------------- Each stdout block below is exact, without path abbreviations or ASCII substitutions. Unicode occurs only where it is part of the inspected source or inventory. Command exit status is reported separately. Command: sha256sum generated.lean upstream/dec2flt/parse.rs upstream/dec2flt/decimal_seq.rs crate/dec2flt/parse.rs crate/dec2flt/decimal_seq.rs crate/dec2flt/mod.rs crate/dec2flt/slow.rs Tablet/model-support.json Tablet/ModelSliceFirst.lean Tablet/ModelSliceSplitFirst.lean Tablet/ModelStrAsBytes.lean Exit status: 0 Raw stdout: 438af8398703b81aa311d7885dfb34f1909125bee48b096dacc93baefcc4bcf9 generated.lean a9303bac61a5e8e7b610632925bb0d04483374a91f9ec38a7305fd4a1ca0b5f3 upstream/dec2flt/parse.rs 7b1b28b8c439afb4628411af12920b7c0ecd19036fa530dc74c6a356ec6e351d upstream/dec2flt/decimal_seq.rs fb5f09bf0bc9742dae352ae0c3bf6706e8855ff22079765f6233fd16f975b669 crate/dec2flt/parse.rs 193ca485206899f913a3da75b6ac6484ee90b35c3a5d1c7059ae3d5c61110ad9 crate/dec2flt/decimal_seq.rs 6ce998fb79493021a6b7af183ba03934fa699ddb6f9c2bfafcea17d26e5c608a crate/dec2flt/mod.rs 93ba8f521d4c3c73dfbcd4c76e0e1cf1fff7fa400cb4cd559218e249a7f62485 crate/dec2flt/slow.rs c099ae8478fe2cea91a3f82f51a5d3369270ded2bc08a7596ba8cca0c8382e87 Tablet/model-support.json f38dbcad0a84ab884eec3f16d86eb111712b828a19dccf0bf5974d6d1e02bd18 Tablet/ModelSliceFirst.lean f2b66ed1eafca9de7351e962dd2a28ef015b982da6ac255c70d5e9623e05199e Tablet/ModelSliceSplitFirst.lean 8021e96ef85ff3c69be4b89e2bcdd08beb0207aed3c1c3c141e633c44ade6981 Tablet/ModelStrAsBytes.lean Command: git -C /home/leanagent/pv_spike/tools/aeneas rev-parse HEAD Exit status: 0 Raw stdout: fa699427cdfa8f604b891fb0223ef42883dd7dc4 Command: sha256sum /home/leanagent/pv_spike/tools/aeneas/bin/aeneas /home/leanagent/pv_spike/tools/aeneas/backends/lean/Aeneas/Std/Slice.lean /home/leanagent/pv_spike/tools/aeneas/backends/lean/Aeneas/Std/String.lean /home/leanagent/pv_spike/tools/aeneas/documentation/aeneas-overview.md /home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs /home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/mod.rs Exit status: 0 Raw stdout: 9f446d2aaf59e8e705e36d05cb993f1c6ab0e97f8dc6fd2f19907a86ede30922 /home/leanagent/pv_spike/tools/aeneas/bin/aeneas c941826e8da78e1c517cae719b9f58e64671331957cce0b3c22c321a6c62c328 /home/leanagent/pv_spike/tools/aeneas/backends/lean/Aeneas/Std/Slice.lean 412329294f15a509ea526c7506c5f0c2d1a00f45e719049e87c6977b2e365978 /home/leanagent/pv_spike/tools/aeneas/backends/lean/Aeneas/Std/String.lean 8ba474e55ec3375f6eaccc7532715e29dc1d0d6473423a02100bb805a446c3a7 /home/leanagent/pv_spike/tools/aeneas/documentation/aeneas-overview.md 354992a6a3d69a0185eef9044a07ea5180e767bdb467aef55e69ee3d44317840 /home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs 284b4c147b5d0497ce9146f6b96e564f196aed10411a62cdccf5fc5243d40f78 /home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/mod.rs Command: sed -n '311,316p' generated.lean | sha256sum Exit status: 0 Raw stdout: 221298364b1df3a924d1ee3951ad3e7d786065b4aa48e2b74eedb0a49f643105 - Command: sed -n '318,324p' generated.lean | sha256sum Exit status: 0 Raw stdout: f983904621cafa667f0bfd9822b4d95fb0bd6820ee84b107130e7c4f7bac3c49 - Command: sed -n '326,331p' generated.lean | sha256sum Exit status: 0 Raw stdout: 11bae0b1f519e9d892c9835bacc776977e8d5dbf1013af4a24178a41025a8b3f - Command: rg -n 'core\.slice\.Slice\.(first|split_first)|core\.str\.Str\.as_bytes' generated.lean Exit status: 0 Raw stdout: 316:axiom core.slice.Slice.first {T : Type} : Slice T → Result (Option T) 323:axiom core.slice.Slice.split_first 331:axiom core.str.Str.as_bytes : Str → Result (Slice Std.U8) 1734: let o ← core.slice.Slice.split_first s_ref 4094: let o ← core.slice.Slice.split_first s 4347: let o ← core.slice.Slice.split_first s1 4369: let o1 ← core.slice.Slice.split_first s2 4567: let body ← core.str.Str.as_bytes s 4568: let o ← core.slice.Slice.first body Command: rg -n 'first\(|split_first\(|as_bytes\(' crate/dec2flt upstream/dec2flt Exit status: 0 Raw stdout: crate/dec2flt/mod.rs:364: let mut body = s.as_bytes(); crate/dec2flt/mod.rs:365: let Some(&c) = body.first() else { upstream/dec2flt/mod.rs:212: let mut s = s.as_bytes(); upstream/dec2flt/mod.rs:213: let Some(&c) = s.first() else { return Err(pfe_empty()) }; upstream/dec2flt/decimal_seq.rs:244: while let Some((&b'0', s_next)) = s.split_first() { upstream/dec2flt/decimal_seq.rs:250: if let Some((b'.', s_next)) = s.split_first() { upstream/dec2flt/decimal_seq.rs:255: while let Some((&b'0', s_next)) = s.split_first() { upstream/dec2flt/decimal_seq.rs:291: if let Some((&ch, s_next)) = s.split_first() { upstream/dec2flt/parse.rs:55: if let Some((c, s_next)) = s.split_first() { upstream/dec2flt/parse.rs:79: if let Some((&c, s_next)) = s.split_first() { upstream/dec2flt/parse.rs:86: if matches!(s.first(), Some(&x) if x.is_ascii_digit()) { upstream/dec2flt/parse.rs:120: if let Some((&b'.', s_next)) = s.split_first() { upstream/dec2flt/parse.rs:137: if let Some((&c, s_next)) = s.split_first() { upstream/dec2flt/parse.rs:156: while let Some((&c, p_next)) = p.split_first() { upstream/dec2flt/common.rs:42: while let Some((c, rest)) = s.split_first() { crate/dec2flt/parse.rs:65: if let Some((c, s_next)) = s.split_first() { crate/dec2flt/parse.rs:127: if let Some((&c, s_next)) = s.split_first() { crate/dec2flt/parse.rs:180: if let Some((&b'.', s_next)) = s.split_first() { crate/dec2flt/parse.rs:197: if let Some((&c, s_next)) = s.split_first() { Command: sha256sum /home/leanagent/pv_spike/tools/aeneas/backends/lean/Aeneas/Std/Primitives.lean /home/leanagent/pv_spike/tools/aeneas/backends/lean/Aeneas/Std/Core/Core.lean Exit status: 0 Raw stdout: f3e9dc9ee62646d579b97747725c07f18760498601b5a37e48031d2f4893035a /home/leanagent/pv_spike/tools/aeneas/backends/lean/Aeneas/Std/Primitives.lean 852be2e07d9dd941a1b105c0867f52ede98542175b5cd3cc15fa238784b61299 /home/leanagent/pv_spike/tools/aeneas/backends/lean/Aeneas/Std/Core/Core.lean Command: jq '.declarations[] | select(.name == "core.slice.Slice.first" or .name == "core.slice.Slice.split_first" or .name == "core.str.Str.as_bytes")' .trellis/scratch/inspect-native-1791579714814493776.json Exit status: 0 Raw stdout: { "name": "core.slice.Slice.first", "extracted_signature": "{T : Type} : Slice T → Result (Option T)", "rust_symbol": "core::slice::{[T]}::first", "raw_declaration_sha256": "221298364b1df3a924d1ee3951ad3e7d786065b4aa48e2b74eedb0a49f643105", "source_utf8": "/-- [core::slice::{[T]}::first]:\n Source: '/rustc/library/core/src/slice/mod.rs', lines 155:4-155:43\n Name pattern: [core::slice::{[@T]}::first]\n Visibility: public -/\n@[rust_fun \"core::slice::{[@T]}::first\"]\naxiom core.slice.Slice.first {T : Type} : Slice T → Result (Option T)\n" } { "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", "source_utf8": "/-- [core::slice::{[T]}::split_first]:\n Source: '/rustc/library/core/src/slice/mod.rs', lines 198:4-198:57\n Name pattern: [core::slice::{[@T]}::split_first]\n Visibility: public -/\n@[rust_fun \"core::slice::{[@T]}::split_first\"]\naxiom core.slice.Slice.split_first\n {T : Type} : Slice T → Result (Option (T × (Slice T)))\n" } { "name": "core.str.Str.as_bytes", "extracted_signature": ": Str → Result (Slice Std.U8)", "rust_symbol": "core::str::{str}::as_bytes", "raw_declaration_sha256": "11bae0b1f519e9d892c9835bacc776977e8d5dbf1013af4a24178a41025a8b3f", "source_utf8": "/-- [core::str::{str}::as_bytes]:\n Source: '/rustc/library/core/src/str/mod.rs', lines 498:4-498:41\n Name pattern: [core::str::{str}::as_bytes]\n Visibility: public -/\n@[rust_fun \"core::str::{str}::as_bytes\"]\naxiom core.str.Str.as_bytes : Str → Result (Slice Std.U8)\n" } Command: sed -n '155,157p' /home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs Exit status: 0 Raw stdout: pub const fn first(&self) -> Option<&T> { if let [first, ..] = self { Some(first) } else { None } } Command: sed -n '198,200p' /home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs Exit status: 0 Raw stdout: pub const fn split_first(&self) -> Option<(&T, &[T])> { if let [first, tail @ ..] = self { Some((first, tail)) } else { None } } Command: sed -n '498,501p' /home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/mod.rs Exit status: 0 Raw stdout: pub const fn as_bytes(&self) -> &[u8] { // SAFETY: const sound because we transmute two types with the same layout unsafe { mem::transmute(self) } } Command: sed -n '18,24p' /home/leanagent/pv_spike/tools/aeneas/backends/lean/Aeneas/Std/Slice.lean Exit status: 0 Raw stdout: /-! # Slice -/ def Slice (α : Type u) := { l : List α // l.length ≤ Usize.max } /-- We need this to coerce slices to lists without marking `Slice` as reducible. Command: sed -n '1,9p' /home/leanagent/pv_spike/tools/aeneas/backends/lean/Aeneas/Std/String.lean Exit status: 0 Raw stdout: import Aeneas.Std.Scalar import Aeneas.Std.Slice namespace Aeneas.Std def Str := Slice U8 instance : DecidableEq Str := inferInstanceAs (DecidableEq (Slice U8)) Command: sed -n '237,244p' /home/leanagent/pv_spike/tools/aeneas/documentation/aeneas-overview.md Exit status: 0 Raw stdout: - **Mutable reference parameters** become plain value parameters. - **Returned mutable borrows** produce a tuple of (value, backward continuation). - **Shared borrows (`&T`)** become plain `T` parameters (the value may be copied). - **Pattern matching** maps directly to `match` in Lean. - **Recursive functions** become Lean recursive functions (may require termination proofs). - **Traits** are translated to Lean type classes. Command: sed -n '428,434p' /home/leanagent/pv_spike/tools/aeneas/documentation/aeneas-overview.md Exit status: 0 Raw stdout: | Rust Concept | Lean Translation | |--------------------------|--------------------------------------------------------------| | `&mut T` parameter | `T` parameter (passed by value) | | Returning `&'a mut T` | Returns `Result (T × (T → ...))` with backward continuation | | `&T` (shared borrow) | `T` parameter (immutable, may be copied) | | `panic!()` | `fail` in the `Result` monad | | Integer overflow | `fail` (all arithmetic is checked) | Command: sed -n '60,67p' /home/leanagent/pv_spike/tools/aeneas/backends/lean/Aeneas/Std/Primitives.lean Exit status: 0 Raw stdout: open Error inductive Result (α : Type u) where | ok (v: α): Result α | fail (e: Error): Result α | div deriving Repr, BEq Command: sed -n '115,122p' /home/leanagent/pv_spike/tools/aeneas/backends/lean/Aeneas/Std/Primitives.lean Exit status: 0 Raw stdout: -/ def bind {α : Type u} {β : Type v} (x: Result α) (f: α → Result β) : Result β := match x with | ok v => f v | fail v => fail v | div => div Command: sed -n '97,105p' /home/leanagent/pv_spike/tools/aeneas/backends/lean/Aeneas/Std/Core/Core.lean Exit status: 0 Raw stdout: unwrap x ⦃ v => x = some v ⦄ := by simp only [unwrap, ofOption]; grind @[step_pure_def, rust_fun "core::option::{core::option::Option<@T>}::unwrap_or" -canFail] def core.option.Option.unwrap_or (self : Option T) (default : T) : T := match self with | none => default | some self => self Command: rg -n -A 1 'parse_scientific exponent_suffix|let \(o, _\) ←$' generated.lean Exit status: 0 Raw stdout: 2084: let (o, _) ← num.imp.dec2flt.parse.parse_scientific exponent_suffix 2085- ok (core.option.Option.unwrap_or o 0#i64) -- 2093: let (o, _) ← 2094: num.imp.dec2flt.parse.parse_scientific exponent_suffix 2095- ok (core.option.Option.unwrap_or o 0#i64) -- 2155: let (o, _) ← 2156: num.imp.dec2flt.parse.parse_scientific exponent_suffix 2157- ok (core.option.Option.unwrap_or o 0#i64) -- 2165: let (o, _) ← 2166: num.imp.dec2flt.parse.parse_scientific exponent_suffix 2167- ok (core.option.Option.unwrap_or o 0#i64) -- 2223: let (o, _) ← 2224: num.imp.dec2flt.parse.parse_scientific exponent_suffix 2225- ok (core.option.Option.unwrap_or o 0#i64) -- 2233: let (o, _) ← 2234: num.imp.dec2flt.parse.parse_scientific exponent_suffix 2235- ok (core.option.Option.unwrap_or o 0#i64) -- 2280: let (o, _) ← 2281: num.imp.dec2flt.parse.parse_scientific exponent_suffix 2282- ok (core.option.Option.unwrap_or o 0#i64) -- 2291: let (o, _) ← 2292: num.imp.dec2flt.parse.parse_scientific exponent_suffix 2293- ok (core.option.Option.unwrap_or o 0#i64) Command: sed -n '27,46p' crate/dec2flt/slow.rs Exit status: 0 Raw stdout: pub(crate) fn parse_long_mantissa(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; Command: sed -n '244,260p' upstream/dec2flt/decimal_seq.rs Exit status: 0 Raw stdout: 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; let first = s; // Skip leading zeros. if d.num_digits == 0 { while let Some((&b'0', s_next)) = s.split_first() { s = s_next; } } while s.len() >= 8 && d.num_digits + 8 < DecimalSeq::MAX_DIGITS { let v = s.read_u64(); Command: sed -n '287,300p' upstream/dec2flt/decimal_seq.rs Exit status: 0 Raw stdout: } } let mut explicit = 0; if let Some((&ch, s_next)) = s.split_first() { if ch == b'e' || ch == b'E' { s = s_next; explicit = parse_scientific(&mut s).unwrap_or(0); } } d.decimal_point = final_decimal_point(significant_count, fractional_count, explicit); for i in d.num_digits..DecimalSeq::MAX_DIGITS_WITHOUT_OVERFLOW { d.digits[i] = 0; Command: sed -n '39,52p' upstream/dec2flt/common.rs Exit status: 0 Raw stdout: 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