YES We show the termination of the TRS R: terms(N) -> cons(recip(sqr(N)),n__terms(n__s(N))) sqr(|0|()) -> |0|() sqr(s(X)) -> s(add(sqr(X),dbl(X))) dbl(|0|()) -> |0|() dbl(s(X)) -> s(s(dbl(X))) add(|0|(),X) -> X add(s(X),Y) -> s(add(X,Y)) first(|0|(),X) -> nil() first(s(X),cons(Y,Z)) -> cons(Y,n__first(X,activate(Z))) half(|0|()) -> |0|() half(s(|0|())) -> |0|() half(s(s(X))) -> s(half(X)) half(dbl(X)) -> X terms(X) -> n__terms(X) s(X) -> n__s(X) first(X1,X2) -> n__first(X1,X2) activate(n__terms(X)) -> terms(activate(X)) activate(n__s(X)) -> s(activate(X)) activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) activate(X) -> X -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: terms#(N) -> sqr#(N) p2: sqr#(s(X)) -> s#(add(sqr(X),dbl(X))) p3: sqr#(s(X)) -> add#(sqr(X),dbl(X)) p4: sqr#(s(X)) -> sqr#(X) p5: sqr#(s(X)) -> dbl#(X) p6: dbl#(s(X)) -> s#(s(dbl(X))) p7: dbl#(s(X)) -> s#(dbl(X)) p8: dbl#(s(X)) -> dbl#(X) p9: add#(s(X),Y) -> s#(add(X,Y)) p10: add#(s(X),Y) -> add#(X,Y) p11: first#(s(X),cons(Y,Z)) -> activate#(Z) p12: half#(s(s(X))) -> s#(half(X)) p13: half#(s(s(X))) -> half#(X) p14: activate#(n__terms(X)) -> terms#(activate(X)) p15: activate#(n__terms(X)) -> activate#(X) p16: activate#(n__s(X)) -> s#(activate(X)) p17: activate#(n__s(X)) -> activate#(X) p18: activate#(n__first(X1,X2)) -> first#(activate(X1),activate(X2)) p19: activate#(n__first(X1,X2)) -> activate#(X1) p20: activate#(n__first(X1,X2)) -> activate#(X2) and R consists of: r1: terms(N) -> cons(recip(sqr(N)),n__terms(n__s(N))) r2: sqr(|0|()) -> |0|() r3: sqr(s(X)) -> s(add(sqr(X),dbl(X))) r4: dbl(|0|()) -> |0|() r5: dbl(s(X)) -> s(s(dbl(X))) r6: add(|0|(),X) -> X r7: add(s(X),Y) -> s(add(X,Y)) r8: first(|0|(),X) -> nil() r9: first(s(X),cons(Y,Z)) -> cons(Y,n__first(X,activate(Z))) r10: half(|0|()) -> |0|() r11: half(s(|0|())) -> |0|() r12: half(s(s(X))) -> s(half(X)) r13: half(dbl(X)) -> X r14: terms(X) -> n__terms(X) r15: s(X) -> n__s(X) r16: first(X1,X2) -> n__first(X1,X2) r17: activate(n__terms(X)) -> terms(activate(X)) r18: activate(n__s(X)) -> s(activate(X)) r19: activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) r20: activate(X) -> X The estimated dependency graph contains the following SCCs: {p11, p15, p17, p18, p19, p20} {p4} {p10} {p8} {p13} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: activate#(n__first(X1,X2)) -> activate#(X2) p2: activate#(n__first(X1,X2)) -> activate#(X1) p3: activate#(n__first(X1,X2)) -> first#(activate(X1),activate(X2)) p4: first#(s(X),cons(Y,Z)) -> activate#(Z) p5: activate#(n__s(X)) -> activate#(X) p6: activate#(n__terms(X)) -> activate#(X) and R consists of: r1: terms(N) -> cons(recip(sqr(N)),n__terms(n__s(N))) r2: sqr(|0|()) -> |0|() r3: sqr(s(X)) -> s(add(sqr(X),dbl(X))) r4: dbl(|0|()) -> |0|() r5: dbl(s(X)) -> s(s(dbl(X))) r6: add(|0|(),X) -> X r7: add(s(X),Y) -> s(add(X,Y)) r8: first(|0|(),X) -> nil() r9: first(s(X),cons(Y,Z)) -> cons(Y,n__first(X,activate(Z))) r10: half(|0|()) -> |0|() r11: half(s(|0|())) -> |0|() r12: half(s(s(X))) -> s(half(X)) r13: half(dbl(X)) -> X r14: terms(X) -> n__terms(X) r15: s(X) -> n__s(X) r16: first(X1,X2) -> n__first(X1,X2) r17: activate(n__terms(X)) -> terms(activate(X)) r18: activate(n__s(X)) -> s(activate(X)) r19: activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) r20: activate(X) -> X The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8, r9, r14, r15, r16, r17, r18, r19, r20 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),(1,0)) x1 + (0,7) n__first_A(x1,x2) = ((1,0),(1,1)) x1 + x2 + (5,1) first#_A(x1,x2) = ((0,0),(1,0)) x1 + ((1,0),(0,0)) x2 + (1,8) activate_A(x1) = ((1,0),(1,1)) x1 + (0,3) s_A(x1) = ((1,0),(0,0)) x1 + (0,5) cons_A(x1,x2) = ((1,0),(1,0)) x1 + ((1,0),(0,0)) x2 n__s_A(x1) = ((1,0),(0,0)) x1 + (0,2) n__terms_A(x1) = ((1,0),(1,1)) x1 + (2,7) dbl_A(x1) = (0,6) |0|_A() = (0,1) add_A(x1,x2) = x1 + x2 + (0,1) sqr_A(x1) = ((0,0),(1,0)) x1 + (3,7) terms_A(x1) = ((1,0),(1,1)) x1 + (2,8) recip_A(x1) = (0,1) first_A(x1,x2) = ((1,0),(1,1)) x1 + x2 + (5,2) nil_A() = (0,0) precedence: n__s = dbl = sqr > activate = cons = n__terms = |0| = terms = recip = first = nil > activate# > first# = add > n__first = s partial status: pi(activate#) = [] pi(n__first) = [1, 2] pi(first#) = [] pi(activate) = [1] pi(s) = [] pi(cons) = [] pi(n__s) = [] pi(n__terms) = [1] pi(dbl) = [] pi(|0|) = [] pi(add) = [1] pi(sqr) = [] pi(terms) = [1] pi(recip) = [] pi(first) = [] pi(nil) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: activate#_A(x1) = (0,0) n__first_A(x1,x2) = (0,3) first#_A(x1,x2) = (1,4) activate_A(x1) = ((1,0),(1,1)) x1 s_A(x1) = (2,2) cons_A(x1,x2) = (0,0) n__s_A(x1) = (2,1) n__terms_A(x1) = ((1,0),(0,0)) x1 + (1,0) dbl_A(x1) = (1,4) |0|_A() = (1,0) add_A(x1,x2) = ((1,0),(0,0)) x1 + (3,4) sqr_A(x1) = (2,3) terms_A(x1) = ((1,0),(0,0)) x1 + (4,0) recip_A(x1) = (5,1) first_A(x1,x2) = (0,3) nil_A() = (0,0) precedence: add > dbl > |0| = sqr > activate = nil > recip > first > n__first = s > n__s > terms > first# > activate# = cons = n__terms partial status: pi(activate#) = [] pi(n__first) = [] pi(first#) = [] pi(activate) = [] pi(s) = [] pi(cons) = [] pi(n__s) = [] pi(n__terms) = [] pi(dbl) = [] pi(|0|) = [] pi(add) = [] pi(sqr) = [] pi(terms) = [] pi(recip) = [] pi(first) = [] pi(nil) = [] 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: activate#(n__first(X1,X2)) -> activate#(X2) p2: activate#(n__first(X1,X2)) -> activate#(X1) p3: first#(s(X),cons(Y,Z)) -> activate#(Z) p4: activate#(n__s(X)) -> activate#(X) p5: activate#(n__terms(X)) -> activate#(X) and R consists of: r1: terms(N) -> cons(recip(sqr(N)),n__terms(n__s(N))) r2: sqr(|0|()) -> |0|() r3: sqr(s(X)) -> s(add(sqr(X),dbl(X))) r4: dbl(|0|()) -> |0|() r5: dbl(s(X)) -> s(s(dbl(X))) r6: add(|0|(),X) -> X r7: add(s(X),Y) -> s(add(X,Y)) r8: first(|0|(),X) -> nil() r9: first(s(X),cons(Y,Z)) -> cons(Y,n__first(X,activate(Z))) r10: half(|0|()) -> |0|() r11: half(s(|0|())) -> |0|() r12: half(s(s(X))) -> s(half(X)) r13: half(dbl(X)) -> X r14: terms(X) -> n__terms(X) r15: s(X) -> n__s(X) r16: first(X1,X2) -> n__first(X1,X2) r17: activate(n__terms(X)) -> terms(activate(X)) r18: activate(n__s(X)) -> s(activate(X)) r19: activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) r20: activate(X) -> X The estimated dependency graph contains the following SCCs: {p1, p2, p4, p5} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: activate#(n__first(X1,X2)) -> activate#(X2) p2: activate#(n__terms(X)) -> activate#(X) p3: activate#(n__s(X)) -> activate#(X) p4: activate#(n__first(X1,X2)) -> activate#(X1) and R consists of: r1: terms(N) -> cons(recip(sqr(N)),n__terms(n__s(N))) r2: sqr(|0|()) -> |0|() r3: sqr(s(X)) -> s(add(sqr(X),dbl(X))) r4: dbl(|0|()) -> |0|() r5: dbl(s(X)) -> s(s(dbl(X))) r6: add(|0|(),X) -> X r7: add(s(X),Y) -> s(add(X,Y)) r8: first(|0|(),X) -> nil() r9: first(s(X),cons(Y,Z)) -> cons(Y,n__first(X,activate(Z))) r10: half(|0|()) -> |0|() r11: half(s(|0|())) -> |0|() r12: half(s(s(X))) -> s(half(X)) r13: half(dbl(X)) -> X r14: terms(X) -> n__terms(X) r15: s(X) -> n__s(X) r16: first(X1,X2) -> n__first(X1,X2) r17: activate(n__terms(X)) -> terms(activate(X)) r18: activate(n__s(X)) -> s(activate(X)) r19: activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) r20: 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 n__first_A(x1,x2) = ((1,0),(0,0)) x1 + ((1,0),(1,1)) x2 + (1,1) n__terms_A(x1) = ((1,0),(1,1)) x1 + (1,0) n__s_A(x1) = ((1,0),(0,0)) x1 precedence: activate# = n__first = n__s > n__terms partial status: pi(activate#) = [] pi(n__first) = [] pi(n__terms) = [1] pi(n__s) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: activate#_A(x1) = (0,0) n__first_A(x1,x2) = (1,1) n__terms_A(x1) = ((1,0),(0,0)) x1 + (1,1) n__s_A(x1) = (1,1) precedence: n__terms = n__s > activate# = n__first partial status: pi(activate#) = [] pi(n__first) = [] pi(n__terms) = [] 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: activate#(n__terms(X)) -> activate#(X) p2: activate#(n__s(X)) -> activate#(X) p3: activate#(n__first(X1,X2)) -> activate#(X1) and R consists of: r1: terms(N) -> cons(recip(sqr(N)),n__terms(n__s(N))) r2: sqr(|0|()) -> |0|() r3: sqr(s(X)) -> s(add(sqr(X),dbl(X))) r4: dbl(|0|()) -> |0|() r5: dbl(s(X)) -> s(s(dbl(X))) r6: add(|0|(),X) -> X r7: add(s(X),Y) -> s(add(X,Y)) r8: first(|0|(),X) -> nil() r9: first(s(X),cons(Y,Z)) -> cons(Y,n__first(X,activate(Z))) r10: half(|0|()) -> |0|() r11: half(s(|0|())) -> |0|() r12: half(s(s(X))) -> s(half(X)) r13: half(dbl(X)) -> X r14: terms(X) -> n__terms(X) r15: s(X) -> n__s(X) r16: first(X1,X2) -> n__first(X1,X2) r17: activate(n__terms(X)) -> terms(activate(X)) r18: activate(n__s(X)) -> s(activate(X)) r19: activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) r20: 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: activate#(n__terms(X)) -> activate#(X) p2: activate#(n__first(X1,X2)) -> activate#(X1) p3: activate#(n__s(X)) -> activate#(X) and R consists of: r1: terms(N) -> cons(recip(sqr(N)),n__terms(n__s(N))) r2: sqr(|0|()) -> |0|() r3: sqr(s(X)) -> s(add(sqr(X),dbl(X))) r4: dbl(|0|()) -> |0|() r5: dbl(s(X)) -> s(s(dbl(X))) r6: add(|0|(),X) -> X r7: add(s(X),Y) -> s(add(X,Y)) r8: first(|0|(),X) -> nil() r9: first(s(X),cons(Y,Z)) -> cons(Y,n__first(X,activate(Z))) r10: half(|0|()) -> |0|() r11: half(s(|0|())) -> |0|() r12: half(s(s(X))) -> s(half(X)) r13: half(dbl(X)) -> X r14: terms(X) -> n__terms(X) r15: s(X) -> n__s(X) r16: first(X1,X2) -> n__first(X1,X2) r17: activate(n__terms(X)) -> terms(activate(X)) r18: activate(n__s(X)) -> s(activate(X)) r19: activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) r20: 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 + (2,1) n__terms_A(x1) = ((1,0),(0,0)) x1 + (1,2) n__first_A(x1,x2) = ((1,0),(0,0)) x1 + (3,2) n__s_A(x1) = ((1,0),(0,0)) x1 + (1,0) precedence: n__first = n__s > activate# = n__terms partial status: pi(activate#) = [] pi(n__terms) = [] pi(n__first) = [] pi(n__s) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: activate#_A(x1) = (0,0) n__terms_A(x1) = (1,1) n__first_A(x1,x2) = (1,1) n__s_A(x1) = (1,1) precedence: n__first = n__s > activate# = n__terms partial status: pi(activate#) = [] pi(n__terms) = [] pi(n__first) = [] pi(n__s) = [] 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: activate#(n__terms(X)) -> activate#(X) p2: activate#(n__first(X1,X2)) -> activate#(X1) and R consists of: r1: terms(N) -> cons(recip(sqr(N)),n__terms(n__s(N))) r2: sqr(|0|()) -> |0|() r3: sqr(s(X)) -> s(add(sqr(X),dbl(X))) r4: dbl(|0|()) -> |0|() r5: dbl(s(X)) -> s(s(dbl(X))) r6: add(|0|(),X) -> X r7: add(s(X),Y) -> s(add(X,Y)) r8: first(|0|(),X) -> nil() r9: first(s(X),cons(Y,Z)) -> cons(Y,n__first(X,activate(Z))) r10: half(|0|()) -> |0|() r11: half(s(|0|())) -> |0|() r12: half(s(s(X))) -> s(half(X)) r13: half(dbl(X)) -> X r14: terms(X) -> n__terms(X) r15: s(X) -> n__s(X) r16: first(X1,X2) -> n__first(X1,X2) r17: activate(n__terms(X)) -> terms(activate(X)) r18: activate(n__s(X)) -> s(activate(X)) r19: activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) r20: 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__terms(X)) -> activate#(X) p2: activate#(n__first(X1,X2)) -> activate#(X1) and R consists of: r1: terms(N) -> cons(recip(sqr(N)),n__terms(n__s(N))) r2: sqr(|0|()) -> |0|() r3: sqr(s(X)) -> s(add(sqr(X),dbl(X))) r4: dbl(|0|()) -> |0|() r5: dbl(s(X)) -> s(s(dbl(X))) r6: add(|0|(),X) -> X r7: add(s(X),Y) -> s(add(X,Y)) r8: first(|0|(),X) -> nil() r9: first(s(X),cons(Y,Z)) -> cons(Y,n__first(X,activate(Z))) r10: half(|0|()) -> |0|() r11: half(s(|0|())) -> |0|() r12: half(s(s(X))) -> s(half(X)) r13: half(dbl(X)) -> X r14: terms(X) -> n__terms(X) r15: s(X) -> n__s(X) r16: first(X1,X2) -> n__first(X1,X2) r17: activate(n__terms(X)) -> terms(activate(X)) r18: activate(n__s(X)) -> s(activate(X)) r19: activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) r20: 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),(1,1)) x1 + (1,2) n__terms_A(x1) = ((1,0),(1,1)) x1 + (2,3) n__first_A(x1,x2) = ((1,0),(0,0)) x1 + x2 + (2,1) precedence: n__terms = n__first > activate# partial status: pi(activate#) = [1] pi(n__terms) = [1] pi(n__first) = [2] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: activate#_A(x1) = (0,0) n__terms_A(x1) = (1,1) n__first_A(x1,x2) = x2 + (1,1) precedence: activate# > n__terms = n__first partial status: pi(activate#) = [] pi(n__terms) = [] pi(n__first) = [2] 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: activate#(n__terms(X)) -> activate#(X) and R consists of: r1: terms(N) -> cons(recip(sqr(N)),n__terms(n__s(N))) r2: sqr(|0|()) -> |0|() r3: sqr(s(X)) -> s(add(sqr(X),dbl(X))) r4: dbl(|0|()) -> |0|() r5: dbl(s(X)) -> s(s(dbl(X))) r6: add(|0|(),X) -> X r7: add(s(X),Y) -> s(add(X,Y)) r8: first(|0|(),X) -> nil() r9: first(s(X),cons(Y,Z)) -> cons(Y,n__first(X,activate(Z))) r10: half(|0|()) -> |0|() r11: half(s(|0|())) -> |0|() r12: half(s(s(X))) -> s(half(X)) r13: half(dbl(X)) -> X r14: terms(X) -> n__terms(X) r15: s(X) -> n__s(X) r16: first(X1,X2) -> n__first(X1,X2) r17: activate(n__terms(X)) -> terms(activate(X)) r18: activate(n__s(X)) -> s(activate(X)) r19: activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) r20: activate(X) -> X The estimated dependency graph contains the following SCCs: {p1} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: activate#(n__terms(X)) -> activate#(X) and R consists of: r1: terms(N) -> cons(recip(sqr(N)),n__terms(n__s(N))) r2: sqr(|0|()) -> |0|() r3: sqr(s(X)) -> s(add(sqr(X),dbl(X))) r4: dbl(|0|()) -> |0|() r5: dbl(s(X)) -> s(s(dbl(X))) r6: add(|0|(),X) -> X r7: add(s(X),Y) -> s(add(X,Y)) r8: first(|0|(),X) -> nil() r9: first(s(X),cons(Y,Z)) -> cons(Y,n__first(X,activate(Z))) r10: half(|0|()) -> |0|() r11: half(s(|0|())) -> |0|() r12: half(s(s(X))) -> s(half(X)) r13: half(dbl(X)) -> X r14: terms(X) -> n__terms(X) r15: s(X) -> n__s(X) r16: first(X1,X2) -> n__first(X1,X2) r17: activate(n__terms(X)) -> terms(activate(X)) r18: activate(n__s(X)) -> s(activate(X)) r19: activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) r20: 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),(1,1)) x1 + (2,2) n__terms_A(x1) = ((1,0),(0,0)) x1 + (1,1) precedence: activate# = n__terms partial status: pi(activate#) = [] pi(n__terms) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: activate#_A(x1) = ((1,0),(0,0)) x1 n__terms_A(x1) = (1,1) precedence: n__terms > activate# partial status: pi(activate#) = [] pi(n__terms) = [] 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: sqr#(s(X)) -> sqr#(X) and R consists of: r1: terms(N) -> cons(recip(sqr(N)),n__terms(n__s(N))) r2: sqr(|0|()) -> |0|() r3: sqr(s(X)) -> s(add(sqr(X),dbl(X))) r4: dbl(|0|()) -> |0|() r5: dbl(s(X)) -> s(s(dbl(X))) r6: add(|0|(),X) -> X r7: add(s(X),Y) -> s(add(X,Y)) r8: first(|0|(),X) -> nil() r9: first(s(X),cons(Y,Z)) -> cons(Y,n__first(X,activate(Z))) r10: half(|0|()) -> |0|() r11: half(s(|0|())) -> |0|() r12: half(s(s(X))) -> s(half(X)) r13: half(dbl(X)) -> X r14: terms(X) -> n__terms(X) r15: s(X) -> n__s(X) r16: first(X1,X2) -> n__first(X1,X2) r17: activate(n__terms(X)) -> terms(activate(X)) r18: activate(n__s(X)) -> s(activate(X)) r19: activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) r20: 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: sqr#_A(x1) = ((1,0),(1,1)) x1 + (2,2) s_A(x1) = ((1,0),(0,0)) x1 + (1,1) precedence: sqr# = s partial status: pi(sqr#) = [] pi(s) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: sqr#_A(x1) = ((1,0),(0,0)) x1 s_A(x1) = (1,1) precedence: s > sqr# partial status: pi(sqr#) = [] 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: add#(s(X),Y) -> add#(X,Y) and R consists of: r1: terms(N) -> cons(recip(sqr(N)),n__terms(n__s(N))) r2: sqr(|0|()) -> |0|() r3: sqr(s(X)) -> s(add(sqr(X),dbl(X))) r4: dbl(|0|()) -> |0|() r5: dbl(s(X)) -> s(s(dbl(X))) r6: add(|0|(),X) -> X r7: add(s(X),Y) -> s(add(X,Y)) r8: first(|0|(),X) -> nil() r9: first(s(X),cons(Y,Z)) -> cons(Y,n__first(X,activate(Z))) r10: half(|0|()) -> |0|() r11: half(s(|0|())) -> |0|() r12: half(s(s(X))) -> s(half(X)) r13: half(dbl(X)) -> X r14: terms(X) -> n__terms(X) r15: s(X) -> n__s(X) r16: first(X1,X2) -> n__first(X1,X2) r17: activate(n__terms(X)) -> terms(activate(X)) r18: activate(n__s(X)) -> s(activate(X)) r19: activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) r20: 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: add#_A(x1,x2) = ((1,0),(1,1)) x1 + (1,2) s_A(x1) = ((1,0),(0,0)) x1 + (2,1) precedence: s > add# partial status: pi(add#) = [1] pi(s) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: add#_A(x1,x2) = (1,1) s_A(x1) = (2,2) precedence: add# > s partial status: pi(add#) = [] 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: dbl#(s(X)) -> dbl#(X) and R consists of: r1: terms(N) -> cons(recip(sqr(N)),n__terms(n__s(N))) r2: sqr(|0|()) -> |0|() r3: sqr(s(X)) -> s(add(sqr(X),dbl(X))) r4: dbl(|0|()) -> |0|() r5: dbl(s(X)) -> s(s(dbl(X))) r6: add(|0|(),X) -> X r7: add(s(X),Y) -> s(add(X,Y)) r8: first(|0|(),X) -> nil() r9: first(s(X),cons(Y,Z)) -> cons(Y,n__first(X,activate(Z))) r10: half(|0|()) -> |0|() r11: half(s(|0|())) -> |0|() r12: half(s(s(X))) -> s(half(X)) r13: half(dbl(X)) -> X r14: terms(X) -> n__terms(X) r15: s(X) -> n__s(X) r16: first(X1,X2) -> n__first(X1,X2) r17: activate(n__terms(X)) -> terms(activate(X)) r18: activate(n__s(X)) -> s(activate(X)) r19: activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) r20: 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: dbl#_A(x1) = ((1,0),(1,1)) x1 + (2,2) s_A(x1) = ((1,0),(0,0)) x1 + (1,1) precedence: dbl# = s partial status: pi(dbl#) = [] pi(s) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: dbl#_A(x1) = ((1,0),(0,0)) x1 s_A(x1) = (1,1) precedence: s > dbl# partial status: pi(dbl#) = [] 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: half#(s(s(X))) -> half#(X) and R consists of: r1: terms(N) -> cons(recip(sqr(N)),n__terms(n__s(N))) r2: sqr(|0|()) -> |0|() r3: sqr(s(X)) -> s(add(sqr(X),dbl(X))) r4: dbl(|0|()) -> |0|() r5: dbl(s(X)) -> s(s(dbl(X))) r6: add(|0|(),X) -> X r7: add(s(X),Y) -> s(add(X,Y)) r8: first(|0|(),X) -> nil() r9: first(s(X),cons(Y,Z)) -> cons(Y,n__first(X,activate(Z))) r10: half(|0|()) -> |0|() r11: half(s(|0|())) -> |0|() r12: half(s(s(X))) -> s(half(X)) r13: half(dbl(X)) -> X r14: terms(X) -> n__terms(X) r15: s(X) -> n__s(X) r16: first(X1,X2) -> n__first(X1,X2) r17: activate(n__terms(X)) -> terms(activate(X)) r18: activate(n__s(X)) -> s(activate(X)) r19: activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) r20: 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: half#_A(x1) = x1 + (1,1) s_A(x1) = ((1,0),(1,1)) x1 + (2,2) precedence: half# = s partial status: pi(half#) = [] pi(s) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: half#_A(x1) = ((1,0),(0,0)) x1 s_A(x1) = ((1,0),(1,0)) x1 + (1,1) precedence: s > half# partial status: pi(half#) = [] pi(s) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.