Finite-state Turing machines #
A machine has a finite transition table and a tape from Mathlib. This module preserves the execution definitions and the two Goldbach tables from google-deepmind/cryptids. The tables are embedded as Lean literals so importing the project needs no external files.
A transition table: for a state and the symbol under the head, either the
symbol to write, the direction to move and the state to enter, or none to
halt.
The action for each state and scanned symbol.
Instances For
A configuration: the current state and the tape, whose head is the
symbol under the head.
- state : Fin states
The current control state.
- tape : Turing.Tape (Fin symbols)
The tape and head position.
Instances For
The start state on the all-blank tape.
Equations
- ConjectureMachines.init = { state := 0, tape := Turing.Tape.mk₁ [] }
Instances For
M halts when started in state 0 on the all-blank tape.
Equations
Instances For
A Turing machine over symbols tape symbols bundled with its non-zero state count.
- states : ℕ
The number of control states.
The transition table with this state count.
Instances For
Bundle a Machine (states + 1) symbols into a BundledMachine symbols.
Instances For
M halts when started in state 0 on the all-blank tape.
Equations
Instances For
Rows of the 25-state machine of Yijun Leng, from the upstream baseline table.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The 25-state Goldbach baseline.
Equations
Instances For
Rows of the 21-state machine of Maxence Faldor and Moritz Firsching.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The 21-state Goldbach machine.
Equations
Instances For
The configuration n steps in from init, or none once M has halted.
Equations
- ConjectureMachines.run M n = (fun (c : Option (ConjectureMachines.Cfg states symbols)) => c.bind (ConjectureMachines.step M))^[n] (some ConjectureMachines.init)
Instances For
M, started in state 0 on the all-blank tape, has not halted within n steps.
Equations
- ConjectureMachines.Runs M n = ((ConjectureMachines.run M n).isSome = true)