An accepting derivation in a right-linear grammar has the formwith one active variable until the final terminal production.
If no variable repeated on any accepting derivation, an accepting derivation could contain at most variable occurrences. Since the production set is finite, only finitely many such derivations and hence finitely many terminal words would exist. The hypothesis that is infinite therefore supplies an accepting derivation in which some variable occurs twice.
Split this derivation at the two occurrences:where . The first segment makes an accessible variable of a regular grammar, the middle segment makes it a looping variable of a regular grammar, and the last makes it a terminable variable of a regular grammar. Thus has all three properties, proving the accessible looping terminable variable criterion.
Solved by gpt-5.6-sol high.
Codex Wiki