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: weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: fst#_A(x1,x2) = ((1,0),(1,0)) x1 + ((1,0),(1,0)) x2 + (1,2) s_A(x1) = ((1,0),(1,1)) x1 + (3,1) cons_A(x1,x2) = ((1,0),(0,0)) x2 + (3,1) activate#_A(x1) = ((1,0),(1,0)) x1 + (2,2) n__len_A(x1) = ((1,0),(1,1)) x1 + (2,0) len#_A(x1) = x1 + (1,5) n__add_A(x1,x2) = x1 + x2 + (1,0) add#_A(x1,x2) = ((1,0),(1,1)) x1 + x2 + (2,1) n__fst_A(x1,x2) = ((1,0),(0,0)) x1 + ((1,0),(0,0)) x2 + (2,1) precedence: fst# = cons = activate# = len# = n__add = add# = n__fst > s > n__len partial status: pi(fst#) = [] pi(s) = [] pi(cons) = [] pi(activate#) = [] pi(n__len) = [] pi(len#) = [] pi(n__add) = [] pi(add#) = [] pi(n__fst) = [] 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__add(X1,X2)) -> add#(X1,X2) p4: add#(s(X),Y) -> activate#(X) 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, p3, p4, 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__add(X1,X2)) -> add#(X1,X2) p5: add#(s(X),Y) -> activate#(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 set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: fst#_A(x1,x2) = ((1,0),(0,0)) x1 + x2 + (1,1) s_A(x1) = ((1,0),(1,1)) x1 + (2,3) cons_A(x1,x2) = ((1,0),(1,1)) x2 + (2,3) activate#_A(x1) = x1 + (1,2) n__fst_A(x1,x2) = ((1,0),(1,1)) x1 + ((1,0),(1,1)) x2 + (2,2) n__add_A(x1,x2) = ((1,0),(1,1)) x1 + (2,1) add#_A(x1,x2) = ((1,0),(1,1)) x1 + (1,2) precedence: n__add > fst# = activate# = n__fst > add# > s = cons partial status: pi(fst#) = [] pi(s) = [1] pi(cons) = [] pi(activate#) = [] pi(n__fst) = [2] pi(n__add) = [1] pi(add#) = [1] The next rules are strictly ordered: p4 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: fst#(s(X),cons(Y,Z)) -> activate#(Z) p4: add#(s(X),Y) -> activate#(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} -- 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) 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: weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: fst#_A(x1,x2) = ((1,0),(1,0)) x1 + ((1,0),(1,0)) x2 s_A(x1) = ((1,0),(0,0)) x1 + (3,1) cons_A(x1,x2) = ((1,0),(0,0)) x2 + (0,3) activate#_A(x1) = ((1,0),(1,0)) x1 + (1,2) n__fst_A(x1,x2) = ((1,0),(0,0)) x1 + ((1,0),(0,0)) x2 + (1,1) precedence: fst# = s = cons = activate# = n__fst partial status: pi(fst#) = [] pi(s) = [] pi(cons) = [] pi(activate#) = [] pi(n__fst) = [] 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) 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} -- 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: weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: fst#_A(x1,x2) = ((1,0),(1,1)) x1 s_A(x1) = x1 cons_A(x1,x2) = ((0,0),(1,0)) x1 + ((1,0),(1,1)) x2 + (1,1) activate#_A(x1) = x1 n__fst_A(x1,x2) = ((1,0),(1,1)) x1 + ((0,0),(1,0)) x2 precedence: s = cons > fst# = n__fst > activate# partial status: pi(fst#) = [1] pi(s) = [1] pi(cons) = [2] pi(activate#) = [1] pi(n__fst) = [1] The next rules are strictly ordered: p2 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) 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)