YES We show the termination of the TRS R: app(app(plus(),|0|()),y) -> y app(app(plus(),app(s(),x)),y) -> app(s(),app(app(plus(),x),y)) app(app(times(),|0|()),y) -> |0|() app(app(times(),app(s(),x)),y) -> app(app(plus(),app(app(times(),x),y)),y) app(inc(),xs) -> app(app(map(),app(plus(),app(s(),|0|()))),xs) app(double(),xs) -> app(app(map(),app(times(),app(s(),app(s(),|0|())))),xs) app(app(map(),f),nil()) -> nil() app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs)) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(plus(),app(s(),x)),y) -> app#(s(),app(app(plus(),x),y)) p2: app#(app(plus(),app(s(),x)),y) -> app#(app(plus(),x),y) p3: app#(app(plus(),app(s(),x)),y) -> app#(plus(),x) p4: app#(app(times(),app(s(),x)),y) -> app#(app(plus(),app(app(times(),x),y)),y) p5: app#(app(times(),app(s(),x)),y) -> app#(plus(),app(app(times(),x),y)) p6: app#(app(times(),app(s(),x)),y) -> app#(app(times(),x),y) p7: app#(app(times(),app(s(),x)),y) -> app#(times(),x) p8: app#(inc(),xs) -> app#(app(map(),app(plus(),app(s(),|0|()))),xs) p9: app#(inc(),xs) -> app#(map(),app(plus(),app(s(),|0|()))) p10: app#(inc(),xs) -> app#(plus(),app(s(),|0|())) p11: app#(inc(),xs) -> app#(s(),|0|()) p12: app#(double(),xs) -> app#(app(map(),app(times(),app(s(),app(s(),|0|())))),xs) p13: app#(double(),xs) -> app#(map(),app(times(),app(s(),app(s(),|0|())))) p14: app#(double(),xs) -> app#(times(),app(s(),app(s(),|0|()))) p15: app#(double(),xs) -> app#(s(),app(s(),|0|())) p16: app#(double(),xs) -> app#(s(),|0|()) p17: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(app(cons(),app(f,x)),app(app(map(),f),xs)) p18: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(cons(),app(f,x)) p19: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(f,x) p20: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(app(map(),f),xs) and R consists of: r1: app(app(plus(),|0|()),y) -> y r2: app(app(plus(),app(s(),x)),y) -> app(s(),app(app(plus(),x),y)) r3: app(app(times(),|0|()),y) -> |0|() r4: app(app(times(),app(s(),x)),y) -> app(app(plus(),app(app(times(),x),y)),y) r5: app(inc(),xs) -> app(app(map(),app(plus(),app(s(),|0|()))),xs) r6: app(double(),xs) -> app(app(map(),app(times(),app(s(),app(s(),|0|())))),xs) r7: app(app(map(),f),nil()) -> nil() r8: app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs)) The estimated dependency graph contains the following SCCs: {p8, p12, p19, p20} {p6} {p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(f,x) p2: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(app(map(),f),xs) p3: app#(double(),xs) -> app#(app(map(),app(times(),app(s(),app(s(),|0|())))),xs) p4: app#(inc(),xs) -> app#(app(map(),app(plus(),app(s(),|0|()))),xs) and R consists of: r1: app(app(plus(),|0|()),y) -> y r2: app(app(plus(),app(s(),x)),y) -> app(s(),app(app(plus(),x),y)) r3: app(app(times(),|0|()),y) -> |0|() r4: app(app(times(),app(s(),x)),y) -> app(app(plus(),app(app(times(),x),y)),y) r5: app(inc(),xs) -> app(app(map(),app(plus(),app(s(),|0|()))),xs) r6: app(double(),xs) -> app(app(map(),app(times(),app(s(),app(s(),|0|())))),xs) r7: app(app(map(),f),nil()) -> nil() r8: app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs)) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: app#_A(x1,x2) = max{x1 + 2, x2 + 40} app_A(x1,x2) = max{27, x1 + 14, x2 + 4} map_A = 17 cons_A = 18 double_A = 60 times_A = 41 s_A = 17 |0|_A = 1 inc_A = 39 plus_A = 1 precedence: cons = double = s > times = inc > app# = app = map = |0| = plus partial status: pi(app#) = [1, 2] pi(app) = [1, 2] pi(map) = [] pi(cons) = [] pi(double) = [] pi(times) = [] pi(s) = [] pi(|0|) = [] pi(inc) = [] pi(plus) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: app#_A(x1,x2) = x1 + 34 app_A(x1,x2) = max{x1 - 14, x2 + 4} map_A = 36 cons_A = 35 double_A = 23 times_A = 32 s_A = 24 |0|_A = 2 inc_A = 23 plus_A = 32 precedence: app# = map > |0| > app = cons = double = times = s = inc = plus partial status: pi(app#) = [1] pi(app) = [] pi(map) = [] pi(cons) = [] pi(double) = [] pi(times) = [] pi(s) = [] pi(|0|) = [] pi(inc) = [] pi(plus) = [] The next rules are strictly ordered: p1, p2, p3, p4 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(times(),app(s(),x)),y) -> app#(app(times(),x),y) and R consists of: r1: app(app(plus(),|0|()),y) -> y r2: app(app(plus(),app(s(),x)),y) -> app(s(),app(app(plus(),x),y)) r3: app(app(times(),|0|()),y) -> |0|() r4: app(app(times(),app(s(),x)),y) -> app(app(plus(),app(app(times(),x),y)),y) r5: app(inc(),xs) -> app(app(map(),app(plus(),app(s(),|0|()))),xs) r6: app(double(),xs) -> app(app(map(),app(times(),app(s(),app(s(),|0|())))),xs) r7: app(app(map(),f),nil()) -> nil() r8: app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs)) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: app#_A(x1,x2) = max{x1 + 3, x2 + 4} app_A(x1,x2) = max{x1 + 1, x2 + 3} times_A = 2 s_A = 3 precedence: app# = app = times = s partial status: pi(app#) = [1, 2] pi(app) = [1, 2] pi(times) = [] pi(s) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: app#_A(x1,x2) = max{x1 - 9, x2 + 3} app_A(x1,x2) = max{x1 + 2, x2 + 4} times_A = 2 s_A = 6 precedence: app# = app = times = s partial status: pi(app#) = [] pi(app) = [1, 2] pi(times) = [] pi(s) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: app#(app(plus(),app(s(),x)),y) -> app#(app(plus(),x),y) and R consists of: r1: app(app(plus(),|0|()),y) -> y r2: app(app(plus(),app(s(),x)),y) -> app(s(),app(app(plus(),x),y)) r3: app(app(times(),|0|()),y) -> |0|() r4: app(app(times(),app(s(),x)),y) -> app(app(plus(),app(app(times(),x),y)),y) r5: app(inc(),xs) -> app(app(map(),app(plus(),app(s(),|0|()))),xs) r6: app(double(),xs) -> app(app(map(),app(times(),app(s(),app(s(),|0|())))),xs) r7: app(app(map(),f),nil()) -> nil() r8: app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs)) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: app#_A(x1,x2) = max{x1 + 2, x2 + 3} app_A(x1,x2) = max{x1, x2 + 3} plus_A = 2 s_A = 3 precedence: app# = app = plus = s partial status: pi(app#) = [1, 2] pi(app) = [1, 2] pi(plus) = [] pi(s) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: app#_A(x1,x2) = max{x1 - 9, x2 + 3} app_A(x1,x2) = max{x1 + 2, x2 + 4} plus_A = 2 s_A = 6 precedence: app# = app = plus = s partial status: pi(app#) = [] pi(app) = [1, 2] pi(plus) = [] pi(s) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.