Repository navigation
Prove Step is not deterministic (Aristotle counterexample) - #139
Closed
leonardoalt wants to merge 2 commits into
Closed
leonardoalt wants to merge 2 commits into
leonardoalt wants to merge 2 commits into
Conversation
…erminism.lean) Aristotle project: 215f4cdc-5cec-4ef5-8d40-2772b46e90ac Co-Authored-By: Aristotle-Harmonic <Aristotle-Harmonic@users.noreply.github.com>
…MMARY.md) The run summary lives in the PR description; attribution stays in the aristotle commit's Co-Authored-By trailer. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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
Settles the question "is the small-step relation
Stepdeterministic?" — it is not, and this PR adds a machine-checked disproof produced by @Aristotle-Harmonic (project215f4cdc-5cec-4ef5-8d40-2772b46e90ac).New module
EvmSemantics/EVM/StepDeterminism.lean:underdeterminedState— a fully concrete witness: the defaultStatewith its bytecode overridden to the single byte0x01(ADD). All other fields keep their defaults:halt = .Running,stack = [],gasAvailable = 0, and the zerocodeAddr(not a precompile).theorem step_not_deterministic : ∃ (s s₁ s₂ : State), Step s s₁ ∧ Step s s₂ ∧ s₁ ≠ s₂— sorry-free, axiom footprint[propext, Classical.choice, Quot.sound](pinned by a trailing#print axioms).Why it's non-deterministic
Exactly the overlap the comment at the top of
StepRunning's exception-rules section already anticipated: the exception rules' premises are not mutually exclusive. On the witness state bothStepRunning.stackUnderflowfires (ADDhaspopArity = 2, stack length0), yieldinghalt := .Exception .StackUnderflow, andStepRunning.outOfGasfires (cost witness1,gasAvailable = 0 < 1 ≤ Gas.totalCost), yieldinghalt := .Exception .OutOfGas.Both lift through
Step.running(thes.halt = .RunningandisPrecompile … = falsegates hold), and the successors differ inhalt— two distinct post-states from one pre-state.This is non-determinism only in which exception is reported; a deterministic check order (as
stepFimplements) can be layered on top, which is whatstepF_soundalready witnesses one direction of.Commits
aristotle: prove Step is not deterministic …— Aristotle's output, as-is.Remove Aristotle attribution boilerplate— drops the README ad header andARISTOTLE_SUMMARY.mdit also added.Verification
lake build evm_semantics vmtestsfrom a clean.lake/build: success (1089 jobs), zerowarning:lines.lake lint: passed.🤖 Generated with Claude Code