c0ea08d2 / statements / Defs / DFA.lean

1/-
2Copied from google-deepmind/formal-conjectures at commit a61ab09632df039ef8381b6ac8accc5ce4d954d7,
3file FormalConjecturesForMathlib/Computability/DFA.lean: the definitions `DFA.IsSynchronizingWord`
4and `DFA.IsSynchronizing` with their namespace and variables, not the lemmas.
5Copyright 2026 The Formal Conjectures Authors. Licensed under the Apache License, Version 2.0
6(https://www.apache.org/licenses/LICENSE-2.0).
7-/
8module
9
10public import Mathlib.Computability.DFA
11
12@[expose] public section
13
14namespace DFA
15
16variable {α : Type*} {σ : Type*}
17
18/-- A word `w` that sends every state of `M` to one single state. -/
19def IsSynchronizingWord (M : DFA α σ) (w : List α) : Prop :=
20 ∃ p : σ, ∀ q : σ, M.evalFrom q w = p
21
22/-- A DFA `M` is synchronizing if it has at least one synchronizing word. -/
23def IsSynchronizing (M : DFA α σ) : Prop :=
24 ∃ w : List α, M.IsSynchronizingWord w
25
26end DFA