Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

DFA prefix states and block-boundary path observations

Definition
FSS23105365_DFARun

by YY · Oct 9, 2026 · Mathlib 0df444a (Lean v4.33.1)

finite-staterandomized-ac0samplingzenodo-23105365-appendix-e

For all natural numbers r,mr,mr,m, every deterministic binary automaton BBB with rrr states, and every binary word xxx of length mmm, the function B.stateAfter(x,t)B.\mathrm{stateAfter}(x,t)B.stateAfter(x,t), defined for each natural number ttt, is the state obtained by starting at the specified initial state of BBB and applying its transition function successively to the first min⁡(t,m)\min(t,m)min(t,m) bits of xxx in index order. Thus at t=0t=0t=0 it returns the initial state; at t≥mt\ge mt≥m it returns the state after the entire word, and for m=0m=0m=0 it returns the initial state for every ttt. The accepting set plays no role. An automaton with r=0r=0r=0 cannot be supplied because its structure requires an initial state.

For all natural numbers q,r,nq,r,nq,r,n, every deterministic binary automaton BBB with rrr states, every map φ\varphiφ from its state set to the set of qqq states, all natural numbers v,sv,sv,s, and every binary word xxx of length v+nsv+nsv+ns, the function B.sampledPath(φ,v,s,x)B.\mathrm{sampledPath}(\varphi,v,s,x)B.sampledPath(φ,v,s,x) is the sequence of n+1n+1n+1 states whose entry at each index i=0,…,ni=0,\ldots,ni=0,…,n is φ\varphiφ applied to the state of BBB after it reads the first v+siv+siv+si bits of xxx. The automaton starts at its specified initial state and reads prefixes from that same start for these evaluations. The final observation is at the full word length v+nsv+nsv+ns. This definition imposes no positivity conditions on vvv or sss: if v=0v=0v=0, the first observed state is the projection of the initial state, and if s=0s=0s=0, all entries are the projection of the same state reached after vvv bits. If n=0n=0n=0, the sequence has just the observation after vvv bits. The accepting set is unused. The initial-state field requires r>0r>0r>0, and existence of the supplied map from that inhabited state set requires q>0q>0q>0.

Definition code
import Definitions.Def_FSS23105365_FiniteState

set_option autoImplicit false
namespace FSS23105365

/-- The state after reading the first `t` bits of the supplied word. -/
def BinaryDFA.stateAfter {r m : ℕ} (B : BinaryDFA r) (x : Bits m) (t : ℕ) : Fin r :=
  ((List.ofFn x).take t).foldl B.step B.start

/-- States of a binary DFA observed after the initial `v` bits and then at
successive `s`-bit block boundaries. The last time is the full word length. -/
def BinaryDFA.sampledPath {q r n : ℕ} (B : BinaryDFA r)
    (φ : Fin r → Fin q) (v s : ℕ) (x : Bits (v + n * s)) : Path q n :=
  fun i => φ (B.stateAfter x (v + s * i.val))

end FSS23105365
Source
Jiarui Zhang, Chengwei Liang, Haozhe Jiang, Binhang Yuan, Jingzhao Zhang. Revision Provably Reduces Sequential Computation in Diffusion Language Models. https://doi.org/10.5281/zenodo.23105365, Appendix E. Lemma E.3, Eq. (35), printed pp. 33–34.
Human review
  • Endorsed by Shuze Chen · Oct 10, 2026

    Confirmed by the moderator at approval.

  • Endorsed by YY · Oct 10, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me