We consider the system Applicative_05__Ex9Maps. Alphabet: cons : [d * e] --> e g : [] --> b map!fac62201 : [d -> d * e] --> e map!fac62202 : [d -> a -> d * a * e] --> e map!fac62203 : [b -> d -> c -> d * b * c * e] --> e Rules: map!fac62201(f, cons(x, y)) => cons(f x, map!fac62201(f, y)) map!fac62202(f, x, cons(y, z)) => cons(f y x, map!fac62202(f, x, z)) map!fac62203(f, g, x, cons(y, z)) => cons(f g y x, map!fac62203(f, g, x, z)) 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!fac62201#(F, cons(X, Y)) =#> F(X) 1] map!fac62201#(F, cons(X, Y)) =#> map!fac62201#(F, Y) 2] map!fac62202#(F, X, cons(Y, Z)) =#> F(Y, X) 3] map!fac62202#(F, X, cons(Y, Z)) =#> map!fac62202#(F, X, Z) 4] map!fac62203#(F, g, X, cons(Y, Z)) =#> F(g, Y, X) 5] map!fac62203#(F, g, X, cons(Y, Z)) =#> map!fac62203#(F, g, X, Z) Rules R_0: map!fac62201(F, cons(X, Y)) => cons(F X, map!fac62201(F, Y)) map!fac62202(F, X, cons(Y, Z)) => cons(F Y X, map!fac62202(F, X, Z)) map!fac62203(F, g, X, cons(Y, Z)) => cons(F g Y X, map!fac62203(F, g, X, Z)) 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). 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!fac62201#(F, cons(X, Y)) >? F(X) map!fac62201#(F, cons(X, Y)) >? map!fac62201#(F, Y) map!fac62202#(F, X, cons(Y, Z)) >? F(Y, X) map!fac62202#(F, X, cons(Y, Z)) >? map!fac62202#(F, X, Z) map!fac62203#(F, g, X, cons(Y, Z)) >? F(g, Y, X) map!fac62203#(F, g, X, cons(Y, Z)) >? map!fac62203#(F, g, X, Z) map!fac62201(F, cons(X, Y)) >= cons(F X, map!fac62201(F, Y)) map!fac62202(F, X, cons(Y, Z)) >= cons(F Y X, map!fac62202(F, X, Z)) map!fac62203(F, g, X, cons(Y, Z)) >= cons(F g Y X, map!fac62203(F, g, X, Z)) Since this representation is not advantageous for the higher-order recursive path ordering, we present the strict requirements in their unextended form, which is not problematic since for any F, s and substituion gamma: (F s)gamma beta-reduces to F(s)gamma.) We use a recursive path ordering as defined in [Kop12, Chapter 5]. We choose Lex = {} and Mul = {@_{o -> o -> o -> o}, @_{o -> o -> o}, @_{o -> o}, cons, g, map!fac62201, map!fac62201#, map!fac62202, map!fac62202#, map!fac62203, map!fac62203#}, and the following precedence: map!fac62201 > map!fac62201# > map!fac62202 > map!fac62202# > map!fac62203# > map!fac62203 > g > cons > @_{o -> o -> o -> o} > @_{o -> o -> o} > @_{o -> o} With these choices, we have: 1] map!fac62201#(F, cons(X, Y)) > @_{o -> o}(F, X) because [2], by definition 2] map!fac62201#*(F, cons(X, Y)) >= @_{o -> o}(F, X) because map!fac62201# > @_{o -> o}, [3] and [5], by (Copy) 3] map!fac62201#*(F, cons(X, Y)) >= F because [4], by (Select) 4] F >= F by (Meta) 5] map!fac62201#*(F, cons(X, Y)) >= X because [6], by (Select) 6] cons(X, Y) >= X because [7], by (Star) 7] cons*(X, Y) >= X because [8], by (Select) 8] X >= X by (Meta) 9] map!fac62201#(F, cons(X, Y)) >= map!fac62201#(F, Y) because map!fac62201# in Mul, [10] and [11], by (Fun) 10] F >= F by (Meta) 11] cons(X, Y) >= Y because [12], by (Star) 12] cons*(X, Y) >= Y because [13], by (Select) 13] Y >= Y by (Meta) 14] map!fac62202#(F, X, cons(Y, Z)) > @_{o -> o}(@_{o -> o -> o}(F, Y), X) because [15], by definition 15] map!fac62202#*(F, X, cons(Y, Z)) >= @_{o -> o}(@_{o -> o -> o}(F, Y), X) because map!fac62202# > @_{o -> o}, [16] and [23], by (Copy) 16] map!fac62202#*(F, X, cons(Y, Z)) >= @_{o -> o -> o}(F, Y) because map!fac62202# > @_{o -> o -> o}, [17] and [19], by (Copy) 17] map!fac62202#*(F, X, cons(Y, Z)) >= F because [18], by (Select) 18] F >= F by (Meta) 19] map!fac62202#*(F, X, cons(Y, Z)) >= Y because [20], by (Select) 20] cons(Y, Z) >= Y because [21], by (Star) 21] cons*(Y, Z) >= Y because [22], by (Select) 22] Y >= Y by (Meta) 23] map!fac62202#*(F, X, cons(Y, Z)) >= X because [24], by (Select) 24] X >= X by (Meta) 25] map!fac62202#(F, X, cons(Y, Z)) > map!fac62202#(F, X, Z) because [26], by definition 26] map!fac62202#*(F, X, cons(Y, Z)) >= map!fac62202#(F, X, Z) because map!fac62202# in Mul, [27], [28] and [29], by (Stat) 27] F >= F by (Meta) 28] X >= X by (Meta) 29] cons(Y, Z) > Z because [30], by definition 30] cons*(Y, Z) >= Z because [31], by (Select) 31] Z >= Z by (Meta) 32] map!fac62203#(F, g, X, cons(Y, Z)) > @_{o -> o}(@_{o -> o -> o}(@_{o -> o -> o -> o}(F, g), Y), X) because [33], by definition 33] map!fac62203#*(F, g, X, cons(Y, Z)) >= @_{o -> o}(@_{o -> o -> o}(@_{o -> o -> o -> o}(F, g), Y), X) because map!fac62203# > @_{o -> o}, [34] and [43], by (Copy) 34] map!fac62203#*(F, g, X, cons(Y, Z)) >= @_{o -> o -> o}(@_{o -> o -> o -> o}(F, g), Y) because map!fac62203# > @_{o -> o -> o}, [35] and [39], by (Copy) 35] map!fac62203#*(F, g, X, cons(Y, Z)) >= @_{o -> o -> o -> o}(F, g) because map!fac62203# > @_{o -> o -> o -> o}, [36] and [38], by (Copy) 36] map!fac62203#*(F, g, X, cons(Y, Z)) >= F because [37], by (Select) 37] F >= F by (Meta) 38] map!fac62203#*(F, g, X, cons(Y, Z)) >= g because map!fac62203# > g, by (Copy) 39] map!fac62203#*(F, g, X, cons(Y, Z)) >= Y because [40], by (Select) 40] cons(Y, Z) >= Y because [41], by (Star) 41] cons*(Y, Z) >= Y because [42], by (Select) 42] Y >= Y by (Meta) 43] map!fac62203#*(F, g, X, cons(Y, Z)) >= X because [44], by (Select) 44] X >= X by (Meta) 45] map!fac62203#(F, g, X, cons(Y, Z)) >= map!fac62203#(F, g, X, Z) because [46], by (Star) 46] map!fac62203#*(F, g, X, cons(Y, Z)) >= map!fac62203#(F, g, X, Z) because map!fac62203# in Mul, [47], [48], [49] and [50], by (Stat) 47] F >= F by (Meta) 48] g >= g by (Fun) 49] X >= X by (Meta) 50] cons(Y, Z) > Z because [51], by definition 51] cons*(Y, Z) >= Z because [52], by (Select) 52] Z >= Z by (Meta) 53] map!fac62201(F, cons(X, Y)) >= cons(@_{o -> o}(F, X), map!fac62201(F, Y)) because [54], by (Star) 54] map!fac62201*(F, cons(X, Y)) >= cons(@_{o -> o}(F, X), map!fac62201(F, Y)) because map!fac62201 > cons, [55] and [58], by (Copy) 55] map!fac62201*(F, cons(X, Y)) >= @_{o -> o}(F, X) because map!fac62201 > @_{o -> o}, [56] and [57], by (Copy) 56] map!fac62201*(F, cons(X, Y)) >= F because [10], by (Select) 57] map!fac62201*(F, cons(X, Y)) >= X because [6], by (Select) 58] map!fac62201*(F, cons(X, Y)) >= map!fac62201(F, Y) because map!fac62201 in Mul, [10] and [59], by (Stat) 59] cons(X, Y) > Y because [60], by definition 60] cons*(X, Y) >= Y because [13], by (Select) 61] map!fac62202(F, X, cons(Y, Z)) >= cons(@_{o -> o}(@_{o -> o -> o}(F, Y), X), map!fac62202(F, X, Z)) because [62], by (Star) 62] map!fac62202*(F, X, cons(Y, Z)) >= cons(@_{o -> o}(@_{o -> o -> o}(F, Y), X), map!fac62202(F, X, Z)) because map!fac62202 > cons, [63] and [68], by (Copy) 63] map!fac62202*(F, X, cons(Y, Z)) >= @_{o -> o}(@_{o -> o -> o}(F, Y), X) because map!fac62202 > @_{o -> o}, [64] and [67], by (Copy) 64] map!fac62202*(F, X, cons(Y, Z)) >= @_{o -> o -> o}(F, Y) because map!fac62202 > @_{o -> o -> o}, [65] and [66], by (Copy) 65] map!fac62202*(F, X, cons(Y, Z)) >= F because [27], by (Select) 66] map!fac62202*(F, X, cons(Y, Z)) >= Y because [20], by (Select) 67] map!fac62202*(F, X, cons(Y, Z)) >= X because [28], by (Select) 68] map!fac62202*(F, X, cons(Y, Z)) >= map!fac62202(F, X, Z) because map!fac62202 in Mul, [27], [28] and [29], by (Stat) 69] map!fac62203(F, g, X, cons(Y, Z)) >= cons(@_{o -> o}(@_{o -> o -> o}(@_{o -> o -> o -> o}(F, g), Y), X), map!fac62203(F, g, X, Z)) because [70], by (Star) 70] map!fac62203*(F, g, X, cons(Y, Z)) >= cons(@_{o -> o}(@_{o -> o -> o}(@_{o -> o -> o -> o}(F, g), Y), X), map!fac62203(F, g, X, Z)) because map!fac62203 > cons, [71] and [78], by (Copy) 71] map!fac62203*(F, g, X, cons(Y, Z)) >= @_{o -> o}(@_{o -> o -> o}(@_{o -> o -> o -> o}(F, g), Y), X) because map!fac62203 > @_{o -> o}, [72] and [77], by (Copy) 72] map!fac62203*(F, g, X, cons(Y, Z)) >= @_{o -> o -> o}(@_{o -> o -> o -> o}(F, g), Y) because map!fac62203 > @_{o -> o -> o}, [73] and [76], by (Copy) 73] map!fac62203*(F, g, X, cons(Y, Z)) >= @_{o -> o -> o -> o}(F, g) because map!fac62203 > @_{o -> o -> o -> o}, [74] and [75], by (Copy) 74] map!fac62203*(F, g, X, cons(Y, Z)) >= F because [47], by (Select) 75] map!fac62203*(F, g, X, cons(Y, Z)) >= g because map!fac62203 > g, by (Copy) 76] map!fac62203*(F, g, X, cons(Y, Z)) >= Y because [40], by (Select) 77] map!fac62203*(F, g, X, cons(Y, Z)) >= X because [49], by (Select) 78] map!fac62203*(F, g, X, cons(Y, Z)) >= map!fac62203(F, g, X, Z) because map!fac62203 in Mul, [47], [48], [49] and [50], by (Stat) By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace the dependency pair problem (P_0, R_0, minimal, formative) by (P_1, R_0, minimal, formative), where P_1 consists of: map!fac62201#(F, cons(X, Y)) =#> map!fac62201#(F, Y) map!fac62203#(F, g, X, cons(Y, Z)) =#> map!fac62203#(F, g, X, Z) Thus, the original system is terminating if (P_1, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_1, R_0, minimal, formative). We place the elements of P in a dependency graph approximation G (see e.g. [Kop12, Thm. 7.27, 7.29], as follows: * 0 : 0 * 1 : 1 This graph has the following strongly connected components: P_2: map!fac62201#(F, cons(X, Y)) =#> map!fac62201#(F, Y) P_3: map!fac62203#(F, g, X, cons(Y, Z)) =#> map!fac62203#(F, g, X, Z) By [Kop12, Thm. 7.31], we may replace any dependency pair problem (P_1, R_0, m, f) by (P_2, R_0, m, f) and (P_3, R_0, m, f). Thus, the original system is terminating if each of (P_2, R_0, minimal, formative) and (P_3, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_3, R_0, minimal, formative). We apply the subterm criterion with the following projection function: nu(map!fac62203#) = 4 Thus, we can orient the dependency pairs as follows: nu(map!fac62203#(F, g, X, cons(Y, Z))) = cons(Y, Z) |> Z = nu(map!fac62203#(F, g, X, Z)) By [FuhKop19, Thm. 61], we may replace a dependency pair problem (P_3, R_0, minimal, f) by ({}, R_0, minimal, f). By the empty set processor [Kop12, Thm. 7.15] this problem may be immediately removed. Thus, the original system is terminating if (P_2, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_2, R_0, minimal, formative). We apply the subterm criterion with the following projection function: nu(map!fac62201#) = 2 Thus, we can orient the dependency pairs as follows: nu(map!fac62201#(F, cons(X, Y))) = cons(X, Y) |> Y = nu(map!fac62201#(F, Y)) By [FuhKop19, Thm. 61], we may replace a dependency pair problem (P_2, R_0, minimal, f) by ({}, R_0, minimal, f). 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 +++ [FuhKop19] C. Fuhs, and C. Kop. A static higher-order dependency pair framework. In Proceedings of ESOP 2019, 2019. [Kop12] C. Kop. Higher Order Termination. PhD Thesis, 2012.