Computability of Membership #
This file proves that membership is computable for
regular languages, using ComputablePred rather than the weaker Decidable.
Main results #
dfa_membership_computablePred– membership in a DFA's language is a computable predicateregular_membership_computablePred– membership in a regular language is a computable predicateregular_computableMembership– membership is uniformly computable for encoded right-regular grammars (ComputableMembership)
Part 1: Regular Languages #
Membership in a DFA's accepted language is a computable predicate.
The proof constructs the computable decision function explicitly as the
composition of M.eval (which is List.foldl M.step M.start, primitive
recursive by Primrec.list_foldl since M.step is a function from a
finite domain) with the accept-state test (primitive recursive by
Primrec.dom_finite).
Membership in a regular language is a computable predicate.
Equations
- ⋯ = ⋯
Instances For
Part 2: Uniform computability over encoded right-regular grammars #
The raw uniform membership decider for encoded right-regular grammars, obtained by
composing the context-free membership decider with the primitive-recursive translation
toCFG : EncodedRG T → EncodedCFG T.
Membership is uniformly computable for the regular languages: encoded
right-regular grammars are an adequate, effective presentation
(regularLanguageOf_characterizes) with uniformly decidable membership.