Langlib

Langlib.Grammars.LR.Inclusion.StrictContextFree

LR languages are a strict subclass of context-free languages #

Positive-lookahead LR(k), existential-lookahead LR, and deterministic context-free languages are the same language class. Transporting the known strict inclusion DCFCF therefore gives the result directly for the LR classes named in the hierarchy table.

theorem LRk_strict_subclass_CF (k : ) (hk : 0 < k) :

For every fixed positive k, LR(k) languages form a strict subclass of context-free languages over a three-symbol alphabet.

theorem LRk_strict_subclass_CF_of_card {T : Type} [Fintype T] (k : ) (hk : 0 < k) (hT : 3 Fintype.card T) :

For every fixed positive k, LR(k) languages form a strict subclass of context-free languages over any finite alphabet with at least three symbols.

Existential finite-lookahead LR languages form a strict subclass of context-free languages over a three-symbol alphabet.

Existential finite-lookahead LR languages form a strict subclass of context-free languages over any finite alphabet with at least three symbols.