WorksComputer Science
Tree Equivalence of Higher-Order Recursion Schemes Is Undecidable
Abstract
Higher-order recursion schemes (HORS) are finite, simply typed recursive programs that generate potentially infinite trees. Their monadic second-order model-checking problem is decidable. We prove that tree equivalence of deterministic HORS is undecidable and, more precisely, -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 , consisting of one nullary and one binary symbol. Adapting the counter-guard witness of Boiret, Piorkowski, 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 . 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 .
Introduction
Higher-order recursion schemes (HORS) are finite, simply typed recursive programs generating potentially infinite, ordered, labelled trees. Their parameters may be functions, while terminal symbols act as tree constructors. HORS also generate binder-free encodings of the -long Böhm trees of -terms, with binding information represented by de Bruijn levels [5 Theorem 11, p. 96].
Given such a finite description, a basic verification task is to decide whether the generated tree satisfies a specification. Monadic second-order logic (MSO) provides a language for these specifications, with quantification over nodes and sets of nodes. Given a scheme and an MSO sentence, one can decide whether its generated tree satisfies the sentence [13 Theorem 1]. This model-checking result supports verification of higher-order functional programs [11].
A second task is to compare two descriptions. Tree equivalence asks whether two independently given schemes generate the same tree. At order one it is decidable via language equivalence for deterministic pushdown automata [15, 9]. The higher-order case has long remained open [5, 14, 9].
For nondeterministic pushdown processes, Broadbent and Göller prove that strong bisimilarity is undecidable already for -free order-two automata [BG12, Theorem 5, p. 167]. Their construction uses the choice among transitions with the same action label. In deterministic ranked-tree equality, child addresses fix which subtrees must be compared. The nondeterministic bisimilarity lower bound therefore does not settle this equality problem.
We prove that exact tree equality is undecidable already when both schemes are safe and productive, their type order is at most four, and their terminal alphabet consists of one nullary and one binary symbol. In a productive scheme, every output node can be exposed after finitely many unfolding steps. Safety imposes a standard syntactic discipline on types and parameter dependencies [8 Definition 1, p. 8]. In particular, a function passed as an argument may depend only on rule parameters whose orders are at least its own; § 3 gives the full definition. The construction uses a fixed finite collection of simple types, independent of the source machine and the length of a candidate execution.
Main result and a scheme example
For a scheme , write for the tree it generates, with marking a position where no terminal head is ever exposed. A productive scheme has no nodes; finite leaves are allowed. Equality compares labels at the same child addresses, retaining child order and ignoring the number of unfolding steps used to expose a node.
Theorem 1.1 (Tree equivalence). Tree equivalence of deterministic higher-order recursion schemes is undecidable and, more precisely, -complete (co-c.e.-complete) under total computable many-one reductions. This remains true when both schemes are required simultaneously to be safe and productive, to have order at most four, and to use the fixed ranked alphabet
Two consequences concern other models of computation. The effective, order-preserving correspondence for safe schemes [10 Theorems 5.1 and 5.3] (see also [8 Theorem 2, p. 14]) gives undecidability of ranked-tree equality for deterministic order-four higher-order pushdown automata without collapse (Corollary 7.1). The translations of [5 Theorem 11 and Corollary 19] give -completeness of -long Böhm-tree equality for simply typed -terms, up to -equivalence (Corollary 7.2). The latter transfer makes no claim that the same order bound or safety restriction is preserved.
For the construction, we use the intermediate alphabet : ends an observation, counts one unit, and groups an observation with two continuations. A routine injective encoding replaces these constructors by fixed -tree contexts, preserving safety, productivity, and the order-four bound. This is the final pass of the compiler; § 5.6 proves its specification.
Figure 1 gives a scheme with types S : , F : , and D : . The parameter denotes a unary context, and D composes that context with itself. Passing it to the next call of F gives observation subtrees , , , along a right spine, where is a chain of nodes labelled ending in the leaf . Their unbounded distinct lengths make the resulting tree nonregular, although its description consists of three rules of order at most two.

Figure 1. A finite order-two scheme and its unique output tree. Each expression abbreviates a finite unary subtree. Passing D to the recursive call doubles the context used for the next observation.
The main theorem also rules out a computable input-size bound on the depth of a distinguishing node for unequal pairs in this class (Corollary 7.4).
Putting two output trees below a common root does not by itself compare labels at corresponding addresses. More generally, no total computable construction can map each pair of safe, productive schemes of order at most four over to a HORS whose tree satisfies a fixed MSO sentence exactly when the input trees differ. Composing such a construction with an MSO model checker would decide the equivalence problem in Theorem 1.1.
Contributions
Boiret, Piórkowski, and Schmude [3 Section 4, Theorem 20, p. 48:14] prove undecidability for deterministic polynomial-register automata with substitution, even on word inputs. We adapt their counter-guard witness, retaining the polynomial , the multipliers and for zero and positive guesses, and the first-error argument. § 4 specifies the different control checks and resulting weights.
The compiler realizes arithmetic on pairs of natural numbers, evaluation of the witness polynomial, and its shift update. Its safe, productive HORS implementation has three parts:
State calls enforce control flow and identify halts, removing the register construction’s polynomial tests of control states. The weight checks only the selected counter guard.
Functions store the evolving polynomial at fixed simple types. A shift recurrence constructs new components from the old ones without retaining the step count as a lower-order parameter. The stored polynomial terms satisfy the operand condition for safety as the degree grows.
Tree equality expresses cancellation. A signed weight is zero exactly when its natural components are equal, even if both are large. Generating a unary observation subtree for each component expresses cancellation as equality of two varying trees.
Proof architecture
Let be a deterministic two-counter Minsky machine. Write for halting from the first instruction with both counters zero, and for . This zero-start halting problem is undecidable [6]. § 2.1 gives the instruction semantics; § 3 fixes the source decision problem. The first compiler stage produces over the intermediate alphabet . Its final pass replaces the constructors by fixed tree contexts and outputs over , for . We prove
In the intermediate trees, each zero test generates two continuation subtrees: one follows the instruction for a zero counter, the other the instruction for a positive counter. Both are generated without checking which answer is correct. A path through these continuations describes a candidate execution. Its guessed answers may be wrong; a finite prefix is legal when every guess agrees with the counter value at that step. Wrong guesses can even make the candidate’s counters negative.
Along each candidate, arithmetic updates maintain an integer weight that is nonzero exactly on legal prefixes. We represent it as with natural components. If the candidate reaches a halting position, the left and right schemes generate the unary observation subtrees and , respectively. These observations agree exactly when . An illegal candidate therefore gives matching observations, while a legal halt gives a finite discrepancy. Outside these observations, the two trees have matching labels and branching, so every discrepancy comes from a legal halt.
We prove that the stored functions can be reused in arithmetic and that every candidate branch remains productive. An address argument shows that all mismatches occur at halt observations. The technical overview follows a two-instruction machine through the witness updates and HORS rules to a distinguishing address.
Jochems’s effective transformation replaces every node by an infinite chain of a fresh terminal, preserving and reflecting tree equality [9 Lemma 2.7 and Proposition 2.8, p. 42]. Its outputs are productive, so enumerating their finite prefixes semidecides inequality and yields the general co-c.e. upper bound. We give a direct finite-semantics adequacy proof [16 Theorem 4.1, p. 10] and an algorithm computing exact prefixes at any prescribed depth.
Organization. After the technical overview, § 3 fixes the standard syntax, observations, and source convention. § 4 defines candidate executions and their arithmetic witness. § 5 proves the compiler’s correctness, typing, safety, and two-terminal output. § 6 supplies the matching upper bound, and § 7 derives the mathematical consequences.
Technical overview
Given a two-counter machine , we construct two safe, productive HORS of order at most four whose trees agree exactly when does not halt. The first stage uses to separate observations from continuations; fixed constructor contexts then give the final alphabet . The counter-guard witness and its first-error argument are adapted from Boiret, Piórkowski, and Schmude [3 Section 4]. The construction below stores the evolving polynomial at fixed types and expresses a zero weight by comparing two unary observation trees.
Candidate executions and the adapted witness
We use deterministic two-counter Minsky machines with instruction forms
A program is a finite list , with and instruction positions . The lookup is defined exactly for . Jump targets may be any natural number, including zero and positions beyond .
For , an instruction increments counter and advances to the next instruction. An instruction advances when ; otherwise it decrements and jumps to . The other counter is unchanged. Execution starts at position 1 with both counters zero and halts exactly when the program counter is outside ; no separate halt instruction is needed. The empty program has and halts immediately.
To construct the candidate tree, unfold this finite control from the initial configuration. At each test, generate both successors without checking their guards, labelled 1 for the zero choice and 2 for the positive choice. An increment gives two copies of its successor; a halt gives a leaf. A path describes a candidate execution, whose virtual counters may become negative after a wrong positive choice. § 4.1 defines this unfolding and its relation to the source steps.
Write for these finite candidate prefixes, including . Let be the set of prefixes on which every guessed guard holds. For , let be its final program counter.
The unfolding fixes the control flow, so the weight only needs to detect incorrect counter guards. After instructions of a legal execution, each counter lies in . The polynomial
satisfies and for . Initialize . For the current instruction on counter , let be its old value and the candidate choice: at a test, guesses zero and guesses positive. Update the selected counter and weight simultaneously:
All right-hand sides use the old values. Every instruction also advances and replaces by . Write for the resulting weight of a prefix ; in particular, .
Correct choices multiply the weight by a nonzero integer. At the first wrong choice the tested counter is still in : a false zero choice has and multiplies by ; a false positive choice has and also multiplies by zero. Later updates preserve zero even if the virtual counters become negative. Consequently
This is the first-error argument of the polynomial-register construction. § 4 proves the invariant and its correspondence with the precise source-machine convention.
To realize the witness in HORS, we represent signed integers by pairs of natural numbers and the evolving polynomial by functions at fixed types. Comparing unary subtrees generated from the two integer components expresses the zero condition. The polynomial-register construction uses polynomial-substitution primitives; our function representation implements the required evaluations and updates by ordinary HORS application.
Encoding cancellation by comparison
Represent an integer by a pair with value . The pair is not normalized. Increment, decrement, and multiplication are realized by
The multiplication components have difference . All component operations use successor, addition, and multiplication on naturals. A negative virtual counter after an invalid choice still has two natural components, and decrement requires no predecessor operation.
Keep the weight as . In each intermediate output tree, a candidate node has label : child 0 carries an observation, and children 1, 2 carry the continuations. At nonhalting candidates the observation is . At a candidate halt, the left scheme generates the observation subtree and the right scheme generates . Each is a finite chain of -nodes ending in ; the continuation children then use the shared padding defined in § 2.4. The two observations satisfy
Equality of the generated trees supplies this comparison. For example, the pair represents zero and gives on both sides. Comparing its left observation with would report a discrepancy. Thus the register construction’s comparison with a constant-zero function becomes a comparison of two varying output trees.
A safe polynomial representation at fixed types
The polynomial has degree . Listing all its coefficients would require a growing collection of coordinates. We retain two functions satisfying
To represent their inputs and outputs in HORS, use the simple types
A Church numeral of type N represents iteration: the numeral for , applied to , gives . A stored polynomial component has type P and maps two such numerals to a numeral for its value. The order function
gives , , and .
Safety requires homogeneous types and a bound on the parameters of operands [8 Definition 1]. Homogeneity means that curried parameter orders are nonincreasing, recursively at argument types: has parameter orders 1, 0, and has orders 2, 2, 1, 0. A term supplied as an argument must satisfy for every rule parameter occurring in . § 3 gives the full definition.
This condition constrains how we update the stored functions . The polynomial-register construction stores the step counter and uses [3 Section 4]. A direct encoding that passes the operand , with a rule parameter representing , violates safety: the order-three operand contains an order-two parameter. We therefore use the shift identity
Writing , it yields
Taking differences proves the representation for all natural , including . In particular,
and the negative component interchanges and . The index belongs to this mathematical invariant; the compiled state does not carry a step-counter parameter.
Ordinary Church arithmetic implements the component operations. The helpers Pos, Neg compute and ; for example,
The full rules for numerals, successor, addition and multiplication are given in Section 5.1; these helpers have order at most three. Introduce , of order four. If represent , then and represent the next components. The positive rule is
The negative update replaces Pos by Neg. Here , , , and ; the right-hand side has ground type . The two polynomial calls evaluate the old components at the same shifted argument pair.
The stored operand depends only on the order-three parameters . Numeral arguments are supplied later: has order two, at most the order of each parameter it contains. Its order-three prefix is in function position and has no operand inequality of its own. Section 5.3 checks all operand families and homogeneous types.
Repeated updates build nested applications of these fixed nonterminals. The terms grow in size and represent polynomials of increasing degree, while their type remains P; Lemma 5.4 proves the invariant.
Control rules, reusable representations, and productivity
The arithmetic terms now form the parameters of state calls that generate the candidate tree. Each source instruction at position is compiled into the rule defining a control nonterminal ; handles halts. A state call has the form
The terms represent the current polynomial components. The numeral pairs represent the signed values of the counters , and weight , respectively. The start rule supplies representations of , zero counter pairs, and weight pair . The control type also has order four. The source program determines the number of control rules, while their types are fixed; Lemma 5.1 gives the complete type audit. Normalize source positions by
Thus every out-of-range program position uses the halting nonterminal . Write and as textual abbreviations. If instruction is , its control rule is
The ternary constructor reserves child 0 for an observation and children 1, 2 for the zero and positive continuations. Both use the old counter in the weight update; the zero choice also uses the old polynomial. Both pass the new polynomial. There is one production, so emitting both continuations introduces no nondeterminism. At an increment the two continuation children are identical.
At a halt, the numeral parameters represent the weight components . Applying them to the constructors gives ground terms and , which generate the observation chains and . Introduce a shared padding nonterminal with rule for the two continuation children after a halt. The left halting rule has body and the right has body . These are the only different rules; the padding subtrees are identical and productive in both outputs.
Running example. Take , starting from zero. After the increment, , , and . The zero choice advances to position 3, while the positive choice decrements and jumps to 0. Both positions are out of range, but only the positive choice is legal. From Equation (6), . The false zero choice therefore multiplies the initial weight pair by and obtains . The positive choice multiplies by the old counter pair and retains weight . The observations appear in Figure 2.

Figure 2. The program at its test after the increment. Both schemes generate this whole control skeleton; marks the common padding subtrees. The observations correspond to the zero and positive choices, respectively. The invalid zero choice gives weight components and matching observations ; the legal positive choice gives and observations . The differing labels are boxed.
In the compiled execution, the increment constructs . This term and One both represent the number 1. Let be the updated polynomial terms, representing . The false zero branch passes the weight pair in both schemes, where
and is the corresponding Neg term. Both components represent one. At the halt, the observation terms and both generate the chain . On the positive branch, the multiplier pair is , and the halt observations are . Choosing child 1 at the increment, the corresponding observation addresses are 110 and 120; the latter already has different labels.
Representations on every candidate. The stored numerals must remain usable in later arithmetic, even when they are composed terms such as . Correctness only at the observation arguments does not justify these uses. For example,
supplies with a function computed from . A numeral must therefore implement the represented number of iterations for every related function and ground argument. If represent and represents a function , then represents ; applying gives iterations of . The typed realization relation in Equation (18) formalizes this requirement for numerals and polynomial functions.
Induction on candidate-prefix length maintains the numeral property for all six natural-number components and the function property for both polynomial terms. This includes illegal candidates with zero signed weight or negative virtual counters: every component still represents a finite natural number, as proved in Lemma 5.5. The witness invariant identifies legal prefixes through the signed weight; the representation invariant validates arithmetic on every candidate.
Productivity. A control rule exposes immediately, but its observation child may still require arithmetic. Numeral realization ensures that the selected component produces a finite chain. The continuation children again satisfy the representation invariant, or enter common padding. Induction on observation depth therefore proves productivity of both whole trees, including every illegal branch. Guarded control recursion alone would leave the arithmetic observations unjustified.
Closing both directions of the reduction
Let encode a candidate prefix by its continuation choices. Corresponding control nodes in the two schemes carry the same register terms. The all-address correspondence of Lemma 5.6 identifies their observations with those specified by the arithmetic updates, including the padding and absent addresses.
If reaches a legal halt with weight components , , then Equation (3) gives . Its observation children are and . At the address
one tree has and the other has . Thus a source halt gives an actual finite HORS discrepancy.
For the converse, take a first discrepancy. Productivity and the ranked alphabet ensure that both nodes there exist: their agreeing ancestor labels determine the same child arities. Following only children 1, 2 cannot give different labels, since every control or padding root is . Padding subtrees agree completely. A discrepancy must therefore select child 0 of a candidate state. A nonhalting state has observation on both sides. At a halt the only possible disagreement is between unequal chains, so and the signed weight is nonzero. The entire candidate is legal by Equation (3), and its control position is a source halt. Write , with denoting a tree’s address set and its label at . Then
The intermediate compiler only inserts fixed finite templates into a table indexed by the source instructions, so it is total computable. Theorem 5.8 states this stage’s specification.
Realizing the two-terminal alphabet
The constructors , , separate the observation and control structure throughout the argument. The final compiler pass realizes each by a fixed tree context over :
The root separates from , , and the left child’s root separates from . Their source children occur at fixed target addresses, so decoding finite addresses recovers every source label. Thus , for finite and infinite trees. Three helper rules implement these contexts at order at most one. They preserve safety and productivity; Lemma 5.9 gives the syntactic and semantic argument.
For the final schemes ,
This proves the lower bound of Theorem 1.1, including its two-terminal restriction. The constructor encoding is routine; the witness implementation and its type and safety arguments are unchanged by this final pass.
The upper bound and completeness
Since zero-start machine halting is c.e.-complete (§ 3), the reduction from its complement gives -hardness for the stated restricted class. The general co-c.e. upper bound already follows from Jochems’s effective -elimination [9 Lemma 2.7 and Proposition 2.8]. Its productive outputs permit finite-prefix search for a discrepancy. § 6 gives a direct argument using the standard finite model for head convergence [16 Section 4.1 and Theorem 4.1].
For a closed ground term, this model records only whether a terminal head can be exposed; and both have value one. Higher-type values are finite function tables. Monotone iteration of the rule interpretations from the least values stabilizes, and head adequacy makes the final answer exact. To read an address, start at the root. A positive answer permits a terminating head search and, if the address continues, descent through a valid child index. A negative answer makes the current node ; all its proper descendants are absent. An out-of-range child index is also absent.
The resulting reader distinguishes a terminal label, a present node, and an absent address, and computes an exact prefix at any prescribed finite depth . For well-formed schemes over a common ranked alphabet,
Productivity means that no such prefix contains . Together with the decidable syntactic restrictions, these universal conditions give a definition of the restricted problem as an ordinary language. Combining this upper bound with the reduction proves the completeness claim of Theorem 1.1.
Schemes, observations, and decision problems
Simple types are generated by and , with arrows associating to the right; denotes curried arguments of type . We use the order function defined in Equation (5). A ranked alphabet assigns a natural-number arity to each terminal , whose type is . A deterministic higher-order recursion scheme consists of a finite such alphabet , a finite typed set of nonterminals, a start symbol , and exactly one rule per nonterminal . The parameters are distinct, , and is an applicative term over these parameters, terminals, and declared nonterminals. Terms have the syntax . Thus a rule has a ground body even when a partial application of its nonterminal has functional type. The scheme order is the maximum order of its nonterminal types. Concrete nonterminal names in the constructions, such as , , and , are set in sans serif; schematic symbols and rule parameters are italic.
Safety. We use [8 Definition 1]. A type is homogeneous if each is homogeneous and . A rule is safe if its nonterminal and all body subterms have homogeneous types, and every application operand satisfies for each rule parameter occurring in . In , this condition applies to , not to the function prefix . Nonterminal constants do not count as parameters. A scheme is safe if all its rules are safe. Typing and finite syntax traversal decide this property.
Head rewriting. For closed ground terms, the only unfolding rule is
where substitution is simultaneous. No reduction under a terminal is needed to expose its head. Write when finitely many head steps produce that terminal application. A well-typed closed ground term has either a terminal or a fully applied nonterminal at its head. Unfolding preserves typing, by induction on the body with simultaneous substitution. Since each nonterminal has one rule, head steps are deterministic, and two head exposures of the same term have the same terminal and the same list of children.
Addresses are words over , with zero-based child indices. Define positive observations by
The value tree has root and recursively these children when ; otherwise its root is a fresh nullary symbol . This defines a possibly infinite ranked tree over . In particular, a child below a leaf is absent, whereas a divergent term at an actual child gives a present node. The positive observations determine this tree: the root either has its unique observed label or is , and the same reasoning applies to each child required by an observed label’s arity. Hence
Here and below , with a shared ranked alphabet.
A term is productive to depth zero unconditionally; it is productive to depth if it exposes a terminal and every actual child is productive to depth . A scheme is productive if its start term is productive to every depth. This is equivalent to having no node; finite terminal leaves are permitted.
Inputs. Source programs and HORS descriptions are finite syntax. Fix standard computable injective encodings by natural numbers, with total computable decoders that return syntax or reject the input. Validity, closed references, and a specified order bound are decidable by syntax-directed checks. We consider ordinary languages of encodings:
Malformed inputs are rejected. Membership in includes productivity; the input supplies no semantic promise.
Source machines. We use the two-counter machine model with undecidable halting in [6 Definition 2 and Theorem 6, pp. 16:3–16:4], with instruction positions reindexed from zero to one. § 2.1 gives the instruction syntax and execution convention. A configuration records the program position and the two counter values. It halts exactly when . Write for the configuration step relation and for its reflexive transitive closure. Our termination notation is
The zero-start halting problem is c.e.-complete. The effective two-counter simulation gives c.e.-hardness for arbitrary initial configurations [6 Section 2, p. 16:4]. A finite prefix initializes the counters, then uses the two-instruction gadget to jump to the relocated initial position while restoring both counter values: the decrement necessarily takes its positive branch. Jump relocation keeps every halting target out of range, in particular leaving target zero at zero. This yields the fixed initial state . Bounded simulation gives c.e. membership.
Arithmetic witnesses for candidate executions
We adapt the bounded-counter guard witness of Boiret, Piórkowski, and Schmude [3 Section 4, pp. 48:12–48:14] to the source instruction set in § 2.1. We first define the candidate unfolding, then assign weights that distinguish legal prefixes from illegal ones.
Candidate unfolding
A candidate follows the program’s control instructions but chooses either outcome of a decrement test without checking its guard. Its virtual counters range over , since a wrong positive choice at zero produces . For an active configuration , where , and a choice , define
Both choices have the same successor at an increment. The map is undefined when . For acting on counter , let be that counter’s value in . Its branch condition is
The successor is defined independently of . On natural-counter configurations, the choices satisfying give exactly the source steps .
The candidate tree has domain and configuration map , generated by
Here is the first coordinate of , and is the least set closed under these clauses. Every active node has two children; a node with is a leaf. Thus a finite program may have an infinite candidate unfolding. The legal prefixes form , defined by
They follow the source execution, with either label available at increments. The output trees in Equation (23) add observation children and common halt padding to this candidate tree.
Guard weights and halting correspondence
After instructions let
A legal prefix has , because an instruction increases each counter by at most one. Also , while for . Each weight update multiplies by a factor determined by the current instruction on counter , the candidate choice , and the old counter value :
For , take , , and as the value of its selected counter after . Define
Counter and control updates are given by Equation (11); the unselected counter is unchanged. Every instruction advances the clock to and the polynomial to . The multiplier in Equation (12) uses the pre-transition counter and polynomial, including before a decrement.
In the register construction of [3], an input word can name arbitrary transitions. Its weight update is : checks the source control state, and check both counter guards. A further state factor in the output selects the target state. Here candidates follow the finite control by construction; increments have no guard, and a decrement tests one counter. We retain exactly that guard’s multiplier and observe weights only at halts. The complete numerical weights therefore need not coincide with those of [3]; the shared ingredients are , its guard factors, and the following first-error proof.
Lemma 4.1 (Witness invariant).
Proof. On a legal prefix, increments preserve the weight, positive choices multiply it by a positive integer, and zero choices multiply it by . Thus all legal prefixes have nonzero weight. If a prefix is illegal, consider its first erroneous choice. All earlier choices were legal, so the current tested counter lies in . A false zero choice has and contributes . A false positive choice has and contributes zero. Subsequent updates only multiply the weight or leave it unchanged, so it remains zero, regardless of any later negative virtual counters.
Lemma 4.2 (Control correspondence).
Proof. Given a machine execution, choose its actual guard at each test and either label at an increment. Induction on its length identifies the candidate program counter and virtual counters with the source configuration; Lemma 4.1 gives nonzero weight. A source halt therefore supplies the required candidate. Conversely, nonzero weight makes every choice legal. Starting from natural counters zero, induction on the candidate steps shows that an increment is the source increment, a zero choice is its zero case, and a positive choice subtracts one from a positive natural counter and takes its jump. The final out-of-range control position has no source successor, so this candidate is a halting source execution.
The compiler and its correctness
The first compiler stage inserts fixed rule templates into a table indexed by the source instructions. These rules implement the arithmetic and control updates over described in Section 2. The final pass in Section 5.6 realizes the constructors over . Every rule has an applicative ground body. Tuples, primed terms, and side selection below are textual abbreviations expanded before the rules are emitted.
Arithmetic rules and polynomial updates
For a natural pair write , and put
Thus , , and . All components remain natural numbers, including on illegal candidates.
Set , , and . The numerical rules are
Here and ; every right-hand side has type . Juxtaposition is left-associative. Define a pair of natural-valued functions by
Induction on gives
The successor difference is , using
This identity holds for all integers , not only legal counter values. The seed nonterminals have type and rules and . The update nonterminals have type :
Here , , , and . The right-hand sides have type . Each occurrence of or is an ordinary application to two numeral terms.
Compiling the control flow
Fix a side . Figure 3 gives a control-rule template for each source instruction. At position , selects the rule defining . These selected rules form . The program translation assembles them with the arithmetic library of § 5.1 and the halt, padding, and start rules to obtain . All abbreviations are expanded before the rules are emitted.

Figure 3. Compilation of source control flow into the intermediate HORS . are the arithmetic nonterminals and rules of Section 5.1. The first four templates select one rule per by the right-hand conditions, forming ; the last three rules form . Primed terms, , and are textual abbreviations expanded before the rules are emitted.
Each source position contributes one rule. The common root has observation child and continuation children 1, 2. An increment duplicates its successor call. A decrement test generates both guesses: child 1 keeps the selected counter and advances to the next instruction; child 2 increments its negative component and jumps to the specified position.
Every continuation receives , so the polynomial advances on every instruction. The zero guess multiplies the weight by the old polynomial evaluated at the old counter pair. The positive guess uses the old counter pair as its multiplier, before the negative component is incremented. These simultaneous updates are explicit in the four control-rule templates.
Normalization sends every out-of-range position to 0, represented by . The choice , is fixed by the output side: the two halt observations are and , and both use K for their continuation children. Only this halt rule differs between the two schemes. The start rule supplies the polynomial seeds, zero counter components, and weight components (One, Zero).
Rule context and shared abbreviations
Control, halt, padding, and start rules .
Scheme assembly .
Well-formedness, order, and safety
The construction contains eleven arithmetic nonterminals, S, K, and the control nonterminals. The source instruction list selects one control template per state; no source counter or execution is evaluated during compilation.
Lemma 5.1 (Syntactic compilation). The construction produces two finite, closed, well-typed deterministic HORS over , of order at most four.
Proof. There are states and thirteen other nonterminals, each with one rule. All referenced state indices have been normalized into . The type audit is
The last column is the order of the whole nonterminal type. For example, in Equation (17), , , and the saturated Pos or Neg application has type . In the instruction clauses of Figure 3, and every remaining state argument has type , so each continuation has type . In its halt clause, and have type . The numeral parameter context for Add and Mul is . For addition, and , giving a ground body. For multiplication, , , and application to again yields . For Pos and Neg, each partial multiplication has type ; their sum has type before the final applications. The seed rules ignore their first two arguments and apply a numeral of type to . For a polynomial update, the parameter context has two arguments followed by two arguments, , and . Its two polynomial calls have type , so the component multiplication rule gives the required ground result. □
Lemma 5.2 (Safety of the compiler). For every and side , the compiled scheme is safe.
Proof. We use the syntactic condition of [8], Definition 1. The types , , , are homogeneous, of orders . Every arithmetic type in the preceding audit expands to for some . Its parameter orders are therefore nonincreasing. The same holds for the state type , the ground types of S, K, and terminal types with only ground arguments. Every subterm type is a codomain suffix of the type of its head symbol, which is a parameter, nonterminal, or terminal. Those suffixes remain homogeneous.
The table lists every family of compound nonground operands after expansion of the rule abbreviations, up to renaming parameters of the same type. Here , , and . Each Pos row also covers the corresponding Neg term. The last column gives the set of orders of parameters occurring in the operand. The same numeric families cover the -counter parameters , . Ground operands impose only a lower bound of zero. A single parameter has exactly its own order, and a closed operand has no parameters. The start rule uses closed seeds and numerals. Halt observations and padding add only ground operands, the closed terminal , and K. This checks the condition at every application node in every rule.
| Operand | Parameter orders | |
| Next | 3 | |
| Succ , Mul | 2 | |
| , | 2 | |
| , | 2 | |
| Pos | 2 | |
| Pos | 2 | |
| 1 |
Table 1.
For example, in the prefix has order three and contains the order-two parameter . It is the function child of the outer application, so it has no operand inequality of its own. The whole polynomial application has order two, and its uses as an operand are safe. Applying the inequality to every application prefix would impose a different restriction. □
A representation invariant that supports application
Multiplication reuses a numeral at a functional argument of the form . Correctness only at the observation arguments , would leave this application unproved. We therefore require correctness at every represented function and ground argument.
Fix one compiled scheme . Let be the set of partial observation maps , writing for . These maps record terminal observations only. We allow arbitrary partial maps here; Section 5.5 shows that the constructed output maps satisfy the rank conditions and define productive trees. Set . For a closed term and , define a logical relation by
In the second line ranges over closed terms of type . Ground realization is preserved when a head unfolding is performed in reverse: if and , then , by determinism and the definition of observations.
For any closed and , define to mean . The term may contain nonterminals and partial applications, such as Succ Zero; its numerical behavior is specified under further application. The observation is one instance of this requirement.
Lemma 5.3 (Church arithmetic). and hold. If and , then
For closed terms and , if
then
The two represented numbers are the coordinates of the signed-pair product . Moreover, implies .
Proof. Use the arithmetic rules of Section 5.1 with arbitrary related arguments and . The zero and one rules return and ; the successor rule returns , realizing . For addition the body realizes . For multiplication, Equation (18) first gives . Applying the realization of to this functional argument and then to shows that realizes . One head unfolding of each saturated arithmetic call gives the corresponding conclusion. For Pos, multiplication gives numerals for and , and addition gives . The Neg rule similarly uses and . Finally, the terminal realizes the unary constructor on observation maps and realizes the one-node tree, giving the observation claim; Equation (24) below defines these constructor maps explicitly. □
To verify the polynomial update, we relate the stored HORS terms to the mathematical functions . For closed , the representation predicate requires that their applications to any numeral representations of represent the corresponding function values. Here range over closed N-terms:
The index specifies the polynomial after candidate steps. The next lemma shows that the two Next applications preserve this relation at step .
Lemma 5.4 (Polynomial realization). The seeds satisfy . The update property is
Proof. The seed rules reduce to one and zero on their last two arguments. For the step, let represent . By Lemma 5.3, Succ represents , so the hypothesis applies to and . The two rules in Equation (17) and the Pos/Neg clauses of Lemma 5.3 therefore give exactly the two components of in Equation (14). This argument applies to all , including . □
We combine the polynomial and numeral relations into an invariant for a complete state call. Let be its closed argument tuple, with and . For natural-number pairs , , and , define
This relates every stored component to its mathematical value; the signed counter and weight values are , , . The initial terms in Figure 3 represent and . For the current instruction on counter and choice , update the selected counter pair and the weight pair simultaneously:
Here for , and the other counter is unchanged. Taking signed values gives counter changes , respectively, and, by Equation (15),
Thus these natural-pair operations realize the integer updates of Equations (2) and (13). The witness invariant identifies legal prefixes through . The representation invariant also covers prefixes with or negative virtual counters. Every stored component represents a natural number, so arithmetic observations terminate on every generated branch.
Lemma 5.5 (All-candidate invariant). If holds, each continuation of the corresponding nonhalting state rule satisfies for its updated natural pairs. Hence every finite candidate prefix has such a representation.
Proof. The polynomial coordinates follow from Lemma 5.4. An increment applies Succ to the positive coordinate; a positive choice applies it to the negative coordinate and uses Pos, Neg on the old weight and old counter. A zero choice first applies to the old counter’s two numeral terms and then uses the two multiplication components. The unchanged coordinates retain their realizations. This proves the step for each counter; induction from the seeds proves the last claim. There is no legality or nonzero-weight hypothesis. □
Operational correspondence, productivity, and disagreement
Let . For an arbitrary triple , write : is its first component and its second. For , define by its finite-address observations, or equivalently by the equations
The are the candidate successor and pair update for choice ; an increment duplicates its successor. The definition is well founded when evaluated at a finite address, since a recursive call consumes one address symbol. Every required finite node is present: the root is , observation children are finite chains, and continuation children satisfy the same equations or are .
Every address is either or , with and . The three constructors act on observation maps by
All unlisted cases have value †. They realize these functions under ordinary terminal-head exposure. The intermediate semantic domain contains arbitrary observation maps, but the chains and the trees in (23) satisfy the rank conditions. Induction on finite depth establishes their totality. The operational correspondence transfers this totality to the compiled terms under ordinary HORS head rewriting.
Lemma 5.6 (Operational correspondence). If , then, for every address and terminal ,
Proof. First, induction on the address proves that the rule for realizes . For the state assertion, induct on , universally over . Unfold the state once. At the empty address both sides have root . At a child index at least three neither side has an observation. Child zero is in a nonhalting state; in a halting state, Lemma 5.3 identifies it with the selected finite chain. At child one or two of a nonhalting state, apply Lemma 5.5 and the induction hypothesis to the shorter address. At a halt these children use the assertion for . Normalization of preserves instruction lookup, including halts. □
Exposing gives the control node. Productivity also requires its observation child to finish evaluating the selected arithmetic term; Lemmas 5.3 and 5.5 establish its termination.
Lemma 5.7 (Productivity). Both compiled schemes are productive.
Proof. Prove the stronger assertion for every represented state by induction on observation depth. Depth zero is immediate. A state exposes after one head unfolding. At child zero, the nonhalting case is , and the halting case realizes a finite chain by Lemma 5.3; a chain produces every required node to the remaining depth. The continuation children satisfy the induction hypothesis with the updated invariant, or use K, whose depth productivity follows from its rule by the same induction. Apply this assertion to the initial representation and the start rule. This proves productivity even on illegal candidate paths and when the signed weight is zero. □
Theorem 5.8 (Intermediate compilation). The construction is effective and produces well-formed safe productive schemes of order at most four over . Moreover, writing S for the start symbol in each scheme,
Proof. The static and productivity claims are Lemmas 5.1, 5.2 and 5.7. The compiler traverses the finite instruction list and inserts the displayed fixed templates, so it is total computable.
A candidate prefix of length determines an address , ending at its state in Equation (23). This follows by induction on the prefix, using the chosen continuation child at each step; all preceding states are nonhalting. A legal halt gives weight components , by Lemma 4.2 and . The two trees therefore differ at
One chain ends with there, while the other still has label . By Lemma 5.6, the compiled HORS have this observation.
Conversely, consider any common address with different terminal labels. As long as the address follows children one or two, both roots are and both computations have the same candidate control and pair data. If such a path enters padding after a halt, the two subtrees coincide. An out-of-range child cannot give a common observation. Consequently a discrepancy must select child zero of a genuine candidate state. At a nonhalting state both observation subtrees are . At a halt they are and , whose only possible label mismatch at a common address occurs at suffix , with . Thus the candidate halt has nonzero weight and is a legal source halt by Lemma 4.2.
Finally, two unequal productive ranked trees have different labels at some address present in both trees: choose a shortest address of disagreement. Its proper ancestors agree, and their labels determine their child arities, so both nodes at that address exist. This also proves the intermediate equivalence
□
The two-terminal target
The final pass replaces the intermediate constructors by fixed contexts over . Define
These guarded equations define on finite and infinite -trees.
Lemma 5.9 (Binary output encoding). Every productive HORS over can be effectively translated to a productive HORS over such that
If is safe, then is safe. For any productive HORS , over ,
Proof. The root label distinguishes from ; in the latter case, the left child’s label distinguishes from . The encoded child of occurs at address 1, and the encoded children of occur at 10, 110, 111. Decoding along finite addresses therefore gives
For a scheme , rename its nonterminals to reserve three fresh names, then replace its terminals , , by , , and , with rules
Call the result . The replacements have the original terminal types, so all old subterm types and parameter occurrences are preserved. The new helpers have order at most one, giving the claimed order bound. Their types are homogeneous, and every operand containing a parameter has ground type. Thus safety is preserved. The translation commutes with substitution. Each exposed source constructor is implemented by one helper unfolding and a finite terminal context, giving . Every finite target observation visits finitely many source nodes and context nodes, so productivity is preserved. Injectivity of now gives both directions of equivalence preservation. □
Set for . By Theorem 5.8 and Lemma 5.9, these are safe, productive HORS of order at most four over , and
Both passes are total syntax transformations. Extend the compiler to natural-number codes by mapping malformed source codes, which are excluded from the halting set, to two copies of over . This establishes the total computable reduction in (1). The reduction from the halting complement yields -hardness for , and for the classes obtained by omitting safety, productivity, or the order restriction. The matching upper bound is proved next.
-completeness
Jochems provides an effective -elimination transform that replaces every node by an infinite chain of a fresh terminal, preserving and reflecting tree equality [9 Lemma 2.7 and Proposition 2.8]. Its outputs are productive, so enumerating their finite prefixes semidecides inequality and yields the general co-c.e. upper bound.
Here we give a direct proof using finite monotone semantics for head convergence [16 Section 4.1 and Theorem 4.1]. We construct the finite model and prove that it decides whether a closed ground term exposes a terminal. This allows us to compute the original tree’s prefix at any prescribed finite depth, distinguishing terminal labels, nodes, and absent addresses, even for nonproductive schemes. Equality and productivity are then universal conditions on these computable prefixes. Together with the decidable syntactic restrictions and the lower bound in § 5.6, this establishes the -completeness claims of Theorem 1.1.
A finite semantics for head convergence
Our immediate task is to decide whether a closed ground term exposes a terminal after finitely many head steps. This concerns only the current root: a scheme with the rule exposes , although it generates an infinite tree, whereas never exposes a terminal.
We interpret recursive definitions by least fixed points, following the standard domain-theoretic construction [1 Theorem 2.1.19]. We assign each type a finite semantic domain . At ground type we retain only convergence information, using
The value records head convergence; is the least approximation, providing no convergence guarantee. The order expresses increasing information. Labels and descendants are forgotten: and both have value , as does even when diverges.
For a function type, the abstract value describes how argument information determines result information. Define to consist of all monotone maps , ordered pointwise. Monotonicity ensures that increasing argument information cannot decrease result information. For example,
These describe, respectively, an always-divergent result, returning the argument, and an always-convergent head such as a fixed terminal. Each domain is finite by induction on types, since there are only finitely many maps between finite sets. Its least element is at ground type and the constant- map at type .
Let range over the input scheme ’s finite list of nonterminals, each with its given rule . A global environment assigns a current approximation to every such symbol. All these environments form the finite poset , ordered pointwise.
The parameters of a rule receive values locally. For a rule with and each tuple of abstract arguments , form
A rule without parameters uses the empty local environment. For given global and local environments, define the term denotation recursively by
For a nullary terminal the third clause gives . For closed terms we omit , since there are no free parameters. Typing induction shows that whenever . The interpretation is also monotone in both environments. For application, increasing the function and argument values from to gives : the first inequality uses monotonicity of , and the second the pointwise order .
The rules determine a single update of the global environment:
Typing and monotonicity make a monotone endomap of . We next compute its least fixed point by finite iteration.
Effective computation of the least fixed point
To compute with this model, represent each domain by a list of distinct elements with decidable order and a least element. At ground type use the list with . Given representations of , , enumerate the function tables and retain exactly those satisfying
This finite test enumerates . Equality and order are pointwise, application is lookup, and the constant- table is least.
To compute , enumerate each rule’s abstract argument tuples and evaluate its body by Equation (27); higher-type arguments are finite function tables. Grouping the results by successive arguments constructs the curried table for each nonterminal. Thus the update, equality, and cardinality of the finite product are computable.
Use the standard ascending fixed-point iteration of abstract interpretation [4 Section 8]: initialize for every declared nonterminal and iterate . Each round updates all entries simultaneously, using the same old environment throughout. For example, take and with rules and . For each , the local environment is , so
The pair therefore evolves as
The start value stays 0 in the first update, while the function table changes. This shows why an unchanged start value alone cannot justify stopping.
Stop when , comparing all entries of all function tables. Subsequent environments then remain equal. Since is least and is monotone, the sequence is increasing and stabilizes by : the chain cannot contain distinct environments. Hence one can stop at the first equality or compute exactly rounds; write . For any fixed point , induction gives for every , so is the least fixed point. This computes for every closed typed term . The next subsection proves that its ground value distinguishes head convergence from divergence.
Adequacy for head convergence
The preceding construction computes . We now prove that, for a closed ground term, this value is 1 exactly when actual head unfolding exposes a terminal after finitely many steps.
Lemma 6.1 (Head adequacy). For a well-formed scheme and a closed ground term ,
Proof. We first record that substitution preserves typing. Induction on the term proves this: variables take the types of their substituted arguments, constants are unchanged, and application uses the induction hypotheses. Thus head unfolding preserves typing and exposes well-typed children.
(1) Soundness (). We must show that a semantic value of 1 has a finite operational witness. To carry this guarantee through higher-order application, we relate terms to abstract values: at ground type, value 1 requires head convergence; at function types, related arguments must produce related results. For closed and , define by
Every closed typed term is related to the least element at its type. This follows by induction on the type: the base implication for zero imposes no convergence claim, and a bottom function always returns a bottom value. A terminal is related to its constant-one interpretation, since its saturated application exposes that terminal without evaluating its children.
The relation is preserved by interpreting terms. More precisely, for a term , if every nonterminal is related to and each closed argument is related to , then
Induction on proves it: lookup handles variables and nonterminals, the preceding observation handles terminals, and the function clause handles application.
We now induct on the iteration number to show for every nonterminal. The base case follows from . For the step, take arbitrary closed arguments related to values . The substitution property relates the instantiated body to . Prepending the actual head step preserves the ground relation: any head exposure of the body is also a head exposure of the call. Quantifying over the arguments gives the required function relation for at . At , all nonterminals are therefore related to their values in . Applying the substitution property to the closed ground term gives . If this value is , the ground clause yields the required finite head exposure.
(2) Completeness (). Suppose a finite head-unfolding sequence takes to a terminal application. We show that each head step preserves the interpretation in . Semantic substitution, proved by structural induction, and the fixed-point equation give, for each rule and matching closed arguments ,
Here the denotation of a tuple is taken componentwise. The first equality is application, the second uses the fixed point and the definition of , and the third is semantic substitution. The terminal application at the end of the finite head-unfolding sequence has value , independently of its children. Induction along that sequence therefore gives , proving the reverse implication. □
Exact finite prefixes
Define as follows. If , return . Otherwise run deterministic head unfolding until a terminal is reached, and return that terminal and its arguments. The search terminates by Lemma 6.1 and requires no a priori bound on the number of head steps. Typing is preserved, so each returned child can be processed in turn.
Head search can try successive finite unfolding budgets, since success at any budget is decidable. It is invoked only after head adequacy has proved that some budget succeeds. This gives a total computable head reader. On a negative finite-model answer, no search is performed.
The exact address reader returns a terminal label at an existing node, at a present divergent node, and when the address is absent. Define it by recursion on :
The recursion terminates by address length, with each head call total.
Lemma 6.2 (Exact prefixes). For every well-formed , closed ground , and finite address , the reader returns exactly the label, bottom node, or absence at address in . Consequently exact prefixes of any specified finite depth are total computable.
Proof. Induct on . At , Lemma 6.1 determines convergence and head unfolding supplies the terminal label. At , bottom has no children, invalid terminal-child indices are absent, and valid indices invoke the induction hypothesis. Let be the maximum terminal arity, or zero for an empty alphabet. Reading all with in a fixed order computes . Every actual node has such an address, so equality of all prefix tables is equivalent to tree equality.
Finally, define the Boolean depth test by
Induction on identifies this total test with depth- productivity. A nullary terminal passes because the conjunction is empty. For start terms abbreviate it to . Hence
On invalid input the matrix is defined to be false before any semantic operation. This is a computable universal Boolean definition. Conjoining the decidable checks gives the same upper bound for . Omitting the tests or the syntactic restrictions gives the bounds for and . Together with the reduction in § 5.6, this proves Theorem 1.1.
Consequences
For pushdown automata we use the ranked-tree convention of [8 Section 3.3]: a deterministic higher-order automaton without collapse, together with its output labelling, generates a tree by unfolding transitions and contracting silent steps. Infinite silent runs give leaves.
Corollary 7.1 (Pushdown-tree equivalence). Equality of the labelled trees generated by deterministic order-four higher-order pushdown automata without collapse under this convention is undecidable.
Proof. The effective, order-preserving translation of Theorem 2 of [8 p. 14] converts each safe final compiled scheme into an order-four automaton with the same ordered labelled tree. The convention’s one-based child indices correspond to our zero-based indices by uniform reindexing. By Equation (1), equality of the two translated trees is equivalent to source nonhalting. A decision procedure for these automata would therefore decide source halting. □
Corollary 7.2 ( Böhm-tree equivalence). Equality of the -long Böhm trees of simply typed -terms up to -equivalence is -complete under total computable many-one reductions. Inputs are pairs of terms of the same type in a common typed context.
Proof. The translations of [5 Theorem 11 and Corollary 19, pp. 96, 101] give computable many-one reductions in both directions between HORS equivalence and this problem. The Böhm-tree encoding preserves binding information through de Bruijn levels, using a common enumeration of free variables. The HORS-to- direction transfers -hardness from Theorem 1.1. The reverse direction transfers its upper bound. □
Limits of effective comparison. The main theorem also rules out complete effective methods for certifying equality or bounding the depth of disagreement.
Corollary 7.3. No sound and complete effective system of finite certificates recognizes tree equality throughout the safe productive order-four class, even over .
Proof. Enumerating and checking the certificates would semidecide equality. Exact-prefix search semidecides inequality. Dovetailing these searches would decide equality on the final compiler’s outputs, contradicting Equation (1) and source undecidability. □
Corollary 7.4. There is no total computable function of input-description size such that every unequal safe productive order-four pair over has a discrepancy at an address of length at most .
Proof. Compare the depth- prefixes of the final compiled pair of size . A difference implies source halting; agreement forces tree equality and hence nonhalting. This would decide the source halting problem. □
The order-three boundary. The order-four bound arises from the stored polynomial interface. While arithmetic helpers have order at most three, has order two; hence has order three, which pushes and the control nonterminals to order four (Lemma 5.1). Inlining update helpers cannot eliminate this bottleneck. Reducing the target order three would require either storing polynomial representations of order at most two capable of subsequent updates and evaluations, or bypassing stored polynomials entirely. We therefore leave HORS equivalence at orders two and three open for future work.
Formalization. A supplementary Rocq development covers both compiler stages, including typing, safety, the order bound, productivity, and correspondence with standard HORS head rewriting, as well as the finite semantics and observation algorithms used for the upper bound. It relies on the Rocq standard library and the Library of Undecidability Proofs [12], with completeness formulated in the synthetic computability framework of [7]; conventional effectivity is established by the paper’s explicit algorithms. The consequences in § 7, including the pushdown-automata translation, remain paper-level deductions. Codex was used as an interactive aid during formalization development (e.g., for boilerplate and proof scripts) and for revising the paper’s prose. All formal definitions, theorems, and proofs were audited and verified by the authors. The underlying theory was developed independently by the authors. The artifact is available at doi:10.5281/zenodo.23734555; its README provides the precise theorem statements, assumptions, and reproduction instructions.
References
- [1]Samson Abramsky and Achim Jung. Domain theory. In Samson Abramsky, Dov M. Gabbay, and Thomas S. E. Maibaum, editors, Handbook of Logic in Computer Science, volume 3, pages 1–168. Oxford University Press, 1994. URL: https://www.cs.ox.ac.uk/people/samson.abramsky/handbook.pdf.
- [3]Adrien Boiret, Radosław Piórkowski, and Janusz Schmude. Reducing transducer equivalence to register automata problems solved by “Hilbert Method”. In 38th IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science (FSTTCS), volume 122 of Leibniz International Proceedings in Informatics, pages 48:1–48:16. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2018. URL: https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FSTTCS.2018.48, doi:10.4230/LIPIcs.FSTTCS.2018.48.DOI
- [4]Patrick Cousot and Radhia Cousot. Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Conference Record of the Fourth Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), pages 238–252. ACM, 1977. URL: https://www.di.ens.fr/~cousot/COUSOTpapers/POPL77.shtml, doi:10.1145/512950.512973.DOI
- [5]Pierre Clairambault and Andrzej S. Murawski. Böhm trees as higher-order recursive schemes. In 33rd IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science (FSTTCS), volume 24 of Leibniz International Proceedings in Informatics, pages 91–102. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2013. URL: https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FSTTCS.2013.91, doi:10.4230/LIPIcs.FSTTCS.2013.91.DOI
- [6]Andrej Dudenhefner. Certified decision procedures for two-counter machines. In 7th International Conference on Formal Structures for Computation and Deduction (FSCD), volume 228 of Leibniz International Proceedings in Informatics, pages 16:1–16:18. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. URL: https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.FSCD.2022.16, doi:10.4230/LIPIcs.FSCD.2022.16.DOI
- [7]Yannick Forster, Dominik Kirst, and Gert Smolka. On synthetic undecidability in Coq, with an application to the Entscheidungsproblem. In Proceedings of the 8th ACM SIGPLAN International Conference on Certified Programs and Proofs (CPP), pages 38–51. ACM, 2019. URL: https://www.ps.uni-saarland.de/Publications/documents/ForsterEtAl_2018_On-Synthetic-Undecidability.pdf, doi:10.1145/3293880.3294091.DOI
- [8]Matthew Hague, Andrzej S. Murawski, C.-H. Luke Ong, and Olivier Serre. Collapsible pushdown automata and recursion schemes. ACM Transactions on Computational Logic, 18(3):25:1–25:42, 2017. Cited version: accepted author manuscript (47 pages); DOI for the published version. URL: https://pure.royalholloway.ac.uk/ws/portalfiles/portal/28424477/HMOS_Easychair.pdf, doi:10.1145/3091122.DOI
- [9]Jerome Jochems. Reducing higher-order recursion scheme equivalence to coinductive higher-order constrained Horn clauses. Electronic Proceedings in Theoretical Computer Science, 344:36–64, 2021. URL: https://arxiv.org/abs/2109.04632, doi:10.4204/EPTCS.344.4.
- [10]Teodor Knapik, Damian Niwiński, and Paweł Urzyczyn. Higher-order pushdown trees are easy. In Foundations of Software Science and Computation Structures (FoSSaCS), volume 2303 of Lecture Notes in Computer Science, pages 205–222. Springer, 2002. URL: https://link.springer.com/chapter/10.1007/3-540-45931-6_15, doi:10.1007/3-540-45931-6_15.DOI
- [11]Naoki Kobayashi. Types and higher-order recursion schemes for verification of higher-order programs. In Proceedings of the 36th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), pages 416–428. ACM, 2009. URL: https://www-kb.is.s.u-tokyo.ac.jp/~koba/papers/popl2009.pdf, doi:10.1145/1480881.1480933.DOI
- [12]Library of Undecidability Proofs contributors. The Coq/Rocq library of undecidability proofs. Source code, 2026. Revision c7257b736763d7b2bc3bd25ac47d5fb7ce749c9c; accessed October 27, 2026. URL: https://github.com/uds-psl/coq-library-undecidability/tree/c7257b736763d7b2bc3bd25ac47d5fb7ce749c9c.
- [13]C.-H. Luke Ong. On model-checking trees generated by higher-order recursion schemes. In Proceedings of the 21st Annual IEEE Symposium on Logic in Computer Science (LICS), pages 81–90. IEEE Computer Society, 2006. URL: https://www.cs.ox.ac.uk/people/luke.ong/personal/publications/lics06.pdf, doi:10.1109/LICS.2006.38.DOI
- [14]Luke Ong. Higher-order model checking: An overview. In Proceedings of the 30th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS), pages 1–15. IEEE Computer Society, 2015. URL: https://www.cs.ox.ac.uk/people/luke.ong/personal/publications/LICS15.pdf, doi:10.1109/LICS.2015.9.DOI
- [15]Géraud Sénizergues. The equivalence problem for deterministic pushdown automata is decidable. In Automata, Languages and Programming (ICALP), volume 1256 of Lecture Notes in Computer Science, pages 671–681. Springer, 1997. doi:10.1007/3-540-63165-8_221.DOI
- [16]Sylvain Salvati and Igor Walukiewicz. Using models to model-check recursive schemes. Logical Methods in Computer Science, 11(2):1–27, 2015. Article 7. URL: https://lmcs.episciences.org/1567, doi:10.2168/LMCS-11(2:7)2015.DOI