Recursively enumerable languages as erasing images of non-contracting languages #
This file implements the standard padding construction for unrestricted grammars. A rule whose output is shorter than its input emits enough padding symbols to preserve length. The padding symbols then commute to the right and survive as terminals in the generated word; an erasing homomorphism removes them again.
The construction first restricts the source grammar to its finitely many used nonterminals. For a grammar with finite terminal and nonterminal alphabets, its simulation uses:
some tfor an original terminaltandnonefor terminal padding;some Afor an original nonterminalAandnonefor the padding nonterminal;- one padded copy of every source rule;
- rules moving the padding nonterminal rightward across every terminal and nonterminal; and
- one rule converting the padding nonterminal to the padding terminal.
Projection erases padding and recovers every simulated source step. Conversely, padding can be moved across the untouched right context after every source step, so every source derivation lifts to the new grammar.
This is the grammar-theoretic core of the classical fact that every recursively enumerable language is a homomorphic image of a context-sensitive language.
Main declarations #
erasePadding— the homomorphism deleting the padding terminal;erasingImageGrammar— the non-contracting padded simulation of an arbitrary grammar;erasingImageGrammar_noncontracting— every rule of the simulation is non-contracting;erasingImageGrammar_language— erasing padding recovers the source language;exists_noncontracting_erasingImage— language-level packaging of the construction.
Reference #
J. E. Hopcroft and J. D. Ullman, Formal Languages and Their Relation to Automata, Theorem 9.9 and Corollary 9.3, 1969.
Delete padding terminals and retain original terminals.
Equations
Instances For
Embed one source symbol into the padded grammar.
Equations
Instances For
Embed a source sentential form into the padded grammar symbol by symbol.
Instances For
The nonterminal used while padding is moved to the right edge.
Instances For
The terminal padding symbol that survives in a generated padded word.
Instances For
Number of padding symbols needed to make a source rule non-contracting.
Equations
Instances For
A block of padding nonterminals.
Instances For
Convert the padding nonterminal into the padding terminal.
Equations
Instances For
The finite list of source symbols across which padding may have to move.
Equations
Instances For
Commuting rules for every symbol of finite terminal and nonterminal alphabets.
Equations
Instances For
Projection and soundness #
Padding motion and completeness #
Language equivalence #
Embed a terminal word and append k padding terminals.
Equations
Instances For
The padded simulation of an arbitrary grammar. Restricting to the nonterminals occurring in its finite rule list supplies the finite alphabet needed to enumerate the commuting rules.
Equations
Instances For
The padded simulation of an arbitrary grammar is non-contracting.
Erasing padding from the padded simulation of an arbitrary grammar recovers its language.
Every source word has a representative generated by erasingImageGrammar whose padding
occurs entirely as a terminal suffix. This is the non-erasing witness used by quotient
reductions.
Projecting any terminal word generated by erasingImageGrammar gives a terminal word of
the source grammar.
Every unrestricted grammar language is the erasing homomorphic image of a non-contracting language.