Skip to content

feat(proofs): transport charged execution clocks - #57

Open
windsornguyen wants to merge 1 commit into
codex/two-stack-charged-interpreterfrom
codex/two-stack-charged-simulation
Open

feat(proofs): transport charged execution clocks#57
windsornguyen wants to merge 1 commit into
codex/two-stack-charged-interpreterfrom
codex/two-stack-charged-simulation

Conversation

@windsornguyen

Copy link
Copy Markdown
Owner

What does this change?

Proves that a typed two-stack execution with allowance t is exactly reproduced by the charged interpreter with allowance transitionCharge(P) * t, where transitionCharge(P) = |encode(P)| + 1.

The equality is established first for arbitrary runtime configurations, then lifted to initialized execution and finally to ComputesWithin. For each fixed translator program, the overhead multiplier is independent of the input.

This transports clock certificates through the executable charge specification. It still does not claim that a bit-level interpreter realizes one charged transition in constant time; that is the next refinement boundary.

How was it tested?

  • lake env lean ComplexityTheory/ProofComplexity/TwoStackChargedSimulation.lean
  • lake build --wfail passes
  • lake lint passes
  • git diff --check passes
  • No sorry or new axioms

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3877ae2d3f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +12 to +13
For a fixed program `P`, the charged interpreter simulates `t` typed program
transitions in exactly `transitionCharge P * t` charged transitions. The

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Describe the product as an allowance, not an exact step count

When the initial state is halted, or execution halts before using all t typed steps, runFrom returns immediately, so fewer than transitionCharge P * t charged transitions execute. The theorem proves equality of returned results under the multiplied allowance, not exact transition consumption; describe this as an upper bound or as the cost per running source transition to avoid overstating the formal result.

AGENTS.md reference: AGENTS.md:L18-L22

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant