NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

The complexity of downward closures of indexed languages

Richard Mandel, Corto Mascle, Georg Zetzsche

Here is a summary of the paper tailored for a technically literate audience:

TL;DR

The "downward closure" of a language (the set of all its subwords) is a powerful tool for simplifying complex systems in software verification, but computing it for "indexed languages" (languages accepted by order-2 pushdown automata) previously had no known complexity bounds. This paper completely settles the problem, proving it takes triply exponential time to construct a Non-deterministic Finite Automaton (NFA) for the downward closure, providing both the exact algorithms and mathematically matching lower bounds.

What Problem Does This Paper Address?

In formal verification, analyzing infinite-state systems is notoriously difficult. A common trick is to look at the downward closure of the system's language—the set of all scattered subwords that can be generated. Thanks to Higman's Lemma, the downward closure of any language is regular (meaning it can be represented by a finite automaton). This provides a regular "over-approximation" of the system that preserves important behaviors like pattern occurrences, making algorithmic analysis possible.

This paper focuses on computing downward closures for indexed languages. These are generated by indexed grammars (essentially context-free grammars where non-terminals carry a stack) and are equivalent to order-2 pushdown automata (automata with a stack of stacks). They are highly relevant in higher-order model checking.

While it was proven in 2015 that computing the downward closure of an indexed language is possible, the algorithm relied on blind enumeration. We had absolutely no complexity bounds for this task—it wasn't even known if a primitive-recursive bound existed. This paper sets out to finally pin down the exact computational complexity of this problem.

Methods

To bound the complexity, the authors need to translate an indexed grammar (which has infinite stack possibilities) into a context-free grammar (CFG) that has the exact same downward closure. Once it's a CFG, they can apply existing, well-understood algorithms.

To achieve this translation, they use recent advances in finite semigroup theory. Here is the core approach:

  1. The Stack Monoid: They map the contents of the grammar's stacks to a finite "stack monoid." This algebraic structure encodes crucial information, like which non-terminals can push to the stack and what derivations are reachable.
  2. Pump and Skip Rules: Because they only care about the downward closure (subwords), they can safely introduce rules that duplicate ("pump") or delete ("skip") sequences of stack symbols, provided those sequences evaluate to the same idempotent element in the monoid.
  3. Bounded Summaries: Using these rules, they lossily compress arbitrarily large stacks into bounded-size "summaries." They prove that replacing actual stacks with these bounded summaries does not change the downward closure of the language.
  4. CFG Conversion: Because the summaries are bounded, the state space is capped. The indexed grammar is transformed into a doubly-exponential-sized CFG, which is then converted into an NFA.

Datasets

Not discussed in the paper. (This is a purely theoretical computer science paper focused on formal language theory and complexity bounds, so no empirical datasets were used).

Key Insights and Ideas

  • Surprisingly "Low" Complexity: In the realm of higher-order pushdown automata, complexity bounds usually explode into massive towers of exponentials (where the height of the tower grows with the order). Finding a tight, fixed triply exponential bound for order-2 pushdown automata is a pleasant surprise.
  • Lossy Stack Compression Works: The conceptual leap that you can lossily compress a stack—forgetting the exact sequence of symbols but preserving the algebraic "idempotent" structure—and still perfectly preserve the downward closure is a powerful technique.
  • Correcting the Record on Pumping Thresholds: As a byproduct of their lower-bound proofs, the authors settle a lingering question about the "pumping threshold" (the maximal length of words in a finite language) for indexed grammars. They prove it grows triply exponentially, explicitly correcting a previous paper in the literature that had miscalculated it as doubly exponential.

Key Results

The authors provide tight, matching upper and lower bounds for several related problems:

  • NFA Construction: Given an indexed grammar, you can compute an NFA for its downward closure in triply exponential time (and the resulting NFA is triply exponential in size). They provide a matching lower bound proving this is the best possible.
  • DFA Construction: If you want a Deterministic Finite Automaton (DFA) instead, it takes quadruply exponential time/size, again with a matching lower bound.
  • Decision Problems: Checking if the downward closure of one indexed language is included in another ($L_1\downarrow \subseteq L_2\downarrow$), or if two are equivalent, is proven to be exactly co-3-NEXP-complete.

Limitations and Future Work

  • Practical Intractability: While the bounds are mathematically tight and resolve a long-standing open theoretical question, triply and quadruply exponential algorithms are practically intractable for direct implementation on large real-world systems. Applying these abstractions in actual software verification will still require aggressive heuristics.
  • Future Directions: While not explicitly stated, the natural next step for this line of research is to see if these algebraic semigroup techniques can be generalized to level-$k$ higher-order pushdown automata (stacks of stacks of stacks, etc.), where the complexity of downward closures remains an open frontier.

Summary updated

BibTeX
@misc{mandel2026complexity,
  author = {Richard Mandel and Corto Mascle and Georg Zetzsche},
  title = {{The complexity of downward closures of indexed languages}},
  year = {2026},
  eprint = {2601.19466},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2601.19466},
}
Figure