/export/starexec/sandbox2/solver/bin/starexec_run_FirstOrder /export/starexec/sandbox2/benchmark/theBenchmark.xml /export/starexec/sandbox2/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 prefix : [o] --> o s : [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)))) mark(app(X, Y)) => active(app(mark(X), mark(Y))) mark(nil) => active(nil) mark(cons(X, Y)) => active(cons(mark(X), Y)) mark(from(X)) => active(from(mark(X))) mark(s(X)) => active(s(mark(X))) mark(zWadr(X, Y)) => active(zWadr(mark(X), mark(Y))) mark(prefix(X)) => active(prefix(mark(X))) app(mark(X), Y) => app(X, Y) app(X, mark(Y)) => app(X, Y) app(active(X), Y) => app(X, Y) app(X, active(Y)) => app(X, Y) cons(mark(X), Y) => cons(X, Y) cons(X, mark(Y)) => cons(X, Y) cons(active(X), Y) => cons(X, Y) cons(X, active(Y)) => cons(X, Y) from(mark(X)) => from(X) from(active(X)) => from(X) s(mark(X)) => s(X) s(active(X)) => s(X) zWadr(mark(X), Y) => zWadr(X, Y) zWadr(X, mark(Y)) => zWadr(X, Y) zWadr(active(X), Y) => zWadr(X, Y) zWadr(X, active(Y)) => zWadr(X, Y) prefix(mark(X)) => prefix(X) prefix(active(X)) => prefix(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(nil, X)) =#> mark#(X) 1] active#(app(cons(X, Y), Z)) =#> mark#(cons(X, app(Y, Z))) 2] active#(app(cons(X, Y), Z)) =#> cons#(X, app(Y, Z)) 3] active#(app(cons(X, Y), Z)) =#> app#(Y, Z) 4] active#(from(X)) =#> mark#(cons(X, from(s(X)))) 5] active#(from(X)) =#> cons#(X, from(s(X))) 6] active#(from(X)) =#> from#(s(X)) 7] active#(from(X)) =#> s#(X) 8] active#(zWadr(nil, X)) =#> mark#(nil) 9] active#(zWadr(X, nil)) =#> mark#(nil) 10] active#(zWadr(cons(X, Y), cons(Z, U))) =#> mark#(cons(app(Z, cons(X, nil)), zWadr(Y, U))) 11] active#(zWadr(cons(X, Y), cons(Z, U))) =#> cons#(app(Z, cons(X, nil)), zWadr(Y, U)) 12] active#(zWadr(cons(X, Y), cons(Z, U))) =#> app#(Z, cons(X, nil)) 13] active#(zWadr(cons(X, Y), cons(Z, U))) =#> cons#(X, nil) 14] active#(zWadr(cons(X, Y), cons(Z, U))) =#> zWadr#(Y, U) 15] active#(prefix(X)) =#> mark#(cons(nil, zWadr(X, prefix(X)))) 16] active#(prefix(X)) =#> cons#(nil, zWadr(X, prefix(X))) 17] active#(prefix(X)) =#> zWadr#(X, prefix(X)) 18] active#(prefix(X)) =#> prefix#(X) 19] mark#(app(X, Y)) =#> active#(app(mark(X), mark(Y))) 20] mark#(app(X, Y)) =#> app#(mark(X), mark(Y)) 21] mark#(app(X, Y)) =#> mark#(X) 22] mark#(app(X, Y)) =#> mark#(Y) 23] mark#(nil) =#> active#(nil) 24] mark#(cons(X, Y)) =#> active#(cons(mark(X), Y)) 25] mark#(cons(X, Y)) =#> cons#(mark(X), Y) 26] mark#(cons(X, Y)) =#> mark#(X) 27] mark#(from(X)) =#> active#(from(mark(X))) 28] mark#(from(X)) =#> from#(mark(X)) 29] mark#(from(X)) =#> mark#(X) 30] mark#(s(X)) =#> active#(s(mark(X))) 31] mark#(s(X)) =#> s#(mark(X)) 32] mark#(s(X)) =#> mark#(X) 33] mark#(zWadr(X, Y)) =#> active#(zWadr(mark(X), mark(Y))) 34] mark#(zWadr(X, Y)) =#> zWadr#(mark(X), mark(Y)) 35] mark#(zWadr(X, Y)) =#> mark#(X) 36] mark#(zWadr(X, Y)) =#> mark#(Y) 37] mark#(prefix(X)) =#> active#(prefix(mark(X))) 38] mark#(prefix(X)) =#> prefix#(mark(X)) 39] mark#(prefix(X)) =#> mark#(X) 40] app#(mark(X), Y) =#> app#(X, Y) 41] app#(X, mark(Y)) =#> app#(X, Y) 42] app#(active(X), Y) =#> app#(X, Y) 43] app#(X, active(Y)) =#> app#(X, Y) 44] cons#(mark(X), Y) =#> cons#(X, Y) 45] cons#(X, mark(Y)) =#> cons#(X, Y) 46] cons#(active(X), Y) =#> cons#(X, Y) 47] cons#(X, active(Y)) =#> cons#(X, Y) 48] from#(mark(X)) =#> from#(X) 49] from#(active(X)) =#> from#(X) 50] s#(mark(X)) =#> s#(X) 51] s#(active(X)) =#> s#(X) 52] zWadr#(mark(X), Y) =#> zWadr#(X, Y) 53] zWadr#(X, mark(Y)) =#> zWadr#(X, Y) 54] zWadr#(active(X), Y) =#> zWadr#(X, Y) 55] zWadr#(X, active(Y)) =#> zWadr#(X, Y) 56] prefix#(mark(X)) =#> prefix#(X) 57] prefix#(active(X)) =#> prefix#(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)))) mark(app(X, Y)) => active(app(mark(X), mark(Y))) mark(nil) => active(nil) mark(cons(X, Y)) => active(cons(mark(X), Y)) mark(from(X)) => active(from(mark(X))) mark(s(X)) => active(s(mark(X))) mark(zWadr(X, Y)) => active(zWadr(mark(X), mark(Y))) mark(prefix(X)) => active(prefix(mark(X))) app(mark(X), Y) => app(X, Y) app(X, mark(Y)) => app(X, Y) app(active(X), Y) => app(X, Y) app(X, active(Y)) => app(X, Y) cons(mark(X), Y) => cons(X, Y) cons(X, mark(Y)) => cons(X, Y) cons(active(X), Y) => cons(X, Y) cons(X, active(Y)) => cons(X, Y) from(mark(X)) => from(X) from(active(X)) => from(X) s(mark(X)) => s(X) s(active(X)) => s(X) zWadr(mark(X), Y) => zWadr(X, Y) zWadr(X, mark(Y)) => zWadr(X, Y) zWadr(active(X), Y) => zWadr(X, Y) zWadr(X, active(Y)) => zWadr(X, Y) prefix(mark(X)) => prefix(X) prefix(active(X)) => prefix(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 : 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39 * 1 : 24, 25, 26 * 2 : 44, 46 * 3 : 40, 41, 42, 43 * 4 : 24, 25, 26 * 5 : 44, 46 * 6 : * 7 : 50, 51 * 8 : 23 * 9 : 23 * 10 : 24, 25, 26 * 11 : * 12 : 40, 42 * 13 : 44, 46 * 14 : 52, 53, 54, 55 * 15 : 24, 25, 26 * 16 : * 17 : 52, 54 * 18 : 56, 57 * 19 : 0, 1, 2, 3 * 20 : 40, 41, 42, 43 * 21 : 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39 * 22 : 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39 * 23 : * 24 : * 25 : 44, 45, 46, 47 * 26 : 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39 * 27 : 4, 5, 6, 7 * 28 : 48, 49 * 29 : 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39 * 30 : * 31 : 50, 51 * 32 : 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39 * 33 : 8, 9, 10, 11, 12, 13, 14 * 34 : 52, 53, 54, 55 * 35 : 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39 * 36 : 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39 * 37 : 15, 16, 17, 18 * 38 : 56, 57 * 39 : 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39 * 40 : 40, 41, 42, 43 * 41 : 40, 41, 42, 43 * 42 : 40, 41, 42, 43 * 43 : 40, 41, 42, 43 * 44 : 44, 45, 46, 47 * 45 : 44, 45, 46, 47 * 46 : 44, 45, 46, 47 * 47 : 44, 45, 46, 47 * 48 : 48, 49 * 49 : 48, 49 * 50 : 50, 51 * 51 : 50, 51 * 52 : 52, 53, 54, 55 * 53 : 52, 53, 54, 55 * 54 : 52, 53, 54, 55 * 55 : 52, 53, 54, 55 * 56 : 56, 57 * 57 : 56, 57 This graph has the following strongly connected components: P_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(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)))) mark#(app(X, Y)) =#> active#(app(mark(X), mark(Y))) mark#(app(X, Y)) =#> mark#(X) mark#(app(X, Y)) =#> mark#(Y) mark#(cons(X, Y)) =#> mark#(X) mark#(from(X)) =#> active#(from(mark(X))) mark#(from(X)) =#> mark#(X) mark#(s(X)) =#> mark#(X) mark#(zWadr(X, Y)) =#> active#(zWadr(mark(X), mark(Y))) mark#(zWadr(X, Y)) =#> mark#(X) mark#(zWadr(X, Y)) =#> mark#(Y) mark#(prefix(X)) =#> active#(prefix(mark(X))) mark#(prefix(X)) =#> mark#(X) P_2: app#(mark(X), Y) =#> app#(X, Y) app#(X, mark(Y)) =#> app#(X, Y) app#(active(X), Y) =#> app#(X, Y) app#(X, active(Y)) =#> app#(X, Y) P_3: cons#(mark(X), Y) =#> cons#(X, Y) cons#(X, mark(Y)) =#> cons#(X, Y) cons#(active(X), Y) =#> cons#(X, Y) cons#(X, active(Y)) =#> cons#(X, Y) P_4: from#(mark(X)) =#> from#(X) from#(active(X)) =#> from#(X) P_5: s#(mark(X)) =#> s#(X) s#(active(X)) =#> s#(X) P_6: zWadr#(mark(X), Y) =#> zWadr#(X, Y) zWadr#(X, mark(Y)) =#> zWadr#(X, Y) zWadr#(active(X), Y) =#> zWadr#(X, Y) zWadr#(X, active(Y)) =#> zWadr#(X, Y) P_7: prefix#(mark(X)) =#> prefix#(X) prefix#(active(X)) =#> prefix#(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) and (P_7, 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) 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#(active(X))) = active(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#(active(X), Y)) = active(X) |> X = nu(zWadr#(X, Y)) nu(zWadr#(X, active(Y))) = 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_8, R_0, minimal, f), where P_8 contains: zWadr#(X, mark(Y)) =#> zWadr#(X, Y) zWadr#(X, active(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_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(zWadr#) = 2 Thus, we can orient the dependency pairs as follows: nu(zWadr#(X, mark(Y))) = mark(Y) |> Y = nu(zWadr#(X, Y)) nu(zWadr#(X, active(Y))) = active(Y) |> Y = nu(zWadr#(X, Y)) 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) 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#(active(X))) = active(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#(active(X))) = active(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#(X, mark(Y))) = X = X = nu(cons#(X, Y)) nu(cons#(active(X), Y)) = active(X) |> X = nu(cons#(X, Y)) nu(cons#(X, active(Y))) = 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 (P_9, R_0, minimal, f), where P_9 contains: cons#(X, mark(Y)) =#> cons#(X, Y) cons#(X, active(Y)) =#> cons#(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_9, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_9, R_0, minimal, formative). We apply the subterm criterion with the following projection function: nu(cons#) = 2 Thus, we can orient the dependency pairs as follows: nu(cons#(X, mark(Y))) = mark(Y) |> Y = nu(cons#(X, Y)) nu(cons#(X, active(Y))) = active(Y) |> Y = nu(cons#(X, Y)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_9, 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#(active(X), Y)) = active(X) |> X = nu(app#(X, Y)) nu(app#(X, active(Y))) = 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_10, R_0, minimal, f), where P_10 contains: app#(X, mark(Y)) =#> app#(X, Y) app#(X, active(Y)) =#> app#(X, Y) Thus, the original system is terminating if each of (P_1, R_0, minimal, formative) and (P_10, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_10, 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)) nu(app#(X, active(Y))) = active(Y) |> Y = nu(app#(X, Y)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_10, 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 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: 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(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)))) mark#(app(X, Y)) >? active#(app(mark(X), mark(Y))) mark#(app(X, Y)) >? mark#(X) mark#(app(X, Y)) >? mark#(Y) mark#(cons(X, Y)) >? mark#(X) mark#(from(X)) >? active#(from(mark(X))) mark#(from(X)) >? mark#(X) mark#(s(X)) >? mark#(X) mark#(zWadr(X, Y)) >? active#(zWadr(mark(X), mark(Y))) mark#(zWadr(X, Y)) >? mark#(X) mark#(zWadr(X, Y)) >? mark#(Y) mark#(prefix(X)) >? active#(prefix(mark(X))) mark#(prefix(X)) >? mark#(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)))) mark(app(X, Y)) >= active(app(mark(X), mark(Y))) mark(nil) >= active(nil) mark(cons(X, Y)) >= active(cons(mark(X), Y)) mark(from(X)) >= active(from(mark(X))) mark(s(X)) >= active(s(mark(X))) mark(zWadr(X, Y)) >= active(zWadr(mark(X), mark(Y))) mark(prefix(X)) >= active(prefix(mark(X))) app(mark(X), Y) >= app(X, Y) app(X, mark(Y)) >= app(X, Y) app(active(X), Y) >= app(X, Y) app(X, active(Y)) >= app(X, Y) cons(mark(X), Y) >= cons(X, Y) cons(X, mark(Y)) >= cons(X, Y) cons(active(X), Y) >= cons(X, Y) cons(X, active(Y)) >= cons(X, Y) from(mark(X)) >= from(X) from(active(X)) >= from(X) s(mark(X)) >= s(X) s(active(X)) >= s(X) zWadr(mark(X), Y) >= zWadr(X, Y) zWadr(X, mark(Y)) >= zWadr(X, Y) zWadr(active(X), Y) >= zWadr(X, Y) zWadr(X, active(Y)) >= zWadr(X, Y) prefix(mark(X)) >= prefix(X) prefix(active(X)) >= prefix(X) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: active = \y0.y0 active# = \y0.y0 app = \y0y1.y0 + 2y1 cons = \y0y1.y0 from = \y0.1 + y0 mark = \y0.y0 mark# = \y0.y0 nil = 0 prefix = \y0.1 + 2y0 s = \y0.y0 zWadr = \y0y1.y1 + 2y0 Using this interpretation, the requirements translate to: [[active#(app(nil, _x0))]] = 2x0 >= x0 = [[mark#(_x0)]] [[active#(app(cons(_x0, _x1), _x2))]] = x0 + 2x2 >= x0 = [[mark#(cons(_x0, app(_x1, _x2)))]] [[active#(from(_x0))]] = 1 + x0 > x0 = [[mark#(cons(_x0, from(s(_x0))))]] [[active#(zWadr(cons(_x0, _x1), cons(_x2, _x3)))]] = x2 + 2x0 >= x2 + 2x0 = [[mark#(cons(app(_x2, cons(_x0, nil)), zWadr(_x1, _x3)))]] [[active#(prefix(_x0))]] = 1 + 2x0 > 0 = [[mark#(cons(nil, zWadr(_x0, prefix(_x0))))]] [[mark#(app(_x0, _x1))]] = x0 + 2x1 >= x0 + 2x1 = [[active#(app(mark(_x0), mark(_x1)))]] [[mark#(app(_x0, _x1))]] = x0 + 2x1 >= x0 = [[mark#(_x0)]] [[mark#(app(_x0, _x1))]] = x0 + 2x1 >= x1 = [[mark#(_x1)]] [[mark#(cons(_x0, _x1))]] = x0 >= x0 = [[mark#(_x0)]] [[mark#(from(_x0))]] = 1 + x0 >= 1 + x0 = [[active#(from(mark(_x0)))]] [[mark#(from(_x0))]] = 1 + x0 > x0 = [[mark#(_x0)]] [[mark#(s(_x0))]] = x0 >= x0 = [[mark#(_x0)]] [[mark#(zWadr(_x0, _x1))]] = x1 + 2x0 >= x1 + 2x0 = [[active#(zWadr(mark(_x0), mark(_x1)))]] [[mark#(zWadr(_x0, _x1))]] = x1 + 2x0 >= x0 = [[mark#(_x0)]] [[mark#(zWadr(_x0, _x1))]] = x1 + 2x0 >= x1 = [[mark#(_x1)]] [[mark#(prefix(_x0))]] = 1 + 2x0 >= 1 + 2x0 = [[active#(prefix(mark(_x0)))]] [[mark#(prefix(_x0))]] = 1 + 2x0 > x0 = [[mark#(_x0)]] [[active(app(nil, _x0))]] = 2x0 >= x0 = [[mark(_x0)]] [[active(app(cons(_x0, _x1), _x2))]] = x0 + 2x2 >= x0 = [[mark(cons(_x0, app(_x1, _x2)))]] [[active(from(_x0))]] = 1 + x0 >= x0 = [[mark(cons(_x0, from(s(_x0))))]] [[active(zWadr(nil, _x0))]] = x0 >= 0 = [[mark(nil)]] [[active(zWadr(_x0, nil))]] = 2x0 >= 0 = [[mark(nil)]] [[active(zWadr(cons(_x0, _x1), cons(_x2, _x3)))]] = x2 + 2x0 >= x2 + 2x0 = [[mark(cons(app(_x2, cons(_x0, nil)), zWadr(_x1, _x3)))]] [[active(prefix(_x0))]] = 1 + 2x0 >= 0 = [[mark(cons(nil, zWadr(_x0, prefix(_x0))))]] [[mark(app(_x0, _x1))]] = x0 + 2x1 >= x0 + 2x1 = [[active(app(mark(_x0), mark(_x1)))]] [[mark(nil)]] = 0 >= 0 = [[active(nil)]] [[mark(cons(_x0, _x1))]] = x0 >= x0 = [[active(cons(mark(_x0), _x1))]] [[mark(from(_x0))]] = 1 + x0 >= 1 + x0 = [[active(from(mark(_x0)))]] [[mark(s(_x0))]] = x0 >= x0 = [[active(s(mark(_x0)))]] [[mark(zWadr(_x0, _x1))]] = x1 + 2x0 >= x1 + 2x0 = [[active(zWadr(mark(_x0), mark(_x1)))]] [[mark(prefix(_x0))]] = 1 + 2x0 >= 1 + 2x0 = [[active(prefix(mark(_x0)))]] [[app(mark(_x0), _x1)]] = x0 + 2x1 >= x0 + 2x1 = [[app(_x0, _x1)]] [[app(_x0, mark(_x1))]] = x0 + 2x1 >= x0 + 2x1 = [[app(_x0, _x1)]] [[app(active(_x0), _x1)]] = x0 + 2x1 >= x0 + 2x1 = [[app(_x0, _x1)]] [[app(_x0, active(_x1))]] = x0 + 2x1 >= x0 + 2x1 = [[app(_x0, _x1)]] [[cons(mark(_x0), _x1)]] = x0 >= x0 = [[cons(_x0, _x1)]] [[cons(_x0, mark(_x1))]] = x0 >= x0 = [[cons(_x0, _x1)]] [[cons(active(_x0), _x1)]] = x0 >= x0 = [[cons(_x0, _x1)]] [[cons(_x0, active(_x1))]] = x0 >= x0 = [[cons(_x0, _x1)]] [[from(mark(_x0))]] = 1 + x0 >= 1 + x0 = [[from(_x0)]] [[from(active(_x0))]] = 1 + x0 >= 1 + x0 = [[from(_x0)]] [[s(mark(_x0))]] = x0 >= x0 = [[s(_x0)]] [[s(active(_x0))]] = x0 >= x0 = [[s(_x0)]] [[zWadr(mark(_x0), _x1)]] = x1 + 2x0 >= x1 + 2x0 = [[zWadr(_x0, _x1)]] [[zWadr(_x0, mark(_x1))]] = x1 + 2x0 >= x1 + 2x0 = [[zWadr(_x0, _x1)]] [[zWadr(active(_x0), _x1)]] = x1 + 2x0 >= x1 + 2x0 = [[zWadr(_x0, _x1)]] [[zWadr(_x0, active(_x1))]] = x1 + 2x0 >= x1 + 2x0 = [[zWadr(_x0, _x1)]] [[prefix(mark(_x0))]] = 1 + 2x0 >= 1 + 2x0 = [[prefix(_x0)]] [[prefix(active(_x0))]] = 1 + 2x0 >= 1 + 2x0 = [[prefix(_x0)]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace the dependency pair problem (P_1, R_0, minimal, formative) by (P_11, R_0, minimal, formative), where P_11 consists of: active#(app(nil, X)) =#> mark#(X) active#(app(cons(X, Y), Z)) =#> mark#(cons(X, app(Y, Z))) active#(zWadr(cons(X, Y), cons(Z, U))) =#> mark#(cons(app(Z, cons(X, nil)), zWadr(Y, U))) mark#(app(X, Y)) =#> active#(app(mark(X), mark(Y))) mark#(app(X, Y)) =#> mark#(X) mark#(app(X, Y)) =#> mark#(Y) mark#(cons(X, Y)) =#> mark#(X) mark#(from(X)) =#> active#(from(mark(X))) mark#(s(X)) =#> mark#(X) mark#(zWadr(X, Y)) =#> active#(zWadr(mark(X), mark(Y))) mark#(zWadr(X, Y)) =#> mark#(X) mark#(zWadr(X, Y)) =#> mark#(Y) mark#(prefix(X)) =#> active#(prefix(mark(X))) Thus, the original system is terminating if (P_11, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_11, 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 : 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 * 1 : 6 * 2 : 6 * 3 : 0, 1 * 4 : 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 * 5 : 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 * 6 : 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 * 7 : * 8 : 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 * 9 : 2 * 10 : 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 * 11 : 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 * 12 : This graph has the following strongly connected components: P_12: active#(app(nil, X)) =#> mark#(X) active#(app(cons(X, Y), Z)) =#> mark#(cons(X, app(Y, Z))) active#(zWadr(cons(X, Y), cons(Z, U))) =#> mark#(cons(app(Z, cons(X, nil)), zWadr(Y, U))) mark#(app(X, Y)) =#> active#(app(mark(X), mark(Y))) mark#(app(X, Y)) =#> mark#(X) mark#(app(X, Y)) =#> mark#(Y) mark#(cons(X, Y)) =#> mark#(X) mark#(s(X)) =#> mark#(X) mark#(zWadr(X, Y)) =#> active#(zWadr(mark(X), mark(Y))) mark#(zWadr(X, Y)) =#> mark#(X) mark#(zWadr(X, Y)) =#> mark#(Y) By [Kop12, Thm. 7.31], we may replace any dependency pair problem (P_11, R_0, m, f) by (P_12, R_0, m, f). Thus, the original system is terminating if (P_12, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_12, R_0, minimal, formative). The formative rules of (P_12, 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)))) mark(app(X, Y)) => active(app(mark(X), mark(Y))) mark(nil) => active(nil) mark(cons(X, Y)) => active(cons(mark(X), Y)) mark(from(X)) => active(from(mark(X))) mark(s(X)) => active(s(mark(X))) mark(zWadr(X, Y)) => active(zWadr(mark(X), mark(Y))) mark(prefix(X)) => active(prefix(mark(X))) app(mark(X), Y) => app(X, Y) app(X, mark(Y)) => app(X, Y) app(active(X), Y) => app(X, Y) app(X, active(Y)) => app(X, Y) cons(mark(X), Y) => cons(X, Y) cons(X, mark(Y)) => cons(X, Y) cons(active(X), Y) => cons(X, Y) cons(X, active(Y)) => cons(X, Y) s(mark(X)) => s(X) s(active(X)) => s(X) zWadr(mark(X), Y) => zWadr(X, Y) zWadr(X, mark(Y)) => zWadr(X, Y) zWadr(active(X), Y) => zWadr(X, Y) zWadr(X, active(Y)) => zWadr(X, Y) By [Kop12, Thm. 7.17], we may replace the dependency pair problem (P_12, R_0, minimal, formative) by (P_12, R_1, minimal, formative). Thus, the original system is terminating if (P_12, R_1, minimal, formative) is finite. We consider the dependency pair problem (P_12, 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: active#(app(nil, X)) >? mark#(X) active#(app(cons(X, Y), Z)) >? mark#(cons(X, app(Y, Z))) active#(zWadr(cons(X, Y), cons(Z, U))) >? mark#(cons(app(Z, cons(X, nil)), zWadr(Y, U))) mark#(app(X, Y)) >? active#(app(mark(X), mark(Y))) mark#(app(X, Y)) >? mark#(X) mark#(app(X, Y)) >? mark#(Y) mark#(cons(X, Y)) >? mark#(X) mark#(s(X)) >? mark#(X) mark#(zWadr(X, Y)) >? active#(zWadr(mark(X), mark(Y))) mark#(zWadr(X, Y)) >? mark#(X) mark#(zWadr(X, Y)) >? mark#(Y) 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)))) mark(app(X, Y)) >= active(app(mark(X), mark(Y))) mark(nil) >= active(nil) mark(cons(X, Y)) >= active(cons(mark(X), Y)) mark(from(X)) >= active(from(mark(X))) mark(s(X)) >= active(s(mark(X))) mark(zWadr(X, Y)) >= active(zWadr(mark(X), mark(Y))) mark(prefix(X)) >= active(prefix(mark(X))) app(mark(X), Y) >= app(X, Y) app(X, mark(Y)) >= app(X, Y) app(active(X), Y) >= app(X, Y) app(X, active(Y)) >= app(X, Y) cons(mark(X), Y) >= cons(X, Y) cons(X, mark(Y)) >= cons(X, Y) cons(active(X), Y) >= cons(X, Y) cons(X, active(Y)) >= cons(X, Y) s(mark(X)) >= s(X) s(active(X)) >= s(X) zWadr(mark(X), Y) >= zWadr(X, Y) zWadr(X, mark(Y)) >= zWadr(X, Y) zWadr(active(X), Y) >= zWadr(X, Y) zWadr(X, active(Y)) >= zWadr(X, Y) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: active = \y0.y0 active# = \y0.y0 app = \y0y1.y0 + y1 cons = \y0y1.y0 from = \y0.y0 mark = \y0.y0 mark# = \y0.y0 nil = 2 prefix = \y0.2 s = \y0.2y0 zWadr = \y0y1.y0 + y1 Using this interpretation, the requirements translate to: [[active#(app(nil, _x0))]] = 2 + x0 > x0 = [[mark#(_x0)]] [[active#(app(cons(_x0, _x1), _x2))]] = x0 + x2 >= x0 = [[mark#(cons(_x0, app(_x1, _x2)))]] [[active#(zWadr(cons(_x0, _x1), cons(_x2, _x3)))]] = x0 + x2 >= x0 + x2 = [[mark#(cons(app(_x2, cons(_x0, nil)), zWadr(_x1, _x3)))]] [[mark#(app(_x0, _x1))]] = x0 + x1 >= x0 + x1 = [[active#(app(mark(_x0), mark(_x1)))]] [[mark#(app(_x0, _x1))]] = x0 + x1 >= x0 = [[mark#(_x0)]] [[mark#(app(_x0, _x1))]] = x0 + x1 >= x1 = [[mark#(_x1)]] [[mark#(cons(_x0, _x1))]] = x0 >= x0 = [[mark#(_x0)]] [[mark#(s(_x0))]] = 2x0 >= x0 = [[mark#(_x0)]] [[mark#(zWadr(_x0, _x1))]] = x0 + x1 >= x0 + x1 = [[active#(zWadr(mark(_x0), mark(_x1)))]] [[mark#(zWadr(_x0, _x1))]] = x0 + x1 >= x0 = [[mark#(_x0)]] [[mark#(zWadr(_x0, _x1))]] = x0 + x1 >= x1 = [[mark#(_x1)]] [[active(app(nil, _x0))]] = 2 + x0 >= x0 = [[mark(_x0)]] [[active(app(cons(_x0, _x1), _x2))]] = x0 + x2 >= x0 = [[mark(cons(_x0, app(_x1, _x2)))]] [[active(from(_x0))]] = x0 >= x0 = [[mark(cons(_x0, from(s(_x0))))]] [[active(zWadr(nil, _x0))]] = 2 + x0 >= 2 = [[mark(nil)]] [[active(zWadr(_x0, nil))]] = 2 + x0 >= 2 = [[mark(nil)]] [[active(zWadr(cons(_x0, _x1), cons(_x2, _x3)))]] = x0 + x2 >= x0 + x2 = [[mark(cons(app(_x2, cons(_x0, nil)), zWadr(_x1, _x3)))]] [[active(prefix(_x0))]] = 2 >= 2 = [[mark(cons(nil, zWadr(_x0, prefix(_x0))))]] [[mark(app(_x0, _x1))]] = x0 + x1 >= x0 + x1 = [[active(app(mark(_x0), mark(_x1)))]] [[mark(nil)]] = 2 >= 2 = [[active(nil)]] [[mark(cons(_x0, _x1))]] = x0 >= x0 = [[active(cons(mark(_x0), _x1))]] [[mark(from(_x0))]] = x0 >= x0 = [[active(from(mark(_x0)))]] [[mark(s(_x0))]] = 2x0 >= 2x0 = [[active(s(mark(_x0)))]] [[mark(zWadr(_x0, _x1))]] = x0 + x1 >= x0 + x1 = [[active(zWadr(mark(_x0), mark(_x1)))]] [[mark(prefix(_x0))]] = 2 >= 2 = [[active(prefix(mark(_x0)))]] [[app(mark(_x0), _x1)]] = x0 + x1 >= x0 + x1 = [[app(_x0, _x1)]] [[app(_x0, mark(_x1))]] = x0 + x1 >= x0 + x1 = [[app(_x0, _x1)]] [[app(active(_x0), _x1)]] = x0 + x1 >= x0 + x1 = [[app(_x0, _x1)]] [[app(_x0, active(_x1))]] = x0 + x1 >= x0 + x1 = [[app(_x0, _x1)]] [[cons(mark(_x0), _x1)]] = x0 >= x0 = [[cons(_x0, _x1)]] [[cons(_x0, mark(_x1))]] = x0 >= x0 = [[cons(_x0, _x1)]] [[cons(active(_x0), _x1)]] = x0 >= x0 = [[cons(_x0, _x1)]] [[cons(_x0, active(_x1))]] = x0 >= x0 = [[cons(_x0, _x1)]] [[s(mark(_x0))]] = 2x0 >= 2x0 = [[s(_x0)]] [[s(active(_x0))]] = 2x0 >= 2x0 = [[s(_x0)]] [[zWadr(mark(_x0), _x1)]] = x0 + x1 >= x0 + x1 = [[zWadr(_x0, _x1)]] [[zWadr(_x0, mark(_x1))]] = x0 + x1 >= x0 + x1 = [[zWadr(_x0, _x1)]] [[zWadr(active(_x0), _x1)]] = x0 + x1 >= x0 + x1 = [[zWadr(_x0, _x1)]] [[zWadr(_x0, active(_x1))]] = x0 + x1 >= x0 + x1 = [[zWadr(_x0, _x1)]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace the dependency pair problem (P_12, R_1, minimal, formative) by (P_13, R_1, minimal, formative), where P_13 consists of: active#(app(cons(X, Y), Z)) =#> mark#(cons(X, app(Y, Z))) active#(zWadr(cons(X, Y), cons(Z, U))) =#> mark#(cons(app(Z, cons(X, nil)), zWadr(Y, U))) mark#(app(X, Y)) =#> active#(app(mark(X), mark(Y))) mark#(app(X, Y)) =#> mark#(X) mark#(app(X, Y)) =#> mark#(Y) mark#(cons(X, Y)) =#> mark#(X) mark#(s(X)) =#> mark#(X) mark#(zWadr(X, Y)) =#> active#(zWadr(mark(X), mark(Y))) mark#(zWadr(X, Y)) =#> mark#(X) mark#(zWadr(X, Y)) =#> mark#(Y) Thus, the original system is terminating if (P_13, R_1, minimal, formative) is finite. We consider the dependency pair problem (P_13, 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: active#(app(cons(X, Y), Z)) >? mark#(cons(X, app(Y, Z))) active#(zWadr(cons(X, Y), cons(Z, U))) >? mark#(cons(app(Z, cons(X, nil)), zWadr(Y, U))) mark#(app(X, Y)) >? active#(app(mark(X), mark(Y))) mark#(app(X, Y)) >? mark#(X) mark#(app(X, Y)) >? mark#(Y) mark#(cons(X, Y)) >? mark#(X) mark#(s(X)) >? mark#(X) mark#(zWadr(X, Y)) >? active#(zWadr(mark(X), mark(Y))) mark#(zWadr(X, Y)) >? mark#(X) mark#(zWadr(X, Y)) >? mark#(Y) 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)))) mark(app(X, Y)) >= active(app(mark(X), mark(Y))) mark(nil) >= active(nil) mark(cons(X, Y)) >= active(cons(mark(X), Y)) mark(from(X)) >= active(from(mark(X))) mark(s(X)) >= active(s(mark(X))) mark(zWadr(X, Y)) >= active(zWadr(mark(X), mark(Y))) mark(prefix(X)) >= active(prefix(mark(X))) app(mark(X), Y) >= app(X, Y) app(X, mark(Y)) >= app(X, Y) app(active(X), Y) >= app(X, Y) app(X, active(Y)) >= app(X, Y) cons(mark(X), Y) >= cons(X, Y) cons(X, mark(Y)) >= cons(X, Y) cons(active(X), Y) >= cons(X, Y) cons(X, active(Y)) >= cons(X, Y) s(mark(X)) >= s(X) s(active(X)) >= s(X) zWadr(mark(X), Y) >= zWadr(X, Y) zWadr(X, mark(Y)) >= zWadr(X, Y) zWadr(active(X), Y) >= zWadr(X, Y) zWadr(X, active(Y)) >= zWadr(X, Y) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: active = \y0.y0 active# = \y0.y0 app = \y0y1.y1 + 2y0 cons = \y0y1.1 + y0 from = \y0.1 + y0 mark = \y0.y0 mark# = \y0.y0 nil = 0 prefix = \y0.1 s = \y0.y0 zWadr = \y0y1.2 + y0 + 2y1 Using this interpretation, the requirements translate to: [[active#(app(cons(_x0, _x1), _x2))]] = 2 + x2 + 2x0 > 1 + x0 = [[mark#(cons(_x0, app(_x1, _x2)))]] [[active#(zWadr(cons(_x0, _x1), cons(_x2, _x3)))]] = 5 + x0 + 2x2 > 2 + x0 + 2x2 = [[mark#(cons(app(_x2, cons(_x0, nil)), zWadr(_x1, _x3)))]] [[mark#(app(_x0, _x1))]] = x1 + 2x0 >= x1 + 2x0 = [[active#(app(mark(_x0), mark(_x1)))]] [[mark#(app(_x0, _x1))]] = x1 + 2x0 >= x0 = [[mark#(_x0)]] [[mark#(app(_x0, _x1))]] = x1 + 2x0 >= x1 = [[mark#(_x1)]] [[mark#(cons(_x0, _x1))]] = 1 + x0 > x0 = [[mark#(_x0)]] [[mark#(s(_x0))]] = x0 >= x0 = [[mark#(_x0)]] [[mark#(zWadr(_x0, _x1))]] = 2 + x0 + 2x1 >= 2 + x0 + 2x1 = [[active#(zWadr(mark(_x0), mark(_x1)))]] [[mark#(zWadr(_x0, _x1))]] = 2 + x0 + 2x1 > x0 = [[mark#(_x0)]] [[mark#(zWadr(_x0, _x1))]] = 2 + x0 + 2x1 > x1 = [[mark#(_x1)]] [[active(app(nil, _x0))]] = x0 >= x0 = [[mark(_x0)]] [[active(app(cons(_x0, _x1), _x2))]] = 2 + x2 + 2x0 >= 1 + x0 = [[mark(cons(_x0, app(_x1, _x2)))]] [[active(from(_x0))]] = 1 + x0 >= 1 + x0 = [[mark(cons(_x0, from(s(_x0))))]] [[active(zWadr(nil, _x0))]] = 2 + 2x0 >= 0 = [[mark(nil)]] [[active(zWadr(_x0, nil))]] = 2 + x0 >= 0 = [[mark(nil)]] [[active(zWadr(cons(_x0, _x1), cons(_x2, _x3)))]] = 5 + x0 + 2x2 >= 2 + x0 + 2x2 = [[mark(cons(app(_x2, cons(_x0, nil)), zWadr(_x1, _x3)))]] [[active(prefix(_x0))]] = 1 >= 1 = [[mark(cons(nil, zWadr(_x0, prefix(_x0))))]] [[mark(app(_x0, _x1))]] = x1 + 2x0 >= x1 + 2x0 = [[active(app(mark(_x0), mark(_x1)))]] [[mark(nil)]] = 0 >= 0 = [[active(nil)]] [[mark(cons(_x0, _x1))]] = 1 + x0 >= 1 + x0 = [[active(cons(mark(_x0), _x1))]] [[mark(from(_x0))]] = 1 + x0 >= 1 + x0 = [[active(from(mark(_x0)))]] [[mark(s(_x0))]] = x0 >= x0 = [[active(s(mark(_x0)))]] [[mark(zWadr(_x0, _x1))]] = 2 + x0 + 2x1 >= 2 + x0 + 2x1 = [[active(zWadr(mark(_x0), mark(_x1)))]] [[mark(prefix(_x0))]] = 1 >= 1 = [[active(prefix(mark(_x0)))]] [[app(mark(_x0), _x1)]] = x1 + 2x0 >= x1 + 2x0 = [[app(_x0, _x1)]] [[app(_x0, mark(_x1))]] = x1 + 2x0 >= x1 + 2x0 = [[app(_x0, _x1)]] [[app(active(_x0), _x1)]] = x1 + 2x0 >= x1 + 2x0 = [[app(_x0, _x1)]] [[app(_x0, active(_x1))]] = x1 + 2x0 >= x1 + 2x0 = [[app(_x0, _x1)]] [[cons(mark(_x0), _x1)]] = 1 + x0 >= 1 + x0 = [[cons(_x0, _x1)]] [[cons(_x0, mark(_x1))]] = 1 + x0 >= 1 + x0 = [[cons(_x0, _x1)]] [[cons(active(_x0), _x1)]] = 1 + x0 >= 1 + x0 = [[cons(_x0, _x1)]] [[cons(_x0, active(_x1))]] = 1 + x0 >= 1 + x0 = [[cons(_x0, _x1)]] [[s(mark(_x0))]] = x0 >= x0 = [[s(_x0)]] [[s(active(_x0))]] = x0 >= x0 = [[s(_x0)]] [[zWadr(mark(_x0), _x1)]] = 2 + x0 + 2x1 >= 2 + x0 + 2x1 = [[zWadr(_x0, _x1)]] [[zWadr(_x0, mark(_x1))]] = 2 + x0 + 2x1 >= 2 + x0 + 2x1 = [[zWadr(_x0, _x1)]] [[zWadr(active(_x0), _x1)]] = 2 + x0 + 2x1 >= 2 + x0 + 2x1 = [[zWadr(_x0, _x1)]] [[zWadr(_x0, active(_x1))]] = 2 + x0 + 2x1 >= 2 + x0 + 2x1 = [[zWadr(_x0, _x1)]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace the dependency pair problem (P_13, R_1, minimal, formative) by (P_14, R_1, minimal, formative), where P_14 consists of: mark#(app(X, Y)) =#> active#(app(mark(X), mark(Y))) mark#(app(X, Y)) =#> mark#(X) mark#(app(X, Y)) =#> mark#(Y) mark#(s(X)) =#> mark#(X) mark#(zWadr(X, Y)) =#> active#(zWadr(mark(X), mark(Y))) Thus, the original system is terminating if (P_14, R_1, minimal, formative) is finite. We consider the dependency pair problem (P_14, R_1, 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 : * 1 : 0, 1, 2, 3, 4 * 2 : 0, 1, 2, 3, 4 * 3 : 0, 1, 2, 3, 4 * 4 : This graph has the following strongly connected components: P_15: mark#(app(X, Y)) =#> mark#(X) mark#(app(X, Y)) =#> mark#(Y) mark#(s(X)) =#> mark#(X) By [Kop12, Thm. 7.31], we may replace any dependency pair problem (P_14, R_1, m, f) by (P_15, R_1, m, f). Thus, the original system is terminating if (P_15, R_1, minimal, formative) is finite. We consider the dependency pair problem (P_15, R_1, minimal, formative). We apply the subterm criterion with the following projection function: nu(mark#) = 1 Thus, we can orient the dependency pairs as follows: nu(mark#(app(X, Y))) = app(X, Y) |> X = nu(mark#(X)) nu(mark#(app(X, Y))) = app(X, Y) |> Y = nu(mark#(Y)) nu(mark#(s(X))) = s(X) |> X = nu(mark#(X)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_15, R_1, minimal, f) by ({}, R_1, 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.