Star-free languages #
A star-free expression is built from ∅ and single letters by union, complement and
concatenation Libkin, Definition 7.25, with complement taken relative to all words
List α. A language is star-free when some star-free expression denotes it. Star-free languages
are regular, by the closure properties of regular languages.
Libkin works over a finite alphabet Libkin, Section 7.4. This file allows an
arbitrary alphabet, where the finiteness matters: {ε} is star-free exactly when the alphabet is
finite (isStarFree_one_iff). Over a finite alphabet {ε} is the complement of ⊤ · Σ; over an
infinite alphabet some letter c does not occur in a given expression, and on the words cⁿ the
expression's language is all or nothing.
Other presentations start from ∅, {ε} and the letters, or from all finite languages. Over a
finite alphabet they define the same class, because {ε} and every finite language are star-free
in the sense above (IsStarFree.one, IsStarFree.of_finite).
Main definitions #
Cslib.Language.StarFreeExpression: star-free expressions.Cslib.Language.StarFreeExpression.matches': the language denoted by an expression.Cslib.Language.StarFreeExpression.matchEpsilon: whether an expression matches the empty word, computed structurally.Cslib.Language.StarFreeExpression.letters: the letters occurring in an expression.Cslib.Language.IsStarFree: some star-free expression denotes the language.
Main results #
Cslib.Language.StarFreeExpression.matchEpsilon_iff:matchEpsilondecides[] ∈ e.matches'.Cslib.Language.StarFreeExpression.isRegular_matches',Cslib.Language.IsStarFree.isRegular: star-free languages are regular.Cslib.Language.StarFreeExpression.replicate_mem_or_notMem: on the powers of a letter that does not occur in an expression, its language is all or nothing.Cslib.Language.IsStarFree.zero,char,add,compl,mul,top,inf,iSup,iInf: closure properties, the last two for finite unions and intersections.Cslib.Language.IsStarFree.setOf_length_eq_one,Cslib.Language.IsStarFree.one,Cslib.Language.IsStarFree.singleton,Cslib.Language.IsStarFree.of_finite: over a finite alphabet, the words of length one,{ε}, every one-word language and every finite language are star-free.Cslib.Language.not_isStarFree_one,Cslib.Language.isStarFree_one_iff:{ε}is star-free if and only if the alphabet is finite.
References #
Star-free expressions over the alphabet α Libkin, Definition 7.25.
- zero {α : Type u} : StarFreeExpression α
The empty language
∅. - char {α : Type u} : α → StarFreeExpression α
The language
{a}of the one-letter worda. - plus {α : Type u} : StarFreeExpression α → StarFreeExpression α → StarFreeExpression α
Union.
- compl {α : Type u} : StarFreeExpression α → StarFreeExpression α
Complement, relative to all words.
- comp {α : Type u} : StarFreeExpression α → StarFreeExpression α → StarFreeExpression α
Concatenation.
The language denoted by a star-free expression.
Whether the empty word belongs to the language of an expression, computed structurally.
The language of a star-free expression is regular.
The letters occurring in an expression.
On the words cⁿ over a letter c that does not occur in e, the language of e is all or
nothing.
A language is star-free when some star-free expression denotes it Libkin, Definition 7.25.
All words form a star-free language, the complement of ∅.
A finite union of star-free languages is star-free.
A finite intersection of star-free languages is star-free.
Star-free languages are regular.
Over a finite alphabet, {ε} is star-free: it is the complement of ⊤ · Σ.
Over a finite alphabet, every one-word language {w} is star-free: {ε} is, and
{a :: w} = {a} · {w}.
Over a finite alphabet, every finite language is star-free, as a finite union of one-word languages.
Over an infinite alphabet, {ε} is not star-free: an expression mentions finitely many
letters, and on the powers of a letter that it does not mention its language is all or nothing.
{ε} is star-free if and only if the alphabet is finite.