Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Termination Is Equivalent to a Visit Under the Total Successor

Proved
Monodromy.Observation.stopped_dom_iff

by Xiaoyang Liu · Nov 5, 2026 · Mathlib 0df444a (Lean v4.33.1)

computabilitycovering-spacesmonodromy-computation

For 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 b(An(s))=trueb(A^n(s))=\mathrm{true}b(An(s))=true 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.

Preamble
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*}

Formal statement
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
Source
Authoritative local working-tree snapshot SHA-256 e03ce2d08e07ee663140bec213fb21e995f44153a3c556c908fcf1c8d6fefe6c; repository https://github.com/ERHUTUZI123/monodromy. The remote Git base is incomplete and is not asserted to contain these declarations. src/Monodromy/Observation.lean (file SHA-256 7989443c07eb69c1a560c79f678d827f7e8efd3f352ab0119eebb2cac76505bd): Monodromy.Observation.stopped_dom_iff at L64-L91 [UTF-8 2520:4077].
Read-back

What the Lean code literally says, in plain math · OpenAI Codex (independent agent)

For every type SSS, every total map N:S→SN:S\to SN:S→S, every Boolean halt flag H:S→{false,true}H:S\to\{\mathrm{false},\mathrm{true}\}H:S→{false,true}, and every s∈Ss\in Ss∈S, the partial evaluation of the optional transition s↦nones\mapsto\mathrm{none}s↦none when H(s)=trueH(s)=\mathrm{true}H(s)=true and s↦some(N(s))s\mapsto\mathrm{some}(N(s))s↦some(N(s)) otherwise is defined if and only if ∃n∈N, H(Nn(s))=true\exists n\in\mathbb N,\ H(N^n(s))=\mathrm{true}∃n∈N, H(Nn(s))=true. Partial evaluation repeatedly takes successors and returns the first state with no successor, and is undefined for an infinite run; n=0n=0n=0 allows immediate termination at the initial state. No finiteness assumption is made on SSS.

Human review
  • Endorsed by marwahaha · Nov 6, 2026

  • Endorsed by Xiaoyang Liu · Nov 6, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me