Repository navigation
refactor(MultiTape): remove the deterministic space measures - #1122
Open
barni120400 wants to merge 2 commits into
Open
barni120400 wants to merge 2 commits into
barni120400 wants to merge 2 commits into
Conversation
barni120400
requested review from
SamuelSchlesinger,
arademaker,
chenson2018,
crei,
fmontesi and
sorrachai
as code owners
October 10, 2026 22:54
barni120400
force-pushed
the
refactor/multitape-single-space-api
branch
3 times, most recently
from
October 13, 2026 20:29
18fe0f6 to
875ec7a
Compare
barni120400
force-pushed
the
refactor/multitape-single-space-api
branch
6 times, most recently
from
October 14, 2026 16:09
7c96b26 to
e129036
Compare
ctchou
pushed a commit
to ctchou/cslib
that referenced
this pull request
Oct 15, 2026
Renames `MultiTapeTM.spaceUsed` to `space`, matching `RunPath.space` and `ComputationPath.space`: `tm.space cfg t` is the space of the path of the first `t` steps from `cfg`. The lemmas named after it follow. Depends on leanprover#1117: its commits are included temporarily and will leave this diff when that PR merges. The stack continues in leanprover#1122. Composed with Claude Code. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
barni120400
force-pushed
the
refactor/multitape-single-space-api
branch
3 times, most recently
from
October 18, 2026 15:05
a73142b to
09736d7
Compare
This was referenced Oct 19, 2026
The windows, the bounds of a path's space by sets containing its head positions, and the space of a mapped path move from TapeLemmas.lean to Space.lean, next to the space measures; `prependOutputHom` moves to Nondeterministic.lean. Prepending output keeps every head in place, so `transformsTapes_iff_nil_output` reuses the space bound as it is, and the then unused `space_map_eq` goes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Space is counted only on run and computation paths. The visitation and displacement lemmas hold for the run paths of nondeterministic machines, and the configuration bounds take `RunsInSpace` and count the storages and cores at the ends of computation paths: the computation paths of a deterministic machine are prefixes of one another, so the one visiting the most cells contains the windows of every other. The deterministic `visitedByTapeHead`, `spaceUsedByTape` and `space` go, with their lemmas and the unused `core_step_eq_of_core_eq`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
barni120400
force-pushed
the
refactor/multitape-single-space-api
branch
from
October 19, 2026 21:40
09736d7 to
516b637
Compare
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.
Removes
MultiTapeTM.visitedByTapeHead,spaceUsedByTapeandspace, so space is counted only on run and computation paths. The visitation and displacement lemmas move to run paths and hold for nondeterministic machines.Counts the storages and cores in
ConfigBoundat the ends of computation paths, bounded byRunsInSpace, with unchanged numerical bounds. The computation paths of a deterministic machine are prefixes of one another (RunPath.eq_take), so the one visiting the most cells contains the windows of every other.Depends on #1145: its commit is included temporarily and will leave this diff when it merges.
Composed with Claude Code.