YES We show the termination of the TRS R: from(X) -> cons(X,n__from(n__s(X))) |2ndspos|(|0|(),Z) -> rnil() |2ndspos|(s(N),cons(X,n__cons(Y,Z))) -> rcons(posrecip(activate(Y)),|2ndsneg|(N,activate(Z))) |2ndsneg|(|0|(),Z) -> rnil() |2ndsneg|(s(N),cons(X,n__cons(Y,Z))) -> rcons(negrecip(activate(Y)),|2ndspos|(N,activate(Z))) pi(X) -> |2ndspos|(X,from(|0|())) plus(|0|(),Y) -> Y plus(s(X),Y) -> s(plus(X,Y)) times(|0|(),Y) -> |0|() times(s(X),Y) -> plus(Y,times(X,Y)) square(X) -> times(X,X) from(X) -> n__from(X) s(X) -> n__s(X) cons(X1,X2) -> n__cons(X1,X2) activate(n__from(X)) -> from(activate(X)) activate(n__s(X)) -> s(activate(X)) activate(n__cons(X1,X2)) -> cons(activate(X1),X2) activate(X) -> X -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: from#(X) -> cons#(X,n__from(n__s(X))) p2: |2ndspos|#(s(N),cons(X,n__cons(Y,Z))) -> activate#(Y) p3: |2ndspos|#(s(N),cons(X,n__cons(Y,Z))) -> |2ndsneg|#(N,activate(Z)) p4: |2ndspos|#(s(N),cons(X,n__cons(Y,Z))) -> activate#(Z) p5: |2ndsneg|#(s(N),cons(X,n__cons(Y,Z))) -> activate#(Y) p6: |2ndsneg|#(s(N),cons(X,n__cons(Y,Z))) -> |2ndspos|#(N,activate(Z)) p7: |2ndsneg|#(s(N),cons(X,n__cons(Y,Z))) -> activate#(Z) p8: pi#(X) -> |2ndspos|#(X,from(|0|())) p9: pi#(X) -> from#(|0|()) p10: plus#(s(X),Y) -> s#(plus(X,Y)) p11: plus#(s(X),Y) -> plus#(X,Y) p12: times#(s(X),Y) -> plus#(Y,times(X,Y)) p13: times#(s(X),Y) -> times#(X,Y) p14: square#(X) -> times#(X,X) p15: activate#(n__from(X)) -> from#(activate(X)) p16: activate#(n__from(X)) -> activate#(X) p17: activate#(n__s(X)) -> s#(activate(X)) p18: activate#(n__s(X)) -> activate#(X) p19: activate#(n__cons(X1,X2)) -> cons#(activate(X1),X2) p20: activate#(n__cons(X1,X2)) -> activate#(X1) and R consists of: r1: from(X) -> cons(X,n__from(n__s(X))) r2: |2ndspos|(|0|(),Z) -> rnil() r3: |2ndspos|(s(N),cons(X,n__cons(Y,Z))) -> rcons(posrecip(activate(Y)),|2ndsneg|(N,activate(Z))) r4: |2ndsneg|(|0|(),Z) -> rnil() r5: |2ndsneg|(s(N),cons(X,n__cons(Y,Z))) -> rcons(negrecip(activate(Y)),|2ndspos|(N,activate(Z))) r6: pi(X) -> |2ndspos|(X,from(|0|())) r7: plus(|0|(),Y) -> Y r8: plus(s(X),Y) -> s(plus(X,Y)) r9: times(|0|(),Y) -> |0|() r10: times(s(X),Y) -> plus(Y,times(X,Y)) r11: square(X) -> times(X,X) r12: from(X) -> n__from(X) r13: s(X) -> n__s(X) r14: cons(X1,X2) -> n__cons(X1,X2) r15: activate(n__from(X)) -> from(activate(X)) r16: activate(n__s(X)) -> s(activate(X)) r17: activate(n__cons(X1,X2)) -> cons(activate(X1),X2) r18: activate(X) -> X The estimated dependency graph contains the following SCCs: {p3, p6} {p16, p18, p20} {p13} {p11} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: |2ndsneg|#(s(N),cons(X,n__cons(Y,Z))) -> |2ndspos|#(N,activate(Z)) p2: |2ndspos|#(s(N),cons(X,n__cons(Y,Z))) -> |2ndsneg|#(N,activate(Z)) and R consists of: r1: from(X) -> cons(X,n__from(n__s(X))) r2: |2ndspos|(|0|(),Z) -> rnil() r3: |2ndspos|(s(N),cons(X,n__cons(Y,Z))) -> rcons(posrecip(activate(Y)),|2ndsneg|(N,activate(Z))) r4: |2ndsneg|(|0|(),Z) -> rnil() r5: |2ndsneg|(s(N),cons(X,n__cons(Y,Z))) -> rcons(negrecip(activate(Y)),|2ndspos|(N,activate(Z))) r6: pi(X) -> |2ndspos|(X,from(|0|())) r7: plus(|0|(),Y) -> Y r8: plus(s(X),Y) -> s(plus(X,Y)) r9: times(|0|(),Y) -> |0|() r10: times(s(X),Y) -> plus(Y,times(X,Y)) r11: square(X) -> times(X,X) r12: from(X) -> n__from(X) r13: s(X) -> n__s(X) r14: cons(X1,X2) -> n__cons(X1,X2) r15: activate(n__from(X)) -> from(activate(X)) r16: activate(n__s(X)) -> s(activate(X)) r17: activate(n__cons(X1,X2)) -> cons(activate(X1),X2) r18: activate(X) -> X The set of usable rules consists of r1, r12, r13, r14, r15, r16, r17, r18 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: |2ndsneg|#_A(x1,x2) = ((0,0),(1,0)) x1 + (0,4) s_A(x1) = ((1,0),(0,0)) x1 + (5,9) cons_A(x1,x2) = ((1,0),(1,1)) x2 + (2,6) n__cons_A(x1,x2) = ((1,0),(1,1)) x2 + (1,5) |2ndspos|#_A(x1,x2) = ((0,0),(1,0)) x1 activate_A(x1) = x1 + (4,10) from_A(x1) = (3,7) n__from_A(x1) = (0,0) n__s_A(x1) = ((1,0),(0,0)) x1 + (5,8) precedence: n__cons = |2ndspos|# > |2ndsneg|# > s = cons = activate = from = n__from > n__s partial status: pi(|2ndsneg|#) = [] pi(s) = [] pi(cons) = [] pi(n__cons) = [2] pi(|2ndspos|#) = [] pi(activate) = [1] pi(from) = [] pi(n__from) = [] pi(n__s) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: |2ndsneg|#_A(x1,x2) = (2,4) s_A(x1) = (0,0) cons_A(x1,x2) = (1,3) n__cons_A(x1,x2) = ((1,0),(1,1)) x2 + (3,1) |2ndspos|#_A(x1,x2) = (4,5) activate_A(x1) = ((1,0),(1,1)) x1 from_A(x1) = (2,2) n__from_A(x1) = (2,2) n__s_A(x1) = (1,1) precedence: cons = n__cons > activate > from > |2ndsneg|# > s = |2ndspos|# = n__from = n__s partial status: pi(|2ndsneg|#) = [] pi(s) = [] pi(cons) = [] pi(n__cons) = [] pi(|2ndspos|#) = [] pi(activate) = [] pi(from) = [] pi(n__from) = [] pi(n__s) = [] 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: |2ndspos|#(s(N),cons(X,n__cons(Y,Z))) -> |2ndsneg|#(N,activate(Z)) and R consists of: r1: from(X) -> cons(X,n__from(n__s(X))) r2: |2ndspos|(|0|(),Z) -> rnil() r3: |2ndspos|(s(N),cons(X,n__cons(Y,Z))) -> rcons(posrecip(activate(Y)),|2ndsneg|(N,activate(Z))) r4: |2ndsneg|(|0|(),Z) -> rnil() r5: |2ndsneg|(s(N),cons(X,n__cons(Y,Z))) -> rcons(negrecip(activate(Y)),|2ndspos|(N,activate(Z))) r6: pi(X) -> |2ndspos|(X,from(|0|())) r7: plus(|0|(),Y) -> Y r8: plus(s(X),Y) -> s(plus(X,Y)) r9: times(|0|(),Y) -> |0|() r10: times(s(X),Y) -> plus(Y,times(X,Y)) r11: square(X) -> times(X,X) r12: from(X) -> n__from(X) r13: s(X) -> n__s(X) r14: cons(X1,X2) -> n__cons(X1,X2) r15: activate(n__from(X)) -> from(activate(X)) r16: activate(n__s(X)) -> s(activate(X)) r17: activate(n__cons(X1,X2)) -> cons(activate(X1),X2) r18: activate(X) -> X The estimated dependency graph contains the following SCCs: (no SCCs) -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: activate#(n__cons(X1,X2)) -> activate#(X1) p2: activate#(n__s(X)) -> activate#(X) p3: activate#(n__from(X)) -> activate#(X) and R consists of: r1: from(X) -> cons(X,n__from(n__s(X))) r2: |2ndspos|(|0|(),Z) -> rnil() r3: |2ndspos|(s(N),cons(X,n__cons(Y,Z))) -> rcons(posrecip(activate(Y)),|2ndsneg|(N,activate(Z))) r4: |2ndsneg|(|0|(),Z) -> rnil() r5: |2ndsneg|(s(N),cons(X,n__cons(Y,Z))) -> rcons(negrecip(activate(Y)),|2ndspos|(N,activate(Z))) r6: pi(X) -> |2ndspos|(X,from(|0|())) r7: plus(|0|(),Y) -> Y r8: plus(s(X),Y) -> s(plus(X,Y)) r9: times(|0|(),Y) -> |0|() r10: times(s(X),Y) -> plus(Y,times(X,Y)) r11: square(X) -> times(X,X) r12: from(X) -> n__from(X) r13: s(X) -> n__s(X) r14: cons(X1,X2) -> n__cons(X1,X2) r15: activate(n__from(X)) -> from(activate(X)) r16: activate(n__s(X)) -> s(activate(X)) r17: activate(n__cons(X1,X2)) -> cons(activate(X1),X2) r18: activate(X) -> 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: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: activate#_A(x1) = ((1,0),(0,0)) x1 + (1,1) n__cons_A(x1,x2) = x1 + x2 + (2,2) n__s_A(x1) = x1 n__from_A(x1) = x1 precedence: activate# = n__cons = n__s = n__from partial status: pi(activate#) = [] pi(n__cons) = [2] pi(n__s) = [1] pi(n__from) = [1] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: activate#_A(x1) = (0,0) n__cons_A(x1,x2) = x2 + (1,1) n__s_A(x1) = ((1,0),(0,0)) x1 + (1,1) n__from_A(x1) = (1,1) precedence: n__cons = n__from > activate# = n__s partial status: pi(activate#) = [] pi(n__cons) = [2] pi(n__s) = [] pi(n__from) = [] 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__s(X)) -> activate#(X) p2: activate#(n__from(X)) -> activate#(X) and R consists of: r1: from(X) -> cons(X,n__from(n__s(X))) r2: |2ndspos|(|0|(),Z) -> rnil() r3: |2ndspos|(s(N),cons(X,n__cons(Y,Z))) -> rcons(posrecip(activate(Y)),|2ndsneg|(N,activate(Z))) r4: |2ndsneg|(|0|(),Z) -> rnil() r5: |2ndsneg|(s(N),cons(X,n__cons(Y,Z))) -> rcons(negrecip(activate(Y)),|2ndspos|(N,activate(Z))) r6: pi(X) -> |2ndspos|(X,from(|0|())) r7: plus(|0|(),Y) -> Y r8: plus(s(X),Y) -> s(plus(X,Y)) r9: times(|0|(),Y) -> |0|() r10: times(s(X),Y) -> plus(Y,times(X,Y)) r11: square(X) -> times(X,X) r12: from(X) -> n__from(X) r13: s(X) -> n__s(X) r14: cons(X1,X2) -> n__cons(X1,X2) r15: activate(n__from(X)) -> from(activate(X)) r16: activate(n__s(X)) -> s(activate(X)) r17: activate(n__cons(X1,X2)) -> cons(activate(X1),X2) r18: 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: activate#(n__s(X)) -> activate#(X) p2: activate#(n__from(X)) -> activate#(X) and R consists of: r1: from(X) -> cons(X,n__from(n__s(X))) r2: |2ndspos|(|0|(),Z) -> rnil() r3: |2ndspos|(s(N),cons(X,n__cons(Y,Z))) -> rcons(posrecip(activate(Y)),|2ndsneg|(N,activate(Z))) r4: |2ndsneg|(|0|(),Z) -> rnil() r5: |2ndsneg|(s(N),cons(X,n__cons(Y,Z))) -> rcons(negrecip(activate(Y)),|2ndspos|(N,activate(Z))) r6: pi(X) -> |2ndspos|(X,from(|0|())) r7: plus(|0|(),Y) -> Y r8: plus(s(X),Y) -> s(plus(X,Y)) r9: times(|0|(),Y) -> |0|() r10: times(s(X),Y) -> plus(Y,times(X,Y)) r11: square(X) -> times(X,X) r12: from(X) -> n__from(X) r13: s(X) -> n__s(X) r14: cons(X1,X2) -> n__cons(X1,X2) r15: activate(n__from(X)) -> from(activate(X)) r16: activate(n__s(X)) -> s(activate(X)) r17: activate(n__cons(X1,X2)) -> cons(activate(X1),X2) r18: activate(X) -> 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: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: activate#_A(x1) = x1 + (1,2) n__s_A(x1) = x1 + (2,1) n__from_A(x1) = ((1,0),(1,1)) x1 + (2,1) precedence: n__from > activate# = n__s partial status: pi(activate#) = [1] pi(n__s) = [1] pi(n__from) = [1] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: activate#_A(x1) = ((1,0),(1,0)) x1 + (0,2) n__s_A(x1) = ((1,0),(0,0)) x1 + (1,1) n__from_A(x1) = ((1,0),(0,0)) x1 + (1,1) precedence: activate# = n__s = n__from partial status: pi(activate#) = [] pi(n__s) = [] pi(n__from) = [] The next rules are strictly ordered: p1, p2 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: times#(s(X),Y) -> times#(X,Y) and R consists of: r1: from(X) -> cons(X,n__from(n__s(X))) r2: |2ndspos|(|0|(),Z) -> rnil() r3: |2ndspos|(s(N),cons(X,n__cons(Y,Z))) -> rcons(posrecip(activate(Y)),|2ndsneg|(N,activate(Z))) r4: |2ndsneg|(|0|(),Z) -> rnil() r5: |2ndsneg|(s(N),cons(X,n__cons(Y,Z))) -> rcons(negrecip(activate(Y)),|2ndspos|(N,activate(Z))) r6: pi(X) -> |2ndspos|(X,from(|0|())) r7: plus(|0|(),Y) -> Y r8: plus(s(X),Y) -> s(plus(X,Y)) r9: times(|0|(),Y) -> |0|() r10: times(s(X),Y) -> plus(Y,times(X,Y)) r11: square(X) -> times(X,X) r12: from(X) -> n__from(X) r13: s(X) -> n__s(X) r14: cons(X1,X2) -> n__cons(X1,X2) r15: activate(n__from(X)) -> from(activate(X)) r16: activate(n__s(X)) -> s(activate(X)) r17: activate(n__cons(X1,X2)) -> cons(activate(X1),X2) r18: activate(X) -> 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: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: times#_A(x1,x2) = ((1,0),(1,1)) x1 + (1,2) s_A(x1) = ((1,0),(0,0)) x1 + (2,1) precedence: s > times# partial status: pi(times#) = [1] pi(s) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: times#_A(x1,x2) = (1,1) s_A(x1) = (2,2) precedence: times# > s partial status: 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: plus#(s(X),Y) -> plus#(X,Y) and R consists of: r1: from(X) -> cons(X,n__from(n__s(X))) r2: |2ndspos|(|0|(),Z) -> rnil() r3: |2ndspos|(s(N),cons(X,n__cons(Y,Z))) -> rcons(posrecip(activate(Y)),|2ndsneg|(N,activate(Z))) r4: |2ndsneg|(|0|(),Z) -> rnil() r5: |2ndsneg|(s(N),cons(X,n__cons(Y,Z))) -> rcons(negrecip(activate(Y)),|2ndspos|(N,activate(Z))) r6: pi(X) -> |2ndspos|(X,from(|0|())) r7: plus(|0|(),Y) -> Y r8: plus(s(X),Y) -> s(plus(X,Y)) r9: times(|0|(),Y) -> |0|() r10: times(s(X),Y) -> plus(Y,times(X,Y)) r11: square(X) -> times(X,X) r12: from(X) -> n__from(X) r13: s(X) -> n__s(X) r14: cons(X1,X2) -> n__cons(X1,X2) r15: activate(n__from(X)) -> from(activate(X)) r16: activate(n__s(X)) -> s(activate(X)) r17: activate(n__cons(X1,X2)) -> cons(activate(X1),X2) r18: activate(X) -> 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: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: plus#_A(x1,x2) = ((1,0),(1,1)) x1 + (1,2) s_A(x1) = ((1,0),(0,0)) x1 + (2,1) precedence: s > plus# partial status: pi(plus#) = [1] pi(s) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: plus#_A(x1,x2) = (1,1) s_A(x1) = (2,2) precedence: plus# > s partial status: pi(plus#) = [] pi(s) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.