Skip to content

feat(computability): frame pair-first stacks - #79

Open
windsornguyen wants to merge 1 commit into
codex/pair-first-wrapperfrom
codex/pair-first-stacks
Open

feat(computability): frame pair-first stacks#79
windsornguyen wants to merge 1 commit into
codex/pair-first-wrapperfrom
codex/pair-first-stacks

Conversation

@windsornguyen

Copy link
Copy Markdown
Owner

Explain what this changes, why it is needed, and anything reviewers should
verify. Link an issue when one exists.

What does this change?

Defines explicit wrapper-stack frames for the pair-first machine and proves how source stacks and reversal scratch are selected and updated. It also defines the canonical parser configuration and the exact embedding of a source configuration into the wrapper.

These state invariants make later transition and simulation proofs readable rather than expanding raw dependent stack functions. This is stack layer 3 of 8.

How was it tested?

  • lake build --wfail passes
  • lake lint passes
  • No sorry or new axioms, or this PR does not change Lean proofs

@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: 686dffcc4f

ℹ️ 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 +46 to +49
theorem initList_inputStack (source : Turing.FinTM2)
(input : List (source.Γ source.k₀)) :
(Turing.initList source input).stk source.k₀ = input := by
simp [Turing.initList]

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 Add provenance for the initList specialization

This new public theorem specializes Mathlib's Turing.initList, but the file does not give the required authors/title/version/definition provenance for that borrowed definition. In this repository those citations are part of proof provenance, so later stack-frame proofs lose the pinned source they rely on; please add the Mathlib citation near the module docs or this declaration.

AGENTS.md reference: AGENTS.md:L42-L43

Useful? React with 👍 / 👎.

| .reverse => reverse

/-- Selecting a source index returns the corresponding source stack. -/
@[simp] theorem wrapperStacks_source (source : Turing.FinTM2)

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 Rename public theorems to snake_case

This and the other new public theorem names in this file expose mixed-case segments such as wrapperStacks and initList in theorem identifiers, even though theorem names are required to be snake_case. Once imported through ComplexityTheory.lean, these names become public API, so please rename them before downstream proofs depend on the nonconforming names.

AGENTS.md reference: AGENTS.md:L67-L67

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