/export/starexec/sandbox/solver/bin/starexec_run_FirstOrder /export/starexec/sandbox/benchmark/theBenchmark.xml /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- YES We consider the system theBenchmark. We are asked to determine termination of the following first-order TRS. 0 : [] --> o active : [o] --> o add : [o * o] --> o cons : [o * o] --> o dbl : [o] --> o first : [o * o] --> o mark : [o] --> o nil : [] --> o ok : [o] --> o proper : [o] --> o recip : [o] --> o s : [o] --> o sqr : [o] --> o terms : [o] --> o top : [o] --> o active(terms(X)) => mark(cons(recip(sqr(X)), terms(s(X)))) active(sqr(0)) => mark(0) active(sqr(s(X))) => mark(s(add(sqr(X), dbl(X)))) active(dbl(0)) => mark(0) active(dbl(s(X))) => mark(s(s(dbl(X)))) active(add(0, X)) => mark(X) active(add(s(X), Y)) => mark(s(add(X, Y))) active(first(0, X)) => mark(nil) active(first(s(X), cons(Y, Z))) => mark(cons(Y, first(X, Z))) active(terms(X)) => terms(active(X)) active(cons(X, Y)) => cons(active(X), Y) active(recip(X)) => recip(active(X)) active(sqr(X)) => sqr(active(X)) active(s(X)) => s(active(X)) active(add(X, Y)) => add(active(X), Y) active(add(X, Y)) => add(X, active(Y)) active(dbl(X)) => dbl(active(X)) active(first(X, Y)) => first(active(X), Y) active(first(X, Y)) => first(X, active(Y)) terms(mark(X)) => mark(terms(X)) cons(mark(X), Y) => mark(cons(X, Y)) recip(mark(X)) => mark(recip(X)) sqr(mark(X)) => mark(sqr(X)) s(mark(X)) => mark(s(X)) add(mark(X), Y) => mark(add(X, Y)) add(X, mark(Y)) => mark(add(X, Y)) dbl(mark(X)) => mark(dbl(X)) first(mark(X), Y) => mark(first(X, Y)) first(X, mark(Y)) => mark(first(X, Y)) proper(terms(X)) => terms(proper(X)) proper(cons(X, Y)) => cons(proper(X), proper(Y)) proper(recip(X)) => recip(proper(X)) proper(sqr(X)) => sqr(proper(X)) proper(s(X)) => s(proper(X)) proper(0) => ok(0) proper(add(X, Y)) => add(proper(X), proper(Y)) proper(dbl(X)) => dbl(proper(X)) proper(first(X, Y)) => first(proper(X), proper(Y)) proper(nil) => ok(nil) terms(ok(X)) => ok(terms(X)) cons(ok(X), ok(Y)) => ok(cons(X, Y)) recip(ok(X)) => ok(recip(X)) sqr(ok(X)) => ok(sqr(X)) s(ok(X)) => ok(s(X)) add(ok(X), ok(Y)) => ok(add(X, Y)) dbl(ok(X)) => ok(dbl(X)) first(ok(X), ok(Y)) => ok(first(X, Y)) top(mark(X)) => top(proper(X)) top(ok(X)) => top(active(X)) We use the dependency pair framework as described in [Kop12, Ch. 6/7], with static dependency pairs (see [KusIsoSakBla09] and the adaptation for AFSMs in [Kop12, Ch. 7.8]). We thus obtain the following dependency pair problem (P_0, R_0, minimal, formative): Dependency Pairs P_0: 0] active#(terms(X)) =#> cons#(recip(sqr(X)), terms(s(X))) 1] active#(terms(X)) =#> recip#(sqr(X)) 2] active#(terms(X)) =#> sqr#(X) 3] active#(terms(X)) =#> terms#(s(X)) 4] active#(terms(X)) =#> s#(X) 5] active#(sqr(s(X))) =#> s#(add(sqr(X), dbl(X))) 6] active#(sqr(s(X))) =#> add#(sqr(X), dbl(X)) 7] active#(sqr(s(X))) =#> sqr#(X) 8] active#(sqr(s(X))) =#> dbl#(X) 9] active#(dbl(s(X))) =#> s#(s(dbl(X))) 10] active#(dbl(s(X))) =#> s#(dbl(X)) 11] active#(dbl(s(X))) =#> dbl#(X) 12] active#(add(s(X), Y)) =#> s#(add(X, Y)) 13] active#(add(s(X), Y)) =#> add#(X, Y) 14] active#(first(s(X), cons(Y, Z))) =#> cons#(Y, first(X, Z)) 15] active#(first(s(X), cons(Y, Z))) =#> first#(X, Z) 16] active#(terms(X)) =#> terms#(active(X)) 17] active#(terms(X)) =#> active#(X) 18] active#(cons(X, Y)) =#> cons#(active(X), Y) 19] active#(cons(X, Y)) =#> active#(X) 20] active#(recip(X)) =#> recip#(active(X)) 21] active#(recip(X)) =#> active#(X) 22] active#(sqr(X)) =#> sqr#(active(X)) 23] active#(sqr(X)) =#> active#(X) 24] active#(s(X)) =#> s#(active(X)) 25] active#(s(X)) =#> active#(X) 26] active#(add(X, Y)) =#> add#(active(X), Y) 27] active#(add(X, Y)) =#> active#(X) 28] active#(add(X, Y)) =#> add#(X, active(Y)) 29] active#(add(X, Y)) =#> active#(Y) 30] active#(dbl(X)) =#> dbl#(active(X)) 31] active#(dbl(X)) =#> active#(X) 32] active#(first(X, Y)) =#> first#(active(X), Y) 33] active#(first(X, Y)) =#> active#(X) 34] active#(first(X, Y)) =#> first#(X, active(Y)) 35] active#(first(X, Y)) =#> active#(Y) 36] terms#(mark(X)) =#> terms#(X) 37] cons#(mark(X), Y) =#> cons#(X, Y) 38] recip#(mark(X)) =#> recip#(X) 39] sqr#(mark(X)) =#> sqr#(X) 40] s#(mark(X)) =#> s#(X) 41] add#(mark(X), Y) =#> add#(X, Y) 42] add#(X, mark(Y)) =#> add#(X, Y) 43] dbl#(mark(X)) =#> dbl#(X) 44] first#(mark(X), Y) =#> first#(X, Y) 45] first#(X, mark(Y)) =#> first#(X, Y) 46] proper#(terms(X)) =#> terms#(proper(X)) 47] proper#(terms(X)) =#> proper#(X) 48] proper#(cons(X, Y)) =#> cons#(proper(X), proper(Y)) 49] proper#(cons(X, Y)) =#> proper#(X) 50] proper#(cons(X, Y)) =#> proper#(Y) 51] proper#(recip(X)) =#> recip#(proper(X)) 52] proper#(recip(X)) =#> proper#(X) 53] proper#(sqr(X)) =#> sqr#(proper(X)) 54] proper#(sqr(X)) =#> proper#(X) 55] proper#(s(X)) =#> s#(proper(X)) 56] proper#(s(X)) =#> proper#(X) 57] proper#(add(X, Y)) =#> add#(proper(X), proper(Y)) 58] proper#(add(X, Y)) =#> proper#(X) 59] proper#(add(X, Y)) =#> proper#(Y) 60] proper#(dbl(X)) =#> dbl#(proper(X)) 61] proper#(dbl(X)) =#> proper#(X) 62] proper#(first(X, Y)) =#> first#(proper(X), proper(Y)) 63] proper#(first(X, Y)) =#> proper#(X) 64] proper#(first(X, Y)) =#> proper#(Y) 65] terms#(ok(X)) =#> terms#(X) 66] cons#(ok(X), ok(Y)) =#> cons#(X, Y) 67] recip#(ok(X)) =#> recip#(X) 68] sqr#(ok(X)) =#> sqr#(X) 69] s#(ok(X)) =#> s#(X) 70] add#(ok(X), ok(Y)) =#> add#(X, Y) 71] dbl#(ok(X)) =#> dbl#(X) 72] first#(ok(X), ok(Y)) =#> first#(X, Y) 73] top#(mark(X)) =#> top#(proper(X)) 74] top#(mark(X)) =#> proper#(X) 75] top#(ok(X)) =#> top#(active(X)) 76] top#(ok(X)) =#> active#(X) Rules R_0: active(terms(X)) => mark(cons(recip(sqr(X)), terms(s(X)))) active(sqr(0)) => mark(0) active(sqr(s(X))) => mark(s(add(sqr(X), dbl(X)))) active(dbl(0)) => mark(0) active(dbl(s(X))) => mark(s(s(dbl(X)))) active(add(0, X)) => mark(X) active(add(s(X), Y)) => mark(s(add(X, Y))) active(first(0, X)) => mark(nil) active(first(s(X), cons(Y, Z))) => mark(cons(Y, first(X, Z))) active(terms(X)) => terms(active(X)) active(cons(X, Y)) => cons(active(X), Y) active(recip(X)) => recip(active(X)) active(sqr(X)) => sqr(active(X)) active(s(X)) => s(active(X)) active(add(X, Y)) => add(active(X), Y) active(add(X, Y)) => add(X, active(Y)) active(dbl(X)) => dbl(active(X)) active(first(X, Y)) => first(active(X), Y) active(first(X, Y)) => first(X, active(Y)) terms(mark(X)) => mark(terms(X)) cons(mark(X), Y) => mark(cons(X, Y)) recip(mark(X)) => mark(recip(X)) sqr(mark(X)) => mark(sqr(X)) s(mark(X)) => mark(s(X)) add(mark(X), Y) => mark(add(X, Y)) add(X, mark(Y)) => mark(add(X, Y)) dbl(mark(X)) => mark(dbl(X)) first(mark(X), Y) => mark(first(X, Y)) first(X, mark(Y)) => mark(first(X, Y)) proper(terms(X)) => terms(proper(X)) proper(cons(X, Y)) => cons(proper(X), proper(Y)) proper(recip(X)) => recip(proper(X)) proper(sqr(X)) => sqr(proper(X)) proper(s(X)) => s(proper(X)) proper(0) => ok(0) proper(add(X, Y)) => add(proper(X), proper(Y)) proper(dbl(X)) => dbl(proper(X)) proper(first(X, Y)) => first(proper(X), proper(Y)) proper(nil) => ok(nil) terms(ok(X)) => ok(terms(X)) cons(ok(X), ok(Y)) => ok(cons(X, Y)) recip(ok(X)) => ok(recip(X)) sqr(ok(X)) => ok(sqr(X)) s(ok(X)) => ok(s(X)) add(ok(X), ok(Y)) => ok(add(X, Y)) dbl(ok(X)) => ok(dbl(X)) first(ok(X), ok(Y)) => ok(first(X, Y)) 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 : 37, 66 * 1 : 38, 67 * 2 : 39, 68 * 3 : 36, 65 * 4 : 40, 69 * 5 : 40, 69 * 6 : 41, 42, 70 * 7 : 39, 68 * 8 : 43, 71 * 9 : 40, 69 * 10 : 40, 69 * 11 : 43, 71 * 12 : 40, 69 * 13 : 41, 42, 70 * 14 : 37, 66 * 15 : 44, 45, 72 * 16 : 36, 65 * 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 : 37, 66 * 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 : 38, 67 * 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, 68 * 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 : 40, 69 * 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, 70 * 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 : 41, 42, 70 * 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, 71 * 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 : 44, 45, 72 * 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 : 44, 45, 72 * 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, 65 * 37 : 37, 66 * 38 : 38, 67 * 39 : 39, 68 * 40 : 40, 69 * 41 : 41, 42, 70 * 42 : 41, 42, 70 * 43 : 43, 71 * 44 : 44, 45, 72 * 45 : 44, 45, 72 * 46 : 36, 65 * 47 : 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64 * 48 : 37, 66 * 49 : 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64 * 50 : 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64 * 51 : 38, 67 * 52 : 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64 * 53 : 39, 68 * 54 : 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64 * 55 : 40, 69 * 56 : 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64 * 57 : 41, 42, 70 * 58 : 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64 * 59 : 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64 * 60 : 43, 71 * 61 : 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64 * 62 : 44, 45, 72 * 63 : 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64 * 64 : 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64 * 65 : 36, 65 * 66 : 37, 66 * 67 : 38, 67 * 68 : 39, 68 * 69 : 40, 69 * 70 : 41, 42, 70 * 71 : 43, 71 * 72 : 44, 45, 72 * 73 : 73, 74, 75, 76 * 74 : 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64 * 75 : 73, 74, 75, 76 * 76 : 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#(terms(X)) =#> active#(X) active#(cons(X, Y)) =#> active#(X) active#(recip(X)) =#> active#(X) active#(sqr(X)) =#> active#(X) active#(s(X)) =#> active#(X) active#(add(X, Y)) =#> active#(X) active#(add(X, Y)) =#> active#(Y) active#(dbl(X)) =#> active#(X) active#(first(X, Y)) =#> active#(X) active#(first(X, Y)) =#> active#(Y) P_2: terms#(mark(X)) =#> terms#(X) terms#(ok(X)) =#> terms#(X) P_3: cons#(mark(X), Y) =#> cons#(X, Y) cons#(ok(X), ok(Y)) =#> cons#(X, Y) P_4: recip#(mark(X)) =#> recip#(X) recip#(ok(X)) =#> recip#(X) P_5: sqr#(mark(X)) =#> sqr#(X) sqr#(ok(X)) =#> sqr#(X) P_6: s#(mark(X)) =#> s#(X) s#(ok(X)) =#> s#(X) P_7: add#(mark(X), Y) =#> add#(X, Y) add#(X, mark(Y)) =#> add#(X, Y) add#(ok(X), ok(Y)) =#> add#(X, Y) P_8: dbl#(mark(X)) =#> dbl#(X) dbl#(ok(X)) =#> dbl#(X) P_9: first#(mark(X), Y) =#> first#(X, Y) first#(X, mark(Y)) =#> first#(X, Y) first#(ok(X), ok(Y)) =#> first#(X, Y) P_10: proper#(terms(X)) =#> proper#(X) proper#(cons(X, Y)) =#> proper#(X) proper#(cons(X, Y)) =#> proper#(Y) proper#(recip(X)) =#> proper#(X) proper#(sqr(X)) =#> proper#(X) proper#(s(X)) =#> proper#(X) proper#(add(X, Y)) =#> proper#(X) proper#(add(X, Y)) =#> proper#(Y) proper#(dbl(X)) =#> proper#(X) proper#(first(X, Y)) =#> proper#(X) proper#(first(X, Y)) =#> proper#(Y) 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(terms(X)) => mark(cons(recip(sqr(X)), terms(s(X)))) active(sqr(0)) => mark(0) active(sqr(s(X))) => mark(s(add(sqr(X), dbl(X)))) active(dbl(0)) => mark(0) active(dbl(s(X))) => mark(s(s(dbl(X)))) active(add(0, X)) => mark(X) active(add(s(X), Y)) => mark(s(add(X, Y))) active(first(0, X)) => mark(nil) active(first(s(X), cons(Y, Z))) => mark(cons(Y, first(X, Z))) active(terms(X)) => terms(active(X)) active(cons(X, Y)) => cons(active(X), Y) active(recip(X)) => recip(active(X)) active(sqr(X)) => sqr(active(X)) active(s(X)) => s(active(X)) active(add(X, Y)) => add(active(X), Y) active(add(X, Y)) => add(X, active(Y)) active(dbl(X)) => dbl(active(X)) active(first(X, Y)) => first(active(X), Y) active(first(X, Y)) => first(X, active(Y)) terms(mark(X)) => mark(terms(X)) cons(mark(X), Y) => mark(cons(X, Y)) recip(mark(X)) => mark(recip(X)) sqr(mark(X)) => mark(sqr(X)) s(mark(X)) => mark(s(X)) add(mark(X), Y) => mark(add(X, Y)) add(X, mark(Y)) => mark(add(X, Y)) dbl(mark(X)) => mark(dbl(X)) first(mark(X), Y) => mark(first(X, Y)) first(X, mark(Y)) => mark(first(X, Y)) proper(terms(X)) => terms(proper(X)) proper(cons(X, Y)) => cons(proper(X), proper(Y)) proper(recip(X)) => recip(proper(X)) proper(sqr(X)) => sqr(proper(X)) proper(s(X)) => s(proper(X)) proper(0) => ok(0) proper(add(X, Y)) => add(proper(X), proper(Y)) proper(dbl(X)) => dbl(proper(X)) proper(first(X, Y)) => first(proper(X), proper(Y)) proper(nil) => ok(nil) terms(ok(X)) => ok(terms(X)) cons(ok(X), ok(Y)) => ok(cons(X, Y)) recip(ok(X)) => ok(recip(X)) sqr(ok(X)) => ok(sqr(X)) s(ok(X)) => ok(s(X)) add(ok(X), ok(Y)) => ok(add(X, Y)) dbl(ok(X)) => ok(dbl(X)) first(ok(X), ok(Y)) => ok(first(X, Y)) 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(terms(X)) >= mark(cons(recip(sqr(X)), terms(s(X)))) active(sqr(0)) >= mark(0) active(sqr(s(X))) >= mark(s(add(sqr(X), dbl(X)))) active(dbl(0)) >= mark(0) active(dbl(s(X))) >= mark(s(s(dbl(X)))) active(add(0, X)) >= mark(X) active(add(s(X), Y)) >= mark(s(add(X, Y))) active(first(0, X)) >= mark(nil) active(first(s(X), cons(Y, Z))) >= mark(cons(Y, first(X, Z))) active(terms(X)) >= terms(active(X)) active(cons(X, Y)) >= cons(active(X), Y) active(recip(X)) >= recip(active(X)) active(sqr(X)) >= sqr(active(X)) active(s(X)) >= s(active(X)) active(add(X, Y)) >= add(active(X), Y) active(add(X, Y)) >= add(X, active(Y)) active(dbl(X)) >= dbl(active(X)) active(first(X, Y)) >= first(active(X), Y) active(first(X, Y)) >= first(X, active(Y)) terms(mark(X)) >= mark(terms(X)) cons(mark(X), Y) >= mark(cons(X, Y)) recip(mark(X)) >= mark(recip(X)) sqr(mark(X)) >= mark(sqr(X)) s(mark(X)) >= mark(s(X)) add(mark(X), Y) >= mark(add(X, Y)) add(X, mark(Y)) >= mark(add(X, Y)) dbl(mark(X)) >= mark(dbl(X)) first(mark(X), Y) >= mark(first(X, Y)) first(X, mark(Y)) >= mark(first(X, Y)) proper(terms(X)) >= terms(proper(X)) proper(cons(X, Y)) >= cons(proper(X), proper(Y)) proper(recip(X)) >= recip(proper(X)) proper(sqr(X)) >= sqr(proper(X)) proper(s(X)) >= s(proper(X)) proper(0) >= ok(0) proper(add(X, Y)) >= add(proper(X), proper(Y)) proper(dbl(X)) >= dbl(proper(X)) proper(first(X, Y)) >= first(proper(X), proper(Y)) proper(nil) >= ok(nil) terms(ok(X)) >= ok(terms(X)) cons(ok(X), ok(Y)) >= ok(cons(X, Y)) recip(ok(X)) >= ok(recip(X)) sqr(ok(X)) >= ok(sqr(X)) s(ok(X)) >= ok(s(X)) add(ok(X), ok(Y)) >= ok(add(X, Y)) dbl(ok(X)) >= ok(dbl(X)) first(ok(X), ok(Y)) >= ok(first(X, Y)) Since this representation is not advantageous for the higher-order recursive path ordering, we present the strict requirements in their unextended form, which is not problematic since for any F, s and substituion gamma: (F s)gamma beta-reduces to F(s)gamma.) We use a recursive path ordering as defined in [Kop12, Chapter 5]. Argument functions: [[active(x_1)]] = x_1 [[cons(x_1, x_2)]] = cons(x_1) [[nil]] = _|_ [[ok(x_1)]] = x_1 [[proper(x_1)]] = x_1 We choose Lex = {} and Mul = {0, add, cons, dbl, first, mark, recip, s, sqr, terms, top#}, and the following precedence: terms > recip > sqr > add > dbl > s > first > cons > 0 > mark = top# Taking the argument function into account, and fixing the greater / greater equal choices, the constraints can be denoted as follows: top#(mark(X)) > top#(X) top#(X) >= top#(X) terms(X) >= mark(cons(recip(sqr(X)))) sqr(0) >= mark(0) sqr(s(X)) >= mark(s(add(sqr(X), dbl(X)))) dbl(0) >= mark(0) dbl(s(X)) >= mark(s(s(dbl(X)))) add(0, X) >= mark(X) add(s(X), Y) >= mark(s(add(X, Y))) first(0, X) >= mark(_|_) first(s(X), cons(Y)) >= mark(cons(Y)) terms(X) >= terms(X) cons(X) >= cons(X) recip(X) >= recip(X) sqr(X) >= sqr(X) s(X) >= s(X) add(X, Y) >= add(X, Y) add(X, Y) >= add(X, Y) dbl(X) >= dbl(X) first(X, Y) >= first(X, Y) first(X, Y) >= first(X, Y) terms(mark(X)) >= mark(terms(X)) cons(mark(X)) >= mark(cons(X)) recip(mark(X)) >= mark(recip(X)) sqr(mark(X)) >= mark(sqr(X)) s(mark(X)) >= mark(s(X)) add(mark(X), Y) >= mark(add(X, Y)) add(X, mark(Y)) >= mark(add(X, Y)) dbl(mark(X)) >= mark(dbl(X)) first(mark(X), Y) >= mark(first(X, Y)) first(X, mark(Y)) >= mark(first(X, Y)) terms(X) >= terms(X) cons(X) >= cons(X) recip(X) >= recip(X) sqr(X) >= sqr(X) s(X) >= s(X) 0 >= 0 add(X, Y) >= add(X, Y) dbl(X) >= dbl(X) first(X, Y) >= first(X, Y) _|_ >= _|_ terms(X) >= terms(X) cons(X) >= cons(X) recip(X) >= recip(X) sqr(X) >= sqr(X) s(X) >= s(X) add(X, Y) >= add(X, Y) dbl(X) >= dbl(X) first(X, Y) >= first(X, Y) With these choices, we have: 1] top#(mark(X)) > top#(X) because [2], by definition 2] top#*(mark(X)) >= top#(X) because [3], by (Select) 3] mark(X) >= top#(X) because mark = top#, mark in Mul and [4], by (Fun) 4] X >= X by (Meta) 5] top#(X) >= top#(X) because top# in Mul and [6], by (Fun) 6] X >= X by (Meta) 7] terms(X) >= mark(cons(recip(sqr(X)))) because [8], by (Star) 8] terms*(X) >= mark(cons(recip(sqr(X)))) because terms > mark and [9], by (Copy) 9] terms*(X) >= cons(recip(sqr(X))) because terms > cons and [10], by (Copy) 10] terms*(X) >= recip(sqr(X)) because terms > recip and [11], by (Copy) 11] terms*(X) >= sqr(X) because terms > sqr and [12], by (Copy) 12] terms*(X) >= X because [13], by (Select) 13] X >= X by (Meta) 14] sqr(0) >= mark(0) because [15], by (Star) 15] sqr*(0) >= mark(0) because sqr > mark and [16], by (Copy) 16] sqr*(0) >= 0 because sqr > 0, by (Copy) 17] sqr(s(X)) >= mark(s(add(sqr(X), dbl(X)))) because [18], by (Star) 18] sqr*(s(X)) >= mark(s(add(sqr(X), dbl(X)))) because sqr > mark and [19], by (Copy) 19] sqr*(s(X)) >= s(add(sqr(X), dbl(X))) because sqr > s and [20], by (Copy) 20] sqr*(s(X)) >= add(sqr(X), dbl(X)) because sqr > add, [21] and [24], by (Copy) 21] sqr*(s(X)) >= sqr(X) because sqr in Mul and [22], by (Stat) 22] s(X) > X because [23], by definition 23] s*(X) >= X because [6], by (Select) 24] sqr*(s(X)) >= dbl(X) because sqr > dbl and [25], by (Copy) 25] sqr*(s(X)) >= X because [26], by (Select) 26] s(X) >= X because [23], by (Star) 27] dbl(0) >= mark(0) because [28], by (Star) 28] dbl*(0) >= mark(0) because dbl > mark and [29], by (Copy) 29] dbl*(0) >= 0 because dbl > 0, by (Copy) 30] dbl(s(X)) >= mark(s(s(dbl(X)))) because [31], by (Star) 31] dbl*(s(X)) >= mark(s(s(dbl(X)))) because dbl > mark and [32], by (Copy) 32] dbl*(s(X)) >= s(s(dbl(X))) because dbl > s and [33], by (Copy) 33] dbl*(s(X)) >= s(dbl(X)) because dbl > s and [34], by (Copy) 34] dbl*(s(X)) >= dbl(X) because dbl in Mul and [22], by (Stat) 35] add(0, X) >= mark(X) because [36], by (Star) 36] add*(0, X) >= mark(X) because add > mark and [37], by (Copy) 37] add*(0, X) >= X because [6], by (Select) 38] add(s(X), Y) >= mark(s(add(X, Y))) because [39], by (Star) 39] add*(s(X), Y) >= mark(s(add(X, Y))) because add > mark and [40], by (Copy) 40] add*(s(X), Y) >= s(add(X, Y)) because add > s and [41], by (Copy) 41] add*(s(X), Y) >= add(X, Y) because add in Mul, [22] and [42], by (Stat) 42] Y >= Y by (Meta) 43] first(0, X) >= mark(_|_) because [44], by (Star) 44] first*(0, X) >= mark(_|_) because [45], by (Select) 45] 0 >= mark(_|_) because [46], by (Star) 46] 0* >= mark(_|_) because 0 > mark and [47], by (Copy) 47] 0* >= _|_ by (Bot) 48] first(s(X), cons(Y)) >= mark(cons(Y)) because [49], by (Star) 49] first*(s(X), cons(Y)) >= mark(cons(Y)) because first > mark and [50], by (Copy) 50] first*(s(X), cons(Y)) >= cons(Y) because first > cons and [51], by (Copy) 51] first*(s(X), cons(Y)) >= Y because [52], by (Select) 52] cons(Y) >= Y because [53], by (Star) 53] cons*(Y) >= Y because [42], by (Select) 54] terms(X) >= terms(X) because terms in Mul and [55], by (Fun) 55] X >= X by (Meta) 56] cons(X) >= cons(X) because cons in Mul and [57], by (Fun) 57] X >= X by (Meta) 58] recip(X) >= recip(X) because recip in Mul and [55], by (Fun) 59] sqr(X) >= sqr(X) because sqr in Mul and [55], by (Fun) 60] s(X) >= s(X) because s in Mul and [55], by (Fun) 61] add(X, Y) >= add(X, Y) because add in Mul, [57] and [62], by (Fun) 62] Y >= Y by (Meta) 63] add(X, Y) >= add(X, Y) because add in Mul, [57] and [64], by (Fun) 64] Y >= Y by (Meta) 65] dbl(X) >= dbl(X) because dbl in Mul and [55], by (Fun) 66] first(X, Y) >= first(X, Y) because first in Mul, [57] and [64], by (Fun) 67] first(X, Y) >= first(X, Y) because first in Mul, [57] and [64], by (Fun) 68] terms(mark(X)) >= mark(terms(X)) because [69], by (Star) 69] terms*(mark(X)) >= mark(terms(X)) because terms > mark and [70], by (Copy) 70] terms*(mark(X)) >= terms(X) because terms in Mul and [71], by (Stat) 71] mark(X) > X because [72], by definition 72] mark*(X) >= X because [55], by (Select) 73] cons(mark(X)) >= mark(cons(X)) because [74], by (Star) 74] cons*(mark(X)) >= mark(cons(X)) because cons > mark and [75], by (Copy) 75] cons*(mark(X)) >= cons(X) because cons in Mul and [76], by (Stat) 76] mark(X) > X because [77], by definition 77] mark*(X) >= X because [57], by (Select) 78] recip(mark(X)) >= mark(recip(X)) because [79], by (Star) 79] recip*(mark(X)) >= mark(recip(X)) because recip > mark and [80], by (Copy) 80] recip*(mark(X)) >= recip(X) because recip in Mul and [71], by (Stat) 81] sqr(mark(X)) >= mark(sqr(X)) because [82], by (Star) 82] sqr*(mark(X)) >= mark(sqr(X)) because sqr > mark and [83], by (Copy) 83] sqr*(mark(X)) >= sqr(X) because sqr in Mul and [71], by (Stat) 84] s(mark(X)) >= mark(s(X)) because [85], by (Star) 85] s*(mark(X)) >= mark(s(X)) because s > mark and [86], by (Copy) 86] s*(mark(X)) >= s(X) because s in Mul and [71], by (Stat) 87] add(mark(X), Y) >= mark(add(X, Y)) because [88], by (Star) 88] add*(mark(X), Y) >= mark(add(X, Y)) because add > mark and [89], by (Copy) 89] add*(mark(X), Y) >= add(X, Y) because add in Mul, [76] and [64], by (Stat) 90] add(X, mark(Y)) >= mark(add(X, Y)) because [91], by (Star) 91] add*(X, mark(Y)) >= mark(add(X, Y)) because add > mark and [92], by (Copy) 92] add*(X, mark(Y)) >= add(X, Y) because add in Mul, [57] and [93], by (Stat) 93] mark(Y) > Y because [94], by definition 94] mark*(Y) >= Y because [64], by (Select) 95] dbl(mark(X)) >= mark(dbl(X)) because [96], by (Star) 96] dbl*(mark(X)) >= mark(dbl(X)) because dbl > mark and [97], by (Copy) 97] dbl*(mark(X)) >= dbl(X) because dbl in Mul and [71], by (Stat) 98] first(mark(X), Y) >= mark(first(X, Y)) because [99], by (Star) 99] first*(mark(X), Y) >= mark(first(X, Y)) because first > mark and [100], by (Copy) 100] first*(mark(X), Y) >= first(X, Y) because first in Mul, [76] and [64], by (Stat) 101] first(X, mark(Y)) >= mark(first(X, Y)) because [102], by (Star) 102] first*(X, mark(Y)) >= mark(first(X, Y)) because first > mark and [103], by (Copy) 103] first*(X, mark(Y)) >= first(X, Y) because first in Mul, [57] and [93], by (Stat) 104] terms(X) >= terms(X) because terms in Mul and [4], by (Fun) 105] cons(X) >= cons(X) because cons in Mul and [106], by (Fun) 106] X >= X by (Meta) 107] recip(X) >= recip(X) because recip in Mul and [4], by (Fun) 108] sqr(X) >= sqr(X) because sqr in Mul and [4], by (Fun) 109] s(X) >= s(X) because s in Mul and [4], by (Fun) 110] 0 >= 0 by (Fun) 111] add(X, Y) >= add(X, Y) because add in Mul, [106] and [112], by (Fun) 112] Y >= Y by (Meta) 113] dbl(X) >= dbl(X) because dbl in Mul and [4], by (Fun) 114] first(X, Y) >= first(X, Y) because first in Mul, [106] and [112], by (Fun) 115] _|_ >= _|_ by (Bot) 116] terms(X) >= terms(X) because terms in Mul and [6], by (Fun) 117] cons(X) >= cons(X) because cons in Mul and [118], by (Fun) 118] X >= X by (Meta) 119] recip(X) >= recip(X) because recip in Mul and [6], by (Fun) 120] sqr(X) >= sqr(X) because sqr in Mul and [6], by (Fun) 121] s(X) >= s(X) because s in Mul and [6], by (Fun) 122] add(X, Y) >= add(X, Y) because add in Mul, [118] and [123], by (Fun) 123] Y >= Y by (Meta) 124] dbl(X) >= dbl(X) because dbl in Mul and [6], by (Fun) 125] first(X, Y) >= first(X, Y) because first in Mul, [118] and [123], by (Fun) 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(terms(X)) => terms(active(X)) active(cons(X, Y)) => cons(active(X), Y) active(recip(X)) => recip(active(X)) active(sqr(X)) => sqr(active(X)) active(s(X)) => s(active(X)) active(add(X, Y)) => add(active(X), Y) active(add(X, Y)) => add(X, active(Y)) active(dbl(X)) => dbl(active(X)) active(first(X, Y)) => first(active(X), Y) active(first(X, Y)) => first(X, active(Y)) proper(terms(X)) => terms(proper(X)) proper(cons(X, Y)) => cons(proper(X), proper(Y)) proper(recip(X)) => recip(proper(X)) proper(sqr(X)) => sqr(proper(X)) proper(s(X)) => s(proper(X)) proper(0) => ok(0) proper(add(X, Y)) => add(proper(X), proper(Y)) proper(dbl(X)) => dbl(proper(X)) proper(first(X, Y)) => first(proper(X), proper(Y)) proper(nil) => ok(nil) terms(ok(X)) => ok(terms(X)) cons(ok(X), ok(Y)) => ok(cons(X, Y)) recip(ok(X)) => ok(recip(X)) sqr(ok(X)) => ok(sqr(X)) s(ok(X)) => ok(s(X)) add(ok(X), ok(Y)) => ok(add(X, Y)) dbl(ok(X)) => ok(dbl(X)) first(ok(X), ok(Y)) => ok(first(X, Y)) 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(terms(X)) => terms(active(X)) active(cons(X, Y)) => cons(active(X), Y) active(recip(X)) => recip(active(X)) active(sqr(X)) => sqr(active(X)) active(s(X)) => s(active(X)) active(add(X, Y)) => add(active(X), Y) active(add(X, Y)) => add(X, active(Y)) active(dbl(X)) => dbl(active(X)) active(first(X, Y)) => first(active(X), Y) active(first(X, Y)) => first(X, active(Y)) terms(ok(X)) => ok(terms(X)) cons(ok(X), ok(Y)) => ok(cons(X, Y)) recip(ok(X)) => ok(recip(X)) sqr(ok(X)) => ok(sqr(X)) s(ok(X)) => ok(s(X)) add(ok(X), ok(Y)) => ok(add(X, Y)) dbl(ok(X)) => ok(dbl(X)) first(ok(X), ok(Y)) => ok(first(X, Y)) It suffices to find a standard reduction pair [Kop12, Def. 6.69]. Thus, we must orient: top#(ok(X)) >? top#(active(X)) active(terms(X)) >= terms(active(X)) active(cons(X, Y)) >= cons(active(X), Y) active(recip(X)) >= recip(active(X)) active(sqr(X)) >= sqr(active(X)) active(s(X)) >= s(active(X)) active(add(X, Y)) >= add(active(X), Y) active(add(X, Y)) >= add(X, active(Y)) active(dbl(X)) >= dbl(active(X)) active(first(X, Y)) >= first(active(X), Y) active(first(X, Y)) >= first(X, active(Y)) terms(ok(X)) >= ok(terms(X)) cons(ok(X), ok(Y)) >= ok(cons(X, Y)) recip(ok(X)) >= ok(recip(X)) sqr(ok(X)) >= ok(sqr(X)) s(ok(X)) >= ok(s(X)) add(ok(X), ok(Y)) >= ok(add(X, Y)) dbl(ok(X)) >= ok(dbl(X)) first(ok(X), ok(Y)) >= ok(first(X, Y)) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: active = \y0.y0 add = \y0y1.3y1 cons = \y0y1.3y0 dbl = \y0.y0 first = \y0y1.y1 ok = \y0.3 + 2y0 recip = \y0.y0 s = \y0.y0 sqr = \y0.y0 terms = \y0.3y0 top# = \y0.3y0 Using this interpretation, the requirements translate to: [[top#(ok(_x0))]] = 9 + 6x0 > 3x0 = [[top#(active(_x0))]] [[active(terms(_x0))]] = 3x0 >= 3x0 = [[terms(active(_x0))]] [[active(cons(_x0, _x1))]] = 3x0 >= 3x0 = [[cons(active(_x0), _x1)]] [[active(recip(_x0))]] = x0 >= x0 = [[recip(active(_x0))]] [[active(sqr(_x0))]] = x0 >= x0 = [[sqr(active(_x0))]] [[active(s(_x0))]] = x0 >= x0 = [[s(active(_x0))]] [[active(add(_x0, _x1))]] = 3x1 >= 3x1 = [[add(active(_x0), _x1)]] [[active(add(_x0, _x1))]] = 3x1 >= 3x1 = [[add(_x0, active(_x1))]] [[active(dbl(_x0))]] = x0 >= x0 = [[dbl(active(_x0))]] [[active(first(_x0, _x1))]] = x1 >= x1 = [[first(active(_x0), _x1)]] [[active(first(_x0, _x1))]] = x1 >= x1 = [[first(_x0, active(_x1))]] [[terms(ok(_x0))]] = 9 + 6x0 >= 3 + 6x0 = [[ok(terms(_x0))]] [[cons(ok(_x0), ok(_x1))]] = 9 + 6x0 >= 3 + 6x0 = [[ok(cons(_x0, _x1))]] [[recip(ok(_x0))]] = 3 + 2x0 >= 3 + 2x0 = [[ok(recip(_x0))]] [[sqr(ok(_x0))]] = 3 + 2x0 >= 3 + 2x0 = [[ok(sqr(_x0))]] [[s(ok(_x0))]] = 3 + 2x0 >= 3 + 2x0 = [[ok(s(_x0))]] [[add(ok(_x0), ok(_x1))]] = 9 + 6x1 >= 3 + 6x1 = [[ok(add(_x0, _x1))]] [[dbl(ok(_x0))]] = 3 + 2x0 >= 3 + 2x0 = [[ok(dbl(_x0))]] [[first(ok(_x0), ok(_x1))]] = 3 + 2x1 >= 3 + 2x1 = [[ok(first(_x0, _x1))]] 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#(terms(X))) = terms(X) |> X = nu(proper#(X)) nu(proper#(cons(X, Y))) = cons(X, Y) |> X = nu(proper#(X)) nu(proper#(cons(X, Y))) = cons(X, Y) |> Y = nu(proper#(Y)) nu(proper#(recip(X))) = recip(X) |> X = nu(proper#(X)) nu(proper#(sqr(X))) = sqr(X) |> X = nu(proper#(X)) nu(proper#(s(X))) = s(X) |> X = nu(proper#(X)) nu(proper#(add(X, Y))) = add(X, Y) |> X = nu(proper#(X)) nu(proper#(add(X, Y))) = add(X, Y) |> Y = nu(proper#(Y)) nu(proper#(dbl(X))) = dbl(X) |> X = nu(proper#(X)) nu(proper#(first(X, Y))) = first(X, Y) |> X = nu(proper#(X)) nu(proper#(first(X, Y))) = first(X, Y) |> Y = nu(proper#(Y)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_10, R_0, minimal, f) by ({}, R_0, minimal, f). By the empty set processor [Kop12, Thm. 7.15] this problem may be immediately removed. Thus, the original system is terminating if 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(first#) = 1 Thus, we can orient the dependency pairs as follows: nu(first#(mark(X), Y)) = mark(X) |> X = nu(first#(X, Y)) nu(first#(X, mark(Y))) = X = X = nu(first#(X, Y)) nu(first#(ok(X), ok(Y))) = ok(X) |> X = nu(first#(X, Y)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_9, R_0, minimal, f) by (P_13, R_0, minimal, f), where P_13 contains: first#(X, mark(Y)) =#> first#(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), (P_7, R_0, minimal, formative), (P_8, 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(first#) = 2 Thus, we can orient the dependency pairs as follows: nu(first#(X, mark(Y))) = mark(Y) |> Y = nu(first#(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), (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(dbl#) = 1 Thus, we can orient the dependency pairs as follows: nu(dbl#(mark(X))) = mark(X) |> X = nu(dbl#(X)) nu(dbl#(ok(X))) = ok(X) |> X = nu(dbl#(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(add#) = 1 Thus, we can orient the dependency pairs as follows: nu(add#(mark(X), Y)) = mark(X) |> X = nu(add#(X, Y)) nu(add#(X, mark(Y))) = X = X = nu(add#(X, Y)) nu(add#(ok(X), ok(Y))) = ok(X) |> X = nu(add#(X, Y)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_7, R_0, minimal, f) by (P_14, R_0, minimal, f), where P_14 contains: add#(X, mark(Y)) =#> add#(X, Y) Thus, the original system is terminating if each of (P_1, R_0, minimal, formative), (P_2, R_0, minimal, formative), (P_3, R_0, minimal, formative), (P_4, R_0, minimal, formative), (P_5, R_0, minimal, formative), (P_6, 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(add#) = 2 Thus, we can orient the dependency pairs as follows: nu(add#(X, mark(Y))) = mark(Y) |> Y = nu(add#(X, Y)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_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), (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(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_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(sqr#) = 1 Thus, we can orient the dependency pairs as follows: nu(sqr#(mark(X))) = mark(X) |> X = nu(sqr#(X)) nu(sqr#(ok(X))) = ok(X) |> X = nu(sqr#(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(recip#) = 1 Thus, we can orient the dependency pairs as follows: nu(recip#(mark(X))) = mark(X) |> X = nu(recip#(X)) nu(recip#(ok(X))) = ok(X) |> X = nu(recip#(X)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_4, R_0, minimal, f) by ({}, R_0, minimal, f). By the empty set processor [Kop12, Thm. 7.15] this problem may be immediately removed. Thus, the original system is terminating if each of (P_1, R_0, minimal, formative), (P_2, R_0, minimal, formative) and (P_3, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_3, R_0, minimal, formative). We apply the subterm criterion with the following projection function: nu(cons#) = 1 Thus, we can orient the dependency pairs as follows: nu(cons#(mark(X), Y)) = mark(X) |> X = nu(cons#(X, Y)) nu(cons#(ok(X), ok(Y))) = ok(X) |> X = nu(cons#(X, Y)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_3, R_0, minimal, f) by ({}, R_0, minimal, f). By the empty set processor [Kop12, Thm. 7.15] this problem may be immediately removed. Thus, the original system is terminating if each of (P_1, R_0, minimal, formative) and (P_2, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_2, R_0, minimal, formative). We apply the subterm criterion with the following projection function: nu(terms#) = 1 Thus, we can orient the dependency pairs as follows: nu(terms#(mark(X))) = mark(X) |> X = nu(terms#(X)) nu(terms#(ok(X))) = ok(X) |> X = nu(terms#(X)) 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#(terms(X))) = terms(X) |> X = nu(active#(X)) nu(active#(cons(X, Y))) = cons(X, Y) |> X = nu(active#(X)) nu(active#(recip(X))) = recip(X) |> X = nu(active#(X)) nu(active#(sqr(X))) = sqr(X) |> X = nu(active#(X)) nu(active#(s(X))) = s(X) |> X = nu(active#(X)) nu(active#(add(X, Y))) = add(X, Y) |> X = nu(active#(X)) nu(active#(add(X, Y))) = add(X, Y) |> Y = nu(active#(Y)) nu(active#(dbl(X))) = dbl(X) |> X = nu(active#(X)) nu(active#(first(X, Y))) = first(X, Y) |> X = nu(active#(X)) nu(active#(first(X, Y))) = first(X, Y) |> Y = nu(active#(Y)) 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.