proofs.rs

Report #36 — Partial verification of a lexical-core 1.0.6 facade fork

Aeneas be86ab0f1989d04944292b345b24c435be3ad10a

6 verified claims · 2 findings

Recorded by the author; proofs.rs has not re-run it. How to read a report

MasWag · 2026-11-10 07:00 UTC

Revision v1

Overview

This report covers a verification fork of the lexical-core 1.0.6 generic facade. Its six parse and write functions forward their inputs to the supplied trait method and return that method's exact result. This includes parsing errors and the writer's returned slice and mutable-borrow backward function.

The mapped conditional contracts transfer any chosen output property to a facade call when the corresponding supplied trait call already terminates successfully and satisfies that property. They do not establish that a concrete numeric implementation satisfies the premise.

Separately, a source-adapted compact decimal u8 helper was proved for every u8 and every initial buffer of at least three bytes: it succeeds, writes the canonical ASCII decimal prefix, returns its exact length and preserves the remaining buffer. This supplemental helper theorem is not a claim about an unchanged public API.

Findings (2)

APIs (6)

Functions

pub fn parse<N: FromLexical>(bytes: &[u8]) -> Result<N>
pub fn parse_partial<N: FromLexical>(bytes: &[u8]) -> Result<(N, usize)>
pub fn parse_partial_with_options<N: FromLexicalWithOptions, const FORMAT: u128>(bytes: &[u8], options: &<N as lexical_core::FromLexicalWithOptions>::Options) -> Result<(N, usize)>
pub fn parse_with_options<N: FromLexicalWithOptions, const FORMAT: u128>(bytes: &[u8], options: &<N as lexical_core::FromLexicalWithOptions>::Options) -> Result<N>
pub fn write<N: ToLexical>(n: N, bytes: &mut [u8]) -> &mut [u8]
pub fn write_with_options<'a, N: ToLexicalWithOptions, const FORMAT: u128>(n: N, bytes: &'a mut [u8], options: &<N as lexical_core::ToLexicalWithOptions>::Options) -> &'a mut [u8]

Evidence

https://github.com/MasWag/crate-proofs/tree/e62defe37eef5b1f670f12f15574379fabca2cda

Reproduce

Toolchain source metadata: not recorded.

Run locally

git clone -- https://github.com/MasWag/crate-proofs report-36-source-1
git -C report-36-source-1 checkout --detach e62defe37eef5b1f670f12f15574379fabca2cda
git -C report-36-source-1 submodule update --init --recursive --checkout
cd report-36-source-1/lexical-core/1.0.6/publication/proofs

lake build +Proofs

printf '%s' 'import Aeneas
import Proofs
set_option pp.all true
set_option pp.universes true
set_option pp.explicit true
set_option pp.fullNames true
set_option pp.notation false
set_option pp.proofs true
set_option pp.deepTerms true
set_option pp.maxSteps 10000000
-- proofs.rs adapter for Lean 4.35.0 / Aeneas be86ab0f.
-- Uses Lean'\''s environment, Meta telescope and pretty-printer, never source parsing.
open Lean Meta Elab Command
namespace ProofsProbe
meta def moduleOf (env : Environment) (n : Name) : String :=
  match env.getModuleIdxFor? n with
  | some idx => env.header.moduleNames[idx.toNat]!.toString
  | none => ""
meta def pretty (e : Expr) : MetaM String := do
  let s := (← ppExpr e).pretty
  if s.contains '\''⋯'\'' then
    throwError "Lean display contains an omission marker (or literal ⋯); refusing an incomplete proposition"
  if s.utf8ByteSize > 1000000 then throwError "Proposition exceeds 1,000,000-byte recording limit"
  return s
-- The full statement stays explicit; the inspection view uses Lean notation.
meta def readable (e : Expr) : MetaM String :=
  withOptions (fun o =>
    let o := o.setBool `pp.all false
    let o := o.setBool `pp.explicit false
    let o := o.setBool `pp.universes false
    o.setBool `pp.notation true) (pretty e)
-- Only a constant'\''s own tag grants a link; names in plain text are never guessed.
partial def segments (code : Widget.CodeWithInfos) (ref : Option Name := none) : Array Json :=
  match code with
  | .text text => #[Json.mkObj (([("text", toJson text)]) ++
      (ref.toList.map fun n => ("ref", toJson n.toString)))]
  | .append parts => parts.foldl (fun acc part => acc ++ segments part ref) #[]
  | .tag info part =>
    let ref := match info.info.val.info with
      | .ofTermInfo ti => ti.expr.constName?
      | _ => none
    segments part ref
meta def readableFields (key : String) (e : Expr) : MetaM (List (String × Json)) := do
  let text ← readable e
  let base := [(key, toJson text)]
  try
    let code ← withOptions (fun o =>
      let o := o.setBool `pp.all false
      let o := o.setBool `pp.explicit false
      let o := o.setBool `pp.universes false
      let o := o.setBool `pp.notation true
      o.setBool `pp.tagAppFns true) (Widget.ppExprTagged e)
    let parts := segments code
    let joined := String.join (parts.toList.map fun j =>
      (j.getObjValAs? String "text").toOption.getD "")
    if joined != text || parts.size > 10000 || joined.utf8ByteSize > 1000000 then
      return base
    return base ++ [(key ++ "_segments", toJson parts)]
  catch _ => return base
meta def inspect (n : Name) (ty : Expr) (manual : Bool) : MetaM (Option Json) := do
  let env ← getEnv
  forallTelescope ty fun xs conclusion => do
    let programExpr ← try
      let normalized ← Aeneas.Utils.normalizeLetBindings conclusion
      let (expr, _) ← Aeneas.Step.getStepSpecFunArgsExpr normalized
      pure (some expr)
    catch _ => pure none
    if programExpr.isNone && !manual then return none
    let full ← pretty ty
    let program ← match programExpr with
      | some expr => pure (toJson (← readable expr))
      | none => pure Json.null
    let head := toJson (programExpr.bind (·.getAppFn.constName?) |>.map Name.toString)
    let mut binders := #[]
    for x in xs do
      let d ← x.fvarId!.getDecl
      let prop ← isProp d.type
      binders := binders.push (Json.mkObj ((← readableFields "type" d.type) ++ [
        ("name", toJson d.userName.toString),
        ("kind", toJson (if d.binderInfo.isInstImplicit then "instance" else if prop then "hypothesis" else "variable")),
        ("binder", toJson (if d.binderInfo.isInstImplicit then "instance" else if d.binderInfo.isExplicit then "explicit" else "implicit"))]))
    if binders.size > 1000 then throwError "More than 1000 binders"
    let some ranges ← findDeclarationRanges? n | throwError "Missing theorem source range: {n}"
    let axioms ← Lean.collectAxioms n
    let constants := ty.getUsedConstants
    let mut definitions := #[]
    for nm in constants.extract 0 100 do
      let ranges ← findDeclarationRanges? nm
      definitions := definitions.push (Json.mkObj [
        ("name", toJson nm.toString), ("module", toJson (moduleOf env nm)),
        ("source", match ranges with
          | some r => Json.mkObj [("first_line", toJson r.range.pos.line), ("last_line", toJson r.range.endPos.line)]
          | none => Json.null)])
    return some (Json.mkObj ((← readableFields "conclusion" conclusion) ++ [
      ("version", toJson (1 : Nat)), ("theorem", toJson n.toString),
      ("module", toJson (moduleOf env n)), ("statement", toJson full),
      ("binders", toJson binders),
      ("program", program), ("program_head", head),
      ("axioms", toJson (axioms.map Name.toString)),
      ("first_line", toJson ranges.range.pos.line), ("last_line", toJson ranges.range.endPos.line),
      ("definitions", toJson definitions), ("definitions_truncated", toJson (decide (constants.size > 100))),
      ("translation_rerun", toJson false)]))
end ProofsProbe

run_cmd do
  let manual : Array Name := #[`LexicalCorePublicationProofs.parse_spec, `LexicalCorePublicationProofs.parse_partial_spec, `LexicalCorePublicationProofs.parse_with_options_spec, `LexicalCorePublicationProofs.parse_partial_with_options_spec, `LexicalCorePublicationProofs.write_spec, `LexicalCorePublicationProofs.write_with_options_spec]
  let localModules : Array String := #[]
  let roots : Array Name := #[]
  let env ← getEnv
  let mut closure : Array Name := #[]
  let mut pending := roots.toList
  while !pending.isEmpty do
    let m := pending.head!
    pending := pending.tail!
    if !closure.contains m then
      closure := closure.push m
      if let some idx := env.header.moduleNames.findIdx? (· == m) then
        pending := (env.header.moduleData[idx]!.imports.toList.map (·.module)) ++ pending
  let scope := closure.filter (fun m => localModules.contains m.toString)
  for n in manual do
    match env.find? n with
    | some (.thmInfo _) => pure ()
    | _ => throwError "Expected a theorem: {n}"
  for (n, ci) in env.constants.toList do
    let explicit := manual.contains n
    if explicit || scope.contains (ProofsProbe.moduleOf env n).toName then
      if let .thmInfo th := ci then
        let result ← liftTermElabM <| ProofsProbe.inspect n th.type explicit
        if let some value := result then
          liftIO <| IO.println ("proofs.rs:formal:" ++ value.compress)

run_cmd do
  let theorem_name := `LexicalCorePublicationProofs.parse_spec
  match (← getEnv).find? theorem_name with
  | some (.thmInfo _) => pure ()
  | _ => throwError "Expected a theorem: LexicalCorePublicationProofs.parse_spec"
  let axioms ← Lean.collectAxioms theorem_name
  for ax in axioms do
    unless [``propext, ``Classical.choice, ``Quot.sound].contains ax do
      throwError "Unapproved axiom in LexicalCorePublicationProofs.parse_spec: {ax}"
  liftIO <| IO.println "proofs.rs:checked:LexicalCorePublicationProofs.parse_spec"

run_cmd do
  let theorem_name := `LexicalCorePublicationProofs.parse_partial_spec
  match (← getEnv).find? theorem_name with
  | some (.thmInfo _) => pure ()
  | _ => throwError "Expected a theorem: LexicalCorePublicationProofs.parse_partial_spec"
  let axioms ← Lean.collectAxioms theorem_name
  for ax in axioms do
    unless [``propext, ``Classical.choice, ``Quot.sound].contains ax do
      throwError "Unapproved axiom in LexicalCorePublicationProofs.parse_partial_spec: {ax}"
  liftIO <| IO.println "proofs.rs:checked:LexicalCorePublicationProofs.parse_partial_spec"

run_cmd do
  let theorem_name := `LexicalCorePublicationProofs.parse_partial_with_options_spec
  match (← getEnv).find? theorem_name with
  | some (.thmInfo _) => pure ()
  | _ => throwError "Expected a theorem: LexicalCorePublicationProofs.parse_partial_with_options_spec"
  let axioms ← Lean.collectAxioms theorem_name
  for ax in axioms do
    unless [``propext, ``Classical.choice, ``Quot.sound].contains ax do
      throwError "Unapproved axiom in LexicalCorePublicationProofs.parse_partial_with_options_spec: {ax}"
  liftIO <| IO.println "proofs.rs:checked:LexicalCorePublicationProofs.parse_partial_with_options_spec"

run_cmd do
  let theorem_name := `LexicalCorePublicationProofs.parse_with_options_spec
  match (← getEnv).find? theorem_name with
  | some (.thmInfo _) => pure ()
  | _ => throwError "Expected a theorem: LexicalCorePublicationProofs.parse_with_options_spec"
  let axioms ← Lean.collectAxioms theorem_name
  for ax in axioms do
    unless [``propext, ``Classical.choice, ``Quot.sound].contains ax do
      throwError "Unapproved axiom in LexicalCorePublicationProofs.parse_with_options_spec: {ax}"
  liftIO <| IO.println "proofs.rs:checked:LexicalCorePublicationProofs.parse_with_options_spec"

run_cmd do
  let theorem_name := `LexicalCorePublicationProofs.write_spec
  match (← getEnv).find? theorem_name with
  | some (.thmInfo _) => pure ()
  | _ => throwError "Expected a theorem: LexicalCorePublicationProofs.write_spec"
  let axioms ← Lean.collectAxioms theorem_name
  for ax in axioms do
    unless [``propext, ``Classical.choice, ``Quot.sound].contains ax do
      throwError "Unapproved axiom in LexicalCorePublicationProofs.write_spec: {ax}"
  liftIO <| IO.println "proofs.rs:checked:LexicalCorePublicationProofs.write_spec"

run_cmd do
  let theorem_name := `LexicalCorePublicationProofs.write_with_options_spec
  match (← getEnv).find? theorem_name with
  | some (.thmInfo _) => pure ()
  | _ => throwError "Expected a theorem: LexicalCorePublicationProofs.write_with_options_spec"
  let axioms ← Lean.collectAxioms theorem_name
  for ax in axioms do
    unless [``propext, ``Classical.choice, ``Quot.sound].contains ax do
      throwError "Unapproved axiom in LexicalCorePublicationProofs.write_with_options_spec: {ax}"
  liftIO <| IO.println "proofs.rs:checked:LexicalCorePublicationProofs.write_with_options_spec"
' | lake env lean --stdin

Checks out the recorded source commit from GitHub. Install the report’s tool version before running.

Source on GitHub · SARIF with logs (.json)

Recorded run

Completed · 6 checks passed · 0 failed

2026-11-10T06:55:19.096072+00:00 · 32.6 seconds · Exit code 0

Recorded on the author’s machine.

CheckResultClaim
Lean checked theorem LexicalCorePublicationProofs.parse_spec; axioms limited to propext, Classical.choice, Quot.sound
LexicalCorePublicationProofs.parse_spec
PassedClaim #1
Lean checked theorem LexicalCorePublicationProofs.parse_partial_spec; axioms limited to propext, Classical.choice, Quot.sound
LexicalCorePublicationProofs.parse_partial_spec
PassedClaim #2
Lean checked theorem LexicalCorePublicationProofs.parse_partial_with_options_spec; axioms limited to propext, Classical.choice, Quot.sound
LexicalCorePublicationProofs.parse_partial_with_options_spec
PassedClaim #3
Lean checked theorem LexicalCorePublicationProofs.parse_with_options_spec; axioms limited to propext, Classical.choice, Quot.sound
LexicalCorePublicationProofs.parse_with_options_spec
PassedClaim #4
Lean checked theorem LexicalCorePublicationProofs.write_spec; axioms limited to propext, Classical.choice, Quot.sound
LexicalCorePublicationProofs.write_spec
PassedClaim #5
Lean checked theorem LexicalCorePublicationProofs.write_with_options_spec; axioms limited to propext, Classical.choice, Quot.sound
LexicalCorePublicationProofs.write_with_options_spec
PassedClaim #6
Execution details
Started
2026-11-10T06:55:19.096072+00:00
Finished
2026-11-10T06:55:51.647394+00:00
Platform
macos aarch64
Rust compiler
rustc 1.94.1 (e408947bf 2026-03-25) binary: rustc commit-hash: e408947bfd200af42db322daf0fadfe7e26d3bd1 commit-date: 2026-03-25 host: aarch64-apple-darwin release: 1.94.1 LLVM version: 21.1.8
Working directory
lexical-core/1.0.6/publication/proofs
Environment overrides
None recorded
Git repository
https://github.com/MasWag/crate-proofs
Git commit
e62defe37eef5b1f670f12f15574379fabca2cda
Diagnostics & logs
=== stdout ===
✔ [1796/1797] Built Facade (4.0s)
✔ [1797/1797] Built Proofs (5.5s)
Build completed successfully (1797 jobs).

$ lake env lean --stdin (proofs.rs formal extraction and axiom audit)
proofs.rs:formal:{"axioms":["propext","Quot.sound"],"binders":[{"binder":"implicit","kind":"variable","name":"N","type":"Type","type_segments":[{"text":"Type"}]},{"binder":"implicit","kind":"variable","name":"O","type":"Type","type_segments":[{"text":"Type"}]},{"binder":"explicit","kind":"variable","name":"fmt","type":"Aeneas.Std.U128","type_segments":[{"ref":"Aeneas.Std.U128","text":"Aeneas.Std.U128"}]},{"binder":"explicit","kind":"variable","name":"inst","type":"lexical_core.FromLexicalWithOptions N O","type_segments":[{"ref":"lexical_core.FromLexicalWithOptions","text":"lexical_core.FromLexicalWithOptions"},{"text":" "},{"text":"N"},{"text":" "},{"text":"O"}]},{"binder":"explicit","kind":"variable","name":"bytes","type":"Aeneas.Std.Slice Aeneas.Std.U8","type_segments":[{"ref":"Aeneas.Std.Slice","text":"Aeneas.Std.Slice"},{"text":" "},{"ref":"Aeneas.Std.U8","text":"Aeneas.Std.U8"}]},{"binder":"explicit","kind":"variable","name":"opts","type":"O","type_segments":[{"text":"O"}]},{"binder":"explicit","kind":"variable","name":"P","type":"Aeneas.Std.core.result.Result N lexical_core.lexical_util.error.Error → Prop","type_segments":[{"ref":"Aeneas.Std.core.result.Result","text":"Aeneas.Std.core.result.Result"},{"text":" "},{"text":"N"},{"text":" "},{"ref":"lexical_core.lexical_util.error.Error","text":"lexical_core.lexical_util.error.Error"},{"text":" → "},{"text":"Prop"}]},{"binder":"explicit","kind":"hypothesis","name":"h","type":"∃ out, inst.from_lexical_with_options fmt bytes opts = Aeneas.Std.Result.ok out ∧ P out","type_segments":[{"text":"∃ "},{"text":"out"},{"text":", "},{"text":"inst"},{"text":"."},{"ref":"lexical_core.FromLexicalWithOptions.from_lexical_with_options","text":"from_lexical_with_options"},{"text":" "},{"text":"fmt"},{"text":" "},{"text":"bytes"},{"text":" "},{"text":"opts"},{"ref":"Eq","text":" = "},{"ref":"Aeneas.Std.Result.ok","text":"Aeneas.Std.Result.ok"},{"text":" "},{"text":"out"},{"ref":"And","text":" ∧ "},{"text":"P"},{"text":" "},{"text":"out"}]}],"conclusion":"∃ out, lexical_core.parse_with_options fmt inst bytes opts = Aeneas.Std.Result.ok out ∧ P out","conclusion_segments":[{"text":"∃ "},{"text":"out"},{"text":", "},{"ref":"lexical_core.parse_with_options","text":"lexical_core.parse_with_options"},{"text":" "},{"text":"fmt"},{"text":" "},{"text":"inst"},{"text":" "},{"text":"bytes"},{"text":" "},{"text":"opts"},{"ref":"Eq","text":" = "},{"ref":"Aeneas.Std.Result.ok","text":"Aeneas.Std.Result.ok"},{"text":" "},{"text":"out"},{"ref":"And","text":" ∧ "},{"text":"P"},{"text":" "},{"text":"out"}],"definitions":[{"module":"Aeneas.Std.Scalar.Core","name":"Aeneas.Std.U128","source":{"first_line":673,"last_line":673}},{"module":"Facade","name":"lexical_core.FromLexicalWithOptions","source":{"first_line":88,"last_line":96}},{"module":"Aeneas.Std.SliceDef","name":"Aeneas.Std.Slice","source":{"first_line":15,"last_line":19}},{"module":"Aeneas.Std.Scalar.Core","name":"Aeneas.Std.U8","source":{"first_line":669,"last_line":669}},{"module":"Aeneas.Std.Core.Result","name":"Aeneas.Std.core.result.Result","source":{"first_line":7,"last_line":10}},{"module":"Facade","name":"lexical_core.lexical_util.error.Error","source":{"first_line":23,"last_line":77}},{"module":"Init.Core","name":"Exists","source":{"first_line":313,"last_line":341}},{"module":"Init.Prelude","name":"And","source":{"first_line":645,"last_line":659}},{"module":"Init.Prelude","name":"Eq","source":{"first_line":46,"last_line":76}},{"module":"Aeneas.Std.Primitives","name":"Aeneas.Std.Result","source":{"first_line":67,"last_line":68}},{"module":"Facade","name":"lexical_core.FromLexicalWithOptions.from_lexical_with_options","source":{"first_line":92,"last_line":92}},{"module":"Aeneas.Std.Primitives","name":"Aeneas.Std.Result.ok","source":{"first_line":72,"last_line":72}},{"module":"Facade","name":"lexical_core.parse_with_options","source":{"first_line":151,"last_line":160}}],"definitions_truncated":false,"first_line":43,"last_line":47,"module":"Proofs","program":null,"program_head":null,"statement":"∀ {N O : Type} (fmt : Aeneas.Std.U128) (inst : lexical_core.FromLexicalWithOptions.{0, 0} N O)\n  (bytes : Aeneas.Std.Slice.{0} Aeneas.Std.U8) (opts : O)\n  (P : Aeneas.Std.core.result.Result.{0, 0} N lexical_core.lexical_util.error.Error → Prop)\n  (h :\n    @Exists.{1} (Aeneas.Std.core.result.Result.{0, 0} N lexical_core.lexical_util.error.Error)\n      fun (out : Aeneas.Std.core.result.Result.{0, 0} N lexical_core.lexical_util.error.Error) =>\n      And\n        (@Eq.{1} (Aeneas.Std.Result.{0} (Aeneas.Std.core.result.Result.{0, 0} N lexical_core.lexical_util.error.Error))\n          (@lexical_core.FromLexicalWithOptions.from_lexical_with_options.{0, 0} N O inst fmt bytes opts)\n          (@Aeneas.Std.Result.ok.{0} (Aeneas.Std.core.result.Result.{0, 0} N lexical_core.lexical_util.error.Error)\n            out))\n        (P out)),\n  @Exists.{1} (Aeneas.Std.core.result.Result.{0, 0} N lexical_core.lexical_util.error.Error)\n    fun (out : Aeneas.Std.core.result.Result.{0, 0} N lexical_core.lexical_util.error.Error) =>\n    And\n      (@Eq.{1} (Aeneas.Std.Result.{0} (Aeneas.Std.core.result.Result.{0, 0} N lexical_core.lexical_util.error.Error))\n        (@lexical_core.parse_with_options.{0, 0} N O fmt inst bytes opts)\n        (@Aeneas.Std.Result.ok.{0} (Aeneas.Std.core.result.Result.{0, 0} N lexical_core.lexical_util.error.Error) out))\n      (P out)","theorem":"LexicalCorePublicationProofs.parse_with_options_spec","translation_rerun":false,"version":1}
proofs.rs:formal:{"axioms":["propext","Quot.sound"],"binders":[{"binder":"implicit","kind":"variable","name":"N","type":"Type","type_segments":[{"text":"Type"}]},{"binder":"explicit","kind":"variable","name":"inst","type":"lexical_core.FromLexical N","type_segments":[{"ref":"lexical_core.FromLexical","text":"lexical_core.FromLexical"},{"text":" "},{"text":"N"}]},{"binder":"explicit","kind":"variable","name":"bytes","type":"Aeneas.Std.Slice Aeneas.Std.U8","type_segments":[{"ref":"Aeneas.Std.Slice","text":"Aeneas.Std.Slice"},{"text":" "},{"ref":"Aeneas.Std.U8","text":"Aeneas.Std.U8"}]},{"binder":"explicit","kind":"variable","name":"P","type":"Aeneas.Std.core.result.Result (N × Aeneas.Std.Usize) lexical_core.lexical_util.error.Error → Prop","type_segments":[{"ref":"Aeneas.Std.core.result.Result","text":"Aeneas.Std.core.result.Result"},{"text":" "},{"ref":"Prod","text":"("},{"text":"N"},{"ref":"Prod","text":" × "},{"ref":"Aeneas.Std.Usize","text":"Aeneas.Std.Usize"},{"ref":"Prod","text":")"},{"text":" "},{"ref":"lexical_core.lexical_util.error.Error","text":"lexical_core.lexical_util.error.Error"},{"text":" → "},{"text":"Prop"}]},{"binder":"explicit","kind":"hypothesis","name":"h","type":"∃ out, inst.from_lexical_partial bytes = Aeneas.Std.Result.ok out ∧ P out","type_segments":[{"text":"∃ "},{"text":"out"},{"text":", "},{"text":"inst"},{"text":"."},{"ref":"lexical_core.FromLexical.from_lexical_partial","text":"from_lexical_partial"},{"text":" "},{"text":"bytes"},{"ref":"Eq","text":" = "},{"ref":"Aeneas.Std.Result.ok","text":"Aeneas.Std.Result.ok"},{"text":" "},{"text":"out"},{"ref":"And","text":" ∧ "},{"text":"P"},{"text":" "},{"text":"out"}]}],"conclusion":"∃ out, lexical_core.parse_partial inst bytes = Aeneas.Std.Result.ok out ∧ P out","conclusion_segments":[{"text":"∃ "},{"text":"out"},{"text":", "},{"ref":"lexical_core.parse_partial","text":"lexical_core.parse_partial"},{"text":" "},{"text":"inst"},{"text":" "},{"text":"bytes"},{"ref":"Eq","text":" = "},{"ref":"Aeneas.Std.Result.ok","text":"Aeneas.Std.Result.ok"},{"text":" "},{"text":"out"},{"ref":"And","text":" ∧ "},{"text":"P"},{"text":" "},{"text":"out"}],"definitions":[{"module":"Facade","name":"lexical_core.FromLexical","source":{"first_line":79,"last_line":86}},{"module":"Aeneas.Std.SliceDef","name":"Aeneas.Std.Slice","source":{"first_line":15,"last_line":19}},{"module":"Aeneas.Std.Scalar.Core","name":"Aeneas.Std.U8","source":{"first_line":669,"last_line":669}},{"module":"Aeneas.Std.Core.Result","name":"Aeneas.Std.core.result.Result","source":{"first_line":7,"last_line":10}},{"module":"Init.Prelude","name":"Prod","source":{"first_line":603,"last_line":618}},{"module":"Aeneas.Std.Scalar.Core","name":"Aeneas.Std.Usize","source":{"first_line":668,"last_line":668}},{"module":"Facade","name":"lexical_core.lexical_util.error.Error","source":{"first_line":23,"last_line":77}},{"module":"Init.Core","name":"Exists","source":{"first_line":313,"last_line":341}},{"module":"Init.Prelude","name":"And","source":{"first_line":645,"last_line":659}},{"module":"Init.Prelude","name":"Eq","source":{"first_line":46,"last_line":76}},{"module":"Aeneas.Std.Primitives","name":"Aeneas.Std.Result","source":{"first_line":67,"last_line":68}},{"module":"Facade","name":"lexical_core.FromLexical.from_lexical_partial","source":{"first_line":85,"last_line":85}},{"module":"Aeneas.Std.Primitives","name":"Aeneas.Std.Result.ok","source":{"first_line":72,"last_line":72}},{"module":"Facade","name":"lexical_core.parse_partial","source":{"first_line":142,"last_line":149}}],"definitions_truncated":false,"first_line":38,"last_line":41,"module":"Proofs","program":null,"program_head":null,"statement":"∀ {N : Type} (inst : lexical_core.FromLexical.{0} N) (bytes : Aeneas.Std.Slice.{0} Aeneas.Std.U8)\n  (P :\n    Aeneas.Std.core.result.Result.{0, 0} (Prod.{0, 0} N Aeneas.Std.Usize) lexical_core.lexical_util.error.Error → Prop)\n  (h :\n    @Exists.{1}\n      (Aeneas.Std.core.result.Result.{0, 0} (Prod.{0, 0} N Aeneas.Std.Usize) lexical_core.lexical_util.error.Error)\n      fun\n        (out :\n          Aeneas.Std.core.result.Result.{0, 0} (Prod.{0, 0} N Aeneas.Std.Usize)\n            lexical_core.lexical_util.error.Error) =>\n      And\n        (@Eq.{1}\n          (Aeneas.Std.Result.{0}\n            (Aeneas.Std.core.result.Result.{0, 0} (Prod.{0, 0} N Aeneas.Std.Usize)\n              lexical_core.lexical_util.error.Error))\n          (@lexical_core.FromLexical.from_lexical_partial.{0} N inst bytes)\n          (@Aeneas.Std.Result.ok.{0}\n            (Aeneas.Std.core.result.Result.{0, 0} (Prod.{0, 0} N Aeneas.Std.Usize)\n              lexical_core.lexical_util.error.Error)\n            out))\n        (P out)),\n  @Exists.{1}\n    (Aeneas.Std.core.result.Result.{0, 0} (Prod.{0, 0} N Aeneas.Std.Usize) lexical_core.lexical_util.error.Error)\n    fun\n      (out :\n        Aeneas.Std.core.result.Result.{0, 0} (Prod.{0, 0} N Aeneas.Std.Usize) lexical_core.lexical_util.error.Error) =>\n    And\n      (@Eq.{1}\n        (Aeneas.Std.Result.{0}\n          (Aeneas.Std.core.result.Result.{0, 0} (Prod.{0, 0} N Aeneas.Std.Usize) lexical_core.lexical_util.error.Error))\n        (@lexical_core.parse_partial.{0} N inst bytes)\n        (@Aeneas.Std.Result.ok.{0}\n          (Aeneas.Std.core.result.Result.{0, 0} (Prod.{0, 0} N Aeneas.Std.Usize) lexical_core.lexical_util.error.Error)\n          out))\n      (P out)","theorem":"LexicalCorePublicationProofs.parse_partial_spec","translation_rerun":false,"version":1}
proofs.rs:formal:{"axioms":["propext","Quot.sound"],"binders":[{"binder":"implicit","kind":"variable","name":"N","type":"Type","type_segments":[{"text":"Type"}]},{"binder":"implicit","kind":"variable","name":"O","type":"Type","type_segments":[{"text":"Type"}]},{"binder":"explicit","kind":"variable","name":"fmt","type":"Aeneas.Std.U128","type_segments":[{"ref":"Aeneas.Std.U128","text":"Aeneas.Std.U128"}]},{"binder":"explicit","kind":"variable","name":"inst","type":"lexical_core.ToLexicalWithOptions N O","type_segments":[{"ref":"lexical_core.ToLexicalWithOptions","text":"lexical_core.ToLexicalWithOptions"},{"text":" "},{"text":"N"},{"text":" "},{"text":"O"}]},{"binder":"explicit","kind":"variable","name":"value","type":"N","type_segments":[{"text":"N"}]},{"binder":"explicit","kind":"variable","name":"bytes","type":"Aeneas.Std.Slice Aeneas.Std.U8","type_segments":[{"ref":"Aeneas.Std.Slice","text":"Aeneas.Std.Slice"},{"text":" "},{"ref":"Aeneas.Std.U8","text":"Aeneas.Std.U8"}]},{"binder":"explicit","kind":"variable","name":"opts","type":"O","type_segments":[{"text":"O"}]},{"binder":"explicit","kind":"variable","name":"P","type":"Aeneas.Std.Slice Aeneas.Std.U8 × (Aeneas.Std.Slice Aeneas.Std.U8 → Aeneas.Std.Slice Aeneas.Std.U8) → Prop","type_segments":[{"ref":"Aeneas.Std.Slice","text":"Aeneas.Std.Slice"},{"text":" "},{"ref":"Aeneas.Std.U8","text":"Aeneas.Std.U8"},{"ref":"Prod","text":" × "},{"text":"("},{"ref":"Aeneas.Std.Slice","text":"Aeneas.Std.Slice"},{"text":" "},{"ref":"Aeneas.Std.U8","text":"Aeneas.Std.U8"},{"text":" → "},{"ref":"Aeneas.Std.Slice","text":"Aeneas.Std.Slice"},{"text":" "},{"ref":"Aeneas.Std.U8","text":"Aeneas.Std.U8"},{"text":")"},{"text":" → "},{"text":"Prop"}]},{"binder":"explicit","kind":"hypothesis","name":"h","type":"∃ out, inst.to_lexical_with_options fmt value bytes opts = Aeneas.Std.Result.ok out ∧ P out","type_segments":[{"text":"∃ "},{"text":"out"},{"text":", "},{"text":"inst"},{"text":"."},{"ref":"lexical_core.ToLexicalWithOptions.to_lexical_with_options","text":"to_lexical_with_options"},{"text":" "},{"text":"fmt"},{"text":" "},{"text":"value"},{"text":" "},{"text":"bytes"},{"text":" "},{"text":"opts"},{"ref":"Eq","text":" = "},{"ref":"Aeneas.Std.Result.ok","text":"Aeneas.Std.Result.ok"},{"text":" "},{"text":"out"},{"ref":"And","text":" ∧ "},{"text":"P"},{"text":" "},{"text":"out"}]}],"conclusion":"∃ out, lexical_core.write_with_options fmt inst value bytes opts = Aeneas.Std.Result.ok out ∧ P out","conclusion_segments":[{"text":"∃ "},{"text":"out"},{"text":", "},{"ref":"lexical_core.write_with_options","text":"lexical_core.write_with_options"},{"text":" "},{"text":"fmt"},{"text":" "},{"text":"inst"},{"text":" "},{"text":"value"},{"text":" "},{"text":"bytes"},{"text":" "},{"text":"opts"},{"ref":"Eq","text":" = "},{"ref":"Aeneas.Std.Result.ok","text":"Aeneas.Std.Result.ok"},{"text":" "},{"text":"out"},{"ref":"And","text":" ∧ "},{"text":"P"},{"text":" "},{"text":"out"}],"definitions":[{"module":"Aeneas.Std.Scalar.Core","name":"Aeneas.Std.U128","source":{"first_line":673,"last_line":673}},{"module":"Facade","name":"lexical_core.ToLexicalWithOptions","source":{"first_line":105,"last_line":111}},{"module":"Aeneas.Std.SliceDef","name":"Aeneas.Std.Slice","source":{"first_line":15,"last_line":19}},{"module":"Aeneas.Std.Scalar.Core","name":"Aeneas.Std.U8","source":{"first_line":669,"last_line":669}},{"module":"Init.Prelude","name":"Prod","source":{"first_line":603,"last_line":618}},{"module":"Init.Core","name":"Exists","source":{"first_line":313,"last_line":341}},{"module":"Init.Prelude","name":"And","source":{"first_line":645,"last_line":659}},{"module":"Init.Prelude","name":"Eq","source":{"first_line":46,"last_line":76}},{"module":"Aeneas.Std.Primitives","name":"Aeneas.Std.Result","source":{"first_line":67,"last_line":68}},{"module":"Facade","name":"lexical_core.ToLexicalWithOptions.to_lexical_with_options","source":{"first_line":109,"last_line":109}},{"module":"Aeneas.Std.Primitives","name":"Aeneas.Std.Result.ok","source":{"first_line":72,"last_line":72}},{"module":"Facade","name":"lexical_core.write_with_options","source":{"first_line":122,"last_line":131}}],"definitions_truncated":false,"first_line":60,"last_line":64,"module":"Proofs","program":null,"program_head":null,"statement":"∀ {N O : Type} (fmt : Aeneas.Std.U128) (inst : lexical_core.ToLexicalWithOptions.{0, 0} N O) (value : N)\n  (bytes : Aeneas.Std.Slice.{0} Aeneas.Std.U8) (opts : O)\n  (P :\n    Prod.{0, 0} (Aeneas.Std.Slice.{0} Aeneas.Std.U8)\n        (Aeneas.Std.Slice.{0} Aeneas.Std.U8 → Aeneas.Std.Slice.{0} Aeneas.Std.U8) →\n      Prop)\n  (h :\n    @Exists.{1}\n      (Prod.{0, 0} (Aeneas.Std.Slice.{0} Aeneas.Std.U8)\n        (Aeneas.Std.Slice.{0} Aeneas.Std.U8 → Aeneas.Std.Slice.{0} Aeneas.Std.U8))\n      fun\n        (out :\n          Prod.{0, 0} (Aeneas.Std.Slice.{0} Aeneas.Std.U8)\n            (Aeneas.Std.Slice.{0} Aeneas.Std.U8 → Aeneas.Std.Slice.{0} Aeneas.Std.U8)) =>\n      And\n        (@Eq.{1}\n          (Aeneas.Std.Result.{0}\n            (Prod.{0, 0} (Aeneas.Std.Slice.{0} Aeneas.Std.U8)\n              (Aeneas.Std.Slice.{0} Aeneas.Std.U8 → Aeneas.Std.Slice.{0} Aeneas.Std.U8)))\n          (@lexical_core.ToLexicalWithOptions.to_lexical_with_options.{0, 0} N O inst fmt value bytes opts)\n          (@Aeneas.Std.Result.ok.{0}\n            (Prod.{0, 0} (Aeneas.Std.Slice.{0} Aeneas.Std.U8)\n              (Aeneas.Std.Slice.{0} Aeneas.Std.U8 → Aeneas.Std.Slice.{0} Aeneas.Std.U8))\n            out))\n        (P out)),\n  @Exists.{1}\n    (Prod.{0, 0} (Aeneas.Std.Slice.{0} Aeneas.Std.U8)\n      (Aeneas.Std.Slice.{0} Aeneas.Std.U8 → Aeneas.Std.Slice.{0} Aeneas.Std.U8))\n    fun\n      (out :\n        Prod.{0, 0} (Aeneas.Std.Slice.{0} Aeneas.Std.U8)\n          (Aeneas.Std.Slice.{0} Aeneas.Std.U8 → Aeneas.Std.Slice.{0} Aeneas.Std.U8)) =>\n    And\n      (@Eq.{1}\n        (Aeneas.Std.Result.{0}\n          (Prod.{0, 0} (Aeneas.Std.Slice.{0} Aeneas.Std.U8)\n            (Aeneas.Std.Slice.{0} Aeneas.Std.U8 → Aeneas.Std.Slice.{0} Aeneas.Std.U8)))\n        (@lexical_core.write_with_options.{0, 0} N O fmt inst value bytes opts)\n        (@Aeneas.Std.Result.ok.{0}\n          (Prod.{0, 0} (Aeneas.Std.Slice.{0} Aeneas.Std.U8)\n            (Aeneas.Std.Slice.{0} Aeneas.Std.U8 → Aeneas.Std.Slice.{0} Aeneas.Std.U8))\n          out))\n      (P out)","theorem":"LexicalCorePublicationProofs.write_with_options_spec","translation_rerun":false,"version":1}
proofs.rs:formal:{"axioms":["propext","Quot.sound"],"binders":[{"binder":"implicit","kind":"variable","name":"N","type":"Type","type_segments":[{"text":"Type"}]},{"binder":"explicit","kind":"variable","name":"inst","type":"lexical_core.FromLexical N","type_segments":[{"ref":"lexical_core.FromLexical","text":"lexical_core.FromLexical"},{"text":" "},{"text":"N"}]},{"binder":"explicit","kind":"variable","name":"bytes","type":"Aeneas.Std.Slice Aeneas.Std.U8","type_segments":[{"ref":"Aeneas.Std.Slice","text":"Aeneas.Std.Slice"},{"text":" "},{"ref":"Aeneas.Std.U8","text":"Aeneas.Std.U8"}]},{"binder":"explicit","kind":"variable","name":"P","type":"Aeneas.Std.core.result.Result N lexical_core.lexical_util.error.Error → Prop","type_segments":[{"ref":"Aeneas.Std.core.result.Result","text":"Aeneas.Std.core.result.Result"},{"text":" "},{"text":"N"},{"text":" "},{"ref":"lexical_core.lexical_util.error.Error","text":"lexical_core.lexical_util.error.Error"},{"text":" → "},{"text":"Prop"}]},{"binder":"explicit","kind":"hypothesis","name":"h","type":"∃ out, inst.from_lexical bytes = Aeneas.Std.Result.ok out ∧ P out","type_segments":[{"text":"∃ "},{"text":"out"},{"text":", "},{"text":"inst"},{"text":"."},{"ref":"lexical_core.FromLexical.from_lexical","text":"from_lexical"},{"text":" "},{"text":"bytes"},{"ref":"Eq","text":" = "},{"ref":"Aeneas.Std.Result.ok","text":"Aeneas.Std.Result.ok"},{"text":" "},{"text":"out"},{"ref":"And","text":" ∧ "},{"text":"P"},{"text":" "},{"text":"out"}]}],"conclusion":"∃ out, lexical_core.parse inst bytes = Aeneas.Std.Result.ok out ∧ P out","conclusion_segments":[{"text":"∃ "},{"text":"out"},{"text":", "},{"ref":"lexical_core.parse","text":"lexical_core.parse"},{"text":" "},{"text":"inst"},{"text":" "},{"text":"bytes"},{"ref":"Eq","text":" = "},{"ref":"Aeneas.Std.Result.ok","text":"Aeneas.Std.Result.ok"},{"text":" "},{"text":"out"},{"ref":"And","text":" ∧ "},{"text":"P"},{"text":" "},{"text":"out"}],"definitions":[{"module":"Facade","name":"lexical_core.FromLexical","source":{"first_line":79,"last_line":86}},{"module":"Aeneas.Std.SliceDef","name":"Aeneas.Std.Slice","source":{"first_line":15,"last_line":19}},{"module":"Aeneas.Std.Scalar.Core","name":"Aeneas.Std.U8","source":{"first_line":669,"last_line":669}},{"module":"Aeneas.Std.Core.Result","name":"Aeneas.Std.core.result.Result","source":{"first_line":7,"last_line":10}},{"module":"Facade","name":"lexical_core.lexical_util.error.Error","source":{"first_line":23,"last_line":77}},{"module":"Init.Core","name":"Exists","source":{"first_line":313,"last_line":341}},{"module":"Init.Prelude","name":"And","source":{"first_line":645,"last_line":659}},{"module":"Init.Prelude","name":"Eq","source":{"first_line":46,"last_line":76}},{"module":"Aeneas.Std.Primitives","name":"Aeneas.Std.Result","source":{"first_line":67,"last_line":68}},{"module":"Facade","name":"lexical_core.FromLexical.from_lexical","source":{"first_line":83,"last_line":83}},{"module":"Aeneas.Std.Primitives","name":"Aeneas.Std.Result.ok","source":{"first_line":72,"last_line":72}},{"module":"Facade","name":"lexical_core.parse","source":{"first_line":133,"last_line":140}}],"definitions_truncated":false,"first_line":31,"last_line":36,"module":"Proofs","program":null,"program_head":null,"statement":"∀ {N : Type} (inst : lexical_core.FromLexical.{0} N) (bytes : Aeneas.Std.Slice.{0} Aeneas.Std.U8)\n  (P : Aeneas.Std.core.result.Result.{0, 0} N lexical_core.lexical_util.error.Error → Prop)\n  (h :\n    @Exists.{1} (Aeneas.Std.core.result.Result.{0, 0} N lexical_core.lexical_util.error.Error)\n      fun (out : Aeneas.Std.core.result.Result.{0, 0} N lexical_core.lexical_util.error.Error) =>\n      And\n        (@Eq.{1} (Aeneas.Std.Result.{0} (Aeneas.Std.core.result.Result.{0, 0} N lexical_core.lexical_util.error.Error))\n          (@lexical_core.FromLexical.from_lexical.{0} N inst bytes)\n          (@Aeneas.Std.Result.ok.{0} (Aeneas.Std.core.result.Result.{0, 0} N lexical_core.lexical_util.error.Error)\n            out))\n        (P out)),\n  @Exists.{1} (Aeneas.Std.core.result.Result.{0, 0} N lexical_core.lexical_util.error.Error)\n    fun (out : Aeneas.Std.core.result.Result.{0, 0} N lexical_core.lexical_util.error.Error) =>\n    And\n      (@Eq.{1} (Aeneas.Std.Result.{0} (Aeneas.Std.core.result.Result.{0, 0} N lexical_core.lexical_util.error.Error))\n        (@lexical_core.parse.{0} N inst bytes)\n        (@Aeneas.Std.Result.ok.{0} (Aeneas.Std.core.result.Result.{0, 0} N lexical_core.lexical_util.error.Error) out))\n      (P out)","theorem":"LexicalCorePublicationProofs.parse_spec","translation_rerun":false,"version":1}
proofs.rs:formal:{"axioms":["propext","Quot.sound"],"binders":[{"binder":"implicit","kind":"variable","name":"N","type":"Type","type_segments":[{"text":"Type"}]},{"binder":"implicit","kind":"variable","name":"O","type":"Type","type_segments":[{"text":"Type"}]},{"binder":"explicit","kind":"variable","name":"fmt","type":"Aeneas.Std.U128","type_segments":[{"ref":"Aeneas.Std.U128","text":"Aeneas.Std.U128"}]},{"binder":"explicit","kind":"variable","name":"inst","type":"lexical_core.FromLexicalWithOptions N O","type_segments":[{"ref":"lexical_core.FromLexicalWithOptions","text":"lexical_core.FromLexicalWithOptions"},{"text":" "},{"text":"N"},{"text":" "},{"text":"O"}]},{"binder":"explicit","kind":"variable","name":"bytes","type":"Aeneas.Std.Slice Aeneas.Std.U8","type_segments":[{"ref":"Aeneas.Std.Slice","text":"Aeneas.Std.Slice"},{"text":" "},{"ref":"Aeneas.Std.U8","text":"Aeneas.Std.U8"}]},{"binder":"explicit","kind":"variable","name":"opts","type":"O","type_segments":[{"text":"O"}]},{"binder":"explicit","kind":"variable","name":"P","type":"Aeneas.Std.core.result.Result (N × Aeneas.Std.Usize) lexical_core.lexical_util.error.Error → Prop","type_segments":[{"ref":"Aeneas.Std.core.result.Result","text":"Aeneas.Std.core.result.Result"},{"text":" "},{"ref":"Prod","text":"("},{"text":"N"},{"ref":"Prod","text":" × "},{"ref":"Aeneas.Std.Usize","text":"Aeneas.Std.Usize"},{"ref":"Prod","text":")"},{"text":" "},{"ref":"lexical_core.lexical_util.error.Error","text":"lexical_core.lexical_util.error.Error"},{"text":" → "},{"text":"Prop"}]},{"binder":"explicit","kind":"hypothesis","name":"h","type":"∃ out, inst.from_lexical_partial_with_options fmt bytes opts = Aeneas.Std.Result.ok out ∧ P out","type_segments":[{"text":"∃ "},{"text":"out"},{"text":", "},{"text":"inst"},{"text":"."},{"ref":"lexical_core.FromLexicalWithOptions.from_lexical_partial_with_options","text":"from_lexical_partial_with_options"},{"text":" "},{"text":"fmt"},{"text":" "},{"text":"bytes"},{"text":" "},{"text":"opts"},{"ref":"Eq","text":" = "},{"ref":"Aeneas.Std.Result.ok","text":"Aeneas.Std.Result.ok"},{"text":" "},{"text":"out"},{"ref":"And","text":" ∧ "},{"text":"P"},{"text":" "},{"text":"out"}]}],"conclusion":"∃ out, lexical_core.parse_partial_with_options fmt inst bytes opts = Aeneas.Std.Result.ok out ∧ P out","conclusion_segments":[{"text":"∃ "},{"text":"out"},{"text":", "},{"ref":"lexical_core.parse_partial_with_options","text":"lexical_core.parse_partial_with_options"},{"text":" "},{"text":"fmt"},{"text":" "},{"text":"inst"},{"text":" "},{"text":"bytes"},{"text":" "},{"text":"opts"},{"ref":"Eq","text":" = "},{"ref":"Aeneas.Std.Result.ok","text":"Aeneas.Std.Result.ok"},{"text":" "},{"text":"out"},{"ref":"And","text":" ∧ "},{"text":"P"},{"text":" "},{"text":"out"}],"definitions":[{"module":"Aeneas.Std.Scalar.Core","name":"Aeneas.Std.U128","source":{"first_line":673,"last_line":673}},{"module":"Facade","name":"lexical_core.FromLexicalWithOptions","source":{"first_line":88,"last_line":96}},{"module":"Aeneas.Std.SliceDef","name":"Aeneas.Std.Slice","source":{"first_line":15,"last_line":19}},{"module":"Aeneas.Std.Scalar.Core","name":"Aeneas.Std.U8","source":{"first_line":669,"last_line":669}},{"module":"Aeneas.Std.Core.Result","name":"Aeneas.Std.core.result.Result","source":{"first_line":7,"last_line":10}},{"module":"Init.Prelude","name":"Prod","source":{"first_line":603,"last_line":618}},{"module":"Aeneas.Std.Scalar.Core","name":"Aeneas.Std.Usize","source":{"first_line":668,"last_line":668}},{"module":"Facade","name":"lexical_core.lexical_util.error.Error","source":{"first_line":23,"last_line":77}},{"module":"Init.Core","name":"Exists","source":{"first_line":313,"last_line":341}},{"module":"Init.Prelude","name":"And","source":{"first_line":645,"last_line":659}},{"module":"Init.Prelude","name":"Eq","source":{"first_line":46,"last_line":76}},{"module":"Aeneas.Std.Primitives","name":"Aeneas.Std.Result","source":{"first_line":67,"last_line":68}},{"module":"Facade","name":"lexical_core.FromLexicalWithOptions.from_lexical_partial_with_options","source":{"first_line":94,"last_line":94}},{"module":"Aeneas.Std.Primitives","name":"Aeneas.Std.Result.ok","source":{"first_line":72,"last_line":72}},{"module":"Facade","name":"lexical_core.parse_partial_with_options","source":{"first_line":162,"last_line":172}}],"definitions_truncated":false,"first_line":49,"last_line":53,"module":"Proofs","program":null,"program_head":null,"statement":"∀ {N O : Type} (fmt : Aeneas.Std.U128) (inst : lexical_core.FromLexicalWithOptions.{0, 0} N O)\n  (bytes : Aeneas.Std.Slice.{0} Aeneas.Std.U8) (opts : O)\n  (P :\n    Aeneas.Std.core.result.Result.{0, 0} (Prod.{0, 0} N Aeneas.Std.Usize) lexical_core.lexical_util.error.Error → Prop)\n  (h :\n    @Exists.{1}\n      (Aeneas.Std.core.result.Result.{0, 0} (Prod.{0, 0} N Aeneas.Std.Usize) lexical_core.lexical_util.error.Error)\n      fun\n        (out :\n          Aeneas.Std.core.result.Result.{0, 0} (Prod.{0, 0} N Aeneas.Std.Usize)\n            lexical_core.lexical_util.error.Error) =>\n      And\n        (@Eq.{1}\n          (Aeneas.Std.Result.{0}\n            (Aeneas.Std.core.result.Result.{0, 0} (Prod.{0, 0} N Aeneas.Std.Usize)\n              lexical_core.lexical_util.error.Error))\n          (@lexical_core.FromLexicalWithOptions.from_lexical_partial_with_options.{0, 0} N O inst fmt bytes opts)\n          (@Aeneas.Std.Result.ok.{0}\n            (Aeneas.Std.core.result.Result.{0, 0} (Prod.{0, 0} N Aeneas.Std.Usize)\n              lexical_core.lexical_util.error.Error)\n            out))\n        (P out)),\n  @Exists.{1}\n    (Aeneas.Std.core.result.Result.{0, 0} (Prod.{0, 0} N Aeneas.Std.Usize) lexical_core.lexical_util.error.Error)\n    fun\n      (out :\n        Aeneas.Std.core.result.Result.{0, 0} (Prod.{0, 0} N Aeneas.Std.Usize) lexical_core.lexical_util.error.Error) =>\n    And\n      (@Eq.{1}\n        (Aeneas.Std.Result.{0}\n          (Aeneas.Std.core.result.Result.{0, 0} (Prod.{0, 0} N Aeneas.Std.Usize) lexical_core.lexical_util.error.Error))\n        (@lexical_core.parse_partial_with_options.{0, 0} N O fmt inst bytes opts)\n        (@Aeneas.Std.Result.ok.{0}\n          (Aeneas.Std.core.result.Result.{0, 0} (Prod.{0, 0} N Aeneas.Std.Usize) lexical_core.lexical_util.error.Error)\n          out))\n      (P out)","theorem":"LexicalCorePublicationProofs.parse_partial_with_options_spec","translation_rerun":false,"version":1}
proofs.rs:formal:{"axioms":["propext","Quot.sound"],"binders":[{"binder":"implicit","kind":"variable","name":"N","type":"Type","type_segments":[{"text":"Type"}]},{"binder":"explicit","kind":"variable","name":"inst","type":"lexical_core.ToLexical N","type_segments":[{"ref":"lexical_core.ToLexical","text":"lexical_core.ToLexical"},{"text":" "},{"text":"N"}]},{"binder":"explicit","kind":"variable","name":"value","type":"N","type_segments":[{"text":"N"}]},{"binder":"explicit","kind":"variable","name":"bytes","type":"Aeneas.Std.Slice Aeneas.Std.U8","type_segments":[{"ref":"Aeneas.Std.Slice","text":"Aeneas.Std.Slice"},{"text":" "},{"ref":"Aeneas.Std.U8","text":"Aeneas.Std.U8"}]},{"binder":"explicit","kind":"variable","name":"P","type":"Aeneas.Std.Slice Aeneas.Std.U8 × (Aeneas.Std.Slice Aeneas.Std.U8 → Aeneas.Std.Slice Aeneas.Std.U8) → Prop","type_segments":[{"ref":"Aeneas.Std.Slice","text":"Aeneas.Std.Slice"},{"text":" "},{"ref":"Aeneas.Std.U8","text":"Aeneas.Std.U8"},{"ref":"Prod","text":" × "},{"text":"("},{"ref":"Aeneas.Std.Slice","text":"Aeneas.Std.Slice"},{"text":" "},{"ref":"Aeneas.Std.U8","text":"Aeneas.Std.U8"},{"text":" → "},{"ref":"Aeneas.Std.Slice","text":"Aeneas.Std.Slice"},{"text":" "},{"ref":"Aeneas.Std.U8","text":"Aeneas.Std.U8"},{"text":")"},{"text":" → "},{"text":"Prop"}]},{"binder":"explicit","kind":"hypothesis","name":"h","type":"∃ out, inst.to_lexical value bytes = Aeneas.Std.Result.ok out ∧ P out","type_segments":[{"text":"∃ "},{"text":"out"},{"text":", "},{"text":"inst"},{"text":"."},{"ref":"lexical_core.ToLexical.to_lexical","text":"to_lexical"},{"text":" "},{"text":"value"},{"text":" "},{"text":"bytes"},{"ref":"Eq","text":" = "},{"ref":"Aeneas.Std.Result.ok","text":"Aeneas.Std.Result.ok"},{"text":" "},{"text":"out"},{"ref":"And","text":" ∧ "},{"text":"P"},{"text":" "},{"text":"out"}]}],"conclusion":"∃ out, lexical_core.write inst value bytes = Aeneas.Std.Result.ok out ∧ P out","conclusion_segments":[{"text":"∃ "},{"text":"out"},{"text":", "},{"ref":"lexical_core.write","text":"lexical_core.write"},{"text":" "},{"text":"inst"},{"text":" "},{"text":"value"},{"text":" "},{"text":"bytes"},{"ref":"Eq","text":" = "},{"ref":"Aeneas.Std.Result.ok","text":"Aeneas.Std.Result.ok"},{"text":" "},{"text":"out"},{"ref":"And","text":" ∧ "},{"text":"P"},{"text":" "},{"text":"out"}],"definitions":[{"module":"Facade","name":"lexical_core.ToLexical","source":{"first_line":98,"last_line":103}},{"module":"Aeneas.Std.SliceDef","name":"Aeneas.Std.Slice","source":{"first_line":15,"last_line":19}},{"module":"Aeneas.Std.Scalar.Core","name":"Aeneas.Std.U8","source":{"first_line":669,"last_line":669}},{"module":"Init.Prelude","name":"Prod","source":{"first_line":603,"last_line":618}},{"module":"Init.Core","name":"Exists","source":{"first_line":313,"last_line":341}},{"module":"Init.Prelude","name":"And","source":{"first_line":645,"last_line":659}},{"module":"Init.Prelude","name":"Eq","source":{"first_line":46,"last_line":76}},{"module":"Aeneas.Std.Primitives","name":"Aeneas.Std.Result","source":{"first_line":67,"last_line":68}},{"module":"Facade","name":"lexical_core.ToLexical.to_lexical","source":{"first_line":102,"last_line":102}},{"module":"Aeneas.Std.Primitives","name":"Aeneas.Std.Result.ok","source":{"first_line":72,"last_line":72}},{"module":"Facade","name":"lexical_core.write","source":{"first_line":113,"last_line":120}}],"definitions_truncated":false,"first_line":55,"last_line":58,"module":"Proofs","program":null,"program_head":null,"statement":"∀ {N : Type} (inst : lexical_core.ToLexical.{0} N) (value : N) (bytes : Aeneas.Std.Slice.{0} Aeneas.Std.U8)\n  (P :\n    Prod.{0, 0} (Aeneas.Std.Slice.{0} Aeneas.Std.U8)\n        (Aeneas.Std.Slice.{0} Aeneas.Std.U8 → Aeneas.Std.Slice.{0} Aeneas.Std.U8) →\n      Prop)\n  (h :\n    @Exists.{1}\n      (Prod.{0, 0} (Aeneas.Std.Slice.{0} Aeneas.Std.U8)\n        (Aeneas.Std.Slice.{0} Aeneas.Std.U8 → Aeneas.Std.Slice.{0} Aeneas.Std.U8))\n      fun\n        (out :\n          Prod.{0, 0} (Aeneas.Std.Slice.{0} Aeneas.Std.U8)\n            (Aeneas.Std.Slice.{0} Aeneas.Std.U8 → Aeneas.Std.Slice.{0} Aeneas.Std.U8)) =>\n      And\n        (@Eq.{1}\n          (Aeneas.Std.Result.{0}\n            (Prod.{0, 0} (Aeneas.Std.Slice.{0} Aeneas.Std.U8)\n              (Aeneas.Std.Slice.{0} Aeneas.Std.U8 → Aeneas.Std.Slice.{0} Aeneas.Std.U8)))\n          (@lexical_core.ToLexical.to_lexical.{0} N inst value bytes)\n          (@Aeneas.Std.Result.ok.{0}\n            (Prod.{0, 0} (Aeneas.Std.Slice.{0} Aeneas.Std.U8)\n              (Aeneas.Std.Slice.{0} Aeneas.Std.U8 → Aeneas.Std.Slice.{0} Aeneas.Std.U8))\n            out))\n        (P out)),\n  @Exists.{1}\n    (Prod.{0, 0} (Aeneas.Std.Slice.{0} Aeneas.Std.U8)\n      (Aeneas.Std.Slice.{0} Aeneas.Std.U8 → Aeneas.Std.Slice.{0} Aeneas.Std.U8))\n    fun\n      (out :\n        Prod.{0, 0} (Aeneas.Std.Slice.{0} Aeneas.Std.U8)\n          (Aeneas.Std.Slice.{0} Aeneas.Std.U8 → Aeneas.Std.Slice.{0} Aeneas.Std.U8)) =>\n    And\n      (@Eq.{1}\n        (Aeneas.Std.Result.{0}\n          (Prod.{0, 0} (Aeneas.Std.Slice.{0} Aeneas.Std.U8)\n            (Aeneas.Std.Slice.{0} Aeneas.Std.U8 → Aeneas.Std.Slice.{0} Aeneas.Std.U8)))\n        (@lexical_core.write.{0} N inst value bytes)\n        (@Aeneas.Std.Result.ok.{0}\n          (Prod.{0, 0} (Aeneas.Std.Slice.{0} Aeneas.Std.U8)\n            (Aeneas.Std.Slice.{0} Aeneas.Std.U8 → Aeneas.Std.Slice.{0} Aeneas.Std.U8))\n          out))\n      (P out)","theorem":"LexicalCorePublicationProofs.write_spec","translation_rerun":false,"version":1}

=== stderr ===
Environment

The facade fork uses lexical-util 1.0.7 with default features disabled and contains no concrete numeric implementations. The supplemental compact helper derives from lexical-write-integer 1.0.6 and lexical-util 1.0.7. Verification uses unmodified pinned Aeneas and Charon and Lean 4.35.0 on aarch64-apple-darwin. The compact helper's managed proof and audit passed separately; the mapped facade claims are against this fork's freshly generated model.

What is trusted

The results depend on the pinned Rust-to-Lean translation, Aeneas standard models and Lean kernel. Trait methods supplied to the facade are arbitrary; the success and output property needed for the conditional contracts are premises. Source correspondence checks and native comparisons support the adaptations but are not formal equivalence proofs.

Technical limitations

The fork copies the six release function definitions exactly but replaces their trait types with method-only traits, removing unused supertraits and associated-type bounds. A source check compares function text and required method signatures; source review supports projecting release dictionaries to those methods. No checked equivalence relates the fork to the release facade. The unchanged facade translation emits unused float cast fields that fail to compile in Lean.

The compact helper specializes the release algorithm to u8 and decimal, makes casts concrete and inlines the copy helper. Its theorem covers a count and updated buffer, not the public returned slice or its backward function; no formal bridge to the release algorithm is established. Native comparisons cover finite buffer cases only.

No unchanged-release concrete integer or floating-point parsing or writing algorithm is proved. In particular, the facade premises do not establish numeric correctness, error behavior, buffer capacity or panic freedom for built-in implementations. Custom formats and options and other types require separate contracts. Native findings are separate from formal proof.

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

Dependencies (5)

CrateReports
lexical-parse-float ^1.0.6 · optional—
lexical-parse-integer ^1.0.6 · optionalReport #35 · v1 (1.0.6)
lexical-util ^1.0.7—
lexical-write-float ^1.0.6 · optional—
lexical-write-integer ^1.0.6 · optional—

Comments (0)

No comments.

Sign in to comment.