Halting step unique
Turing.MultiTapeTM.halting_step_unique
Plain-language statement
If a Turing machine halts, the time step is uniquely determined.
Exact Lean statement
lemma halting_step_unique
{tm : MultiTapeTM k Symbol State}
{input : List Symbol}
{t₁ t₂ : ℕ}
(h_halts₁ : tm.haltsAtStep input t₁)
(h_halts₂ : tm.haltsAtStep input t₂) :
t₁ = t₂Formal artifact
Lean source
lemma halting_step_unique {tm : MultiTapeTM k Symbol State} {input : List Symbol} {t₁ t₂ : ℕ} (h_halts₁ : tm.haltsAtStep input t₁) (h_halts₂ : tm.haltsAtStep input t₂) : t₁ = t₂ := by wlog h : t₁ ≤ t₂ · exact (this h_halts₂ h_halts₁ (Nat.le_of_not_le h)).symm obtain ⟨d, rfl⟩ := Nat.exists_eq_add_of_le h cases d with | zero => rfl | succ d => have halts₁ : (tm.step^[t₁] (tm.initCfg input)).state = none := by simp [haltsAtStep, configs] at h_halts₁ exact h_halts₁.left have halts₂ : (tm.step^[d + t₁] (tm.initCfg input)).state ≠ none := by grind [haltsAtStep, configs] refine absurd ?_ halts₂ rw [Function.iterate_add_apply, tm.iter_step_eq_of_halt halts₁] exact halts₁- Project
- Lean Computer Science Library
- License
- Apache-2.0
- Commit
- f36649cff2c9
- Source
- Cslib/Computability/Machines/Turing/MultiTape/Deterministic.lean:456-476
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.