/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. active : [o] --> o app : [o * o] --> o cons : [o * o] --> o from : [o] --> o mark : [o] --> o nil : [] --> o ok : [o] --> o prefix : [o] --> o proper : [o] --> o s : [o] --> o top : [o] --> o zWadr : [o * o] --> o active(app(nil, X)) => mark(X) active(app(cons(X, Y), Z)) => mark(cons(X, app(Y, Z))) active(from(X)) => mark(cons(X, from(s(X)))) active(zWadr(nil, X)) => mark(nil) active(zWadr(X, nil)) => mark(nil) active(zWadr(cons(X, Y), cons(Z, U))) => mark(cons(app(Z, cons(X, nil)), zWadr(Y, U))) active(prefix(X)) => mark(cons(nil, zWadr(X, prefix(X)))) active(app(X, Y)) => app(active(X), Y) active(app(X, Y)) => app(X, active(Y)) active(cons(X, Y)) => cons(active(X), Y) active(from(X)) => from(active(X)) active(s(X)) => s(active(X)) active(zWadr(X, Y)) => zWadr(active(X), Y) active(zWadr(X, Y)) => zWadr(X, active(Y)) active(prefix(X)) => prefix(active(X)) app(mark(X), Y) => mark(app(X, Y)) app(X, mark(Y)) => mark(app(X, Y)) cons(mark(X), Y) => mark(cons(X, Y)) from(mark(X)) => mark(from(X)) s(mark(X)) => mark(s(X)) zWadr(mark(X), Y) => mark(zWadr(X, Y)) zWadr(X, mark(Y)) => mark(zWadr(X, Y)) prefix(mark(X)) => mark(prefix(X)) proper(app(X, Y)) => app(proper(X), proper(Y)) proper(nil) => ok(nil) proper(cons(X, Y)) => cons(proper(X), proper(Y)) proper(from(X)) => from(proper(X)) proper(s(X)) => s(proper(X)) proper(zWadr(X, Y)) => zWadr(proper(X), proper(Y)) proper(prefix(X)) => prefix(proper(X)) app(ok(X), ok(Y)) => ok(app(X, Y)) cons(ok(X), ok(Y)) => ok(cons(X, Y)) from(ok(X)) => ok(from(X)) s(ok(X)) => ok(s(X)) zWadr(ok(X), ok(Y)) => ok(zWadr(X, Y)) prefix(ok(X)) => ok(prefix(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#(app(cons(X, Y), Z)) =#> cons#(X, app(Y, Z)) 1] active#(app(cons(X, Y), Z)) =#> app#(Y, 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#(zWadr(cons(X, Y), cons(Z, U))) =#> cons#(app(Z, cons(X, nil)), zWadr(Y, U)) 6] active#(zWadr(cons(X, Y), cons(Z, U))) =#> app#(Z, cons(X, nil)) 7] active#(zWadr(cons(X, Y), cons(Z, U))) =#> cons#(X, nil) 8] active#(zWadr(cons(X, Y), cons(Z, U))) =#> zWadr#(Y, U) 9] active#(prefix(X)) =#> cons#(nil, zWadr(X, prefix(X))) 10] active#(prefix(X)) =#> zWadr#(X, prefix(X)) 11] active#(prefix(X)) =#> prefix#(X) 12] active#(app(X, Y)) =#> app#(active(X), Y) 13] active#(app(X, Y)) =#> active#(X) 14] active#(app(X, Y)) =#> app#(X, active(Y)) 15] active#(app(X, Y)) =#> active#(Y) 16] active#(cons(X, Y)) =#> cons#(active(X), Y) 17] active#(cons(X, Y)) =#> active#(X) 18] active#(from(X)) =#> from#(active(X)) 19] active#(from(X)) =#> active#(X) 20] active#(s(X)) =#> s#(active(X)) 21] active#(s(X)) =#> active#(X) 22] active#(zWadr(X, Y)) =#> zWadr#(active(X), Y) 23] active#(zWadr(X, Y)) =#> active#(X) 24] active#(zWadr(X, Y)) =#> zWadr#(X, active(Y)) 25] active#(zWadr(X, Y)) =#> active#(Y) 26] active#(prefix(X)) =#> prefix#(active(X)) 27] active#(prefix(X)) =#> active#(X) 28] app#(mark(X), Y) =#> app#(X, Y) 29] app#(X, mark(Y)) =#> app#(X, Y) 30] cons#(mark(X), Y) =#> cons#(X, Y) 31] from#(mark(X)) =#> from#(X) 32] s#(mark(X)) =#> s#(X) 33] zWadr#(mark(X), Y) =#> zWadr#(X, Y) 34] zWadr#(X, mark(Y)) =#> zWadr#(X, Y) 35] prefix#(mark(X)) =#> prefix#(X) 36] proper#(app(X, Y)) =#> app#(proper(X), proper(Y)) 37] proper#(app(X, Y)) =#> proper#(X) 38] proper#(app(X, Y)) =#> proper#(Y) 39] proper#(cons(X, Y)) =#> cons#(proper(X), proper(Y)) 40] proper#(cons(X, Y)) =#> proper#(X) 41] proper#(cons(X, Y)) =#> proper#(Y) 42] proper#(from(X)) =#> from#(proper(X)) 43] proper#(from(X)) =#> proper#(X) 44] proper#(s(X)) =#> s#(proper(X)) 45] proper#(s(X)) =#> proper#(X) 46] proper#(zWadr(X, Y)) =#> zWadr#(proper(X), proper(Y)) 47] proper#(zWadr(X, Y)) =#> proper#(X) 48] proper#(zWadr(X, Y)) =#> proper#(Y) 49] proper#(prefix(X)) =#> prefix#(proper(X)) 50] proper#(prefix(X)) =#> proper#(X) 51] app#(ok(X), ok(Y)) =#> app#(X, Y) 52] cons#(ok(X), ok(Y)) =#> cons#(X, Y) 53] from#(ok(X)) =#> from#(X) 54] s#(ok(X)) =#> s#(X) 55] zWadr#(ok(X), ok(Y)) =#> zWadr#(X, Y) 56] prefix#(ok(X)) =#> prefix#(X) 57] top#(mark(X)) =#> top#(proper(X)) 58] top#(mark(X)) =#> proper#(X) 59] top#(ok(X)) =#> top#(active(X)) 60] top#(ok(X)) =#> active#(X) Rules R_0: active(app(nil, X)) => mark(X) active(app(cons(X, Y), Z)) => mark(cons(X, app(Y, Z))) active(from(X)) => mark(cons(X, from(s(X)))) active(zWadr(nil, X)) => mark(nil) active(zWadr(X, nil)) => mark(nil) active(zWadr(cons(X, Y), cons(Z, U))) => mark(cons(app(Z, cons(X, nil)), zWadr(Y, U))) active(prefix(X)) => mark(cons(nil, zWadr(X, prefix(X)))) active(app(X, Y)) => app(active(X), Y) active(app(X, Y)) => app(X, active(Y)) active(cons(X, Y)) => cons(active(X), Y) active(from(X)) => from(active(X)) active(s(X)) => s(active(X)) active(zWadr(X, Y)) => zWadr(active(X), Y) active(zWadr(X, Y)) => zWadr(X, active(Y)) active(prefix(X)) => prefix(active(X)) app(mark(X), Y) => mark(app(X, Y)) app(X, mark(Y)) => mark(app(X, Y)) cons(mark(X), Y) => mark(cons(X, Y)) from(mark(X)) => mark(from(X)) s(mark(X)) => mark(s(X)) zWadr(mark(X), Y) => mark(zWadr(X, Y)) zWadr(X, mark(Y)) => mark(zWadr(X, Y)) prefix(mark(X)) => mark(prefix(X)) proper(app(X, Y)) => app(proper(X), proper(Y)) proper(nil) => ok(nil) proper(cons(X, Y)) => cons(proper(X), proper(Y)) proper(from(X)) => from(proper(X)) proper(s(X)) => s(proper(X)) proper(zWadr(X, Y)) => zWadr(proper(X), proper(Y)) proper(prefix(X)) => prefix(proper(X)) app(ok(X), ok(Y)) => ok(app(X, Y)) cons(ok(X), ok(Y)) => ok(cons(X, Y)) from(ok(X)) => ok(from(X)) s(ok(X)) => ok(s(X)) zWadr(ok(X), ok(Y)) => ok(zWadr(X, Y)) prefix(ok(X)) => ok(prefix(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 : 30, 52 * 1 : 28, 29, 51 * 2 : 30, 52 * 3 : 31, 53 * 4 : 32, 54 * 5 : 30, 52 * 6 : 28, 29, 51 * 7 : 30 * 8 : 33, 34, 55 * 9 : * 10 : 33, 34, 55 * 11 : 35, 56 * 12 : 28, 29, 51 * 13 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 * 14 : 28, 29, 51 * 15 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 * 16 : 30, 52 * 17 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 * 18 : 31, 53 * 19 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 * 20 : 32, 54 * 21 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 * 22 : 33, 34, 55 * 23 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 * 24 : 33, 34, 55 * 25 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 * 26 : 35, 56 * 27 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 * 28 : 28, 29, 51 * 29 : 28, 29, 51 * 30 : 30, 52 * 31 : 31, 53 * 32 : 32, 54 * 33 : 33, 34, 55 * 34 : 33, 34, 55 * 35 : 35, 56 * 36 : 28, 29, 51 * 37 : 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50 * 38 : 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50 * 39 : 30, 52 * 40 : 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50 * 41 : 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50 * 42 : 31, 53 * 43 : 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50 * 44 : 32, 54 * 45 : 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50 * 46 : 33, 34, 55 * 47 : 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50 * 48 : 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50 * 49 : 35, 56 * 50 : 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50 * 51 : 28, 29, 51 * 52 : 30, 52 * 53 : 31, 53 * 54 : 32, 54 * 55 : 33, 34, 55 * 56 : 35, 56 * 57 : 57, 58, 59, 60 * 58 : 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50 * 59 : 57, 58, 59, 60 * 60 : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 This graph has the following strongly connected components: P_1: active#(app(X, Y)) =#> active#(X) active#(app(X, Y)) =#> active#(Y) active#(cons(X, Y)) =#> active#(X) active#(from(X)) =#> active#(X) active#(s(X)) =#> active#(X) active#(zWadr(X, Y)) =#> active#(X) active#(zWadr(X, Y)) =#> active#(Y) active#(prefix(X)) =#> active#(X) P_2: app#(mark(X), Y) =#> app#(X, Y) app#(X, mark(Y)) =#> app#(X, Y) app#(ok(X), ok(Y)) =#> app#(X, Y) P_3: cons#(mark(X), Y) =#> cons#(X, Y) cons#(ok(X), ok(Y)) =#> cons#(X, Y) P_4: from#(mark(X)) =#> from#(X) from#(ok(X)) =#> from#(X) P_5: s#(mark(X)) =#> s#(X) s#(ok(X)) =#> s#(X) P_6: zWadr#(mark(X), Y) =#> zWadr#(X, Y) zWadr#(X, mark(Y)) =#> zWadr#(X, Y) zWadr#(ok(X), ok(Y)) =#> zWadr#(X, Y) P_7: prefix#(mark(X)) =#> prefix#(X) prefix#(ok(X)) =#> prefix#(X) P_8: proper#(app(X, Y)) =#> proper#(X) proper#(app(X, Y)) =#> proper#(Y) proper#(cons(X, Y)) =#> proper#(X) proper#(cons(X, Y)) =#> proper#(Y) proper#(from(X)) =#> proper#(X) proper#(s(X)) =#> proper#(X) proper#(zWadr(X, Y)) =#> proper#(X) proper#(zWadr(X, Y)) =#> proper#(Y) proper#(prefix(X)) =#> proper#(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(app(nil, X)) => mark(X) active(app(cons(X, Y), Z)) => mark(cons(X, app(Y, Z))) active(from(X)) => mark(cons(X, from(s(X)))) active(zWadr(nil, X)) => mark(nil) active(zWadr(X, nil)) => mark(nil) active(zWadr(cons(X, Y), cons(Z, U))) => mark(cons(app(Z, cons(X, nil)), zWadr(Y, U))) active(prefix(X)) => mark(cons(nil, zWadr(X, prefix(X)))) active(app(X, Y)) => app(active(X), Y) active(app(X, Y)) => app(X, active(Y)) active(cons(X, Y)) => cons(active(X), Y) active(from(X)) => from(active(X)) active(s(X)) => s(active(X)) active(zWadr(X, Y)) => zWadr(active(X), Y) active(zWadr(X, Y)) => zWadr(X, active(Y)) active(prefix(X)) => prefix(active(X)) app(mark(X), Y) => mark(app(X, Y)) app(X, mark(Y)) => mark(app(X, Y)) cons(mark(X), Y) => mark(cons(X, Y)) from(mark(X)) => mark(from(X)) s(mark(X)) => mark(s(X)) zWadr(mark(X), Y) => mark(zWadr(X, Y)) zWadr(X, mark(Y)) => mark(zWadr(X, Y)) prefix(mark(X)) => mark(prefix(X)) proper(app(X, Y)) => app(proper(X), proper(Y)) proper(nil) => ok(nil) proper(cons(X, Y)) => cons(proper(X), proper(Y)) proper(from(X)) => from(proper(X)) proper(s(X)) => s(proper(X)) proper(zWadr(X, Y)) => zWadr(proper(X), proper(Y)) proper(prefix(X)) => prefix(proper(X)) app(ok(X), ok(Y)) => ok(app(X, Y)) cons(ok(X), ok(Y)) => ok(cons(X, Y)) from(ok(X)) => ok(from(X)) s(ok(X)) => ok(s(X)) zWadr(ok(X), ok(Y)) => ok(zWadr(X, Y)) prefix(ok(X)) => ok(prefix(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(app(nil, X)) >= mark(X) active(app(cons(X, Y), Z)) >= mark(cons(X, app(Y, Z))) active(from(X)) >= mark(cons(X, from(s(X)))) active(zWadr(nil, X)) >= mark(nil) active(zWadr(X, nil)) >= mark(nil) active(zWadr(cons(X, Y), cons(Z, U))) >= mark(cons(app(Z, cons(X, nil)), zWadr(Y, U))) active(prefix(X)) >= mark(cons(nil, zWadr(X, prefix(X)))) active(app(X, Y)) >= app(active(X), Y) active(app(X, Y)) >= app(X, active(Y)) active(cons(X, Y)) >= cons(active(X), Y) active(from(X)) >= from(active(X)) active(s(X)) >= s(active(X)) active(zWadr(X, Y)) >= zWadr(active(X), Y) active(zWadr(X, Y)) >= zWadr(X, active(Y)) active(prefix(X)) >= prefix(active(X)) app(mark(X), Y) >= mark(app(X, Y)) app(X, mark(Y)) >= mark(app(X, Y)) cons(mark(X), Y) >= mark(cons(X, Y)) from(mark(X)) >= mark(from(X)) s(mark(X)) >= mark(s(X)) zWadr(mark(X), Y) >= mark(zWadr(X, Y)) zWadr(X, mark(Y)) >= mark(zWadr(X, Y)) prefix(mark(X)) >= mark(prefix(X)) proper(app(X, Y)) >= app(proper(X), proper(Y)) proper(nil) >= ok(nil) proper(cons(X, Y)) >= cons(proper(X), proper(Y)) proper(from(X)) >= from(proper(X)) proper(s(X)) >= s(proper(X)) proper(zWadr(X, Y)) >= zWadr(proper(X), proper(Y)) proper(prefix(X)) >= prefix(proper(X)) app(ok(X), ok(Y)) >= ok(app(X, Y)) cons(ok(X), ok(Y)) >= ok(cons(X, Y)) from(ok(X)) >= ok(from(X)) s(ok(X)) >= ok(s(X)) zWadr(ok(X), ok(Y)) >= ok(zWadr(X, Y)) prefix(ok(X)) >= ok(prefix(X)) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: active = \y0.y0 app = \y0y1.y1 + 2y0 cons = \y0y1.1 + y0 from = \y0.2 + 2y0 mark = \y0.1 + y0 nil = 1 ok = \y0.y0 prefix = \y0.3 + 2y0 proper = \y0.y0 s = \y0.y0 top# = \y0.y0 zWadr = \y0y1.2 + y0 + 2y1 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(app(nil, _x0))]] = 2 + x0 >= 1 + x0 = [[mark(_x0)]] [[active(app(cons(_x0, _x1), _x2))]] = 2 + x2 + 2x0 >= 2 + x0 = [[mark(cons(_x0, app(_x1, _x2)))]] [[active(from(_x0))]] = 2 + 2x0 >= 2 + x0 = [[mark(cons(_x0, from(s(_x0))))]] [[active(zWadr(nil, _x0))]] = 3 + 2x0 >= 2 = [[mark(nil)]] [[active(zWadr(_x0, nil))]] = 4 + x0 >= 2 = [[mark(nil)]] [[active(zWadr(cons(_x0, _x1), cons(_x2, _x3)))]] = 5 + x0 + 2x2 >= 3 + x0 + 2x2 = [[mark(cons(app(_x2, cons(_x0, nil)), zWadr(_x1, _x3)))]] [[active(prefix(_x0))]] = 3 + 2x0 >= 3 = [[mark(cons(nil, zWadr(_x0, prefix(_x0))))]] [[active(app(_x0, _x1))]] = x1 + 2x0 >= x1 + 2x0 = [[app(active(_x0), _x1)]] [[active(app(_x0, _x1))]] = x1 + 2x0 >= x1 + 2x0 = [[app(_x0, active(_x1))]] [[active(cons(_x0, _x1))]] = 1 + x0 >= 1 + x0 = [[cons(active(_x0), _x1)]] [[active(from(_x0))]] = 2 + 2x0 >= 2 + 2x0 = [[from(active(_x0))]] [[active(s(_x0))]] = x0 >= x0 = [[s(active(_x0))]] [[active(zWadr(_x0, _x1))]] = 2 + x0 + 2x1 >= 2 + x0 + 2x1 = [[zWadr(active(_x0), _x1)]] [[active(zWadr(_x0, _x1))]] = 2 + x0 + 2x1 >= 2 + x0 + 2x1 = [[zWadr(_x0, active(_x1))]] [[active(prefix(_x0))]] = 3 + 2x0 >= 3 + 2x0 = [[prefix(active(_x0))]] [[app(mark(_x0), _x1)]] = 2 + x1 + 2x0 >= 1 + x1 + 2x0 = [[mark(app(_x0, _x1))]] [[app(_x0, mark(_x1))]] = 1 + x1 + 2x0 >= 1 + x1 + 2x0 = [[mark(app(_x0, _x1))]] [[cons(mark(_x0), _x1)]] = 2 + x0 >= 2 + x0 = [[mark(cons(_x0, _x1))]] [[from(mark(_x0))]] = 4 + 2x0 >= 3 + 2x0 = [[mark(from(_x0))]] [[s(mark(_x0))]] = 1 + x0 >= 1 + x0 = [[mark(s(_x0))]] [[zWadr(mark(_x0), _x1)]] = 3 + x0 + 2x1 >= 3 + x0 + 2x1 = [[mark(zWadr(_x0, _x1))]] [[zWadr(_x0, mark(_x1))]] = 4 + x0 + 2x1 >= 3 + x0 + 2x1 = [[mark(zWadr(_x0, _x1))]] [[prefix(mark(_x0))]] = 5 + 2x0 >= 4 + 2x0 = [[mark(prefix(_x0))]] [[proper(app(_x0, _x1))]] = x1 + 2x0 >= x1 + 2x0 = [[app(proper(_x0), proper(_x1))]] [[proper(nil)]] = 1 >= 1 = [[ok(nil)]] [[proper(cons(_x0, _x1))]] = 1 + x0 >= 1 + x0 = [[cons(proper(_x0), proper(_x1))]] [[proper(from(_x0))]] = 2 + 2x0 >= 2 + 2x0 = [[from(proper(_x0))]] [[proper(s(_x0))]] = x0 >= x0 = [[s(proper(_x0))]] [[proper(zWadr(_x0, _x1))]] = 2 + x0 + 2x1 >= 2 + x0 + 2x1 = [[zWadr(proper(_x0), proper(_x1))]] [[proper(prefix(_x0))]] = 3 + 2x0 >= 3 + 2x0 = [[prefix(proper(_x0))]] [[app(ok(_x0), ok(_x1))]] = x1 + 2x0 >= x1 + 2x0 = [[ok(app(_x0, _x1))]] [[cons(ok(_x0), ok(_x1))]] = 1 + x0 >= 1 + x0 = [[ok(cons(_x0, _x1))]] [[from(ok(_x0))]] = 2 + 2x0 >= 2 + 2x0 = [[ok(from(_x0))]] [[s(ok(_x0))]] = x0 >= x0 = [[ok(s(_x0))]] [[zWadr(ok(_x0), ok(_x1))]] = 2 + x0 + 2x1 >= 2 + x0 + 2x1 = [[ok(zWadr(_x0, _x1))]] [[prefix(ok(_x0))]] = 3 + 2x0 >= 3 + 2x0 = [[ok(prefix(_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(app(X, Y)) => app(active(X), Y) active(app(X, Y)) => app(X, active(Y)) active(cons(X, Y)) => cons(active(X), Y) active(from(X)) => from(active(X)) active(s(X)) => s(active(X)) active(zWadr(X, Y)) => zWadr(active(X), Y) active(zWadr(X, Y)) => zWadr(X, active(Y)) active(prefix(X)) => prefix(active(X)) proper(app(X, Y)) => app(proper(X), proper(Y)) proper(nil) => ok(nil) proper(cons(X, Y)) => cons(proper(X), proper(Y)) proper(from(X)) => from(proper(X)) proper(s(X)) => s(proper(X)) proper(zWadr(X, Y)) => zWadr(proper(X), proper(Y)) proper(prefix(X)) => prefix(proper(X)) app(ok(X), ok(Y)) => ok(app(X, Y)) cons(ok(X), ok(Y)) => ok(cons(X, Y)) from(ok(X)) => ok(from(X)) s(ok(X)) => ok(s(X)) zWadr(ok(X), ok(Y)) => ok(zWadr(X, Y)) prefix(ok(X)) => ok(prefix(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(app(X, Y)) => app(active(X), Y) active(app(X, Y)) => app(X, active(Y)) active(cons(X, Y)) => cons(active(X), Y) active(from(X)) => from(active(X)) active(s(X)) => s(active(X)) active(zWadr(X, Y)) => zWadr(active(X), Y) active(zWadr(X, Y)) => zWadr(X, active(Y)) active(prefix(X)) => prefix(active(X)) app(ok(X), ok(Y)) => ok(app(X, Y)) cons(ok(X), ok(Y)) => ok(cons(X, Y)) from(ok(X)) => ok(from(X)) s(ok(X)) => ok(s(X)) zWadr(ok(X), ok(Y)) => ok(zWadr(X, Y)) prefix(ok(X)) => ok(prefix(X)) It suffices to find a standard reduction pair [Kop12, Def. 6.69]. Thus, we must orient: top#(ok(X)) >? top#(active(X)) active(app(X, Y)) >= app(active(X), Y) active(app(X, Y)) >= app(X, active(Y)) active(cons(X, Y)) >= cons(active(X), Y) active(from(X)) >= from(active(X)) active(s(X)) >= s(active(X)) active(zWadr(X, Y)) >= zWadr(active(X), Y) active(zWadr(X, Y)) >= zWadr(X, active(Y)) active(prefix(X)) >= prefix(active(X)) app(ok(X), ok(Y)) >= ok(app(X, Y)) cons(ok(X), ok(Y)) >= ok(cons(X, Y)) from(ok(X)) >= ok(from(X)) s(ok(X)) >= ok(s(X)) zWadr(ok(X), ok(Y)) >= ok(zWadr(X, Y)) prefix(ok(X)) >= ok(prefix(X)) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: active = \y0.y0 app = \y0y1.1 + 2y0 cons = \y0y1.y1 from = \y0.2y0 ok = \y0.1 + y0 prefix = \y0.y0 s = \y0.1 + y0 top# = \y0.y0 zWadr = \y0y1.2y0 Using this interpretation, the requirements translate to: [[top#(ok(_x0))]] = 1 + x0 > x0 = [[top#(active(_x0))]] [[active(app(_x0, _x1))]] = 1 + 2x0 >= 1 + 2x0 = [[app(active(_x0), _x1)]] [[active(app(_x0, _x1))]] = 1 + 2x0 >= 1 + 2x0 = [[app(_x0, active(_x1))]] [[active(cons(_x0, _x1))]] = x1 >= x1 = [[cons(active(_x0), _x1)]] [[active(from(_x0))]] = 2x0 >= 2x0 = [[from(active(_x0))]] [[active(s(_x0))]] = 1 + x0 >= 1 + x0 = [[s(active(_x0))]] [[active(zWadr(_x0, _x1))]] = 2x0 >= 2x0 = [[zWadr(active(_x0), _x1)]] [[active(zWadr(_x0, _x1))]] = 2x0 >= 2x0 = [[zWadr(_x0, active(_x1))]] [[active(prefix(_x0))]] = x0 >= x0 = [[prefix(active(_x0))]] [[app(ok(_x0), ok(_x1))]] = 3 + 2x0 >= 2 + 2x0 = [[ok(app(_x0, _x1))]] [[cons(ok(_x0), ok(_x1))]] = 1 + x1 >= 1 + x1 = [[ok(cons(_x0, _x1))]] [[from(ok(_x0))]] = 2 + 2x0 >= 1 + 2x0 = [[ok(from(_x0))]] [[s(ok(_x0))]] = 2 + x0 >= 2 + x0 = [[ok(s(_x0))]] [[zWadr(ok(_x0), ok(_x1))]] = 2 + 2x0 >= 1 + 2x0 = [[ok(zWadr(_x0, _x1))]] [[prefix(ok(_x0))]] = 1 + x0 >= 1 + x0 = [[ok(prefix(_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(proper#) = 1 Thus, we can orient the dependency pairs as follows: nu(proper#(app(X, Y))) = app(X, Y) |> X = nu(proper#(X)) nu(proper#(app(X, Y))) = app(X, Y) |> Y = nu(proper#(Y)) 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#(from(X))) = from(X) |> X = nu(proper#(X)) nu(proper#(s(X))) = s(X) |> X = nu(proper#(X)) nu(proper#(zWadr(X, Y))) = zWadr(X, Y) |> X = nu(proper#(X)) nu(proper#(zWadr(X, Y))) = zWadr(X, Y) |> Y = nu(proper#(Y)) nu(proper#(prefix(X))) = prefix(X) |> X = nu(proper#(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(prefix#) = 1 Thus, we can orient the dependency pairs as follows: nu(prefix#(mark(X))) = mark(X) |> X = nu(prefix#(X)) nu(prefix#(ok(X))) = ok(X) |> X = nu(prefix#(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(zWadr#) = 1 Thus, we can orient the dependency pairs as follows: nu(zWadr#(mark(X), Y)) = mark(X) |> X = nu(zWadr#(X, Y)) nu(zWadr#(X, mark(Y))) = X = X = nu(zWadr#(X, Y)) nu(zWadr#(ok(X), ok(Y))) = ok(X) |> X = nu(zWadr#(X, Y)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_6, R_0, minimal, f) by (P_11, R_0, minimal, f), where P_11 contains: zWadr#(X, mark(Y)) =#> zWadr#(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), (P_5, 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(zWadr#) = 2 Thus, we can orient the dependency pairs as follows: nu(zWadr#(X, mark(Y))) = mark(Y) |> Y = nu(zWadr#(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), (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(s#) = 1 Thus, we can orient the dependency pairs as follows: nu(s#(mark(X))) = mark(X) |> X = nu(s#(X)) nu(s#(ok(X))) = ok(X) |> X = nu(s#(X)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_5, 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(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_3, 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(app#) = 1 Thus, we can orient the dependency pairs as follows: nu(app#(mark(X), Y)) = mark(X) |> X = nu(app#(X, Y)) nu(app#(X, mark(Y))) = X = X = nu(app#(X, Y)) nu(app#(ok(X), ok(Y))) = ok(X) |> X = nu(app#(X, Y)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_2, R_0, minimal, f) by (P_12, R_0, minimal, f), where P_12 contains: app#(X, mark(Y)) =#> app#(X, Y) Thus, the original system is terminating if each of (P_1, 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(app#) = 2 Thus, we can orient the dependency pairs as follows: nu(app#(X, mark(Y))) = mark(Y) |> Y = nu(app#(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 (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#(app(X, Y))) = app(X, Y) |> X = nu(active#(X)) nu(active#(app(X, Y))) = app(X, Y) |> Y = nu(active#(Y)) nu(active#(cons(X, Y))) = cons(X, Y) |> X = nu(active#(X)) nu(active#(from(X))) = from(X) |> X = nu(active#(X)) nu(active#(s(X))) = s(X) |> X = nu(active#(X)) nu(active#(zWadr(X, Y))) = zWadr(X, Y) |> X = nu(active#(X)) nu(active#(zWadr(X, Y))) = zWadr(X, Y) |> Y = nu(active#(Y)) nu(active#(prefix(X))) = prefix(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.