Aeneas string/as_bytes evidence

Commands were run from the repository root unless an explicit -C directory is
shown.  The Aeneas checkout used for the frozen extraction is pinned by:

  git -C /home/leanagent/pv_spike/tools/aeneas rev-parse HEAD
  fa699427cdfa8f604b891fb0223ef42883dd7dc4

The configured executable and its identity are pinned by:

  jq -r '.effective_tools.aeneas' modeling-input/manifest.json
  /home/leanagent/pv_spike/tools/aeneas/bin/aeneas

  sha256sum /home/leanagent/pv_spike/tools/aeneas/bin/aeneas
  9f446d2aaf59e8e705e36d05cb993f1c6ab0e97f8dc6fd2f19907a86ede30922  /home/leanagent/pv_spike/tools/aeneas/bin/aeneas

The Aeneas string definition at that commit is pinned by:

  sha256sum /home/leanagent/pv_spike/tools/aeneas/backends/lean/Aeneas/Std/String.lean
  412329294f15a509ea526c7506c5f0c2d1a00f45e719049e87c6977b2e365978  /home/leanagent/pv_spike/tools/aeneas/backends/lean/Aeneas/Std/String.lean

Its exact definition at Aeneas/Std/String.lean:6 is:

  def Str := Slice U8

Thus Aeneas Str itself has only the Aeneas Slice U8 constraints; it does not by
itself impose Rust str's UTF-8 validity or isize::MAX byte-length restriction.
The ordered-list representation of Aeneas Slice, including its Usize.max bound,
is pinned separately in reference/model-evidence/aeneas-slice-observations.txt.
The configured Rust str validity and isize::MAX byte-length conditions are
pinned separately in reference/model-evidence/source-valid-byte-slice.txt.

The frozen generated module and its string external are pinned by:

  sha256sum generated.lean
  45b5027c42f9bb25bf22d3573fdb0f93784cf93d2a7b92ef1a7687c8f66c25a9  generated.lean

The raw declaration at generated.lean:326-331 is:

  /-- [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)

The inspect-native raw declaration digest recorded in the support binding is:

  11bae0b1f519e9d892c9835bacc776977e8d5dbf1013af4a24178a41025a8b3f

The command

  rg -n 'core\.str\.Str\.as_bytes' generated.lean

has the complete raw result:

  331:axiom core.str.Str.as_bytes : Str → Result (Slice Std.U8)
  4811:  let body ← core.str.Str.as_bytes s

Consequently the only call in the frozen generated module is the first
operation in num.imp.dec2flt.dec2flt_with_trace, whose parameter and call at
generated.lean:4807-4811 are:

  (coreopsarithNegInst : core.ops.arith.Neg F F) (s : Str) :
  Result ((core.result.Result F num.float_parse.ParseFloatError) ×
    (num.imp.dec2flt.Dec2FltTrace F))
  := do
  let body ← core.str.Str.as_bytes s

The support manifest itself is pinned by:

  sha256sum Tablet/model-support.json
  c099ae8478fe2cea91a3f82f51a5d3369270ded2bc08a7596ba8cca0c8382e87  Tablet/model-support.json

Its exact binding at Tablet/model-support.json:183-190 is:

  {
    "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"
  }

The configured Rust core implementation is pinned by:

  sha256sum /home/leanagent/.rustup/toolchains/nightly-2026-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/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

Its exact same-layout body at core/src/str/mod.rs:498-501 is:

  pub const fn as_bytes(&self) -> &[u8] {
      // SAFETY: const sound because we transmute two types with the same layout
      unsafe { mem::transmute(self) }
  }

The frozen adapted dispatcher source and its sole source call are pinned by:

  sha256sum crate/dec2flt/mod.rs
  ecadc1d7df05dfda85fcf99fc45da7e40cb36aa9736d12d1b3a75f60f532907d  crate/dec2flt/mod.rs

  rg -n 'as_bytes' crate
  crate/dec2flt/mod.rs:364:    let mut body = s.as_bytes();

  crate/dec2flt/mod.rs:362-365
      s: &'a str,
  ) -> (Result<F, ParseFloatError>, Dec2FltTrace<'a, F>) {
      let mut body = s.as_bytes();
      let Some(&c) = body.first() else {

The core body returns a shared byte slice by same-layout transmutation: it does
not change, reorder, add, or remove bytes and has no failure branch.  The Aeneas
shared-borrow convention and the later immutable ordered-byte observations are
pinned in reference/model-evidence/aeneas-slice-observations.txt.
