proofs.rs

Claim #3 — Verification of bytes::buf::Take::into_inner (with Aeneas be86ab0f1989d04944292b345b24c435be3ad10a)

bytes::buf::Take::into_inner

impl<T> Take<T>
pub fn into_inner(self: Self) -> T

Tool: Aeneas be86ab0f1989d04944292b345b24c435be3ad10a

This claim has no explanation of its own. Read the report Overview, and treat the formal statement below as authoritative. See Concepts and terminology.

Preconditions

true

Formal statement

bytes.take_into_inner_spec

for allT : Type u_1
for alls : bytes.buf.take.Take T
then∃ out, s.into_inner = Aeneas.Std.Result.ok out ∧ out = s.inner
Complete Lean proposition
∀ {T : Type u_1} (s : bytes.buf.take.Take.{u_1} T),
  @Exists.{u_1 + 1} T fun (out : T) =>
    And
      (@Eq.{u_1 + 1} (Aeneas.Std.Result.{u_1} T) (@bytes.buf.take.Take.into_inner.{u_1} T s)
        (@Aeneas.Std.Result.ok.{u_1} T out))
      (@Eq.{u_1 + 1} T out (@bytes.buf.take.Take.inner.{u_1} T s))

Theorem source at recorded commit · Recorded check

Referenced definitions (up to 100 direct references)

Mapping: manual. Translation was not rerun by this recording.

Evidence

https://github.com/keiichiw/crate-proofs/blob/3785357a67f63cc5c25005cdbc8684b20390d5a3/bytes/1.12.1/aeneas/profiles/unpatched/proofs/Proofs/Take.lean#L9-L11

What is trusted

From the report

Charon/Aeneas translation and Aeneas Lean standard library, Lean kernel and its permitted standard axioms. The compiler translation is trusted, not proved by this report.

Technical limitations

From the report

Only the mapped contracts are verified. No whole-crate, unsafe memory-safety or signed variable-width reader correctness claim.

Tool limitations

Lean backend only, requiring cargo-proofs 0.4.0 or later. The version identifies the official Aeneas Git revision pinned in lake-manifest.json (backends/lean); this revision uses Lean 4.35.0. The recorder checks committed Lean theorem declarations and permits only propext, Classical.choice, and Quot.sound as transitive axioms. It rejects sorryAx and custom axioms, including axiomatized external models. Charon/Aeneas extraction is not rerun. The author must review that the committed functional model matches the recorded Rust source, that the named theorem corresponds to the public API, and that the reported precondition matches the theorem. A checked theorem alone does not establish those links or the adequacy of the specification. The current adapter records the default Cargo configuration, with ordinary Lean module paths and a pinned official Git dependency. Other backends, custom Lake source directories, and local-path Aeneas dependencies are unsupported. See https://proofs.rs/book/aeneas.html and https://github.com/AeneasVerif/aeneas/tree/be86ab0f1989d04944292b345b24c435be3ad10a.

Updated 2026-10-16 00:00 UTC

Aeneas be86ab0f1989d04944292b345b24c435be3ad10a — version details

Read and join the discussion on the report →