feat(computability): frame pair-first stacks - #79
Conversation
There was a problem hiding this comment.
💡 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".
| theorem initList_inputStack (source : Turing.FinTM2) | ||
| (input : List (source.Γ source.k₀)) : | ||
| (Turing.initList source input).stk source.k₀ = input := by | ||
| simp [Turing.initList] |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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 👍 / 👎.
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 --wfailpasseslake lintpassessorryor new axioms, or this PR does not change Lean proofs