Context-Free Inclusions #
This file relates the project's context-free grammars to context-sensitive, unrestricted, and mathlib formulations.
Main declarations #
A context-free grammar has no ε-productions (every rule has a non-empty right-hand side).
Instances For
Convert a context-free grammar without ε-productions to a context-sensitive grammar. The CS rules have empty context (α = β = []) and γ = rule output.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Context-free languages are context-sensitive.
Context-sensitive grammars require non-empty rule outputs, so the ε-productions of the
context-free grammar are first removed (ContextFreeGrammar.eliminateEmpty), yielding a
non-contracting grammar for L \ {ε}. The empty word is re-adjoined when ε ∈ L using
is_CS_insert_empty_of_CS_grammar.