Regular languages #
theorem
Cslib.Language.IsRegular.iff_dfa
{Symbol : Type u_1}
{l : Language Symbol}
:
l.IsRegular โ โ (State : Type) (_ : Finite State) (dfa : Automata.DA.FinAcc State Symbol), Automata.Acceptor.language dfa = l
A characterization of Language.IsRegular in terms of DA. This is the only theorem in Cslib
in which Mathlib's definition of Language.IsRegular is used.
theorem
Cslib.Language.IsRegular.iff_nfa
{Symbol : Type u_1}
{l : Language Symbol}
:
l.IsRegular โ โ (State : Type) (_ : Finite State) (nfa : Automata.NA.FinAcc State Symbol), Automata.Acceptor.language nfa = l
A characterization of Language.IsRegular in terms of NA.
@[simp]
The empty language is regular.
@[simp]
The language containing only the empty word is regular.
@[simp]
The language of all finite words is regular.
@[simp]
theorem
Cslib.Language.IsRegular.kstar
{Symbol : Type u_1}
[Inhabited Symbol]
{l : Language Symbol}
(h : l.IsRegular)
:
(KStar.kstar l).IsRegular
The Kleene star of a regular language is regular.
@[simp]
theorem
Cslib.Language.IsRegular.congr_fin_index
{Symbol : Type}
[c : RightCongruence Symbol]
[Finite (Quotient c.eq)]
(a : Quotient c.eq)
:
If a right congruence is of finite index, then each of its equivalence classes is regular.