Repository navigation
feat: add Lean-blaster proof blocks and backend - #38
Draft
RSoulatIOHK wants to merge 7 commits into
Draft
RSoulatIOHK wants to merge 7 commits into
RSoulatIOHK wants to merge 7 commits into
Conversation
Contributor
|
Oh very cool love what you are adding here |
MicroProofs
reviewed
Oct 4, 2026
|
|
||
| {-| All Data-represented integers. -} | ||
| integer : Int | ||
| integer = Builtin.iData 0 |
Contributor
There was a problem hiding this comment.
literal casting is automatic
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Nash's sampled tests cannot express universal claims about compiled programs. Add private
proofblocks andnash proof(aliasverify) to check the generated UPLC with Lean-blaster, PlutusCoreBlaster and CardanoLedgerApiBlaster.Implementation
testdeclarations and symbolicpropdeclarations in module-local proof blocks. Proof imports have their own scope, and production builds exclude proof bodies and imports.Prooftypes, symbolic-domain binders, and execution/partial-correctness obligations. Shared parser and formatter helpers preserve the existing declaration syntax. Diagnostics reject proof budgets, invalid domains, and unsupported partial-correctness modifiers.Fuel is an execution limit: script errors and exhaustion are rejection. Passing properties require successful execution for every input;
failrequires universal rejection andfail oncerequires a rejection witness. Solver unknowns, timeouts, crashes and malformed replies fail closed.Proof.returns computation (\result -> condition)compiles the computation and Boolean postcondition separately. Successful returns within the computation's fuel must satisfy the condition. Computation rejection does not refute partial correctness; checker exhaustion is inconclusive.--postcondition-fuelbounds the checker independently. This does not establish termination or the existence of a successful return.See
docs/proofs.mdfor semantics, domains, commands and trust limits.examples/proofsprovides a small runnable example.Validation
cargo +stable test -p nash-driver -p nash-proof: 225 passed, none failed; external-toolchain tests remain opt-in.cargo +stable fmt --all -- --checkand diff whitespace checks pass.Local validation uses Rust 1.92; the repository's requested 1.98.1 toolchain is unavailable locally.
Trust and current limits
The symbolic runner reports
smt_verified: results rely on the pinned libraries' models, supporting assumptions and the SMT solver. Lean kernel reconstruction is not implemented. Fuel counts CEK steps rather than Cardano CPU/memory costs.Generic list/product/custom ADT input domains and automatic counterexample decoding/replay/shrinking are not implemented. Partial correctness supports native scalar/unit or Data-represented results. Ledger domain predicates constrain modeled contexts; they do not prove application encoding validation. Live verification requires the pinned Lean libraries and Z3.