Termination Is Equivalent to a Visit Under the Total Successor
ProvedMonodromy.Observation.stopped_dom_iffFor any type S, total successor A:S→S, Boolean stopping test b:S→Bool and initial state s∈S, evaluate the optional step that returns none when b is true and otherwise returns A(s). This partial evaluation is defined if and only if for some natural n, including n=0.
Statement dependencies: Monodromy.Observation.stopped.
Original proof dependencies: Monodromy.Observation.stopped.
Statement elaboration dependencies: Monodromy.Observation.stopped.
Proof elaboration dependencies: Monodromy.Observation.stopped.
module
public import Definitions.Def_Monodromy_Observation
public import Lean.Elab.Tactic.Omega
public import Mathlib.Computability.StateTransition
public import Mathlib.Data.Fintype.Card
public import Mathlib.Data.Set.Finite.Basic
@[expose] public section
open Monodromy
open Monodromy.Observation
variable {S : Type*}
theorem Monodromy.Observation.stopped_dom_iff (next : S → S) (halt : S → Bool) (state : S) :
(StateTransition.eval (stopped next halt) state).Dom ↔
∃ rounds : ℕ, halt ((next^[rounds]) state) = true := by sorry
Read-back
What the Lean code literally says, in plain math · OpenAI Codex (independent agent)
For every type , every total map , every Boolean halt flag , and every , the partial evaluation of the optional transition when and otherwise is defined if and only if . Partial evaluation repeatedly takes successors and returns the first state with no successor, and is undefined for an infinite run; allows immediate termination at the initial state. No finiteness assumption is made on .
Confirmed by the mission captain (proposal self-audit).