/export/starexec/sandbox/solver/bin/starexec_run_FirstOrder /export/starexec/sandbox/benchmark/theBenchmark.xml /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- YES We consider the system theBenchmark. We are asked to determine termination of the following first-order TRS. 0 : [] --> o active : [o] --> o cons : [o * o] --> o incr : [o] --> o mark : [o] --> o nil : [] --> o oddNs : [] --> o ok : [o] --> o pair : [o * o] --> o pairNs : [] --> o proper : [o] --> o repItems : [o] --> o s : [o] --> o tail : [o] --> o take : [o * o] --> o top : [o] --> o zip : [o * o] --> o active(pairNs) => mark(cons(0, incr(oddNs))) active(oddNs) => mark(incr(pairNs)) active(incr(cons(X, Y))) => mark(cons(s(X), incr(Y))) active(take(0, X)) => mark(nil) active(take(s(X), cons(Y, Z))) => mark(cons(Y, take(X, Z))) active(zip(nil, X)) => mark(nil) active(zip(X, nil)) => mark(nil) active(zip(cons(X, Y), cons(Z, U))) => mark(cons(pair(X, Z), zip(Y, U))) active(tail(cons(X, Y))) => mark(Y) active(repItems(nil)) => mark(nil) active(repItems(cons(X, Y))) => mark(cons(X, cons(X, repItems(Y)))) active(cons(X, Y)) => cons(active(X), Y) active(incr(X)) => incr(active(X)) active(s(X)) => s(active(X)) active(take(X, Y)) => take(active(X), Y) active(take(X, Y)) => take(X, active(Y)) active(zip(X, Y)) => zip(active(X), Y) active(zip(X, Y)) => zip(X, active(Y)) active(pair(X, Y)) => pair(active(X), Y) active(pair(X, Y)) => pair(X, active(Y)) active(tail(X)) => tail(active(X)) active(repItems(X)) => repItems(active(X)) cons(mark(X), Y) => mark(cons(X, Y)) incr(mark(X)) => mark(incr(X)) s(mark(X)) => mark(s(X)) take(mark(X), Y) => mark(take(X, Y)) take(X, mark(Y)) => mark(take(X, Y)) zip(mark(X), Y) => mark(zip(X, Y)) zip(X, mark(Y)) => mark(zip(X, Y)) pair(mark(X), Y) => mark(pair(X, Y)) pair(X, mark(Y)) => mark(pair(X, Y)) tail(mark(X)) => mark(tail(X)) repItems(mark(X)) => mark(repItems(X)) proper(pairNs) => ok(pairNs) proper(cons(X, Y)) => cons(proper(X), proper(Y)) proper(0) => ok(0) proper(incr(X)) => incr(proper(X)) proper(oddNs) => ok(oddNs) proper(s(X)) => s(proper(X)) proper(take(X, Y)) => take(proper(X), proper(Y)) proper(nil) => ok(nil) proper(zip(X, Y)) => zip(proper(X), proper(Y)) proper(pair(X, Y)) => pair(proper(X), proper(Y)) proper(tail(X)) => tail(proper(X)) proper(repItems(X)) => repItems(proper(X)) cons(ok(X), ok(Y)) => ok(cons(X, Y)) incr(ok(X)) => ok(incr(X)) s(ok(X)) => ok(s(X)) take(ok(X), ok(Y)) => ok(take(X, Y)) zip(ok(X), ok(Y)) => ok(zip(X, Y)) pair(ok(X), ok(Y)) => ok(pair(X, Y)) tail(ok(X)) => ok(tail(X)) repItems(ok(X)) => ok(repItems(X)) top(mark(X)) => top(proper(X)) top(ok(X)) => top(active(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(pairNs) >? mark(cons(0, incr(oddNs))) active(oddNs) >? mark(incr(pairNs)) active(incr(cons(X, Y))) >? mark(cons(s(X), incr(Y))) active(take(0, X)) >? mark(nil) active(take(s(X), cons(Y, Z))) >? mark(cons(Y, take(X, Z))) active(zip(nil, X)) >? mark(nil) active(zip(X, nil)) >? mark(nil) active(zip(cons(X, Y), cons(Z, U))) >? mark(cons(pair(X, Z), zip(Y, U))) active(tail(cons(X, Y))) >? mark(Y) active(repItems(nil)) >? mark(nil) active(repItems(cons(X, Y))) >? mark(cons(X, cons(X, repItems(Y)))) active(cons(X, Y)) >? cons(active(X), Y) active(incr(X)) >? incr(active(X)) active(s(X)) >? s(active(X)) active(take(X, Y)) >? take(active(X), Y) active(take(X, Y)) >? take(X, active(Y)) active(zip(X, Y)) >? zip(active(X), Y) active(zip(X, Y)) >? zip(X, active(Y)) active(pair(X, Y)) >? pair(active(X), Y) active(pair(X, Y)) >? pair(X, active(Y)) active(tail(X)) >? tail(active(X)) active(repItems(X)) >? repItems(active(X)) cons(mark(X), Y) >? mark(cons(X, Y)) incr(mark(X)) >? mark(incr(X)) s(mark(X)) >? mark(s(X)) take(mark(X), Y) >? mark(take(X, Y)) take(X, mark(Y)) >? mark(take(X, Y)) zip(mark(X), Y) >? mark(zip(X, Y)) zip(X, mark(Y)) >? mark(zip(X, Y)) pair(mark(X), Y) >? mark(pair(X, Y)) pair(X, mark(Y)) >? mark(pair(X, Y)) tail(mark(X)) >? mark(tail(X)) repItems(mark(X)) >? mark(repItems(X)) proper(pairNs) >? ok(pairNs) proper(cons(X, Y)) >? cons(proper(X), proper(Y)) proper(0) >? ok(0) proper(incr(X)) >? incr(proper(X)) proper(oddNs) >? ok(oddNs) proper(s(X)) >? s(proper(X)) proper(take(X, Y)) >? take(proper(X), proper(Y)) proper(nil) >? ok(nil) proper(zip(X, Y)) >? zip(proper(X), proper(Y)) proper(pair(X, Y)) >? pair(proper(X), proper(Y)) proper(tail(X)) >? tail(proper(X)) proper(repItems(X)) >? repItems(proper(X)) cons(ok(X), ok(Y)) >? ok(cons(X, Y)) incr(ok(X)) >? ok(incr(X)) s(ok(X)) >? ok(s(X)) take(ok(X), ok(Y)) >? ok(take(X, Y)) zip(ok(X), ok(Y)) >? ok(zip(X, Y)) pair(ok(X), ok(Y)) >? ok(pair(X, Y)) tail(ok(X)) >? ok(tail(X)) repItems(ok(X)) >? ok(repItems(X)) top(mark(X)) >? top(proper(X)) top(ok(X)) >? top(active(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 incr = \y0.2y0 mark = \y0.y0 nil = 1 oddNs = 0 ok = \y0.y0 pair = \y0y1.y1 + 2y0 pairNs = 0 proper = \y0.y0 repItems = \y0.2y0 s = \y0.y0 tail = \y0.2y0 take = \y0y1.1 + y0 + 2y1 top = \y0.y0 zip = \y0y1.2y0 + 2y1 Using this interpretation, the requirements translate to: [[active(pairNs)]] = 0 >= 0 = [[mark(cons(0, incr(oddNs)))]] [[active(oddNs)]] = 0 >= 0 = [[mark(incr(pairNs))]] [[active(incr(cons(_x0, _x1)))]] = 2x1 + 4x0 >= 2x0 + 2x1 = [[mark(cons(s(_x0), incr(_x1)))]] [[active(take(0, _x0))]] = 1 + 2x0 >= 1 = [[mark(nil)]] [[active(take(s(_x0), cons(_x1, _x2)))]] = 1 + x0 + 2x2 + 4x1 >= 1 + x0 + 2x1 + 2x2 = [[mark(cons(_x1, take(_x0, _x2)))]] [[active(zip(nil, _x0))]] = 2 + 2x0 > 1 = [[mark(nil)]] [[active(zip(_x0, nil))]] = 2 + 2x0 > 1 = [[mark(nil)]] [[active(zip(cons(_x0, _x1), cons(_x2, _x3)))]] = 2x1 + 2x3 + 4x0 + 4x2 >= 2x1 + 2x2 + 2x3 + 4x0 = [[mark(cons(pair(_x0, _x2), zip(_x1, _x3)))]] [[active(tail(cons(_x0, _x1)))]] = 2x1 + 4x0 >= x1 = [[mark(_x1)]] [[active(repItems(nil))]] = 2 > 1 = [[mark(nil)]] [[active(repItems(cons(_x0, _x1)))]] = 2x1 + 4x0 >= 2x1 + 4x0 = [[mark(cons(_x0, cons(_x0, repItems(_x1))))]] [[active(cons(_x0, _x1))]] = x1 + 2x0 >= x1 + 2x0 = [[cons(active(_x0), _x1)]] [[active(incr(_x0))]] = 2x0 >= 2x0 = [[incr(active(_x0))]] [[active(s(_x0))]] = x0 >= x0 = [[s(active(_x0))]] [[active(take(_x0, _x1))]] = 1 + x0 + 2x1 >= 1 + x0 + 2x1 = [[take(active(_x0), _x1)]] [[active(take(_x0, _x1))]] = 1 + x0 + 2x1 >= 1 + x0 + 2x1 = [[take(_x0, active(_x1))]] [[active(zip(_x0, _x1))]] = 2x0 + 2x1 >= 2x0 + 2x1 = [[zip(active(_x0), _x1)]] [[active(zip(_x0, _x1))]] = 2x0 + 2x1 >= 2x0 + 2x1 = [[zip(_x0, active(_x1))]] [[active(pair(_x0, _x1))]] = x1 + 2x0 >= x1 + 2x0 = [[pair(active(_x0), _x1)]] [[active(pair(_x0, _x1))]] = x1 + 2x0 >= x1 + 2x0 = [[pair(_x0, active(_x1))]] [[active(tail(_x0))]] = 2x0 >= 2x0 = [[tail(active(_x0))]] [[active(repItems(_x0))]] = 2x0 >= 2x0 = [[repItems(active(_x0))]] [[cons(mark(_x0), _x1)]] = x1 + 2x0 >= x1 + 2x0 = [[mark(cons(_x0, _x1))]] [[incr(mark(_x0))]] = 2x0 >= 2x0 = [[mark(incr(_x0))]] [[s(mark(_x0))]] = x0 >= x0 = [[mark(s(_x0))]] [[take(mark(_x0), _x1)]] = 1 + x0 + 2x1 >= 1 + x0 + 2x1 = [[mark(take(_x0, _x1))]] [[take(_x0, mark(_x1))]] = 1 + x0 + 2x1 >= 1 + x0 + 2x1 = [[mark(take(_x0, _x1))]] [[zip(mark(_x0), _x1)]] = 2x0 + 2x1 >= 2x0 + 2x1 = [[mark(zip(_x0, _x1))]] [[zip(_x0, mark(_x1))]] = 2x0 + 2x1 >= 2x0 + 2x1 = [[mark(zip(_x0, _x1))]] [[pair(mark(_x0), _x1)]] = x1 + 2x0 >= x1 + 2x0 = [[mark(pair(_x0, _x1))]] [[pair(_x0, mark(_x1))]] = x1 + 2x0 >= x1 + 2x0 = [[mark(pair(_x0, _x1))]] [[tail(mark(_x0))]] = 2x0 >= 2x0 = [[mark(tail(_x0))]] [[repItems(mark(_x0))]] = 2x0 >= 2x0 = [[mark(repItems(_x0))]] [[proper(pairNs)]] = 0 >= 0 = [[ok(pairNs)]] [[proper(cons(_x0, _x1))]] = x1 + 2x0 >= x1 + 2x0 = [[cons(proper(_x0), proper(_x1))]] [[proper(0)]] = 0 >= 0 = [[ok(0)]] [[proper(incr(_x0))]] = 2x0 >= 2x0 = [[incr(proper(_x0))]] [[proper(oddNs)]] = 0 >= 0 = [[ok(oddNs)]] [[proper(s(_x0))]] = x0 >= x0 = [[s(proper(_x0))]] [[proper(take(_x0, _x1))]] = 1 + x0 + 2x1 >= 1 + x0 + 2x1 = [[take(proper(_x0), proper(_x1))]] [[proper(nil)]] = 1 >= 1 = [[ok(nil)]] [[proper(zip(_x0, _x1))]] = 2x0 + 2x1 >= 2x0 + 2x1 = [[zip(proper(_x0), proper(_x1))]] [[proper(pair(_x0, _x1))]] = x1 + 2x0 >= x1 + 2x0 = [[pair(proper(_x0), proper(_x1))]] [[proper(tail(_x0))]] = 2x0 >= 2x0 = [[tail(proper(_x0))]] [[proper(repItems(_x0))]] = 2x0 >= 2x0 = [[repItems(proper(_x0))]] [[cons(ok(_x0), ok(_x1))]] = x1 + 2x0 >= x1 + 2x0 = [[ok(cons(_x0, _x1))]] [[incr(ok(_x0))]] = 2x0 >= 2x0 = [[ok(incr(_x0))]] [[s(ok(_x0))]] = x0 >= x0 = [[ok(s(_x0))]] [[take(ok(_x0), ok(_x1))]] = 1 + x0 + 2x1 >= 1 + x0 + 2x1 = [[ok(take(_x0, _x1))]] [[zip(ok(_x0), ok(_x1))]] = 2x0 + 2x1 >= 2x0 + 2x1 = [[ok(zip(_x0, _x1))]] [[pair(ok(_x0), ok(_x1))]] = x1 + 2x0 >= x1 + 2x0 = [[ok(pair(_x0, _x1))]] [[tail(ok(_x0))]] = 2x0 >= 2x0 = [[ok(tail(_x0))]] [[repItems(ok(_x0))]] = 2x0 >= 2x0 = [[ok(repItems(_x0))]] [[top(mark(_x0))]] = x0 >= x0 = [[top(proper(_x0))]] [[top(ok(_x0))]] = x0 >= x0 = [[top(active(_x0))]] We can thus remove the following rules: active(zip(nil, X)) => mark(nil) active(zip(X, nil)) => mark(nil) active(repItems(nil)) => mark(nil) 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(pairNs) >? mark(cons(0, incr(oddNs))) active(oddNs) >? mark(incr(pairNs)) active(incr(cons(X, Y))) >? mark(cons(s(X), incr(Y))) active(take(0, X)) >? mark(nil) active(take(s(X), cons(Y, Z))) >? mark(cons(Y, take(X, Z))) active(zip(cons(X, Y), cons(Z, U))) >? mark(cons(pair(X, Z), zip(Y, U))) active(tail(cons(X, Y))) >? mark(Y) active(repItems(cons(X, Y))) >? mark(cons(X, cons(X, repItems(Y)))) active(cons(X, Y)) >? cons(active(X), Y) active(incr(X)) >? incr(active(X)) active(s(X)) >? s(active(X)) active(take(X, Y)) >? take(active(X), Y) active(take(X, Y)) >? take(X, active(Y)) active(zip(X, Y)) >? zip(active(X), Y) active(zip(X, Y)) >? zip(X, active(Y)) active(pair(X, Y)) >? pair(active(X), Y) active(pair(X, Y)) >? pair(X, active(Y)) active(tail(X)) >? tail(active(X)) active(repItems(X)) >? repItems(active(X)) cons(mark(X), Y) >? mark(cons(X, Y)) incr(mark(X)) >? mark(incr(X)) s(mark(X)) >? mark(s(X)) take(mark(X), Y) >? mark(take(X, Y)) take(X, mark(Y)) >? mark(take(X, Y)) zip(mark(X), Y) >? mark(zip(X, Y)) zip(X, mark(Y)) >? mark(zip(X, Y)) pair(mark(X), Y) >? mark(pair(X, Y)) pair(X, mark(Y)) >? mark(pair(X, Y)) tail(mark(X)) >? mark(tail(X)) repItems(mark(X)) >? mark(repItems(X)) proper(pairNs) >? ok(pairNs) proper(cons(X, Y)) >? cons(proper(X), proper(Y)) proper(0) >? ok(0) proper(incr(X)) >? incr(proper(X)) proper(oddNs) >? ok(oddNs) proper(s(X)) >? s(proper(X)) proper(take(X, Y)) >? take(proper(X), proper(Y)) proper(nil) >? ok(nil) proper(zip(X, Y)) >? zip(proper(X), proper(Y)) proper(pair(X, Y)) >? pair(proper(X), proper(Y)) proper(tail(X)) >? tail(proper(X)) proper(repItems(X)) >? repItems(proper(X)) cons(ok(X), ok(Y)) >? ok(cons(X, Y)) incr(ok(X)) >? ok(incr(X)) s(ok(X)) >? ok(s(X)) take(ok(X), ok(Y)) >? ok(take(X, Y)) zip(ok(X), ok(Y)) >? ok(zip(X, Y)) pair(ok(X), ok(Y)) >? ok(pair(X, Y)) tail(ok(X)) >? ok(tail(X)) repItems(ok(X)) >? ok(repItems(X)) top(mark(X)) >? top(proper(X)) top(ok(X)) >? top(active(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 incr = \y0.2y0 mark = \y0.y0 nil = 0 oddNs = 0 ok = \y0.y0 pair = \y0y1.y1 + 2y0 pairNs = 0 proper = \y0.y0 repItems = \y0.2y0 s = \y0.y0 tail = \y0.1 + 2y0 take = \y0y1.y0 + y1 top = \y0.2y0 zip = \y0y1.y1 + 2y0 Using this interpretation, the requirements translate to: [[active(pairNs)]] = 0 >= 0 = [[mark(cons(0, incr(oddNs)))]] [[active(oddNs)]] = 0 >= 0 = [[mark(incr(pairNs))]] [[active(incr(cons(_x0, _x1)))]] = 2x0 + 2x1 >= x0 + 2x1 = [[mark(cons(s(_x0), incr(_x1)))]] [[active(take(0, _x0))]] = x0 >= 0 = [[mark(nil)]] [[active(take(s(_x0), cons(_x1, _x2)))]] = x0 + x1 + x2 >= x0 + x1 + x2 = [[mark(cons(_x1, take(_x0, _x2)))]] [[active(zip(cons(_x0, _x1), cons(_x2, _x3)))]] = x2 + x3 + 2x0 + 2x1 >= x2 + x3 + 2x0 + 2x1 = [[mark(cons(pair(_x0, _x2), zip(_x1, _x3)))]] [[active(tail(cons(_x0, _x1)))]] = 1 + 2x0 + 2x1 > x1 = [[mark(_x1)]] [[active(repItems(cons(_x0, _x1)))]] = 2x0 + 2x1 >= 2x0 + 2x1 = [[mark(cons(_x0, cons(_x0, repItems(_x1))))]] [[active(cons(_x0, _x1))]] = x0 + x1 >= x0 + x1 = [[cons(active(_x0), _x1)]] [[active(incr(_x0))]] = 2x0 >= 2x0 = [[incr(active(_x0))]] [[active(s(_x0))]] = x0 >= x0 = [[s(active(_x0))]] [[active(take(_x0, _x1))]] = x0 + x1 >= x0 + x1 = [[take(active(_x0), _x1)]] [[active(take(_x0, _x1))]] = x0 + x1 >= x0 + x1 = [[take(_x0, active(_x1))]] [[active(zip(_x0, _x1))]] = x1 + 2x0 >= x1 + 2x0 = [[zip(active(_x0), _x1)]] [[active(zip(_x0, _x1))]] = x1 + 2x0 >= x1 + 2x0 = [[zip(_x0, active(_x1))]] [[active(pair(_x0, _x1))]] = x1 + 2x0 >= x1 + 2x0 = [[pair(active(_x0), _x1)]] [[active(pair(_x0, _x1))]] = x1 + 2x0 >= x1 + 2x0 = [[pair(_x0, active(_x1))]] [[active(tail(_x0))]] = 1 + 2x0 >= 1 + 2x0 = [[tail(active(_x0))]] [[active(repItems(_x0))]] = 2x0 >= 2x0 = [[repItems(active(_x0))]] [[cons(mark(_x0), _x1)]] = x0 + x1 >= x0 + x1 = [[mark(cons(_x0, _x1))]] [[incr(mark(_x0))]] = 2x0 >= 2x0 = [[mark(incr(_x0))]] [[s(mark(_x0))]] = x0 >= x0 = [[mark(s(_x0))]] [[take(mark(_x0), _x1)]] = x0 + x1 >= x0 + x1 = [[mark(take(_x0, _x1))]] [[take(_x0, mark(_x1))]] = x0 + x1 >= x0 + x1 = [[mark(take(_x0, _x1))]] [[zip(mark(_x0), _x1)]] = x1 + 2x0 >= x1 + 2x0 = [[mark(zip(_x0, _x1))]] [[zip(_x0, mark(_x1))]] = x1 + 2x0 >= x1 + 2x0 = [[mark(zip(_x0, _x1))]] [[pair(mark(_x0), _x1)]] = x1 + 2x0 >= x1 + 2x0 = [[mark(pair(_x0, _x1))]] [[pair(_x0, mark(_x1))]] = x1 + 2x0 >= x1 + 2x0 = [[mark(pair(_x0, _x1))]] [[tail(mark(_x0))]] = 1 + 2x0 >= 1 + 2x0 = [[mark(tail(_x0))]] [[repItems(mark(_x0))]] = 2x0 >= 2x0 = [[mark(repItems(_x0))]] [[proper(pairNs)]] = 0 >= 0 = [[ok(pairNs)]] [[proper(cons(_x0, _x1))]] = x0 + x1 >= x0 + x1 = [[cons(proper(_x0), proper(_x1))]] [[proper(0)]] = 0 >= 0 = [[ok(0)]] [[proper(incr(_x0))]] = 2x0 >= 2x0 = [[incr(proper(_x0))]] [[proper(oddNs)]] = 0 >= 0 = [[ok(oddNs)]] [[proper(s(_x0))]] = x0 >= x0 = [[s(proper(_x0))]] [[proper(take(_x0, _x1))]] = x0 + x1 >= x0 + x1 = [[take(proper(_x0), proper(_x1))]] [[proper(nil)]] = 0 >= 0 = [[ok(nil)]] [[proper(zip(_x0, _x1))]] = x1 + 2x0 >= x1 + 2x0 = [[zip(proper(_x0), proper(_x1))]] [[proper(pair(_x0, _x1))]] = x1 + 2x0 >= x1 + 2x0 = [[pair(proper(_x0), proper(_x1))]] [[proper(tail(_x0))]] = 1 + 2x0 >= 1 + 2x0 = [[tail(proper(_x0))]] [[proper(repItems(_x0))]] = 2x0 >= 2x0 = [[repItems(proper(_x0))]] [[cons(ok(_x0), ok(_x1))]] = x0 + x1 >= x0 + x1 = [[ok(cons(_x0, _x1))]] [[incr(ok(_x0))]] = 2x0 >= 2x0 = [[ok(incr(_x0))]] [[s(ok(_x0))]] = x0 >= x0 = [[ok(s(_x0))]] [[take(ok(_x0), ok(_x1))]] = x0 + x1 >= x0 + x1 = [[ok(take(_x0, _x1))]] [[zip(ok(_x0), ok(_x1))]] = x1 + 2x0 >= x1 + 2x0 = [[ok(zip(_x0, _x1))]] [[pair(ok(_x0), ok(_x1))]] = x1 + 2x0 >= x1 + 2x0 = [[ok(pair(_x0, _x1))]] [[tail(ok(_x0))]] = 1 + 2x0 >= 1 + 2x0 = [[ok(tail(_x0))]] [[repItems(ok(_x0))]] = 2x0 >= 2x0 = [[ok(repItems(_x0))]] [[top(mark(_x0))]] = 2x0 >= 2x0 = [[top(proper(_x0))]] [[top(ok(_x0))]] = 2x0 >= 2x0 = [[top(active(_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(pairNs) >? mark(cons(0, incr(oddNs))) active(oddNs) >? mark(incr(pairNs)) active(incr(cons(X, Y))) >? mark(cons(s(X), incr(Y))) active(take(0, X)) >? mark(nil) active(take(s(X), cons(Y, Z))) >? mark(cons(Y, take(X, Z))) active(zip(cons(X, Y), cons(Z, U))) >? mark(cons(pair(X, Z), zip(Y, U))) active(repItems(cons(X, Y))) >? mark(cons(X, cons(X, repItems(Y)))) active(cons(X, Y)) >? cons(active(X), Y) active(incr(X)) >? incr(active(X)) active(s(X)) >? s(active(X)) active(take(X, Y)) >? take(active(X), Y) active(take(X, Y)) >? take(X, active(Y)) active(zip(X, Y)) >? zip(active(X), Y) active(zip(X, Y)) >? zip(X, active(Y)) active(pair(X, Y)) >? pair(active(X), Y) active(pair(X, Y)) >? pair(X, active(Y)) active(tail(X)) >? tail(active(X)) active(repItems(X)) >? repItems(active(X)) cons(mark(X), Y) >? mark(cons(X, Y)) incr(mark(X)) >? mark(incr(X)) s(mark(X)) >? mark(s(X)) take(mark(X), Y) >? mark(take(X, Y)) take(X, mark(Y)) >? mark(take(X, Y)) zip(mark(X), Y) >? mark(zip(X, Y)) zip(X, mark(Y)) >? mark(zip(X, Y)) pair(mark(X), Y) >? mark(pair(X, Y)) pair(X, mark(Y)) >? mark(pair(X, Y)) tail(mark(X)) >? mark(tail(X)) repItems(mark(X)) >? mark(repItems(X)) proper(pairNs) >? ok(pairNs) proper(cons(X, Y)) >? cons(proper(X), proper(Y)) proper(0) >? ok(0) proper(incr(X)) >? incr(proper(X)) proper(oddNs) >? ok(oddNs) proper(s(X)) >? s(proper(X)) proper(take(X, Y)) >? take(proper(X), proper(Y)) proper(nil) >? ok(nil) proper(zip(X, Y)) >? zip(proper(X), proper(Y)) proper(pair(X, Y)) >? pair(proper(X), proper(Y)) proper(tail(X)) >? tail(proper(X)) proper(repItems(X)) >? repItems(proper(X)) cons(ok(X), ok(Y)) >? ok(cons(X, Y)) incr(ok(X)) >? ok(incr(X)) s(ok(X)) >? ok(s(X)) take(ok(X), ok(Y)) >? ok(take(X, Y)) zip(ok(X), ok(Y)) >? ok(zip(X, Y)) pair(ok(X), ok(Y)) >? ok(pair(X, Y)) tail(ok(X)) >? ok(tail(X)) repItems(ok(X)) >? ok(repItems(X)) top(mark(X)) >? top(proper(X)) top(ok(X)) >? top(active(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 incr = \y0.2y0 mark = \y0.y0 nil = 0 oddNs = 0 ok = \y0.y0 pair = \y0y1.y1 + 2y0 pairNs = 0 proper = \y0.y0 repItems = \y0.2y0 s = \y0.2y0 tail = \y0.2y0 take = \y0y1.2 + y0 + y1 top = \y0.y0 zip = \y0y1.1 + y1 + 2y0 Using this interpretation, the requirements translate to: [[active(pairNs)]] = 0 >= 0 = [[mark(cons(0, incr(oddNs)))]] [[active(oddNs)]] = 0 >= 0 = [[mark(incr(pairNs))]] [[active(incr(cons(_x0, _x1)))]] = 2x1 + 4x0 >= 2x1 + 4x0 = [[mark(cons(s(_x0), incr(_x1)))]] [[active(take(0, _x0))]] = 2 + x0 > 0 = [[mark(nil)]] [[active(take(s(_x0), cons(_x1, _x2)))]] = 2 + x2 + 2x0 + 2x1 >= 2 + x0 + x2 + 2x1 = [[mark(cons(_x1, take(_x0, _x2)))]] [[active(zip(cons(_x0, _x1), cons(_x2, _x3)))]] = 1 + x3 + 2x1 + 2x2 + 4x0 >= 1 + x3 + 2x1 + 2x2 + 4x0 = [[mark(cons(pair(_x0, _x2), zip(_x1, _x3)))]] [[active(repItems(cons(_x0, _x1)))]] = 2x1 + 4x0 >= 2x1 + 4x0 = [[mark(cons(_x0, cons(_x0, repItems(_x1))))]] [[active(cons(_x0, _x1))]] = x1 + 2x0 >= x1 + 2x0 = [[cons(active(_x0), _x1)]] [[active(incr(_x0))]] = 2x0 >= 2x0 = [[incr(active(_x0))]] [[active(s(_x0))]] = 2x0 >= 2x0 = [[s(active(_x0))]] [[active(take(_x0, _x1))]] = 2 + x0 + x1 >= 2 + x0 + x1 = [[take(active(_x0), _x1)]] [[active(take(_x0, _x1))]] = 2 + x0 + x1 >= 2 + x0 + x1 = [[take(_x0, active(_x1))]] [[active(zip(_x0, _x1))]] = 1 + x1 + 2x0 >= 1 + x1 + 2x0 = [[zip(active(_x0), _x1)]] [[active(zip(_x0, _x1))]] = 1 + x1 + 2x0 >= 1 + x1 + 2x0 = [[zip(_x0, active(_x1))]] [[active(pair(_x0, _x1))]] = x1 + 2x0 >= x1 + 2x0 = [[pair(active(_x0), _x1)]] [[active(pair(_x0, _x1))]] = x1 + 2x0 >= x1 + 2x0 = [[pair(_x0, active(_x1))]] [[active(tail(_x0))]] = 2x0 >= 2x0 = [[tail(active(_x0))]] [[active(repItems(_x0))]] = 2x0 >= 2x0 = [[repItems(active(_x0))]] [[cons(mark(_x0), _x1)]] = x1 + 2x0 >= x1 + 2x0 = [[mark(cons(_x0, _x1))]] [[incr(mark(_x0))]] = 2x0 >= 2x0 = [[mark(incr(_x0))]] [[s(mark(_x0))]] = 2x0 >= 2x0 = [[mark(s(_x0))]] [[take(mark(_x0), _x1)]] = 2 + x0 + x1 >= 2 + x0 + x1 = [[mark(take(_x0, _x1))]] [[take(_x0, mark(_x1))]] = 2 + x0 + x1 >= 2 + x0 + x1 = [[mark(take(_x0, _x1))]] [[zip(mark(_x0), _x1)]] = 1 + x1 + 2x0 >= 1 + x1 + 2x0 = [[mark(zip(_x0, _x1))]] [[zip(_x0, mark(_x1))]] = 1 + x1 + 2x0 >= 1 + x1 + 2x0 = [[mark(zip(_x0, _x1))]] [[pair(mark(_x0), _x1)]] = x1 + 2x0 >= x1 + 2x0 = [[mark(pair(_x0, _x1))]] [[pair(_x0, mark(_x1))]] = x1 + 2x0 >= x1 + 2x0 = [[mark(pair(_x0, _x1))]] [[tail(mark(_x0))]] = 2x0 >= 2x0 = [[mark(tail(_x0))]] [[repItems(mark(_x0))]] = 2x0 >= 2x0 = [[mark(repItems(_x0))]] [[proper(pairNs)]] = 0 >= 0 = [[ok(pairNs)]] [[proper(cons(_x0, _x1))]] = x1 + 2x0 >= x1 + 2x0 = [[cons(proper(_x0), proper(_x1))]] [[proper(0)]] = 0 >= 0 = [[ok(0)]] [[proper(incr(_x0))]] = 2x0 >= 2x0 = [[incr(proper(_x0))]] [[proper(oddNs)]] = 0 >= 0 = [[ok(oddNs)]] [[proper(s(_x0))]] = 2x0 >= 2x0 = [[s(proper(_x0))]] [[proper(take(_x0, _x1))]] = 2 + x0 + x1 >= 2 + x0 + x1 = [[take(proper(_x0), proper(_x1))]] [[proper(nil)]] = 0 >= 0 = [[ok(nil)]] [[proper(zip(_x0, _x1))]] = 1 + x1 + 2x0 >= 1 + x1 + 2x0 = [[zip(proper(_x0), proper(_x1))]] [[proper(pair(_x0, _x1))]] = x1 + 2x0 >= x1 + 2x0 = [[pair(proper(_x0), proper(_x1))]] [[proper(tail(_x0))]] = 2x0 >= 2x0 = [[tail(proper(_x0))]] [[proper(repItems(_x0))]] = 2x0 >= 2x0 = [[repItems(proper(_x0))]] [[cons(ok(_x0), ok(_x1))]] = x1 + 2x0 >= x1 + 2x0 = [[ok(cons(_x0, _x1))]] [[incr(ok(_x0))]] = 2x0 >= 2x0 = [[ok(incr(_x0))]] [[s(ok(_x0))]] = 2x0 >= 2x0 = [[ok(s(_x0))]] [[take(ok(_x0), ok(_x1))]] = 2 + x0 + x1 >= 2 + x0 + x1 = [[ok(take(_x0, _x1))]] [[zip(ok(_x0), ok(_x1))]] = 1 + x1 + 2x0 >= 1 + x1 + 2x0 = [[ok(zip(_x0, _x1))]] [[pair(ok(_x0), ok(_x1))]] = x1 + 2x0 >= x1 + 2x0 = [[ok(pair(_x0, _x1))]] [[tail(ok(_x0))]] = 2x0 >= 2x0 = [[ok(tail(_x0))]] [[repItems(ok(_x0))]] = 2x0 >= 2x0 = [[ok(repItems(_x0))]] [[top(mark(_x0))]] = x0 >= x0 = [[top(proper(_x0))]] [[top(ok(_x0))]] = x0 >= x0 = [[top(active(_x0))]] We can thus remove the following rules: active(take(0, X)) => mark(nil) 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#(pairNs) =#> cons#(0, incr(oddNs)) 1] active#(pairNs) =#> incr#(oddNs) 2] active#(oddNs) =#> incr#(pairNs) 3] active#(incr(cons(X, Y))) =#> cons#(s(X), incr(Y)) 4] active#(incr(cons(X, Y))) =#> s#(X) 5] active#(incr(cons(X, Y))) =#> incr#(Y) 6] active#(take(s(X), cons(Y, Z))) =#> cons#(Y, take(X, Z)) 7] active#(take(s(X), cons(Y, Z))) =#> take#(X, Z) 8] active#(zip(cons(X, Y), cons(Z, U))) =#> cons#(pair(X, Z), zip(Y, U)) 9] active#(zip(cons(X, Y), cons(Z, U))) =#> pair#(X, Z) 10] active#(zip(cons(X, Y), cons(Z, U))) =#> zip#(Y, U) 11] active#(repItems(cons(X, Y))) =#> cons#(X, cons(X, repItems(Y))) 12] active#(repItems(cons(X, Y))) =#> cons#(X, repItems(Y)) 13] active#(repItems(cons(X, Y))) =#> repItems#(Y) 14] active#(cons(X, Y)) =#> cons#(active(X), Y) 15] active#(cons(X, Y)) =#> active#(X) 16] active#(incr(X)) =#> incr#(active(X)) 17] active#(incr(X)) =#> active#(X) 18] active#(s(X)) =#> s#(active(X)) 19] active#(s(X)) =#> active#(X) 20] active#(take(X, Y)) =#> take#(active(X), Y) 21] active#(take(X, Y)) =#> active#(X) 22] active#(take(X, Y)) =#> take#(X, active(Y)) 23] active#(take(X, Y)) =#> active#(Y) 24] active#(zip(X, Y)) =#> zip#(active(X), Y) 25] active#(zip(X, Y)) =#> active#(X) 26] active#(zip(X, Y)) =#> zip#(X, active(Y)) 27] active#(zip(X, Y)) =#> active#(Y) 28] active#(pair(X, Y)) =#> pair#(active(X), Y) 29] active#(pair(X, Y)) =#> active#(X) 30] active#(pair(X, Y)) =#> pair#(X, active(Y)) 31] active#(pair(X, Y)) =#> active#(Y) 32] active#(tail(X)) =#> tail#(active(X)) 33] active#(tail(X)) =#> active#(X) 34] active#(repItems(X)) =#> repItems#(active(X)) 35] active#(repItems(X)) =#> active#(X) 36] cons#(mark(X), Y) =#> cons#(X, Y) 37] incr#(mark(X)) =#> incr#(X) 38] s#(mark(X)) =#> s#(X) 39] take#(mark(X), Y) =#> take#(X, Y) 40] take#(X, mark(Y)) =#> take#(X, Y) 41] zip#(mark(X), Y) =#> zip#(X, Y) 42] zip#(X, mark(Y)) =#> zip#(X, Y) 43] pair#(mark(X), Y) =#> pair#(X, Y) 44] pair#(X, mark(Y)) =#> pair#(X, Y) 45] tail#(mark(X)) =#> tail#(X) 46] repItems#(mark(X)) =#> repItems#(X) 47] proper#(cons(X, Y)) =#> cons#(proper(X), proper(Y)) 48] proper#(cons(X, Y)) =#> proper#(X) 49] proper#(cons(X, Y)) =#> proper#(Y) 50] proper#(incr(X)) =#> incr#(proper(X)) 51] proper#(incr(X)) =#> proper#(X) 52] proper#(s(X)) =#> s#(proper(X)) 53] proper#(s(X)) =#> proper#(X) 54] proper#(take(X, Y)) =#> take#(proper(X), proper(Y)) 55] proper#(take(X, Y)) =#> proper#(X) 56] proper#(take(X, Y)) =#> proper#(Y) 57] proper#(zip(X, Y)) =#> zip#(proper(X), proper(Y)) 58] proper#(zip(X, Y)) =#> proper#(X) 59] proper#(zip(X, Y)) =#> proper#(Y) 60] proper#(pair(X, Y)) =#> pair#(proper(X), proper(Y)) 61] proper#(pair(X, Y)) =#> proper#(X) 62] proper#(pair(X, Y)) =#> proper#(Y) 63] proper#(tail(X)) =#> tail#(proper(X)) 64] proper#(tail(X)) =#> proper#(X) 65] proper#(repItems(X)) =#> repItems#(proper(X)) 66] proper#(repItems(X)) =#> proper#(X) 67] cons#(ok(X), ok(Y)) =#> cons#(X, Y) 68] incr#(ok(X)) =#> incr#(X) 69] s#(ok(X)) =#> s#(X) 70] take#(ok(X), ok(Y)) =#> take#(X, Y) 71] zip#(ok(X), ok(Y)) =#> zip#(X, Y) 72] pair#(ok(X), ok(Y)) =#> pair#(X, Y) 73] tail#(ok(X)) =#> tail#(X) 74] repItems#(ok(X)) =#> repItems#(X) 75] top#(mark(X)) =#> top#(proper(X)) 76] top#(mark(X)) =#> proper#(X) 77] top#(ok(X)) =#> top#(active(X)) 78] top#(ok(X)) =#> active#(X) Rules R_0: active(pairNs) => mark(cons(0, incr(oddNs))) active(oddNs) => mark(incr(pairNs)) active(incr(cons(X, Y))) => mark(cons(s(X), incr(Y))) active(take(s(X), cons(Y, Z))) => mark(cons(Y, take(X, Z))) active(zip(cons(X, Y), cons(Z, U))) => mark(cons(pair(X, Z), zip(Y, U))) active(repItems(cons(X, Y))) => mark(cons(X, cons(X, repItems(Y)))) active(cons(X, Y)) => cons(active(X), Y) active(incr(X)) => incr(active(X)) active(s(X)) => s(active(X)) active(take(X, Y)) => take(active(X), Y) active(take(X, Y)) => take(X, active(Y)) active(zip(X, Y)) => zip(active(X), Y) active(zip(X, Y)) => zip(X, active(Y)) active(pair(X, Y)) => pair(active(X), Y) active(pair(X, Y)) => pair(X, active(Y)) active(tail(X)) => tail(active(X)) active(repItems(X)) => repItems(active(X)) cons(mark(X), Y) => mark(cons(X, Y)) incr(mark(X)) => mark(incr(X)) s(mark(X)) => mark(s(X)) take(mark(X), Y) => mark(take(X, Y)) take(X, mark(Y)) => mark(take(X, Y)) zip(mark(X), Y) => mark(zip(X, Y)) zip(X, mark(Y)) => mark(zip(X, Y)) pair(mark(X), Y) => mark(pair(X, Y)) pair(X, mark(Y)) => mark(pair(X, Y)) tail(mark(X)) => mark(tail(X)) repItems(mark(X)) => mark(repItems(X)) proper(pairNs) => ok(pairNs) proper(cons(X, Y)) => cons(proper(X), proper(Y)) proper(0) => ok(0) proper(incr(X)) => incr(proper(X)) proper(oddNs) => ok(oddNs) proper(s(X)) => s(proper(X)) proper(take(X, Y)) => take(proper(X), proper(Y)) proper(nil) => ok(nil) proper(zip(X, Y)) => zip(proper(X), proper(Y)) proper(pair(X, Y)) => pair(proper(X), proper(Y)) proper(tail(X)) => tail(proper(X)) proper(repItems(X)) => repItems(proper(X)) cons(ok(X), ok(Y)) => ok(cons(X, Y)) incr(ok(X)) => ok(incr(X)) s(ok(X)) => ok(s(X)) take(ok(X), ok(Y)) => ok(take(X, Y)) zip(ok(X), ok(Y)) => ok(zip(X, Y)) pair(ok(X), ok(Y)) => ok(pair(X, Y)) tail(ok(X)) => ok(tail(X)) repItems(ok(X)) => ok(repItems(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 : * 1 : * 2 : * 3 : 36, 67 * 4 : 38, 69 * 5 : 37, 68 * 6 : 36, 67 * 7 : 39, 40, 70 * 8 : 36, 67 * 9 : 43, 44, 72 * 10 : 41, 42, 71 * 11 : 36, 67 * 12 : 36, 67 * 13 : 46, 74 * 14 : 36, 67 * 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, 28, 29, 30, 31, 32, 33, 34, 35 * 16 : 37, 68 * 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, 28, 29, 30, 31, 32, 33, 34, 35 * 18 : 38, 69 * 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, 28, 29, 30, 31, 32, 33, 34, 35 * 20 : 39, 40, 70 * 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, 28, 29, 30, 31, 32, 33, 34, 35 * 22 : 39, 40, 70 * 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, 28, 29, 30, 31, 32, 33, 34, 35 * 24 : 41, 42, 71 * 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, 28, 29, 30, 31, 32, 33, 34, 35 * 26 : 41, 42, 71 * 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, 29, 30, 31, 32, 33, 34, 35 * 28 : 43, 44, 72 * 29 : 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, 29, 30, 31, 32, 33, 34, 35 * 30 : 43, 44, 72 * 31 : 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, 29, 30, 31, 32, 33, 34, 35 * 32 : 45, 73 * 33 : 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, 29, 30, 31, 32, 33, 34, 35 * 34 : 46, 74 * 35 : 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, 29, 30, 31, 32, 33, 34, 35 * 36 : 36, 67 * 37 : 37, 68 * 38 : 38, 69 * 39 : 39, 40, 70 * 40 : 39, 40, 70 * 41 : 41, 42, 71 * 42 : 41, 42, 71 * 43 : 43, 44, 72 * 44 : 43, 44, 72 * 45 : 45, 73 * 46 : 46, 74 * 47 : 36, 67 * 48 : 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66 * 49 : 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66 * 50 : 37, 68 * 51 : 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66 * 52 : 38, 69 * 53 : 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66 * 54 : 39, 40, 70 * 55 : 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66 * 56 : 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66 * 57 : 41, 42, 71 * 58 : 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66 * 59 : 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66 * 60 : 43, 44, 72 * 61 : 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66 * 62 : 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66 * 63 : 45, 73 * 64 : 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66 * 65 : 46, 74 * 66 : 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66 * 67 : 36, 67 * 68 : 37, 68 * 69 : 38, 69 * 70 : 39, 40, 70 * 71 : 41, 42, 71 * 72 : 43, 44, 72 * 73 : 45, 73 * 74 : 46, 74 * 75 : 75, 76, 77, 78 * 76 : 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66 * 77 : 75, 76, 77, 78 * 78 : 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, 29, 30, 31, 32, 33, 34, 35 This graph has the following strongly connected components: P_1: active#(cons(X, Y)) =#> active#(X) active#(incr(X)) =#> active#(X) active#(s(X)) =#> active#(X) active#(take(X, Y)) =#> active#(X) active#(take(X, Y)) =#> active#(Y) active#(zip(X, Y)) =#> active#(X) active#(zip(X, Y)) =#> active#(Y) active#(pair(X, Y)) =#> active#(X) active#(pair(X, Y)) =#> active#(Y) active#(tail(X)) =#> active#(X) active#(repItems(X)) =#> active#(X) P_2: cons#(mark(X), Y) =#> cons#(X, Y) cons#(ok(X), ok(Y)) =#> cons#(X, Y) P_3: incr#(mark(X)) =#> incr#(X) incr#(ok(X)) =#> incr#(X) P_4: s#(mark(X)) =#> s#(X) s#(ok(X)) =#> s#(X) P_5: take#(mark(X), Y) =#> take#(X, Y) take#(X, mark(Y)) =#> take#(X, Y) take#(ok(X), ok(Y)) =#> take#(X, Y) P_6: zip#(mark(X), Y) =#> zip#(X, Y) zip#(X, mark(Y)) =#> zip#(X, Y) zip#(ok(X), ok(Y)) =#> zip#(X, Y) P_7: pair#(mark(X), Y) =#> pair#(X, Y) pair#(X, mark(Y)) =#> pair#(X, Y) pair#(ok(X), ok(Y)) =#> pair#(X, Y) P_8: tail#(mark(X)) =#> tail#(X) tail#(ok(X)) =#> tail#(X) P_9: repItems#(mark(X)) =#> repItems#(X) repItems#(ok(X)) =#> repItems#(X) P_10: proper#(cons(X, Y)) =#> proper#(X) proper#(cons(X, Y)) =#> proper#(Y) proper#(incr(X)) =#> proper#(X) proper#(s(X)) =#> proper#(X) proper#(take(X, Y)) =#> proper#(X) proper#(take(X, Y)) =#> proper#(Y) proper#(zip(X, Y)) =#> proper#(X) proper#(zip(X, Y)) =#> proper#(Y) proper#(pair(X, Y)) =#> proper#(X) proper#(pair(X, Y)) =#> proper#(Y) proper#(tail(X)) =#> proper#(X) proper#(repItems(X)) =#> proper#(X) P_11: 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), (P_9, R_0, m, f), (P_10, R_0, m, f) and (P_11, 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), (P_9, R_0, minimal, formative), (P_10, 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). The formative rules of (P_11, R_0) are R_1 ::= active(pairNs) => mark(cons(0, incr(oddNs))) active(oddNs) => mark(incr(pairNs)) active(incr(cons(X, Y))) => mark(cons(s(X), incr(Y))) active(take(s(X), cons(Y, Z))) => mark(cons(Y, take(X, Z))) active(zip(cons(X, Y), cons(Z, U))) => mark(cons(pair(X, Z), zip(Y, U))) active(repItems(cons(X, Y))) => mark(cons(X, cons(X, repItems(Y)))) active(cons(X, Y)) => cons(active(X), Y) active(incr(X)) => incr(active(X)) active(s(X)) => s(active(X)) active(take(X, Y)) => take(active(X), Y) active(take(X, Y)) => take(X, active(Y)) active(zip(X, Y)) => zip(active(X), Y) active(zip(X, Y)) => zip(X, active(Y)) active(pair(X, Y)) => pair(active(X), Y) active(pair(X, Y)) => pair(X, active(Y)) active(tail(X)) => tail(active(X)) active(repItems(X)) => repItems(active(X)) cons(mark(X), Y) => mark(cons(X, Y)) incr(mark(X)) => mark(incr(X)) s(mark(X)) => mark(s(X)) take(mark(X), Y) => mark(take(X, Y)) take(X, mark(Y)) => mark(take(X, Y)) zip(mark(X), Y) => mark(zip(X, Y)) zip(X, mark(Y)) => mark(zip(X, Y)) pair(mark(X), Y) => mark(pair(X, Y)) pair(X, mark(Y)) => mark(pair(X, Y)) tail(mark(X)) => mark(tail(X)) repItems(mark(X)) => mark(repItems(X)) proper(pairNs) => ok(pairNs) proper(cons(X, Y)) => cons(proper(X), proper(Y)) proper(0) => ok(0) proper(incr(X)) => incr(proper(X)) proper(oddNs) => ok(oddNs) proper(s(X)) => s(proper(X)) proper(take(X, Y)) => take(proper(X), proper(Y)) proper(nil) => ok(nil) proper(zip(X, Y)) => zip(proper(X), proper(Y)) proper(pair(X, Y)) => pair(proper(X), proper(Y)) proper(tail(X)) => tail(proper(X)) proper(repItems(X)) => repItems(proper(X)) cons(ok(X), ok(Y)) => ok(cons(X, Y)) incr(ok(X)) => ok(incr(X)) s(ok(X)) => ok(s(X)) take(ok(X), ok(Y)) => ok(take(X, Y)) zip(ok(X), ok(Y)) => ok(zip(X, Y)) pair(ok(X), ok(Y)) => ok(pair(X, Y)) tail(ok(X)) => ok(tail(X)) repItems(ok(X)) => ok(repItems(X)) By [Kop12, Thm. 7.17], we may replace the dependency pair problem (P_11, R_0, minimal, formative) by (P_11, 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), (P_9, R_0, minimal, formative), (P_10, R_0, minimal, formative) and (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: top#(mark(X)) >? top#(proper(X)) top#(ok(X)) >? top#(active(X)) active(pairNs) >= mark(cons(0, incr(oddNs))) active(oddNs) >= mark(incr(pairNs)) active(incr(cons(X, Y))) >= mark(cons(s(X), incr(Y))) active(take(s(X), cons(Y, Z))) >= mark(cons(Y, take(X, Z))) active(zip(cons(X, Y), cons(Z, U))) >= mark(cons(pair(X, Z), zip(Y, U))) active(repItems(cons(X, Y))) >= mark(cons(X, cons(X, repItems(Y)))) active(cons(X, Y)) >= cons(active(X), Y) active(incr(X)) >= incr(active(X)) active(s(X)) >= s(active(X)) active(take(X, Y)) >= take(active(X), Y) active(take(X, Y)) >= take(X, active(Y)) active(zip(X, Y)) >= zip(active(X), Y) active(zip(X, Y)) >= zip(X, active(Y)) active(pair(X, Y)) >= pair(active(X), Y) active(pair(X, Y)) >= pair(X, active(Y)) active(tail(X)) >= tail(active(X)) active(repItems(X)) >= repItems(active(X)) cons(mark(X), Y) >= mark(cons(X, Y)) incr(mark(X)) >= mark(incr(X)) s(mark(X)) >= mark(s(X)) take(mark(X), Y) >= mark(take(X, Y)) take(X, mark(Y)) >= mark(take(X, Y)) zip(mark(X), Y) >= mark(zip(X, Y)) zip(X, mark(Y)) >= mark(zip(X, Y)) pair(mark(X), Y) >= mark(pair(X, Y)) pair(X, mark(Y)) >= mark(pair(X, Y)) tail(mark(X)) >= mark(tail(X)) repItems(mark(X)) >= mark(repItems(X)) proper(pairNs) >= ok(pairNs) proper(cons(X, Y)) >= cons(proper(X), proper(Y)) proper(0) >= ok(0) proper(incr(X)) >= incr(proper(X)) proper(oddNs) >= ok(oddNs) proper(s(X)) >= s(proper(X)) proper(take(X, Y)) >= take(proper(X), proper(Y)) proper(nil) >= ok(nil) proper(zip(X, Y)) >= zip(proper(X), proper(Y)) proper(pair(X, Y)) >= pair(proper(X), proper(Y)) proper(tail(X)) >= tail(proper(X)) proper(repItems(X)) >= repItems(proper(X)) cons(ok(X), ok(Y)) >= ok(cons(X, Y)) incr(ok(X)) >= ok(incr(X)) s(ok(X)) >= ok(s(X)) take(ok(X), ok(Y)) >= ok(take(X, Y)) zip(ok(X), ok(Y)) >= ok(zip(X, Y)) pair(ok(X), ok(Y)) >= ok(pair(X, Y)) tail(ok(X)) >= ok(tail(X)) repItems(ok(X)) >= ok(repItems(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 incr = \y0.1 + y0 mark = \y0.1 + y0 nil = 0 oddNs = 3 ok = \y0.y0 pair = \y0y1.y0 + y1 pairNs = 1 proper = \y0.y0 repItems = \y0.2 + y0 s = \y0.y0 tail = \y0.y0 take = \y0y1.2 + 2y0 + 2y1 top# = \y0.y0 zip = \y0y1.1 + 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(pairNs)]] = 1 >= 1 = [[mark(cons(0, incr(oddNs)))]] [[active(oddNs)]] = 3 >= 3 = [[mark(incr(pairNs))]] [[active(incr(cons(_x0, _x1)))]] = 1 + x0 >= 1 + x0 = [[mark(cons(s(_x0), incr(_x1)))]] [[active(take(s(_x0), cons(_x1, _x2)))]] = 2 + 2x0 + 2x1 >= 1 + x1 = [[mark(cons(_x1, take(_x0, _x2)))]] [[active(zip(cons(_x0, _x1), cons(_x2, _x3)))]] = 1 + x0 + 2x2 >= 1 + x0 + x2 = [[mark(cons(pair(_x0, _x2), zip(_x1, _x3)))]] [[active(repItems(cons(_x0, _x1)))]] = 2 + x0 >= 1 + x0 = [[mark(cons(_x0, cons(_x0, repItems(_x1))))]] [[active(cons(_x0, _x1))]] = x0 >= x0 = [[cons(active(_x0), _x1)]] [[active(incr(_x0))]] = 1 + x0 >= 1 + x0 = [[incr(active(_x0))]] [[active(s(_x0))]] = x0 >= x0 = [[s(active(_x0))]] [[active(take(_x0, _x1))]] = 2 + 2x0 + 2x1 >= 2 + 2x0 + 2x1 = [[take(active(_x0), _x1)]] [[active(take(_x0, _x1))]] = 2 + 2x0 + 2x1 >= 2 + 2x0 + 2x1 = [[take(_x0, active(_x1))]] [[active(zip(_x0, _x1))]] = 1 + x0 + 2x1 >= 1 + x0 + 2x1 = [[zip(active(_x0), _x1)]] [[active(zip(_x0, _x1))]] = 1 + x0 + 2x1 >= 1 + x0 + 2x1 = [[zip(_x0, active(_x1))]] [[active(pair(_x0, _x1))]] = x0 + x1 >= x0 + x1 = [[pair(active(_x0), _x1)]] [[active(pair(_x0, _x1))]] = x0 + x1 >= x0 + x1 = [[pair(_x0, active(_x1))]] [[active(tail(_x0))]] = x0 >= x0 = [[tail(active(_x0))]] [[active(repItems(_x0))]] = 2 + x0 >= 2 + x0 = [[repItems(active(_x0))]] [[cons(mark(_x0), _x1)]] = 1 + x0 >= 1 + x0 = [[mark(cons(_x0, _x1))]] [[incr(mark(_x0))]] = 2 + x0 >= 2 + x0 = [[mark(incr(_x0))]] [[s(mark(_x0))]] = 1 + x0 >= 1 + x0 = [[mark(s(_x0))]] [[take(mark(_x0), _x1)]] = 4 + 2x0 + 2x1 >= 3 + 2x0 + 2x1 = [[mark(take(_x0, _x1))]] [[take(_x0, mark(_x1))]] = 4 + 2x0 + 2x1 >= 3 + 2x0 + 2x1 = [[mark(take(_x0, _x1))]] [[zip(mark(_x0), _x1)]] = 2 + x0 + 2x1 >= 2 + x0 + 2x1 = [[mark(zip(_x0, _x1))]] [[zip(_x0, mark(_x1))]] = 3 + x0 + 2x1 >= 2 + x0 + 2x1 = [[mark(zip(_x0, _x1))]] [[pair(mark(_x0), _x1)]] = 1 + x0 + x1 >= 1 + x0 + x1 = [[mark(pair(_x0, _x1))]] [[pair(_x0, mark(_x1))]] = 1 + x0 + x1 >= 1 + x0 + x1 = [[mark(pair(_x0, _x1))]] [[tail(mark(_x0))]] = 1 + x0 >= 1 + x0 = [[mark(tail(_x0))]] [[repItems(mark(_x0))]] = 3 + x0 >= 3 + x0 = [[mark(repItems(_x0))]] [[proper(pairNs)]] = 1 >= 1 = [[ok(pairNs)]] [[proper(cons(_x0, _x1))]] = x0 >= x0 = [[cons(proper(_x0), proper(_x1))]] [[proper(0)]] = 0 >= 0 = [[ok(0)]] [[proper(incr(_x0))]] = 1 + x0 >= 1 + x0 = [[incr(proper(_x0))]] [[proper(oddNs)]] = 3 >= 3 = [[ok(oddNs)]] [[proper(s(_x0))]] = x0 >= x0 = [[s(proper(_x0))]] [[proper(take(_x0, _x1))]] = 2 + 2x0 + 2x1 >= 2 + 2x0 + 2x1 = [[take(proper(_x0), proper(_x1))]] [[proper(nil)]] = 0 >= 0 = [[ok(nil)]] [[proper(zip(_x0, _x1))]] = 1 + x0 + 2x1 >= 1 + x0 + 2x1 = [[zip(proper(_x0), proper(_x1))]] [[proper(pair(_x0, _x1))]] = x0 + x1 >= x0 + x1 = [[pair(proper(_x0), proper(_x1))]] [[proper(tail(_x0))]] = x0 >= x0 = [[tail(proper(_x0))]] [[proper(repItems(_x0))]] = 2 + x0 >= 2 + x0 = [[repItems(proper(_x0))]] [[cons(ok(_x0), ok(_x1))]] = x0 >= x0 = [[ok(cons(_x0, _x1))]] [[incr(ok(_x0))]] = 1 + x0 >= 1 + x0 = [[ok(incr(_x0))]] [[s(ok(_x0))]] = x0 >= x0 = [[ok(s(_x0))]] [[take(ok(_x0), ok(_x1))]] = 2 + 2x0 + 2x1 >= 2 + 2x0 + 2x1 = [[ok(take(_x0, _x1))]] [[zip(ok(_x0), ok(_x1))]] = 1 + x0 + 2x1 >= 1 + x0 + 2x1 = [[ok(zip(_x0, _x1))]] [[pair(ok(_x0), ok(_x1))]] = x0 + x1 >= x0 + x1 = [[ok(pair(_x0, _x1))]] [[tail(ok(_x0))]] = x0 >= x0 = [[ok(tail(_x0))]] [[repItems(ok(_x0))]] = 2 + x0 >= 2 + x0 = [[ok(repItems(_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: 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), (P_9, R_0, minimal, formative), (P_10, R_0, minimal, formative) and (P_12, R_1, minimal, formative) is finite. We consider the dependency pair problem (P_12, R_1, minimal, formative). The formative rules of (P_12, R_1) are R_2 ::= active(cons(X, Y)) => cons(active(X), Y) active(incr(X)) => incr(active(X)) active(s(X)) => s(active(X)) active(take(X, Y)) => take(active(X), Y) active(take(X, Y)) => take(X, active(Y)) active(zip(X, Y)) => zip(active(X), Y) active(zip(X, Y)) => zip(X, active(Y)) active(pair(X, Y)) => pair(active(X), Y) active(pair(X, Y)) => pair(X, active(Y)) active(tail(X)) => tail(active(X)) active(repItems(X)) => repItems(active(X)) proper(pairNs) => ok(pairNs) proper(cons(X, Y)) => cons(proper(X), proper(Y)) proper(0) => ok(0) proper(incr(X)) => incr(proper(X)) proper(oddNs) => ok(oddNs) proper(s(X)) => s(proper(X)) proper(take(X, Y)) => take(proper(X), proper(Y)) proper(nil) => ok(nil) proper(zip(X, Y)) => zip(proper(X), proper(Y)) proper(pair(X, Y)) => pair(proper(X), proper(Y)) proper(tail(X)) => tail(proper(X)) proper(repItems(X)) => repItems(proper(X)) cons(ok(X), ok(Y)) => ok(cons(X, Y)) incr(ok(X)) => ok(incr(X)) s(ok(X)) => ok(s(X)) take(ok(X), ok(Y)) => ok(take(X, Y)) zip(ok(X), ok(Y)) => ok(zip(X, Y)) pair(ok(X), ok(Y)) => ok(pair(X, Y)) tail(ok(X)) => ok(tail(X)) repItems(ok(X)) => ok(repItems(X)) By [Kop12, Thm. 7.17], we may replace the dependency pair problem (P_12, R_1, minimal, formative) by (P_12, 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), (P_9, R_0, minimal, formative), (P_10, R_0, minimal, formative) and (P_12, R_2, minimal, formative) is finite. We consider the dependency pair problem (P_12, R_2, minimal, formative). We will use the reduction pair processor with usable rules [Kop12, Thm. 7.44]. The usable rules of (P_12, R_2) are: active(cons(X, Y)) => cons(active(X), Y) active(incr(X)) => incr(active(X)) active(s(X)) => s(active(X)) active(take(X, Y)) => take(active(X), Y) active(take(X, Y)) => take(X, active(Y)) active(zip(X, Y)) => zip(active(X), Y) active(zip(X, Y)) => zip(X, active(Y)) active(pair(X, Y)) => pair(active(X), Y) active(pair(X, Y)) => pair(X, active(Y)) active(tail(X)) => tail(active(X)) active(repItems(X)) => repItems(active(X)) cons(ok(X), ok(Y)) => ok(cons(X, Y)) incr(ok(X)) => ok(incr(X)) s(ok(X)) => ok(s(X)) take(ok(X), ok(Y)) => ok(take(X, Y)) zip(ok(X), ok(Y)) => ok(zip(X, Y)) pair(ok(X), ok(Y)) => ok(pair(X, Y)) tail(ok(X)) => ok(tail(X)) repItems(ok(X)) => ok(repItems(X)) It suffices to find a standard reduction pair [Kop12, Def. 6.69]. Thus, we must orient: top#(ok(X)) >? top#(active(X)) active(cons(X, Y)) >= cons(active(X), Y) active(incr(X)) >= incr(active(X)) active(s(X)) >= s(active(X)) active(take(X, Y)) >= take(active(X), Y) active(take(X, Y)) >= take(X, active(Y)) active(zip(X, Y)) >= zip(active(X), Y) active(zip(X, Y)) >= zip(X, active(Y)) active(pair(X, Y)) >= pair(active(X), Y) active(pair(X, Y)) >= pair(X, active(Y)) active(tail(X)) >= tail(active(X)) active(repItems(X)) >= repItems(active(X)) cons(ok(X), ok(Y)) >= ok(cons(X, Y)) incr(ok(X)) >= ok(incr(X)) s(ok(X)) >= ok(s(X)) take(ok(X), ok(Y)) >= ok(take(X, Y)) zip(ok(X), ok(Y)) >= ok(zip(X, Y)) pair(ok(X), ok(Y)) >= ok(pair(X, Y)) tail(ok(X)) >= ok(tail(X)) repItems(ok(X)) >= ok(repItems(X)) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: active = \y0.3y0 cons = \y0y1.3 + 3y0 + 3y1 incr = \y0.3 + 3y0 ok = \y0.3 + 3y0 pair = \y0y1.1 + 2y1 repItems = \y0.3y0 s = \y0.3y0 tail = \y0.3 + 3y0 take = \y0y1.3 + 2y0 + 2y1 top# = \y0.3y0 zip = \y0y1.3 + y0 + 3y1 Using this interpretation, the requirements translate to: [[top#(ok(_x0))]] = 9 + 9x0 > 9x0 = [[top#(active(_x0))]] [[active(cons(_x0, _x1))]] = 9 + 9x0 + 9x1 >= 3 + 3x1 + 9x0 = [[cons(active(_x0), _x1)]] [[active(incr(_x0))]] = 9 + 9x0 >= 3 + 9x0 = [[incr(active(_x0))]] [[active(s(_x0))]] = 9x0 >= 9x0 = [[s(active(_x0))]] [[active(take(_x0, _x1))]] = 9 + 6x0 + 6x1 >= 3 + 2x1 + 6x0 = [[take(active(_x0), _x1)]] [[active(take(_x0, _x1))]] = 9 + 6x0 + 6x1 >= 3 + 2x0 + 6x1 = [[take(_x0, active(_x1))]] [[active(zip(_x0, _x1))]] = 9 + 3x0 + 9x1 >= 3 + 3x0 + 3x1 = [[zip(active(_x0), _x1)]] [[active(zip(_x0, _x1))]] = 9 + 3x0 + 9x1 >= 3 + x0 + 9x1 = [[zip(_x0, active(_x1))]] [[active(pair(_x0, _x1))]] = 3 + 6x1 >= 1 + 2x1 = [[pair(active(_x0), _x1)]] [[active(pair(_x0, _x1))]] = 3 + 6x1 >= 1 + 6x1 = [[pair(_x0, active(_x1))]] [[active(tail(_x0))]] = 9 + 9x0 >= 3 + 9x0 = [[tail(active(_x0))]] [[active(repItems(_x0))]] = 9x0 >= 9x0 = [[repItems(active(_x0))]] [[cons(ok(_x0), ok(_x1))]] = 21 + 9x0 + 9x1 >= 12 + 9x0 + 9x1 = [[ok(cons(_x0, _x1))]] [[incr(ok(_x0))]] = 12 + 9x0 >= 12 + 9x0 = [[ok(incr(_x0))]] [[s(ok(_x0))]] = 9 + 9x0 >= 3 + 9x0 = [[ok(s(_x0))]] [[take(ok(_x0), ok(_x1))]] = 15 + 6x0 + 6x1 >= 12 + 6x0 + 6x1 = [[ok(take(_x0, _x1))]] [[zip(ok(_x0), ok(_x1))]] = 15 + 3x0 + 9x1 >= 12 + 3x0 + 9x1 = [[ok(zip(_x0, _x1))]] [[pair(ok(_x0), ok(_x1))]] = 7 + 6x1 >= 6 + 6x1 = [[ok(pair(_x0, _x1))]] [[tail(ok(_x0))]] = 12 + 9x0 >= 12 + 9x0 = [[ok(tail(_x0))]] [[repItems(ok(_x0))]] = 9 + 9x0 >= 3 + 9x0 = [[ok(repItems(_x0))]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace a dependency pair problem (P_12, 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), (P_8, R_0, minimal, formative), (P_9, 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(proper#) = 1 Thus, we can orient the dependency pairs as follows: 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#(incr(X))) = incr(X) |> X = nu(proper#(X)) nu(proper#(s(X))) = s(X) |> X = nu(proper#(X)) nu(proper#(take(X, Y))) = take(X, Y) |> X = nu(proper#(X)) nu(proper#(take(X, Y))) = take(X, Y) |> Y = nu(proper#(Y)) nu(proper#(zip(X, Y))) = zip(X, Y) |> X = nu(proper#(X)) nu(proper#(zip(X, Y))) = zip(X, Y) |> Y = nu(proper#(Y)) nu(proper#(pair(X, Y))) = pair(X, Y) |> X = nu(proper#(X)) nu(proper#(pair(X, Y))) = pair(X, Y) |> Y = nu(proper#(Y)) nu(proper#(tail(X))) = tail(X) |> X = nu(proper#(X)) nu(proper#(repItems(X))) = repItems(X) |> X = nu(proper#(X)) 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 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). We apply the subterm criterion with the following projection function: nu(repItems#) = 1 Thus, we can orient the dependency pairs as follows: nu(repItems#(mark(X))) = mark(X) |> X = nu(repItems#(X)) nu(repItems#(ok(X))) = ok(X) |> X = nu(repItems#(X)) 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), (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(tail#) = 1 Thus, we can orient the dependency pairs as follows: nu(tail#(mark(X))) = mark(X) |> X = nu(tail#(X)) nu(tail#(ok(X))) = ok(X) |> X = nu(tail#(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(pair#) = 1 Thus, we can orient the dependency pairs as follows: nu(pair#(mark(X), Y)) = mark(X) |> X = nu(pair#(X, Y)) nu(pair#(X, mark(Y))) = X = X = nu(pair#(X, Y)) nu(pair#(ok(X), ok(Y))) = ok(X) |> X = nu(pair#(X, Y)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_7, R_0, minimal, f) by (P_13, R_0, minimal, f), where P_13 contains: pair#(X, mark(Y)) =#> pair#(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), (P_6, R_0, minimal, formative) and (P_13, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_13, R_0, minimal, formative). We apply the subterm criterion with the following projection function: nu(pair#) = 2 Thus, we can orient the dependency pairs as follows: nu(pair#(X, mark(Y))) = mark(Y) |> Y = nu(pair#(X, Y)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_13, 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(zip#) = 1 Thus, we can orient the dependency pairs as follows: nu(zip#(mark(X), Y)) = mark(X) |> X = nu(zip#(X, Y)) nu(zip#(X, mark(Y))) = X = X = nu(zip#(X, Y)) nu(zip#(ok(X), ok(Y))) = ok(X) |> X = nu(zip#(X, Y)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_6, R_0, minimal, f) by (P_14, R_0, minimal, f), where P_14 contains: zip#(X, mark(Y)) =#> zip#(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_14, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_14, R_0, minimal, formative). We apply the subterm criterion with the following projection function: nu(zip#) = 2 Thus, we can orient the dependency pairs as follows: nu(zip#(X, mark(Y))) = mark(Y) |> Y = nu(zip#(X, Y)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_14, 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(take#) = 1 Thus, we can orient the dependency pairs as follows: nu(take#(mark(X), Y)) = mark(X) |> X = nu(take#(X, Y)) nu(take#(X, mark(Y))) = X = X = nu(take#(X, Y)) nu(take#(ok(X), ok(Y))) = ok(X) |> X = nu(take#(X, Y)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_5, R_0, minimal, f) by (P_15, R_0, minimal, f), where P_15 contains: take#(X, mark(Y)) =#> take#(X, Y) Thus, the original system is terminating if each of (P_1, R_0, minimal, formative), (P_2, R_0, minimal, formative), (P_3, R_0, minimal, formative), (P_4, R_0, minimal, formative) and (P_15, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_15, R_0, minimal, formative). We apply the subterm criterion with the following projection function: nu(take#) = 2 Thus, we can orient the dependency pairs as follows: nu(take#(X, mark(Y))) = mark(Y) |> Y = nu(take#(X, Y)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_15, 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#(ok(X))) = ok(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#(ok(X))) = ok(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#(ok(X), ok(Y))) = ok(X) |> X = nu(cons#(X, Y)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_2, R_0, minimal, f) by ({}, R_0, minimal, f). By the empty set processor [Kop12, Thm. 7.15] this problem may be immediately removed. Thus, the original system is terminating if (P_1, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_1, R_0, minimal, formative). We apply the subterm criterion with the following projection function: nu(active#) = 1 Thus, we can orient the dependency pairs as follows: nu(active#(cons(X, Y))) = cons(X, Y) |> X = nu(active#(X)) nu(active#(incr(X))) = incr(X) |> X = nu(active#(X)) nu(active#(s(X))) = s(X) |> X = nu(active#(X)) nu(active#(take(X, Y))) = take(X, Y) |> X = nu(active#(X)) nu(active#(take(X, Y))) = take(X, Y) |> Y = nu(active#(Y)) nu(active#(zip(X, Y))) = zip(X, Y) |> X = nu(active#(X)) nu(active#(zip(X, Y))) = zip(X, Y) |> Y = nu(active#(Y)) nu(active#(pair(X, Y))) = pair(X, Y) |> X = nu(active#(X)) nu(active#(pair(X, Y))) = pair(X, Y) |> Y = nu(active#(Y)) nu(active#(tail(X))) = tail(X) |> X = nu(active#(X)) nu(active#(repItems(X))) = repItems(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.