FormalConjecturesForMathlib/Computability/DFA.lean
Explanation legend Lean4 Domain Explanation Language (L4DEL)
L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.
- L4DEL
- Lean4 Domain Explanation Language
Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.
Project sources: Pinned project documentation, Formal Conjectures paper, arXiv v1
5 declarations, 0 contain sorry, 0 declared as axioms
Synchronizing words for DFAs
A synchronizing word (or reset word) for a DFA M = (Q, Σ, δ) is a word w ∈ Σ* such that
reading w from any state always leads to the same single state. A DFA is synchronizing if it
admits at least one synchronizing word.
These notions support the Černý conjecture (see FormalConjectures.Wikipedia.CernyConjecture).
Imports (1)
Imported by 1 file
- def
DFA.IsSynchronizingWordA wordwis a synchronizing word (or reset word) for a DFAMif readingwfrom any state leads to the same single state line 38 sourceSource documentation
A word
wis a synchronizing word (or reset word) for a DFAMif readingwfrom any state leads to the same single state.no axioms what this means
Statement uses:
DFA,ListProof uses:
Exists,Eq,DFA.evalFromdef IsSynchronizingWord (M : DFA α σ) (w : List α) : Prop := …
- def
DFA.IsSynchronizingA DFAMis synchronizing if it has at least one synchronizing word line 42 sourceSource documentation
A DFA
Mis synchronizing if it has at least one synchronizing word.no axioms what this means
Statement uses:
DFAProof uses:
Exists,List, DFA.IsSynchronizingWorddef IsSynchronizing (M : DFA α σ) : Prop := …
- theorem
DFA.isSynchronizingWord_nilThe empty word is a synchronizing word forMexactly when all states ofMcollapse to a single one (equivalently,σis a nonempty subsingleton) line 48 sourceSource documentation
The empty word is a synchronizing word for
Mexactly when all states ofMcollapse to a single one (equivalently,σis a nonempty subsingleton).standard axioms: propext what this means
Statement uses:
DFA,Iff, DFA.IsSynchronizingWord,List.nil,Exists,EqProof uses:
of_eq_true,iff_selfTactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem isSynchronizingWord_nil (M : DFA α σ) : M.IsSynchronizingWord [] ↔ ∃ p : σ, ∀ q : σ, q = p := by … - theorem
DFA.IsSynchronizingWord.appendDocumented declaration: append line 55 sourceSource documentation
Appending any word
vto a synchronizing wordwyields a synchronizing word: readingwalready drives every state to a single statep, and readingvafterwards sendsptoM.evalFrom p vregardless of the starting state.standard axioms: Quot.sound, propext what this means
Statement uses:
DFA,List, DFA.IsSynchronizingWord,HAppend.hAppendProof uses:
Eq,DFA.evalFrom,Exists.intro,Eq.mpr,id,congrArg,DFA.evalFrom_of_append,Eq.refl5 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
theorem IsSynchronizingWord.append {M : DFA α σ} {w : List α} (hw : M.IsSynchronizingWord w) (v : List α) : M.IsSynchronizingWord (w ++ v) := by … - theorem
DFA.isSynchronizing_of_subsingletonA DFA whose state type is a nonempty subsingleton (i.e. a single-state DFA) is trivially synchronizing: the empty word already synchronizes it line 63 sourceSource documentation
A DFA whose state type is a nonempty subsingleton (i.e. a single-state DFA) is trivially synchronizing: the empty word already synchronizes it.
standard axioms: propext what this means
Statement uses:
Nonempty,Subsingleton,DFA, DFA.IsSynchronizingProof uses:
Exists.intro,List, DFA.IsSynchronizingWord,List.nil,Iff.mpr,Exists,Eq, DFA.isSynchronizingWord_nil,Subsingleton.elim1 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
theorem isSynchronizing_of_subsingleton [Nonempty σ] [Subsingleton σ] (M : DFA α σ) : M.IsSynchronizing := by …