Langlib

Langlib.Grammars.LR.Equivalence.DPDAToLR.Productivity

Productive completion of characteristic right-sentential forms #

Every retained characteristic rule is fully productive. Consequently every nonterminal in a reachable right-sentential form can be completed, and the completion can be scheduled rightmost. These facts let the LR proof extend a candidate handle to a genuine accepting computation.

Productivity is unchanged by the productive-rule filter.

The left side of every retained rule is productive in the reduced grammar.

Every nonterminal on the right side of a retained rule is productive in the reduced grammar.

theorem DPDA_to_LR.derivesRightmost_terminal_of_all_productive {T : Type} [Fintype T] (G : CF_grammar T) {u : List (symbol T G.nt)} (hprod : ∀ (A : G.nt), symbol.nonterminal A uproductive G A) :

A list whose nonterminals are productive has a terminal rightmost completion.

The right side of a retained rule has a terminal rightmost completion.

Applying a reachable rule and completing its result yields a terminal rightmost derivation.