We consider the system qsort. Alphabet: 0 : [] --> nat app : [list * list] --> list cons : [nat * list] --> list false : [] --> bool filter : [nat -> bool * list] --> list gr : [nat * nat] --> bool if : [bool * list * list] --> list le : [nat * nat] --> bool nil : [] --> list qsort : [list] --> list s : [nat] --> nat true : [] --> bool Rules: if(true, x, y) => x if(false, x, y) => y app(nil, x) => x app(cons(x, y), z) => cons(x, app(y, z)) le(0, x) => true le(s(x), 0) => false le(s(x), s(y)) => le(x, y) gr(0, x) => false gr(s(x), 0) => true gr(s(x), s(y)) => gr(x, y) filter(f, nil) => nil filter(f, cons(x, y)) => if(f x, cons(x, filter(f, y)), filter(f, y)) qsort(nil) => nil qsort(cons(x, y)) => app(qsort(filter(/\z.le(z, x), y)), app(cons(x, nil), qsort(filter(/\u.gr(u, x), 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] app#(cons(X, Y), Z) =#> app#(Y, Z) 1] le#(s(X), s(Y)) =#> le#(X, Y) 2] gr#(s(X), s(Y)) =#> gr#(X, Y) 3] filter#(F, cons(X, Y)) =#> if#(F X, cons(X, filter(F, Y)), filter(F, Y)) 4] filter#(F, cons(X, Y)) =#> filter#(F, Y) 5] filter#(F, cons(X, Y)) =#> filter#(F, Y) 6] qsort#(cons(X, Y)) =#> app#(qsort(filter(/\x.le(x, X), Y)), app(cons(X, nil), qsort(filter(/\y.gr(y, X), Y)))) 7] qsort#(cons(X, Y)) =#> qsort#(filter(/\x.le(x, X), Y)) 8] qsort#(cons(X, Y)) =#> filter#(/\x.le(x, X), Y) 9] qsort#(cons(X, Y)) =#> le#(Z, X) 10] qsort#(cons(X, Y)) =#> app#(cons(X, nil), qsort(filter(/\x.gr(x, X), Y))) 11] qsort#(cons(X, Y)) =#> qsort#(filter(/\x.gr(x, X), Y)) 12] qsort#(cons(X, Y)) =#> filter#(/\x.gr(x, X), Y) 13] qsort#(cons(X, Y)) =#> gr#(Z, X) Rules R_0: if(true, X, Y) => X if(false, X, Y) => Y app(nil, X) => X app(cons(X, Y), Z) => cons(X, app(Y, Z)) le(0, X) => true le(s(X), 0) => false le(s(X), s(Y)) => le(X, Y) gr(0, X) => false gr(s(X), 0) => true gr(s(X), s(Y)) => gr(X, Y) filter(F, nil) => nil filter(F, cons(X, Y)) => if(F X, cons(X, filter(F, Y)), filter(F, Y)) qsort(nil) => nil qsort(cons(X, Y)) => app(qsort(filter(/\x.le(x, X), Y)), app(cons(X, nil), qsort(filter(/\y.gr(y, X), 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 : 1 * 2 : 2 * 3 : * 4 : 3, 4, 5 * 5 : 3, 4, 5 * 6 : 0 * 7 : 6, 7, 8, 9, 10, 11, 12, 13 * 8 : 3, 4, 5 * 9 : 1 * 10 : 0 * 11 : 6, 7, 8, 9, 10, 11, 12, 13 * 12 : 3, 4, 5 * 13 : 2 This graph has the following strongly connected components: P_1: app#(cons(X, Y), Z) =#> app#(Y, Z) P_2: le#(s(X), s(Y)) =#> le#(X, Y) P_3: gr#(s(X), s(Y)) =#> gr#(X, Y) P_4: filter#(F, cons(X, Y)) =#> filter#(F, Y) filter#(F, cons(X, Y)) =#> filter#(F, Y) P_5: qsort#(cons(X, Y)) =#> qsort#(filter(/\x.le(x, X), Y)) qsort#(cons(X, Y)) =#> qsort#(filter(/\x.gr(x, X), 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), (P_4, R_0, m, f) and (P_5, 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), (P_4, 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 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: qsort#(cons(X, Y)) >? qsort#(filter(/\x.le(x, X), Y)) qsort#(cons(X, Y)) >? qsort#(filter(/\x.gr(x, X), Y)) if(true, X, Y) >= X if(false, X, Y) >= Y app(nil, X) >= X app(cons(X, Y), Z) >= cons(X, app(Y, Z)) le(0, X) >= true le(s(X), 0) >= false le(s(X), s(Y)) >= le(X, Y) gr(0, X) >= false gr(s(X), 0) >= true gr(s(X), s(Y)) >= gr(X, Y) filter(F, nil) >= nil filter(F, cons(X, Y)) >= if(F X, cons(X, filter(F, Y)), filter(F, Y)) qsort(nil) >= nil qsort(cons(X, Y)) >= app(qsort(filter(/\x.le(x, X), Y)), app(cons(X, nil), qsort(filter(/\y.gr(y, X), 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: [[false]] = _|_ [[filter(x_1, x_2)]] = filter(x_2) [[gr(x_1, x_2)]] = gr(x_1) [[if(x_1, x_2, x_3)]] = if(x_2, x_3) [[nil]] = _|_ [[true]] = _|_ We choose Lex = {} and Mul = {0, @_{o -> o}, app, cons, filter, gr, if, le, qsort, qsort#, s}, and the following precedence: 0 > qsort > app > le > cons = filter > if > qsort# > gr > s > @_{o -> o} Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: qsort#(cons(X, Y)) > qsort#(filter(Y)) qsort#(cons(X, Y)) >= qsort#(filter(Y)) if(X, Y) >= X if(X, Y) >= Y app(_|_, X) >= X app(cons(X, Y), Z) >= cons(X, app(Y, Z)) le(0, X) >= _|_ le(s(X), 0) >= _|_ le(s(X), s(Y)) >= le(X, Y) gr(0) >= _|_ gr(s(X)) >= _|_ gr(s(X)) >= gr(X) filter(_|_) >= _|_ filter(cons(X, Y)) >= if(cons(X, filter(Y)), filter(Y)) qsort(_|_) >= _|_ qsort(cons(X, Y)) >= app(qsort(filter(Y)), app(cons(X, _|_), qsort(filter(Y)))) With these choices, we have: 1] qsort#(cons(X, Y)) > qsort#(filter(Y)) because [2], by definition 2] qsort#*(cons(X, Y)) >= qsort#(filter(Y)) because qsort# in Mul and [3], by (Stat) 3] cons(X, Y) > filter(Y) because [4], by definition 4] cons*(X, Y) >= filter(Y) because cons = filter, cons in Mul and [5], by (Stat) 5] Y >= Y by (Meta) 6] qsort#(cons(X, Y)) >= qsort#(filter(Y)) because qsort# in Mul and [7], by (Fun) 7] cons(X, Y) >= filter(Y) because [8], by (Star) 8] cons*(X, Y) >= filter(Y) because cons = filter, cons in Mul and [5], by (Stat) 9] if(X, Y) >= X because [10], by (Star) 10] if*(X, Y) >= X because [11], by (Select) 11] X >= X by (Meta) 12] if(X, Y) >= Y because [13], by (Star) 13] if*(X, Y) >= Y because [14], by (Select) 14] Y >= Y by (Meta) 15] app(_|_, X) >= X because [16], by (Star) 16] app*(_|_, X) >= X because [17], by (Select) 17] X >= X by (Meta) 18] app(cons(X, Y), Z) >= cons(X, app(Y, Z)) because [19], by (Star) 19] app*(cons(X, Y), Z) >= cons(X, app(Y, Z)) because app > cons, [20] and [24], by (Copy) 20] app*(cons(X, Y), Z) >= X because [21], by (Select) 21] cons(X, Y) >= X because [22], by (Star) 22] cons*(X, Y) >= X because [23], by (Select) 23] X >= X by (Meta) 24] app*(cons(X, Y), Z) >= app(Y, Z) because app in Mul, [25] and [28], by (Stat) 25] cons(X, Y) > Y because [26], by definition 26] cons*(X, Y) >= Y because [27], by (Select) 27] Y >= Y by (Meta) 28] Z >= Z by (Meta) 29] le(0, X) >= _|_ by (Bot) 30] le(s(X), 0) >= _|_ by (Bot) 31] le(s(X), s(Y)) >= le(X, Y) because [32], by (Star) 32] le*(s(X), s(Y)) >= le(X, Y) because le in Mul, [33] and [36], by (Stat) 33] s(X) > X because [34], by definition 34] s*(X) >= X because [35], by (Select) 35] X >= X by (Meta) 36] s(Y) >= Y because [37], by (Star) 37] s*(Y) >= Y because [38], by (Select) 38] Y >= Y by (Meta) 39] gr(0) >= _|_ by (Bot) 40] gr(s(X)) >= _|_ by (Bot) 41] gr(s(X)) >= gr(X) because [42], by (Star) 42] gr*(s(X)) >= gr(X) because gr in Mul and [43], by (Stat) 43] s(X) > X because [44], by definition 44] s*(X) >= X because [45], by (Select) 45] X >= X by (Meta) 46] filter(_|_) >= _|_ by (Bot) 47] filter(cons(X, Y)) >= if(cons(X, filter(Y)), filter(Y)) because [48], by (Star) 48] filter*(cons(X, Y)) >= if(cons(X, filter(Y)), filter(Y)) because filter > if, [49] and [56], by (Copy) 49] filter*(cons(X, Y)) >= cons(X, filter(Y)) because filter = cons, filter in Mul, [50] and [53], by (Stat) 50] cons(X, Y) > X because [51], by definition 51] cons*(X, Y) >= X because [52], by (Select) 52] X >= X by (Meta) 53] cons(X, Y) > filter(Y) because [54], by definition 54] cons*(X, Y) >= filter(Y) because cons = filter, cons in Mul and [55], by (Stat) 55] Y >= Y by (Meta) 56] filter*(cons(X, Y)) >= filter(Y) because filter in Mul and [57], by (Stat) 57] cons(X, Y) > Y because [58], by definition 58] cons*(X, Y) >= Y because [55], by (Select) 59] qsort(_|_) >= _|_ by (Bot) 60] qsort(cons(X, Y)) >= app(qsort(filter(Y)), app(cons(X, _|_), qsort(filter(Y)))) because [61], by (Star) 61] qsort*(cons(X, Y)) >= app(qsort(filter(Y)), app(cons(X, _|_), qsort(filter(Y)))) because qsort > app, [62] and [63], by (Copy) 62] qsort*(cons(X, Y)) >= qsort(filter(Y)) because qsort in Mul and [3], by (Stat) 63] qsort*(cons(X, Y)) >= app(cons(X, _|_), qsort(filter(Y))) because qsort > app, [64] and [68], by (Copy) 64] qsort*(cons(X, Y)) >= cons(X, _|_) because [65], by (Select) 65] cons(X, Y) >= cons(X, _|_) because cons in Mul, [66] and [67], by (Fun) 66] X >= X by (Meta) 67] Y >= _|_ by (Bot) 68] qsort*(cons(X, Y)) >= qsort(filter(Y)) because qsort in Mul and [69], by (Stat) 69] cons(X, Y) > filter(Y) because [70], by definition 70] cons*(X, Y) >= filter(Y) because cons = filter, cons in Mul and [5], by (Stat) 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: qsort#(cons(X, Y)) =#> qsort#(filter(/\x.gr(x, X), 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), (P_4, 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: qsort#(cons(X, Y)) >? qsort#(filter(/\x.gr(x, X), Y)) if(true, X, Y) >= X if(false, X, Y) >= Y app(nil, X) >= X app(cons(X, Y), Z) >= cons(X, app(Y, Z)) le(0, X) >= true le(s(X), 0) >= false le(s(X), s(Y)) >= le(X, Y) gr(0, X) >= false gr(s(X), 0) >= true gr(s(X), s(Y)) >= gr(X, Y) filter(F, nil) >= nil filter(F, cons(X, Y)) >= if(F X, cons(X, filter(F, Y)), filter(F, Y)) qsort(nil) >= nil qsort(cons(X, Y)) >= app(qsort(filter(/\x.le(x, X), Y)), app(cons(X, nil), qsort(filter(/\y.gr(y, X), 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: [[false]] = _|_ [[filter(x_1, x_2)]] = filter(x_2) [[if(x_1, x_2, x_3)]] = if(x_2, x_3) [[le(x_1, x_2)]] = le(x_1) [[nil]] = _|_ [[true]] = _|_ We choose Lex = {} and Mul = {0, @_{o -> o}, app, cons, filter, gr, if, le, qsort, qsort#, s}, and the following precedence: 0 > @_{o -> o} > qsort > app > cons = filter > qsort# > gr > if > le = s Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: qsort#(cons(X, Y)) > qsort#(filter(Y)) if(X, Y) >= X if(X, Y) >= Y app(_|_, X) >= X app(cons(X, Y), Z) >= cons(X, app(Y, Z)) le(0) >= _|_ le(s(X)) >= _|_ le(s(X)) >= le(X) gr(0, X) >= _|_ gr(s(X), 0) >= _|_ gr(s(X), s(Y)) >= gr(X, Y) filter(_|_) >= _|_ filter(cons(X, Y)) >= if(cons(X, filter(Y)), filter(Y)) qsort(_|_) >= _|_ qsort(cons(X, Y)) >= app(qsort(filter(Y)), app(cons(X, _|_), qsort(filter(Y)))) With these choices, we have: 1] qsort#(cons(X, Y)) > qsort#(filter(Y)) because [2], by definition 2] qsort#*(cons(X, Y)) >= qsort#(filter(Y)) because qsort# in Mul and [3], by (Stat) 3] cons(X, Y) > filter(Y) because [4], by definition 4] cons*(X, Y) >= filter(Y) because cons = filter, cons in Mul and [5], by (Stat) 5] Y >= Y by (Meta) 6] if(X, Y) >= X because [7], by (Star) 7] if*(X, Y) >= X because [8], by (Select) 8] X >= X by (Meta) 9] if(X, Y) >= Y because [10], by (Star) 10] if*(X, Y) >= Y because [11], by (Select) 11] Y >= Y by (Meta) 12] app(_|_, X) >= X because [13], by (Star) 13] app*(_|_, X) >= X because [14], by (Select) 14] X >= X by (Meta) 15] app(cons(X, Y), Z) >= cons(X, app(Y, Z)) because [16], by (Star) 16] app*(cons(X, Y), Z) >= cons(X, app(Y, Z)) because app > cons, [17] and [21], by (Copy) 17] app*(cons(X, Y), Z) >= X because [18], by (Select) 18] cons(X, Y) >= X because [19], by (Star) 19] cons*(X, Y) >= X because [20], by (Select) 20] X >= X by (Meta) 21] app*(cons(X, Y), Z) >= app(Y, Z) because app in Mul, [22] and [25], by (Stat) 22] cons(X, Y) > Y because [23], by definition 23] cons*(X, Y) >= Y because [24], by (Select) 24] Y >= Y by (Meta) 25] Z >= Z by (Meta) 26] le(0) >= _|_ by (Bot) 27] le(s(X)) >= _|_ by (Bot) 28] le(s(X)) >= le(X) because [29], by (Star) 29] le*(s(X)) >= le(X) because [30], by (Select) 30] s(X) >= le(X) because s = le, s in Mul and [31], by (Fun) 31] X >= X by (Meta) 32] gr(0, X) >= _|_ by (Bot) 33] gr(s(X), 0) >= _|_ by (Bot) 34] gr(s(X), s(Y)) >= gr(X, Y) because gr in Mul, [35] and [38], by (Fun) 35] s(X) >= X because [36], by (Star) 36] s*(X) >= X because [37], by (Select) 37] X >= X by (Meta) 38] s(Y) >= Y because [39], by (Star) 39] s*(Y) >= Y because [40], by (Select) 40] Y >= Y by (Meta) 41] filter(_|_) >= _|_ by (Bot) 42] filter(cons(X, Y)) >= if(cons(X, filter(Y)), filter(Y)) because [43], by (Star) 43] filter*(cons(X, Y)) >= if(cons(X, filter(Y)), filter(Y)) because filter > if, [44] and [51], by (Copy) 44] filter*(cons(X, Y)) >= cons(X, filter(Y)) because filter = cons, filter in Mul, [45] and [48], by (Stat) 45] cons(X, Y) > X because [46], by definition 46] cons*(X, Y) >= X because [47], by (Select) 47] X >= X by (Meta) 48] cons(X, Y) > filter(Y) because [49], by definition 49] cons*(X, Y) >= filter(Y) because cons = filter, cons in Mul and [50], by (Stat) 50] Y >= Y by (Meta) 51] filter*(cons(X, Y)) >= filter(Y) because filter in Mul and [52], by (Stat) 52] cons(X, Y) > Y because [53], by definition 53] cons*(X, Y) >= Y because [50], by (Select) 54] qsort(_|_) >= _|_ by (Bot) 55] qsort(cons(X, Y)) >= app(qsort(filter(Y)), app(cons(X, _|_), qsort(filter(Y)))) because [56], by (Star) 56] qsort*(cons(X, Y)) >= app(qsort(filter(Y)), app(cons(X, _|_), qsort(filter(Y)))) because qsort > app, [57] and [60], by (Copy) 57] qsort*(cons(X, Y)) >= qsort(filter(Y)) because qsort in Mul and [58], by (Stat) 58] cons(X, Y) > filter(Y) because [59], by definition 59] cons*(X, Y) >= filter(Y) because cons = filter, cons in Mul and [5], by (Stat) 60] qsort*(cons(X, Y)) >= app(cons(X, _|_), qsort(filter(Y))) because qsort > app, [61] and [65], by (Copy) 61] qsort*(cons(X, Y)) >= cons(X, _|_) because [62], by (Select) 62] cons(X, Y) >= cons(X, _|_) because cons in Mul, [63] and [64], by (Fun) 63] X >= X by (Meta) 64] Y >= _|_ by (Bot) 65] qsort*(cons(X, Y)) >= qsort(filter(Y)) because qsort in Mul and [3], by (Stat) 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. 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)) >? filter#(F, Y) filter#(F, cons(X, Y)) >? filter#(F, Y) if(true, X, Y) >= X if(false, X, Y) >= Y app(nil, X) >= X app(cons(X, Y), Z) >= cons(X, app(Y, Z)) le(0, X) >= true le(s(X), 0) >= false le(s(X), s(Y)) >= le(X, Y) gr(0, X) >= false gr(s(X), 0) >= true gr(s(X), s(Y)) >= gr(X, Y) filter(F, nil) >= nil filter(F, cons(X, Y)) >= if(F X, cons(X, filter(F, Y)), filter(F, Y)) qsort(nil) >= nil qsort(cons(X, Y)) >= app(qsort(filter(/\x.le(x, X), Y)), app(cons(X, nil), qsort(filter(/\y.gr(y, X), 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: [[false]] = _|_ [[filter(x_1, x_2)]] = filter(x_2) [[filter#(x_1, x_2)]] = filter#(x_2, x_1) [[if(x_1, x_2, x_3)]] = if(x_2, x_3) [[nil]] = _|_ [[true]] = _|_ We choose Lex = {filter#, gr, le} and Mul = {0, @_{o -> o}, app, cons, filter, if, qsort, s}, and the following precedence: 0 > @_{o -> o} > filter# > le > qsort > s > app > cons = filter > gr > if Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: filter#(F, cons(X, Y)) >= filter#(F, Y) filter#(F, cons(X, Y)) > filter#(F, Y) if(X, Y) >= X if(X, Y) >= Y app(_|_, X) >= X app(cons(X, Y), Z) >= cons(X, app(Y, Z)) le(0, X) >= _|_ le(s(X), 0) >= _|_ le(s(X), s(Y)) >= le(X, Y) gr(0, X) >= _|_ gr(s(X), 0) >= _|_ gr(s(X), s(Y)) >= gr(X, Y) filter(_|_) >= _|_ filter(cons(X, Y)) >= if(cons(X, filter(Y)), filter(Y)) qsort(_|_) >= _|_ qsort(cons(X, Y)) >= app(qsort(filter(Y)), app(cons(X, _|_), qsort(filter(Y)))) With these choices, we have: 1] filter#(F, cons(X, Y)) >= filter#(F, Y) because [2] and [3], by (Fun) 2] F >= F by (Meta) 3] cons(X, Y) >= Y because [4], by (Star) 4] cons*(X, Y) >= Y because [5], by (Select) 5] Y >= Y by (Meta) 6] filter#(F, cons(X, Y)) > filter#(F, Y) because [7], by definition 7] filter#*(F, cons(X, Y)) >= filter#(F, Y) because [8], [10] and [11], by (Stat) 8] cons(X, Y) > Y because [9], by definition 9] cons*(X, Y) >= Y because [5], by (Select) 10] filter#*(F, cons(X, Y)) >= F because [2], by (Select) 11] filter#*(F, cons(X, Y)) >= Y because [3], by (Select) 12] if(X, Y) >= X because [13], by (Star) 13] if*(X, Y) >= X because [14], by (Select) 14] X >= X by (Meta) 15] if(X, Y) >= Y because [16], by (Star) 16] if*(X, Y) >= Y because [17], by (Select) 17] Y >= Y by (Meta) 18] app(_|_, X) >= X because [19], by (Star) 19] app*(_|_, X) >= X because [20], by (Select) 20] X >= X by (Meta) 21] app(cons(X, Y), Z) >= cons(X, app(Y, Z)) because [22], by (Star) 22] app*(cons(X, Y), Z) >= cons(X, app(Y, Z)) because app > cons, [23] and [27], by (Copy) 23] app*(cons(X, Y), Z) >= X because [24], by (Select) 24] cons(X, Y) >= X because [25], by (Star) 25] cons*(X, Y) >= X because [26], by (Select) 26] X >= X by (Meta) 27] app*(cons(X, Y), Z) >= app(Y, Z) because app in Mul, [28] and [31], by (Stat) 28] cons(X, Y) > Y because [29], by definition 29] cons*(X, Y) >= Y because [30], by (Select) 30] Y >= Y by (Meta) 31] Z >= Z by (Meta) 32] le(0, X) >= _|_ by (Bot) 33] le(s(X), 0) >= _|_ by (Bot) 34] le(s(X), s(Y)) >= le(X, Y) because [35] and [38], by (Fun) 35] s(X) >= X because [36], by (Star) 36] s*(X) >= X because [37], by (Select) 37] X >= X by (Meta) 38] s(Y) >= Y because [39], by (Star) 39] s*(Y) >= Y because [40], by (Select) 40] Y >= Y by (Meta) 41] gr(0, X) >= _|_ by (Bot) 42] gr(s(X), 0) >= _|_ by (Bot) 43] gr(s(X), s(Y)) >= gr(X, Y) because [44] and [47], by (Fun) 44] s(X) >= X because [45], by (Star) 45] s*(X) >= X because [46], by (Select) 46] X >= X by (Meta) 47] s(Y) >= Y because [48], by (Star) 48] s*(Y) >= Y because [49], by (Select) 49] Y >= Y by (Meta) 50] filter(_|_) >= _|_ by (Bot) 51] filter(cons(X, Y)) >= if(cons(X, filter(Y)), filter(Y)) because [52], by (Star) 52] filter*(cons(X, Y)) >= if(cons(X, filter(Y)), filter(Y)) because filter > if, [53] and [60], by (Copy) 53] filter*(cons(X, Y)) >= cons(X, filter(Y)) because filter = cons, filter in Mul, [54] and [57], by (Stat) 54] cons(X, Y) > X because [55], by definition 55] cons*(X, Y) >= X because [56], by (Select) 56] X >= X by (Meta) 57] cons(X, Y) > filter(Y) because [58], by definition 58] cons*(X, Y) >= filter(Y) because cons = filter, cons in Mul and [59], by (Stat) 59] Y >= Y by (Meta) 60] filter*(cons(X, Y)) >= filter(Y) because filter in Mul and [8], by (Stat) 61] qsort(_|_) >= _|_ by (Bot) 62] qsort(cons(X, Y)) >= app(qsort(filter(Y)), app(cons(X, _|_), qsort(filter(Y)))) because [63], by (Star) 63] qsort*(cons(X, Y)) >= app(qsort(filter(Y)), app(cons(X, _|_), qsort(filter(Y)))) because qsort > app, [64] and [68], by (Copy) 64] qsort*(cons(X, Y)) >= qsort(filter(Y)) because qsort in Mul and [65], by (Stat) 65] cons(X, Y) > filter(Y) because [66], by definition 66] cons*(X, Y) >= filter(Y) because cons = filter, cons in Mul and [67], by (Stat) 67] Y >= Y by (Meta) 68] qsort*(cons(X, Y)) >= app(cons(X, _|_), qsort(filter(Y))) because qsort > app, [69] and [73], by (Copy) 69] qsort*(cons(X, Y)) >= cons(X, _|_) because [70], by (Select) 70] cons(X, Y) >= cons(X, _|_) because cons in Mul, [71] and [72], by (Fun) 71] X >= X by (Meta) 72] Y >= _|_ by (Bot) 73] qsort*(cons(X, Y)) >= qsort(filter(Y)) because qsort in Mul and [74], by (Stat) 74] cons(X, Y) > filter(Y) because [75], by definition 75] cons*(X, Y) >= filter(Y) because cons = filter, cons in Mul and [67], by (Stat) 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_7, R_0, static, formative), where P_7 consists of: filter#(F, cons(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_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: filter#(F, cons(X, Y)) >? filter#(F, Y) if(true, X, Y) >= X if(false, X, Y) >= Y app(nil, X) >= X app(cons(X, Y), Z) >= cons(X, app(Y, Z)) le(0, X) >= true le(s(X), 0) >= false le(s(X), s(Y)) >= le(X, Y) gr(0, X) >= false gr(s(X), 0) >= true gr(s(X), s(Y)) >= gr(X, Y) filter(F, nil) >= nil filter(F, cons(X, Y)) >= if(F X, cons(X, filter(F, Y)), filter(F, Y)) qsort(nil) >= nil qsort(cons(X, Y)) >= app(qsort(filter(/\x.le(x, X), Y)), app(cons(X, nil), qsort(filter(/\y.gr(y, X), 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: [[false]] = _|_ [[filter(x_1, x_2)]] = filter(x_2) [[if(x_1, x_2, x_3)]] = if(x_2, x_3) [[nil]] = _|_ [[true]] = _|_ We choose Lex = {} and Mul = {0, @_{o -> o}, app, cons, filter, filter#, gr, if, le, qsort, s}, and the following precedence: gr > qsort > app > @_{o -> o} > 0 > cons = filter > if > le > s > filter# Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: filter#(F, cons(X, Y)) > filter#(F, Y) if(X, Y) >= X if(X, Y) >= Y app(_|_, X) >= X app(cons(X, Y), Z) >= cons(X, app(Y, Z)) le(0, X) >= _|_ le(s(X), 0) >= _|_ le(s(X), s(Y)) >= le(X, Y) gr(0, X) >= _|_ gr(s(X), 0) >= _|_ gr(s(X), s(Y)) >= gr(X, Y) filter(_|_) >= _|_ filter(cons(X, Y)) >= if(cons(X, filter(Y)), filter(Y)) qsort(_|_) >= _|_ qsort(cons(X, Y)) >= app(qsort(filter(Y)), app(cons(X, _|_), qsort(filter(Y)))) With these choices, we have: 1] filter#(F, cons(X, Y)) > filter#(F, Y) because [2], by definition 2] filter#*(F, cons(X, Y)) >= filter#(F, Y) because filter# in Mul, [3] and [4], by (Stat) 3] F >= F by (Meta) 4] cons(X, Y) > Y because [5], by definition 5] cons*(X, Y) >= Y because [6], by (Select) 6] Y >= Y by (Meta) 7] if(X, Y) >= X because [8], by (Star) 8] if*(X, Y) >= X because [9], by (Select) 9] X >= X by (Meta) 10] if(X, Y) >= Y because [11], by (Star) 11] if*(X, Y) >= Y because [12], by (Select) 12] Y >= Y by (Meta) 13] app(_|_, X) >= X because [14], by (Star) 14] app*(_|_, X) >= X because [15], by (Select) 15] X >= X by (Meta) 16] app(cons(X, Y), Z) >= cons(X, app(Y, Z)) because [17], by (Star) 17] app*(cons(X, Y), Z) >= cons(X, app(Y, Z)) because app > cons, [18] and [22], by (Copy) 18] app*(cons(X, Y), Z) >= X because [19], by (Select) 19] cons(X, Y) >= X because [20], by (Star) 20] cons*(X, Y) >= X because [21], by (Select) 21] X >= X by (Meta) 22] app*(cons(X, Y), Z) >= app(Y, Z) because app in Mul, [23] and [26], by (Stat) 23] cons(X, Y) > Y because [24], by definition 24] cons*(X, Y) >= Y because [25], by (Select) 25] Y >= Y by (Meta) 26] Z >= Z by (Meta) 27] le(0, X) >= _|_ by (Bot) 28] le(s(X), 0) >= _|_ by (Bot) 29] le(s(X), s(Y)) >= le(X, Y) because le in Mul, [30] and [33], by (Fun) 30] s(X) >= X because [31], by (Star) 31] s*(X) >= X because [32], by (Select) 32] X >= X by (Meta) 33] s(Y) >= Y because [34], by (Star) 34] s*(Y) >= Y because [35], by (Select) 35] Y >= Y by (Meta) 36] gr(0, X) >= _|_ by (Bot) 37] gr(s(X), 0) >= _|_ by (Bot) 38] gr(s(X), s(Y)) >= gr(X, Y) because gr in Mul, [39] and [42], by (Fun) 39] s(X) >= X because [40], by (Star) 40] s*(X) >= X because [41], by (Select) 41] X >= X by (Meta) 42] s(Y) >= Y because [43], by (Star) 43] s*(Y) >= Y because [44], by (Select) 44] Y >= Y by (Meta) 45] filter(_|_) >= _|_ by (Bot) 46] filter(cons(X, Y)) >= if(cons(X, filter(Y)), filter(Y)) because [47], by (Star) 47] filter*(cons(X, Y)) >= if(cons(X, filter(Y)), filter(Y)) because filter > if, [48] and [55], by (Copy) 48] filter*(cons(X, Y)) >= cons(X, filter(Y)) because filter = cons, filter in Mul, [49] and [52], by (Stat) 49] cons(X, Y) > X because [50], by definition 50] cons*(X, Y) >= X because [51], by (Select) 51] X >= X by (Meta) 52] cons(X, Y) > filter(Y) because [53], by definition 53] cons*(X, Y) >= filter(Y) because cons = filter, cons in Mul and [54], by (Stat) 54] Y >= Y by (Meta) 55] filter*(cons(X, Y)) >= filter(Y) because [56], by (Select) 56] cons(X, Y) >= filter(Y) because [53], by (Star) 57] qsort(_|_) >= _|_ by (Bot) 58] qsort(cons(X, Y)) >= app(qsort(filter(Y)), app(cons(X, _|_), qsort(filter(Y)))) because [59], by (Star) 59] qsort*(cons(X, Y)) >= app(qsort(filter(Y)), app(cons(X, _|_), qsort(filter(Y)))) because qsort > app, [60] and [64], by (Copy) 60] qsort*(cons(X, Y)) >= qsort(filter(Y)) because qsort in Mul and [61], by (Stat) 61] cons(X, Y) > filter(Y) because [62], by definition 62] cons*(X, Y) >= filter(Y) because cons = filter, cons in Mul and [63], by (Stat) 63] Y >= Y by (Meta) 64] qsort*(cons(X, Y)) >= app(cons(X, _|_), qsort(filter(Y))) because qsort > app, [65] and [69], by (Copy) 65] qsort*(cons(X, Y)) >= cons(X, _|_) because [66], by (Select) 66] cons(X, Y) >= cons(X, _|_) because cons in Mul, [67] and [68], by (Fun) 67] X >= X by (Meta) 68] Y >= _|_ by (Bot) 69] qsort*(cons(X, Y)) >= qsort(filter(Y)) because qsort in Mul and [70], by (Stat) 70] cons(X, Y) > filter(Y) because [71], by definition 71] cons*(X, Y) >= filter(Y) because cons = filter, cons in Mul and [63], by (Stat) By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace a dependency pair problem (P_7, 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), (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: gr#(s(X), s(Y)) >? gr#(X, Y) if(true, X, Y) >= X if(false, X, Y) >= Y app(nil, X) >= X app(cons(X, Y), Z) >= cons(X, app(Y, Z)) le(0, X) >= true le(s(X), 0) >= false le(s(X), s(Y)) >= le(X, Y) gr(0, X) >= false gr(s(X), 0) >= true gr(s(X), s(Y)) >= gr(X, Y) filter(F, nil) >= nil filter(F, cons(X, Y)) >= if(F X, cons(X, filter(F, Y)), filter(F, Y)) qsort(nil) >= nil qsort(cons(X, Y)) >= app(qsort(filter(/\x.le(x, X), Y)), app(cons(X, nil), qsort(filter(/\y.gr(y, X), Y)))) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: 0 = 3 app = \y0y1.y1 cons = \y0y1.0 false = 0 filter = \G0y1.2 gr = \y0y1.0 gr# = \y0y1.y1 if = \y0y1y2.y1 + y2 le = \y0y1.0 nil = 0 qsort = \y0.0 s = \y0.3 + y0 true = 0 Using this interpretation, the requirements translate to: [[gr#(s(_x0), s(_x1))]] = 3 + x1 > x1 = [[gr#(_x0, _x1)]] [[if(true, _x0, _x1)]] = x0 + x1 >= x0 = [[_x0]] [[if(false, _x0, _x1)]] = x0 + x1 >= x1 = [[_x1]] [[app(nil, _x0)]] = x0 >= x0 = [[_x0]] [[app(cons(_x0, _x1), _x2)]] = x2 >= 0 = [[cons(_x0, app(_x1, _x2))]] [[le(0, _x0)]] = 0 >= 0 = [[true]] [[le(s(_x0), 0)]] = 0 >= 0 = [[false]] [[le(s(_x0), s(_x1))]] = 0 >= 0 = [[le(_x0, _x1)]] [[gr(0, _x0)]] = 0 >= 0 = [[false]] [[gr(s(_x0), 0)]] = 0 >= 0 = [[true]] [[gr(s(_x0), s(_x1))]] = 0 >= 0 = [[gr(_x0, _x1)]] [[filter(_F0, nil)]] = 2 >= 0 = [[nil]] [[filter(_F0, cons(_x1, _x2))]] = 2 >= 2 = [[if(_F0 _x1, cons(_x1, filter(_F0, _x2)), filter(_F0, _x2))]] [[qsort(nil)]] = 0 >= 0 = [[nil]] [[qsort(cons(_x0, _x1))]] = 0 >= 0 = [[app(qsort(filter(/\x.le(x, _x0), _x1)), app(cons(_x0, nil), qsort(filter(/\y.gr(y, _x0), _x1))))]] 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: le#(s(X), s(Y)) >? le#(X, Y) if(true, X, Y) >= X if(false, X, Y) >= Y app(nil, X) >= X app(cons(X, Y), Z) >= cons(X, app(Y, Z)) le(0, X) >= true le(s(X), 0) >= false le(s(X), s(Y)) >= le(X, Y) gr(0, X) >= false gr(s(X), 0) >= true gr(s(X), s(Y)) >= gr(X, Y) filter(F, nil) >= nil filter(F, cons(X, Y)) >= if(F X, cons(X, filter(F, Y)), filter(F, Y)) qsort(nil) >= nil qsort(cons(X, Y)) >= app(qsort(filter(/\x.le(x, X), Y)), app(cons(X, nil), qsort(filter(/\y.gr(y, X), Y)))) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: 0 = 3 app = \y0y1.y1 cons = \y0y1.0 false = 0 filter = \G0y1.0 gr = \y0y1.0 if = \y0y1y2.y1 + y2 le = \y0y1.0 le# = \y0y1.y1 nil = 0 qsort = \y0.0 s = \y0.3 + y0 true = 0 Using this interpretation, the requirements translate to: [[le#(s(_x0), s(_x1))]] = 3 + x1 > x1 = [[le#(_x0, _x1)]] [[if(true, _x0, _x1)]] = x0 + x1 >= x0 = [[_x0]] [[if(false, _x0, _x1)]] = x0 + x1 >= x1 = [[_x1]] [[app(nil, _x0)]] = x0 >= x0 = [[_x0]] [[app(cons(_x0, _x1), _x2)]] = x2 >= 0 = [[cons(_x0, app(_x1, _x2))]] [[le(0, _x0)]] = 0 >= 0 = [[true]] [[le(s(_x0), 0)]] = 0 >= 0 = [[false]] [[le(s(_x0), s(_x1))]] = 0 >= 0 = [[le(_x0, _x1)]] [[gr(0, _x0)]] = 0 >= 0 = [[false]] [[gr(s(_x0), 0)]] = 0 >= 0 = [[true]] [[gr(s(_x0), s(_x1))]] = 0 >= 0 = [[gr(_x0, _x1)]] [[filter(_F0, nil)]] = 0 >= 0 = [[nil]] [[filter(_F0, cons(_x1, _x2))]] = 0 >= 0 = [[if(_F0 _x1, cons(_x1, filter(_F0, _x2)), filter(_F0, _x2))]] [[qsort(nil)]] = 0 >= 0 = [[nil]] [[qsort(cons(_x0, _x1))]] = 0 >= 0 = [[app(qsort(filter(/\x.le(x, _x0), _x1)), app(cons(_x0, nil), qsort(filter(/\y.gr(y, _x0), _x1))))]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace a dependency pair problem (P_2, R_0) by ({}, R_0). By the empty set processor [Kop12, Thm. 7.15] this problem may be immediately removed. Thus, the original system is terminating if (P_1, R_0, static, formative) is finite. We consider the dependency pair problem (P_1, R_0, static, formative). We will use the reduction pair processor [Kop12, Thm. 7.16]. It suffices to find a standard reduction pair [Kop12, Def. 6.69]. Thus, we must orient: app#(cons(X, Y), Z) >? app#(Y, Z) if(true, X, Y) >= X if(false, X, Y) >= Y app(nil, X) >= X app(cons(X, Y), Z) >= cons(X, app(Y, Z)) le(0, X) >= true le(s(X), 0) >= false le(s(X), s(Y)) >= le(X, Y) gr(0, X) >= false gr(s(X), 0) >= true gr(s(X), s(Y)) >= gr(X, Y) filter(F, nil) >= nil filter(F, cons(X, Y)) >= if(F X, cons(X, filter(F, Y)), filter(F, Y)) qsort(nil) >= nil qsort(cons(X, Y)) >= app(qsort(filter(/\x.le(x, X), Y)), app(cons(X, nil), qsort(filter(/\y.gr(y, X), 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: [[false]] = _|_ [[filter(x_1, x_2)]] = filter(x_2) [[if(x_1, x_2, x_3)]] = if(x_2, x_3) [[le(x_1, x_2)]] = le(x_1) [[nil]] = _|_ [[true]] = _|_ We choose Lex = {} and Mul = {0, @_{o -> o}, app, app#, cons, filter, gr, if, le, qsort, s}, and the following precedence: 0 > @_{o -> o} > app# > gr > qsort > app > cons = filter > if > le = s Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: app#(cons(X, Y), Z) > app#(Y, Z) if(X, Y) >= X if(X, Y) >= Y app(_|_, X) >= X app(cons(X, Y), Z) >= cons(X, app(Y, Z)) le(0) >= _|_ le(s(X)) >= _|_ le(s(X)) >= le(X) gr(0, X) >= _|_ gr(s(X), 0) >= _|_ gr(s(X), s(Y)) >= gr(X, Y) filter(_|_) >= _|_ filter(cons(X, Y)) >= if(cons(X, filter(Y)), filter(Y)) qsort(_|_) >= _|_ qsort(cons(X, Y)) >= app(qsort(filter(Y)), app(cons(X, _|_), qsort(filter(Y)))) With these choices, we have: 1] app#(cons(X, Y), Z) > app#(Y, Z) because [2], by definition 2] app#*(cons(X, Y), Z) >= app#(Y, Z) because app# in Mul, [3] and [6], by (Stat) 3] cons(X, Y) > Y because [4], by definition 4] cons*(X, Y) >= Y because [5], by (Select) 5] Y >= Y by (Meta) 6] Z >= Z by (Meta) 7] if(X, Y) >= X because [8], by (Star) 8] if*(X, Y) >= X because [9], by (Select) 9] X >= X by (Meta) 10] if(X, Y) >= Y because [11], by (Star) 11] if*(X, Y) >= Y because [12], by (Select) 12] Y >= Y by (Meta) 13] app(_|_, X) >= X because [14], by (Star) 14] app*(_|_, X) >= X because [15], by (Select) 15] X >= X by (Meta) 16] app(cons(X, Y), Z) >= cons(X, app(Y, Z)) because [17], by (Star) 17] app*(cons(X, Y), Z) >= cons(X, app(Y, Z)) because app > cons, [18] and [22], by (Copy) 18] app*(cons(X, Y), Z) >= X because [19], by (Select) 19] cons(X, Y) >= X because [20], by (Star) 20] cons*(X, Y) >= X because [21], by (Select) 21] X >= X by (Meta) 22] app*(cons(X, Y), Z) >= app(Y, Z) because app in Mul, [3] and [6], by (Stat) 23] le(0) >= _|_ by (Bot) 24] le(s(X)) >= _|_ by (Bot) 25] le(s(X)) >= le(X) because [26], by (Star) 26] le*(s(X)) >= le(X) because [27], by (Select) 27] s(X) >= le(X) because s = le, s in Mul and [28], by (Fun) 28] X >= X by (Meta) 29] gr(0, X) >= _|_ by (Bot) 30] gr(s(X), 0) >= _|_ by (Bot) 31] gr(s(X), s(Y)) >= gr(X, Y) because [32], by (Star) 32] gr*(s(X), s(Y)) >= gr(X, Y) because gr in Mul, [33] and [36], by (Stat) 33] s(X) >= X because [34], by (Star) 34] s*(X) >= X because [35], by (Select) 35] X >= X by (Meta) 36] s(Y) > Y because [37], by definition 37] s*(Y) >= Y because [38], by (Select) 38] Y >= Y by (Meta) 39] filter(_|_) >= _|_ by (Bot) 40] filter(cons(X, Y)) >= if(cons(X, filter(Y)), filter(Y)) because [41], by (Star) 41] filter*(cons(X, Y)) >= if(cons(X, filter(Y)), filter(Y)) because filter > if, [42] and [49], by (Copy) 42] filter*(cons(X, Y)) >= cons(X, filter(Y)) because filter = cons, filter in Mul, [43] and [46], by (Stat) 43] cons(X, Y) > X because [44], by definition 44] cons*(X, Y) >= X because [45], by (Select) 45] X >= X by (Meta) 46] cons(X, Y) > filter(Y) because [47], by definition 47] cons*(X, Y) >= filter(Y) because cons = filter, cons in Mul and [48], by (Stat) 48] Y >= Y by (Meta) 49] filter*(cons(X, Y)) >= filter(Y) because [50], by (Select) 50] cons(X, Y) >= filter(Y) because [47], by (Star) 51] qsort(_|_) >= _|_ by (Bot) 52] qsort(cons(X, Y)) >= app(qsort(filter(Y)), app(cons(X, _|_), qsort(filter(Y)))) because [53], by (Star) 53] qsort*(cons(X, Y)) >= app(qsort(filter(Y)), app(cons(X, _|_), qsort(filter(Y)))) because qsort > app, [54] and [58], by (Copy) 54] qsort*(cons(X, Y)) >= qsort(filter(Y)) because qsort in Mul and [55], by (Stat) 55] cons(X, Y) > filter(Y) because [56], by definition 56] cons*(X, Y) >= filter(Y) because cons = filter, cons in Mul and [57], by (Stat) 57] Y >= Y by (Meta) 58] qsort*(cons(X, Y)) >= app(cons(X, _|_), qsort(filter(Y))) because qsort > app, [59] and [63], by (Copy) 59] qsort*(cons(X, Y)) >= cons(X, _|_) because [60], by (Select) 60] cons(X, Y) >= cons(X, _|_) because cons in Mul, [61] and [62], by (Fun) 61] X >= X by (Meta) 62] Y >= _|_ by (Bot) 63] qsort*(cons(X, Y)) >= qsort(filter(Y)) because qsort in Mul and [64], by (Stat) 64] cons(X, Y) > filter(Y) because [65], by definition 65] cons*(X, Y) >= filter(Y) because cons = filter, cons in Mul and [57], by (Stat) By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace a dependency pair problem (P_1, 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.