We consider the system Applicative_first_order_05__12. Alphabet: and : [a * a] --> a cons : [c * d] --> d false : [] --> b filter : [c -> b * d] --> d filter2 : [b * c -> b * c * d] --> d map : [c -> c * d] --> d nil : [] --> d not : [a] --> a or : [a * a] --> a true : [] --> b Rules: not(not(x)) => x not(or(x, y)) => and(not(x), not(y)) not(and(x, y)) => or(not(x), not(y)) and(x, or(y, z)) => or(and(x, y), and(x, z)) and(or(x, y), z) => or(and(z, x), and(z, 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] not#(or(X, Y)) =#> and#(not(X), not(Y)) 1] not#(or(X, Y)) =#> not#(X) 2] not#(or(X, Y)) =#> not#(Y) 3] not#(and(X, Y)) =#> not#(X) 4] not#(and(X, Y)) =#> not#(Y) 5] and#(X, or(Y, Z)) =#> and#(X, Y) 6] and#(X, or(Y, Z)) =#> and#(X, Z) 7] and#(or(X, Y), Z) =#> and#(Z, X) 8] and#(or(X, Y), Z) =#> and#(Z, Y) 9] map#(F, cons(X, Y)) =#> map#(F, Y) 10] filter#(F, cons(X, Y)) =#> filter2#(F X, F, X, Y) 11] filter2#(true, F, X, Y) =#> filter#(F, Y) 12] filter2#(false, F, X, Y) =#> filter#(F, Y) Rules R_0: not(not(X)) => X not(or(X, Y)) => and(not(X), not(Y)) not(and(X, Y)) => or(not(X), not(Y)) and(X, or(Y, Z)) => or(and(X, Y), and(X, Z)) and(or(X, Y), Z) => or(and(Z, X), and(Z, 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 : 5, 6, 7, 8 * 1 : 0, 1, 2, 3, 4 * 2 : 0, 1, 2, 3, 4 * 3 : 0, 1, 2, 3, 4 * 4 : 0, 1, 2, 3, 4 * 5 : 5, 6, 7, 8 * 6 : 5, 6, 7, 8 * 7 : 5, 6, 7, 8 * 8 : 5, 6, 7, 8 * 9 : 9 * 10 : 11, 12 * 11 : 10 * 12 : 10 This graph has the following strongly connected components: P_1: not#(or(X, Y)) =#> not#(X) not#(or(X, Y)) =#> not#(Y) not#(and(X, Y)) =#> not#(X) not#(and(X, Y)) =#> not#(Y) P_2: and#(X, or(Y, Z)) =#> and#(X, Y) and#(X, or(Y, Z)) =#> and#(X, Z) and#(or(X, Y), Z) =#> and#(Z, X) and#(or(X, Y), Z) =#> and#(Z, Y) P_3: map#(F, cons(X, Y)) =#> map#(F, Y) P_4: 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), (P_3, R_0, m, f) and (P_4, 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), (P_3, 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 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) not(not(X)) >= X not(or(X, Y)) >= and(not(X), not(Y)) not(and(X, Y)) >= or(not(X), not(Y)) and(X, or(Y, Z)) >= or(and(X, Y), and(X, Z)) and(or(X, Y), Z) >= or(and(Z, X), and(Z, 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: and = \y0y1.0 cons = \y0y1.1 + y1 false = 3 filter = \G0y1.2y1 filter2 = \y0G1y2y3.1 + 2y3 filter2# = \y0G1y2y3.y3 filter# = \G0y1.y1 map = \G0y1.y1 nil = 0 not = \y0.2 + y0 or = \y0y1.0 true = 3 Using this interpretation, the requirements translate to: [[filter#(_F0, cons(_x1, _x2))]] = 1 + x2 > x2 = [[filter2#(_F0 _x1, _F0, _x1, _x2)]] [[filter2#(true, _F0, _x1, _x2)]] = x2 >= x2 = [[filter#(_F0, _x2)]] [[filter2#(false, _F0, _x1, _x2)]] = x2 >= x2 = [[filter#(_F0, _x2)]] [[not(not(_x0))]] = 4 + x0 >= x0 = [[_x0]] [[not(or(_x0, _x1))]] = 2 >= 0 = [[and(not(_x0), not(_x1))]] [[not(and(_x0, _x1))]] = 2 >= 0 = [[or(not(_x0), not(_x1))]] [[and(_x0, or(_x1, _x2))]] = 0 >= 0 = [[or(and(_x0, _x1), and(_x0, _x2))]] [[and(or(_x0, _x1), _x2)]] = 0 >= 0 = [[or(and(_x2, _x0), and(_x2, _x1))]] [[map(_F0, nil)]] = 0 >= 0 = [[nil]] [[map(_F0, cons(_x1, _x2))]] = 1 + x2 >= 1 + x2 = [[cons(_F0 _x1, map(_F0, _x2))]] [[filter(_F0, nil)]] = 0 >= 0 = [[nil]] [[filter(_F0, cons(_x1, _x2))]] = 2 + 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 >= 2x2 = [[filter(_F0, _x2)]] 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: 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), (P_3, R_0, static, formative) and (P_5, R_0, static, formative) is finite. We consider the dependency pair problem (P_5, 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), (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: map#(F, cons(X, Y)) >? map#(F, Y) not(not(X)) >= X not(or(X, Y)) >= and(not(X), not(Y)) not(and(X, Y)) >= or(not(X), not(Y)) and(X, or(Y, Z)) >= or(and(X, Y), and(X, Z)) and(or(X, Y), Z) >= or(and(Z, X), and(Z, 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: and = \y0y1.2 cons = \y0y1.1 + y1 false = 3 filter = \G0y1.2y1 filter2 = \y0G1y2y3.1 + 2y3 map = \G0y1.y1 map# = \G0y1.y1 nil = 0 not = \y0.2 + y0 or = \y0y1.0 true = 3 Using this interpretation, the requirements translate to: [[map#(_F0, cons(_x1, _x2))]] = 1 + x2 > x2 = [[map#(_F0, _x2)]] [[not(not(_x0))]] = 4 + x0 >= x0 = [[_x0]] [[not(or(_x0, _x1))]] = 2 >= 2 = [[and(not(_x0), not(_x1))]] [[not(and(_x0, _x1))]] = 4 >= 0 = [[or(not(_x0), not(_x1))]] [[and(_x0, or(_x1, _x2))]] = 2 >= 0 = [[or(and(_x0, _x1), and(_x0, _x2))]] [[and(or(_x0, _x1), _x2)]] = 2 >= 0 = [[or(and(_x2, _x0), and(_x2, _x1))]] [[map(_F0, nil)]] = 0 >= 0 = [[nil]] [[map(_F0, cons(_x1, _x2))]] = 1 + x2 >= 1 + x2 = [[cons(_F0 _x1, map(_F0, _x2))]] [[filter(_F0, nil)]] = 0 >= 0 = [[nil]] [[filter(_F0, cons(_x1, _x2))]] = 2 + 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 >= 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: and#(X, or(Y, Z)) >? and#(X, Y) and#(X, or(Y, Z)) >? and#(X, Z) and#(or(X, Y), Z) >? and#(Z, X) and#(or(X, Y), Z) >? and#(Z, Y) not(not(X)) >= X not(or(X, Y)) >= and(not(X), not(Y)) not(and(X, Y)) >= or(not(X), not(Y)) and(X, or(Y, Z)) >= or(and(X, Y), and(X, Z)) and(or(X, Y), Z) >= or(and(Z, X), and(Z, 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: [[cons(x_1, x_2)]] = x_2 [[filter2(x_1, x_2, x_3, x_4)]] = filter2(x_2, x_4) [[nil]] = _|_ We choose Lex = {} and Mul = {@_{o -> o}, and, and#, false, filter, filter2, map, not, or, true}, and the following precedence: @_{o -> o} > and# > false > not > filter = filter2 > map > and > or > true Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: and#(X, or(Y, Z)) >= and#(X, Y) and#(X, or(Y, Z)) >= and#(X, Z) and#(or(X, Y), Z) >= and#(Z, X) and#(or(X, Y), Z) > and#(Z, Y) not(not(X)) >= X not(or(X, Y)) >= and(not(X), not(Y)) not(and(X, Y)) >= or(not(X), not(Y)) and(X, or(Y, Z)) >= or(and(X, Y), and(X, Z)) and(or(X, Y), Z) >= or(and(Z, X), and(Z, Y)) map(F, _|_) >= _|_ map(F, X) >= map(F, X) filter(F, _|_) >= _|_ filter(F, X) >= filter2(F, X) filter2(F, X) >= filter(F, X) filter2(F, X) >= filter(F, X) With these choices, we have: 1] and#(X, or(Y, Z)) >= and#(X, Y) because [2], by (Star) 2] and#*(X, or(Y, Z)) >= and#(X, Y) because and# in Mul, [3] and [4], by (Stat) 3] X >= X by (Meta) 4] or(Y, Z) > Y because [5], by definition 5] or*(Y, Z) >= Y because [6], by (Select) 6] Y >= Y by (Meta) 7] and#(X, or(Y, Z)) >= and#(X, Z) because and# in Mul, [3] and [8], by (Fun) 8] or(Y, Z) >= Z because [9], by (Star) 9] or*(Y, Z) >= Z because [10], by (Select) 10] Z >= Z by (Meta) 11] and#(or(X, Y), Z) >= and#(Z, X) because and# in Mul, [12] and [15], by (Fun) 12] or(X, Y) >= X because [13], by (Star) 13] or*(X, Y) >= X because [14], by (Select) 14] X >= X by (Meta) 15] Z >= Z by (Meta) 16] and#(or(X, Y), Z) > and#(Z, Y) because [17], by definition 17] and#*(or(X, Y), Z) >= and#(Z, Y) because and# in Mul, [18] and [15], by (Stat) 18] or(X, Y) > Y because [19], by definition 19] or*(X, Y) >= Y because [20], by (Select) 20] Y >= Y by (Meta) 21] not(not(X)) >= X because [22], by (Star) 22] not*(not(X)) >= X because [23], by (Select) 23] not(X) >= X because [24], by (Star) 24] not*(X) >= X because [25], by (Select) 25] X >= X by (Meta) 26] not(or(X, Y)) >= and(not(X), not(Y)) because [27], by (Star) 27] not*(or(X, Y)) >= and(not(X), not(Y)) because not > and, [28] and [32], by (Copy) 28] not*(or(X, Y)) >= not(X) because not in Mul and [29], by (Stat) 29] or(X, Y) > X because [30], by definition 30] or*(X, Y) >= X because [31], by (Select) 31] X >= X by (Meta) 32] not*(or(X, Y)) >= not(Y) because not in Mul and [33], by (Stat) 33] or(X, Y) > Y because [34], by definition 34] or*(X, Y) >= Y because [35], by (Select) 35] Y >= Y by (Meta) 36] not(and(X, Y)) >= or(not(X), not(Y)) because [37], by (Star) 37] not*(and(X, Y)) >= or(not(X), not(Y)) because not > or, [38] and [42], by (Copy) 38] not*(and(X, Y)) >= not(X) because not in Mul and [39], by (Stat) 39] and(X, Y) > X because [40], by definition 40] and*(X, Y) >= X because [41], by (Select) 41] X >= X by (Meta) 42] not*(and(X, Y)) >= not(Y) because not in Mul and [43], by (Stat) 43] and(X, Y) > Y because [44], by definition 44] and*(X, Y) >= Y because [45], by (Select) 45] Y >= Y by (Meta) 46] and(X, or(Y, Z)) >= or(and(X, Y), and(X, Z)) because [47], by (Star) 47] and*(X, or(Y, Z)) >= or(and(X, Y), and(X, Z)) because and > or, [48] and [49], by (Copy) 48] and*(X, or(Y, Z)) >= and(X, Y) because and in Mul, [3] and [4], by (Stat) 49] and*(X, or(Y, Z)) >= and(X, Z) because and in Mul, [3] and [50], by (Stat) 50] or(Y, Z) > Z because [51], by definition 51] or*(Y, Z) >= Z because [10], by (Select) 52] and(or(X, Y), Z) >= or(and(Z, X), and(Z, Y)) because [53], by (Star) 53] and*(or(X, Y), Z) >= or(and(Z, X), and(Z, Y)) because and > or, [54] and [57], by (Copy) 54] and*(or(X, Y), Z) >= and(Z, X) because and in Mul, [55] and [15], by (Stat) 55] or(X, Y) > X because [56], by definition 56] or*(X, Y) >= X because [14], by (Select) 57] and*(or(X, Y), Z) >= and(Z, Y) because and in Mul, [18] and [15], by (Stat) 58] map(F, _|_) >= _|_ by (Bot) 59] map(F, X) >= map(F, X) because map in Mul, [60] and [61], by (Fun) 60] F >= F by (Meta) 61] X >= X by (Meta) 62] filter(F, _|_) >= _|_ by (Bot) 63] filter(F, X) >= filter2(F, X) because filter = filter2, filter in Mul, [64] and [65], by (Fun) 64] F >= F by (Meta) 65] X >= X by (Meta) 66] filter2(F, X) >= filter(F, X) because filter2 = filter, filter2 in Mul, [67] and [68], by (Fun) 67] F >= F by (Meta) 68] X >= X by (Meta) 69] filter2(F, X) >= filter(F, X) because filter2 = filter, filter2 in Mul, [70] and [71], by (Fun) 70] F >= F by (Meta) 71] 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_2, R_0, static, formative) by (P_6, R_0, static, formative), where P_6 consists of: and#(X, or(Y, Z)) =#> and#(X, Y) and#(X, or(Y, Z)) =#> and#(X, Z) and#(or(X, Y), Z) =#> and#(Z, X) Thus, the original system is terminating if each of (P_1, R_0, static, formative) and (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: and#(X, or(Y, Z)) >? and#(X, Y) and#(X, or(Y, Z)) >? and#(X, Z) and#(or(X, Y), Z) >? and#(Z, X) not(not(X)) >= X not(or(X, Y)) >= and(not(X), not(Y)) not(and(X, Y)) >= or(not(X), not(Y)) and(X, or(Y, Z)) >= or(and(X, Y), and(X, Z)) and(or(X, Y), Z) >= or(and(Z, X), and(Z, 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: [[cons(x_1, x_2)]] = _|_ [[filter(x_1, x_2)]] = _|_ [[filter2(x_1, x_2, x_3, x_4)]] = _|_ [[map(x_1, x_2)]] = map [[nil]] = _|_ We choose Lex = {} and Mul = {@_{o -> o}, and, and#, false, map, not, or, true}, and the following precedence: @_{o -> o} > and# > false > map > not > and > or > true Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: and#(X, or(Y, Z)) > and#(X, Y) and#(X, or(Y, Z)) >= and#(X, Z) and#(or(X, Y), Z) >= and#(Z, X) not(not(X)) >= X not(or(X, Y)) >= and(not(X), not(Y)) not(and(X, Y)) >= or(not(X), not(Y)) and(X, or(Y, Z)) >= or(and(X, Y), and(X, Z)) and(or(X, Y), Z) >= or(and(Z, X), and(Z, Y)) map >= _|_ map >= _|_ _|_ >= _|_ _|_ >= _|_ _|_ >= _|_ _|_ >= _|_ With these choices, we have: 1] and#(X, or(Y, Z)) > and#(X, Y) because [2], by definition 2] and#*(X, or(Y, Z)) >= and#(X, Y) because and# in Mul, [3] and [4], by (Stat) 3] X >= X by (Meta) 4] or(Y, Z) > Y because [5], by definition 5] or*(Y, Z) >= Y because [6], by (Select) 6] Y >= Y by (Meta) 7] and#(X, or(Y, Z)) >= and#(X, Z) because [8], by (Star) 8] and#*(X, or(Y, Z)) >= and#(X, Z) because and# in Mul, [3] and [9], by (Stat) 9] or(Y, Z) > Z because [10], by definition 10] or*(Y, Z) >= Z because [11], by (Select) 11] Z >= Z by (Meta) 12] and#(or(X, Y), Z) >= and#(Z, X) because and# in Mul, [13] and [16], by (Fun) 13] or(X, Y) >= X because [14], by (Star) 14] or*(X, Y) >= X because [15], by (Select) 15] X >= X by (Meta) 16] Z >= Z by (Meta) 17] not(not(X)) >= X because [18], by (Star) 18] not*(not(X)) >= X because [19], by (Select) 19] not(X) >= X because [20], by (Star) 20] not*(X) >= X because [21], by (Select) 21] X >= X by (Meta) 22] not(or(X, Y)) >= and(not(X), not(Y)) because [23], by (Star) 23] not*(or(X, Y)) >= and(not(X), not(Y)) because not > and, [24] and [28], by (Copy) 24] not*(or(X, Y)) >= not(X) because not in Mul and [25], by (Stat) 25] or(X, Y) > X because [26], by definition 26] or*(X, Y) >= X because [27], by (Select) 27] X >= X by (Meta) 28] not*(or(X, Y)) >= not(Y) because not in Mul and [29], by (Stat) 29] or(X, Y) > Y because [30], by definition 30] or*(X, Y) >= Y because [31], by (Select) 31] Y >= Y by (Meta) 32] not(and(X, Y)) >= or(not(X), not(Y)) because [33], by (Star) 33] not*(and(X, Y)) >= or(not(X), not(Y)) because not > or, [34] and [38], by (Copy) 34] not*(and(X, Y)) >= not(X) because not in Mul and [35], by (Stat) 35] and(X, Y) > X because [36], by definition 36] and*(X, Y) >= X because [37], by (Select) 37] X >= X by (Meta) 38] not*(and(X, Y)) >= not(Y) because not in Mul and [39], by (Stat) 39] and(X, Y) > Y because [40], by definition 40] and*(X, Y) >= Y because [41], by (Select) 41] Y >= Y by (Meta) 42] and(X, or(Y, Z)) >= or(and(X, Y), and(X, Z)) because [43], by (Star) 43] and*(X, or(Y, Z)) >= or(and(X, Y), and(X, Z)) because and > or, [44] and [45], by (Copy) 44] and*(X, or(Y, Z)) >= and(X, Y) because and in Mul, [3] and [4], by (Stat) 45] and*(X, or(Y, Z)) >= and(X, Z) because and in Mul, [3] and [9], by (Stat) 46] and(or(X, Y), Z) >= or(and(Z, X), and(Z, Y)) because [47], by (Star) 47] and*(or(X, Y), Z) >= or(and(Z, X), and(Z, Y)) because and > or, [48] and [51], by (Copy) 48] and*(or(X, Y), Z) >= and(Z, X) because and in Mul, [49] and [16], by (Stat) 49] or(X, Y) > X because [50], by definition 50] or*(X, Y) >= X because [15], by (Select) 51] and*(or(X, Y), Z) >= and(Z, Y) because and in Mul, [52] and [16], by (Stat) 52] or(X, Y) > Y because [53], by definition 53] or*(X, Y) >= Y because [54], by (Select) 54] Y >= Y by (Meta) 55] map >= _|_ by (Bot) 56] map >= _|_ by (Bot) 57] _|_ >= _|_ by (Bot) 58] _|_ >= _|_ by (Bot) 59] _|_ >= _|_ by (Bot) 60] _|_ >= _|_ by (Bot) By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace the dependency pair problem (P_6, R_0, static, formative) by (P_7, R_0, static, formative), where P_7 consists of: and#(X, or(Y, Z)) =#> and#(X, Z) and#(or(X, Y), Z) =#> and#(Z, X) Thus, the original system is terminating if each of (P_1, R_0, static, formative) and (P_7, R_0, static, formative) is finite. We consider the dependency pair problem (P_7, 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: and#(X, or(Y, Z)) >? and#(X, Z) and#(or(X, Y), Z) >? and#(Z, X) not(not(X)) >= X not(or(X, Y)) >= and(not(X), not(Y)) not(and(X, Y)) >= or(not(X), not(Y)) and(X, or(Y, Z)) >= or(and(X, Y), and(X, Z)) and(or(X, Y), Z) >= or(and(Z, X), and(Z, 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: [[cons(x_1, x_2)]] = x_2 [[filter2(x_1, x_2, x_3, x_4)]] = filter2(x_2, x_4) [[map(x_1, x_2)]] = _|_ [[nil]] = _|_ We choose Lex = {} and Mul = {@_{o -> o}, and, and#, false, filter, filter2, not, or, true}, and the following precedence: and# > false > filter = filter2 > @_{o -> o} > not > and > or > true Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: and#(X, or(Y, Z)) >= and#(X, Z) and#(or(X, Y), Z) > and#(Z, X) not(not(X)) >= X not(or(X, Y)) >= and(not(X), not(Y)) not(and(X, Y)) >= or(not(X), not(Y)) and(X, or(Y, Z)) >= or(and(X, Y), and(X, Z)) and(or(X, Y), Z) >= or(and(Z, X), and(Z, Y)) _|_ >= _|_ _|_ >= _|_ filter(F, _|_) >= _|_ filter(F, X) >= filter2(F, X) filter2(F, X) >= filter(F, X) filter2(F, X) >= filter(F, X) With these choices, we have: 1] and#(X, or(Y, Z)) >= and#(X, Z) because [2], by (Star) 2] and#*(X, or(Y, Z)) >= and#(X, Z) because and# in Mul, [3] and [4], by (Stat) 3] X >= X by (Meta) 4] or(Y, Z) > Z because [5], by definition 5] or*(Y, Z) >= Z because [6], by (Select) 6] Z >= Z by (Meta) 7] and#(or(X, Y), Z) > and#(Z, X) because [8], by definition 8] and#*(or(X, Y), Z) >= and#(Z, X) because and# in Mul, [9] and [12], by (Stat) 9] or(X, Y) > X because [10], by definition 10] or*(X, Y) >= X because [11], by (Select) 11] X >= X by (Meta) 12] Z >= Z by (Meta) 13] not(not(X)) >= X because [14], by (Star) 14] not*(not(X)) >= X because [15], by (Select) 15] not(X) >= X because [16], by (Star) 16] not*(X) >= X because [17], by (Select) 17] X >= X by (Meta) 18] not(or(X, Y)) >= and(not(X), not(Y)) because [19], by (Star) 19] not*(or(X, Y)) >= and(not(X), not(Y)) because not > and, [20] and [24], by (Copy) 20] not*(or(X, Y)) >= not(X) because not in Mul and [21], by (Stat) 21] or(X, Y) > X because [22], by definition 22] or*(X, Y) >= X because [23], by (Select) 23] X >= X by (Meta) 24] not*(or(X, Y)) >= not(Y) because not in Mul and [25], by (Stat) 25] or(X, Y) > Y because [26], by definition 26] or*(X, Y) >= Y because [27], by (Select) 27] Y >= Y by (Meta) 28] not(and(X, Y)) >= or(not(X), not(Y)) because [29], by (Star) 29] not*(and(X, Y)) >= or(not(X), not(Y)) because not > or, [30] and [34], by (Copy) 30] not*(and(X, Y)) >= not(X) because not in Mul and [31], by (Stat) 31] and(X, Y) > X because [32], by definition 32] and*(X, Y) >= X because [33], by (Select) 33] X >= X by (Meta) 34] not*(and(X, Y)) >= not(Y) because not in Mul and [35], by (Stat) 35] and(X, Y) > Y because [36], by definition 36] and*(X, Y) >= Y because [37], by (Select) 37] Y >= Y by (Meta) 38] and(X, or(Y, Z)) >= or(and(X, Y), and(X, Z)) because [39], by (Star) 39] and*(X, or(Y, Z)) >= or(and(X, Y), and(X, Z)) because and > or, [40] and [44], by (Copy) 40] and*(X, or(Y, Z)) >= and(X, Y) because and in Mul, [3] and [41], by (Stat) 41] or(Y, Z) > Y because [42], by definition 42] or*(Y, Z) >= Y because [43], by (Select) 43] Y >= Y by (Meta) 44] and*(X, or(Y, Z)) >= and(X, Z) because and in Mul, [3] and [4], by (Stat) 45] and(or(X, Y), Z) >= or(and(Z, X), and(Z, Y)) because [46], by (Star) 46] and*(or(X, Y), Z) >= or(and(Z, X), and(Z, Y)) because and > or, [47] and [48], by (Copy) 47] and*(or(X, Y), Z) >= and(Z, X) because and in Mul, [9] and [12], by (Stat) 48] and*(or(X, Y), Z) >= and(Z, Y) because and in Mul, [49] and [12], by (Stat) 49] or(X, Y) > Y because [50], by definition 50] or*(X, Y) >= Y because [51], by (Select) 51] Y >= Y by (Meta) 52] _|_ >= _|_ by (Bot) 53] _|_ >= _|_ by (Bot) 54] filter(F, _|_) >= _|_ by (Bot) 55] filter(F, X) >= filter2(F, X) because filter = filter2, filter in Mul, [56] and [57], by (Fun) 56] F >= F by (Meta) 57] X >= X by (Meta) 58] filter2(F, X) >= filter(F, X) because filter2 = filter, filter2 in Mul, [59] and [60], by (Fun) 59] F >= F by (Meta) 60] X >= X by (Meta) 61] filter2(F, X) >= filter(F, X) because filter2 = filter, filter2 in Mul, [62] and [63], by (Fun) 62] F >= F by (Meta) 63] 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_7, R_0, static, formative) by (P_8, R_0, static, formative), where P_8 consists of: and#(X, or(Y, Z)) =#> and#(X, Z) Thus, the original system is terminating if each of (P_1, R_0, static, formative) and (P_8, R_0, static, formative) is finite. We consider the dependency pair problem (P_8, 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: and#(X, or(Y, Z)) >? and#(X, Z) not(not(X)) >= X not(or(X, Y)) >= and(not(X), not(Y)) not(and(X, Y)) >= or(not(X), not(Y)) and(X, or(Y, Z)) >= or(and(X, Y), and(X, Z)) and(or(X, Y), Z) >= or(and(Z, X), and(Z, 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: [[and#(x_1, x_2)]] = and#(x_2) [[cons(x_1, x_2)]] = _|_ [[filter(x_1, x_2)]] = _|_ [[filter2(x_1, x_2, x_3, x_4)]] = _|_ [[map(x_1, x_2)]] = map [[nil]] = _|_ We choose Lex = {} and Mul = {@_{o -> o}, and, and#, false, map, not, or, true}, and the following precedence: @_{o -> o} > false > map > not > and > or > and# > true Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: and#(or(X, Y)) > and#(Y) not(not(X)) >= X not(or(X, Y)) >= and(not(X), not(Y)) not(and(X, Y)) >= or(not(X), not(Y)) and(X, or(Y, Z)) >= or(and(X, Y), and(X, Z)) and(or(X, Y), Z) >= or(and(Z, X), and(Z, Y)) map >= _|_ map >= _|_ _|_ >= _|_ _|_ >= _|_ _|_ >= _|_ _|_ >= _|_ With these choices, we have: 1] and#(or(X, Y)) > and#(Y) because [2], by definition 2] and#*(or(X, Y)) >= and#(Y) because [3], by (Select) 3] or(X, Y) >= and#(Y) because [4], by (Star) 4] or*(X, Y) >= and#(Y) because or > and# and [5], by (Copy) 5] or*(X, Y) >= Y because [6], by (Select) 6] Y >= Y by (Meta) 7] not(not(X)) >= X because [8], by (Star) 8] not*(not(X)) >= X because [9], by (Select) 9] not(X) >= X because [10], by (Star) 10] not*(X) >= X because [11], by (Select) 11] X >= X by (Meta) 12] not(or(X, Y)) >= and(not(X), not(Y)) because [13], by (Star) 13] not*(or(X, Y)) >= and(not(X), not(Y)) because not > and, [14] and [18], by (Copy) 14] not*(or(X, Y)) >= not(X) because not in Mul and [15], by (Stat) 15] or(X, Y) > X because [16], by definition 16] or*(X, Y) >= X because [17], by (Select) 17] X >= X by (Meta) 18] not*(or(X, Y)) >= not(Y) because not in Mul and [19], by (Stat) 19] or(X, Y) > Y because [20], by definition 20] or*(X, Y) >= Y because [21], by (Select) 21] Y >= Y by (Meta) 22] not(and(X, Y)) >= or(not(X), not(Y)) because [23], by (Star) 23] not*(and(X, Y)) >= or(not(X), not(Y)) because not > or, [24] and [28], by (Copy) 24] not*(and(X, Y)) >= not(X) because not in Mul and [25], by (Stat) 25] and(X, Y) > X because [26], by definition 26] and*(X, Y) >= X because [27], by (Select) 27] X >= X by (Meta) 28] not*(and(X, Y)) >= not(Y) because not in Mul and [29], by (Stat) 29] and(X, Y) > Y because [30], by definition 30] and*(X, Y) >= Y because [31], by (Select) 31] Y >= Y by (Meta) 32] and(X, or(Y, Z)) >= or(and(X, Y), and(X, Z)) because [33], by (Star) 33] and*(X, or(Y, Z)) >= or(and(X, Y), and(X, Z)) because and > or, [34] and [39], by (Copy) 34] and*(X, or(Y, Z)) >= and(X, Y) because and in Mul, [35] and [36], by (Stat) 35] X >= X by (Meta) 36] or(Y, Z) > Y because [37], by definition 37] or*(Y, Z) >= Y because [38], by (Select) 38] Y >= Y by (Meta) 39] and*(X, or(Y, Z)) >= and(X, Z) because and in Mul, [35] and [40], by (Stat) 40] or(Y, Z) > Z because [5], by definition 41] and(or(X, Y), Z) >= or(and(Z, X), and(Z, Y)) because [42], by (Star) 42] and*(or(X, Y), Z) >= or(and(Z, X), and(Z, Y)) because and > or, [43] and [48], by (Copy) 43] and*(or(X, Y), Z) >= and(Z, X) because and in Mul, [44] and [47], by (Stat) 44] or(X, Y) > X because [45], by definition 45] or*(X, Y) >= X because [46], by (Select) 46] X >= X by (Meta) 47] Z >= Z by (Meta) 48] and*(or(X, Y), Z) >= and(Z, Y) because and in Mul, [49] and [47], by (Stat) 49] or(X, Y) > Y because [50], by definition 50] or*(X, Y) >= Y because [51], by (Select) 51] Y >= Y by (Meta) 52] map >= _|_ by (Bot) 53] map >= _|_ by (Bot) 54] _|_ >= _|_ by (Bot) 55] _|_ >= _|_ by (Bot) 56] _|_ >= _|_ by (Bot) 57] _|_ >= _|_ by (Bot) By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace a dependency pair problem (P_8, 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: not#(or(X, Y)) >? not#(X) not#(or(X, Y)) >? not#(Y) not#(and(X, Y)) >? not#(X) not#(and(X, Y)) >? not#(Y) not(not(X)) >= X not(or(X, Y)) >= and(not(X), not(Y)) not(and(X, Y)) >= or(not(X), not(Y)) and(X, or(Y, Z)) >= or(and(X, Y), and(X, Z)) and(or(X, Y), Z) >= or(and(Z, X), and(Z, 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: [[cons(x_1, x_2)]] = x_2 [[filter2(x_1, x_2, x_3, x_4)]] = filter2(x_2, x_4) [[nil]] = _|_ We choose Lex = {} and Mul = {@_{o -> o}, and, false, filter, filter2, map, not, not#, or, true}, and the following precedence: @_{o -> o} > false > filter = filter2 > map > not# > not > and > or > true Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: not#(or(X, Y)) >= not#(X) not#(or(X, Y)) >= not#(Y) not#(and(X, Y)) > not#(X) not#(and(X, Y)) >= not#(Y) not(not(X)) >= X not(or(X, Y)) >= and(not(X), not(Y)) not(and(X, Y)) >= or(not(X), not(Y)) and(X, or(Y, Z)) >= or(and(X, Y), and(X, Z)) and(or(X, Y), Z) >= or(and(Z, X), and(Z, Y)) map(F, _|_) >= _|_ map(F, X) >= map(F, X) filter(F, _|_) >= _|_ filter(F, X) >= filter2(F, X) filter2(F, X) >= filter(F, X) filter2(F, X) >= filter(F, X) With these choices, we have: 1] not#(or(X, Y)) >= not#(X) because not# in Mul and [2], by (Fun) 2] or(X, Y) >= X because [3], by (Star) 3] or*(X, Y) >= X because [4], by (Select) 4] X >= X by (Meta) 5] not#(or(X, Y)) >= not#(Y) because not# in Mul and [6], by (Fun) 6] or(X, Y) >= Y because [7], by (Star) 7] or*(X, Y) >= Y because [8], by (Select) 8] Y >= Y by (Meta) 9] not#(and(X, Y)) > not#(X) because [10], by definition 10] not#*(and(X, Y)) >= not#(X) because not# in Mul and [11], by (Stat) 11] and(X, Y) > X because [12], by definition 12] and*(X, Y) >= X because [13], by (Select) 13] X >= X by (Meta) 14] not#(and(X, Y)) >= not#(Y) because [15], by (Star) 15] not#*(and(X, Y)) >= not#(Y) because not# in Mul and [16], by (Stat) 16] and(X, Y) > Y because [17], by definition 17] and*(X, Y) >= Y because [18], by (Select) 18] Y >= Y by (Meta) 19] not(not(X)) >= X because [20], by (Star) 20] not*(not(X)) >= X because [21], by (Select) 21] not(X) >= X because [22], by (Star) 22] not*(X) >= X because [23], by (Select) 23] X >= X by (Meta) 24] not(or(X, Y)) >= and(not(X), not(Y)) because [25], by (Star) 25] not*(or(X, Y)) >= and(not(X), not(Y)) because not > and, [26] and [29], by (Copy) 26] not*(or(X, Y)) >= not(X) because not in Mul and [27], by (Stat) 27] or(X, Y) > X because [28], by definition 28] or*(X, Y) >= X because [4], by (Select) 29] not*(or(X, Y)) >= not(Y) because not in Mul and [30], by (Stat) 30] or(X, Y) > Y because [31], by definition 31] or*(X, Y) >= Y because [8], by (Select) 32] not(and(X, Y)) >= or(not(X), not(Y)) because [33], by (Star) 33] not*(and(X, Y)) >= or(not(X), not(Y)) because not > or, [34] and [35], by (Copy) 34] not*(and(X, Y)) >= not(X) because not in Mul and [11], by (Stat) 35] not*(and(X, Y)) >= not(Y) because not in Mul and [16], by (Stat) 36] and(X, or(Y, Z)) >= or(and(X, Y), and(X, Z)) because [37], by (Star) 37] and*(X, or(Y, Z)) >= or(and(X, Y), and(X, Z)) because and > or, [38] and [43], by (Copy) 38] and*(X, or(Y, Z)) >= and(X, Y) because and in Mul, [39] and [40], by (Stat) 39] X >= X by (Meta) 40] or(Y, Z) > Y because [41], by definition 41] or*(Y, Z) >= Y because [42], by (Select) 42] Y >= Y by (Meta) 43] and*(X, or(Y, Z)) >= and(X, Z) because and in Mul, [39] and [44], by (Stat) 44] or(Y, Z) > Z because [45], by definition 45] or*(Y, Z) >= Z because [46], by (Select) 46] Z >= Z by (Meta) 47] and(or(X, Y), Z) >= or(and(Z, X), and(Z, Y)) because [48], by (Star) 48] and*(or(X, Y), Z) >= or(and(Z, X), and(Z, Y)) because and > or, [49] and [54], by (Copy) 49] and*(or(X, Y), Z) >= and(Z, X) because and in Mul, [50] and [53], by (Stat) 50] or(X, Y) > X because [51], by definition 51] or*(X, Y) >= X because [52], by (Select) 52] X >= X by (Meta) 53] Z >= Z by (Meta) 54] and*(or(X, Y), Z) >= and(Z, Y) because and in Mul, [55] and [53], by (Stat) 55] or(X, Y) > Y because [56], by definition 56] or*(X, Y) >= Y because [57], by (Select) 57] Y >= Y by (Meta) 58] map(F, _|_) >= _|_ by (Bot) 59] map(F, X) >= map(F, X) because map in Mul, [60] and [61], by (Fun) 60] F >= F by (Meta) 61] X >= X by (Meta) 62] filter(F, _|_) >= _|_ by (Bot) 63] filter(F, X) >= filter2(F, X) because filter = filter2, filter in Mul, [64] and [65], by (Fun) 64] F >= F by (Meta) 65] X >= X by (Meta) 66] filter2(F, X) >= filter(F, X) because filter2 = filter, filter2 in Mul, [67] and [68], by (Fun) 67] F >= F by (Meta) 68] X >= X by (Meta) 69] filter2(F, X) >= filter(F, X) because filter2 = filter, filter2 in Mul, [70] and [71], by (Fun) 70] F >= F by (Meta) 71] 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_9, R_0, static, formative), where P_9 consists of: not#(or(X, Y)) =#> not#(X) not#(or(X, Y)) =#> not#(Y) not#(and(X, Y)) =#> not#(Y) Thus, the original system is terminating if (P_9, R_0, static, formative) is finite. We consider the dependency pair problem (P_9, 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: not#(or(X, Y)) >? not#(X) not#(or(X, Y)) >? not#(Y) not#(and(X, Y)) >? not#(Y) not(not(X)) >= X not(or(X, Y)) >= and(not(X), not(Y)) not(and(X, Y)) >= or(not(X), not(Y)) and(X, or(Y, Z)) >= or(and(X, Y), and(X, Z)) and(or(X, Y), Z) >= or(and(Z, X), and(Z, 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: [[cons(x_1, x_2)]] = x_2 [[filter2(x_1, x_2, x_3, x_4)]] = filter2(x_2, x_4) [[map(x_1, x_2)]] = _|_ [[nil]] = _|_ We choose Lex = {} and Mul = {@_{o -> o}, and, false, filter, filter2, not, not#, or, true}, and the following precedence: @_{o -> o} > false > filter = filter2 > not > and > or > not# > true Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: not#(or(X, Y)) >= not#(X) not#(or(X, Y)) > not#(Y) not#(and(X, Y)) >= not#(Y) not(not(X)) >= X not(or(X, Y)) >= and(not(X), not(Y)) not(and(X, Y)) >= or(not(X), not(Y)) and(X, or(Y, Z)) >= or(and(X, Y), and(X, Z)) and(or(X, Y), Z) >= or(and(Z, X), and(Z, Y)) _|_ >= _|_ _|_ >= _|_ filter(F, _|_) >= _|_ filter(F, X) >= filter2(F, X) filter2(F, X) >= filter(F, X) filter2(F, X) >= filter(F, X) With these choices, we have: 1] not#(or(X, Y)) >= not#(X) because not# in Mul and [2], by (Fun) 2] or(X, Y) >= X because [3], by (Star) 3] or*(X, Y) >= X because [4], by (Select) 4] X >= X by (Meta) 5] not#(or(X, Y)) > not#(Y) because [6], by definition 6] not#*(or(X, Y)) >= not#(Y) because [7], by (Select) 7] or(X, Y) >= not#(Y) because [8], by (Star) 8] or*(X, Y) >= not#(Y) because or > not# and [9], by (Copy) 9] or*(X, Y) >= Y because [10], by (Select) 10] Y >= Y by (Meta) 11] not#(and(X, Y)) >= not#(Y) because not# in Mul and [12], by (Fun) 12] and(X, Y) >= Y because [13], by (Star) 13] and*(X, Y) >= Y because [14], by (Select) 14] Y >= Y by (Meta) 15] not(not(X)) >= X because [16], by (Star) 16] not*(not(X)) >= X because [17], by (Select) 17] not(X) >= X because [18], by (Star) 18] not*(X) >= X because [19], by (Select) 19] X >= X by (Meta) 20] not(or(X, Y)) >= and(not(X), not(Y)) because [21], by (Star) 21] not*(or(X, Y)) >= and(not(X), not(Y)) because not > and, [22] and [25], by (Copy) 22] not*(or(X, Y)) >= not(X) because not in Mul and [23], by (Stat) 23] or(X, Y) > X because [24], by definition 24] or*(X, Y) >= X because [4], by (Select) 25] not*(or(X, Y)) >= not(Y) because not in Mul and [26], by (Stat) 26] or(X, Y) > Y because [9], by definition 27] not(and(X, Y)) >= or(not(X), not(Y)) because [28], by (Star) 28] not*(and(X, Y)) >= or(not(X), not(Y)) because not > or, [29] and [33], by (Copy) 29] not*(and(X, Y)) >= not(X) because not in Mul and [30], by (Stat) 30] and(X, Y) > X because [31], by definition 31] and*(X, Y) >= X because [32], by (Select) 32] X >= X by (Meta) 33] not*(and(X, Y)) >= not(Y) because not in Mul and [34], by (Stat) 34] and(X, Y) > Y because [35], by definition 35] and*(X, Y) >= Y because [14], by (Select) 36] and(X, or(Y, Z)) >= or(and(X, Y), and(X, Z)) because [37], by (Star) 37] and*(X, or(Y, Z)) >= or(and(X, Y), and(X, Z)) because and > or, [38] and [43], by (Copy) 38] and*(X, or(Y, Z)) >= and(X, Y) because and in Mul, [39] and [40], by (Stat) 39] X >= X by (Meta) 40] or(Y, Z) > Y because [41], by definition 41] or*(Y, Z) >= Y because [42], by (Select) 42] Y >= Y by (Meta) 43] and*(X, or(Y, Z)) >= and(X, Z) because and in Mul, [39] and [44], by (Stat) 44] or(Y, Z) > Z because [45], by definition 45] or*(Y, Z) >= Z because [46], by (Select) 46] Z >= Z by (Meta) 47] and(or(X, Y), Z) >= or(and(Z, X), and(Z, Y)) because [48], by (Star) 48] and*(or(X, Y), Z) >= or(and(Z, X), and(Z, Y)) because and > or, [49] and [54], by (Copy) 49] and*(or(X, Y), Z) >= and(Z, X) because and in Mul, [50] and [53], by (Stat) 50] or(X, Y) > X because [51], by definition 51] or*(X, Y) >= X because [52], by (Select) 52] X >= X by (Meta) 53] Z >= Z by (Meta) 54] and*(or(X, Y), Z) >= and(Z, Y) because and in Mul, [55] and [53], by (Stat) 55] or(X, Y) > Y because [56], by definition 56] or*(X, Y) >= Y because [57], by (Select) 57] Y >= Y by (Meta) 58] _|_ >= _|_ by (Bot) 59] _|_ >= _|_ by (Bot) 60] filter(F, _|_) >= _|_ by (Bot) 61] filter(F, X) >= filter2(F, X) because filter = filter2, filter in Mul, [62] and [63], by (Fun) 62] F >= F by (Meta) 63] X >= X by (Meta) 64] filter2(F, X) >= filter(F, X) because filter2 = filter, filter2 in Mul, [65] and [66], by (Fun) 65] F >= F by (Meta) 66] X >= X by (Meta) 67] filter2(F, X) >= filter(F, X) because filter2 = filter, filter2 in Mul, [68] and [69], by (Fun) 68] F >= F by (Meta) 69] 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_9, R_0, static, formative) by (P_10, R_0, static, formative), where P_10 consists of: not#(or(X, Y)) =#> not#(X) not#(and(X, Y)) =#> not#(Y) Thus, the original system is terminating if (P_10, R_0, static, formative) is finite. We consider the dependency pair problem (P_10, 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: not#(or(X, Y)) >? not#(X) not#(and(X, Y)) >? not#(Y) not(not(X)) >= X not(or(X, Y)) >= and(not(X), not(Y)) not(and(X, Y)) >= or(not(X), not(Y)) and(X, or(Y, Z)) >= or(and(X, Y), and(X, Z)) and(or(X, Y), Z) >= or(and(Z, X), and(Z, 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: [[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 = {@_{o -> o}, and, cons, false, map, not, not#, or, true}, and the following precedence: false > not > and > map > filter = filter2 > not# > @_{o -> o} > cons > or > true Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: not#(or(X, Y)) >= not#(X) not#(and(X, Y)) > not#(Y) not(not(X)) >= X not(or(X, Y)) >= and(not(X), not(Y)) not(and(X, Y)) >= or(not(X), not(Y)) and(X, or(Y, Z)) >= or(and(X, Y), and(X, Z)) and(or(X, Y), Z) >= or(and(Z, X), and(Z, 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] not#(or(X, Y)) >= not#(X) because not# in Mul and [2], by (Fun) 2] or(X, Y) >= X because [3], by (Star) 3] or*(X, Y) >= X because [4], by (Select) 4] X >= X by (Meta) 5] not#(and(X, Y)) > not#(Y) because [6], by definition 6] not#*(and(X, Y)) >= not#(Y) because not# in Mul and [7], by (Stat) 7] and(X, Y) > Y because [8], by definition 8] and*(X, Y) >= Y because [9], by (Select) 9] Y >= Y by (Meta) 10] not(not(X)) >= X because [11], by (Star) 11] not*(not(X)) >= X because [12], by (Select) 12] not(X) >= X because [13], by (Star) 13] not*(X) >= X because [14], by (Select) 14] X >= X by (Meta) 15] not(or(X, Y)) >= and(not(X), not(Y)) because [16], by (Star) 16] not*(or(X, Y)) >= and(not(X), not(Y)) because not > and, [17] and [20], by (Copy) 17] not*(or(X, Y)) >= not(X) because not in Mul and [18], by (Stat) 18] or(X, Y) > X because [19], by definition 19] or*(X, Y) >= X because [4], by (Select) 20] not*(or(X, Y)) >= not(Y) because not in Mul and [21], by (Stat) 21] or(X, Y) > Y because [22], by definition 22] or*(X, Y) >= Y because [23], by (Select) 23] Y >= Y by (Meta) 24] not(and(X, Y)) >= or(not(X), not(Y)) because [25], by (Star) 25] not*(and(X, Y)) >= or(not(X), not(Y)) because not > or, [26] and [30], by (Copy) 26] not*(and(X, Y)) >= not(X) because not in Mul and [27], by (Stat) 27] and(X, Y) > X because [28], by definition 28] and*(X, Y) >= X because [29], by (Select) 29] X >= X by (Meta) 30] not*(and(X, Y)) >= not(Y) because not in Mul and [7], by (Stat) 31] and(X, or(Y, Z)) >= or(and(X, Y), and(X, Z)) because [32], by (Star) 32] and*(X, or(Y, Z)) >= or(and(X, Y), and(X, Z)) because and > or, [33] and [38], by (Copy) 33] and*(X, or(Y, Z)) >= and(X, Y) because and in Mul, [34] and [35], by (Stat) 34] X >= X by (Meta) 35] or(Y, Z) > Y because [36], by definition 36] or*(Y, Z) >= Y because [37], by (Select) 37] Y >= Y by (Meta) 38] and*(X, or(Y, Z)) >= and(X, Z) because and in Mul, [34] and [39], by (Stat) 39] or(Y, Z) > Z because [40], by definition 40] or*(Y, Z) >= Z because [41], by (Select) 41] Z >= Z by (Meta) 42] and(or(X, Y), Z) >= or(and(Z, X), and(Z, Y)) because [43], by (Star) 43] and*(or(X, Y), Z) >= or(and(Z, X), and(Z, Y)) because and > or, [44] and [49], by (Copy) 44] and*(or(X, Y), Z) >= and(Z, X) because and in Mul, [45] and [48], by (Stat) 45] or(X, Y) > X because [46], by definition 46] or*(X, Y) >= X because [47], by (Select) 47] X >= X by (Meta) 48] Z >= Z by (Meta) 49] and*(or(X, Y), Z) >= and(Z, Y) because and in Mul, [50] and [48], by (Stat) 50] or(X, Y) > Y because [51], by definition 51] or*(X, Y) >= Y because [52], by (Select) 52] Y >= Y by (Meta) 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_10, R_0, static, formative) by (P_11, R_0, static, formative), where P_11 consists of: not#(or(X, Y)) =#> not#(X) Thus, the original system is terminating if (P_11, R_0, static, formative) is finite. We consider the dependency pair problem (P_11, 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: not#(or(X, Y)) >? not#(X) not(not(X)) >= X not(or(X, Y)) >= and(not(X), not(Y)) not(and(X, Y)) >= or(not(X), not(Y)) and(X, or(Y, Z)) >= or(and(X, Y), and(X, Z)) and(or(X, Y), Z) >= or(and(Z, X), and(Z, 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: [[cons(x_1, x_2)]] = _|_ [[filter(x_1, x_2)]] = _|_ [[filter2(x_1, x_2, x_3, x_4)]] = _|_ [[map(x_1, x_2)]] = map [[nil]] = _|_ We choose Lex = {} and Mul = {@_{o -> o}, and, false, map, not, not#, or, true}, and the following precedence: @_{o -> o} > false > map > not > and > not# > or > true Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: not#(or(X, Y)) > not#(X) not(not(X)) >= X not(or(X, Y)) >= and(not(X), not(Y)) not(and(X, Y)) >= or(not(X), not(Y)) and(X, or(Y, Z)) >= or(and(X, Y), and(X, Z)) and(or(X, Y), Z) >= or(and(Z, X), and(Z, Y)) map >= _|_ map >= _|_ _|_ >= _|_ _|_ >= _|_ _|_ >= _|_ _|_ >= _|_ With these choices, we have: 1] not#(or(X, Y)) > not#(X) because [2], by definition 2] not#*(or(X, Y)) >= not#(X) because not# in Mul and [3], by (Stat) 3] or(X, Y) > X because [4], by definition 4] or*(X, Y) >= X because [5], by (Select) 5] X >= X by (Meta) 6] not(not(X)) >= X because [7], by (Star) 7] not*(not(X)) >= X because [8], by (Select) 8] not(X) >= X because [9], by (Star) 9] not*(X) >= X because [10], by (Select) 10] X >= X by (Meta) 11] not(or(X, Y)) >= and(not(X), not(Y)) because [12], by (Star) 12] not*(or(X, Y)) >= and(not(X), not(Y)) because not > and, [13] and [14], by (Copy) 13] not*(or(X, Y)) >= not(X) because not in Mul and [3], by (Stat) 14] not*(or(X, Y)) >= not(Y) because not in Mul and [15], by (Stat) 15] or(X, Y) > Y because [16], by definition 16] or*(X, Y) >= Y because [17], by (Select) 17] Y >= Y by (Meta) 18] not(and(X, Y)) >= or(not(X), not(Y)) because [19], by (Star) 19] not*(and(X, Y)) >= or(not(X), not(Y)) because not > or, [20] and [24], by (Copy) 20] not*(and(X, Y)) >= not(X) because not in Mul and [21], by (Stat) 21] and(X, Y) > X because [22], by definition 22] and*(X, Y) >= X because [23], by (Select) 23] X >= X by (Meta) 24] not*(and(X, Y)) >= not(Y) because not in Mul and [25], by (Stat) 25] and(X, Y) > Y because [26], by definition 26] and*(X, Y) >= Y because [27], by (Select) 27] Y >= Y by (Meta) 28] and(X, or(Y, Z)) >= or(and(X, Y), and(X, Z)) because [29], by (Star) 29] and*(X, or(Y, Z)) >= or(and(X, Y), and(X, Z)) because and > or, [30] and [35], by (Copy) 30] and*(X, or(Y, Z)) >= and(X, Y) because and in Mul, [31] and [32], by (Stat) 31] X >= X by (Meta) 32] or(Y, Z) > Y because [33], by definition 33] or*(Y, Z) >= Y because [34], by (Select) 34] Y >= Y by (Meta) 35] and*(X, or(Y, Z)) >= and(X, Z) because and in Mul, [31] and [36], by (Stat) 36] or(Y, Z) > Z because [37], by definition 37] or*(Y, Z) >= Z because [38], by (Select) 38] Z >= Z by (Meta) 39] and(or(X, Y), Z) >= or(and(Z, X), and(Z, Y)) because [40], by (Star) 40] and*(or(X, Y), Z) >= or(and(Z, X), and(Z, Y)) because and > or, [41] and [46], by (Copy) 41] and*(or(X, Y), Z) >= and(Z, X) because and in Mul, [42] and [45], by (Stat) 42] or(X, Y) > X because [43], by definition 43] or*(X, Y) >= X because [44], by (Select) 44] X >= X by (Meta) 45] Z >= Z by (Meta) 46] and*(or(X, Y), Z) >= and(Z, Y) because and in Mul, [47] and [45], by (Stat) 47] or(X, Y) > Y because [48], by definition 48] or*(X, Y) >= Y because [49], by (Select) 49] Y >= Y by (Meta) 50] map >= _|_ by (Bot) 51] map >= _|_ by (Bot) 52] _|_ >= _|_ by (Bot) 53] _|_ >= _|_ by (Bot) 54] _|_ >= _|_ by (Bot) 55] _|_ >= _|_ by (Bot) By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace a dependency pair problem (P_11, 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.