Step to Standard Form
Cslib.URM.Step.toStandardForm
Plain-language statement
Forward step correspondence: if p steps from s to s', then either: (1) p.toStandardForm steps from s to s' (same step), or (2) s' is halted in p, and p.toStandardForm steps to a state that is also halted with the same registers (this only happens for jumps with unbounded targets).
Exact Lean statement
theorem Step.toStandardForm {p : Program} {s s' : State} (hstep : Step p s s') :
Step p.toStandardForm s s' ∨
(s'.isHalted p ∧ ∃ s₂, Step p.toStandardForm s s₂ ∧
s₂.isHalted p.toStandardForm ∧ s'.regs = s₂.regs)Formal artifact
Lean source
theorem Step.toStandardForm {p : Program} {s s' : State} (hstep : Step p s s') : Step p.toStandardForm s s' ∨ (s'.isHalted p ∧ ∃ s₂, Step p.toStandardForm s s₂ ∧ s₂.isHalted p.toStandardForm ∧ s'.regs = s₂.regs) := by cases hstep with | zero hinstr => left exact Step.zero (by simp [Program.getElem?_toStandardForm, hinstr]) | succ hinstr => left exact Step.succ (by simp [Program.getElem?_toStandardForm, hinstr]) | transfer hinstr => left exact Step.transfer (by simp [Program.getElem?_toStandardForm, hinstr]) | @jump_ne m n q hinstr hne => left have hcap : p.toStandardForm[s.pc]? = some (Instr.J m n (min q p.length)) := by simp [Program.getElem?_toStandardForm, hinstr] exact Step.jump_ne hcap hne | @jump_eq m n q hinstr heq => have (x : ℕ) (h : min q p.length = x) : p.toStandardForm[s.pc]? = some (Instr.J m n x) := by grind [Program.getElem?_toStandardForm, Instr.capJump] by_cases q ≤ p.length · grind [Step.jump_eq] · right split_ands · grind [State.isHalted] · use ⟨p.length, s.regs⟩ grind [State.isHalted, Program.toStandardForm_length]- Project
- Lean Computer Science Library
- License
- Apache-2.0
- Commit
- f36649cff2c9
- Source
- Cslib/Computability/URM/StandardForm.lean:96-124
Reuse this declaration
Bring the exact result into your workflow
The import identifies the source module. Your project still needs the pinned package dependency shown on this page.
What this badge means
This completion status comes from the project or community source. It has not yet been represented here as an independent rebuild and axiom audit.
Continue in this project
Related declarations
Unique minimal
Cslib.Automata.DA.FinAcc.unique_minimal
Plain-language statement
The minimal DFA M accepting the language l is unique up to unique isomorphism.
Source project: Lean Computer Science Library
Person-level attribution pending.
Buchi Family cover
Cslib.Automata.NA.Buchi.buchiFamily_cover
Project documentation
na.buchiFamily is a cover if na has only finitely many states. This theorem uses the Ramsey theorem for infinite graphs and does not depend on any details of na.BuchiCongruence other than that it is of finite index.
Source project: Lean Computer Science Library
Person-level attribution pending.
Buchi Family saturation
Cslib.Automata.NA.Buchi.buchiFamily_saturation
Plain-language statement
na.buchiFamily saturates the ω-language accepted by na.
Source project: Lean Computer Science Library
Person-level attribution pending.