theorem
isContextFree_of_is_PDA
{T : Type}
[Fintype T]
{L : Language T}
:
PDA.is_PDA L → L.IsContextFree
Every context-free language (with possibly infinite NT) is accepted by some PDA.
This removes the [Fintype g.NT] requirement from is_PDA_of_mathlib_cfg
by first restricting the grammar to one with finite nonterminals.
The PDA-recognizable languages are exactly the context-free languages.