We consider the system Applicative_first_order_05__11. Alphabet: !facminus : [a * a] --> a !facplus : [a * a] --> a !factimes : [a * a] --> a 0 : [] --> a 1 : [] --> a 2 : [] --> a D : [a] --> a cons : [c * d] --> d constant : [] --> a div : [a * a] --> a false : [] --> b filter : [c -> b * d] --> d filter2 : [b * c -> b * c * d] --> d ln : [a] --> a map : [c -> c * d] --> d minus : [a] --> a nil : [] --> d pow : [a * a] --> a 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)) D(minus(x)) => minus(D(x)) D(div(x, y)) => !facminus(div(D(x), y), div(!factimes(x, D(y)), pow(y, 2))) D(ln(x)) => div(D(x), x) D(pow(x, y)) => !facplus(!factimes(!factimes(y, pow(x, !facminus(y, 1))), D(x)), !factimes(!factimes(pow(x, y), ln(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 rule removal, following [Kop12, Theorem 2.23]. This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): 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)) D(minus(X)) >? minus(D(X)) D(div(X, Y)) >? !facminus(div(D(X), Y), div(!factimes(X, D(Y)), pow(Y, 2))) D(ln(X)) >? div(D(X), X) D(pow(X, Y)) >? !facplus(!factimes(!factimes(Y, pow(X, !facminus(Y, 1))), D(X)), !factimes(!factimes(pow(X, Y), ln(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 use a recursive path ordering as defined in [Kop12, Chapter 5]. Argument functions: [[0]] = _|_ [[1]] = _|_ [[2]] = _|_ [[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) [[nil]] = _|_ We choose Lex = {filter, filter2} and Mul = {!facminus, !facplus, !factimes, @_{o -> o}, D, cons, constant, div, false, ln, map, minus, pow, t, true}, and the following precedence: true > false > constant > t > D = ln = minus > !facminus > filter = filter2 > div > !facplus > pow > map > @_{o -> o} > cons > !factimes Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: 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)) D(minus(X)) >= minus(D(X)) D(div(X, Y)) >= !facminus(div(D(X), Y), div(!factimes(X, D(Y)), pow(Y, _|_))) D(ln(X)) >= div(D(X), X) D(pow(X, Y)) > !facplus(!factimes(!factimes(Y, pow(X, !facminus(Y, _|_))), D(X)), !factimes(!factimes(pow(X, Y), ln(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(t) > _|_ because [2], by definition 2] D*(t) >= _|_ by (Bot) 3] D(constant) > _|_ because [4], by definition 4] D*(constant) >= _|_ by (Bot) 5] D(!facplus(X, Y)) >= !facplus(D(X), D(Y)) because [6], by (Star) 6] D*(!facplus(X, Y)) >= !facplus(D(X), D(Y)) because D > !facplus, [7] and [11], by (Copy) 7] D*(!facplus(X, Y)) >= D(X) because D in Mul and [8], by (Stat) 8] !facplus(X, Y) > X because [9], by definition 9] !facplus*(X, Y) >= X because [10], by (Select) 10] X >= X by (Meta) 11] D*(!facplus(X, Y)) >= D(Y) because D in Mul and [12], by (Stat) 12] !facplus(X, Y) > Y because [13], by definition 13] !facplus*(X, Y) >= Y because [14], by (Select) 14] Y >= Y by (Meta) 15] D(!factimes(X, Y)) > !facplus(!factimes(Y, D(X)), !factimes(X, D(Y))) because [16], by definition 16] D*(!factimes(X, Y)) >= !facplus(!factimes(Y, D(X)), !factimes(X, D(Y))) because D > !facplus, [17] and [26], by (Copy) 17] D*(!factimes(X, Y)) >= !factimes(Y, D(X)) because D > !factimes, [18] and [22], by (Copy) 18] D*(!factimes(X, Y)) >= Y because [19], by (Select) 19] !factimes(X, Y) >= Y because [20], by (Star) 20] !factimes*(X, Y) >= Y because [21], by (Select) 21] Y >= Y by (Meta) 22] D*(!factimes(X, Y)) >= D(X) because D in Mul and [23], by (Stat) 23] !factimes(X, Y) > X because [24], by definition 24] !factimes*(X, Y) >= X because [25], by (Select) 25] X >= X by (Meta) 26] D*(!factimes(X, Y)) >= !factimes(X, D(Y)) because D > !factimes, [27] and [29], by (Copy) 27] D*(!factimes(X, Y)) >= X because [28], by (Select) 28] !factimes(X, Y) >= X because [24], by (Star) 29] D*(!factimes(X, Y)) >= D(Y) because D in Mul and [30], by (Stat) 30] !factimes(X, Y) > Y because [31], by definition 31] !factimes*(X, Y) >= Y because [21], by (Select) 32] D(!facminus(X, Y)) > !facminus(D(X), D(Y)) because [33], by definition 33] D*(!facminus(X, Y)) >= !facminus(D(X), D(Y)) because D > !facminus, [34] and [38], by (Copy) 34] D*(!facminus(X, Y)) >= D(X) because D in Mul and [35], by (Stat) 35] !facminus(X, Y) > X because [36], by definition 36] !facminus*(X, Y) >= X because [37], by (Select) 37] X >= X by (Meta) 38] D*(!facminus(X, Y)) >= D(Y) because D in Mul and [39], by (Stat) 39] !facminus(X, Y) > Y because [40], by definition 40] !facminus*(X, Y) >= Y because [41], by (Select) 41] Y >= Y by (Meta) 42] D(minus(X)) >= minus(D(X)) because D = minus, D in Mul and [43], by (Fun) 43] minus(X) >= D(X) because minus = D, minus in Mul and [44], by (Fun) 44] X >= X by (Meta) 45] D(div(X, Y)) >= !facminus(div(D(X), Y), div(!factimes(X, D(Y)), pow(Y, _|_))) because [46], by (Star) 46] D*(div(X, Y)) >= !facminus(div(D(X), Y), div(!factimes(X, D(Y)), pow(Y, _|_))) because D > !facminus, [47] and [56], by (Copy) 47] D*(div(X, Y)) >= div(D(X), Y) because D > div, [48] and [52], by (Copy) 48] D*(div(X, Y)) >= D(X) because D in Mul and [49], by (Stat) 49] div(X, Y) > X because [50], by definition 50] div*(X, Y) >= X because [51], by (Select) 51] X >= X by (Meta) 52] D*(div(X, Y)) >= Y because [53], by (Select) 53] div(X, Y) >= Y because [54], by (Star) 54] div*(X, Y) >= Y because [55], by (Select) 55] Y >= Y by (Meta) 56] D*(div(X, Y)) >= div(!factimes(X, D(Y)), pow(Y, _|_)) because D > div, [57] and [63], by (Copy) 57] D*(div(X, Y)) >= !factimes(X, D(Y)) because D > !factimes, [58] and [60], by (Copy) 58] D*(div(X, Y)) >= X because [59], by (Select) 59] div(X, Y) >= X because [50], by (Star) 60] D*(div(X, Y)) >= D(Y) because D in Mul and [61], by (Stat) 61] div(X, Y) > Y because [62], by definition 62] div*(X, Y) >= Y because [55], by (Select) 63] D*(div(X, Y)) >= pow(Y, _|_) because D > pow, [52] and [64], by (Copy) 64] D*(div(X, Y)) >= _|_ by (Bot) 65] D(ln(X)) >= div(D(X), X) because [66], by (Star) 66] D*(ln(X)) >= div(D(X), X) because D > div, [67] and [71], by (Copy) 67] D*(ln(X)) >= D(X) because D in Mul and [68], by (Stat) 68] ln(X) > X because [69], by definition 69] ln*(X) >= X because [70], by (Select) 70] X >= X by (Meta) 71] D*(ln(X)) >= X because [72], by (Select) 72] ln(X) >= X because [69], by (Star) 73] D(pow(X, Y)) > !facplus(!factimes(!factimes(Y, pow(X, !facminus(Y, _|_))), D(X)), !factimes(!factimes(pow(X, Y), ln(X)), D(Y))) because [74], by definition 74] D*(pow(X, Y)) >= !facplus(!factimes(!factimes(Y, pow(X, !facminus(Y, _|_))), D(X)), !factimes(!factimes(pow(X, Y), ln(X)), D(Y))) because D > !facplus, [75] and [91], by (Copy) 75] D*(pow(X, Y)) >= !factimes(!factimes(Y, pow(X, !facminus(Y, _|_))), D(X)) because D > !factimes, [76] and [88], by (Copy) 76] D*(pow(X, Y)) >= !factimes(Y, pow(X, !facminus(Y, _|_))) because D > !factimes, [77] and [81], by (Copy) 77] D*(pow(X, Y)) >= Y because [78], by (Select) 78] pow(X, Y) >= Y because [79], by (Star) 79] pow*(X, Y) >= Y because [80], by (Select) 80] Y >= Y by (Meta) 81] D*(pow(X, Y)) >= pow(X, !facminus(Y, _|_)) because D > pow, [82] and [86], by (Copy) 82] D*(pow(X, Y)) >= X because [83], by (Select) 83] pow(X, Y) >= X because [84], by (Star) 84] pow*(X, Y) >= X because [85], by (Select) 85] X >= X by (Meta) 86] D*(pow(X, Y)) >= !facminus(Y, _|_) because D > !facminus, [77] and [87], by (Copy) 87] D*(pow(X, Y)) >= _|_ by (Bot) 88] D*(pow(X, Y)) >= D(X) because D in Mul and [89], by (Stat) 89] pow(X, Y) > X because [90], by definition 90] pow*(X, Y) >= X because [85], by (Select) 91] D*(pow(X, Y)) >= !factimes(!factimes(pow(X, Y), ln(X)), D(Y)) because D > !factimes, [92] and [95], by (Copy) 92] D*(pow(X, Y)) >= !factimes(pow(X, Y), ln(X)) because D > !factimes, [93] and [94], by (Copy) 93] D*(pow(X, Y)) >= pow(X, Y) because D > pow, [82] and [77], by (Copy) 94] D*(pow(X, Y)) >= ln(X) because D = ln, D in Mul and [89], by (Stat) 95] D*(pow(X, Y)) >= D(Y) because D in Mul and [96], by (Stat) 96] pow(X, Y) > Y because [97], by definition 97] pow*(X, Y) >= Y because [80], by (Select) 98] map(F, _|_) >= _|_ by (Bot) 99] map(F, cons(X, Y)) >= cons(@_{o -> o}(F, X), map(F, Y)) because [100], by (Star) 100] map*(F, cons(X, Y)) >= cons(@_{o -> o}(F, X), map(F, Y)) because map > cons, [101] and [108], by (Copy) 101] map*(F, cons(X, Y)) >= @_{o -> o}(F, X) because map > @_{o -> o}, [102] and [104], by (Copy) 102] map*(F, cons(X, Y)) >= F because [103], by (Select) 103] F >= F by (Meta) 104] map*(F, cons(X, Y)) >= X because [105], by (Select) 105] cons(X, Y) >= X because [106], by (Star) 106] cons*(X, Y) >= X because [107], by (Select) 107] X >= X by (Meta) 108] map*(F, cons(X, Y)) >= map(F, Y) because map in Mul, [109] and [110], by (Stat) 109] F >= F by (Meta) 110] cons(X, Y) > Y because [111], by definition 111] cons*(X, Y) >= Y because [112], by (Select) 112] Y >= Y by (Meta) 113] filter(F, _|_) >= _|_ by (Bot) 114] filter(F, cons(X, Y)) >= filter2(@_{o -> o}(F, X), F, X, Y) because [115], by (Star) 115] filter*(F, cons(X, Y)) >= filter2(@_{o -> o}(F, X), F, X, Y) because filter = filter2, [116], [119], [120], [122] and [126], by (Stat) 116] cons(X, Y) > Y because [117], by definition 117] cons*(X, Y) >= Y because [118], by (Select) 118] Y >= Y by (Meta) 119] filter*(F, cons(X, Y)) >= @_{o -> o}(F, X) because filter > @_{o -> o}, [120] and [122], by (Copy) 120] filter*(F, cons(X, Y)) >= F because [121], by (Select) 121] F >= F by (Meta) 122] filter*(F, cons(X, Y)) >= X because [123], by (Select) 123] cons(X, Y) >= X because [124], by (Star) 124] cons*(X, Y) >= X because [125], by (Select) 125] X >= X by (Meta) 126] filter*(F, cons(X, Y)) >= Y because [127], by (Select) 127] cons(X, Y) >= Y because [117], by (Star) 128] filter2(true, F, X, Y) >= cons(X, filter(F, Y)) because [129], by (Star) 129] filter2*(true, F, X, Y) >= cons(X, filter(F, Y)) because filter2 > cons, [130] and [132], by (Copy) 130] filter2*(true, F, X, Y) >= X because [131], by (Select) 131] X >= X by (Meta) 132] filter2*(true, F, X, Y) >= filter(F, Y) because filter2 = filter, [133], [134], [135] and [136], by (Stat) 133] F >= F by (Meta) 134] Y >= Y by (Meta) 135] filter2*(true, F, X, Y) >= F because [133], by (Select) 136] filter2*(true, F, X, Y) >= Y because [134], by (Select) 137] filter2(false, F, X, Y) >= filter(F, Y) because [138], by (Star) 138] filter2*(false, F, X, Y) >= filter(F, Y) because filter2 = filter, [139], [140], [141] and [142], by (Stat) 139] F >= F by (Meta) 140] Y >= Y by (Meta) 141] filter2*(false, F, X, Y) >= F because [139], by (Select) 142] filter2*(false, F, X, Y) >= Y because [140], by (Select) We can thus remove the following rules: D(t) => 1 D(constant) => 0 D(!factimes(X, Y)) => !facplus(!factimes(Y, D(X)), !factimes(X, D(Y))) D(!facminus(X, Y)) => !facminus(D(X), D(Y)) D(pow(X, Y)) => !facplus(!factimes(!factimes(Y, pow(X, !facminus(Y, 1))), D(X)), !factimes(!factimes(pow(X, Y), ln(X)), D(Y))) We use rule removal, following [Kop12, Theorem 2.23]. This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): D(!facplus(X, Y)) >? !facplus(D(X), D(Y)) D(minus(X)) >? minus(D(X)) D(div(X, Y)) >? !facminus(div(D(X), Y), div(!factimes(X, D(Y)), pow(Y, 2))) D(ln(X)) >? div(D(X), X) 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 use a recursive path ordering as defined in [Kop12, Chapter 5]. Argument functions: [[2]] = _|_ [[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_1, x_3) [[nil]] = _|_ We choose Lex = {filter, filter2} and Mul = {!facminus, !facplus, !factimes, @_{o -> o}, D, cons, div, false, ln, map, minus, pow, true}, and the following precedence: ln > D > !facplus > false > pow > minus > !factimes > div > filter = filter2 > true > map > @_{o -> o} > cons > !facminus Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: D(!facplus(X, Y)) > !facplus(D(X), D(Y)) D(minus(X)) > minus(D(X)) D(div(X, Y)) >= !facminus(div(D(X), Y), div(!factimes(X, D(Y)), pow(Y, _|_))) D(ln(X)) > div(D(X), X) 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)) > !facplus(D(X), D(Y)) because [2], by definition 2] D*(!facplus(X, Y)) >= !facplus(D(X), D(Y)) because D > !facplus, [3] and [7], by (Copy) 3] D*(!facplus(X, Y)) >= D(X) because D in Mul and [4], by (Stat) 4] !facplus(X, Y) > X because [5], by definition 5] !facplus*(X, Y) >= X because [6], by (Select) 6] X >= X by (Meta) 7] D*(!facplus(X, Y)) >= D(Y) because D in Mul and [8], by (Stat) 8] !facplus(X, Y) > Y because [9], by definition 9] !facplus*(X, Y) >= Y because [10], by (Select) 10] Y >= Y by (Meta) 11] D(minus(X)) > minus(D(X)) because [12], by definition 12] D*(minus(X)) >= minus(D(X)) because D > minus and [13], by (Copy) 13] D*(minus(X)) >= D(X) because D in Mul and [14], by (Stat) 14] minus(X) > X because [15], by definition 15] minus*(X) >= X because [16], by (Select) 16] X >= X by (Meta) 17] D(div(X, Y)) >= !facminus(div(D(X), Y), div(!factimes(X, D(Y)), pow(Y, _|_))) because [18], by (Star) 18] D*(div(X, Y)) >= !facminus(div(D(X), Y), div(!factimes(X, D(Y)), pow(Y, _|_))) because D > !facminus, [19] and [28], by (Copy) 19] D*(div(X, Y)) >= div(D(X), Y) because D > div, [20] and [24], by (Copy) 20] D*(div(X, Y)) >= D(X) because D in Mul and [21], by (Stat) 21] div(X, Y) > X because [22], by definition 22] div*(X, Y) >= X because [23], by (Select) 23] X >= X by (Meta) 24] D*(div(X, Y)) >= Y because [25], by (Select) 25] div(X, Y) >= Y because [26], by (Star) 26] div*(X, Y) >= Y because [27], by (Select) 27] Y >= Y by (Meta) 28] D*(div(X, Y)) >= div(!factimes(X, D(Y)), pow(Y, _|_)) because D > div, [29] and [35], by (Copy) 29] D*(div(X, Y)) >= !factimes(X, D(Y)) because D > !factimes, [30] and [32], by (Copy) 30] D*(div(X, Y)) >= X because [31], by (Select) 31] div(X, Y) >= X because [22], by (Star) 32] D*(div(X, Y)) >= D(Y) because D in Mul and [33], by (Stat) 33] div(X, Y) > Y because [34], by definition 34] div*(X, Y) >= Y because [27], by (Select) 35] D*(div(X, Y)) >= pow(Y, _|_) because D > pow, [24] and [36], by (Copy) 36] D*(div(X, Y)) >= _|_ by (Bot) 37] D(ln(X)) > div(D(X), X) because [38], by definition 38] D*(ln(X)) >= div(D(X), X) because D > div, [39] and [44], by (Copy) 39] D*(ln(X)) >= D(X) because [40], by (Select) 40] ln(X) >= D(X) because [41], by (Star) 41] ln*(X) >= D(X) because ln > D and [42], by (Copy) 42] ln*(X) >= X because [43], by (Select) 43] X >= X by (Meta) 44] D*(ln(X)) >= X because [45], by (Select) 45] ln(X) >= X because [42], by (Star) 46] map(F, _|_) >= _|_ by (Bot) 47] map(F, cons(X, Y)) >= cons(@_{o -> o}(F, X), map(F, Y)) because [48], by (Star) 48] map*(F, cons(X, Y)) >= cons(@_{o -> o}(F, X), map(F, Y)) because map > cons, [49] and [56], by (Copy) 49] map*(F, cons(X, Y)) >= @_{o -> o}(F, X) because map > @_{o -> o}, [50] and [52], by (Copy) 50] map*(F, cons(X, Y)) >= F because [51], by (Select) 51] F >= F by (Meta) 52] map*(F, cons(X, Y)) >= X because [53], by (Select) 53] cons(X, Y) >= X because [54], by (Star) 54] cons*(X, Y) >= X because [55], by (Select) 55] X >= X by (Meta) 56] map*(F, cons(X, Y)) >= map(F, Y) because map in Mul, [57] and [58], by (Stat) 57] F >= F by (Meta) 58] cons(X, Y) > Y because [59], by definition 59] cons*(X, Y) >= Y because [60], by (Select) 60] Y >= Y by (Meta) 61] filter(F, _|_) >= _|_ by (Bot) 62] filter(F, cons(X, Y)) >= filter2(@_{o -> o}(F, X), F, X, Y) because [63], by (Star) 63] filter*(F, cons(X, Y)) >= filter2(@_{o -> o}(F, X), F, X, Y) because filter = filter2, [64], [67], [68], [70] and [74], by (Stat) 64] cons(X, Y) > Y because [65], by definition 65] cons*(X, Y) >= Y because [66], by (Select) 66] Y >= Y by (Meta) 67] filter*(F, cons(X, Y)) >= @_{o -> o}(F, X) because filter > @_{o -> o}, [68] and [70], by (Copy) 68] filter*(F, cons(X, Y)) >= F because [69], by (Select) 69] F >= F by (Meta) 70] filter*(F, cons(X, Y)) >= X because [71], by (Select) 71] cons(X, Y) >= X because [72], by (Star) 72] cons*(X, Y) >= X because [73], by (Select) 73] X >= X by (Meta) 74] filter*(F, cons(X, Y)) >= Y because [75], by (Select) 75] cons(X, Y) >= Y because [65], by (Star) 76] filter2(true, F, X, Y) >= cons(X, filter(F, Y)) because [77], by (Star) 77] filter2*(true, F, X, Y) >= cons(X, filter(F, Y)) because filter2 > cons, [78] and [80], by (Copy) 78] filter2*(true, F, X, Y) >= X because [79], by (Select) 79] X >= X by (Meta) 80] filter2*(true, F, X, Y) >= filter(F, Y) because filter2 = filter, [81], [82], [83] and [84], by (Stat) 81] F >= F by (Meta) 82] Y >= Y by (Meta) 83] filter2*(true, F, X, Y) >= F because [81], by (Select) 84] filter2*(true, F, X, Y) >= Y because [82], by (Select) 85] filter2(false, F, X, Y) >= filter(F, Y) because [86], by (Star) 86] filter2*(false, F, X, Y) >= filter(F, Y) because filter2 = filter, [87], [88], [89] and [90], by (Stat) 87] F >= F by (Meta) 88] Y >= Y by (Meta) 89] filter2*(false, F, X, Y) >= F because [87], by (Select) 90] filter2*(false, F, X, Y) >= Y because [88], by (Select) We can thus remove the following rules: D(!facplus(X, Y)) => !facplus(D(X), D(Y)) D(minus(X)) => minus(D(X)) D(ln(X)) => div(D(X), X) We use rule removal, following [Kop12, Theorem 2.23]. This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): D(div(X, Y)) >? !facminus(div(D(X), Y), div(!factimes(X, D(Y)), pow(Y, 2))) 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 use a recursive path ordering as defined in [Kop12, Chapter 5]. Argument functions: [[2]] = _|_ [[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_1, x_3) [[nil]] = _|_ We choose Lex = {filter, filter2} and Mul = {!facminus, !factimes, @_{o -> o}, D, cons, div, false, map, pow, true}, and the following precedence: false > map > D > pow > div > filter = filter2 > cons > !factimes > @_{o -> o} > !facminus > true Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: D(div(X, Y)) > !facminus(div(D(X), Y), div(!factimes(X, D(Y)), pow(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(div(X, Y)) > !facminus(div(D(X), Y), div(!factimes(X, D(Y)), pow(Y, _|_))) because [2], by definition 2] D*(div(X, Y)) >= !facminus(div(D(X), Y), div(!factimes(X, D(Y)), pow(Y, _|_))) because D > !facminus, [3] and [12], by (Copy) 3] D*(div(X, Y)) >= div(D(X), Y) because D > div, [4] and [8], by (Copy) 4] D*(div(X, Y)) >= D(X) because D in Mul and [5], by (Stat) 5] div(X, Y) > X because [6], by definition 6] div*(X, Y) >= X because [7], by (Select) 7] X >= X by (Meta) 8] D*(div(X, Y)) >= Y because [9], by (Select) 9] div(X, Y) >= Y because [10], by (Star) 10] div*(X, Y) >= Y because [11], by (Select) 11] Y >= Y by (Meta) 12] D*(div(X, Y)) >= div(!factimes(X, D(Y)), pow(Y, _|_)) because D > div, [13] and [19], by (Copy) 13] D*(div(X, Y)) >= !factimes(X, D(Y)) because D > !factimes, [14] and [16], by (Copy) 14] D*(div(X, Y)) >= X because [15], by (Select) 15] div(X, Y) >= X because [6], by (Star) 16] D*(div(X, Y)) >= D(Y) because D in Mul and [17], by (Stat) 17] div(X, Y) > Y because [18], by definition 18] div*(X, Y) >= Y because [11], by (Select) 19] D*(div(X, Y)) >= pow(Y, _|_) because D > pow, [8] and [20], by (Copy) 20] D*(div(X, Y)) >= _|_ by (Bot) 21] map(F, _|_) >= _|_ by (Bot) 22] map(F, cons(X, Y)) >= cons(@_{o -> o}(F, X), map(F, Y)) because [23], by (Star) 23] map*(F, cons(X, Y)) >= cons(@_{o -> o}(F, X), map(F, Y)) because map > cons, [24] and [31], by (Copy) 24] map*(F, cons(X, Y)) >= @_{o -> o}(F, X) because map > @_{o -> o}, [25] and [27], by (Copy) 25] map*(F, cons(X, Y)) >= F because [26], by (Select) 26] F >= F by (Meta) 27] map*(F, cons(X, Y)) >= X because [28], by (Select) 28] cons(X, Y) >= X because [29], by (Star) 29] cons*(X, Y) >= X because [30], by (Select) 30] X >= X by (Meta) 31] map*(F, cons(X, Y)) >= map(F, Y) because map in Mul, [32] and [33], by (Stat) 32] F >= F by (Meta) 33] cons(X, Y) > Y because [34], by definition 34] cons*(X, Y) >= Y because [35], by (Select) 35] Y >= Y by (Meta) 36] filter(F, _|_) >= _|_ by (Bot) 37] filter(F, cons(X, Y)) >= filter2(@_{o -> o}(F, X), F, X, Y) because [38], by (Star) 38] filter*(F, cons(X, Y)) >= filter2(@_{o -> o}(F, X), F, X, Y) because filter = filter2, [39], [42], [43], [45] and [49], by (Stat) 39] cons(X, Y) > Y because [40], by definition 40] cons*(X, Y) >= Y because [41], by (Select) 41] Y >= Y by (Meta) 42] filter*(F, cons(X, Y)) >= @_{o -> o}(F, X) because filter > @_{o -> o}, [43] and [45], by (Copy) 43] filter*(F, cons(X, Y)) >= F because [44], by (Select) 44] F >= F by (Meta) 45] filter*(F, cons(X, Y)) >= X because [46], by (Select) 46] cons(X, Y) >= X because [47], by (Star) 47] cons*(X, Y) >= X because [48], by (Select) 48] X >= X by (Meta) 49] filter*(F, cons(X, Y)) >= Y because [50], by (Select) 50] cons(X, Y) >= Y because [40], by (Star) 51] filter2(true, F, X, Y) >= cons(X, filter(F, Y)) because [52], by (Star) 52] filter2*(true, F, X, Y) >= cons(X, filter(F, Y)) because filter2 > cons, [53] and [55], by (Copy) 53] filter2*(true, F, X, Y) >= X because [54], by (Select) 54] X >= X by (Meta) 55] filter2*(true, F, X, Y) >= filter(F, Y) because filter2 = filter, [56], [57], [58] and [59], by (Stat) 56] F >= F by (Meta) 57] Y >= Y by (Meta) 58] filter2*(true, F, X, Y) >= F because [56], by (Select) 59] filter2*(true, F, X, Y) >= Y because [57], by (Select) 60] filter2(false, F, X, Y) > filter(F, Y) because [61], by definition 61] filter2*(false, F, X, Y) >= filter(F, Y) because filter2 = filter, [62], [63], [64] and [65], by (Stat) 62] F >= F by (Meta) 63] Y >= Y by (Meta) 64] filter2*(false, F, X, Y) >= F because [62], by (Select) 65] filter2*(false, F, X, Y) >= Y because [63], by (Select) We can thus remove the following rules: D(div(X, Y)) => !facminus(div(D(X), Y), div(!factimes(X, D(Y)), pow(Y, 2))) filter2(false, F, X, Y) => filter(F, Y) We use rule removal, following [Kop12, Theorem 2.23]. This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): 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)) We use a recursive path ordering as defined in [Kop12, Chapter 5]. Argument functions: [[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_1, x_3) [[nil]] = _|_ We choose Lex = {filter, filter2} and Mul = {@_{o -> o}, cons, map, true}, and the following precedence: filter = filter2 > true > map > @_{o -> o} > cons Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: 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)) With these choices, we have: 1] map(F, _|_) >= _|_ by (Bot) 2] map(F, cons(X, Y)) >= cons(@_{o -> o}(F, X), map(F, Y)) because [3], by (Star) 3] map*(F, cons(X, Y)) >= cons(@_{o -> o}(F, X), map(F, Y)) because map > cons, [4] and [11], by (Copy) 4] map*(F, cons(X, Y)) >= @_{o -> o}(F, X) because map > @_{o -> o}, [5] and [7], by (Copy) 5] map*(F, cons(X, Y)) >= F because [6], by (Select) 6] F >= F by (Meta) 7] map*(F, cons(X, Y)) >= X because [8], by (Select) 8] cons(X, Y) >= X because [9], by (Star) 9] cons*(X, Y) >= X because [10], by (Select) 10] X >= X by (Meta) 11] map*(F, cons(X, Y)) >= map(F, Y) because map in Mul, [12] and [13], by (Stat) 12] F >= F by (Meta) 13] cons(X, Y) > Y because [14], by definition 14] cons*(X, Y) >= Y because [15], by (Select) 15] Y >= Y by (Meta) 16] filter(F, _|_) >= _|_ by (Bot) 17] filter(F, cons(X, Y)) >= filter2(@_{o -> o}(F, X), F, X, Y) because [18], by (Star) 18] filter*(F, cons(X, Y)) >= filter2(@_{o -> o}(F, X), F, X, Y) because filter = filter2, [19], [22], [23], [25] and [29], by (Stat) 19] cons(X, Y) > Y because [20], by definition 20] cons*(X, Y) >= Y because [21], by (Select) 21] Y >= Y by (Meta) 22] filter*(F, cons(X, Y)) >= @_{o -> o}(F, X) because filter > @_{o -> o}, [23] and [25], by (Copy) 23] filter*(F, cons(X, Y)) >= F because [24], by (Select) 24] F >= F by (Meta) 25] filter*(F, cons(X, Y)) >= X because [26], by (Select) 26] cons(X, Y) >= X because [27], by (Star) 27] cons*(X, Y) >= X because [28], by (Select) 28] X >= X by (Meta) 29] filter*(F, cons(X, Y)) >= Y because [30], by (Select) 30] cons(X, Y) >= Y because [20], by (Star) 31] filter2(true, F, X, Y) > cons(X, filter(F, Y)) because [32], by definition 32] filter2*(true, F, X, Y) >= cons(X, filter(F, Y)) because filter2 > cons, [33] and [35], by (Copy) 33] filter2*(true, F, X, Y) >= X because [34], by (Select) 34] X >= X by (Meta) 35] filter2*(true, F, X, Y) >= filter(F, Y) because filter2 = filter, [36], [37], [38] and [39], by (Stat) 36] F >= F by (Meta) 37] Y >= Y by (Meta) 38] filter2*(true, F, X, Y) >= F because [36], by (Select) 39] filter2*(true, F, X, Y) >= Y because [37], by (Select) We can thus remove the following rules: filter2(true, F, X, Y) => cons(X, filter(F, Y)) We use rule removal, following [Kop12, Theorem 2.23]. This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): 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) We use a recursive path ordering as defined in [Kop12, Chapter 5]. Argument functions: [[filter(x_1, x_2)]] = filter(x_2, x_1) [[filter2(x_1, x_2, x_3, x_4)]] = filter2(x_3, x_4, x_1, x_2) [[nil]] = _|_ We choose Lex = {filter, filter2} and Mul = {@_{o -> o}, cons, map}, and the following precedence: filter = filter2 > @_{o -> o} = map > cons Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: 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) With these choices, we have: 1] map(F, _|_) >= _|_ by (Bot) 2] map(F, cons(X, Y)) > cons(@_{o -> o}(F, X), map(F, Y)) because [3], by definition 3] map*(F, cons(X, Y)) >= cons(@_{o -> o}(F, X), map(F, Y)) because map > cons, [4] and [9], by (Copy) 4] map*(F, cons(X, Y)) >= @_{o -> o}(F, X) because map = @_{o -> o}, map in Mul, [5] and [6], by (Stat) 5] F >= F by (Meta) 6] cons(X, Y) > X because [7], by definition 7] cons*(X, Y) >= X because [8], by (Select) 8] X >= X by (Meta) 9] map*(F, cons(X, Y)) >= map(F, Y) because map in Mul, [5] and [10], by (Stat) 10] cons(X, Y) > Y because [11], by definition 11] cons*(X, Y) >= Y because [12], by (Select) 12] Y >= Y by (Meta) 13] filter(F, _|_) >= _|_ by (Bot) 14] filter(F, cons(X, Y)) >= filter2(@_{o -> o}(F, X), F, X, Y) because [15], by (Star) 15] filter*(F, cons(X, Y)) >= filter2(@_{o -> o}(F, X), F, X, Y) because filter = filter2, [16], [19], [20], [22] and [24], by (Stat) 16] cons(X, Y) > X because [17], by definition 17] cons*(X, Y) >= X because [18], by (Select) 18] X >= X by (Meta) 19] filter*(F, cons(X, Y)) >= @_{o -> o}(F, X) because filter > @_{o -> o}, [20] and [22], by (Copy) 20] filter*(F, cons(X, Y)) >= F because [21], by (Select) 21] F >= F by (Meta) 22] filter*(F, cons(X, Y)) >= X because [23], by (Select) 23] cons(X, Y) >= X because [17], by (Star) 24] filter*(F, cons(X, Y)) >= Y because [25], by (Select) 25] cons(X, Y) >= Y because [26], by (Star) 26] cons*(X, Y) >= Y because [27], by (Select) 27] Y >= Y by (Meta) We can thus remove the following rules: map(F, cons(X, Y)) => cons(F X, map(F, Y)) We use rule removal, following [Kop12, Theorem 2.23]. This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): map(F, nil) >? nil filter(F, nil) >? nil filter(F, cons(X, Y)) >? filter2(F X, F, X, Y) We use a recursive path ordering as defined in [Kop12, Chapter 5]. Argument functions: [[nil]] = _|_ We choose Lex = {} and Mul = {@_{o -> o}, cons, filter, filter2, map}, and the following precedence: cons > filter > filter2 > @_{o -> o} > map Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: map(F, _|_) >= _|_ filter(F, _|_) >= _|_ filter(F, cons(X, Y)) > filter2(@_{o -> o}(F, X), F, X, Y) With these choices, we have: 1] map(F, _|_) >= _|_ by (Bot) 2] filter(F, _|_) >= _|_ by (Bot) 3] filter(F, cons(X, Y)) > filter2(@_{o -> o}(F, X), F, X, Y) because [4], by definition 4] filter*(F, cons(X, Y)) >= filter2(@_{o -> o}(F, X), F, X, Y) because filter > filter2, [5], [6], [8] and [12], by (Copy) 5] filter*(F, cons(X, Y)) >= @_{o -> o}(F, X) because filter > @_{o -> o}, [6] and [8], by (Copy) 6] filter*(F, cons(X, Y)) >= F because [7], by (Select) 7] F >= F by (Meta) 8] filter*(F, cons(X, Y)) >= X because [9], by (Select) 9] cons(X, Y) >= X because [10], by (Star) 10] cons*(X, Y) >= X because [11], by (Select) 11] X >= X by (Meta) 12] filter*(F, cons(X, Y)) >= Y because [13], by (Select) 13] cons(X, Y) >= Y because [14], by (Star) 14] cons*(X, Y) >= Y because [15], by (Select) 15] Y >= Y by (Meta) We can thus remove the following rules: filter(F, cons(X, Y)) => filter2(F X, F, X, Y) We use rule removal, following [Kop12, Theorem 2.23]. This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): map(F, nil) >? nil filter(F, nil) >? nil We use a recursive path ordering as defined in [Kop12, Chapter 5]. Argument functions: [[nil]] = _|_ We choose Lex = {} and Mul = {filter, map}, and the following precedence: filter > map Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: map(F, _|_) > _|_ filter(F, _|_) >= _|_ With these choices, we have: 1] map(F, _|_) > _|_ because [2], by definition 2] map*(F, _|_) >= _|_ by (Bot) 3] filter(F, _|_) >= _|_ by (Bot) We can thus remove the following rules: map(F, nil) => nil We use rule removal, following [Kop12, Theorem 2.23]. This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): filter(F, nil) >? nil We use a recursive path ordering as defined in [Kop12, Chapter 5]. Argument functions: [[nil]] = _|_ We choose Lex = {} and Mul = {filter}, and the following precedence: filter Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: filter(F, _|_) > _|_ With these choices, we have: 1] filter(F, _|_) > _|_ because [2], by definition 2] filter*(F, _|_) >= _|_ by (Bot) We can thus remove the following rules: filter(F, nil) => nil All rules were succesfully removed. Thus, termination of the original system has been reduced to termination of the beta-rule, which is well-known to hold. +++ Citations +++ [Kop12] C. Kop. Higher Order Termination. PhD Thesis, 2012.