arXiv:2610.39678cs.FLOct 2026

Manuscript Offprint

arXiv:2610.39678

Tree Equivalence of Higher-Order Recursion Schemes Is Undecidable

Mingkun Xiao, Yixuan Sun

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Higher-order recursion schemes are finite, simply typed recursive programs that generate potentially infinite trees. Their monadic second-order model-checking problem is decidable. We prove that equality of their generated trees is undecidable and, more precisely, Π10\Pi_1^0-complete under total computable many-one reductions. The lower bound holds for safe, productive schemes of order at most four over the fixed ranked alphabet Σ2={e:0,d:2}\Sigma_2 = \{e: 0, d: 2\}, consisting of one nullary and one binary symbol.

Adapting the counter-guard witness of Boiret, Piórkowski, and Schmude, we generate all candidate executions of a two-counter machine by producing both continuations at every counter test. An integer weight is nonzero exactly on legal prefixes. Functions at fixed simple types represent the polynomial of growing degree. A shift recurrence updates them without storing a separate step counter, allowing the witness to be implemented by safe applicative HORS rules. At candidate halts, the intermediate schemes generate unary observation subtrees whose lengths encode the two natural-number components of the signed weight. Invalid candidates give matching observations; a legal halt produces a finite discrepancy. Fixed constructor contexts encode these intermediate trees over Σ2\Sigma_2.

For the upper bound, a finite monotone semantics decides head convergence and supports an algorithm computing exact tree prefixes at any prescribed finite depth, including positions labelled ⊥\bot.

October 27, 2026

*Authors are listed in order of contribution rather than alphabetically, with the first author making the primary contribution.

Contents

1 Introduction 1
2 Technical overview 3
3 Schemes, observations, and decision problems 10
4 Arithmetic witnesses for candidate executions 11
5 The compiler and its correctness 13
6 Π10\Pi_{1}^{0}-completeness 21
7 Consequences 26

i