Regular Languages Included in Context-Free Languages #
This file proves that every right-regular language is context-free.
Main results #
is_CF_of_is_RG— every regular language is context-freeRG_subclass_CF—RG ⊆ CF
Convert a right-regular grammar to a context-free grammar.
Equations
Instances For
theorem
CF_transforms_of_RG_transforms
{T : Type}
{g : RG_grammar T}
{w₁ w₂ : List (symbol T g.nt)}
(h : RG_transforms g w₁ w₂)
:
CF_transforms (CF_grammar_of_RG g) w₁ w₂
theorem
RG_transforms_of_CF_transforms
{T : Type}
{g : RG_grammar T}
{w₁ w₂ : List (symbol T g.nt)}
(h : CF_transforms (CF_grammar_of_RG g) w₁ w₂)
:
RG_transforms g w₁ w₂