Indexed Language Inclusions #
This file proves that every context-free language is an indexed language.
The key idea: a context-free grammar can be viewed as an indexed grammar with an empty
flag type (Empty). Since there are no flags, no rule consumes or pushes flags, and
every nonterminal carries the trivial empty stack throughout derivations.
Main declarations #
indexed_of_cfg— convert a CF grammar to an equivalent indexed grammarCF_subclass_Indexed—CF ⊆ Indexed
Convert a context-free grammar to an indexed grammar (with no flags).
Equations
- One or more equations did not get rendered due to their size.
Instances For
The language of indexed_of_cfg g equals CF_language g.
Every context-free language is an indexed language.