We consider the system Applicative_first_order_05__08. Alphabet: !facminus : [a * a] --> a !facplus : [a * a] --> a !factimes : [a * a] --> a 0 : [] --> a 1 : [] --> a D : [a] --> a cons : [c * d] --> d constant : [] --> a false : [] --> b filter : [c -> b * d] --> d filter2 : [b * c -> b * c * d] --> d map : [c -> c * d] --> d nil : [] --> d t : [] --> a true : [] --> b Rules: D(t) => 1 D(constant) => 0 D(!facplus(x, y)) => !facplus(D(x), D(y)) D(!factimes(x, y)) => !facplus(!factimes(y, D(x)), !factimes(x, D(y))) D(!facminus(x, y)) => !facminus(D(x), D(y)) 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) 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 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] D#(!facplus(X, Y)) =#> D#(X) 1] D#(!facplus(X, Y)) =#> D#(Y) 2] D#(!factimes(X, Y)) =#> D#(X) 3] D#(!factimes(X, Y)) =#> D#(Y) 4] D#(!facminus(X, Y)) =#> D#(X) 5] D#(!facminus(X, Y)) =#> D#(Y) 6] map#(F, cons(X, Y)) =#> map#(F, Y) 7] filter#(F, cons(X, Y)) =#> filter2#(F X, F, X, Y) 8] filter2#(true, F, X, Y) =#> filter#(F, Y) 9] filter2#(false, F, X, Y) =#> filter#(F, Y) Rules R_0: D(t) => 1 D(constant) => 0 D(!facplus(X, Y)) => !facplus(D(X), D(Y)) D(!factimes(X, Y)) => !facplus(!factimes(Y, D(X)), !factimes(X, D(Y))) D(!facminus(X, Y)) => !facminus(D(X), D(Y)) 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) 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, 5 * 1 : 0, 1, 2, 3, 4, 5 * 2 : 0, 1, 2, 3, 4, 5 * 3 : 0, 1, 2, 3, 4, 5 * 4 : 0, 1, 2, 3, 4, 5 * 5 : 0, 1, 2, 3, 4, 5 * 6 : 6 * 7 : 8, 9 * 8 : 7 * 9 : 7 This graph has the following strongly connected components: P_1: D#(!facplus(X, Y)) =#> D#(X) D#(!facplus(X, Y)) =#> D#(Y) D#(!factimes(X, Y)) =#> D#(X) D#(!factimes(X, Y)) =#> D#(Y) D#(!facminus(X, Y)) =#> D#(X) D#(!facminus(X, Y)) =#> D#(Y) 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) D(t) >= 1 D(constant) >= 0 D(!facplus(X, Y)) >= !facplus(D(X), D(Y)) D(!factimes(X, Y)) >= !facplus(!factimes(Y, D(X)), !factimes(X, D(Y))) D(!facminus(X, Y)) >= !facminus(D(X), D(Y)) 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) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: !facminus = \y0y1.0 !facplus = \y0y1.0 !factimes = \y0y1.3 0 = 0 1 = 0 D = \y0.3 cons = \y0y1.2 + y1 constant = 3 false = 3 filter = \G0y1.2y1 filter2 = \y0G1y2y3.2 + 2y3 filter2# = \y0G1y2y3.1 + 2y3 filter# = \G0y1.2y1 map = \G0y1.y1 nil = 0 t = 3 true = 3 Using this interpretation, the requirements translate to: [[filter#(_F0, cons(_x1, _x2))]] = 4 + 2x2 > 1 + 2x2 = [[filter2#(_F0 _x1, _F0, _x1, _x2)]] [[filter2#(true, _F0, _x1, _x2)]] = 1 + 2x2 > 2x2 = [[filter#(_F0, _x2)]] [[filter2#(false, _F0, _x1, _x2)]] = 1 + 2x2 > 2x2 = [[filter#(_F0, _x2)]] [[D(t)]] = 3 >= 0 = [[1]] [[D(constant)]] = 3 >= 0 = [[0]] [[D(!facplus(_x0, _x1))]] = 3 >= 0 = [[!facplus(D(_x0), D(_x1))]] [[D(!factimes(_x0, _x1))]] = 3 >= 0 = [[!facplus(!factimes(_x1, D(_x0)), !factimes(_x0, D(_x1)))]] [[D(!facminus(_x0, _x1))]] = 3 >= 0 = [[!facminus(D(_x0), D(_x1))]] [[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 >= 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 >= 2x2 = [[filter(_F0, _x2)]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace a dependency pair problem (P_3, 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 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) D(t) >= 1 D(constant) >= 0 D(!facplus(X, Y)) >= !facplus(D(X), D(Y)) D(!factimes(X, Y)) >= !facplus(!factimes(Y, D(X)), !factimes(X, D(Y))) D(!facminus(X, Y)) >= !facminus(D(X), D(Y)) 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) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: !facminus = \y0y1.3 !facplus = \y0y1.0 !factimes = \y0y1.3 0 = 0 1 = 0 D = \y0.3 + 3y0 cons = \y0y1.1 + 2y1 constant = 3 false = 3 filter = \G0y1.y1 filter2 = \y0G1y2y3.1 + 2y3 map = \G0y1.1 + 3y1 map# = \G0y1.y1 nil = 0 t = 3 true = 3 Using this interpretation, the requirements translate to: [[map#(_F0, cons(_x1, _x2))]] = 1 + 2x2 > x2 = [[map#(_F0, _x2)]] [[D(t)]] = 12 >= 0 = [[1]] [[D(constant)]] = 12 >= 0 = [[0]] [[D(!facplus(_x0, _x1))]] = 3 >= 0 = [[!facplus(D(_x0), D(_x1))]] [[D(!factimes(_x0, _x1))]] = 12 >= 0 = [[!facplus(!factimes(_x1, D(_x0)), !factimes(_x0, D(_x1)))]] [[D(!facminus(_x0, _x1))]] = 12 >= 3 = [[!facminus(D(_x0), D(_x1))]] [[map(_F0, nil)]] = 1 >= 0 = [[nil]] [[map(_F0, cons(_x1, _x2))]] = 4 + 6x2 >= 3 + 6x2 = [[cons(_F0 _x1, map(_F0, _x2))]] [[filter(_F0, nil)]] = 0 >= 0 = [[nil]] [[filter(_F0, cons(_x1, _x2))]] = 1 + 2x2 >= 1 + 2x2 = [[filter2(_F0 _x1, _F0, _x1, _x2)]] [[filter2(true, _F0, _x1, _x2)]] = 1 + 2x2 >= 1 + 2x2 = [[cons(_x1, filter(_F0, _x2))]] [[filter2(false, _F0, _x1, _x2)]] = 1 + 2x2 >= x2 = [[filter(_F0, _x2)]] 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: D#(!facplus(X, Y)) >? D#(X) D#(!facplus(X, Y)) >? D#(Y) D#(!factimes(X, Y)) >? D#(X) D#(!factimes(X, Y)) >? D#(Y) D#(!facminus(X, Y)) >? D#(X) D#(!facminus(X, Y)) >? D#(Y) D(t) >= 1 D(constant) >= 0 D(!facplus(X, Y)) >= !facplus(D(X), D(Y)) D(!factimes(X, Y)) >= !facplus(!factimes(Y, D(X)), !factimes(X, D(Y))) D(!facminus(X, Y)) >= !facminus(D(X), D(Y)) 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) 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: [[0]] = _|_ [[1]] = _|_ [[filter2(x_1, x_2, x_3, x_4)]] = filter2(x_2, x_3, x_4) [[nil]] = _|_ We choose Lex = {} and Mul = {!facminus, !facplus, !factimes, @_{o -> o}, D, D#, cons, constant, false, filter, filter2, map, t, true}, and the following precedence: true > t > map > filter = filter2 > cons > @_{o -> o} > D > !facminus > constant > D# > false > !factimes > !facplus Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: D#(!facplus(X, Y)) >= D#(X) D#(!facplus(X, Y)) >= D#(Y) D#(!factimes(X, Y)) >= D#(X) D#(!factimes(X, Y)) >= D#(Y) D#(!facminus(X, Y)) > D#(X) D#(!facminus(X, Y)) >= D#(Y) D(t) >= _|_ D(constant) >= _|_ D(!facplus(X, Y)) >= !facplus(D(X), D(Y)) D(!factimes(X, Y)) >= !facplus(!factimes(Y, D(X)), !factimes(X, D(Y))) D(!facminus(X, Y)) >= !facminus(D(X), D(Y)) map(F, _|_) >= _|_ map(F, cons(X, Y)) >= cons(@_{o -> o}(F, X), map(F, Y)) filter(F, _|_) >= _|_ filter(F, cons(X, Y)) >= filter2(F, X, Y) filter2(F, X, Y) >= cons(X, filter(F, Y)) filter2(F, X, Y) >= filter(F, Y) With these choices, we have: 1] D#(!facplus(X, Y)) >= D#(X) because D# in Mul and [2], by (Fun) 2] !facplus(X, Y) >= X because [3], by (Star) 3] !facplus*(X, Y) >= X because [4], by (Select) 4] X >= X by (Meta) 5] D#(!facplus(X, Y)) >= D#(Y) because D# in Mul and [6], by (Fun) 6] !facplus(X, Y) >= Y because [7], by (Star) 7] !facplus*(X, Y) >= Y because [8], by (Select) 8] Y >= Y by (Meta) 9] D#(!factimes(X, Y)) >= D#(X) because [10], by (Star) 10] D#*(!factimes(X, Y)) >= D#(X) because D# in Mul and [11], by (Stat) 11] !factimes(X, Y) > X because [12], by definition 12] !factimes*(X, Y) >= X because [13], by (Select) 13] X >= X by (Meta) 14] D#(!factimes(X, Y)) >= D#(Y) because D# in Mul and [15], by (Fun) 15] !factimes(X, Y) >= Y because [16], by (Star) 16] !factimes*(X, Y) >= Y because [17], by (Select) 17] Y >= Y by (Meta) 18] D#(!facminus(X, Y)) > D#(X) because [19], by definition 19] D#*(!facminus(X, Y)) >= D#(X) because [20], by (Select) 20] !facminus(X, Y) >= D#(X) because [21], by (Star) 21] !facminus*(X, Y) >= D#(X) because !facminus > D# and [22], by (Copy) 22] !facminus*(X, Y) >= X because [23], by (Select) 23] X >= X by (Meta) 24] D#(!facminus(X, Y)) >= D#(Y) because D# in Mul and [25], by (Fun) 25] !facminus(X, Y) >= Y because [26], by (Star) 26] !facminus*(X, Y) >= Y because [27], by (Select) 27] Y >= Y by (Meta) 28] D(t) >= _|_ by (Bot) 29] D(constant) >= _|_ by (Bot) 30] D(!facplus(X, Y)) >= !facplus(D(X), D(Y)) because [31], by (Star) 31] D*(!facplus(X, Y)) >= !facplus(D(X), D(Y)) because D > !facplus, [32] and [35], by (Copy) 32] D*(!facplus(X, Y)) >= D(X) because D in Mul and [33], by (Stat) 33] !facplus(X, Y) > X because [34], by definition 34] !facplus*(X, Y) >= X because [4], by (Select) 35] D*(!facplus(X, Y)) >= D(Y) because D in Mul and [36], by (Stat) 36] !facplus(X, Y) > Y because [37], by definition 37] !facplus*(X, Y) >= Y because [8], by (Select) 38] D(!factimes(X, Y)) >= !facplus(!factimes(Y, D(X)), !factimes(X, D(Y))) because [39], by (Star) 39] D*(!factimes(X, Y)) >= !facplus(!factimes(Y, D(X)), !factimes(X, D(Y))) because D > !facplus, [40] and [43], by (Copy) 40] D*(!factimes(X, Y)) >= !factimes(Y, D(X)) because D > !factimes, [41] and [42], by (Copy) 41] D*(!factimes(X, Y)) >= Y because [15], by (Select) 42] D*(!factimes(X, Y)) >= D(X) because D in Mul and [11], by (Stat) 43] D*(!factimes(X, Y)) >= !factimes(X, D(Y)) because D > !factimes, [44] and [46], by (Copy) 44] D*(!factimes(X, Y)) >= X because [45], by (Select) 45] !factimes(X, Y) >= X because [12], by (Star) 46] D*(!factimes(X, Y)) >= D(Y) because D in Mul and [47], by (Stat) 47] !factimes(X, Y) > Y because [48], by definition 48] !factimes*(X, Y) >= Y because [17], by (Select) 49] D(!facminus(X, Y)) >= !facminus(D(X), D(Y)) because [50], by (Star) 50] D*(!facminus(X, Y)) >= !facminus(D(X), D(Y)) because D > !facminus, [51] and [53], by (Copy) 51] D*(!facminus(X, Y)) >= D(X) because D in Mul and [52], by (Stat) 52] !facminus(X, Y) > X because [22], by definition 53] D*(!facminus(X, Y)) >= D(Y) because D in Mul and [54], by (Stat) 54] !facminus(X, Y) > Y because [55], by definition 55] !facminus*(X, Y) >= Y because [27], by (Select) 56] map(F, _|_) >= _|_ by (Bot) 57] map(F, cons(X, Y)) >= cons(@_{o -> o}(F, X), map(F, Y)) because [58], by (Star) 58] map*(F, cons(X, Y)) >= cons(@_{o -> o}(F, X), map(F, Y)) because map > cons, [59] and [66], by (Copy) 59] map*(F, cons(X, Y)) >= @_{o -> o}(F, X) because map > @_{o -> o}, [60] and [62], by (Copy) 60] map*(F, cons(X, Y)) >= F because [61], by (Select) 61] F >= F by (Meta) 62] map*(F, cons(X, Y)) >= X because [63], by (Select) 63] cons(X, Y) >= X because [64], by (Star) 64] cons*(X, Y) >= X because [65], by (Select) 65] X >= X by (Meta) 66] map*(F, cons(X, Y)) >= map(F, Y) because map in Mul, [67] and [68], by (Stat) 67] F >= F by (Meta) 68] cons(X, Y) > Y because [69], by definition 69] cons*(X, Y) >= Y because [70], by (Select) 70] Y >= Y by (Meta) 71] filter(F, _|_) >= _|_ by (Bot) 72] filter(F, cons(X, Y)) >= filter2(F, X, Y) because [73], by (Star) 73] filter*(F, cons(X, Y)) >= filter2(F, X, Y) because filter = filter2, filter in Mul, [74], [75] and [78], by (Stat) 74] F >= F by (Meta) 75] cons(X, Y) > X because [76], by definition 76] cons*(X, Y) >= X because [77], by (Select) 77] X >= X by (Meta) 78] cons(X, Y) > Y because [79], by definition 79] cons*(X, Y) >= Y because [80], by (Select) 80] Y >= Y by (Meta) 81] filter2(F, X, Y) >= cons(X, filter(F, Y)) because [82], by (Star) 82] filter2*(F, X, Y) >= cons(X, filter(F, Y)) because filter2 > cons, [83] and [85], by (Copy) 83] filter2*(F, X, Y) >= X because [84], by (Select) 84] X >= X by (Meta) 85] filter2*(F, X, Y) >= filter(F, Y) because filter2 = filter, filter2 in Mul, [86] and [87], by (Stat) 86] F >= F by (Meta) 87] Y >= Y by (Meta) 88] filter2(F, X, Y) >= filter(F, Y) because [89], by (Star) 89] filter2*(F, X, Y) >= filter(F, Y) because filter2 = filter, filter2 in Mul, [90] and [91], by (Stat) 90] F >= F by (Meta) 91] Y >= Y 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_4, R_0, static, formative), where P_4 consists of: D#(!facplus(X, Y)) =#> D#(X) D#(!facplus(X, Y)) =#> D#(Y) D#(!factimes(X, Y)) =#> D#(X) D#(!factimes(X, Y)) =#> D#(Y) D#(!facminus(X, Y)) =#> D#(Y) Thus, the original system is terminating if (P_4, R_0, static, formative) is finite. We consider the dependency pair problem (P_4, 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: D#(!facplus(X, Y)) >? D#(X) D#(!facplus(X, Y)) >? D#(Y) D#(!factimes(X, Y)) >? D#(X) D#(!factimes(X, Y)) >? D#(Y) D#(!facminus(X, Y)) >? D#(Y) D(t) >= 1 D(constant) >= 0 D(!facplus(X, Y)) >= !facplus(D(X), D(Y)) D(!factimes(X, Y)) >= !facplus(!factimes(Y, D(X)), !factimes(X, D(Y))) D(!facminus(X, Y)) >= !facminus(D(X), D(Y)) 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) 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: [[0]] = _|_ [[1]] = _|_ [[filter2(x_1, x_2, x_3, x_4)]] = filter2(x_2, x_3, x_4) [[nil]] = _|_ We choose Lex = {} and Mul = {!facminus, !facplus, !factimes, @_{o -> o}, D, D#, cons, constant, false, filter, filter2, map, t, true}, and the following precedence: constant > false > filter = filter2 > map > @_{o -> o} > cons > !facminus = D = D# > !facplus > !factimes > t > true Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: D#(!facplus(X, Y)) >= D#(X) D#(!facplus(X, Y)) >= D#(Y) D#(!factimes(X, Y)) >= D#(X) D#(!factimes(X, Y)) > D#(Y) D#(!facminus(X, Y)) >= D#(Y) D(t) >= _|_ D(constant) >= _|_ D(!facplus(X, Y)) >= !facplus(D(X), D(Y)) D(!factimes(X, Y)) >= !facplus(!factimes(Y, D(X)), !factimes(X, D(Y))) D(!facminus(X, Y)) >= !facminus(D(X), D(Y)) map(F, _|_) >= _|_ map(F, cons(X, Y)) >= cons(@_{o -> o}(F, X), map(F, Y)) filter(F, _|_) >= _|_ filter(F, cons(X, Y)) >= filter2(F, X, Y) filter2(F, X, Y) >= cons(X, filter(F, Y)) filter2(F, X, Y) >= filter(F, Y) With these choices, we have: 1] D#(!facplus(X, Y)) >= D#(X) because [2], by (Star) 2] D#*(!facplus(X, Y)) >= D#(X) because D# in Mul and [3], by (Stat) 3] !facplus(X, Y) > X because [4], by definition 4] !facplus*(X, Y) >= X because [5], by (Select) 5] X >= X by (Meta) 6] D#(!facplus(X, Y)) >= D#(Y) because D# in Mul and [7], by (Fun) 7] !facplus(X, Y) >= Y because [8], by (Star) 8] !facplus*(X, Y) >= Y because [9], by (Select) 9] Y >= Y by (Meta) 10] D#(!factimes(X, Y)) >= D#(X) because D# in Mul and [11], by (Fun) 11] !factimes(X, Y) >= X because [12], by (Star) 12] !factimes*(X, Y) >= X because [13], by (Select) 13] X >= X by (Meta) 14] D#(!factimes(X, Y)) > D#(Y) because [15], by definition 15] D#*(!factimes(X, Y)) >= D#(Y) because D# in Mul and [16], by (Stat) 16] !factimes(X, Y) > Y because [17], by definition 17] !factimes*(X, Y) >= Y because [18], by (Select) 18] Y >= Y by (Meta) 19] D#(!facminus(X, Y)) >= D#(Y) because [20], by (Star) 20] D#*(!facminus(X, Y)) >= D#(Y) because [21], by (Select) 21] !facminus(X, Y) >= D#(Y) because [22], by (Star) 22] !facminus*(X, Y) >= D#(Y) because !facminus = D#, !facminus in Mul and [23], by (Stat) 23] Y >= Y by (Meta) 24] D(t) >= _|_ by (Bot) 25] D(constant) >= _|_ by (Bot) 26] D(!facplus(X, Y)) >= !facplus(D(X), D(Y)) because [27], by (Star) 27] D*(!facplus(X, Y)) >= !facplus(D(X), D(Y)) because D > !facplus, [28] and [29], by (Copy) 28] D*(!facplus(X, Y)) >= D(X) because D in Mul and [3], by (Stat) 29] D*(!facplus(X, Y)) >= D(Y) because D in Mul and [30], by (Stat) 30] !facplus(X, Y) > Y because [31], by definition 31] !facplus*(X, Y) >= Y because [9], by (Select) 32] D(!factimes(X, Y)) >= !facplus(!factimes(Y, D(X)), !factimes(X, D(Y))) because [33], by (Star) 33] D*(!factimes(X, Y)) >= !facplus(!factimes(Y, D(X)), !factimes(X, D(Y))) because D > !facplus, [34] and [40], by (Copy) 34] D*(!factimes(X, Y)) >= !factimes(Y, D(X)) because D > !factimes, [35] and [37], by (Copy) 35] D*(!factimes(X, Y)) >= Y because [36], by (Select) 36] !factimes(X, Y) >= Y because [17], by (Star) 37] D*(!factimes(X, Y)) >= D(X) because D in Mul and [38], by (Stat) 38] !factimes(X, Y) > X because [39], by definition 39] !factimes*(X, Y) >= X because [13], by (Select) 40] D*(!factimes(X, Y)) >= !factimes(X, D(Y)) because D > !factimes, [41] and [42], by (Copy) 41] D*(!factimes(X, Y)) >= X because [11], by (Select) 42] D*(!factimes(X, Y)) >= D(Y) because D in Mul and [16], by (Stat) 43] D(!facminus(X, Y)) >= !facminus(D(X), D(Y)) because [44], by (Star) 44] D*(!facminus(X, Y)) >= !facminus(D(X), D(Y)) because D = !facminus, D in Mul, [45] and [48], by (Stat) 45] !facminus(X, Y) > D(X) because [46], by definition 46] !facminus*(X, Y) >= D(X) because !facminus = D, !facminus in Mul and [47], by (Stat) 47] X >= X by (Meta) 48] !facminus(X, Y) > D(Y) because [49], by definition 49] !facminus*(X, Y) >= D(Y) because !facminus = D, !facminus in Mul and [23], by (Stat) 50] map(F, _|_) >= _|_ by (Bot) 51] map(F, cons(X, Y)) >= cons(@_{o -> o}(F, X), map(F, Y)) because [52], by (Star) 52] map*(F, cons(X, Y)) >= cons(@_{o -> o}(F, X), map(F, Y)) because map > cons, [53] and [60], by (Copy) 53] map*(F, cons(X, Y)) >= @_{o -> o}(F, X) because map > @_{o -> o}, [54] and [56], by (Copy) 54] map*(F, cons(X, Y)) >= F because [55], by (Select) 55] F >= F by (Meta) 56] map*(F, cons(X, Y)) >= X because [57], by (Select) 57] cons(X, Y) >= X because [58], by (Star) 58] cons*(X, Y) >= X because [59], by (Select) 59] X >= X by (Meta) 60] map*(F, cons(X, Y)) >= map(F, Y) because map in Mul, [61] and [62], by (Stat) 61] F >= F by (Meta) 62] cons(X, Y) > Y because [63], by definition 63] cons*(X, Y) >= Y because [64], by (Select) 64] Y >= Y by (Meta) 65] filter(F, _|_) >= _|_ by (Bot) 66] filter(F, cons(X, Y)) >= filter2(F, X, Y) because [67], by (Star) 67] filter*(F, cons(X, Y)) >= filter2(F, X, Y) because filter = filter2, filter in Mul, [68], [69] and [72], by (Stat) 68] F >= F by (Meta) 69] cons(X, Y) > X because [70], by definition 70] cons*(X, Y) >= X because [71], by (Select) 71] X >= X by (Meta) 72] cons(X, Y) > Y because [73], by definition 73] cons*(X, Y) >= Y because [74], by (Select) 74] Y >= Y by (Meta) 75] filter2(F, X, Y) >= cons(X, filter(F, Y)) because [76], by (Star) 76] filter2*(F, X, Y) >= cons(X, filter(F, Y)) because filter2 > cons, [77] and [79], by (Copy) 77] filter2*(F, X, Y) >= X because [78], by (Select) 78] X >= X by (Meta) 79] filter2*(F, X, Y) >= filter(F, Y) because filter2 = filter, filter2 in Mul, [80] and [81], by (Stat) 80] F >= F by (Meta) 81] Y >= Y by (Meta) 82] filter2(F, X, Y) >= filter(F, Y) because [83], by (Star) 83] filter2*(F, X, Y) >= filter(F, Y) because filter2 = filter, filter2 in Mul, [84] and [85], by (Stat) 84] F >= F by (Meta) 85] Y >= Y by (Meta) By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace the dependency pair problem (P_4, R_0, static, formative) by (P_5, R_0, static, formative), where P_5 consists of: D#(!facplus(X, Y)) =#> D#(X) D#(!facplus(X, Y)) =#> D#(Y) D#(!factimes(X, Y)) =#> D#(X) D#(!facminus(X, Y)) =#> D#(Y) 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: D#(!facplus(X, Y)) >? D#(X) D#(!facplus(X, Y)) >? D#(Y) D#(!factimes(X, Y)) >? D#(X) D#(!facminus(X, Y)) >? D#(Y) D(t) >= 1 D(constant) >= 0 D(!facplus(X, Y)) >= !facplus(D(X), D(Y)) D(!factimes(X, Y)) >= !facplus(!factimes(Y, D(X)), !factimes(X, D(Y))) D(!facminus(X, Y)) >= !facminus(D(X), D(Y)) 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) 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: [[0]] = _|_ [[1]] = _|_ [[filter2(x_1, x_2, x_3, x_4)]] = filter2(x_2, x_4, x_1, x_3) [[nil]] = _|_ We choose Lex = {filter, filter2} and Mul = {!facminus, !facplus, !factimes, @_{o -> o}, D, D#, cons, constant, false, map, t, true}, and the following precedence: D > !facplus > filter = filter2 > constant > !factimes > false > map > D# > @_{o -> o} > cons > !facminus > t > true Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: D#(!facplus(X, Y)) >= D#(X) D#(!facplus(X, Y)) >= D#(Y) D#(!factimes(X, Y)) > D#(X) D#(!facminus(X, Y)) >= D#(Y) D(t) >= _|_ D(constant) >= _|_ D(!facplus(X, Y)) >= !facplus(D(X), D(Y)) D(!factimes(X, Y)) >= !facplus(!factimes(Y, D(X)), !factimes(X, D(Y))) D(!facminus(X, Y)) >= !facminus(D(X), D(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) With these choices, we have: 1] D#(!facplus(X, Y)) >= D#(X) because [2], by (Star) 2] D#*(!facplus(X, Y)) >= D#(X) because D# in Mul and [3], by (Stat) 3] !facplus(X, Y) > X because [4], by definition 4] !facplus*(X, Y) >= X because [5], by (Select) 5] X >= X by (Meta) 6] D#(!facplus(X, Y)) >= D#(Y) because [7], by (Star) 7] D#*(!facplus(X, Y)) >= D#(Y) because [8], by (Select) 8] !facplus(X, Y) >= D#(Y) because [9], by (Star) 9] !facplus*(X, Y) >= D#(Y) because !facplus > D# and [10], by (Copy) 10] !facplus*(X, Y) >= Y because [11], by (Select) 11] Y >= Y by (Meta) 12] D#(!factimes(X, Y)) > D#(X) because [13], by definition 13] D#*(!factimes(X, Y)) >= D#(X) because [14], by (Select) 14] !factimes(X, Y) >= D#(X) because [15], by (Star) 15] !factimes*(X, Y) >= D#(X) because !factimes > D# and [16], by (Copy) 16] !factimes*(X, Y) >= X because [17], by (Select) 17] X >= X by (Meta) 18] D#(!facminus(X, Y)) >= D#(Y) because D# in Mul and [19], by (Fun) 19] !facminus(X, Y) >= Y because [20], by (Star) 20] !facminus*(X, Y) >= Y because [21], by (Select) 21] Y >= Y by (Meta) 22] D(t) >= _|_ by (Bot) 23] D(constant) >= _|_ by (Bot) 24] D(!facplus(X, Y)) >= !facplus(D(X), D(Y)) because [25], by (Star) 25] D*(!facplus(X, Y)) >= !facplus(D(X), D(Y)) because D > !facplus, [26] and [27], by (Copy) 26] D*(!facplus(X, Y)) >= D(X) because D in Mul and [3], by (Stat) 27] D*(!facplus(X, Y)) >= D(Y) because D in Mul and [28], by (Stat) 28] !facplus(X, Y) > Y because [10], by definition 29] D(!factimes(X, Y)) >= !facplus(!factimes(Y, D(X)), !factimes(X, D(Y))) because [30], by (Star) 30] D*(!factimes(X, Y)) >= !facplus(!factimes(Y, D(X)), !factimes(X, D(Y))) because D > !facplus, [31] and [38], by (Copy) 31] D*(!factimes(X, Y)) >= !factimes(Y, D(X)) because D > !factimes, [32] and [36], by (Copy) 32] D*(!factimes(X, Y)) >= Y because [33], by (Select) 33] !factimes(X, Y) >= Y because [34], by (Star) 34] !factimes*(X, Y) >= Y because [35], by (Select) 35] Y >= Y by (Meta) 36] D*(!factimes(X, Y)) >= D(X) because D in Mul and [37], by (Stat) 37] !factimes(X, Y) > X because [16], by definition 38] D*(!factimes(X, Y)) >= !factimes(X, D(Y)) because D > !factimes, [39] and [41], by (Copy) 39] D*(!factimes(X, Y)) >= X because [40], by (Select) 40] !factimes(X, Y) >= X because [16], by (Star) 41] D*(!factimes(X, Y)) >= D(Y) because D in Mul and [42], by (Stat) 42] !factimes(X, Y) > Y because [43], by definition 43] !factimes*(X, Y) >= Y because [35], by (Select) 44] D(!facminus(X, Y)) >= !facminus(D(X), D(Y)) because [45], by (Star) 45] D*(!facminus(X, Y)) >= !facminus(D(X), D(Y)) because D > !facminus, [46] and [50], by (Copy) 46] D*(!facminus(X, Y)) >= D(X) because D in Mul and [47], by (Stat) 47] !facminus(X, Y) > X because [48], by definition 48] !facminus*(X, Y) >= X because [49], by (Select) 49] X >= X by (Meta) 50] D*(!facminus(X, Y)) >= D(Y) because D in Mul and [51], by (Stat) 51] !facminus(X, Y) > Y because [52], by definition 52] !facminus*(X, Y) >= Y because [21], by (Select) 53] map(F, _|_) >= _|_ by (Bot) 54] map(F, cons(X, Y)) >= cons(@_{o -> o}(F, X), map(F, Y)) because [55], by (Star) 55] map*(F, cons(X, Y)) >= cons(@_{o -> o}(F, X), map(F, Y)) because map > cons, [56] and [63], by (Copy) 56] map*(F, cons(X, Y)) >= @_{o -> o}(F, X) because map > @_{o -> o}, [57] and [59], by (Copy) 57] map*(F, cons(X, Y)) >= F because [58], by (Select) 58] F >= F by (Meta) 59] map*(F, cons(X, Y)) >= X because [60], by (Select) 60] cons(X, Y) >= X because [61], by (Star) 61] cons*(X, Y) >= X because [62], by (Select) 62] X >= X by (Meta) 63] map*(F, cons(X, Y)) >= map(F, Y) because map in Mul, [64] and [65], by (Stat) 64] F >= F by (Meta) 65] cons(X, Y) > Y because [66], by definition 66] cons*(X, Y) >= Y because [67], by (Select) 67] Y >= Y by (Meta) 68] filter(F, _|_) >= _|_ by (Bot) 69] filter(F, cons(X, Y)) >= filter2(@_{o -> o}(F, X), F, X, Y) because [70], by (Star) 70] filter*(F, cons(X, Y)) >= filter2(@_{o -> o}(F, X), F, X, Y) because filter = filter2, [71], [72], [75], [76], [77] and [81], by (Stat) 71] F >= F by (Meta) 72] cons(X, Y) > Y because [73], by definition 73] cons*(X, Y) >= Y because [74], by (Select) 74] Y >= Y by (Meta) 75] filter*(F, cons(X, Y)) >= @_{o -> o}(F, X) because filter > @_{o -> o}, [76] and [77], by (Copy) 76] filter*(F, cons(X, Y)) >= F because [71], by (Select) 77] filter*(F, cons(X, Y)) >= X because [78], by (Select) 78] cons(X, Y) >= X because [79], by (Star) 79] cons*(X, Y) >= X because [80], by (Select) 80] X >= X by (Meta) 81] filter*(F, cons(X, Y)) >= Y because [82], by (Select) 82] cons(X, Y) >= Y because [73], by (Star) 83] filter2(true, F, X, Y) >= cons(X, filter(F, Y)) because [84], by (Star) 84] filter2*(true, F, X, Y) >= cons(X, filter(F, Y)) because filter2 > cons, [85] and [87], by (Copy) 85] filter2*(true, F, X, Y) >= X because [86], by (Select) 86] X >= X by (Meta) 87] filter2*(true, F, X, Y) >= filter(F, Y) because filter2 = filter, [88], [89], [90] and [91], by (Stat) 88] F >= F by (Meta) 89] Y >= Y by (Meta) 90] filter2*(true, F, X, Y) >= F because [88], by (Select) 91] filter2*(true, F, X, Y) >= Y because [89], by (Select) 92] filter2(false, F, X, Y) >= filter(F, Y) because [93], by (Star) 93] filter2*(false, F, X, Y) >= filter(F, Y) because filter2 = filter, [94], [95], [96] and [97], by (Stat) 94] F >= F by (Meta) 95] Y >= Y by (Meta) 96] filter2*(false, F, X, Y) >= F because [94], by (Select) 97] filter2*(false, F, X, Y) >= Y because [95], by (Select) 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: D#(!facplus(X, Y)) =#> D#(X) D#(!facplus(X, Y)) =#> D#(Y) D#(!facminus(X, Y)) =#> D#(Y) 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: D#(!facplus(X, Y)) >? D#(X) D#(!facplus(X, Y)) >? D#(Y) D#(!facminus(X, Y)) >? D#(Y) D(t) >= 1 D(constant) >= 0 D(!facplus(X, Y)) >= !facplus(D(X), D(Y)) D(!factimes(X, Y)) >= !facplus(!factimes(Y, D(X)), !factimes(X, D(Y))) D(!facminus(X, Y)) >= !facminus(D(X), D(Y)) 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) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: !facminus = \y0y1.3 + y1 !facplus = \y0y1.3 + y0 + y1 !factimes = \y0y1.3 0 = 0 1 = 0 D = \y0.3y0 D# = \y0.2y0 cons = \y0y1.y1 constant = 3 false = 3 filter = \G0y1.0 filter2 = \y0G1y2y3.0 map = \G0y1.0 nil = 0 t = 3 true = 3 Using this interpretation, the requirements translate to: [[D#(!facplus(_x0, _x1))]] = 6 + 2x0 + 2x1 > 2x0 = [[D#(_x0)]] [[D#(!facplus(_x0, _x1))]] = 6 + 2x0 + 2x1 > 2x1 = [[D#(_x1)]] [[D#(!facminus(_x0, _x1))]] = 6 + 2x1 > 2x1 = [[D#(_x1)]] [[D(t)]] = 9 >= 0 = [[1]] [[D(constant)]] = 9 >= 0 = [[0]] [[D(!facplus(_x0, _x1))]] = 9 + 3x0 + 3x1 >= 3 + 3x0 + 3x1 = [[!facplus(D(_x0), D(_x1))]] [[D(!factimes(_x0, _x1))]] = 9 >= 9 = [[!facplus(!factimes(_x1, D(_x0)), !factimes(_x0, D(_x1)))]] [[D(!facminus(_x0, _x1))]] = 9 + 3x1 >= 3 + 3x1 = [[!facminus(D(_x0), D(_x1))]] [[map(_F0, nil)]] = 0 >= 0 = [[nil]] [[map(_F0, cons(_x1, _x2))]] = 0 >= 0 = [[cons(_F0 _x1, map(_F0, _x2))]] [[filter(_F0, nil)]] = 0 >= 0 = [[nil]] [[filter(_F0, cons(_x1, _x2))]] = 0 >= 0 = [[filter2(_F0 _x1, _F0, _x1, _x2)]] [[filter2(true, _F0, _x1, _x2)]] = 0 >= 0 = [[cons(_x1, filter(_F0, _x2))]] [[filter2(false, _F0, _x1, _x2)]] = 0 >= 0 = [[filter(_F0, _x2)]] 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 +++ [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.