/export/starexec/sandbox2/solver/bin/starexec_run_FirstOrder /export/starexec/sandbox2/benchmark/theBenchmark.xml /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- YES We consider the system theBenchmark. We are asked to determine termination of the following first-order TRS. 0 : [] --> o active : [o] --> o add : [o * o] --> o cons : [o * o] --> o dbl : [o] --> o first : [o * o] --> o half : [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(half(0)) => mark(0) active(half(s(0))) => mark(0) active(half(s(s(X)))) => mark(s(half(X))) active(half(dbl(X))) => mark(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)) active(half(X)) => half(active(X)) 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)) half(mark(X)) => mark(half(X)) 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) proper(half(X)) => half(proper(X)) 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)) half(ok(X)) => ok(half(X)) top(mark(X)) => top(proper(X)) top(ok(X)) => top(active(X)) We use the dependency pair framework as described in [Kop12, Ch. 6/7], with static dependency pairs (see [KusIsoSakBla09] and the adaptation for AFSMs in [Kop12, Ch. 7.8]). We thus obtain the following dependency pair problem (P_0, R_0, minimal, formative): Dependency Pairs P_0: 0] active#(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#(half(s(s(X)))) =#> s#(half(X)) 17] active#(half(s(s(X)))) =#> half#(X) 18] active#(terms(X)) =#> terms#(active(X)) 19] active#(terms(X)) =#> active#(X) 20] active#(cons(X, Y)) =#> cons#(active(X), Y) 21] active#(cons(X, Y)) =#> active#(X) 22] active#(recip(X)) =#> recip#(active(X)) 23] active#(recip(X)) =#> active#(X) 24] active#(sqr(X)) =#> sqr#(active(X)) 25] active#(sqr(X)) =#> active#(X) 26] active#(s(X)) =#> s#(active(X)) 27] active#(s(X)) =#> active#(X) 28] active#(add(X, Y)) =#> add#(active(X), Y) 29] active#(add(X, Y)) =#> active#(X) 30] active#(add(X, Y)) =#> add#(X, active(Y)) 31] active#(add(X, Y)) =#> active#(Y) 32] active#(dbl(X)) =#> dbl#(active(X)) 33] active#(dbl(X)) =#> active#(X) 34] active#(first(X, Y)) =#> first#(active(X), Y) 35] active#(first(X, Y)) =#> active#(X) 36] active#(first(X, Y)) =#> first#(X, active(Y)) 37] active#(first(X, Y)) =#> active#(Y) 38] active#(half(X)) =#> half#(active(X)) 39] active#(half(X)) =#> active#(X) 40] terms#(mark(X)) =#> terms#(X) 41] cons#(mark(X), Y) =#> cons#(X, Y) 42] recip#(mark(X)) =#> recip#(X) 43] sqr#(mark(X)) =#> sqr#(X) 44] s#(mark(X)) =#> s#(X) 45] add#(mark(X), Y) =#> add#(X, Y) 46] add#(X, mark(Y)) =#> add#(X, Y) 47] dbl#(mark(X)) =#> dbl#(X) 48] first#(mark(X), Y) =#> first#(X, Y) 49] first#(X, mark(Y)) =#> first#(X, Y) 50] half#(mark(X)) =#> half#(X) 51] proper#(terms(X)) =#> terms#(proper(X)) 52] proper#(terms(X)) =#> proper#(X) 53] proper#(cons(X, Y)) =#> cons#(proper(X), proper(Y)) 54] proper#(cons(X, Y)) =#> proper#(X) 55] proper#(cons(X, Y)) =#> proper#(Y) 56] proper#(recip(X)) =#> recip#(proper(X)) 57] proper#(recip(X)) =#> proper#(X) 58] proper#(sqr(X)) =#> sqr#(proper(X)) 59] proper#(sqr(X)) =#> proper#(X) 60] proper#(s(X)) =#> s#(proper(X)) 61] proper#(s(X)) =#> proper#(X) 62] proper#(add(X, Y)) =#> add#(proper(X), proper(Y)) 63] proper#(add(X, Y)) =#> proper#(X) 64] proper#(add(X, Y)) =#> proper#(Y) 65] proper#(dbl(X)) =#> dbl#(proper(X)) 66] proper#(dbl(X)) =#> proper#(X) 67] proper#(first(X, Y)) =#> first#(proper(X), proper(Y)) 68] proper#(first(X, Y)) =#> proper#(X) 69] proper#(first(X, Y)) =#> proper#(Y) 70] proper#(half(X)) =#> half#(proper(X)) 71] proper#(half(X)) =#> proper#(X) 72] terms#(ok(X)) =#> terms#(X) 73] cons#(ok(X), ok(Y)) =#> cons#(X, Y) 74] recip#(ok(X)) =#> recip#(X) 75] sqr#(ok(X)) =#> sqr#(X) 76] s#(ok(X)) =#> s#(X) 77] add#(ok(X), ok(Y)) =#> add#(X, Y) 78] dbl#(ok(X)) =#> dbl#(X) 79] first#(ok(X), ok(Y)) =#> first#(X, Y) 80] half#(ok(X)) =#> half#(X) 81] top#(mark(X)) =#> top#(proper(X)) 82] top#(mark(X)) =#> proper#(X) 83] top#(ok(X)) =#> top#(active(X)) 84] 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(half(0)) => mark(0) active(half(s(0))) => mark(0) active(half(s(s(X)))) => mark(s(half(X))) active(half(dbl(X))) => mark(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)) active(half(X)) => half(active(X)) 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)) half(mark(X)) => mark(half(X)) 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) proper(half(X)) => half(proper(X)) 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)) half(ok(X)) => ok(half(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 : 41, 73 * 1 : 42, 74 * 2 : 43, 75 * 3 : 40, 72 * 4 : 44, 76 * 5 : 44, 76 * 6 : 45, 46, 77 * 7 : 43, 75 * 8 : 47, 78 * 9 : 44, 76 * 10 : 44, 76 * 11 : 47, 78 * 12 : 44, 76 * 13 : 45, 46, 77 * 14 : 41, 73 * 15 : 48, 49, 79 * 16 : 44, 76 * 17 : 50, 80 * 18 : 40, 72 * 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, 36, 37, 38, 39 * 20 : 41, 73 * 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, 36, 37, 38, 39 * 22 : 42, 74 * 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, 36, 37, 38, 39 * 24 : 43, 75 * 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, 36, 37, 38, 39 * 26 : 44, 76 * 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, 36, 37, 38, 39 * 28 : 45, 46, 77 * 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, 36, 37, 38, 39 * 30 : 45, 46, 77 * 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, 36, 37, 38, 39 * 32 : 47, 78 * 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, 36, 37, 38, 39 * 34 : 48, 49, 79 * 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, 37, 38, 39 * 36 : 48, 49, 79 * 37 : 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, 37, 38, 39 * 38 : 50, 80 * 39 : 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, 37, 38, 39 * 40 : 40, 72 * 41 : 41, 73 * 42 : 42, 74 * 43 : 43, 75 * 44 : 44, 76 * 45 : 45, 46, 77 * 46 : 45, 46, 77 * 47 : 47, 78 * 48 : 48, 49, 79 * 49 : 48, 49, 79 * 50 : 50, 80 * 51 : 40, 72 * 52 : 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71 * 53 : 41, 73 * 54 : 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71 * 55 : 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71 * 56 : 42, 74 * 57 : 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71 * 58 : 43, 75 * 59 : 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71 * 60 : 44, 76 * 61 : 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71 * 62 : 45, 46, 77 * 63 : 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71 * 64 : 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71 * 65 : 47, 78 * 66 : 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71 * 67 : 48, 49, 79 * 68 : 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71 * 69 : 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71 * 70 : 50, 80 * 71 : 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71 * 72 : 40, 72 * 73 : 41, 73 * 74 : 42, 74 * 75 : 43, 75 * 76 : 44, 76 * 77 : 45, 46, 77 * 78 : 47, 78 * 79 : 48, 49, 79 * 80 : 50, 80 * 81 : 81, 82, 83, 84 * 82 : 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71 * 83 : 81, 82, 83, 84 * 84 : 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, 37, 38, 39 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) active#(half(X)) =#> active#(X) 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: half#(mark(X)) =#> half#(X) half#(ok(X)) =#> half#(X) P_11: 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) proper#(half(X)) =#> proper#(X) P_12: 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), (P_11, R_0, m, f) and (P_12, 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), (P_11, R_0, minimal, formative) and (P_12, R_0, minimal, formative) is finite. We consider the dependency pair problem (P_12, R_0, minimal, formative). The formative rules of (P_12, 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(half(0)) => mark(0) active(half(s(0))) => mark(0) active(half(s(s(X)))) => mark(s(half(X))) active(half(dbl(X))) => mark(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)) active(half(X)) => half(active(X)) 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)) half(mark(X)) => mark(half(X)) 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) proper(half(X)) => half(proper(X)) 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)) half(ok(X)) => ok(half(X)) By [Kop12, Thm. 7.17], we may replace the dependency pair problem (P_12, R_0, minimal, formative) by (P_12, R_1, minimal, formative). Thus, the original system is terminating if 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), (P_11, 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). 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(half(0)) >= mark(0) active(half(s(0))) >= mark(0) active(half(s(s(X)))) >= mark(s(half(X))) active(half(dbl(X))) >= mark(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)) active(half(X)) >= half(active(X)) 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)) half(mark(X)) >= mark(half(X)) 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) proper(half(X)) >= half(proper(X)) 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)) half(ok(X)) >= ok(half(X)) 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, half, mark, recip, s, sqr, terms, top#}, and the following precedence: terms > dbl = sqr > 0 > cons > first > add > s > half = mark = recip > 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)) half(0) >= mark(0) half(s(0)) >= mark(0) half(s(s(X))) >= mark(s(half(X))) half(dbl(X)) >= mark(X) 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) half(X) >= half(X) 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)) half(mark(X)) >= mark(half(X)) 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) _|_ >= _|_ half(X) >= half(X) 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) half(X) >= half(X) With these choices, we have: 1] top#(mark(X)) > top#(X) because [2], by definition 2] top#*(mark(X)) >= top#(X) because top# in Mul and [3], by (Stat) 3] mark(X) > X because [4], by definition 4] mark*(X) >= X because [5], by (Select) 5] X >= X by (Meta) 6] top#(X) >= top#(X) because top# in Mul and [7], by (Fun) 7] X >= X by (Meta) 8] terms(X) >= mark(cons(recip(sqr(X)))) because [9], by (Star) 9] terms*(X) >= mark(cons(recip(sqr(X)))) because terms > mark and [10], by (Copy) 10] terms*(X) >= cons(recip(sqr(X))) because terms > cons and [11], by (Copy) 11] terms*(X) >= recip(sqr(X)) because terms > recip and [12], by (Copy) 12] terms*(X) >= sqr(X) because terms > sqr and [13], by (Copy) 13] terms*(X) >= X because [14], by (Select) 14] X >= X by (Meta) 15] sqr(0) >= mark(0) because [16], by (Star) 16] sqr*(0) >= mark(0) because sqr > mark and [17], by (Copy) 17] sqr*(0) >= 0 because sqr > 0, by (Copy) 18] sqr(s(X)) >= mark(s(add(sqr(X), dbl(X)))) because [19], by (Star) 19] sqr*(s(X)) >= mark(s(add(sqr(X), dbl(X)))) because sqr > mark and [20], by (Copy) 20] sqr*(s(X)) >= s(add(sqr(X), dbl(X))) because sqr > s and [21], by (Copy) 21] sqr*(s(X)) >= add(sqr(X), dbl(X)) because sqr > add, [22] and [25], by (Copy) 22] sqr*(s(X)) >= sqr(X) because sqr in Mul and [23], by (Stat) 23] s(X) > X because [24], by definition 24] s*(X) >= X because [7], by (Select) 25] sqr*(s(X)) >= dbl(X) because sqr = dbl, sqr in Mul and [23], by (Stat) 26] dbl(0) >= mark(0) because [27], by (Star) 27] dbl*(0) >= mark(0) because dbl > mark and [28], by (Copy) 28] dbl*(0) >= 0 because dbl > 0, by (Copy) 29] dbl(s(X)) >= mark(s(s(dbl(X)))) because [30], by (Star) 30] dbl*(s(X)) >= mark(s(s(dbl(X)))) because dbl > mark and [31], by (Copy) 31] dbl*(s(X)) >= s(s(dbl(X))) because dbl > s and [32], by (Copy) 32] dbl*(s(X)) >= s(dbl(X)) because dbl > s and [33], by (Copy) 33] dbl*(s(X)) >= dbl(X) because dbl in Mul and [23], by (Stat) 34] add(0, X) >= mark(X) because [35], by (Star) 35] add*(0, X) >= mark(X) because add > mark and [36], by (Copy) 36] add*(0, X) >= X because [7], by (Select) 37] add(s(X), Y) >= mark(s(add(X, Y))) because [38], by (Star) 38] add*(s(X), Y) >= mark(s(add(X, Y))) because add > mark and [39], by (Copy) 39] add*(s(X), Y) >= s(add(X, Y)) because add > s and [40], by (Copy) 40] add*(s(X), Y) >= add(X, Y) because add in Mul, [23] and [41], by (Stat) 41] Y >= Y by (Meta) 42] first(0, X) >= mark(_|_) because [43], by (Star) 43] first*(0, X) >= mark(_|_) because first > mark and [44], by (Copy) 44] first*(0, X) >= _|_ by (Bot) 45] first(s(X), cons(Y)) >= mark(cons(Y)) because [46], by (Star) 46] first*(s(X), cons(Y)) >= mark(cons(Y)) because first > mark and [47], by (Copy) 47] first*(s(X), cons(Y)) >= cons(Y) because [48], by (Select) 48] cons(Y) >= cons(Y) because cons in Mul and [41], by (Fun) 49] half(0) >= mark(0) because half = mark, half in Mul and [50], by (Fun) 50] 0 >= 0 by (Fun) 51] half(s(0)) >= mark(0) because [52], by (Star) 52] half*(s(0)) >= mark(0) because [53], by (Select) 53] s(0) >= mark(0) because [54], by (Star) 54] s*(0) >= mark(0) because s > mark and [55], by (Copy) 55] s*(0) >= 0 because [50], by (Select) 56] half(s(s(X))) >= mark(s(half(X))) because half = mark, half in Mul and [57], by (Fun) 57] s(s(X)) >= s(half(X)) because s in Mul and [58], by (Fun) 58] s(X) >= half(X) because [59], by (Star) 59] s*(X) >= half(X) because s > half and [24], by (Copy) 60] half(dbl(X)) >= mark(X) because half = mark, half in Mul and [61], by (Fun) 61] dbl(X) >= X because [62], by (Star) 62] dbl*(X) >= X because [7], by (Select) 63] terms(X) >= terms(X) because terms in Mul and [64], by (Fun) 64] X >= X by (Meta) 65] cons(X) >= cons(X) because cons in Mul and [66], by (Fun) 66] X >= X by (Meta) 67] recip(X) >= recip(X) because recip in Mul and [64], by (Fun) 68] sqr(X) >= sqr(X) because sqr in Mul and [64], by (Fun) 69] s(X) >= s(X) because s in Mul and [64], by (Fun) 70] add(X, Y) >= add(X, Y) because add in Mul, [66] and [71], by (Fun) 71] Y >= Y by (Meta) 72] add(X, Y) >= add(X, Y) because add in Mul, [66] and [73], by (Fun) 73] Y >= Y by (Meta) 74] dbl(X) >= dbl(X) because dbl in Mul and [64], by (Fun) 75] first(X, Y) >= first(X, Y) because first in Mul, [66] and [73], by (Fun) 76] first(X, Y) >= first(X, Y) because first in Mul, [66] and [73], by (Fun) 77] half(X) >= half(X) because half in Mul and [64], by (Fun) 78] terms(mark(X)) >= mark(terms(X)) because [79], by (Star) 79] terms*(mark(X)) >= mark(terms(X)) because terms > mark and [80], by (Copy) 80] terms*(mark(X)) >= terms(X) because terms in Mul and [81], by (Stat) 81] mark(X) > X because [4], by definition 82] cons(mark(X)) >= mark(cons(X)) because [83], by (Star) 83] cons*(mark(X)) >= mark(cons(X)) because cons > mark and [84], by (Copy) 84] cons*(mark(X)) >= cons(X) because cons in Mul and [85], by (Stat) 85] mark(X) > X because [86], by definition 86] mark*(X) >= X because [66], by (Select) 87] recip(mark(X)) >= mark(recip(X)) because recip = mark, recip in Mul and [88], by (Fun) 88] mark(X) >= recip(X) because mark = recip, mark in Mul and [64], by (Fun) 89] sqr(mark(X)) >= mark(sqr(X)) because [90], by (Star) 90] sqr*(mark(X)) >= mark(sqr(X)) because sqr > mark and [91], by (Copy) 91] sqr*(mark(X)) >= sqr(X) because sqr in Mul and [81], by (Stat) 92] s(mark(X)) >= mark(s(X)) because [93], by (Star) 93] s*(mark(X)) >= mark(s(X)) because s > mark and [94], by (Copy) 94] s*(mark(X)) >= s(X) because s in Mul and [81], by (Stat) 95] add(mark(X), Y) >= mark(add(X, Y)) because [96], by (Star) 96] add*(mark(X), Y) >= mark(add(X, Y)) because add > mark and [97], by (Copy) 97] add*(mark(X), Y) >= add(X, Y) because add in Mul, [85] and [73], by (Stat) 98] add(X, mark(Y)) >= mark(add(X, Y)) because [99], by (Star) 99] add*(X, mark(Y)) >= mark(add(X, Y)) because add > mark and [100], by (Copy) 100] add*(X, mark(Y)) >= add(X, Y) because add in Mul, [66] and [101], by (Stat) 101] mark(Y) > Y because [102], by definition 102] mark*(Y) >= Y because [73], by (Select) 103] dbl(mark(X)) >= mark(dbl(X)) because [104], by (Star) 104] dbl*(mark(X)) >= mark(dbl(X)) because dbl > mark and [105], by (Copy) 105] dbl*(mark(X)) >= dbl(X) because dbl in Mul and [81], by (Stat) 106] first(mark(X), Y) >= mark(first(X, Y)) because [107], by (Star) 107] first*(mark(X), Y) >= mark(first(X, Y)) because first > mark and [108], by (Copy) 108] first*(mark(X), Y) >= first(X, Y) because first in Mul, [85] and [73], by (Stat) 109] first(X, mark(Y)) >= mark(first(X, Y)) because [110], by (Star) 110] first*(X, mark(Y)) >= mark(first(X, Y)) because first > mark and [111], by (Copy) 111] first*(X, mark(Y)) >= first(X, Y) because first in Mul, [66] and [101], by (Stat) 112] half(mark(X)) >= mark(half(X)) because half = mark, half in Mul and [113], by (Fun) 113] mark(X) >= half(X) because mark = half, mark in Mul and [64], by (Fun) 114] terms(X) >= terms(X) because terms in Mul and [115], by (Fun) 115] X >= X by (Meta) 116] cons(X) >= cons(X) because cons in Mul and [117], by (Fun) 117] X >= X by (Meta) 118] recip(X) >= recip(X) because recip in Mul and [115], by (Fun) 119] sqr(X) >= sqr(X) because sqr in Mul and [115], by (Fun) 120] s(X) >= s(X) because s in Mul and [115], by (Fun) 121] 0 >= 0 by (Fun) 122] add(X, Y) >= add(X, Y) because add in Mul, [117] and [123], by (Fun) 123] Y >= Y by (Meta) 124] dbl(X) >= dbl(X) because dbl in Mul and [115], by (Fun) 125] first(X, Y) >= first(X, Y) because first in Mul, [117] and [123], by (Fun) 126] _|_ >= _|_ by (Bot) 127] half(X) >= half(X) because half in Mul and [115], by (Fun) 128] terms(X) >= terms(X) because terms in Mul and [7], by (Fun) 129] cons(X) >= cons(X) because cons in Mul and [130], by (Fun) 130] X >= X by (Meta) 131] recip(X) >= recip(X) because recip in Mul and [7], by (Fun) 132] sqr(X) >= sqr(X) because sqr in Mul and [7], by (Fun) 133] s(X) >= s(X) because s in Mul and [7], by (Fun) 134] add(X, Y) >= add(X, Y) because add in Mul, [130] and [135], by (Fun) 135] Y >= Y by (Meta) 136] dbl(X) >= dbl(X) because dbl in Mul and [7], by (Fun) 137] first(X, Y) >= first(X, Y) because first in Mul, [130] and [135], by (Fun) 138] half(X) >= half(X) because half in Mul and [7], by (Fun) By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace the dependency pair problem (P_12, R_1, minimal, formative) by (P_13, R_1, minimal, formative), where P_13 consists of: 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), (P_11, R_0, minimal, formative) and (P_13, R_1, minimal, formative) is finite. We consider the dependency pair problem (P_13, R_1, minimal, formative). The formative rules of (P_13, 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)) active(half(X)) => half(active(X)) 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) proper(half(X)) => half(proper(X)) 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)) half(ok(X)) => ok(half(X)) By [Kop12, Thm. 7.17], we may replace the dependency pair problem (P_13, R_1, minimal, formative) by (P_13, 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), (P_11, R_0, minimal, formative) and (P_13, R_2, minimal, formative) is finite. We consider the dependency pair problem (P_13, R_2, minimal, formative). We will use the reduction pair processor with usable rules [Kop12, Thm. 7.44]. The usable rules of (P_13, 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)) active(half(X)) => half(active(X)) 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)) half(ok(X)) => ok(half(X)) 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)) active(half(X)) >= half(active(X)) 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)) half(ok(X)) >= ok(half(X)) We orient these requirements with a polynomial interpretation in the natural numbers. The following interpretation satisfies the requirements: active = \y0.3y0 add = \y0y1.3 + 3y0 + 3y1 cons = \y0y1.3 + y1 + 3y0 dbl = \y0.3 + 3y0 first = \y0y1.y1 half = \y0.3y0 ok = \y0.3 + 3y0 recip = \y0.3 + 3y0 s = \y0.3 + 3y0 sqr = \y0.3y0 terms = \y0.3 + 3y0 top# = \y0.3y0 Using this interpretation, the requirements translate to: [[top#(ok(_x0))]] = 9 + 9x0 > 9x0 = [[top#(active(_x0))]] [[active(terms(_x0))]] = 9 + 9x0 >= 3 + 9x0 = [[terms(active(_x0))]] [[active(cons(_x0, _x1))]] = 9 + 3x1 + 9x0 >= 3 + x1 + 9x0 = [[cons(active(_x0), _x1)]] [[active(recip(_x0))]] = 9 + 9x0 >= 3 + 9x0 = [[recip(active(_x0))]] [[active(sqr(_x0))]] = 9x0 >= 9x0 = [[sqr(active(_x0))]] [[active(s(_x0))]] = 9 + 9x0 >= 3 + 9x0 = [[s(active(_x0))]] [[active(add(_x0, _x1))]] = 9 + 9x0 + 9x1 >= 3 + 3x1 + 9x0 = [[add(active(_x0), _x1)]] [[active(add(_x0, _x1))]] = 9 + 9x0 + 9x1 >= 3 + 3x0 + 9x1 = [[add(_x0, active(_x1))]] [[active(dbl(_x0))]] = 9 + 9x0 >= 3 + 9x0 = [[dbl(active(_x0))]] [[active(first(_x0, _x1))]] = 3x1 >= x1 = [[first(active(_x0), _x1)]] [[active(first(_x0, _x1))]] = 3x1 >= 3x1 = [[first(_x0, active(_x1))]] [[active(half(_x0))]] = 9x0 >= 9x0 = [[half(active(_x0))]] [[terms(ok(_x0))]] = 12 + 9x0 >= 12 + 9x0 = [[ok(terms(_x0))]] [[cons(ok(_x0), ok(_x1))]] = 15 + 3x1 + 9x0 >= 12 + 3x1 + 9x0 = [[ok(cons(_x0, _x1))]] [[recip(ok(_x0))]] = 12 + 9x0 >= 12 + 9x0 = [[ok(recip(_x0))]] [[sqr(ok(_x0))]] = 9 + 9x0 >= 3 + 9x0 = [[ok(sqr(_x0))]] [[s(ok(_x0))]] = 12 + 9x0 >= 12 + 9x0 = [[ok(s(_x0))]] [[add(ok(_x0), ok(_x1))]] = 21 + 9x0 + 9x1 >= 12 + 9x0 + 9x1 = [[ok(add(_x0, _x1))]] [[dbl(ok(_x0))]] = 12 + 9x0 >= 12 + 9x0 = [[ok(dbl(_x0))]] [[first(ok(_x0), ok(_x1))]] = 3 + 3x1 >= 3 + 3x1 = [[ok(first(_x0, _x1))]] [[half(ok(_x0))]] = 9 + 9x0 >= 3 + 9x0 = [[ok(half(_x0))]] By the observations in [Kop12, Sec. 6.6], this reduction pair suffices; we may thus replace a dependency pair problem (P_13, 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), (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). 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)) nu(proper#(half(X))) = half(X) |> X = nu(proper#(X)) By [Kop12, Thm. 7.35], we may replace a dependency pair problem (P_11, R_0, minimal, f) by ({}, R_0, minimal, f). By the empty set processor [Kop12, Thm. 7.15] this problem may be immediately removed. Thus, the original system is terminating if each of (P_1, R_0, minimal, formative), (P_2, R_0, minimal, formative), (P_3, R_0, minimal, formative), (P_4, R_0, minimal, formative), (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(half#) = 1 Thus, we can orient the dependency pairs as follows: nu(half#(mark(X))) = mark(X) |> X = nu(half#(X)) nu(half#(ok(X))) = ok(X) |> X = nu(half#(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(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_14, R_0, minimal, f), where P_14 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_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(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_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), (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_15, R_0, minimal, f), where P_15 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_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(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_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), (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)) nu(active#(half(X))) = half(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.