Skip to content

refactor(MultiTape): use RelSeries and shared space accounting - #946

Merged
SamuelSchlesinger merged 1 commit into
leanprover:mainfrom
barni120400:refactor/multitape-run-path
Sep 24, 2026
Merged

SamuelSchlesinger merged 1 commit into
leanprover:mainfrom
barni120400:refactor/multitape-run-path

Conversation

@barni120400

@barni120400 barni120400 commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Replace list-based computation paths with Mathlib's RelSeries. Count space per tape directly on the path, so a deterministic run and its corresponding path use the same space by definition.

@SamuelSchlesinger

Copy link
Copy Markdown
Collaborator

This looks quite nice to me. Needs a rebase.

namespace RunPath

/-- The number of steps taken by a run path. -/
def time (p : ntm.RunPath input) : ℕ := p.length

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thus could be annoying but I’m wondering if we should not have “p.length - 1”. The time should be the number of transitions. If the RelSeries counts the number of elements then a RunPath with just one element should take zero time.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RelSeries.length already counts transitions so this is ok.

@barni120400
barni120400 force-pushed the refactor/multitape-run-path branch from 9356bda to cce9355 Compare September 24, 2026 15:22
@barni120400

Copy link
Copy Markdown
Contributor Author

@SamuelSchlesinger rebased

@SamuelSchlesinger
SamuelSchlesinger added this pull request to the merge queue Sep 24, 2026
Merged via the queue into leanprover:main with commit 94ea80f Sep 24, 2026
2 checks passed
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.

3 participants