YES We show the termination of the TRS R: fst(|0|(),Z) -> nil() fst(s(X),cons(Y,Z)) -> cons(Y,n__fst(activate(X),activate(Z))) from(X) -> cons(X,n__from(s(X))) add(|0|(),X) -> X add(s(X),Y) -> s(n__add(activate(X),Y)) len(nil()) -> |0|() len(cons(X,Z)) -> s(n__len(activate(Z))) fst(X1,X2) -> n__fst(X1,X2) from(X) -> n__from(X) add(X1,X2) -> n__add(X1,X2) len(X) -> n__len(X) activate(n__fst(X1,X2)) -> fst(X1,X2) activate(n__from(X)) -> from(X) activate(n__add(X1,X2)) -> add(X1,X2) activate(n__len(X)) -> len(X) activate(X) -> X -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: fst#(s(X),cons(Y,Z)) -> activate#(X) p2: fst#(s(X),cons(Y,Z)) -> activate#(Z) p3: add#(s(X),Y) -> activate#(X) p4: len#(cons(X,Z)) -> activate#(Z) p5: activate#(n__fst(X1,X2)) -> fst#(X1,X2) p6: activate#(n__from(X)) -> from#(X) p7: activate#(n__add(X1,X2)) -> add#(X1,X2) p8: activate#(n__len(X)) -> len#(X) and R consists of: r1: fst(|0|(),Z) -> nil() r2: fst(s(X),cons(Y,Z)) -> cons(Y,n__fst(activate(X),activate(Z))) r3: from(X) -> cons(X,n__from(s(X))) r4: add(|0|(),X) -> X r5: add(s(X),Y) -> s(n__add(activate(X),Y)) r6: len(nil()) -> |0|() r7: len(cons(X,Z)) -> s(n__len(activate(Z))) r8: fst(X1,X2) -> n__fst(X1,X2) r9: from(X) -> n__from(X) r10: add(X1,X2) -> n__add(X1,X2) r11: len(X) -> n__len(X) r12: activate(n__fst(X1,X2)) -> fst(X1,X2) r13: activate(n__from(X)) -> from(X) r14: activate(n__add(X1,X2)) -> add(X1,X2) r15: activate(n__len(X)) -> len(X) r16: activate(X) -> X The estimated dependency graph contains the following SCCs: {p1, p2, p3, p4, p5, p7, p8} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: fst#(s(X),cons(Y,Z)) -> activate#(X) p2: activate#(n__len(X)) -> len#(X) p3: len#(cons(X,Z)) -> activate#(Z) p4: activate#(n__add(X1,X2)) -> add#(X1,X2) p5: add#(s(X),Y) -> activate#(X) p6: activate#(n__fst(X1,X2)) -> fst#(X1,X2) p7: fst#(s(X),cons(Y,Z)) -> activate#(Z) and R consists of: r1: fst(|0|(),Z) -> nil() r2: fst(s(X),cons(Y,Z)) -> cons(Y,n__fst(activate(X),activate(Z))) r3: from(X) -> cons(X,n__from(s(X))) r4: add(|0|(),X) -> X r5: add(s(X),Y) -> s(n__add(activate(X),Y)) r6: len(nil()) -> |0|() r7: len(cons(X,Z)) -> s(n__len(activate(Z))) r8: fst(X1,X2) -> n__fst(X1,X2) r9: from(X) -> n__from(X) r10: add(X1,X2) -> n__add(X1,X2) r11: len(X) -> n__len(X) r12: activate(n__fst(X1,X2)) -> fst(X1,X2) r13: activate(n__from(X)) -> from(X) r14: activate(n__add(X1,X2)) -> add(X1,X2) r15: activate(n__len(X)) -> len(X) r16: activate(X) -> X The set of usable rules consists of (no rules) Take the reduction pair: max/plus interpretations on natural numbers: fst#_A(x1,x2) = max{x1 + 2, x2 + 2} s_A(x1) = x1 cons_A(x1,x2) = max{x1, x2} activate#_A(x1) = x1 + 2 n__len_A(x1) = x1 len#_A(x1) = x1 + 2 n__add_A(x1,x2) = max{x1 + 1, x2 + 1} add#_A(x1,x2) = max{x1 + 3, x2 + 3} n__fst_A(x1,x2) = max{x1, x2} The next rules are strictly ordered: p5 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: fst#(s(X),cons(Y,Z)) -> activate#(X) p2: activate#(n__len(X)) -> len#(X) p3: len#(cons(X,Z)) -> activate#(Z) p4: activate#(n__add(X1,X2)) -> add#(X1,X2) p5: activate#(n__fst(X1,X2)) -> fst#(X1,X2) p6: fst#(s(X),cons(Y,Z)) -> activate#(Z) and R consists of: r1: fst(|0|(),Z) -> nil() r2: fst(s(X),cons(Y,Z)) -> cons(Y,n__fst(activate(X),activate(Z))) r3: from(X) -> cons(X,n__from(s(X))) r4: add(|0|(),X) -> X r5: add(s(X),Y) -> s(n__add(activate(X),Y)) r6: len(nil()) -> |0|() r7: len(cons(X,Z)) -> s(n__len(activate(Z))) r8: fst(X1,X2) -> n__fst(X1,X2) r9: from(X) -> n__from(X) r10: add(X1,X2) -> n__add(X1,X2) r11: len(X) -> n__len(X) r12: activate(n__fst(X1,X2)) -> fst(X1,X2) r13: activate(n__from(X)) -> from(X) r14: activate(n__add(X1,X2)) -> add(X1,X2) r15: activate(n__len(X)) -> len(X) r16: activate(X) -> X The estimated dependency graph contains the following SCCs: {p1, p2, p3, p5, p6} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: fst#(s(X),cons(Y,Z)) -> activate#(X) p2: activate#(n__fst(X1,X2)) -> fst#(X1,X2) p3: fst#(s(X),cons(Y,Z)) -> activate#(Z) p4: activate#(n__len(X)) -> len#(X) p5: len#(cons(X,Z)) -> activate#(Z) and R consists of: r1: fst(|0|(),Z) -> nil() r2: fst(s(X),cons(Y,Z)) -> cons(Y,n__fst(activate(X),activate(Z))) r3: from(X) -> cons(X,n__from(s(X))) r4: add(|0|(),X) -> X r5: add(s(X),Y) -> s(n__add(activate(X),Y)) r6: len(nil()) -> |0|() r7: len(cons(X,Z)) -> s(n__len(activate(Z))) r8: fst(X1,X2) -> n__fst(X1,X2) r9: from(X) -> n__from(X) r10: add(X1,X2) -> n__add(X1,X2) r11: len(X) -> n__len(X) r12: activate(n__fst(X1,X2)) -> fst(X1,X2) r13: activate(n__from(X)) -> from(X) r14: activate(n__add(X1,X2)) -> add(X1,X2) r15: activate(n__len(X)) -> len(X) r16: activate(X) -> X The set of usable rules consists of (no rules) Take the reduction pair: max/plus interpretations on natural numbers: fst#_A(x1,x2) = max{x1, x2 + 2} s_A(x1) = x1 + 2 cons_A(x1,x2) = max{x1 + 2, x2 + 2} activate#_A(x1) = x1 + 2 n__fst_A(x1,x2) = max{x1 - 1, x2} n__len_A(x1) = x1 len#_A(x1) = max{2, x1} The next rules are strictly ordered: p3 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: fst#(s(X),cons(Y,Z)) -> activate#(X) p2: activate#(n__fst(X1,X2)) -> fst#(X1,X2) p3: activate#(n__len(X)) -> len#(X) p4: len#(cons(X,Z)) -> activate#(Z) and R consists of: r1: fst(|0|(),Z) -> nil() r2: fst(s(X),cons(Y,Z)) -> cons(Y,n__fst(activate(X),activate(Z))) r3: from(X) -> cons(X,n__from(s(X))) r4: add(|0|(),X) -> X r5: add(s(X),Y) -> s(n__add(activate(X),Y)) r6: len(nil()) -> |0|() r7: len(cons(X,Z)) -> s(n__len(activate(Z))) r8: fst(X1,X2) -> n__fst(X1,X2) r9: from(X) -> n__from(X) r10: add(X1,X2) -> n__add(X1,X2) r11: len(X) -> n__len(X) r12: activate(n__fst(X1,X2)) -> fst(X1,X2) r13: activate(n__from(X)) -> from(X) r14: activate(n__add(X1,X2)) -> add(X1,X2) r15: activate(n__len(X)) -> len(X) r16: activate(X) -> X The estimated dependency graph contains the following SCCs: {p1, p2, p3, p4} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: fst#(s(X),cons(Y,Z)) -> activate#(X) p2: activate#(n__len(X)) -> len#(X) p3: len#(cons(X,Z)) -> activate#(Z) p4: activate#(n__fst(X1,X2)) -> fst#(X1,X2) and R consists of: r1: fst(|0|(),Z) -> nil() r2: fst(s(X),cons(Y,Z)) -> cons(Y,n__fst(activate(X),activate(Z))) r3: from(X) -> cons(X,n__from(s(X))) r4: add(|0|(),X) -> X r5: add(s(X),Y) -> s(n__add(activate(X),Y)) r6: len(nil()) -> |0|() r7: len(cons(X,Z)) -> s(n__len(activate(Z))) r8: fst(X1,X2) -> n__fst(X1,X2) r9: from(X) -> n__from(X) r10: add(X1,X2) -> n__add(X1,X2) r11: len(X) -> n__len(X) r12: activate(n__fst(X1,X2)) -> fst(X1,X2) r13: activate(n__from(X)) -> from(X) r14: activate(n__add(X1,X2)) -> add(X1,X2) r15: activate(n__len(X)) -> len(X) r16: activate(X) -> X The set of usable rules consists of (no rules) Take the reduction pair: max/plus interpretations on natural numbers: fst#_A(x1,x2) = x1 + 3 s_A(x1) = max{0, x1 - 1} cons_A(x1,x2) = max{x1, x2 + 1} activate#_A(x1) = x1 + 2 n__len_A(x1) = x1 len#_A(x1) = x1 + 2 n__fst_A(x1,x2) = max{x1 + 1, x2 + 1} The next rules are strictly ordered: p3 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: fst#(s(X),cons(Y,Z)) -> activate#(X) p2: activate#(n__len(X)) -> len#(X) p3: activate#(n__fst(X1,X2)) -> fst#(X1,X2) and R consists of: r1: fst(|0|(),Z) -> nil() r2: fst(s(X),cons(Y,Z)) -> cons(Y,n__fst(activate(X),activate(Z))) r3: from(X) -> cons(X,n__from(s(X))) r4: add(|0|(),X) -> X r5: add(s(X),Y) -> s(n__add(activate(X),Y)) r6: len(nil()) -> |0|() r7: len(cons(X,Z)) -> s(n__len(activate(Z))) r8: fst(X1,X2) -> n__fst(X1,X2) r9: from(X) -> n__from(X) r10: add(X1,X2) -> n__add(X1,X2) r11: len(X) -> n__len(X) r12: activate(n__fst(X1,X2)) -> fst(X1,X2) r13: activate(n__from(X)) -> from(X) r14: activate(n__add(X1,X2)) -> add(X1,X2) r15: activate(n__len(X)) -> len(X) r16: activate(X) -> X The estimated dependency graph contains the following SCCs: {p1, p3} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: fst#(s(X),cons(Y,Z)) -> activate#(X) p2: activate#(n__fst(X1,X2)) -> fst#(X1,X2) and R consists of: r1: fst(|0|(),Z) -> nil() r2: fst(s(X),cons(Y,Z)) -> cons(Y,n__fst(activate(X),activate(Z))) r3: from(X) -> cons(X,n__from(s(X))) r4: add(|0|(),X) -> X r5: add(s(X),Y) -> s(n__add(activate(X),Y)) r6: len(nil()) -> |0|() r7: len(cons(X,Z)) -> s(n__len(activate(Z))) r8: fst(X1,X2) -> n__fst(X1,X2) r9: from(X) -> n__from(X) r10: add(X1,X2) -> n__add(X1,X2) r11: len(X) -> n__len(X) r12: activate(n__fst(X1,X2)) -> fst(X1,X2) r13: activate(n__from(X)) -> from(X) r14: activate(n__add(X1,X2)) -> add(X1,X2) r15: activate(n__len(X)) -> len(X) r16: activate(X) -> X The set of usable rules consists of (no rules) Take the reduction pair: max/plus interpretations on natural numbers: fst#_A(x1,x2) = x1 + 1 s_A(x1) = x1 + 3 cons_A(x1,x2) = max{x1, x2} activate#_A(x1) = max{3, x1} n__fst_A(x1,x2) = max{x1 + 1, x2 + 1} The next rules are strictly ordered: p1 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: activate#(n__fst(X1,X2)) -> fst#(X1,X2) and R consists of: r1: fst(|0|(),Z) -> nil() r2: fst(s(X),cons(Y,Z)) -> cons(Y,n__fst(activate(X),activate(Z))) r3: from(X) -> cons(X,n__from(s(X))) r4: add(|0|(),X) -> X r5: add(s(X),Y) -> s(n__add(activate(X),Y)) r6: len(nil()) -> |0|() r7: len(cons(X,Z)) -> s(n__len(activate(Z))) r8: fst(X1,X2) -> n__fst(X1,X2) r9: from(X) -> n__from(X) r10: add(X1,X2) -> n__add(X1,X2) r11: len(X) -> n__len(X) r12: activate(n__fst(X1,X2)) -> fst(X1,X2) r13: activate(n__from(X)) -> from(X) r14: activate(n__add(X1,X2)) -> add(X1,X2) r15: activate(n__len(X)) -> len(X) r16: activate(X) -> X The estimated dependency graph contains the following SCCs: (no SCCs)