/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. 0 : [] --> o active : [o] --> o cons : [o * o] --> o head : [o] --> o incr : [o] --> o mark : [o] --> o nats : [] --> o odds : [] --> o pairs : [] --> o s : [o] --> o tail : [o] --> o active(nats) => mark(cons(0, incr(nats))) active(pairs) => mark(cons(0, incr(odds))) active(odds) => mark(incr(pairs)) active(incr(cons(X, Y))) => mark(cons(s(X), incr(Y))) active(head(cons(X, Y))) => mark(X) active(tail(cons(X, Y))) => mark(Y) mark(nats) => active(nats) mark(cons(X, Y)) => active(cons(mark(X), Y)) mark(0) => active(0) mark(incr(X)) => active(incr(mark(X))) mark(pairs) => active(pairs) mark(odds) => active(odds) mark(s(X)) => active(s(mark(X))) mark(head(X)) => active(head(mark(X))) mark(tail(X)) => active(tail(mark(X))) 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) incr(mark(X)) => incr(X) incr(active(X)) => incr(X) s(mark(X)) => s(X) s(active(X)) => s(X) head(mark(X)) => head(X) head(active(X)) => head(X) tail(mark(X)) => tail(X) tail(active(X)) => tail(X) We use rule removal, following [Kop12, Theorem 2.23]. This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): active(nats) >? mark(cons(0, incr(nats))) active(pairs) >? mark(cons(0, incr(odds))) active(odds) >? mark(incr(pairs)) active(incr(cons(X, Y))) >? mark(cons(s(X), incr(Y))) active(head(cons(X, Y))) >? mark(X) active(tail(cons(X, Y))) >? mark(Y) mark(nats) >? active(nats) mark(cons(X, Y)) >? active(cons(mark(X), Y)) mark(0) >? active(0) mark(incr(X)) >? active(incr(mark(X))) mark(pairs) >? active(pairs) mark(odds) >? active(odds) mark(s(X)) >? active(s(mark(X))) mark(head(X)) >? active(head(mark(X))) mark(tail(X)) >? active(tail(mark(X))) 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) incr(mark(X)) >? incr(X) incr(active(X)) >? incr(X) s(mark(X)) >? s(X) s(active(X)) >? s(X) head(mark(X)) >? head(X) head(active(X)) >? head(X) tail(mark(X)) >? tail(X) tail(active(X)) >? tail(X) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: 0 = 0 active = \y0.y0 cons = \y0y1.y0 + y1 head = \y0.y0 incr = \y0.y0 mark = \y0.y0 nats = 0 odds = 0 pairs = 0 s = \y0.y0 tail = \y0.1 + y0 Using this interpretation, the requirements translate to: [[active(nats)]] = 0 >= 0 = [[mark(cons(0, incr(nats)))]] [[active(pairs)]] = 0 >= 0 = [[mark(cons(0, incr(odds)))]] [[active(odds)]] = 0 >= 0 = [[mark(incr(pairs))]] [[active(incr(cons(_x0, _x1)))]] = x0 + x1 >= x0 + x1 = [[mark(cons(s(_x0), incr(_x1)))]] [[active(head(cons(_x0, _x1)))]] = x0 + x1 >= x0 = [[mark(_x0)]] [[active(tail(cons(_x0, _x1)))]] = 1 + x0 + x1 > x1 = [[mark(_x1)]] [[mark(nats)]] = 0 >= 0 = [[active(nats)]] [[mark(cons(_x0, _x1))]] = x0 + x1 >= x0 + x1 = [[active(cons(mark(_x0), _x1))]] [[mark(0)]] = 0 >= 0 = [[active(0)]] [[mark(incr(_x0))]] = x0 >= x0 = [[active(incr(mark(_x0)))]] [[mark(pairs)]] = 0 >= 0 = [[active(pairs)]] [[mark(odds)]] = 0 >= 0 = [[active(odds)]] [[mark(s(_x0))]] = x0 >= x0 = [[active(s(mark(_x0)))]] [[mark(head(_x0))]] = x0 >= x0 = [[active(head(mark(_x0)))]] [[mark(tail(_x0))]] = 1 + x0 >= 1 + x0 = [[active(tail(mark(_x0)))]] [[cons(mark(_x0), _x1)]] = x0 + x1 >= x0 + x1 = [[cons(_x0, _x1)]] [[cons(_x0, mark(_x1))]] = x0 + x1 >= x0 + x1 = [[cons(_x0, _x1)]] [[cons(active(_x0), _x1)]] = x0 + x1 >= x0 + x1 = [[cons(_x0, _x1)]] [[cons(_x0, active(_x1))]] = x0 + x1 >= x0 + x1 = [[cons(_x0, _x1)]] [[incr(mark(_x0))]] = x0 >= x0 = [[incr(_x0)]] [[incr(active(_x0))]] = x0 >= x0 = [[incr(_x0)]] [[s(mark(_x0))]] = x0 >= x0 = [[s(_x0)]] [[s(active(_x0))]] = x0 >= x0 = [[s(_x0)]] [[head(mark(_x0))]] = x0 >= x0 = [[head(_x0)]] [[head(active(_x0))]] = x0 >= x0 = [[head(_x0)]] [[tail(mark(_x0))]] = 1 + x0 >= 1 + x0 = [[tail(_x0)]] [[tail(active(_x0))]] = 1 + x0 >= 1 + x0 = [[tail(_x0)]] We can thus remove the following rules: active(tail(cons(X, Y))) => mark(Y) We use rule removal, following [Kop12, Theorem 2.23]. This gives the following requirements (possibly using Theorems 2.25 and 2.26 in [Kop12]): active(nats) >? mark(cons(0, incr(nats))) active(pairs) >? mark(cons(0, incr(odds))) active(odds) >? mark(incr(pairs)) active(incr(cons(X, Y))) >? mark(cons(s(X), incr(Y))) active(head(cons(X, Y))) >? mark(X) mark(nats) >? active(nats) mark(cons(X, Y)) >? active(cons(mark(X), Y)) mark(0) >? active(0) mark(incr(X)) >? active(incr(mark(X))) mark(pairs) >? active(pairs) mark(odds) >? active(odds) mark(s(X)) >? active(s(mark(X))) mark(head(X)) >? active(head(mark(X))) mark(tail(X)) >? active(tail(mark(X))) 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) incr(mark(X)) >? incr(X) incr(active(X)) >? incr(X) s(mark(X)) >? s(X) s(active(X)) >? s(X) head(mark(X)) >? head(X) head(active(X)) >? head(X) tail(mark(X)) >? tail(X) tail(active(X)) >? tail(X) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: 0 = 0 active = \y0.y0 cons = \y0y1.y1 + 2y0 head = \y0.2 + y0 incr = \y0.2y0 mark = \y0.y0 nats = 0 odds = 0 pairs = 0 s = \y0.2y0 tail = \y0.2y0 Using this interpretation, the requirements translate to: [[active(nats)]] = 0 >= 0 = [[mark(cons(0, incr(nats)))]] [[active(pairs)]] = 0 >= 0 = [[mark(cons(0, incr(odds)))]] [[active(odds)]] = 0 >= 0 = [[mark(incr(pairs))]] [[active(incr(cons(_x0, _x1)))]] = 2x1 + 4x0 >= 2x1 + 4x0 = [[mark(cons(s(_x0), incr(_x1)))]] [[active(head(cons(_x0, _x1)))]] = 2 + x1 + 2x0 > x0 = [[mark(_x0)]] [[mark(nats)]] = 0 >= 0 = [[active(nats)]] [[mark(cons(_x0, _x1))]] = x1 + 2x0 >= x1 + 2x0 = [[active(cons(mark(_x0), _x1))]] [[mark(0)]] = 0 >= 0 = [[active(0)]] [[mark(incr(_x0))]] = 2x0 >= 2x0 = [[active(incr(mark(_x0)))]] [[mark(pairs)]] = 0 >= 0 = [[active(pairs)]] [[mark(odds)]] = 0 >= 0 = [[active(odds)]] [[mark(s(_x0))]] = 2x0 >= 2x0 = [[active(s(mark(_x0)))]] [[mark(head(_x0))]] = 2 + x0 >= 2 + x0 = [[active(head(mark(_x0)))]] [[mark(tail(_x0))]] = 2x0 >= 2x0 = [[active(tail(mark(_x0)))]] [[cons(mark(_x0), _x1)]] = x1 + 2x0 >= x1 + 2x0 = [[cons(_x0, _x1)]] [[cons(_x0, mark(_x1))]] = x1 + 2x0 >= x1 + 2x0 = [[cons(_x0, _x1)]] [[cons(active(_x0), _x1)]] = x1 + 2x0 >= x1 + 2x0 = [[cons(_x0, _x1)]] [[cons(_x0, active(_x1))]] = x1 + 2x0 >= x1 + 2x0 = [[cons(_x0, _x1)]] [[incr(mark(_x0))]] = 2x0 >= 2x0 = [[incr(_x0)]] [[incr(active(_x0))]] = 2x0 >= 2x0 = [[incr(_x0)]] [[s(mark(_x0))]] = 2x0 >= 2x0 = [[s(_x0)]] [[s(active(_x0))]] = 2x0 >= 2x0 = [[s(_x0)]] [[head(mark(_x0))]] = 2 + x0 >= 2 + x0 = [[head(_x0)]] [[head(active(_x0))]] = 2 + x0 >= 2 + x0 = [[head(_x0)]] [[tail(mark(_x0))]] = 2x0 >= 2x0 = [[tail(_x0)]] [[tail(active(_x0))]] = 2x0 >= 2x0 = [[tail(_x0)]] We can thus remove the following rules: active(head(cons(X, Y))) => mark(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#(nats) =#> mark#(cons(0, incr(nats))) 1] active#(nats) =#> cons#(0, incr(nats)) 2] active#(nats) =#> incr#(nats) 3] active#(pairs) =#> mark#(cons(0, incr(odds))) 4] active#(pairs) =#> cons#(0, incr(odds)) 5] active#(pairs) =#> incr#(odds) 6] active#(odds) =#> mark#(incr(pairs)) 7] active#(odds) =#> incr#(pairs) 8] active#(incr(cons(X, Y))) =#> mark#(cons(s(X), incr(Y))) 9] active#(incr(cons(X, Y))) =#> cons#(s(X), incr(Y)) 10] active#(incr(cons(X, Y))) =#> s#(X) 11] active#(incr(cons(X, Y))) =#> incr#(Y) 12] mark#(nats) =#> active#(nats) 13] mark#(cons(X, Y)) =#> active#(cons(mark(X), Y)) 14] mark#(cons(X, Y)) =#> cons#(mark(X), Y) 15] mark#(cons(X, Y)) =#> mark#(X) 16] mark#(0) =#> active#(0) 17] mark#(incr(X)) =#> active#(incr(mark(X))) 18] mark#(incr(X)) =#> incr#(mark(X)) 19] mark#(incr(X)) =#> mark#(X) 20] mark#(pairs) =#> active#(pairs) 21] mark#(odds) =#> active#(odds) 22] mark#(s(X)) =#> active#(s(mark(X))) 23] mark#(s(X)) =#> s#(mark(X)) 24] mark#(s(X)) =#> mark#(X) 25] mark#(head(X)) =#> active#(head(mark(X))) 26] mark#(head(X)) =#> head#(mark(X)) 27] mark#(head(X)) =#> mark#(X) 28] mark#(tail(X)) =#> active#(tail(mark(X))) 29] mark#(tail(X)) =#> tail#(mark(X)) 30] mark#(tail(X)) =#> mark#(X) 31] cons#(mark(X), Y) =#> cons#(X, Y) 32] cons#(X, mark(Y)) =#> cons#(X, Y) 33] cons#(active(X), Y) =#> cons#(X, Y) 34] cons#(X, active(Y)) =#> cons#(X, Y) 35] incr#(mark(X)) =#> incr#(X) 36] incr#(active(X)) =#> incr#(X) 37] s#(mark(X)) =#> s#(X) 38] s#(active(X)) =#> s#(X) 39] head#(mark(X)) =#> head#(X) 40] head#(active(X)) =#> head#(X) 41] tail#(mark(X)) =#> tail#(X) 42] tail#(active(X)) =#> tail#(X) Rules R_0: active(nats) => mark(cons(0, incr(nats))) active(pairs) => mark(cons(0, incr(odds))) active(odds) => mark(incr(pairs)) active(incr(cons(X, Y))) => mark(cons(s(X), incr(Y))) mark(nats) => active(nats) mark(cons(X, Y)) => active(cons(mark(X), Y)) mark(0) => active(0) mark(incr(X)) => active(incr(mark(X))) mark(pairs) => active(pairs) mark(odds) => active(odds) mark(s(X)) => active(s(mark(X))) mark(head(X)) => active(head(mark(X))) mark(tail(X)) => active(tail(mark(X))) 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) incr(mark(X)) => incr(X) incr(active(X)) => incr(X) s(mark(X)) => s(X) s(active(X)) => s(X) head(mark(X)) => head(X) head(active(X)) => head(X) tail(mark(X)) => tail(X) tail(active(X)) => tail(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 : 13, 14, 15 * 1 : * 2 : * 3 : 13, 14, 15 * 4 : * 5 : * 6 : 17, 18, 19 * 7 : * 8 : 13, 14, 15 * 9 : * 10 : 37, 38 * 11 : 35, 36 * 12 : 0, 1, 2 * 13 : * 14 : 31, 32, 33, 34 * 15 : 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 * 16 : * 17 : 8, 9, 10, 11 * 18 : 35, 36 * 19 : 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 * 20 : 3, 4, 5 * 21 : 6, 7 * 22 : * 23 : 37, 38 * 24 : 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 * 25 : * 26 : 39, 40 * 27 : 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 * 28 : * 29 : 41, 42 * 30 : 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 * 31 : 31, 32, 33, 34 * 32 : 31, 32, 33, 34 * 33 : 31, 32, 33, 34 * 34 : 31, 32, 33, 34 * 35 : 35, 36 * 36 : 35, 36 * 37 : 37, 38 * 38 : 37, 38 * 39 : 39, 40 * 40 : 39, 40 * 41 : 41, 42 * 42 : 41, 42 This graph has the following strongly connected components: P_1: active#(nats) =#> mark#(cons(0, incr(nats))) active#(pairs) =#> mark#(cons(0, incr(odds))) active#(odds) =#> mark#(incr(pairs)) active#(incr(cons(X, Y))) =#> mark#(cons(s(X), incr(Y))) mark#(nats) =#> active#(nats) mark#(cons(X, Y)) =#> mark#(X) mark#(incr(X)) =#> active#(incr(mark(X))) mark#(incr(X)) =#> mark#(X) mark#(pairs) =#> active#(pairs) mark#(odds) =#> active#(odds) mark#(s(X)) =#> mark#(X) mark#(head(X)) =#> mark#(X) mark#(tail(X)) =#> mark#(X) P_2: 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_3: incr#(mark(X)) =#> incr#(X) incr#(active(X)) =#> incr#(X) P_4: s#(mark(X)) =#> s#(X) s#(active(X)) =#> s#(X) P_5: head#(mark(X)) =#> head#(X) head#(active(X)) =#> head#(X) P_6: tail#(mark(X)) =#> tail#(X) tail#(active(X)) =#> tail#(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) and (P_6, 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) 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(tail#) = 1 Thus, we can orient the dependency pairs as follows: nu(tail#(mark(X))) = mark(X) |> X = nu(tail#(X)) nu(tail#(active(X))) = active(X) |> X = nu(tail#(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(head#) = 1 Thus, we can orient the dependency pairs as follows: nu(head#(mark(X))) = mark(X) |> X = nu(head#(X)) nu(head#(active(X))) = active(X) |> X = nu(head#(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(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_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(incr#) = 1 Thus, we can orient the dependency pairs as follows: nu(incr#(mark(X))) = mark(X) |> X = nu(incr#(X)) nu(incr#(active(X))) = active(X) |> X = nu(incr#(X)) 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(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_2, R_0, minimal, f) by (P_7, R_0, minimal, f), where P_7 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) 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(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_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 (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#(nats) >? mark#(cons(0, incr(nats))) active#(pairs) >? mark#(cons(0, incr(odds))) active#(odds) >? mark#(incr(pairs)) active#(incr(cons(X, Y))) >? mark#(cons(s(X), incr(Y))) mark#(nats) >? active#(nats) mark#(cons(X, Y)) >? mark#(X) mark#(incr(X)) >? active#(incr(mark(X))) mark#(incr(X)) >? mark#(X) mark#(pairs) >? active#(pairs) mark#(odds) >? active#(odds) mark#(s(X)) >? mark#(X) mark#(head(X)) >? mark#(X) mark#(tail(X)) >? mark#(X) active(nats) >= mark(cons(0, incr(nats))) active(pairs) >= mark(cons(0, incr(odds))) active(odds) >= mark(incr(pairs)) active(incr(cons(X, Y))) >= mark(cons(s(X), incr(Y))) mark(nats) >= active(nats) mark(cons(X, Y)) >= active(cons(mark(X), Y)) mark(0) >= active(0) mark(incr(X)) >= active(incr(mark(X))) mark(pairs) >= active(pairs) mark(odds) >= active(odds) mark(s(X)) >= active(s(mark(X))) mark(head(X)) >= active(head(mark(X))) mark(tail(X)) >= active(tail(mark(X))) 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) incr(mark(X)) >= incr(X) incr(active(X)) >= incr(X) s(mark(X)) >= s(X) s(active(X)) >= s(X) head(mark(X)) >= head(X) head(active(X)) >= head(X) tail(mark(X)) >= tail(X) tail(active(X)) >= tail(X) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: 0 = 0 active = \y0.y0 active# = \y0.y0 cons = \y0y1.2y0 head = \y0.2 + y0 incr = \y0.2y0 mark = \y0.2y0 mark# = \y0.2y0 nats = 1 odds = 0 pairs = 0 s = \y0.y0 tail = \y0.2 + 2y0 Using this interpretation, the requirements translate to: [[active#(nats)]] = 1 > 0 = [[mark#(cons(0, incr(nats)))]] [[active#(pairs)]] = 0 >= 0 = [[mark#(cons(0, incr(odds)))]] [[active#(odds)]] = 0 >= 0 = [[mark#(incr(pairs))]] [[active#(incr(cons(_x0, _x1)))]] = 4x0 >= 4x0 = [[mark#(cons(s(_x0), incr(_x1)))]] [[mark#(nats)]] = 2 > 1 = [[active#(nats)]] [[mark#(cons(_x0, _x1))]] = 4x0 >= 2x0 = [[mark#(_x0)]] [[mark#(incr(_x0))]] = 4x0 >= 4x0 = [[active#(incr(mark(_x0)))]] [[mark#(incr(_x0))]] = 4x0 >= 2x0 = [[mark#(_x0)]] [[mark#(pairs)]] = 0 >= 0 = [[active#(pairs)]] [[mark#(odds)]] = 0 >= 0 = [[active#(odds)]] [[mark#(s(_x0))]] = 2x0 >= 2x0 = [[mark#(_x0)]] [[mark#(head(_x0))]] = 4 + 2x0 > 2x0 = [[mark#(_x0)]] [[mark#(tail(_x0))]] = 4 + 4x0 > 2x0 = [[mark#(_x0)]] [[active(nats)]] = 1 >= 0 = [[mark(cons(0, incr(nats)))]] [[active(pairs)]] = 0 >= 0 = [[mark(cons(0, incr(odds)))]] [[active(odds)]] = 0 >= 0 = [[mark(incr(pairs))]] [[active(incr(cons(_x0, _x1)))]] = 4x0 >= 4x0 = [[mark(cons(s(_x0), incr(_x1)))]] [[mark(nats)]] = 2 >= 1 = [[active(nats)]] [[mark(cons(_x0, _x1))]] = 4x0 >= 4x0 = [[active(cons(mark(_x0), _x1))]] [[mark(0)]] = 0 >= 0 = [[active(0)]] [[mark(incr(_x0))]] = 4x0 >= 4x0 = [[active(incr(mark(_x0)))]] [[mark(pairs)]] = 0 >= 0 = [[active(pairs)]] [[mark(odds)]] = 0 >= 0 = [[active(odds)]] [[mark(s(_x0))]] = 2x0 >= 2x0 = [[active(s(mark(_x0)))]] [[mark(head(_x0))]] = 4 + 2x0 >= 2 + 2x0 = [[active(head(mark(_x0)))]] [[mark(tail(_x0))]] = 4 + 4x0 >= 2 + 4x0 = [[active(tail(mark(_x0)))]] [[cons(mark(_x0), _x1)]] = 4x0 >= 2x0 = [[cons(_x0, _x1)]] [[cons(_x0, mark(_x1))]] = 2x0 >= 2x0 = [[cons(_x0, _x1)]] [[cons(active(_x0), _x1)]] = 2x0 >= 2x0 = [[cons(_x0, _x1)]] [[cons(_x0, active(_x1))]] = 2x0 >= 2x0 = [[cons(_x0, _x1)]] [[incr(mark(_x0))]] = 4x0 >= 2x0 = [[incr(_x0)]] [[incr(active(_x0))]] = 2x0 >= 2x0 = [[incr(_x0)]] [[s(mark(_x0))]] = 2x0 >= x0 = [[s(_x0)]] [[s(active(_x0))]] = x0 >= x0 = [[s(_x0)]] [[head(mark(_x0))]] = 2 + 2x0 >= 2 + x0 = [[head(_x0)]] [[head(active(_x0))]] = 2 + x0 >= 2 + x0 = [[head(_x0)]] [[tail(mark(_x0))]] = 2 + 4x0 >= 2 + 2x0 = [[tail(_x0)]] [[tail(active(_x0))]] = 2 + 2x0 >= 2 + 2x0 = [[tail(_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_8, R_0, minimal, formative), where P_8 consists of: active#(pairs) =#> mark#(cons(0, incr(odds))) active#(odds) =#> mark#(incr(pairs)) active#(incr(cons(X, Y))) =#> mark#(cons(s(X), incr(Y))) mark#(cons(X, Y)) =#> mark#(X) mark#(incr(X)) =#> active#(incr(mark(X))) mark#(incr(X)) =#> mark#(X) mark#(pairs) =#> active#(pairs) mark#(odds) =#> active#(odds) mark#(s(X)) =#> mark#(X) Thus, the original system is terminating if (P_8, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_8, R_0, minimal, formative). The formative rules of (P_8, R_0) are R_1 ::= active(nats) => mark(cons(0, incr(nats))) active(pairs) => mark(cons(0, incr(odds))) active(odds) => mark(incr(pairs)) active(incr(cons(X, Y))) => mark(cons(s(X), incr(Y))) mark(nats) => active(nats) mark(cons(X, Y)) => active(cons(mark(X), Y)) mark(0) => active(0) mark(incr(X)) => active(incr(mark(X))) mark(pairs) => active(pairs) mark(odds) => active(odds) mark(s(X)) => active(s(mark(X))) mark(head(X)) => active(head(mark(X))) mark(tail(X)) => active(tail(mark(X))) 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) incr(mark(X)) => incr(X) incr(active(X)) => incr(X) s(mark(X)) => s(X) s(active(X)) => s(X) By [Kop12, Thm. 7.17], we may replace the dependency pair problem (P_8, R_0, minimal, formative) by (P_8, R_1, minimal, formative). Thus, the original system is terminating if (P_8, R_1, minimal, formative) is finite. We consider the dependency pair problem (P_8, 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#(pairs) >? mark#(cons(0, incr(odds))) active#(odds) >? mark#(incr(pairs)) active#(incr(cons(X, Y))) >? mark#(cons(s(X), incr(Y))) mark#(cons(X, Y)) >? mark#(X) mark#(incr(X)) >? active#(incr(mark(X))) mark#(incr(X)) >? mark#(X) mark#(pairs) >? active#(pairs) mark#(odds) >? active#(odds) mark#(s(X)) >? mark#(X) active(nats) >= mark(cons(0, incr(nats))) active(pairs) >= mark(cons(0, incr(odds))) active(odds) >= mark(incr(pairs)) active(incr(cons(X, Y))) >= mark(cons(s(X), incr(Y))) mark(nats) >= active(nats) mark(cons(X, Y)) >= active(cons(mark(X), Y)) mark(0) >= active(0) mark(incr(X)) >= active(incr(mark(X))) mark(pairs) >= active(pairs) mark(odds) >= active(odds) mark(s(X)) >= active(s(mark(X))) mark(head(X)) >= active(head(mark(X))) mark(tail(X)) >= active(tail(mark(X))) 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) incr(mark(X)) >= incr(X) incr(active(X)) >= incr(X) s(mark(X)) >= s(X) s(active(X)) >= s(X) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: 0 = 0 active = \y0.y0 active# = \y0.y0 cons = \y0y1.2y0 head = \y0.0 incr = \y0.2y0 mark = \y0.2y0 mark# = \y0.2y0 nats = 0 odds = 2 pairs = 0 s = \y0.y0 tail = \y0.0 Using this interpretation, the requirements translate to: [[active#(pairs)]] = 0 >= 0 = [[mark#(cons(0, incr(odds)))]] [[active#(odds)]] = 2 > 0 = [[mark#(incr(pairs))]] [[active#(incr(cons(_x0, _x1)))]] = 4x0 >= 4x0 = [[mark#(cons(s(_x0), incr(_x1)))]] [[mark#(cons(_x0, _x1))]] = 4x0 >= 2x0 = [[mark#(_x0)]] [[mark#(incr(_x0))]] = 4x0 >= 4x0 = [[active#(incr(mark(_x0)))]] [[mark#(incr(_x0))]] = 4x0 >= 2x0 = [[mark#(_x0)]] [[mark#(pairs)]] = 0 >= 0 = [[active#(pairs)]] [[mark#(odds)]] = 4 > 2 = [[active#(odds)]] [[mark#(s(_x0))]] = 2x0 >= 2x0 = [[mark#(_x0)]] [[active(nats)]] = 0 >= 0 = [[mark(cons(0, incr(nats)))]] [[active(pairs)]] = 0 >= 0 = [[mark(cons(0, incr(odds)))]] [[active(odds)]] = 2 >= 0 = [[mark(incr(pairs))]] [[active(incr(cons(_x0, _x1)))]] = 4x0 >= 4x0 = [[mark(cons(s(_x0), incr(_x1)))]] [[mark(nats)]] = 0 >= 0 = [[active(nats)]] [[mark(cons(_x0, _x1))]] = 4x0 >= 4x0 = [[active(cons(mark(_x0), _x1))]] [[mark(0)]] = 0 >= 0 = [[active(0)]] [[mark(incr(_x0))]] = 4x0 >= 4x0 = [[active(incr(mark(_x0)))]] [[mark(pairs)]] = 0 >= 0 = [[active(pairs)]] [[mark(odds)]] = 4 >= 2 = [[active(odds)]] [[mark(s(_x0))]] = 2x0 >= 2x0 = [[active(s(mark(_x0)))]] [[mark(head(_x0))]] = 0 >= 0 = [[active(head(mark(_x0)))]] [[mark(tail(_x0))]] = 0 >= 0 = [[active(tail(mark(_x0)))]] [[cons(mark(_x0), _x1)]] = 4x0 >= 2x0 = [[cons(_x0, _x1)]] [[cons(_x0, mark(_x1))]] = 2x0 >= 2x0 = [[cons(_x0, _x1)]] [[cons(active(_x0), _x1)]] = 2x0 >= 2x0 = [[cons(_x0, _x1)]] [[cons(_x0, active(_x1))]] = 2x0 >= 2x0 = [[cons(_x0, _x1)]] [[incr(mark(_x0))]] = 4x0 >= 2x0 = [[incr(_x0)]] [[incr(active(_x0))]] = 2x0 >= 2x0 = [[incr(_x0)]] [[s(mark(_x0))]] = 2x0 >= x0 = [[s(_x0)]] [[s(active(_x0))]] = x0 >= x0 = [[s(_x0)]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace the dependency pair problem (P_8, R_1, minimal, formative) by (P_9, R_1, minimal, formative), where P_9 consists of: active#(pairs) =#> mark#(cons(0, incr(odds))) active#(incr(cons(X, Y))) =#> mark#(cons(s(X), incr(Y))) mark#(cons(X, Y)) =#> mark#(X) mark#(incr(X)) =#> active#(incr(mark(X))) mark#(incr(X)) =#> mark#(X) mark#(pairs) =#> active#(pairs) mark#(s(X)) =#> mark#(X) Thus, the original system is terminating if (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: active#(pairs) >? mark#(cons(0, incr(odds))) active#(incr(cons(X, Y))) >? mark#(cons(s(X), incr(Y))) mark#(cons(X, Y)) >? mark#(X) mark#(incr(X)) >? active#(incr(mark(X))) mark#(incr(X)) >? mark#(X) mark#(pairs) >? active#(pairs) mark#(s(X)) >? mark#(X) active(nats) >= mark(cons(0, incr(nats))) active(pairs) >= mark(cons(0, incr(odds))) active(odds) >= mark(incr(pairs)) active(incr(cons(X, Y))) >= mark(cons(s(X), incr(Y))) mark(nats) >= active(nats) mark(cons(X, Y)) >= active(cons(mark(X), Y)) mark(0) >= active(0) mark(incr(X)) >= active(incr(mark(X))) mark(pairs) >= active(pairs) mark(odds) >= active(odds) mark(s(X)) >= active(s(mark(X))) mark(head(X)) >= active(head(mark(X))) mark(tail(X)) >= active(tail(mark(X))) 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) incr(mark(X)) >= incr(X) incr(active(X)) >= incr(X) s(mark(X)) >= s(X) s(active(X)) >= s(X) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: 0 = 0 active = \y0.y0 active# = \y0.2y0 cons = \y0y1.y0 head = \y0.0 incr = \y0.2y0 mark = \y0.y0 mark# = \y0.2y0 nats = 0 odds = 2 pairs = 1 s = \y0.y0 tail = \y0.0 Using this interpretation, the requirements translate to: [[active#(pairs)]] = 2 > 0 = [[mark#(cons(0, incr(odds)))]] [[active#(incr(cons(_x0, _x1)))]] = 4x0 >= 2x0 = [[mark#(cons(s(_x0), incr(_x1)))]] [[mark#(cons(_x0, _x1))]] = 2x0 >= 2x0 = [[mark#(_x0)]] [[mark#(incr(_x0))]] = 4x0 >= 4x0 = [[active#(incr(mark(_x0)))]] [[mark#(incr(_x0))]] = 4x0 >= 2x0 = [[mark#(_x0)]] [[mark#(pairs)]] = 2 >= 2 = [[active#(pairs)]] [[mark#(s(_x0))]] = 2x0 >= 2x0 = [[mark#(_x0)]] [[active(nats)]] = 0 >= 0 = [[mark(cons(0, incr(nats)))]] [[active(pairs)]] = 1 >= 0 = [[mark(cons(0, incr(odds)))]] [[active(odds)]] = 2 >= 2 = [[mark(incr(pairs))]] [[active(incr(cons(_x0, _x1)))]] = 2x0 >= x0 = [[mark(cons(s(_x0), incr(_x1)))]] [[mark(nats)]] = 0 >= 0 = [[active(nats)]] [[mark(cons(_x0, _x1))]] = x0 >= x0 = [[active(cons(mark(_x0), _x1))]] [[mark(0)]] = 0 >= 0 = [[active(0)]] [[mark(incr(_x0))]] = 2x0 >= 2x0 = [[active(incr(mark(_x0)))]] [[mark(pairs)]] = 1 >= 1 = [[active(pairs)]] [[mark(odds)]] = 2 >= 2 = [[active(odds)]] [[mark(s(_x0))]] = x0 >= x0 = [[active(s(mark(_x0)))]] [[mark(head(_x0))]] = 0 >= 0 = [[active(head(mark(_x0)))]] [[mark(tail(_x0))]] = 0 >= 0 = [[active(tail(mark(_x0)))]] [[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)]] [[incr(mark(_x0))]] = 2x0 >= 2x0 = [[incr(_x0)]] [[incr(active(_x0))]] = 2x0 >= 2x0 = [[incr(_x0)]] [[s(mark(_x0))]] = x0 >= x0 = [[s(_x0)]] [[s(active(_x0))]] = x0 >= x0 = [[s(_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: active#(incr(cons(X, Y))) =#> mark#(cons(s(X), incr(Y))) mark#(cons(X, Y)) =#> mark#(X) mark#(incr(X)) =#> active#(incr(mark(X))) mark#(incr(X)) =#> mark#(X) mark#(pairs) =#> active#(pairs) mark#(s(X)) =#> mark#(X) Thus, the original system is terminating if (P_10, R_1, minimal, formative) is finite. We consider the dependency pair problem (P_10, 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 * 1 : 1, 2, 3, 4, 5 * 2 : 0 * 3 : 1, 2, 3, 4, 5 * 4 : * 5 : 1, 2, 3, 4, 5 This graph has the following strongly connected components: P_11: active#(incr(cons(X, Y))) =#> mark#(cons(s(X), incr(Y))) mark#(cons(X, Y)) =#> mark#(X) mark#(incr(X)) =#> active#(incr(mark(X))) mark#(incr(X)) =#> mark#(X) mark#(s(X)) =#> mark#(X) By [Kop12, Thm. 7.31], we may replace any dependency pair problem (P_10, R_1, m, f) by (P_11, R_1, m, f). Thus, the original system is terminating if (P_11, R_1, minimal, formative) is finite. We consider the dependency pair problem (P_11, 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#(incr(cons(X, Y))) >? mark#(cons(s(X), incr(Y))) mark#(cons(X, Y)) >? mark#(X) mark#(incr(X)) >? active#(incr(mark(X))) mark#(incr(X)) >? mark#(X) mark#(s(X)) >? mark#(X) active(nats) >= mark(cons(0, incr(nats))) active(pairs) >= mark(cons(0, incr(odds))) active(odds) >= mark(incr(pairs)) active(incr(cons(X, Y))) >= mark(cons(s(X), incr(Y))) mark(nats) >= active(nats) mark(cons(X, Y)) >= active(cons(mark(X), Y)) mark(0) >= active(0) mark(incr(X)) >= active(incr(mark(X))) mark(pairs) >= active(pairs) mark(odds) >= active(odds) mark(s(X)) >= active(s(mark(X))) mark(head(X)) >= active(head(mark(X))) mark(tail(X)) >= active(tail(mark(X))) 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) incr(mark(X)) >= incr(X) incr(active(X)) >= incr(X) s(mark(X)) >= s(X) s(active(X)) >= s(X) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: 0 = 0 active = \y0.y0 active# = \y0.y0 cons = \y0y1.2y0 head = \y0.0 incr = \y0.2 + y0 mark = \y0.y0 mark# = \y0.1 + y0 nats = 0 odds = 2 pairs = 0 s = \y0.y0 tail = \y0.0 Using this interpretation, the requirements translate to: [[active#(incr(cons(_x0, _x1)))]] = 2 + 2x0 > 1 + 2x0 = [[mark#(cons(s(_x0), incr(_x1)))]] [[mark#(cons(_x0, _x1))]] = 1 + 2x0 >= 1 + x0 = [[mark#(_x0)]] [[mark#(incr(_x0))]] = 3 + x0 > 2 + x0 = [[active#(incr(mark(_x0)))]] [[mark#(incr(_x0))]] = 3 + x0 > 1 + x0 = [[mark#(_x0)]] [[mark#(s(_x0))]] = 1 + x0 >= 1 + x0 = [[mark#(_x0)]] [[active(nats)]] = 0 >= 0 = [[mark(cons(0, incr(nats)))]] [[active(pairs)]] = 0 >= 0 = [[mark(cons(0, incr(odds)))]] [[active(odds)]] = 2 >= 2 = [[mark(incr(pairs))]] [[active(incr(cons(_x0, _x1)))]] = 2 + 2x0 >= 2x0 = [[mark(cons(s(_x0), incr(_x1)))]] [[mark(nats)]] = 0 >= 0 = [[active(nats)]] [[mark(cons(_x0, _x1))]] = 2x0 >= 2x0 = [[active(cons(mark(_x0), _x1))]] [[mark(0)]] = 0 >= 0 = [[active(0)]] [[mark(incr(_x0))]] = 2 + x0 >= 2 + x0 = [[active(incr(mark(_x0)))]] [[mark(pairs)]] = 0 >= 0 = [[active(pairs)]] [[mark(odds)]] = 2 >= 2 = [[active(odds)]] [[mark(s(_x0))]] = x0 >= x0 = [[active(s(mark(_x0)))]] [[mark(head(_x0))]] = 0 >= 0 = [[active(head(mark(_x0)))]] [[mark(tail(_x0))]] = 0 >= 0 = [[active(tail(mark(_x0)))]] [[cons(mark(_x0), _x1)]] = 2x0 >= 2x0 = [[cons(_x0, _x1)]] [[cons(_x0, mark(_x1))]] = 2x0 >= 2x0 = [[cons(_x0, _x1)]] [[cons(active(_x0), _x1)]] = 2x0 >= 2x0 = [[cons(_x0, _x1)]] [[cons(_x0, active(_x1))]] = 2x0 >= 2x0 = [[cons(_x0, _x1)]] [[incr(mark(_x0))]] = 2 + x0 >= 2 + x0 = [[incr(_x0)]] [[incr(active(_x0))]] = 2 + x0 >= 2 + x0 = [[incr(_x0)]] [[s(mark(_x0))]] = x0 >= x0 = [[s(_x0)]] [[s(active(_x0))]] = x0 >= x0 = [[s(_x0)]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace the dependency pair problem (P_11, R_1, minimal, formative) by (P_12, R_1, minimal, formative), where P_12 consists of: mark#(cons(X, Y)) =#> mark#(X) mark#(s(X)) =#> mark#(X) 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 apply the subterm criterion with the following projection function: nu(mark#) = 1 Thus, we can orient the dependency pairs as follows: nu(mark#(cons(X, Y))) = cons(X, Y) |> X = nu(mark#(X)) nu(mark#(s(X))) = s(X) |> X = nu(mark#(X)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_12, 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.