We consider the system Applicative_first_order_05__31. Alphabet: !faccolon : [] --> b -> b -> b !facplus : [] --> b -> b -> b a : [] --> b cons : [] --> d -> e -> e false : [] --> c filter : [] --> (d -> c) -> e -> e filter2 : [] --> c -> (d -> c) -> d -> e -> e g : [] --> b -> a -> b map : [] --> (d -> d) -> e -> e nil : [] --> e true : [] --> c Rules: !faccolon (!faccolon x y) z => !faccolon x (!faccolon y z) !faccolon (!facplus x y) z => !facplus (!faccolon x z) (!faccolon y z) !faccolon x (!facplus y (f z)) => !faccolon (g x z) (!facplus y a) map f nil => nil map f (cons x y) => cons (f x) (map f y) filter f nil => nil filter f (cons x y) => filter2 (f x) f x y filter2 true f x y => cons x (filter f y) filter2 false f x y => filter f y Using the transformations described in [Kop11], this system can be brought in a form without leading free variables in the left-hand side, and where the left-hand side of a variable is always a functional term or application headed by a functional term. We now transform the resulting AFS into an AFSM by replacing all free variables by meta-variables (with arity 0). This leads to the following AFSM: Alphabet: !faccolon : [b * b] --> b !facplus : [b * b] --> b a : [] --> b cons : [d * e] --> e false : [] --> c filter : [d -> c * e] --> e filter2 : [c * d -> c * d * e] --> e g : [b * a] --> b map : [d -> d * e] --> e nil : [] --> e true : [] --> c ~AP1 : [a -> b * a] --> b Rules: !faccolon(!faccolon(X, Y), Z) => !faccolon(X, !faccolon(Y, Z)) !faccolon(!facplus(X, Y), Z) => !facplus(!faccolon(X, Z), !faccolon(Y, Z)) !faccolon(X, !facplus(Y, ~AP1(F, Z))) => !faccolon(g(X, Z), !facplus(Y, a)) map(F, nil) => nil map(F, cons(X, Y)) => cons(F X, map(F, Y)) filter(F, nil) => nil filter(F, cons(X, Y)) => filter2(F X, F, X, Y) filter2(true, F, X, Y) => cons(X, filter(F, Y)) filter2(false, F, X, Y) => filter(F, Y) !faccolon(X, !facplus(Y, g(Z, U))) => !faccolon(g(X, U), !facplus(Y, a)) ~AP1(F, X) => F X We use the dependency pair framework as described in [Kop12, Ch. 6/7], with static dependency pairs (see [KusIsoSakBla09] and the adaptation for AFSMs and accessible arguments in [Kop13]). We thus obtain the following dependency pair problem (P_0, R_0, static, formative): Dependency Pairs P_0: 0] !faccolon#(!faccolon(X, Y), Z) =#> !faccolon#(X, !faccolon(Y, Z)) 1] !faccolon#(!faccolon(X, Y), Z) =#> !faccolon#(Y, Z) 2] !faccolon#(!facplus(X, Y), Z) =#> !faccolon#(X, Z) 3] !faccolon#(!facplus(X, Y), Z) =#> !faccolon#(Y, Z) 4] !faccolon#(X, !facplus(Y, ~AP1(F, Z))) =#> !faccolon#(g(X, Z), !facplus(Y, a)) 5] map#(F, cons(X, Y)) =#> map#(F, Y) 6] filter#(F, cons(X, Y)) =#> filter2#(F X, F, X, Y) 7] filter2#(true, F, X, Y) =#> filter#(F, Y) 8] filter2#(false, F, X, Y) =#> filter#(F, Y) 9] !faccolon#(X, !facplus(Y, g(Z, U))) =#> !faccolon#(g(X, U), !facplus(Y, a)) Rules R_0: !faccolon(!faccolon(X, Y), Z) => !faccolon(X, !faccolon(Y, Z)) !faccolon(!facplus(X, Y), Z) => !facplus(!faccolon(X, Z), !faccolon(Y, Z)) !faccolon(X, !facplus(Y, ~AP1(F, Z))) => !faccolon(g(X, Z), !facplus(Y, a)) map(F, nil) => nil map(F, cons(X, Y)) => cons(F X, map(F, Y)) filter(F, nil) => nil filter(F, cons(X, Y)) => filter2(F X, F, X, Y) filter2(true, F, X, Y) => cons(X, filter(F, Y)) filter2(false, F, X, Y) => filter(F, Y) !faccolon(X, !facplus(Y, g(Z, U))) => !faccolon(g(X, U), !facplus(Y, a)) ~AP1(F, X) => F X Thus, the original system is terminating if (P_0, R_0, static, formative) is finite. We consider the dependency pair problem (P_0, R_0, static, 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, 2, 3, 4, 9 * 1 : 0, 1, 2, 3, 4, 9 * 2 : 0, 1, 2, 3, 4, 9 * 3 : 0, 1, 2, 3, 4, 9 * 4 : * 5 : 5 * 6 : 7, 8 * 7 : 6 * 8 : 6 * 9 : This graph has the following strongly connected components: P_1: !faccolon#(!faccolon(X, Y), Z) =#> !faccolon#(X, !faccolon(Y, Z)) !faccolon#(!faccolon(X, Y), Z) =#> !faccolon#(Y, Z) !faccolon#(!facplus(X, Y), Z) =#> !faccolon#(X, Z) !faccolon#(!facplus(X, Y), Z) =#> !faccolon#(Y, Z) P_2: map#(F, cons(X, Y)) =#> map#(F, Y) P_3: filter#(F, cons(X, Y)) =#> filter2#(F X, F, X, Y) filter2#(true, F, X, Y) =#> filter#(F, Y) filter2#(false, F, X, Y) =#> filter#(F, Y) By [Kop12, Thm. 7.31], we may replace any dependency pair problem (P_0, R_0, m, f) by (P_1, R_0, m, f), (P_2, R_0, m, f) and (P_3, R_0, m, f). Thus, the original system is terminating if each of (P_1, R_0, static, formative), (P_2, R_0, static, formative) and (P_3, R_0, static, formative) is finite. We consider the dependency pair problem (P_3, R_0, static, formative). We will use the reduction pair processor [Kop12, Thm. 7.16]. It suffices to find a standard reduction pair [Kop12, Def. 6.69]. Thus, we must orient: filter#(F, cons(X, Y)) >? filter2#(F X, F, X, Y) filter2#(true, F, X, Y) >? filter#(F, Y) filter2#(false, F, X, Y) >? filter#(F, Y) !faccolon(!faccolon(X, Y), Z) >= !faccolon(X, !faccolon(Y, Z)) !faccolon(!facplus(X, Y), Z) >= !facplus(!faccolon(X, Z), !faccolon(Y, Z)) !faccolon(X, !facplus(Y, ~AP1(F, Z))) >= !faccolon(g(X, Z), !facplus(Y, a)) map(F, nil) >= nil map(F, cons(X, Y)) >= cons(F X, map(F, Y)) filter(F, nil) >= nil filter(F, cons(X, Y)) >= filter2(F X, F, X, Y) filter2(true, F, X, Y) >= cons(X, filter(F, Y)) filter2(false, F, X, Y) >= filter(F, Y) !faccolon(X, !facplus(Y, g(Z, U))) >= !faccolon(g(X, U), !facplus(Y, a)) ~AP1(F, X) >= F X We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: !faccolon = \y0y1.0 !facplus = \y0y1.0 a = 0 cons = \y0y1.2 + 2y1 false = 3 filter = \G0y1.y1 filter2 = \y0G1y2y3.2 + 2y3 filter2# = \y0G1y2y3.2y3 filter# = \G0y1.2y1 g = \y0y1.0 map = \G0y1.2y1 + 2y1G0(y1) nil = 0 true = 3 ~AP1 = \G0y1.3 + 2G0(y1) Using this interpretation, the requirements translate to: [[filter#(_F0, cons(_x1, _x2))]] = 4 + 4x2 > 2x2 = [[filter2#(_F0 _x1, _F0, _x1, _x2)]] [[filter2#(true, _F0, _x1, _x2)]] = 2x2 >= 2x2 = [[filter#(_F0, _x2)]] [[filter2#(false, _F0, _x1, _x2)]] = 2x2 >= 2x2 = [[filter#(_F0, _x2)]] [[!faccolon(!faccolon(_x0, _x1), _x2)]] = 0 >= 0 = [[!faccolon(_x0, !faccolon(_x1, _x2))]] [[!faccolon(!facplus(_x0, _x1), _x2)]] = 0 >= 0 = [[!facplus(!faccolon(_x0, _x2), !faccolon(_x1, _x2))]] [[!faccolon(_x0, !facplus(_x1, ~AP1(_F2, _x3)))]] = 0 >= 0 = [[!faccolon(g(_x0, _x3), !facplus(_x1, a))]] [[map(_F0, nil)]] = 0 >= 0 = [[nil]] [[map(_F0, cons(_x1, _x2))]] = 4 + 4x2 + 4x2F0(2 + 2x2) + 4F0(2 + 2x2) >= 2 + 4x2 + 4x2F0(x2) = [[cons(_F0 _x1, map(_F0, _x2))]] [[filter(_F0, nil)]] = 0 >= 0 = [[nil]] [[filter(_F0, cons(_x1, _x2))]] = 2 + 2x2 >= 2 + 2x2 = [[filter2(_F0 _x1, _F0, _x1, _x2)]] [[filter2(true, _F0, _x1, _x2)]] = 2 + 2x2 >= 2 + 2x2 = [[cons(_x1, filter(_F0, _x2))]] [[filter2(false, _F0, _x1, _x2)]] = 2 + 2x2 >= x2 = [[filter(_F0, _x2)]] [[!faccolon(_x0, !facplus(_x1, g(_x2, _x3)))]] = 0 >= 0 = [[!faccolon(g(_x0, _x3), !facplus(_x1, a))]] [[~AP1(_F0, _x1)]] = 3 + 2F0(x1) >= F0(x1) = [[_F0 _x1]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace the dependency pair problem (P_3, R_0, static, formative) by (P_4, R_0, static, formative), where P_4 consists of: filter2#(true, F, X, Y) =#> filter#(F, Y) filter2#(false, F, X, Y) =#> filter#(F, Y) Thus, the original system is terminating if each of (P_1, R_0, static, formative), (P_2, R_0, static, formative) and (P_4, R_0, static, formative) is finite. We consider the dependency pair problem (P_4, R_0, static, 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 : * 1 : This graph has no strongly connected components. By [Kop12, Thm. 7.31], this implies finiteness of the dependency pair problem. Thus, the original system is terminating if each of (P_1, R_0, static, formative) and (P_2, R_0, static, formative) is finite. We consider the dependency pair problem (P_2, R_0, static, formative). We will use the reduction pair processor [Kop12, Thm. 7.16]. It suffices to find a standard reduction pair [Kop12, Def. 6.69]. Thus, we must orient: map#(F, cons(X, Y)) >? map#(F, Y) !faccolon(!faccolon(X, Y), Z) >= !faccolon(X, !faccolon(Y, Z)) !faccolon(!facplus(X, Y), Z) >= !facplus(!faccolon(X, Z), !faccolon(Y, Z)) !faccolon(X, !facplus(Y, ~AP1(F, Z))) >= !faccolon(g(X, Z), !facplus(Y, a)) map(F, nil) >= nil map(F, cons(X, Y)) >= cons(F X, map(F, Y)) filter(F, nil) >= nil filter(F, cons(X, Y)) >= filter2(F X, F, X, Y) filter2(true, F, X, Y) >= cons(X, filter(F, Y)) filter2(false, F, X, Y) >= filter(F, Y) !faccolon(X, !facplus(Y, g(Z, U))) >= !faccolon(g(X, U), !facplus(Y, a)) ~AP1(F, X) >= F X We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: !faccolon = \y0y1.0 !facplus = \y0y1.0 a = 0 cons = \y0y1.1 + y1 false = 3 filter = \G0y1.y1 filter2 = \y0G1y2y3.1 + y3 g = \y0y1.0 map = \G0y1.2 + y1 map# = \G0y1.y1 nil = 0 true = 3 ~AP1 = \G0y1.3 + G0(y1) Using this interpretation, the requirements translate to: [[map#(_F0, cons(_x1, _x2))]] = 1 + x2 > x2 = [[map#(_F0, _x2)]] [[!faccolon(!faccolon(_x0, _x1), _x2)]] = 0 >= 0 = [[!faccolon(_x0, !faccolon(_x1, _x2))]] [[!faccolon(!facplus(_x0, _x1), _x2)]] = 0 >= 0 = [[!facplus(!faccolon(_x0, _x2), !faccolon(_x1, _x2))]] [[!faccolon(_x0, !facplus(_x1, ~AP1(_F2, _x3)))]] = 0 >= 0 = [[!faccolon(g(_x0, _x3), !facplus(_x1, a))]] [[map(_F0, nil)]] = 2 >= 0 = [[nil]] [[map(_F0, cons(_x1, _x2))]] = 3 + x2 >= 3 + x2 = [[cons(_F0 _x1, map(_F0, _x2))]] [[filter(_F0, nil)]] = 0 >= 0 = [[nil]] [[filter(_F0, cons(_x1, _x2))]] = 1 + x2 >= 1 + x2 = [[filter2(_F0 _x1, _F0, _x1, _x2)]] [[filter2(true, _F0, _x1, _x2)]] = 1 + x2 >= 1 + x2 = [[cons(_x1, filter(_F0, _x2))]] [[filter2(false, _F0, _x1, _x2)]] = 1 + x2 >= x2 = [[filter(_F0, _x2)]] [[!faccolon(_x0, !facplus(_x1, g(_x2, _x3)))]] = 0 >= 0 = [[!faccolon(g(_x0, _x3), !facplus(_x1, a))]] [[~AP1(_F0, _x1)]] = 3 + F0(x1) >= F0(x1) = [[_F0 _x1]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace a dependency pair problem (P_2, R_0) by ({}, R_0). By the empty set processor [Kop12, Thm. 7.15] this problem may be immediately removed. Thus, the original system is terminating if (P_1, R_0, static, formative) is finite. We consider the dependency pair problem (P_1, R_0, static, formative). We will use the reduction pair processor [Kop12, Thm. 7.16]. It suffices to find a standard reduction pair [Kop12, Def. 6.69]. Thus, we must orient: !faccolon#(!faccolon(X, Y), Z) >? !faccolon#(X, !faccolon(Y, Z)) !faccolon#(!faccolon(X, Y), Z) >? !faccolon#(Y, Z) !faccolon#(!facplus(X, Y), Z) >? !faccolon#(X, Z) !faccolon#(!facplus(X, Y), Z) >? !faccolon#(Y, Z) !faccolon(!faccolon(X, Y), Z) >= !faccolon(X, !faccolon(Y, Z)) !faccolon(!facplus(X, Y), Z) >= !facplus(!faccolon(X, Z), !faccolon(Y, Z)) !faccolon(X, !facplus(Y, ~AP1(F, Z))) >= !faccolon(g(X, Z), !facplus(Y, a)) map(F, nil) >= nil map(F, cons(X, Y)) >= cons(F X, map(F, Y)) filter(F, nil) >= nil filter(F, cons(X, Y)) >= filter2(F X, F, X, Y) filter2(true, F, X, Y) >= cons(X, filter(F, Y)) filter2(false, F, X, Y) >= filter(F, Y) !faccolon(X, !facplus(Y, g(Z, U))) >= !faccolon(g(X, U), !facplus(Y, a)) ~AP1(F, X) >= F X 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]. Argument functions: [[!faccolon#(x_1, x_2)]] = !faccolon#(x_1) [[a]] = _|_ [[filter(x_1, x_2)]] = filter(x_2, x_1) [[filter2(x_1, x_2, x_3, x_4)]] = filter2(x_4, x_2, x_3, x_1) [[g(x_1, x_2)]] = x_1 [[nil]] = _|_ We choose Lex = {!faccolon, filter, filter2} and Mul = {!faccolon#, !facplus, @_{o -> o}, cons, false, map, true, ~AP1}, and the following precedence: !faccolon > !facplus > !faccolon# > false > filter = filter2 > map > true > ~AP1 > @_{o -> o} > cons Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: !faccolon#(!faccolon(X, Y)) >= !faccolon#(X) !faccolon#(!faccolon(X, Y)) >= !faccolon#(Y) !faccolon#(!facplus(X, Y)) >= !faccolon#(X) !faccolon#(!facplus(X, Y)) > !faccolon#(Y) !faccolon(!faccolon(X, Y), Z) >= !faccolon(X, !faccolon(Y, Z)) !faccolon(!facplus(X, Y), Z) >= !facplus(!faccolon(X, Z), !faccolon(Y, Z)) !faccolon(X, !facplus(Y, ~AP1(F, Z))) >= !faccolon(X, !facplus(Y, _|_)) map(F, _|_) >= _|_ map(F, cons(X, Y)) >= cons(@_{o -> o}(F, X), map(F, Y)) filter(F, _|_) >= _|_ filter(F, cons(X, Y)) >= filter2(@_{o -> o}(F, X), F, X, Y) filter2(true, F, X, Y) >= cons(X, filter(F, Y)) filter2(false, F, X, Y) >= filter(F, Y) !faccolon(X, !facplus(Y, Z)) >= !faccolon(X, !facplus(Y, _|_)) ~AP1(F, X) >= @_{o -> o}(F, X) With these choices, we have: 1] !faccolon#(!faccolon(X, Y)) >= !faccolon#(X) because !faccolon# in Mul and [2], by (Fun) 2] !faccolon(X, Y) >= X because [3], by (Star) 3] !faccolon*(X, Y) >= X because [4], by (Select) 4] X >= X by (Meta) 5] !faccolon#(!faccolon(X, Y)) >= !faccolon#(Y) because !faccolon# in Mul and [6], by (Fun) 6] !faccolon(X, Y) >= Y because [7], by (Star) 7] !faccolon*(X, Y) >= Y because [8], by (Select) 8] Y >= Y by (Meta) 9] !faccolon#(!facplus(X, Y)) >= !faccolon#(X) because !faccolon# in Mul and [10], by (Fun) 10] !facplus(X, Y) >= X because [11], by (Star) 11] !facplus*(X, Y) >= X because [12], by (Select) 12] X >= X by (Meta) 13] !faccolon#(!facplus(X, Y)) > !faccolon#(Y) because [14], by definition 14] !faccolon#*(!facplus(X, Y)) >= !faccolon#(Y) because !faccolon# in Mul and [15], by (Stat) 15] !facplus(X, Y) > Y because [16], by definition 16] !facplus*(X, Y) >= Y because [17], by (Select) 17] Y >= Y by (Meta) 18] !faccolon(!faccolon(X, Y), Z) >= !faccolon(X, !faccolon(Y, Z)) because [19], by (Star) 19] !faccolon*(!faccolon(X, Y), Z) >= !faccolon(X, !faccolon(Y, Z)) because [20], [22] and [23], by (Stat) 20] !faccolon(X, Y) > X because [21], by definition 21] !faccolon*(X, Y) >= X because [4], by (Select) 22] !faccolon*(!faccolon(X, Y), Z) >= X because [2], by (Select) 23] !faccolon*(!faccolon(X, Y), Z) >= !faccolon(Y, Z) because [24], [26] and [27], by (Stat) 24] !faccolon(X, Y) > Y because [25], by definition 25] !faccolon*(X, Y) >= Y because [8], by (Select) 26] !faccolon*(!faccolon(X, Y), Z) >= Y because [6], by (Select) 27] !faccolon*(!faccolon(X, Y), Z) >= Z because [28], by (Select) 28] Z >= Z by (Meta) 29] !faccolon(!facplus(X, Y), Z) >= !facplus(!faccolon(X, Z), !faccolon(Y, Z)) because [30], by (Star) 30] !faccolon*(!facplus(X, Y), Z) >= !facplus(!faccolon(X, Z), !faccolon(Y, Z)) because !faccolon > !facplus, [31] and [37], by (Copy) 31] !faccolon*(!facplus(X, Y), Z) >= !faccolon(X, Z) because [32], [34] and [35], by (Stat) 32] !facplus(X, Y) > X because [33], by definition 33] !facplus*(X, Y) >= X because [12], by (Select) 34] !faccolon*(!facplus(X, Y), Z) >= X because [10], by (Select) 35] !faccolon*(!facplus(X, Y), Z) >= Z because [36], by (Select) 36] Z >= Z by (Meta) 37] !faccolon*(!facplus(X, Y), Z) >= !faccolon(Y, Z) because [15], [38] and [35], by (Stat) 38] !faccolon*(!facplus(X, Y), Z) >= Y because [39], by (Select) 39] !facplus(X, Y) >= Y because [16], by (Star) 40] !faccolon(X, !facplus(Y, ~AP1(F, Z))) >= !faccolon(X, !facplus(Y, _|_)) because [41] and [42], by (Fun) 41] X >= X by (Meta) 42] !facplus(Y, ~AP1(F, Z)) >= !facplus(Y, _|_) because !facplus in Mul, [43] and [44], by (Fun) 43] Y >= Y by (Meta) 44] ~AP1(F, Z) >= _|_ by (Bot) 45] map(F, _|_) >= _|_ by (Bot) 46] map(F, cons(X, Y)) >= cons(@_{o -> o}(F, X), map(F, Y)) because [47], by (Star) 47] map*(F, cons(X, Y)) >= cons(@_{o -> o}(F, X), map(F, Y)) because map > cons, [48] and [55], by (Copy) 48] map*(F, cons(X, Y)) >= @_{o -> o}(F, X) because map > @_{o -> o}, [49] and [51], by (Copy) 49] map*(F, cons(X, Y)) >= F because [50], by (Select) 50] F >= F by (Meta) 51] map*(F, cons(X, Y)) >= X because [52], by (Select) 52] cons(X, Y) >= X because [53], by (Star) 53] cons*(X, Y) >= X because [54], by (Select) 54] X >= X by (Meta) 55] map*(F, cons(X, Y)) >= map(F, Y) because map in Mul, [56] and [57], by (Stat) 56] F >= F by (Meta) 57] cons(X, Y) > Y because [58], by definition 58] cons*(X, Y) >= Y because [59], by (Select) 59] Y >= Y by (Meta) 60] filter(F, _|_) >= _|_ by (Bot) 61] filter(F, cons(X, Y)) >= filter2(@_{o -> o}(F, X), F, X, Y) because [62], by (Star) 62] filter*(F, cons(X, Y)) >= filter2(@_{o -> o}(F, X), F, X, Y) because filter = filter2, [63], [66], [67], [69] and [73], by (Stat) 63] cons(X, Y) > Y because [64], by definition 64] cons*(X, Y) >= Y because [65], by (Select) 65] Y >= Y by (Meta) 66] filter*(F, cons(X, Y)) >= @_{o -> o}(F, X) because filter > @_{o -> o}, [67] and [69], by (Copy) 67] filter*(F, cons(X, Y)) >= F because [68], by (Select) 68] F >= F by (Meta) 69] filter*(F, cons(X, Y)) >= X because [70], by (Select) 70] cons(X, Y) >= X because [71], by (Star) 71] cons*(X, Y) >= X because [72], by (Select) 72] X >= X by (Meta) 73] filter*(F, cons(X, Y)) >= Y because [74], by (Select) 74] cons(X, Y) >= Y because [64], by (Star) 75] filter2(true, F, X, Y) >= cons(X, filter(F, Y)) because [76], by (Star) 76] filter2*(true, F, X, Y) >= cons(X, filter(F, Y)) because filter2 > cons, [77] and [79], by (Copy) 77] filter2*(true, F, X, Y) >= X because [78], by (Select) 78] X >= X by (Meta) 79] filter2*(true, F, X, Y) >= filter(F, Y) because filter2 = filter, [80], [81], [82] and [83], by (Stat) 80] F >= F by (Meta) 81] Y >= Y by (Meta) 82] filter2*(true, F, X, Y) >= F because [80], by (Select) 83] filter2*(true, F, X, Y) >= Y because [81], by (Select) 84] filter2(false, F, X, Y) >= filter(F, Y) because [85], by (Star) 85] filter2*(false, F, X, Y) >= filter(F, Y) because filter2 = filter, [86], [87], [88] and [89], by (Stat) 86] F >= F by (Meta) 87] Y >= Y by (Meta) 88] filter2*(false, F, X, Y) >= F because [86], by (Select) 89] filter2*(false, F, X, Y) >= Y because [87], by (Select) 90] !faccolon(X, !facplus(Y, Z)) >= !faccolon(X, !facplus(Y, _|_)) because [91] and [92], by (Fun) 91] X >= X by (Meta) 92] !facplus(Y, Z) >= !facplus(Y, _|_) because !facplus in Mul, [93] and [94], by (Fun) 93] Y >= Y by (Meta) 94] Z >= _|_ by (Bot) 95] ~AP1(F, X) >= @_{o -> o}(F, X) because [96], by (Star) 96] ~AP1*(F, X) >= @_{o -> o}(F, X) because ~AP1 > @_{o -> o}, [97] and [99], by (Copy) 97] ~AP1*(F, X) >= F because [98], by (Select) 98] F >= F by (Meta) 99] ~AP1*(F, X) >= X because [100], by (Select) 100] X >= X by (Meta) By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace the dependency pair problem (P_1, R_0, static, formative) by (P_5, R_0, static, formative), where P_5 consists of: !faccolon#(!faccolon(X, Y), Z) =#> !faccolon#(X, !faccolon(Y, Z)) !faccolon#(!faccolon(X, Y), Z) =#> !faccolon#(Y, Z) !faccolon#(!facplus(X, Y), Z) =#> !faccolon#(X, Z) Thus, the original system is terminating if (P_5, R_0, static, formative) is finite. We consider the dependency pair problem (P_5, R_0, static, formative). We will use the reduction pair processor [Kop12, Thm. 7.16]. It suffices to find a standard reduction pair [Kop12, Def. 6.69]. Thus, we must orient: !faccolon#(!faccolon(X, Y), Z) >? !faccolon#(X, !faccolon(Y, Z)) !faccolon#(!faccolon(X, Y), Z) >? !faccolon#(Y, Z) !faccolon#(!facplus(X, Y), Z) >? !faccolon#(X, Z) !faccolon(!faccolon(X, Y), Z) >= !faccolon(X, !faccolon(Y, Z)) !faccolon(!facplus(X, Y), Z) >= !facplus(!faccolon(X, Z), !faccolon(Y, Z)) !faccolon(X, !facplus(Y, ~AP1(F, Z))) >= !faccolon(g(X, Z), !facplus(Y, a)) map(F, nil) >= nil map(F, cons(X, Y)) >= cons(F X, map(F, Y)) filter(F, nil) >= nil filter(F, cons(X, Y)) >= filter2(F X, F, X, Y) filter2(true, F, X, Y) >= cons(X, filter(F, Y)) filter2(false, F, X, Y) >= filter(F, Y) !faccolon(X, !facplus(Y, g(Z, U))) >= !faccolon(g(X, U), !facplus(Y, a)) ~AP1(F, X) >= F X We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: !faccolon = \y0y1.y1 + 2y0 !faccolon# = \y0y1.2y0 !facplus = \y0y1.2 + y0 a = 0 cons = \y0y1.2 + y1 false = 3 filter = \G0y1.2y1 + 2y1G0(y1) filter2 = \y0G1y2y3.2 + 2y3 + 2y3G1(y3) g = \y0y1.0 map = \G0y1.y1 nil = 0 true = 3 ~AP1 = \G0y1.3 + G0(y1) Using this interpretation, the requirements translate to: [[!faccolon#(!faccolon(_x0, _x1), _x2)]] = 2x1 + 4x0 >= 2x0 = [[!faccolon#(_x0, !faccolon(_x1, _x2))]] [[!faccolon#(!faccolon(_x0, _x1), _x2)]] = 2x1 + 4x0 >= 2x1 = [[!faccolon#(_x1, _x2)]] [[!faccolon#(!facplus(_x0, _x1), _x2)]] = 4 + 2x0 > 2x0 = [[!faccolon#(_x0, _x2)]] [[!faccolon(!faccolon(_x0, _x1), _x2)]] = x2 + 2x1 + 4x0 >= x2 + 2x0 + 2x1 = [[!faccolon(_x0, !faccolon(_x1, _x2))]] [[!faccolon(!facplus(_x0, _x1), _x2)]] = 4 + x2 + 2x0 >= 2 + x2 + 2x0 = [[!facplus(!faccolon(_x0, _x2), !faccolon(_x1, _x2))]] [[!faccolon(_x0, !facplus(_x1, ~AP1(_F2, _x3)))]] = 2 + x1 + 2x0 >= 2 + x1 = [[!faccolon(g(_x0, _x3), !facplus(_x1, a))]] [[map(_F0, nil)]] = 0 >= 0 = [[nil]] [[map(_F0, cons(_x1, _x2))]] = 2 + x2 >= 2 + x2 = [[cons(_F0 _x1, map(_F0, _x2))]] [[filter(_F0, nil)]] = 0 >= 0 = [[nil]] [[filter(_F0, cons(_x1, _x2))]] = 4 + 2x2 + 2x2F0(2 + x2) + 4F0(2 + x2) >= 2 + 2x2 + 2x2F0(x2) = [[filter2(_F0 _x1, _F0, _x1, _x2)]] [[filter2(true, _F0, _x1, _x2)]] = 2 + 2x2 + 2x2F0(x2) >= 2 + 2x2 + 2x2F0(x2) = [[cons(_x1, filter(_F0, _x2))]] [[filter2(false, _F0, _x1, _x2)]] = 2 + 2x2 + 2x2F0(x2) >= 2x2 + 2x2F0(x2) = [[filter(_F0, _x2)]] [[!faccolon(_x0, !facplus(_x1, g(_x2, _x3)))]] = 2 + x1 + 2x0 >= 2 + x1 = [[!faccolon(g(_x0, _x3), !facplus(_x1, a))]] [[~AP1(_F0, _x1)]] = 3 + F0(x1) >= F0(x1) = [[_F0 _x1]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace the dependency pair problem (P_5, R_0, static, formative) by (P_6, R_0, static, formative), where P_6 consists of: !faccolon#(!faccolon(X, Y), Z) =#> !faccolon#(X, !faccolon(Y, Z)) !faccolon#(!faccolon(X, Y), Z) =#> !faccolon#(Y, Z) Thus, the original system is terminating if (P_6, R_0, static, formative) is finite. We consider the dependency pair problem (P_6, R_0, static, formative). We will use the reduction pair processor [Kop12, Thm. 7.16]. It suffices to find a standard reduction pair [Kop12, Def. 6.69]. Thus, we must orient: !faccolon#(!faccolon(X, Y), Z) >? !faccolon#(X, !faccolon(Y, Z)) !faccolon#(!faccolon(X, Y), Z) >? !faccolon#(Y, Z) !faccolon(!faccolon(X, Y), Z) >= !faccolon(X, !faccolon(Y, Z)) !faccolon(!facplus(X, Y), Z) >= !facplus(!faccolon(X, Z), !faccolon(Y, Z)) !faccolon(X, !facplus(Y, ~AP1(F, Z))) >= !faccolon(g(X, Z), !facplus(Y, a)) map(F, nil) >= nil map(F, cons(X, Y)) >= cons(F X, map(F, Y)) filter(F, nil) >= nil filter(F, cons(X, Y)) >= filter2(F X, F, X, Y) filter2(true, F, X, Y) >= cons(X, filter(F, Y)) filter2(false, F, X, Y) >= filter(F, Y) !faccolon(X, !facplus(Y, g(Z, U))) >= !faccolon(g(X, U), !facplus(Y, a)) ~AP1(F, X) >= F X We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: !faccolon = \y0y1.1 + y0 + y1 !faccolon# = \y0y1.2y0 !facplus = \y0y1.0 a = 0 cons = \y0y1.1 + y0 + 2y1 false = 3 filter = \G0y1.y1 + G0(0) + y1G0(y1) filter2 = \y0G1y2y3.1 + y2 + 2y3 + 2y3G1(y3) + 2G1(0) g = \y0y1.0 map = \G0y1.y1 + 2y1G0(y1) nil = 0 true = 3 ~AP1 = \G0y1.3 + G0(y1) Using this interpretation, the requirements translate to: [[!faccolon#(!faccolon(_x0, _x1), _x2)]] = 2 + 2x0 + 2x1 > 2x0 = [[!faccolon#(_x0, !faccolon(_x1, _x2))]] [[!faccolon#(!faccolon(_x0, _x1), _x2)]] = 2 + 2x0 + 2x1 > 2x1 = [[!faccolon#(_x1, _x2)]] [[!faccolon(!faccolon(_x0, _x1), _x2)]] = 2 + x0 + x1 + x2 >= 2 + x0 + x1 + x2 = [[!faccolon(_x0, !faccolon(_x1, _x2))]] [[!faccolon(!facplus(_x0, _x1), _x2)]] = 1 + x2 >= 0 = [[!facplus(!faccolon(_x0, _x2), !faccolon(_x1, _x2))]] [[!faccolon(_x0, !facplus(_x1, ~AP1(_F2, _x3)))]] = 1 + x0 >= 1 = [[!faccolon(g(_x0, _x3), !facplus(_x1, a))]] [[map(_F0, nil)]] = 0 >= 0 = [[nil]] [[map(_F0, cons(_x1, _x2))]] = 1 + x1 + 2x2 + 2x1F0(1 + x1 + 2x2) + 2F0(1 + x1 + 2x2) + 4x2F0(1 + x1 + 2x2) >= 1 + 2x2 + F0(x1) + 4x2F0(x2) = [[cons(_F0 _x1, map(_F0, _x2))]] [[filter(_F0, nil)]] = F0(0) >= 0 = [[nil]] [[filter(_F0, cons(_x1, _x2))]] = 1 + x1 + 2x2 + F0(0) + F0(1 + x1 + 2x2) + 2x2F0(1 + x1 + 2x2) + x1F0(1 + x1 + 2x2) >= 1 + x1 + 2x2 + 2x2F0(x2) + 2F0(0) = [[filter2(_F0 _x1, _F0, _x1, _x2)]] [[filter2(true, _F0, _x1, _x2)]] = 1 + x1 + 2x2 + 2x2F0(x2) + 2F0(0) >= 1 + x1 + 2x2 + 2x2F0(x2) + 2F0(0) = [[cons(_x1, filter(_F0, _x2))]] [[filter2(false, _F0, _x1, _x2)]] = 1 + x1 + 2x2 + 2x2F0(x2) + 2F0(0) >= x2 + F0(0) + x2F0(x2) = [[filter(_F0, _x2)]] [[!faccolon(_x0, !facplus(_x1, g(_x2, _x3)))]] = 1 + x0 >= 1 = [[!faccolon(g(_x0, _x3), !facplus(_x1, a))]] [[~AP1(_F0, _x1)]] = 3 + F0(x1) >= F0(x1) = [[_F0 _x1]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace a dependency pair problem (P_6, R_0) by ({}, R_0). 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 +++ [Kop11] C. Kop. Simplifying Algebraic Functional Systems. In Proceedings of CAI 2011, volume 6742 of LNCS. 201--215, Springer, 2011. [Kop12] C. Kop. Higher Order Termination. PhD Thesis, 2012. [Kop13] C. Kop. Static Dependency Pairs with Accessibility. Unpublished manuscript, http://cl-informatik.uibk.ac.at/users/kop/static.pdf, 2013. [KusIsoSakBla09] K. Kusakari, Y. Isogai, M. Sakai, and F. Blanqui. Static Dependency Pair Method Based On Strong Computability for Higher-Order Rewrite Systems. In volume 92(10) of IEICE Transactions on Information and Systems. 2007--2015, 2009.