FormalConjecturesForMathlib/Computability/DFA.lean

GitHub source file

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
  1. def DFA.IsSynchronizingWord A word w is a synchronizing word (or reset word) for a DFA M if reading w from any state leads to the same single state line 38 source

    Source documentation

    A word w is a synchronizing word (or reset word) for a DFA M if reading w from any state leads to the same single state.

    no axioms what this means

    Statement uses: DFA, List

    Proof uses: Exists, Eq, DFA.evalFrom

    def IsSynchronizingWord (M : DFA α σ) (w : List α) : Prop :=
    …
  2. def DFA.IsSynchronizing A DFA M is synchronizing if it has at least one synchronizing word line 42 source

    Source documentation

    A DFA M is synchronizing if it has at least one synchronizing word.

    no axioms what this means

    Statement uses: DFA

    Proof uses: Exists, List, DFA.IsSynchronizingWord

    def IsSynchronizing (M : DFA α σ) : Prop :=
    …
  3. theorem DFA.isSynchronizingWord_nil The empty word is a synchronizing word for M exactly when all states of M collapse to a single one (equivalently, σ is a nonempty subsingleton) line 48 source

    Source documentation

    The empty word is a synchronizing word for M exactly when all states of M collapse to a single one (equivalently, σ is a nonempty subsingleton).

    standard axioms: propext what this means

    Statement uses: DFA, Iff, DFA.IsSynchronizingWord, List.nil, Exists, Eq

    Proof uses: of_eq_true, iff_self

    Tactic 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
    …
  4. theorem DFA.IsSynchronizingWord.append Documented declaration: append line 55 source

    Source documentation

    Appending any word v to a synchronizing word w yields a synchronizing word: reading w already drives every state to a single state p, and reading v afterwards sends p to M.evalFrom p v regardless of the starting state.

    standard axioms: Quot.sound, propext what this means

    Statement uses: DFA, List, DFA.IsSynchronizingWord, HAppend.hAppend

    Proof uses: Eq, DFA.evalFrom, Exists.intro, Eq.mpr, id, congrArg, DFA.evalFrom_of_append, Eq.refl

    5 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
    …
  5. theorem DFA.isSynchronizing_of_subsingleton A 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 source

    Source 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.IsSynchronizing

    Proof uses: Exists.intro, List, DFA.IsSynchronizingWord, List.nil, Iff.mpr, Exists, Eq, DFA.isSynchronizingWord_nil, Subsingleton.elim

    1 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
    …