YES We show the termination of the TRS R: and(true(),X) -> activate(X) and(false(),Y) -> false() if(true(),X,Y) -> activate(X) if(false(),X,Y) -> activate(Y) add(|0|(),X) -> activate(X) add(s(X),Y) -> s(n__add(activate(X),activate(Y))) first(|0|(),X) -> nil() first(s(X),cons(Y,Z)) -> cons(activate(Y),n__first(activate(X),activate(Z))) from(X) -> cons(activate(X),n__from(n__s(activate(X)))) add(X1,X2) -> n__add(X1,X2) first(X1,X2) -> n__first(X1,X2) from(X) -> n__from(X) s(X) -> n__s(X) activate(n__add(X1,X2)) -> add(activate(X1),X2) activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) activate(n__from(X)) -> from(X) activate(n__s(X)) -> s(X) activate(X) -> X -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: and#(true(),X) -> activate#(X) p2: if#(true(),X,Y) -> activate#(X) p3: if#(false(),X,Y) -> activate#(Y) p4: add#(|0|(),X) -> activate#(X) p5: add#(s(X),Y) -> s#(n__add(activate(X),activate(Y))) p6: add#(s(X),Y) -> activate#(X) p7: add#(s(X),Y) -> activate#(Y) p8: first#(s(X),cons(Y,Z)) -> activate#(Y) p9: first#(s(X),cons(Y,Z)) -> activate#(X) p10: first#(s(X),cons(Y,Z)) -> activate#(Z) p11: from#(X) -> activate#(X) p12: activate#(n__add(X1,X2)) -> add#(activate(X1),X2) p13: activate#(n__add(X1,X2)) -> activate#(X1) p14: activate#(n__first(X1,X2)) -> first#(activate(X1),activate(X2)) p15: activate#(n__first(X1,X2)) -> activate#(X1) p16: activate#(n__first(X1,X2)) -> activate#(X2) p17: activate#(n__from(X)) -> from#(X) p18: activate#(n__s(X)) -> s#(X) and R consists of: r1: and(true(),X) -> activate(X) r2: and(false(),Y) -> false() r3: if(true(),X,Y) -> activate(X) r4: if(false(),X,Y) -> activate(Y) r5: add(|0|(),X) -> activate(X) r6: add(s(X),Y) -> s(n__add(activate(X),activate(Y))) r7: first(|0|(),X) -> nil() r8: first(s(X),cons(Y,Z)) -> cons(activate(Y),n__first(activate(X),activate(Z))) r9: from(X) -> cons(activate(X),n__from(n__s(activate(X)))) r10: add(X1,X2) -> n__add(X1,X2) r11: first(X1,X2) -> n__first(X1,X2) r12: from(X) -> n__from(X) r13: s(X) -> n__s(X) r14: activate(n__add(X1,X2)) -> add(activate(X1),X2) r15: activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) r16: activate(n__from(X)) -> from(X) r17: activate(n__s(X)) -> s(X) r18: activate(X) -> X The estimated dependency graph contains the following SCCs: {p4, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: activate#(n__add(X1,X2)) -> add#(activate(X1),X2) p2: add#(s(X),Y) -> activate#(Y) p3: activate#(n__from(X)) -> from#(X) p4: from#(X) -> activate#(X) p5: activate#(n__first(X1,X2)) -> activate#(X2) p6: activate#(n__first(X1,X2)) -> activate#(X1) p7: activate#(n__first(X1,X2)) -> first#(activate(X1),activate(X2)) p8: first#(s(X),cons(Y,Z)) -> activate#(Z) p9: activate#(n__add(X1,X2)) -> activate#(X1) p10: first#(s(X),cons(Y,Z)) -> activate#(X) p11: first#(s(X),cons(Y,Z)) -> activate#(Y) p12: add#(s(X),Y) -> activate#(X) p13: add#(|0|(),X) -> activate#(X) and R consists of: r1: and(true(),X) -> activate(X) r2: and(false(),Y) -> false() r3: if(true(),X,Y) -> activate(X) r4: if(false(),X,Y) -> activate(Y) r5: add(|0|(),X) -> activate(X) r6: add(s(X),Y) -> s(n__add(activate(X),activate(Y))) r7: first(|0|(),X) -> nil() r8: first(s(X),cons(Y,Z)) -> cons(activate(Y),n__first(activate(X),activate(Z))) r9: from(X) -> cons(activate(X),n__from(n__s(activate(X)))) r10: add(X1,X2) -> n__add(X1,X2) r11: first(X1,X2) -> n__first(X1,X2) r12: from(X) -> n__from(X) r13: s(X) -> n__s(X) r14: activate(n__add(X1,X2)) -> add(activate(X1),X2) r15: activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) r16: activate(n__from(X)) -> from(X) r17: activate(n__s(X)) -> s(X) r18: activate(X) -> X The set of usable rules consists of r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16, r17, r18 Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: activate#_A(x1) = max{1, x1 - 3} n__add_A(x1,x2) = max{x1 + 17, x2 + 15} add#_A(x1,x2) = max{x1 + 11, x2 + 2} activate_A(x1) = x1 s_A(x1) = max{7, x1 - 1} n__from_A(x1) = max{14, x1 + 6} from#_A(x1) = x1 + 2 n__first_A(x1,x2) = max{x1 + 10, x2 + 13} first#_A(x1,x2) = max{x1 + 4, x2 + 4} cons_A(x1,x2) = max{7, x1 + 6, x2 - 2} |0|_A = 2 add_A(x1,x2) = max{x1 + 17, x2 + 15} first_A(x1,x2) = max{x1 + 10, x2 + 13} nil_A = 1 from_A(x1) = max{14, x1 + 6} n__s_A(x1) = max{7, x1 - 1} precedence: activate# > add# = activate = s = add > |0| > n__add = from# = from > first# > n__from > cons = first > n__first = nil = n__s partial status: pi(activate#) = [] pi(n__add) = [1, 2] pi(add#) = [1, 2] pi(activate) = [1] pi(s) = [] pi(n__from) = [] pi(from#) = [] pi(n__first) = [1, 2] pi(first#) = [1, 2] pi(cons) = [] pi(|0|) = [] pi(add) = [2] pi(first) = [1, 2] pi(nil) = [] pi(from) = [1] pi(n__s) = [] The next rules are strictly ordered: p11 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: activate#(n__add(X1,X2)) -> add#(activate(X1),X2) p2: add#(s(X),Y) -> activate#(Y) p3: activate#(n__from(X)) -> from#(X) p4: from#(X) -> activate#(X) p5: activate#(n__first(X1,X2)) -> activate#(X2) p6: activate#(n__first(X1,X2)) -> activate#(X1) p7: activate#(n__first(X1,X2)) -> first#(activate(X1),activate(X2)) p8: first#(s(X),cons(Y,Z)) -> activate#(Z) p9: activate#(n__add(X1,X2)) -> activate#(X1) p10: first#(s(X),cons(Y,Z)) -> activate#(X) p11: add#(s(X),Y) -> activate#(X) p12: add#(|0|(),X) -> activate#(X) and R consists of: r1: and(true(),X) -> activate(X) r2: and(false(),Y) -> false() r3: if(true(),X,Y) -> activate(X) r4: if(false(),X,Y) -> activate(Y) r5: add(|0|(),X) -> activate(X) r6: add(s(X),Y) -> s(n__add(activate(X),activate(Y))) r7: first(|0|(),X) -> nil() r8: first(s(X),cons(Y,Z)) -> cons(activate(Y),n__first(activate(X),activate(Z))) r9: from(X) -> cons(activate(X),n__from(n__s(activate(X)))) r10: add(X1,X2) -> n__add(X1,X2) r11: first(X1,X2) -> n__first(X1,X2) r12: from(X) -> n__from(X) r13: s(X) -> n__s(X) r14: activate(n__add(X1,X2)) -> add(activate(X1),X2) r15: activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) r16: activate(n__from(X)) -> from(X) r17: activate(n__s(X)) -> s(X) r18: activate(X) -> X The estimated dependency graph contains the following SCCs: {p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: activate#(n__add(X1,X2)) -> add#(activate(X1),X2) p2: add#(|0|(),X) -> activate#(X) p3: activate#(n__add(X1,X2)) -> activate#(X1) p4: activate#(n__first(X1,X2)) -> first#(activate(X1),activate(X2)) p5: first#(s(X),cons(Y,Z)) -> activate#(X) p6: activate#(n__first(X1,X2)) -> activate#(X1) p7: activate#(n__first(X1,X2)) -> activate#(X2) p8: activate#(n__from(X)) -> from#(X) p9: from#(X) -> activate#(X) p10: first#(s(X),cons(Y,Z)) -> activate#(Z) p11: add#(s(X),Y) -> activate#(X) p12: add#(s(X),Y) -> activate#(Y) and R consists of: r1: and(true(),X) -> activate(X) r2: and(false(),Y) -> false() r3: if(true(),X,Y) -> activate(X) r4: if(false(),X,Y) -> activate(Y) r5: add(|0|(),X) -> activate(X) r6: add(s(X),Y) -> s(n__add(activate(X),activate(Y))) r7: first(|0|(),X) -> nil() r8: first(s(X),cons(Y,Z)) -> cons(activate(Y),n__first(activate(X),activate(Z))) r9: from(X) -> cons(activate(X),n__from(n__s(activate(X)))) r10: add(X1,X2) -> n__add(X1,X2) r11: first(X1,X2) -> n__first(X1,X2) r12: from(X) -> n__from(X) r13: s(X) -> n__s(X) r14: activate(n__add(X1,X2)) -> add(activate(X1),X2) r15: activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) r16: activate(n__from(X)) -> from(X) r17: activate(n__s(X)) -> s(X) r18: activate(X) -> X The set of usable rules consists of r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16, r17, r18 Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: activate#_A(x1) = x1 + 4 n__add_A(x1,x2) = max{x1 + 13, x2 + 11} add#_A(x1,x2) = max{x1 + 8, x2 + 5} activate_A(x1) = x1 |0|_A = 2 n__first_A(x1,x2) = max{x1 + 30, x2 + 42} first#_A(x1,x2) = max{x1 + 29, x2 + 29} s_A(x1) = max{5, x1 - 3} cons_A(x1,x2) = max{3, x1 - 24, x2 - 11} n__from_A(x1) = x1 + 6 from#_A(x1) = x1 + 4 add_A(x1,x2) = max{x1 + 13, x2 + 11} first_A(x1,x2) = max{x1 + 30, x2 + 42} nil_A = 1 from_A(x1) = x1 + 6 n__s_A(x1) = max{5, x1 - 3} precedence: activate = from > n__from = from# > add# > activate# > |0| = first# = s = add > n__add = n__first = cons = first > nil = n__s partial status: pi(activate#) = [1] pi(n__add) = [1, 2] pi(add#) = [] pi(activate) = [1] pi(|0|) = [] pi(n__first) = [] pi(first#) = [] pi(s) = [] pi(cons) = [] pi(n__from) = [1] pi(from#) = [] pi(add) = [2] pi(first) = [] pi(nil) = [] pi(from) = [1] pi(n__s) = [] The next rules are strictly ordered: p12 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: activate#(n__add(X1,X2)) -> add#(activate(X1),X2) p2: add#(|0|(),X) -> activate#(X) p3: activate#(n__add(X1,X2)) -> activate#(X1) p4: activate#(n__first(X1,X2)) -> first#(activate(X1),activate(X2)) p5: first#(s(X),cons(Y,Z)) -> activate#(X) p6: activate#(n__first(X1,X2)) -> activate#(X1) p7: activate#(n__first(X1,X2)) -> activate#(X2) p8: activate#(n__from(X)) -> from#(X) p9: from#(X) -> activate#(X) p10: first#(s(X),cons(Y,Z)) -> activate#(Z) p11: add#(s(X),Y) -> activate#(X) and R consists of: r1: and(true(),X) -> activate(X) r2: and(false(),Y) -> false() r3: if(true(),X,Y) -> activate(X) r4: if(false(),X,Y) -> activate(Y) r5: add(|0|(),X) -> activate(X) r6: add(s(X),Y) -> s(n__add(activate(X),activate(Y))) r7: first(|0|(),X) -> nil() r8: first(s(X),cons(Y,Z)) -> cons(activate(Y),n__first(activate(X),activate(Z))) r9: from(X) -> cons(activate(X),n__from(n__s(activate(X)))) r10: add(X1,X2) -> n__add(X1,X2) r11: first(X1,X2) -> n__first(X1,X2) r12: from(X) -> n__from(X) r13: s(X) -> n__s(X) r14: activate(n__add(X1,X2)) -> add(activate(X1),X2) r15: activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) r16: activate(n__from(X)) -> from(X) r17: activate(n__s(X)) -> s(X) r18: activate(X) -> X The estimated dependency graph contains the following SCCs: {p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: activate#(n__add(X1,X2)) -> add#(activate(X1),X2) p2: add#(s(X),Y) -> activate#(X) p3: activate#(n__from(X)) -> from#(X) p4: from#(X) -> activate#(X) p5: activate#(n__first(X1,X2)) -> activate#(X2) p6: activate#(n__first(X1,X2)) -> activate#(X1) p7: activate#(n__first(X1,X2)) -> first#(activate(X1),activate(X2)) p8: first#(s(X),cons(Y,Z)) -> activate#(Z) p9: activate#(n__add(X1,X2)) -> activate#(X1) p10: first#(s(X),cons(Y,Z)) -> activate#(X) p11: add#(|0|(),X) -> activate#(X) and R consists of: r1: and(true(),X) -> activate(X) r2: and(false(),Y) -> false() r3: if(true(),X,Y) -> activate(X) r4: if(false(),X,Y) -> activate(Y) r5: add(|0|(),X) -> activate(X) r6: add(s(X),Y) -> s(n__add(activate(X),activate(Y))) r7: first(|0|(),X) -> nil() r8: first(s(X),cons(Y,Z)) -> cons(activate(Y),n__first(activate(X),activate(Z))) r9: from(X) -> cons(activate(X),n__from(n__s(activate(X)))) r10: add(X1,X2) -> n__add(X1,X2) r11: first(X1,X2) -> n__first(X1,X2) r12: from(X) -> n__from(X) r13: s(X) -> n__s(X) r14: activate(n__add(X1,X2)) -> add(activate(X1),X2) r15: activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) r16: activate(n__from(X)) -> from(X) r17: activate(n__s(X)) -> s(X) r18: activate(X) -> X The set of usable rules consists of r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16, r17, r18 Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: activate#_A(x1) = max{62, x1 + 34} n__add_A(x1,x2) = max{x1 + 30, x2 + 38} add#_A(x1,x2) = max{x1 + 56, x2 + 62} activate_A(x1) = max{7, x1} s_A(x1) = max{7, x1 - 9} n__from_A(x1) = x1 + 29 from#_A(x1) = x1 + 62 n__first_A(x1,x2) = max{46, x1 + 25, x2 + 18} first#_A(x1,x2) = max{x1 + 55, x2 + 47} cons_A(x1,x2) = max{x1 + 15, x2 - 12} |0|_A = 6 add_A(x1,x2) = max{x1 + 30, x2 + 38} first_A(x1,x2) = max{46, x1 + 25, x2 + 18} nil_A = 17 from_A(x1) = x1 + 29 n__s_A(x1) = max{1, x1 - 9} precedence: add# = from# > activate# = first# > n__add = activate = s = n__from = n__first = cons = |0| = add = first = nil = from = n__s partial status: pi(activate#) = [] pi(n__add) = [1, 2] pi(add#) = [1] pi(activate) = [1] pi(s) = [] pi(n__from) = [1] pi(from#) = [] pi(n__first) = [] pi(first#) = [] pi(cons) = [] pi(|0|) = [] pi(add) = [1, 2] pi(first) = [2] pi(nil) = [] pi(from) = [1] 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__add(X1,X2)) -> add#(activate(X1),X2) p2: add#(s(X),Y) -> activate#(X) p3: from#(X) -> activate#(X) p4: activate#(n__first(X1,X2)) -> activate#(X2) p5: activate#(n__first(X1,X2)) -> activate#(X1) p6: activate#(n__first(X1,X2)) -> first#(activate(X1),activate(X2)) p7: first#(s(X),cons(Y,Z)) -> activate#(Z) p8: activate#(n__add(X1,X2)) -> activate#(X1) p9: first#(s(X),cons(Y,Z)) -> activate#(X) p10: add#(|0|(),X) -> activate#(X) and R consists of: r1: and(true(),X) -> activate(X) r2: and(false(),Y) -> false() r3: if(true(),X,Y) -> activate(X) r4: if(false(),X,Y) -> activate(Y) r5: add(|0|(),X) -> activate(X) r6: add(s(X),Y) -> s(n__add(activate(X),activate(Y))) r7: first(|0|(),X) -> nil() r8: first(s(X),cons(Y,Z)) -> cons(activate(Y),n__first(activate(X),activate(Z))) r9: from(X) -> cons(activate(X),n__from(n__s(activate(X)))) r10: add(X1,X2) -> n__add(X1,X2) r11: first(X1,X2) -> n__first(X1,X2) r12: from(X) -> n__from(X) r13: s(X) -> n__s(X) r14: activate(n__add(X1,X2)) -> add(activate(X1),X2) r15: activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) r16: activate(n__from(X)) -> from(X) r17: activate(n__s(X)) -> s(X) r18: activate(X) -> X The estimated dependency graph contains the following SCCs: {p1, p2, p4, p5, p6, p7, p8, p9, p10} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: activate#(n__add(X1,X2)) -> add#(activate(X1),X2) p2: add#(|0|(),X) -> activate#(X) p3: activate#(n__add(X1,X2)) -> activate#(X1) p4: activate#(n__first(X1,X2)) -> first#(activate(X1),activate(X2)) p5: first#(s(X),cons(Y,Z)) -> activate#(X) p6: activate#(n__first(X1,X2)) -> activate#(X1) p7: activate#(n__first(X1,X2)) -> activate#(X2) p8: first#(s(X),cons(Y,Z)) -> activate#(Z) p9: add#(s(X),Y) -> activate#(X) and R consists of: r1: and(true(),X) -> activate(X) r2: and(false(),Y) -> false() r3: if(true(),X,Y) -> activate(X) r4: if(false(),X,Y) -> activate(Y) r5: add(|0|(),X) -> activate(X) r6: add(s(X),Y) -> s(n__add(activate(X),activate(Y))) r7: first(|0|(),X) -> nil() r8: first(s(X),cons(Y,Z)) -> cons(activate(Y),n__first(activate(X),activate(Z))) r9: from(X) -> cons(activate(X),n__from(n__s(activate(X)))) r10: add(X1,X2) -> n__add(X1,X2) r11: first(X1,X2) -> n__first(X1,X2) r12: from(X) -> n__from(X) r13: s(X) -> n__s(X) r14: activate(n__add(X1,X2)) -> add(activate(X1),X2) r15: activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) r16: activate(n__from(X)) -> from(X) r17: activate(n__s(X)) -> s(X) r18: activate(X) -> X The set of usable rules consists of r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16, r17, r18 Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: activate#_A(x1) = max{25, x1 + 23} n__add_A(x1,x2) = max{x1 + 22, x2 + 16} add#_A(x1,x2) = max{x1 + 41, x2 + 38} activate_A(x1) = x1 |0|_A = 1 n__first_A(x1,x2) = max{x1 + 28, x2 + 24} first#_A(x1,x2) = max{x1 + 51, x2 + 46} s_A(x1) = max{10, x1 - 3} cons_A(x1,x2) = max{x1 + 10, x2 - 20} add_A(x1,x2) = max{x1 + 22, x2 + 16} first_A(x1,x2) = max{x1 + 28, x2 + 24} nil_A = 0 from_A(x1) = x1 + 10 n__from_A(x1) = x1 + 10 n__s_A(x1) = max{10, x1 - 3} precedence: activate# > add# > n__add = activate = |0| = n__first = first# = s = cons = add = first = nil = from = n__from = n__s partial status: pi(activate#) = [] pi(n__add) = [] pi(add#) = [2] pi(activate) = [1] pi(|0|) = [] pi(n__first) = [] pi(first#) = [] pi(s) = [] pi(cons) = [] pi(add) = [] pi(first) = [] pi(nil) = [] pi(from) = [1] pi(n__from) = [1] pi(n__s) = [] The next rules are strictly ordered: p8 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: activate#(n__add(X1,X2)) -> add#(activate(X1),X2) p2: add#(|0|(),X) -> activate#(X) p3: activate#(n__add(X1,X2)) -> activate#(X1) p4: activate#(n__first(X1,X2)) -> first#(activate(X1),activate(X2)) p5: first#(s(X),cons(Y,Z)) -> activate#(X) p6: activate#(n__first(X1,X2)) -> activate#(X1) p7: activate#(n__first(X1,X2)) -> activate#(X2) p8: add#(s(X),Y) -> activate#(X) and R consists of: r1: and(true(),X) -> activate(X) r2: and(false(),Y) -> false() r3: if(true(),X,Y) -> activate(X) r4: if(false(),X,Y) -> activate(Y) r5: add(|0|(),X) -> activate(X) r6: add(s(X),Y) -> s(n__add(activate(X),activate(Y))) r7: first(|0|(),X) -> nil() r8: first(s(X),cons(Y,Z)) -> cons(activate(Y),n__first(activate(X),activate(Z))) r9: from(X) -> cons(activate(X),n__from(n__s(activate(X)))) r10: add(X1,X2) -> n__add(X1,X2) r11: first(X1,X2) -> n__first(X1,X2) r12: from(X) -> n__from(X) r13: s(X) -> n__s(X) r14: activate(n__add(X1,X2)) -> add(activate(X1),X2) r15: activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) r16: activate(n__from(X)) -> from(X) r17: activate(n__s(X)) -> s(X) r18: activate(X) -> X The estimated dependency graph contains the following SCCs: {p1, p2, p3, p4, p5, p6, p7, p8} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: activate#(n__add(X1,X2)) -> add#(activate(X1),X2) p2: add#(s(X),Y) -> activate#(X) p3: activate#(n__first(X1,X2)) -> activate#(X2) p4: activate#(n__first(X1,X2)) -> activate#(X1) p5: activate#(n__first(X1,X2)) -> first#(activate(X1),activate(X2)) p6: first#(s(X),cons(Y,Z)) -> activate#(X) p7: activate#(n__add(X1,X2)) -> activate#(X1) p8: add#(|0|(),X) -> activate#(X) and R consists of: r1: and(true(),X) -> activate(X) r2: and(false(),Y) -> false() r3: if(true(),X,Y) -> activate(X) r4: if(false(),X,Y) -> activate(Y) r5: add(|0|(),X) -> activate(X) r6: add(s(X),Y) -> s(n__add(activate(X),activate(Y))) r7: first(|0|(),X) -> nil() r8: first(s(X),cons(Y,Z)) -> cons(activate(Y),n__first(activate(X),activate(Z))) r9: from(X) -> cons(activate(X),n__from(n__s(activate(X)))) r10: add(X1,X2) -> n__add(X1,X2) r11: first(X1,X2) -> n__first(X1,X2) r12: from(X) -> n__from(X) r13: s(X) -> n__s(X) r14: activate(n__add(X1,X2)) -> add(activate(X1),X2) r15: activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) r16: activate(n__from(X)) -> from(X) r17: activate(n__s(X)) -> s(X) r18: activate(X) -> X The set of usable rules consists of r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16, r17, r18 Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: activate#_A(x1) = max{1, x1} n__add_A(x1,x2) = max{x1 + 4, x2 + 11} add#_A(x1,x2) = max{x1 + 2, x2 + 10} activate_A(x1) = max{6, x1} s_A(x1) = max{14, x1} n__first_A(x1,x2) = max{24, x1 + 9, x2 + 16} first#_A(x1,x2) = max{x1 + 2, x2 + 11} cons_A(x1,x2) = max{5, x1 - 5, x2} |0|_A = 3 add_A(x1,x2) = max{x1 + 4, x2 + 11} first_A(x1,x2) = max{24, x1 + 9, x2 + 16} nil_A = 4 from_A(x1) = max{10, x1 - 5} n__from_A(x1) = max{10, x1 - 5} n__s_A(x1) = max{14, x1} precedence: n__first = first = nil > activate = cons = |0| = add = from > n__add = add# > n__from > activate# = s = first# = n__s partial status: pi(activate#) = [1] pi(n__add) = [] pi(add#) = [] pi(activate) = [1] pi(s) = [1] pi(n__first) = [] pi(first#) = [1] pi(cons) = [] pi(|0|) = [] pi(add) = [] pi(first) = [] pi(nil) = [] pi(from) = [] pi(n__from) = [] pi(n__s) = [1] 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: activate#(n__add(X1,X2)) -> add#(activate(X1),X2) p2: add#(s(X),Y) -> activate#(X) p3: activate#(n__first(X1,X2)) -> activate#(X2) p4: activate#(n__first(X1,X2)) -> activate#(X1) p5: first#(s(X),cons(Y,Z)) -> activate#(X) p6: activate#(n__add(X1,X2)) -> activate#(X1) p7: add#(|0|(),X) -> activate#(X) and R consists of: r1: and(true(),X) -> activate(X) r2: and(false(),Y) -> false() r3: if(true(),X,Y) -> activate(X) r4: if(false(),X,Y) -> activate(Y) r5: add(|0|(),X) -> activate(X) r6: add(s(X),Y) -> s(n__add(activate(X),activate(Y))) r7: first(|0|(),X) -> nil() r8: first(s(X),cons(Y,Z)) -> cons(activate(Y),n__first(activate(X),activate(Z))) r9: from(X) -> cons(activate(X),n__from(n__s(activate(X)))) r10: add(X1,X2) -> n__add(X1,X2) r11: first(X1,X2) -> n__first(X1,X2) r12: from(X) -> n__from(X) r13: s(X) -> n__s(X) r14: activate(n__add(X1,X2)) -> add(activate(X1),X2) r15: activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) r16: activate(n__from(X)) -> from(X) r17: activate(n__s(X)) -> s(X) r18: activate(X) -> X The estimated dependency graph contains the following SCCs: {p1, p2, p3, p4, p6, p7} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: activate#(n__add(X1,X2)) -> add#(activate(X1),X2) p2: add#(|0|(),X) -> activate#(X) p3: activate#(n__add(X1,X2)) -> activate#(X1) p4: activate#(n__first(X1,X2)) -> activate#(X1) p5: activate#(n__first(X1,X2)) -> activate#(X2) p6: add#(s(X),Y) -> activate#(X) and R consists of: r1: and(true(),X) -> activate(X) r2: and(false(),Y) -> false() r3: if(true(),X,Y) -> activate(X) r4: if(false(),X,Y) -> activate(Y) r5: add(|0|(),X) -> activate(X) r6: add(s(X),Y) -> s(n__add(activate(X),activate(Y))) r7: first(|0|(),X) -> nil() r8: first(s(X),cons(Y,Z)) -> cons(activate(Y),n__first(activate(X),activate(Z))) r9: from(X) -> cons(activate(X),n__from(n__s(activate(X)))) r10: add(X1,X2) -> n__add(X1,X2) r11: first(X1,X2) -> n__first(X1,X2) r12: from(X) -> n__from(X) r13: s(X) -> n__s(X) r14: activate(n__add(X1,X2)) -> add(activate(X1),X2) r15: activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) r16: activate(n__from(X)) -> from(X) r17: activate(n__s(X)) -> s(X) r18: activate(X) -> X The set of usable rules consists of r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16, r17, r18 Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: activate#_A(x1) = x1 + 3 n__add_A(x1,x2) = max{10, x1 + 4, x2 + 9} add#_A(x1,x2) = max{8, x1 + 3, x2 + 4} activate_A(x1) = x1 |0|_A = 8 n__first_A(x1,x2) = max{x1 + 8, x2 + 8} s_A(x1) = x1 add_A(x1,x2) = max{10, x1 + 4, x2 + 9} first_A(x1,x2) = max{x1 + 8, x2 + 8} nil_A = 7 cons_A(x1,x2) = max{4, x1} from_A(x1) = max{4, x1} n__from_A(x1) = max{4, x1} n__s_A(x1) = x1 precedence: n__add = activate = s = add = from > add# = n__first = first = cons = n__s > activate# > |0| = nil = n__from partial status: pi(activate#) = [1] pi(n__add) = [] pi(add#) = [1, 2] pi(activate) = [] pi(|0|) = [] pi(n__first) = [] pi(s) = [] pi(add) = [] pi(first) = [] pi(nil) = [] pi(cons) = [] 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: add#(|0|(),X) -> activate#(X) p2: activate#(n__add(X1,X2)) -> activate#(X1) p3: activate#(n__first(X1,X2)) -> activate#(X1) p4: activate#(n__first(X1,X2)) -> activate#(X2) p5: add#(s(X),Y) -> activate#(X) and R consists of: r1: and(true(),X) -> activate(X) r2: and(false(),Y) -> false() r3: if(true(),X,Y) -> activate(X) r4: if(false(),X,Y) -> activate(Y) r5: add(|0|(),X) -> activate(X) r6: add(s(X),Y) -> s(n__add(activate(X),activate(Y))) r7: first(|0|(),X) -> nil() r8: first(s(X),cons(Y,Z)) -> cons(activate(Y),n__first(activate(X),activate(Z))) r9: from(X) -> cons(activate(X),n__from(n__s(activate(X)))) r10: add(X1,X2) -> n__add(X1,X2) r11: first(X1,X2) -> n__first(X1,X2) r12: from(X) -> n__from(X) r13: s(X) -> n__s(X) r14: activate(n__add(X1,X2)) -> add(activate(X1),X2) r15: activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) r16: activate(n__from(X)) -> from(X) r17: activate(n__s(X)) -> s(X) r18: activate(X) -> X The estimated dependency graph contains the following SCCs: {p2, p3, p4} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: activate#(n__add(X1,X2)) -> activate#(X1) p2: activate#(n__first(X1,X2)) -> activate#(X2) p3: activate#(n__first(X1,X2)) -> activate#(X1) and R consists of: r1: and(true(),X) -> activate(X) r2: and(false(),Y) -> false() r3: if(true(),X,Y) -> activate(X) r4: if(false(),X,Y) -> activate(Y) r5: add(|0|(),X) -> activate(X) r6: add(s(X),Y) -> s(n__add(activate(X),activate(Y))) r7: first(|0|(),X) -> nil() r8: first(s(X),cons(Y,Z)) -> cons(activate(Y),n__first(activate(X),activate(Z))) r9: from(X) -> cons(activate(X),n__from(n__s(activate(X)))) r10: add(X1,X2) -> n__add(X1,X2) r11: first(X1,X2) -> n__first(X1,X2) r12: from(X) -> n__from(X) r13: s(X) -> n__s(X) r14: activate(n__add(X1,X2)) -> add(activate(X1),X2) r15: activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) r16: activate(n__from(X)) -> from(X) r17: activate(n__s(X)) -> s(X) r18: activate(X) -> X The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: activate#_A(x1) = x1 + 3 n__add_A(x1,x2) = max{x1, x2 + 1} n__first_A(x1,x2) = max{x1, x2 + 1} precedence: activate# = n__add = n__first partial status: pi(activate#) = [] pi(n__add) = [2] 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__add(X1,X2)) -> activate#(X1) p2: activate#(n__first(X1,X2)) -> activate#(X1) and R consists of: r1: and(true(),X) -> activate(X) r2: and(false(),Y) -> false() r3: if(true(),X,Y) -> activate(X) r4: if(false(),X,Y) -> activate(Y) r5: add(|0|(),X) -> activate(X) r6: add(s(X),Y) -> s(n__add(activate(X),activate(Y))) r7: first(|0|(),X) -> nil() r8: first(s(X),cons(Y,Z)) -> cons(activate(Y),n__first(activate(X),activate(Z))) r9: from(X) -> cons(activate(X),n__from(n__s(activate(X)))) r10: add(X1,X2) -> n__add(X1,X2) r11: first(X1,X2) -> n__first(X1,X2) r12: from(X) -> n__from(X) r13: s(X) -> n__s(X) r14: activate(n__add(X1,X2)) -> add(activate(X1),X2) r15: activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) r16: activate(n__from(X)) -> from(X) r17: activate(n__s(X)) -> s(X) 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__add(X1,X2)) -> activate#(X1) p2: activate#(n__first(X1,X2)) -> activate#(X1) and R consists of: r1: and(true(),X) -> activate(X) r2: and(false(),Y) -> false() r3: if(true(),X,Y) -> activate(X) r4: if(false(),X,Y) -> activate(Y) r5: add(|0|(),X) -> activate(X) r6: add(s(X),Y) -> s(n__add(activate(X),activate(Y))) r7: first(|0|(),X) -> nil() r8: first(s(X),cons(Y,Z)) -> cons(activate(Y),n__first(activate(X),activate(Z))) r9: from(X) -> cons(activate(X),n__from(n__s(activate(X)))) r10: add(X1,X2) -> n__add(X1,X2) r11: first(X1,X2) -> n__first(X1,X2) r12: from(X) -> n__from(X) r13: s(X) -> n__s(X) r14: activate(n__add(X1,X2)) -> add(activate(X1),X2) r15: activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) r16: activate(n__from(X)) -> from(X) r17: activate(n__s(X)) -> s(X) r18: activate(X) -> X The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: activate#_A(x1) = x1 + 2 n__add_A(x1,x2) = max{x1 + 2, x2 + 2} n__first_A(x1,x2) = max{x1, x2} precedence: activate# = n__add = n__first partial status: pi(activate#) = [] pi(n__add) = [2] pi(n__first) = [2] 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__first(X1,X2)) -> activate#(X1) and R consists of: r1: and(true(),X) -> activate(X) r2: and(false(),Y) -> false() r3: if(true(),X,Y) -> activate(X) r4: if(false(),X,Y) -> activate(Y) r5: add(|0|(),X) -> activate(X) r6: add(s(X),Y) -> s(n__add(activate(X),activate(Y))) r7: first(|0|(),X) -> nil() r8: first(s(X),cons(Y,Z)) -> cons(activate(Y),n__first(activate(X),activate(Z))) r9: from(X) -> cons(activate(X),n__from(n__s(activate(X)))) r10: add(X1,X2) -> n__add(X1,X2) r11: first(X1,X2) -> n__first(X1,X2) r12: from(X) -> n__from(X) r13: s(X) -> n__s(X) r14: activate(n__add(X1,X2)) -> add(activate(X1),X2) r15: activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) r16: activate(n__from(X)) -> from(X) r17: activate(n__s(X)) -> s(X) r18: 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__first(X1,X2)) -> activate#(X1) and R consists of: r1: and(true(),X) -> activate(X) r2: and(false(),Y) -> false() r3: if(true(),X,Y) -> activate(X) r4: if(false(),X,Y) -> activate(Y) r5: add(|0|(),X) -> activate(X) r6: add(s(X),Y) -> s(n__add(activate(X),activate(Y))) r7: first(|0|(),X) -> nil() r8: first(s(X),cons(Y,Z)) -> cons(activate(Y),n__first(activate(X),activate(Z))) r9: from(X) -> cons(activate(X),n__from(n__s(activate(X)))) r10: add(X1,X2) -> n__add(X1,X2) r11: first(X1,X2) -> n__first(X1,X2) r12: from(X) -> n__from(X) r13: s(X) -> n__s(X) r14: activate(n__add(X1,X2)) -> add(activate(X1),X2) r15: activate(n__first(X1,X2)) -> first(activate(X1),activate(X2)) r16: activate(n__from(X)) -> from(X) r17: activate(n__s(X)) -> s(X) r18: activate(X) -> X The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: activate#_A(x1) = x1 + 3 n__first_A(x1,x2) = max{x1 + 1, x2} precedence: activate# = n__first partial status: pi(activate#) = [] pi(n__first) = [2] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.