Claim #2 — Verification of bytes::buf::Take::get_ref (with Aeneas be86ab0f1989d04944292b345b24c435be3ad10a)
impl<T> Take<T>
pub fn get_ref(self: &Self) -> &TTool: Aeneas be86ab0f1989d04944292b345b24c435be3ad10a
Preconditions
true
Formal statement
bytes.take_get_ref_spec
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.get_ref.{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)
bytes.buf.take.TakeExists· Init.CoreAnd· Init.PreludeEq· Init.PreludeAeneas.Std.Result· Aeneas.Std.Primitivesbytes.buf.take.Take.get_refAeneas.Std.Result.ok· Aeneas.Std.Primitivesbytes.buf.take.Take.inner
Evidence
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.
Aeneas be86ab0f1989d04944292b345b24c435be3ad10a — version details