Decidability of Emptiness #
This file proves that emptiness is decidable for regular languages.
Main results #
regular_emptiness_decidable– emptiness of a regular language is decidableregular_computableEmptiness– emptiness is uniformly computable for encoded right-regular grammars (ComputableEmptiness)
Part 1: Regular Languages #
Any state reachable by a DFA can be reached by a word of length at most
Fintype.card σ. By the pigeonhole principle.
The set of states reachable from M.start by following transitions.
Equations
- M.reachableSet = (fun (S : Finset σ) => S ∪ Finset.univ.biUnion fun (a : α) => Finset.image (fun (x : σ) => M.step x a) S)^[Fintype.card σ] {M.start}
Instances For
A state is in reachableSet iff it is reachable from M.start by some word.
Emptiness of a DFA's accepted language is decidable.
Equations
Instances For
Emptiness of a regular language is decidable.
Equations
Instances For
Part 2: Uniform computability over encoded right-regular grammars #
The raw uniform emptiness decider for encoded right-regular grammars, obtained by
composing the context-free emptiness decider with the primitive-recursive translation
toCFG : EncodedRG T → EncodedCFG T.
Emptiness is uniformly computable for the regular languages: encoded
right-regular grammars are an adequate, effective presentation
(regularLanguageOf_characterizes) with uniformly decidable emptiness.