Bounded machine configurations
Lax733996.BoundedConfigurations · concepts/Lax733996/BoundedConfigurations.lean · lax-733996
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Definition
A configuration using at most work cells consists of a control state, an input-head position, a work-head position, and work symbols. Cells beyond this prefix are blank.
Concept map
In the paper
- page 1 of this submission's paper
Lean source view on GitHub
| 1 | import Lax434930.SpaceMachines |
| 2 | import Mathlib.Data.Fintype.Pi |
| 3 | |
| 4 | set_option backward.isDefEq.respectTransparency false |
| 5 | |
| 6 | /-! |
| 7 | --- |
| 8 | title: Bounded machine configurations |
| 9 | type: definition |
| 10 | --- |
| 11 | A configuration using at most work cells consists of a control state, |
| 12 | an input-head position, a work-head position, and work symbols. |
| 13 | Cells beyond this prefix are blank. |
| 14 | -/ |
| 15 | |
| 16 | namespace Lax733996.BoundedConfigurations |
| 17 | |
| 18 | open Lax434930.SpaceMachines |
| 19 | |
| 20 | structure Config (M : Machine) (n s : ℕ) where |
| 21 | state : M.Q |
| 22 | inputHead : Fin (n + 2) |
| 23 | workHead : Fin s |
| 24 | tape : Fin s → M.Γ |
| 25 | deriving Fintype |
| 26 | |
| 27 | def expand {M : Machine} {n s : ℕ} (c : Config M n s) : M.Config := |
| 28 | ⟨c.state, c.inputHead.val, c.workHead.val, |
| 29 | fun i => if h : i < s then c.tape ⟨i, h⟩ else M.blank⟩ |
| 30 | |
| 31 | end Lax733996.BoundedConfigurations |
| 32 |
Builds on
Used by
From Mathlib
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments