YES We show the termination of the TRS R: a__2nd(cons1(X,cons(Y,Z))) -> mark(Y) a__2nd(cons(X,X1)) -> a__2nd(cons1(mark(X),mark(X1))) a__from(X) -> cons(mark(X),from(s(X))) mark(|2nd|(X)) -> a__2nd(mark(X)) mark(from(X)) -> a__from(mark(X)) mark(cons(X1,X2)) -> cons(mark(X1),X2) mark(s(X)) -> s(mark(X)) mark(cons1(X1,X2)) -> cons1(mark(X1),mark(X2)) a__2nd(X) -> |2nd|(X) a__from(X) -> from(X) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: a__2nd#(cons1(X,cons(Y,Z))) -> mark#(Y) p2: a__2nd#(cons(X,X1)) -> a__2nd#(cons1(mark(X),mark(X1))) p3: a__2nd#(cons(X,X1)) -> mark#(X) p4: a__2nd#(cons(X,X1)) -> mark#(X1) p5: a__from#(X) -> mark#(X) p6: mark#(|2nd|(X)) -> a__2nd#(mark(X)) p7: mark#(|2nd|(X)) -> mark#(X) p8: mark#(from(X)) -> a__from#(mark(X)) p9: mark#(from(X)) -> mark#(X) p10: mark#(cons(X1,X2)) -> mark#(X1) p11: mark#(s(X)) -> mark#(X) p12: mark#(cons1(X1,X2)) -> mark#(X1) p13: mark#(cons1(X1,X2)) -> mark#(X2) and R consists of: r1: a__2nd(cons1(X,cons(Y,Z))) -> mark(Y) r2: a__2nd(cons(X,X1)) -> a__2nd(cons1(mark(X),mark(X1))) r3: a__from(X) -> cons(mark(X),from(s(X))) r4: mark(|2nd|(X)) -> a__2nd(mark(X)) r5: mark(from(X)) -> a__from(mark(X)) r6: mark(cons(X1,X2)) -> cons(mark(X1),X2) r7: mark(s(X)) -> s(mark(X)) r8: mark(cons1(X1,X2)) -> cons1(mark(X1),mark(X2)) r9: a__2nd(X) -> |2nd|(X) r10: a__from(X) -> from(X) The estimated dependency graph contains the following SCCs: {p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: a__2nd#(cons1(X,cons(Y,Z))) -> mark#(Y) p2: mark#(cons1(X1,X2)) -> mark#(X2) p3: mark#(cons1(X1,X2)) -> mark#(X1) p4: mark#(s(X)) -> mark#(X) p5: mark#(cons(X1,X2)) -> mark#(X1) p6: mark#(from(X)) -> mark#(X) p7: mark#(from(X)) -> a__from#(mark(X)) p8: a__from#(X) -> mark#(X) p9: mark#(|2nd|(X)) -> mark#(X) p10: mark#(|2nd|(X)) -> a__2nd#(mark(X)) p11: a__2nd#(cons(X,X1)) -> mark#(X1) p12: a__2nd#(cons(X,X1)) -> mark#(X) p13: a__2nd#(cons(X,X1)) -> a__2nd#(cons1(mark(X),mark(X1))) and R consists of: r1: a__2nd(cons1(X,cons(Y,Z))) -> mark(Y) r2: a__2nd(cons(X,X1)) -> a__2nd(cons1(mark(X),mark(X1))) r3: a__from(X) -> cons(mark(X),from(s(X))) r4: mark(|2nd|(X)) -> a__2nd(mark(X)) r5: mark(from(X)) -> a__from(mark(X)) r6: mark(cons(X1,X2)) -> cons(mark(X1),X2) r7: mark(s(X)) -> s(mark(X)) r8: mark(cons1(X1,X2)) -> cons1(mark(X1),mark(X2)) r9: a__2nd(X) -> |2nd|(X) r10: a__from(X) -> from(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__2nd#_A(x1) = max{4, x1 - 1} cons1_A(x1,x2) = max{x1, x2} cons_A(x1,x2) = max{x1 + 7, x2} mark#_A(x1) = max{0, x1 - 2} s_A(x1) = max{1, x1} from_A(x1) = max{9, x1 + 8} a__from#_A(x1) = max{5, x1 + 4} mark_A(x1) = x1 |2nd|_A(x1) = max{6, x1 + 1} a__2nd_A(x1) = max{6, x1 + 1} a__from_A(x1) = max{9, x1 + 8} precedence: cons1 = s = mark = a__2nd = a__from > mark# > from = |2nd| > a__from# > a__2nd# = cons partial status: pi(a__2nd#) = [] pi(cons1) = [2] pi(cons) = [] pi(mark#) = [] pi(s) = [1] pi(from) = [1] pi(a__from#) = [1] pi(mark) = [1] pi(|2nd|) = [1] pi(a__2nd) = [] pi(a__from) = [1] 2. weighted path order base order: max/plus interpretations on natural numbers: a__2nd#_A(x1) = 88 cons1_A(x1,x2) = 30 cons_A(x1,x2) = 34 mark#_A(x1) = 88 s_A(x1) = 32 from_A(x1) = max{43, x1 + 30} a__from#_A(x1) = max{134, x1 + 104} mark_A(x1) = 43 |2nd|_A(x1) = max{88, x1 + 57} a__2nd_A(x1) = 35 a__from_A(x1) = 61 precedence: a__2nd# = |2nd| = a__from > mark# = from = a__from# > mark > cons = s = a__2nd > cons1 partial status: pi(a__2nd#) = [] pi(cons1) = [] pi(cons) = [] pi(mark#) = [] pi(s) = [] pi(from) = [1] pi(a__from#) = [1] pi(mark) = [] pi(|2nd|) = [1] pi(a__2nd) = [] pi(a__from) = [] The next rules are strictly ordered: p1, p7, p8, p10, p11 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: mark#(cons1(X1,X2)) -> mark#(X2) p2: mark#(cons1(X1,X2)) -> mark#(X1) p3: mark#(s(X)) -> mark#(X) p4: mark#(cons(X1,X2)) -> mark#(X1) p5: mark#(from(X)) -> mark#(X) p6: mark#(|2nd|(X)) -> mark#(X) p7: a__2nd#(cons(X,X1)) -> mark#(X) p8: a__2nd#(cons(X,X1)) -> a__2nd#(cons1(mark(X),mark(X1))) and R consists of: r1: a__2nd(cons1(X,cons(Y,Z))) -> mark(Y) r2: a__2nd(cons(X,X1)) -> a__2nd(cons1(mark(X),mark(X1))) r3: a__from(X) -> cons(mark(X),from(s(X))) r4: mark(|2nd|(X)) -> a__2nd(mark(X)) r5: mark(from(X)) -> a__from(mark(X)) r6: mark(cons(X1,X2)) -> cons(mark(X1),X2) r7: mark(s(X)) -> s(mark(X)) r8: mark(cons1(X1,X2)) -> cons1(mark(X1),mark(X2)) r9: a__2nd(X) -> |2nd|(X) r10: a__from(X) -> from(X) The estimated dependency graph contains the following SCCs: {p1, p2, p3, p4, p5, p6} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: mark#(cons1(X1,X2)) -> mark#(X2) p2: mark#(|2nd|(X)) -> mark#(X) p3: mark#(from(X)) -> mark#(X) p4: mark#(cons(X1,X2)) -> mark#(X1) p5: mark#(s(X)) -> mark#(X) p6: mark#(cons1(X1,X2)) -> mark#(X1) and R consists of: r1: a__2nd(cons1(X,cons(Y,Z))) -> mark(Y) r2: a__2nd(cons(X,X1)) -> a__2nd(cons1(mark(X),mark(X1))) r3: a__from(X) -> cons(mark(X),from(s(X))) r4: mark(|2nd|(X)) -> a__2nd(mark(X)) r5: mark(from(X)) -> a__from(mark(X)) r6: mark(cons(X1,X2)) -> cons(mark(X1),X2) r7: mark(s(X)) -> s(mark(X)) r8: mark(cons1(X1,X2)) -> cons1(mark(X1),mark(X2)) r9: a__2nd(X) -> |2nd|(X) r10: a__from(X) -> from(X) The set of usable rules consists of (no rules) Take the monotone reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: mark#_A(x1) = max{2, x1 + 1} cons1_A(x1,x2) = max{x1, x2} |2nd|_A(x1) = max{1, x1} from_A(x1) = max{1, x1} cons_A(x1,x2) = max{x1, x2} s_A(x1) = max{1, x1} precedence: mark# = cons1 = |2nd| = from = cons = s partial status: pi(mark#) = [1] pi(cons1) = [1, 2] pi(|2nd|) = [1] pi(from) = [1] pi(cons) = [1, 2] pi(s) = [1] 2. weighted path order base order: max/plus interpretations on natural numbers: mark#_A(x1) = x1 + 1 cons1_A(x1,x2) = max{x1, x2} |2nd|_A(x1) = x1 from_A(x1) = x1 cons_A(x1,x2) = max{x1, x2} s_A(x1) = x1 precedence: mark# = cons1 = |2nd| = from = cons = s partial status: pi(mark#) = [1] pi(cons1) = [1, 2] pi(|2nd|) = [1] pi(from) = [1] pi(cons) = [1, 2] pi(s) = [1] The next rules are strictly ordered: p1, p2, p3, p4, p5, p6 We remove them from the problem. Then no dependency pair remains.