refactor(MultiTapeTM): Put the output tape into the configuration - #818
Closed
barni120400 wants to merge 1 commit into
Closed
refactor(MultiTapeTM): Put the output tape into the configuration#818barni120400 wants to merge 1 commit into
barni120400 wants to merge 1 commit into
Conversation
The configuration gains an `output` field holding the symbols emitted so far, `step` appends to it and `initCfg` starts it empty. The output of a run can then be read off its final configuration, so `outputString` and its lemmas are replaced by `step_output` and existing facts about `configs`, and `ComputesInTimeAndSpace` reads the output from the configuration it already mentions. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Author
|
Superseded by #819, which contains this change plus a rename of |
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.
The output tape is now part of the configuration:
Cfggains anoutputfield,stepappends the symbol the transition emits, andinitCfgstarts it empty. The output of a run is then whatever is on its final configuration's tape.That makes
outputStringunnecessary, so it and its lemmas are removed.outputString_succbecomesstep_output,outputString_eq_of_haltis restated on configurations, andoutputString_haltandoutputString_add_eq_appendwere output-flavoured restatements of the existingconfigs_of_haltsandconfigs_add.ComputesInTimeAndSpacenow reads the output off the configuration it already mentions. Net -30 lines, no change in meaning.This is step 1 of the plan discussed on Zulip: with the output in the configuration, a
Listof configurations determines the output string, so a computation can be such a list and reuse the machinery inRelatesInSteps.lean.Note that the configuration space is now unbounded, so counting reachable configurations needs to happen on the storage configuration rather than on
Cfg.NB: claude was used heavily throughout.