The Chomsky hierarchy is strict

Statement

Langlib formalizes the following strict inclusions and the currently available bridges between the grammar classes:

  • Regular ⊊ Deterministic context-free ⊊ Context-free
  • Context-free ⊊ Indexed ⊊ Context-sensitive ⊊ Recursive ⊊ Recursively enumerable
  • Regular ⊊ Linear ⊊ CFL

The displayed chains are class-level shorthand. Every headline strictness theorem ranges over an arbitrary finite alphabet with the stated lower bound on its number of elements. In particular, Indexed ⊊ CS is proved for alphabets with at least 2 elements, whereas Indexed ⊆ CS holds over every terminal type.

In Lean

Proof idea

Each strict inclusion combines an inclusion (every grammar/automaton of the lower class is one of the upper class) with strictness witnessed in one of two ways — a separating language in the upper class but provably not the lower, or a closure mismatch where the two classes differ on a closure operation.

Keywords / also known as

Chomsky hierarchy strict, regular proper subset context-free, DCFL proper subset CFL, context-free proper subset indexed, indexed proper subset context-sensitive, recursive proper subset recursively enumerable, language class separations, proper containment Chomsky hierarchy.

Formalized in Lean 4 with Mathlib, in Langlib.