/export/starexec/sandbox/solver/bin/starexec_run_FirstOrder /export/starexec/sandbox/benchmark/theBenchmark.xml /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- YES We consider the system theBenchmark. We are asked to determine termination of the following first-order TRS. 0 : [] --> o active : [o] --> o add : [o * o] --> o cons : [o * o] --> o from : [o] --> o fst : [o * o] --> o len : [o] --> o mark : [o] --> o nil : [] --> o ok : [o] --> o proper : [o] --> o s : [o] --> o top : [o] --> o active(fst(0, X)) => mark(nil) active(fst(s(X), cons(Y, Z))) => mark(cons(Y, fst(X, Z))) active(from(X)) => mark(cons(X, from(s(X)))) active(add(0, X)) => mark(X) active(add(s(X), Y)) => mark(s(add(X, Y))) active(len(nil)) => mark(0) active(len(cons(X, Y))) => mark(s(len(Y))) active(cons(X, Y)) => cons(active(X), Y) active(fst(X, Y)) => fst(active(X), Y) active(fst(X, Y)) => fst(X, active(Y)) active(from(X)) => from(active(X)) active(add(X, Y)) => add(active(X), Y) active(add(X, Y)) => add(X, active(Y)) active(len(X)) => len(active(X)) cons(mark(X), Y) => mark(cons(X, Y)) fst(mark(X), Y) => mark(fst(X, Y)) fst(X, mark(Y)) => mark(fst(X, Y)) from(mark(X)) => mark(from(X)) add(mark(X), Y) => mark(add(X, Y)) add(X, mark(Y)) => mark(add(X, Y)) len(mark(X)) => mark(len(X)) proper(0) => ok(0) proper(s(X)) => s(proper(X)) proper(nil) => ok(nil) proper(cons(X, Y)) => cons(proper(X), proper(Y)) proper(fst(X, Y)) => fst(proper(X), proper(Y)) proper(from(X)) => from(proper(X)) proper(add(X, Y)) => add(proper(X), proper(Y)) proper(len(X)) => len(proper(X)) s(ok(X)) => ok(s(X)) cons(ok(X), ok(Y)) => ok(cons(X, Y)) fst(ok(X), ok(Y)) => ok(fst(X, Y)) from(ok(X)) => ok(from(X)) add(ok(X), ok(Y)) => ok(add(X, Y)) len(ok(X)) => ok(len(X)) top(mark(X)) => top(proper(X)) top(ok(X)) => top(active(X)) We use the dependency pair framework as described in [Kop12, Ch. 6/7], with static dependency pairs (see [KusIsoSakBla09] and the adaptation for AFSMs in [Kop12, Ch. 7.8]). We thus obtain the following dependency pair problem (P_0, R_0, minimal, formative): Dependency Pairs P_0: 0] active#(fst(s(X), cons(Y, Z))) =#> cons#(Y, fst(X, Z)) 1] active#(fst(s(X), cons(Y, Z))) =#> fst#(X, Z) 2] active#(from(X)) =#> cons#(X, from(s(X))) 3] active#(from(X)) =#> from#(s(X)) 4] active#(from(X)) =#> s#(X) 5] active#(add(s(X), Y)) =#> s#(add(X, Y)) 6] active#(add(s(X), Y)) =#> add#(X, Y) 7] active#(len(cons(X, Y))) =#> s#(len(Y)) 8] active#(len(cons(X, Y))) =#> len#(Y) 9] active#(cons(X, Y)) =#> cons#(active(X), Y) 10] active#(cons(X, Y)) =#> active#(X) 11] active#(fst(X, Y)) =#> fst#(active(X), Y) 12] active#(fst(X, Y)) =#> active#(X) 13] active#(fst(X, Y)) =#> fst#(X, active(Y)) 14] active#(fst(X, Y)) =#> active#(Y) 15] active#(from(X)) =#> from#(active(X)) 16] active#(from(X)) =#> active#(X) 17] active#(add(X, Y)) =#> add#(active(X), Y) 18] active#(add(X, Y)) =#> active#(X) 19] active#(add(X, Y)) =#> add#(X, active(Y)) 20] active#(add(X, Y)) =#> active#(Y) 21] active#(len(X)) =#> len#(active(X)) 22] active#(len(X)) =#> active#(X) 23] cons#(mark(X), Y) =#> cons#(X, Y) 24] fst#(mark(X), Y) =#> fst#(X, Y) 25] fst#(X, mark(Y)) =#> fst#(X, Y) 26] from#(mark(X)) =#> from#(X) 27] add#(mark(X), Y) =#> add#(X, Y) 28] add#(X, mark(Y)) =#> add#(X, Y) 29] len#(mark(X)) =#> len#(X) 30] proper#(s(X)) =#> s#(proper(X)) 31] proper#(s(X)) =#> proper#(X) 32] proper#(cons(X, Y)) =#> cons#(proper(X), proper(Y)) 33] proper#(cons(X, Y)) =#> proper#(X) 34] proper#(cons(X, Y)) =#> proper#(Y) 35] proper#(fst(X, Y)) =#> fst#(proper(X), proper(Y)) 36] proper#(fst(X, Y)) =#> proper#(X) 37] proper#(fst(X, Y)) =#> proper#(Y) 38] proper#(from(X)) =#> from#(proper(X)) 39] proper#(from(X)) =#> proper#(X) 40] proper#(add(X, Y)) =#> add#(proper(X), proper(Y)) 41] proper#(add(X, Y)) =#> proper#(X) 42] proper#(add(X, Y)) =#> proper#(Y) 43] proper#(len(X)) =#> len#(proper(X)) 44] proper#(len(X)) =#> proper#(X) 45] s#(ok(X)) =#> s#(X) 46] cons#(ok(X), ok(Y)) =#> cons#(X, Y) 47] fst#(ok(X), ok(Y)) =#> fst#(X, Y) 48] from#(ok(X)) =#> from#(X) 49] add#(ok(X), ok(Y)) =#> add#(X, Y) 50] len#(ok(X)) =#> len#(X) 51] top#(mark(X)) =#> top#(proper(X)) 52] top#(mark(X)) =#> proper#(X) 53] top#(ok(X)) =#> top#(active(X)) 54] top#(ok(X)) =#> active#(X) Rules R_0: active(fst(0, X)) => mark(nil) active(fst(s(X), cons(Y, Z))) => mark(cons(Y, fst(X, Z))) active(from(X)) => mark(cons(X, from(s(X)))) active(add(0, X)) => mark(X) active(add(s(X), Y)) => mark(s(add(X, Y))) active(len(nil)) => mark(0) active(len(cons(X, Y))) => mark(s(len(Y))) active(cons(X, Y)) => cons(active(X), Y) active(fst(X, Y)) => fst(active(X), Y) active(fst(X, Y)) => fst(X, active(Y)) active(from(X)) => from(active(X)) active(add(X, Y)) => add(active(X), Y) active(add(X, Y)) => add(X, active(Y)) active(len(X)) => len(active(X)) cons(mark(X), Y) => mark(cons(X, Y)) fst(mark(X), Y) => mark(fst(X, Y)) fst(X, mark(Y)) => mark(fst(X, Y)) from(mark(X)) => mark(from(X)) add(mark(X), Y) => mark(add(X, Y)) add(X, mark(Y)) => mark(add(X, Y)) len(mark(X)) => mark(len(X)) proper(0) => ok(0) proper(s(X)) => s(proper(X)) proper(nil) => ok(nil) proper(cons(X, Y)) => cons(proper(X), proper(Y)) proper(fst(X, Y)) => fst(proper(X), proper(Y)) proper(from(X)) => from(proper(X)) proper(add(X, Y)) => add(proper(X), proper(Y)) proper(len(X)) => len(proper(X)) s(ok(X)) => ok(s(X)) cons(ok(X), ok(Y)) => ok(cons(X, Y)) fst(ok(X), ok(Y)) => ok(fst(X, Y)) from(ok(X)) => ok(from(X)) add(ok(X), ok(Y)) => ok(add(X, Y)) len(ok(X)) => ok(len(X)) top(mark(X)) => top(proper(X)) top(ok(X)) => top(active(X)) Thus, the original system is terminating if (P_0, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_0, R_0, minimal, 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 : 23, 46 * 1 : 24, 25, 47 * 2 : 23, 46 * 3 : 48 * 4 : 45 * 5 : 45 * 6 : 27, 28, 49 * 7 : 45 * 8 : 29, 50 * 9 : 23, 46 * 10 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22 * 11 : 24, 25, 47 * 12 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22 * 13 : 24, 25, 47 * 14 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22 * 15 : 26, 48 * 16 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22 * 17 : 27, 28, 49 * 18 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22 * 19 : 27, 28, 49 * 20 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22 * 21 : 29, 50 * 22 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22 * 23 : 23, 46 * 24 : 24, 25, 47 * 25 : 24, 25, 47 * 26 : 26, 48 * 27 : 27, 28, 49 * 28 : 27, 28, 49 * 29 : 29, 50 * 30 : 45 * 31 : 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 * 32 : 23, 46 * 33 : 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 * 34 : 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 * 35 : 24, 25, 47 * 36 : 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 * 37 : 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 * 38 : 26, 48 * 39 : 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 * 40 : 27, 28, 49 * 41 : 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 * 42 : 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 * 43 : 29, 50 * 44 : 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 * 45 : 45 * 46 : 23, 46 * 47 : 24, 25, 47 * 48 : 26, 48 * 49 : 27, 28, 49 * 50 : 29, 50 * 51 : 51, 52, 53, 54 * 52 : 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 * 53 : 51, 52, 53, 54 * 54 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22 This graph has the following strongly connected components: P_1: active#(cons(X, Y)) =#> active#(X) active#(fst(X, Y)) =#> active#(X) active#(fst(X, Y)) =#> active#(Y) active#(from(X)) =#> active#(X) active#(add(X, Y)) =#> active#(X) active#(add(X, Y)) =#> active#(Y) active#(len(X)) =#> active#(X) P_2: cons#(mark(X), Y) =#> cons#(X, Y) cons#(ok(X), ok(Y)) =#> cons#(X, Y) P_3: fst#(mark(X), Y) =#> fst#(X, Y) fst#(X, mark(Y)) =#> fst#(X, Y) fst#(ok(X), ok(Y)) =#> fst#(X, Y) P_4: from#(mark(X)) =#> from#(X) from#(ok(X)) =#> from#(X) P_5: add#(mark(X), Y) =#> add#(X, Y) add#(X, mark(Y)) =#> add#(X, Y) add#(ok(X), ok(Y)) =#> add#(X, Y) P_6: len#(mark(X)) =#> len#(X) len#(ok(X)) =#> len#(X) P_7: proper#(s(X)) =#> proper#(X) proper#(cons(X, Y)) =#> proper#(X) proper#(cons(X, Y)) =#> proper#(Y) proper#(fst(X, Y)) =#> proper#(X) proper#(fst(X, Y)) =#> proper#(Y) proper#(from(X)) =#> proper#(X) proper#(add(X, Y)) =#> proper#(X) proper#(add(X, Y)) =#> proper#(Y) proper#(len(X)) =#> proper#(X) P_8: s#(ok(X)) =#> s#(X) P_9: top#(mark(X)) =#> top#(proper(X)) top#(ok(X)) =#> top#(active(X)) 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), (P_5, R_0, m, f), (P_6, R_0, m, f), (P_7, R_0, m, f), (P_8, R_0, m, f) and (P_9, R_0, m, f). Thus, the original system is terminating if each of (P_1, R_0, minimal, formative), (P_2, R_0, minimal, formative), (P_3, R_0, minimal, formative), (P_4, R_0, minimal, formative), (P_5, R_0, minimal, formative), (P_6, R_0, minimal, formative), (P_7, R_0, minimal, formative), (P_8, R_0, minimal, formative) and (P_9, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_9, R_0, minimal, formative). The formative rules of (P_9, R_0) are R_1 ::= active(fst(0, X)) => mark(nil) active(fst(s(X), cons(Y, Z))) => mark(cons(Y, fst(X, Z))) active(from(X)) => mark(cons(X, from(s(X)))) active(add(0, X)) => mark(X) active(add(s(X), Y)) => mark(s(add(X, Y))) active(len(nil)) => mark(0) active(len(cons(X, Y))) => mark(s(len(Y))) active(cons(X, Y)) => cons(active(X), Y) active(fst(X, Y)) => fst(active(X), Y) active(fst(X, Y)) => fst(X, active(Y)) active(from(X)) => from(active(X)) active(add(X, Y)) => add(active(X), Y) active(add(X, Y)) => add(X, active(Y)) active(len(X)) => len(active(X)) cons(mark(X), Y) => mark(cons(X, Y)) fst(mark(X), Y) => mark(fst(X, Y)) fst(X, mark(Y)) => mark(fst(X, Y)) from(mark(X)) => mark(from(X)) add(mark(X), Y) => mark(add(X, Y)) add(X, mark(Y)) => mark(add(X, Y)) len(mark(X)) => mark(len(X)) proper(0) => ok(0) proper(s(X)) => s(proper(X)) proper(nil) => ok(nil) proper(cons(X, Y)) => cons(proper(X), proper(Y)) proper(fst(X, Y)) => fst(proper(X), proper(Y)) proper(from(X)) => from(proper(X)) proper(add(X, Y)) => add(proper(X), proper(Y)) proper(len(X)) => len(proper(X)) s(ok(X)) => ok(s(X)) cons(ok(X), ok(Y)) => ok(cons(X, Y)) fst(ok(X), ok(Y)) => ok(fst(X, Y)) from(ok(X)) => ok(from(X)) add(ok(X), ok(Y)) => ok(add(X, Y)) len(ok(X)) => ok(len(X)) By [Kop12, Thm. 7.17], we may replace the dependency pair problem (P_9, R_0, minimal, formative) by (P_9, R_1, minimal, formative). Thus, the original system is terminating if each of (P_1, R_0, minimal, formative), (P_2, R_0, minimal, formative), (P_3, R_0, minimal, formative), (P_4, R_0, minimal, formative), (P_5, R_0, minimal, formative), (P_6, R_0, minimal, formative), (P_7, R_0, minimal, formative), (P_8, R_0, minimal, formative) and (P_9, R_1, minimal, formative) is finite. We consider the dependency pair problem (P_9, R_1, minimal, 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: top#(mark(X)) >? top#(proper(X)) top#(ok(X)) >? top#(active(X)) active(fst(0, X)) >= mark(nil) active(fst(s(X), cons(Y, Z))) >= mark(cons(Y, fst(X, Z))) active(from(X)) >= mark(cons(X, from(s(X)))) active(add(0, X)) >= mark(X) active(add(s(X), Y)) >= mark(s(add(X, Y))) active(len(nil)) >= mark(0) active(len(cons(X, Y))) >= mark(s(len(Y))) active(cons(X, Y)) >= cons(active(X), Y) active(fst(X, Y)) >= fst(active(X), Y) active(fst(X, Y)) >= fst(X, active(Y)) active(from(X)) >= from(active(X)) active(add(X, Y)) >= add(active(X), Y) active(add(X, Y)) >= add(X, active(Y)) active(len(X)) >= len(active(X)) cons(mark(X), Y) >= mark(cons(X, Y)) fst(mark(X), Y) >= mark(fst(X, Y)) fst(X, mark(Y)) >= mark(fst(X, Y)) from(mark(X)) >= mark(from(X)) add(mark(X), Y) >= mark(add(X, Y)) add(X, mark(Y)) >= mark(add(X, Y)) len(mark(X)) >= mark(len(X)) proper(0) >= ok(0) proper(s(X)) >= s(proper(X)) proper(nil) >= ok(nil) proper(cons(X, Y)) >= cons(proper(X), proper(Y)) proper(fst(X, Y)) >= fst(proper(X), proper(Y)) proper(from(X)) >= from(proper(X)) proper(add(X, Y)) >= add(proper(X), proper(Y)) proper(len(X)) >= len(proper(X)) s(ok(X)) >= ok(s(X)) cons(ok(X), ok(Y)) >= ok(cons(X, Y)) fst(ok(X), ok(Y)) >= ok(fst(X, Y)) from(ok(X)) >= ok(from(X)) add(ok(X), ok(Y)) >= ok(add(X, Y)) len(ok(X)) >= ok(len(X)) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: 0 = 0 active = \y0.y0 add = \y0y1.1 + y0 + y1 cons = \y0y1.2y0 from = \y0.1 + 2y0 fst = \y0y1.1 + 2y1 + 3y0 len = \y0.1 + 2y0 mark = \y0.1 + y0 nil = 0 ok = \y0.y0 proper = \y0.y0 s = \y0.0 top# = \y0.y0 Using this interpretation, the requirements translate to: [[top#(mark(_x0))]] = 1 + x0 > x0 = [[top#(proper(_x0))]] [[top#(ok(_x0))]] = x0 >= x0 = [[top#(active(_x0))]] [[active(fst(0, _x0))]] = 1 + 2x0 >= 1 = [[mark(nil)]] [[active(fst(s(_x0), cons(_x1, _x2)))]] = 1 + 4x1 >= 1 + 2x1 = [[mark(cons(_x1, fst(_x0, _x2)))]] [[active(from(_x0))]] = 1 + 2x0 >= 1 + 2x0 = [[mark(cons(_x0, from(s(_x0))))]] [[active(add(0, _x0))]] = 1 + x0 >= 1 + x0 = [[mark(_x0)]] [[active(add(s(_x0), _x1))]] = 1 + x1 >= 1 = [[mark(s(add(_x0, _x1)))]] [[active(len(nil))]] = 1 >= 1 = [[mark(0)]] [[active(len(cons(_x0, _x1)))]] = 1 + 4x0 >= 1 = [[mark(s(len(_x1)))]] [[active(cons(_x0, _x1))]] = 2x0 >= 2x0 = [[cons(active(_x0), _x1)]] [[active(fst(_x0, _x1))]] = 1 + 2x1 + 3x0 >= 1 + 2x1 + 3x0 = [[fst(active(_x0), _x1)]] [[active(fst(_x0, _x1))]] = 1 + 2x1 + 3x0 >= 1 + 2x1 + 3x0 = [[fst(_x0, active(_x1))]] [[active(from(_x0))]] = 1 + 2x0 >= 1 + 2x0 = [[from(active(_x0))]] [[active(add(_x0, _x1))]] = 1 + x0 + x1 >= 1 + x0 + x1 = [[add(active(_x0), _x1)]] [[active(add(_x0, _x1))]] = 1 + x0 + x1 >= 1 + x0 + x1 = [[add(_x0, active(_x1))]] [[active(len(_x0))]] = 1 + 2x0 >= 1 + 2x0 = [[len(active(_x0))]] [[cons(mark(_x0), _x1)]] = 2 + 2x0 >= 1 + 2x0 = [[mark(cons(_x0, _x1))]] [[fst(mark(_x0), _x1)]] = 4 + 2x1 + 3x0 >= 2 + 2x1 + 3x0 = [[mark(fst(_x0, _x1))]] [[fst(_x0, mark(_x1))]] = 3 + 2x1 + 3x0 >= 2 + 2x1 + 3x0 = [[mark(fst(_x0, _x1))]] [[from(mark(_x0))]] = 3 + 2x0 >= 2 + 2x0 = [[mark(from(_x0))]] [[add(mark(_x0), _x1)]] = 2 + x0 + x1 >= 2 + x0 + x1 = [[mark(add(_x0, _x1))]] [[add(_x0, mark(_x1))]] = 2 + x0 + x1 >= 2 + x0 + x1 = [[mark(add(_x0, _x1))]] [[len(mark(_x0))]] = 3 + 2x0 >= 2 + 2x0 = [[mark(len(_x0))]] [[proper(0)]] = 0 >= 0 = [[ok(0)]] [[proper(s(_x0))]] = 0 >= 0 = [[s(proper(_x0))]] [[proper(nil)]] = 0 >= 0 = [[ok(nil)]] [[proper(cons(_x0, _x1))]] = 2x0 >= 2x0 = [[cons(proper(_x0), proper(_x1))]] [[proper(fst(_x0, _x1))]] = 1 + 2x1 + 3x0 >= 1 + 2x1 + 3x0 = [[fst(proper(_x0), proper(_x1))]] [[proper(from(_x0))]] = 1 + 2x0 >= 1 + 2x0 = [[from(proper(_x0))]] [[proper(add(_x0, _x1))]] = 1 + x0 + x1 >= 1 + x0 + x1 = [[add(proper(_x0), proper(_x1))]] [[proper(len(_x0))]] = 1 + 2x0 >= 1 + 2x0 = [[len(proper(_x0))]] [[s(ok(_x0))]] = 0 >= 0 = [[ok(s(_x0))]] [[cons(ok(_x0), ok(_x1))]] = 2x0 >= 2x0 = [[ok(cons(_x0, _x1))]] [[fst(ok(_x0), ok(_x1))]] = 1 + 2x1 + 3x0 >= 1 + 2x1 + 3x0 = [[ok(fst(_x0, _x1))]] [[from(ok(_x0))]] = 1 + 2x0 >= 1 + 2x0 = [[ok(from(_x0))]] [[add(ok(_x0), ok(_x1))]] = 1 + x0 + x1 >= 1 + x0 + x1 = [[ok(add(_x0, _x1))]] [[len(ok(_x0))]] = 1 + 2x0 >= 1 + 2x0 = [[ok(len(_x0))]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace the dependency pair problem (P_9, R_1, minimal, formative) by (P_10, R_1, minimal, formative), where P_10 consists of: top#(ok(X)) =#> top#(active(X)) Thus, the original system is terminating if each of (P_1, R_0, minimal, formative), (P_2, R_0, minimal, formative), (P_3, R_0, minimal, formative), (P_4, R_0, minimal, formative), (P_5, R_0, minimal, formative), (P_6, R_0, minimal, formative), (P_7, R_0, minimal, formative), (P_8, R_0, minimal, formative) and (P_10, R_1, minimal, formative) is finite. We consider the dependency pair problem (P_10, R_1, minimal, formative). The formative rules of (P_10, R_1) are R_2 ::= active(cons(X, Y)) => cons(active(X), Y) active(fst(X, Y)) => fst(active(X), Y) active(fst(X, Y)) => fst(X, active(Y)) active(from(X)) => from(active(X)) active(add(X, Y)) => add(active(X), Y) active(add(X, Y)) => add(X, active(Y)) active(len(X)) => len(active(X)) proper(0) => ok(0) proper(s(X)) => s(proper(X)) proper(nil) => ok(nil) proper(cons(X, Y)) => cons(proper(X), proper(Y)) proper(fst(X, Y)) => fst(proper(X), proper(Y)) proper(from(X)) => from(proper(X)) proper(add(X, Y)) => add(proper(X), proper(Y)) proper(len(X)) => len(proper(X)) s(ok(X)) => ok(s(X)) cons(ok(X), ok(Y)) => ok(cons(X, Y)) fst(ok(X), ok(Y)) => ok(fst(X, Y)) from(ok(X)) => ok(from(X)) add(ok(X), ok(Y)) => ok(add(X, Y)) len(ok(X)) => ok(len(X)) By [Kop12, Thm. 7.17], we may replace the dependency pair problem (P_10, R_1, minimal, formative) by (P_10, R_2, minimal, formative). Thus, the original system is terminating if each of (P_1, R_0, minimal, formative), (P_2, R_0, minimal, formative), (P_3, R_0, minimal, formative), (P_4, R_0, minimal, formative), (P_5, R_0, minimal, formative), (P_6, R_0, minimal, formative), (P_7, R_0, minimal, formative), (P_8, R_0, minimal, formative) and (P_10, R_2, minimal, formative) is finite. We consider the dependency pair problem (P_10, R_2, minimal, formative). We will use the reduction pair processor with usable rules [Kop12, Thm. 7.44]. The usable rules of (P_10, R_2) are: active(cons(X, Y)) => cons(active(X), Y) active(fst(X, Y)) => fst(active(X), Y) active(fst(X, Y)) => fst(X, active(Y)) active(from(X)) => from(active(X)) active(add(X, Y)) => add(active(X), Y) active(add(X, Y)) => add(X, active(Y)) active(len(X)) => len(active(X)) cons(ok(X), ok(Y)) => ok(cons(X, Y)) fst(ok(X), ok(Y)) => ok(fst(X, Y)) from(ok(X)) => ok(from(X)) add(ok(X), ok(Y)) => ok(add(X, Y)) len(ok(X)) => ok(len(X)) It suffices to find a standard reduction pair [Kop12, Def. 6.69]. Thus, we must orient: top#(ok(X)) >? top#(active(X)) active(cons(X, Y)) >= cons(active(X), Y) active(fst(X, Y)) >= fst(active(X), Y) active(fst(X, Y)) >= fst(X, active(Y)) active(from(X)) >= from(active(X)) active(add(X, Y)) >= add(active(X), Y) active(add(X, Y)) >= add(X, active(Y)) active(len(X)) >= len(active(X)) cons(ok(X), ok(Y)) >= ok(cons(X, Y)) fst(ok(X), ok(Y)) >= ok(fst(X, Y)) from(ok(X)) >= ok(from(X)) add(ok(X), ok(Y)) >= ok(add(X, Y)) len(ok(X)) >= ok(len(X)) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: active = \y0.1 + 3y0 add = \y0y1.1 + 3y1 cons = \y0y1.y1 from = \y0.1 + 3y0 fst = \y0y1.3 + y0 + 2y1 len = \y0.y0 ok = \y0.3 + 3y0 top# = \y0.3y0 Using this interpretation, the requirements translate to: [[top#(ok(_x0))]] = 9 + 9x0 > 3 + 9x0 = [[top#(active(_x0))]] [[active(cons(_x0, _x1))]] = 1 + 3x1 >= x1 = [[cons(active(_x0), _x1)]] [[active(fst(_x0, _x1))]] = 10 + 3x0 + 6x1 >= 4 + 2x1 + 3x0 = [[fst(active(_x0), _x1)]] [[active(fst(_x0, _x1))]] = 10 + 3x0 + 6x1 >= 5 + x0 + 6x1 = [[fst(_x0, active(_x1))]] [[active(from(_x0))]] = 4 + 9x0 >= 4 + 9x0 = [[from(active(_x0))]] [[active(add(_x0, _x1))]] = 4 + 9x1 >= 1 + 3x1 = [[add(active(_x0), _x1)]] [[active(add(_x0, _x1))]] = 4 + 9x1 >= 4 + 9x1 = [[add(_x0, active(_x1))]] [[active(len(_x0))]] = 1 + 3x0 >= 1 + 3x0 = [[len(active(_x0))]] [[cons(ok(_x0), ok(_x1))]] = 3 + 3x1 >= 3 + 3x1 = [[ok(cons(_x0, _x1))]] [[fst(ok(_x0), ok(_x1))]] = 12 + 3x0 + 6x1 >= 12 + 3x0 + 6x1 = [[ok(fst(_x0, _x1))]] [[from(ok(_x0))]] = 10 + 9x0 >= 6 + 9x0 = [[ok(from(_x0))]] [[add(ok(_x0), ok(_x1))]] = 10 + 9x1 >= 6 + 9x1 = [[ok(add(_x0, _x1))]] [[len(ok(_x0))]] = 3 + 3x0 >= 3 + 3x0 = [[ok(len(_x0))]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace a dependency pair problem (P_10, R_2) by ({}, R_2). 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, minimal, formative), (P_2, R_0, minimal, formative), (P_3, R_0, minimal, formative), (P_4, R_0, minimal, formative), (P_5, R_0, minimal, formative), (P_6, R_0, minimal, formative), (P_7, R_0, minimal, formative) and (P_8, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_8, R_0, minimal, formative). We apply the subterm criterion with the following projection function: nu(s#) = 1 Thus, we can orient the dependency pairs as follows: nu(s#(ok(X))) = ok(X) |> X = nu(s#(X)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_8, R_0, minimal, f) by ({}, R_0, minimal, f). 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, minimal, formative), (P_2, R_0, minimal, formative), (P_3, R_0, minimal, formative), (P_4, R_0, minimal, formative), (P_5, R_0, minimal, formative), (P_6, R_0, minimal, formative) and (P_7, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_7, R_0, minimal, formative). We apply the subterm criterion with the following projection function: nu(proper#) = 1 Thus, we can orient the dependency pairs as follows: nu(proper#(s(X))) = s(X) |> X = nu(proper#(X)) nu(proper#(cons(X, Y))) = cons(X, Y) |> X = nu(proper#(X)) nu(proper#(cons(X, Y))) = cons(X, Y) |> Y = nu(proper#(Y)) nu(proper#(fst(X, Y))) = fst(X, Y) |> X = nu(proper#(X)) nu(proper#(fst(X, Y))) = fst(X, Y) |> Y = nu(proper#(Y)) nu(proper#(from(X))) = from(X) |> X = nu(proper#(X)) nu(proper#(add(X, Y))) = add(X, Y) |> X = nu(proper#(X)) nu(proper#(add(X, Y))) = add(X, Y) |> Y = nu(proper#(Y)) nu(proper#(len(X))) = len(X) |> X = nu(proper#(X)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_7, R_0, minimal, f) by ({}, R_0, minimal, f). 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, minimal, formative), (P_2, R_0, minimal, formative), (P_3, R_0, minimal, formative), (P_4, R_0, minimal, formative), (P_5, R_0, minimal, formative) and (P_6, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_6, R_0, minimal, formative). We apply the subterm criterion with the following projection function: nu(len#) = 1 Thus, we can orient the dependency pairs as follows: nu(len#(mark(X))) = mark(X) |> X = nu(len#(X)) nu(len#(ok(X))) = ok(X) |> X = nu(len#(X)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_6, R_0, minimal, f) by ({}, R_0, minimal, f). 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, minimal, formative), (P_2, R_0, minimal, formative), (P_3, R_0, minimal, formative), (P_4, R_0, minimal, formative) and (P_5, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_5, R_0, minimal, formative). We apply the subterm criterion with the following projection function: nu(add#) = 1 Thus, we can orient the dependency pairs as follows: nu(add#(mark(X), Y)) = mark(X) |> X = nu(add#(X, Y)) nu(add#(X, mark(Y))) = X = X = nu(add#(X, Y)) nu(add#(ok(X), ok(Y))) = ok(X) |> X = nu(add#(X, Y)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_5, R_0, minimal, f) by (P_11, R_0, minimal, f), where P_11 contains: add#(X, mark(Y)) =#> add#(X, Y) Thus, the original system is terminating if each of (P_1, R_0, minimal, formative), (P_2, R_0, minimal, formative), (P_3, R_0, minimal, formative), (P_4, R_0, minimal, formative) and (P_11, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_11, R_0, minimal, formative). We apply the subterm criterion with the following projection function: nu(add#) = 2 Thus, we can orient the dependency pairs as follows: nu(add#(X, mark(Y))) = mark(Y) |> Y = nu(add#(X, Y)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_11, R_0, minimal, f) by ({}, R_0, minimal, f). 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, minimal, formative), (P_2, R_0, minimal, formative), (P_3, R_0, minimal, formative) and (P_4, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_4, R_0, minimal, formative). We apply the subterm criterion with the following projection function: nu(from#) = 1 Thus, we can orient the dependency pairs as follows: nu(from#(mark(X))) = mark(X) |> X = nu(from#(X)) nu(from#(ok(X))) = ok(X) |> X = nu(from#(X)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_4, R_0, minimal, f) by ({}, R_0, minimal, f). 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, minimal, formative), (P_2, R_0, minimal, formative) and (P_3, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_3, R_0, minimal, formative). We apply the subterm criterion with the following projection function: nu(fst#) = 1 Thus, we can orient the dependency pairs as follows: nu(fst#(mark(X), Y)) = mark(X) |> X = nu(fst#(X, Y)) nu(fst#(X, mark(Y))) = X = X = nu(fst#(X, Y)) nu(fst#(ok(X), ok(Y))) = ok(X) |> X = nu(fst#(X, Y)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_3, R_0, minimal, f) by (P_12, R_0, minimal, f), where P_12 contains: fst#(X, mark(Y)) =#> fst#(X, Y) Thus, the original system is terminating if each of (P_1, R_0, minimal, formative), (P_2, R_0, minimal, formative) and (P_12, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_12, R_0, minimal, formative). We apply the subterm criterion with the following projection function: nu(fst#) = 2 Thus, we can orient the dependency pairs as follows: nu(fst#(X, mark(Y))) = mark(Y) |> Y = nu(fst#(X, Y)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_12, R_0, minimal, f) by ({}, R_0, minimal, f). 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, minimal, formative) and (P_2, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_2, R_0, minimal, formative). We apply the subterm criterion with the following projection function: nu(cons#) = 1 Thus, we can orient the dependency pairs as follows: nu(cons#(mark(X), Y)) = mark(X) |> X = nu(cons#(X, Y)) nu(cons#(ok(X), ok(Y))) = ok(X) |> X = nu(cons#(X, Y)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_2, R_0, minimal, f) by ({}, R_0, minimal, f). 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, minimal, formative) is finite. We consider the dependency pair problem (P_1, R_0, minimal, formative). We apply the subterm criterion with the following projection function: nu(active#) = 1 Thus, we can orient the dependency pairs as follows: nu(active#(cons(X, Y))) = cons(X, Y) |> X = nu(active#(X)) nu(active#(fst(X, Y))) = fst(X, Y) |> X = nu(active#(X)) nu(active#(fst(X, Y))) = fst(X, Y) |> Y = nu(active#(Y)) nu(active#(from(X))) = from(X) |> X = nu(active#(X)) nu(active#(add(X, Y))) = add(X, Y) |> X = nu(active#(X)) nu(active#(add(X, Y))) = add(X, Y) |> Y = nu(active#(Y)) nu(active#(len(X))) = len(X) |> X = nu(active#(X)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_1, R_0, minimal, f) by ({}, R_0, minimal, f). 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. [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.