Skip to content

refactor(MultiTapeTM): Put the output tape into the configuration - #818

Closed
barni120400 wants to merge 1 commit into
leanprover:mainfrom
barni120400:multitape/cfg-output
Closed

refactor(MultiTapeTM): Put the output tape into the configuration#818
barni120400 wants to merge 1 commit into
leanprover:mainfrom
barni120400:multitape/cfg-output

Conversation

@barni120400

Copy link
Copy Markdown

The output tape is now part of the configuration: Cfg gains an output field, step appends the symbol the transition emits, and initCfg starts it empty. The output of a run is then whatever is on its final configuration's tape.

That makes outputString unnecessary, so it and its lemmas are removed. outputString_succ becomes step_output, outputString_eq_of_halt is restated on configurations, and outputString_halt and outputString_add_eq_append were output-flavoured restatements of the existing configs_of_halts and configs_add. ComputesInTimeAndSpace now 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 List of configurations determines the output string, so a computation can be such a list and reuse the machinery in RelatesInSteps.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.

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>
@barni120400

Copy link
Copy Markdown
Author

Superseded by #819, which contains this change plus a rename of configs to runFrom.

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.

2 participants