Skip to content

Conversation

Paul-Lez
Copy link
Member

@Paul-Lez Paul-Lez commented Aug 1, 2025

See discussion in #229.

@Paul-Lez Paul-Lez added WIP ams-03: Mathematical logic and foundations including model theory, computability theory, set theory, proof theory, and algebraic logic labels Aug 1, 2025
@Paul-Lez Paul-Lez removed the WIP label Aug 3, 2025
@Paul-Lez Paul-Lez requested review from eric-wieser and mo271 August 4, 2025 08:38
Copy link
Contributor

@tcosmo tcosmo left a comment

Choose a reason for hiding this comment

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

Minor comments only :)

If you want to add tests for the simulation of Turing machines here are some ideas:

In case you want to add tests about nonhalting machines then you probably need to have at least one decider implemented (i.e. algorithm that proves that a machine does not halt) and if you do, the simplest target is to syntactically recognise machines with no halting transition (i.e. no undefined transition and no mention of a state bigger than state count), like for instance 1RB0LA_1LB0RB. The nonhalting proof is trivial: there is no instruction that makes it halt.

Slightly more ambitious but certainly off-topic for your project are loops (machines that eventually repeat the same configuration, potentially translated in space) and here are some references for implementation:

Note that these deciders have already been implemented in Lean: https://git.sr.ht/~vigoux/busybeaver/tree/master/item/Busybeaver/Deciders

@tcosmo
Copy link
Contributor

tcosmo commented Aug 12, 2025

Note: I'm going offline tomorrow until about Aug 25th, I apologise in advance for this delay for future reviews

@Paul-Lez Paul-Lez requested a review from tcosmo August 29, 2025 15:36
@Paul-Lez Paul-Lez requested a review from eric-wieser September 3, 2025 17:34
let entryLengths := moveListStr.map String.length |>.dedup
unless entryLengths.length == 1 do
throwError "All portions of the string separated by `_` should have the same length"
let numSymbols := entryLengths[0]! / 3
Copy link
Member

Choose a reason for hiding this comment

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

I assume you also want to check here that it is divisible by 3?

Copy link
Member

Choose a reason for hiding this comment

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

I take this back, I think the previous version actually makes more sense, since then you get an error on the last piece that isn't long enough.

Copy link
Member Author

Choose a reason for hiding this comment

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

Reverted back to the previous version

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah actually I think it might be worth keeping this (otherwise one can run into unspecified behaviour of String.next)

@Paul-Lez Paul-Lez requested a review from eric-wieser September 4, 2025 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ams-03: Mathematical logic and foundations including model theory, computability theory, set theory, proof theory, and algebraic logic
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants