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