arXiv:2610.02973cs.LOOct 2026

Manuscript Offprint

arXiv:2610.02973

An Applicative Multiset Path Order (Extended Version)

Nao Hirokawa, Teppei Saito, Teppei Tanaka, Wataru Yachi

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

1 Introduction

Dershowitz's multiset path order [11] (originally called recursive path order) is a popular reduction order for proving termination of first-order term rewriting. This paper presents an extension of the order to untyped applicative term rewriting [19] which allows us to model lambda-free higher-order functions with first-order terms. For example, the higher-order function map is represented by:

map f nil→nilmap f(cons x xs)→cons (f x)(map f xs)\text{map }f\text{ nil}\rightarrow\text{nil}\qquad\text{map }f\text{(cons }x\text{ xs)}\rightarrow\text{cons }(f\text{ x})(\text{map }f\text{ xs})

This expressiveness comes at the price of difficulty in proving termination. As a matter of the fact, the multiset path order (or more generally, any reduction order with the subterm property) cannot even show the termination of the one-rule rewrite system mult (s x) y→add(mult xy)yy \rightarrow \text{add} (\text{mult } x y) y.

In fact, variants of the recursive path order [6,7] for applicative terms have already been investigated in the context of higher-order theorem proving. Our work follows this line of research. For instance, the Knuth–Bendix completion [20] with our order can transform the equations

append nil ys≈ysys \approx ys append (cons xx xsxs) ys≈consys \approx cons xx (append xsxs ysys) id x≈xx \approx x

map ff nil ≈\approx nil map ff (cons xx nil) ≈\approx cons (fx)(f x) nil

map id ≈\approx id map ff (append xsxs ysys) ≈\approx append (map ff xsxs) (map ff ysys)

into a complete (terminating and confluent) rewrite system (see Example 37).

Technically, our variant has two distinctive features: arity assignment for constants and reification of function application. The former is used for simulating the behavior of the original multiset path order, while the latter, inspired by uncurrying [14,15,19], is used for handling partial application and variable

N. Hirokawa et al.

application like map f and f x. Our order forms a reduction order capable of showing termination of typical higher-order functions such as map and filter. Moreover, it satisfies the gracefulness property which states a form of correspondence between Dershowitz's multiset path order and ours and thereby provides a minimum guarantee in termination proving.

The remaining part of the paper is organized as follows. Section 2 serves as preliminaries. We build our order in three steps: in Section 3 we define a base order which is shown transitive and well-founded; in Section 4 it is lifted to a well-founded order that is closed under contexts; and finally in Section 5 it is further lifted to a reduction order by a folklore technique. The resulting order is evaluated in Section 6. We conclude by discussing related work in Section 7.

This paper is an extended version of our conference paper [16] with omitted proofs in the appendix.

References (32)