All proofs
Project-declaredLean 4.33.0-rc1 · mathlib@169c26b52a38

Steps from to Standard Form halts

Cslib.URM.Steps.from_toStandardForm_halts

Plain-language statement

Reverse halting: if p.toStandardForm reaches a halted state, p reaches a halted state with the same registers.

Exact Lean statement

theorem Steps.from_toStandardForm_halts {p : Program} {s s' : State}
    (hsteps : Steps p.toStandardForm s s') (hhalted : s'.isHalted p.toStandardForm) :
    ∃ s₂, Steps p s s₂ ∧ s₂.isHalted p ∧ s'.regs = s₂.regs

Formal artifact

Lean source

Canonical source
Full Lean sourceLean 4
theorem Steps.from_toStandardForm_halts {p : Program} {s s' : State}    (hsteps : Steps p.toStandardForm s s') (hhalted : s'.isHalted p.toStandardForm) :     s₂, Steps p s s₂  s₂.isHalted p  s'.regs = s₂.regs := by  induction hsteps using Relation.ReflTransGen.head_induction_on with  | refl =>    refine s', by rfl, ?_, rfl    simp only [State.isHalted, Program.toStandardForm_length] at hhalted     exact hhalted  | head hstep hrest ih =>    rcases Step.from_toStandardForm hstep with      hsame | hhalted_mid, s_mid, hstep_mid, hhalted_mid', hregs_eq    · obtain s₂, hsteps₂, hhalted₂, hregs_eq := ih      exact s₂, .trans (.single hsame) hsteps₂, hhalted₂, hregs_eq    · rename_i s_next      have hrest_trivial : s_next = s' := Steps.eq_of_halts .refl hhalted_mid hrest hhalted      subst hrest_trivial      exact s_mid, .single hstep_mid, hhalted_mid', hregs_eq
Project
Lean Computer Science Library
License
Apache-2.0
Commit
f36649cff2c9
Source
Cslib/Computability/URM/StandardForm.lean:170-186

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

Project-declaredLean 4.33.0-rc1

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.

computer sciencecomputabilityprogram semantics

Source project: Lean Computer Science Library

Person-level attribution pending.

View proof record
Project-declaredLean 4.33.0-rc1

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.

computer sciencecomputabilityprogram semantics

Source project: Lean Computer Science Library

Person-level attribution pending.

View proof record