YES We show the termination of the TRS R: a__f(|0|()) -> cons(|0|(),f(s(|0|()))) a__f(s(|0|())) -> a__f(a__p(s(|0|()))) a__p(s(X)) -> mark(X) mark(f(X)) -> a__f(mark(X)) mark(p(X)) -> a__p(mark(X)) mark(|0|()) -> |0|() mark(cons(X1,X2)) -> cons(mark(X1),X2) mark(s(X)) -> s(mark(X)) a__f(X) -> f(X) a__p(X) -> p(X) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: a__f#(s(|0|())) -> a__f#(a__p(s(|0|()))) p2: a__f#(s(|0|())) -> a__p#(s(|0|())) p3: a__p#(s(X)) -> mark#(X) p4: mark#(f(X)) -> a__f#(mark(X)) p5: mark#(f(X)) -> mark#(X) p6: mark#(p(X)) -> a__p#(mark(X)) p7: mark#(p(X)) -> mark#(X) p8: mark#(cons(X1,X2)) -> mark#(X1) p9: mark#(s(X)) -> mark#(X) and R consists of: r1: a__f(|0|()) -> cons(|0|(),f(s(|0|()))) r2: a__f(s(|0|())) -> a__f(a__p(s(|0|()))) r3: a__p(s(X)) -> mark(X) r4: mark(f(X)) -> a__f(mark(X)) r5: mark(p(X)) -> a__p(mark(X)) r6: mark(|0|()) -> |0|() r7: mark(cons(X1,X2)) -> cons(mark(X1),X2) r8: mark(s(X)) -> s(mark(X)) r9: a__f(X) -> f(X) r10: a__p(X) -> p(X) The estimated dependency graph contains the following SCCs: {p1, p2, p3, p4, p5, p6, p7, p8, p9} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: a__f#(s(|0|())) -> a__f#(a__p(s(|0|()))) p2: a__f#(s(|0|())) -> a__p#(s(|0|())) p3: a__p#(s(X)) -> mark#(X) p4: mark#(s(X)) -> mark#(X) p5: mark#(cons(X1,X2)) -> mark#(X1) p6: mark#(p(X)) -> mark#(X) p7: mark#(p(X)) -> a__p#(mark(X)) p8: mark#(f(X)) -> mark#(X) p9: mark#(f(X)) -> a__f#(mark(X)) and R consists of: r1: a__f(|0|()) -> cons(|0|(),f(s(|0|()))) r2: a__f(s(|0|())) -> a__f(a__p(s(|0|()))) r3: a__p(s(X)) -> mark(X) r4: mark(f(X)) -> a__f(mark(X)) r5: mark(p(X)) -> a__p(mark(X)) r6: mark(|0|()) -> |0|() r7: mark(cons(X1,X2)) -> cons(mark(X1),X2) r8: mark(s(X)) -> s(mark(X)) r9: a__f(X) -> f(X) r10: a__p(X) -> p(X) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8, r9, r10 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: a__f#_A(x1) = x1 + 15 s_A(x1) = x1 + 9 |0|_A = 5 a__p_A(x1) = x1 a__p#_A(x1) = max{0, x1 - 8} mark#_A(x1) = x1 cons_A(x1,x2) = max{27, x1 + 22, x2 - 12} p_A(x1) = x1 mark_A(x1) = x1 + 8 f_A(x1) = max{25, x1 + 23} a__f_A(x1) = max{26, x1 + 23} precedence: a__f# = s = |0| = a__p = a__p# = mark# = cons = p = mark = f = a__f partial status: pi(a__f#) = [] pi(s) = [] pi(|0|) = [] pi(a__p) = [] pi(a__p#) = [] pi(mark#) = [] pi(cons) = [] pi(p) = [] pi(mark) = [] pi(f) = [] pi(a__f) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: a__f#_A(x1) = max{12, x1} s_A(x1) = max{17, x1 - 6} |0|_A = 17 a__p_A(x1) = max{10, x1} a__p#_A(x1) = 13 mark#_A(x1) = max{24, x1 + 5} cons_A(x1,x2) = 23 p_A(x1) = max{9, x1} mark_A(x1) = 24 f_A(x1) = 18 a__f_A(x1) = 24 precedence: mark# > mark > |0| = a__f > f > s > a__f# = a__p = a__p# > cons = p partial status: pi(a__f#) = [1] pi(s) = [] pi(|0|) = [] pi(a__p) = [] pi(a__p#) = [] pi(mark#) = [] pi(cons) = [] pi(p) = [] pi(mark) = [] pi(f) = [] pi(a__f) = [] The next rules are strictly ordered: p1, p3, p4, p5, p8 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: a__f#(s(|0|())) -> a__p#(s(|0|())) p2: mark#(p(X)) -> mark#(X) p3: mark#(p(X)) -> a__p#(mark(X)) p4: mark#(f(X)) -> a__f#(mark(X)) and R consists of: r1: a__f(|0|()) -> cons(|0|(),f(s(|0|()))) r2: a__f(s(|0|())) -> a__f(a__p(s(|0|()))) r3: a__p(s(X)) -> mark(X) r4: mark(f(X)) -> a__f(mark(X)) r5: mark(p(X)) -> a__p(mark(X)) r6: mark(|0|()) -> |0|() r7: mark(cons(X1,X2)) -> cons(mark(X1),X2) r8: mark(s(X)) -> s(mark(X)) r9: a__f(X) -> f(X) r10: a__p(X) -> p(X) The estimated dependency graph contains the following SCCs: {p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: mark#(p(X)) -> mark#(X) and R consists of: r1: a__f(|0|()) -> cons(|0|(),f(s(|0|()))) r2: a__f(s(|0|())) -> a__f(a__p(s(|0|()))) r3: a__p(s(X)) -> mark(X) r4: mark(f(X)) -> a__f(mark(X)) r5: mark(p(X)) -> a__p(mark(X)) r6: mark(|0|()) -> |0|() r7: mark(cons(X1,X2)) -> cons(mark(X1),X2) r8: mark(s(X)) -> s(mark(X)) r9: a__f(X) -> f(X) r10: a__p(X) -> p(X) 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: mark#_A(x1) = max{4, x1 + 3} p_A(x1) = max{3, x1 + 2} precedence: mark# = p partial status: pi(mark#) = [1] pi(p) = [1] 2. weighted path order base order: max/plus interpretations on natural numbers: mark#_A(x1) = max{1, x1 - 1} p_A(x1) = x1 precedence: mark# = p partial status: pi(mark#) = [] pi(p) = [1] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.