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