We consider the system map. Alphabet: cons : [a * list] --> list map : [list * a -> a] --> list nil : [] --> list Rules: map(nil, f) => nil map(cons(x, y), f) => cons(f x, map(y, f)) This AFS is converted to an AFSM simply by replacing all free variables by meta-variables (with arity 0). We use the dependency pair framework as described in [Kop12, Ch. 6/7], with dynamic dependency pairs. After applying [Kop12, Thm. 7.22] to denote collapsing dependency pairs in an extended form, we thus obtain the following dependency pair problem (P_0, R_0, minimal, formative): Dependency Pairs P_0: 0] map#(cons(X, Y), F) =#> F(X) 1] map#(cons(X, Y), F) =#> map#(Y, F) Rules R_0: map(nil, F) => nil map(cons(X, Y), F) => cons(F X, map(Y, F)) Thus, the original system is terminating if (P_0, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_0, R_0, minimal, formative). The formative rules of (P_0, R_0) are R_1 ::= map(cons(X, Y), F) => cons(F X, map(Y, F)) By [Kop12, Thm. 7.17], we may replace the dependency pair problem (P_0, R_0, minimal, formative) by (P_0, R_1, minimal, formative). Thus, the original system is terminating if (P_0, R_1, minimal, formative) is finite. We consider the dependency pair problem (P_0, R_1, minimal, formative). We will use the reduction pair processor [Kop12, Thm. 7.16]. As the system is abstraction-simple and the formative flag is set, it suffices to find a tagged reduction pair [Kop12, Def. 6.70]. Thus, we must orient: map#(cons(X, Y), F) >? F(X) map#(cons(X, Y), F) >? map#(Y, F) map(cons(X, Y), F) >= cons(F X, map(Y, F)) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: cons = \y0y1.1 + y0 + 2y1 map = \y0G1.y0 + 2y0G1(y0) map# = \y0G1.3 + 2y0 + G1(y0) Using this interpretation, the requirements translate to: [[map#(cons(_x0, _x1), _F2)]] = 5 + 2x0 + 4x1 + F2(1 + x0 + 2x1) > F2(x0) = [[_F2(_x0)]] [[map#(cons(_x0, _x1), _F2)]] = 5 + 2x0 + 4x1 + F2(1 + x0 + 2x1) > 3 + 2x1 + F2(x1) = [[map#(_x1, _F2)]] [[map(cons(_x0, _x1), _F2)]] = 1 + x0 + 2x1 + 2x0F2(1 + x0 + 2x1) + 2F2(1 + x0 + 2x1) + 4x1F2(1 + x0 + 2x1) >= 1 + 2x1 + 4x1F2(x1) + max(x0, F2(x0)) = [[cons(_F2 _x0, map(_x1, _F2))]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace a dependency pair problem (P_0, R_1) by ({}, R_1). By the empty set processor [Kop12, Thm. 7.15] this problem may be immediately removed. As all dependency pair problems were succesfully simplified with sound (and complete) processors until nothing remained, we conclude termination. +++ Citations +++ [Kop12] C. Kop. Higher Order Termination. PhD Thesis, 2012.