docs: Fix misleading axiom justification — only IR eval is partial#198
Merged
Conversation
…ssue #160) AXIOMS.md, StatementEquivalence.lean, CONTRIBUTING.md, and YulGeneration/README.md all claimed that "both evalIRExpr and evalYulExpr are partial functions." In fact, only evalIRExpr is partial — evalYulExpr uses structural recursion and is total. This matters because: - The elimination strategy is simpler than documented: only the IR evaluator needs refactoring (~300 LOC, not ~500+) - The Yul side already demonstrates the fuel-based pattern to follow - The trust surface is smaller than previously stated Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary
evalIRExprispartial, butevalYulExpris total (structural recursion). The previous claim that "both are partial" was wrong.Why this matters
The misleading documentation overstated the difficulty of eliminating these axioms. Since only the IR evaluator needs refactoring (the Yul side is already total), the elimination effort is ~300 LOC instead of the previously estimated ~500+. This is important for anyone planning trust-reduction work on the codebase.
Addresses issue #160.
Test plan
grep -n "partial def evalYulExpr" Compiler/should return nothing (confirming evalYulExpr is total)🤖 Generated with Claude Code
Note
Low Risk
Docs-only changes that don’t affect proof logic or runtime behavior; risk is limited to potential inaccuracies in the updated explanations.
Overview
Updates axiom documentation (in
AXIOMS.md,Compiler/Proofs/YulGeneration/StatementEquivalence.lean,Compiler/Proofs/YulGeneration/README.md, andCONTRIBUTING.md) to fix a factual error: onlyevalIRExpr/evalIRExprsarepartial/opaque to Lean, whileevalYulExpr/evalYulExprsare total via well-founded recursion.Reframes the soundness and axiom-elimination guidance accordingly, stating that removing the axioms would require refactoring only the IR evaluator (and related helpers like
evalIRCall) and revising the estimated effort from ~500 LOC to ~300 LOC.Written by Cursor Bugbot for commit 4e5c6e7. This will update automatically on new commits. Configure here.