feat(MultiTapeTM): compose machines using tape transformations - #874
Open
SamuelSchlesinger wants to merge 2 commits into
Open
feat(MultiTapeTM): compose machines using tape transformations#874SamuelSchlesinger wants to merge 2 commits into
SamuelSchlesinger wants to merge 2 commits into
Conversation
SamuelSchlesinger
requested review from
chenson2018 and
fmontesi
as code owners
September 5, 2026 21:30
This was referenced Sep 5, 2026
crei
requested changes
Sep 6, 2026
crei
left a comment
Collaborator
There was a problem hiding this comment.
I haven't read all of this PR yet, but I'm a bit surprised that there is still so much code to it. Maybe the plumbing is not abstract enough or does not have enough lemmas?
| - `InputFromWorkTape` simulates the native input on a work tape, preserving boundary clamping. | ||
| - `Rewind` shares one controller between native-input and work-tape rewinding. Work-tape rewind | ||
| starts immediately after contiguous contents and finishes at their first cell, including when empty. | ||
| - `Composition` assembles output redirection, work-tape rewind, and input substitution with `seq` |
Collaborator
There was a problem hiding this comment.
I think it would be better to first explain what it does and then how it does it. It reads like we already know where this is going.
| /-- Composition returns the second machine's output on the first machine's result. | ||
| The first halting time must be minimal; the second may be padded. -/ | ||
| theorem comp_haltsWithOutput | ||
| {input out₀ out₁ : List Symbol} {u v : ℕ} |
Collaborator
There was a problem hiding this comment.
Suggested change
| {input out₀ out₁ : List Symbol} {u v : ℕ} | |
| {input out₀ out₁ : List Symbol} {t\0 t\1 : ℕ} |
| /-! | ||
| # Correctness of multi-tape composition | ||
|
|
||
| `comp_haltsWithOutput` proves that the composite machine returns the second machine's output |
Collaborator
There was a problem hiding this comment.
This could also be a bit more stand-alone. What is "the composite machine"?
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.
Construct machine composition from output redirection, work-tape rewind, and input substitution using the sequential combinator. Prove that the composite halts with the second machine's output on the first machine's result.
Part 5/6 of the TM composition stack. Depends on #873. Next: #875.
Validation: strict build, import checks, full tests, and linters.
This PR was composed with Astra via Codex.