YES We show the termination of the TRS R: U11(tt(),V2) -> U12(isNat(activate(V2))) U12(tt()) -> tt() U21(tt()) -> tt() U31(tt(),N) -> activate(N) U41(tt(),M,N) -> U42(isNat(activate(N)),activate(M),activate(N)) U42(tt(),M,N) -> s(plus(activate(N),activate(M))) isNat(n__0()) -> tt() isNat(n__plus(V1,V2)) -> U11(isNat(activate(V1)),activate(V2)) isNat(n__s(V1)) -> U21(isNat(activate(V1))) plus(N,|0|()) -> U31(isNat(N),N) plus(N,s(M)) -> U41(isNat(M),M,N) |0|() -> n__0() plus(X1,X2) -> n__plus(X1,X2) s(X) -> n__s(X) activate(n__0()) -> |0|() activate(n__plus(X1,X2)) -> plus(X1,X2) activate(n__s(X)) -> s(X) activate(X) -> X -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: U11#(tt(),V2) -> U12#(isNat(activate(V2))) p2: U11#(tt(),V2) -> isNat#(activate(V2)) p3: U11#(tt(),V2) -> activate#(V2) p4: U31#(tt(),N) -> activate#(N) p5: U41#(tt(),M,N) -> U42#(isNat(activate(N)),activate(M),activate(N)) p6: U41#(tt(),M,N) -> isNat#(activate(N)) p7: U41#(tt(),M,N) -> activate#(N) p8: U41#(tt(),M,N) -> activate#(M) p9: U42#(tt(),M,N) -> s#(plus(activate(N),activate(M))) p10: U42#(tt(),M,N) -> plus#(activate(N),activate(M)) p11: U42#(tt(),M,N) -> activate#(N) p12: U42#(tt(),M,N) -> activate#(M) p13: isNat#(n__plus(V1,V2)) -> U11#(isNat(activate(V1)),activate(V2)) p14: isNat#(n__plus(V1,V2)) -> isNat#(activate(V1)) p15: isNat#(n__plus(V1,V2)) -> activate#(V1) p16: isNat#(n__plus(V1,V2)) -> activate#(V2) p17: isNat#(n__s(V1)) -> U21#(isNat(activate(V1))) p18: isNat#(n__s(V1)) -> isNat#(activate(V1)) p19: isNat#(n__s(V1)) -> activate#(V1) p20: plus#(N,|0|()) -> U31#(isNat(N),N) p21: plus#(N,|0|()) -> isNat#(N) p22: plus#(N,s(M)) -> U41#(isNat(M),M,N) p23: plus#(N,s(M)) -> isNat#(M) p24: activate#(n__0()) -> |0|#() p25: activate#(n__plus(X1,X2)) -> plus#(X1,X2) p26: activate#(n__s(X)) -> s#(X) and R consists of: r1: U11(tt(),V2) -> U12(isNat(activate(V2))) r2: U12(tt()) -> tt() r3: U21(tt()) -> tt() r4: U31(tt(),N) -> activate(N) r5: U41(tt(),M,N) -> U42(isNat(activate(N)),activate(M),activate(N)) r6: U42(tt(),M,N) -> s(plus(activate(N),activate(M))) r7: isNat(n__0()) -> tt() r8: isNat(n__plus(V1,V2)) -> U11(isNat(activate(V1)),activate(V2)) r9: isNat(n__s(V1)) -> U21(isNat(activate(V1))) r10: plus(N,|0|()) -> U31(isNat(N),N) r11: plus(N,s(M)) -> U41(isNat(M),M,N) r12: |0|() -> n__0() r13: plus(X1,X2) -> n__plus(X1,X2) r14: s(X) -> n__s(X) r15: activate(n__0()) -> |0|() r16: activate(n__plus(X1,X2)) -> plus(X1,X2) r17: activate(n__s(X)) -> s(X) r18: activate(X) -> X The estimated dependency graph contains the following SCCs: {p2, p3, p4, p5, p6, p7, p8, p10, p11, p12, p13, p14, p15, p16, p18, p19, p20, p21, p22, p23, p25} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: U11#(tt(),V2) -> isNat#(activate(V2)) p2: isNat#(n__s(V1)) -> activate#(V1) p3: activate#(n__plus(X1,X2)) -> plus#(X1,X2) p4: plus#(N,s(M)) -> isNat#(M) p5: isNat#(n__s(V1)) -> isNat#(activate(V1)) p6: isNat#(n__plus(V1,V2)) -> activate#(V2) p7: isNat#(n__plus(V1,V2)) -> activate#(V1) p8: isNat#(n__plus(V1,V2)) -> isNat#(activate(V1)) p9: isNat#(n__plus(V1,V2)) -> U11#(isNat(activate(V1)),activate(V2)) p10: U11#(tt(),V2) -> activate#(V2) p11: plus#(N,s(M)) -> U41#(isNat(M),M,N) p12: U41#(tt(),M,N) -> activate#(M) p13: U41#(tt(),M,N) -> activate#(N) p14: U41#(tt(),M,N) -> isNat#(activate(N)) p15: U41#(tt(),M,N) -> U42#(isNat(activate(N)),activate(M),activate(N)) p16: U42#(tt(),M,N) -> activate#(M) p17: U42#(tt(),M,N) -> activate#(N) p18: U42#(tt(),M,N) -> plus#(activate(N),activate(M)) p19: plus#(N,|0|()) -> isNat#(N) p20: plus#(N,|0|()) -> U31#(isNat(N),N) p21: U31#(tt(),N) -> activate#(N) and R consists of: r1: U11(tt(),V2) -> U12(isNat(activate(V2))) r2: U12(tt()) -> tt() r3: U21(tt()) -> tt() r4: U31(tt(),N) -> activate(N) r5: U41(tt(),M,N) -> U42(isNat(activate(N)),activate(M),activate(N)) r6: U42(tt(),M,N) -> s(plus(activate(N),activate(M))) r7: isNat(n__0()) -> tt() r8: isNat(n__plus(V1,V2)) -> U11(isNat(activate(V1)),activate(V2)) r9: isNat(n__s(V1)) -> U21(isNat(activate(V1))) r10: plus(N,|0|()) -> U31(isNat(N),N) r11: plus(N,s(M)) -> U41(isNat(M),M,N) r12: |0|() -> n__0() r13: plus(X1,X2) -> n__plus(X1,X2) r14: s(X) -> n__s(X) r15: activate(n__0()) -> |0|() r16: activate(n__plus(X1,X2)) -> plus(X1,X2) r17: activate(n__s(X)) -> s(X) r18: activate(X) -> X The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16, r17, r18 Take the reduction pair: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: U11#_A(x1,x2) = ((0,0),(1,0)) x2 + (0,2) tt_A() = (1,5) isNat#_A(x1) = ((0,0),(1,0)) x1 + (0,2) activate_A(x1) = ((1,0),(1,1)) x1 + (0,2) n__s_A(x1) = x1 + (4,1) activate#_A(x1) = ((0,0),(1,0)) x1 + (0,1) n__plus_A(x1,x2) = x1 + ((1,0),(1,0)) x2 + (0,1) plus#_A(x1,x2) = ((0,0),(1,0)) x1 + ((0,0),(1,0)) x2 s_A(x1) = x1 + (4,2) isNat_A(x1) = ((0,0),(1,0)) x1 + (4,1) U41#_A(x1,x2,x3) = ((0,0),(1,0)) x2 + ((0,0),(1,0)) x3 + (0,3) U42#_A(x1,x2,x3) = ((0,0),(1,0)) x2 + ((0,0),(1,0)) x3 + (0,1) |0|_A() = (3,4) U31#_A(x1,x2) = ((0,0),(1,0)) x2 + (0,2) U42_A(x1,x2,x3) = x2 + x3 + (4,2) plus_A(x1,x2) = x1 + ((1,0),(1,0)) x2 + (0,2) U12_A(x1) = (2,1) U31_A(x1,x2) = x2 + (1,0) U41_A(x1,x2,x3) = ((0,0),(1,0)) x1 + x2 + x3 + (4,2) U11_A(x1,x2) = (3,0) U21_A(x1) = ((0,0),(1,0)) x1 + (2,5) n__0_A() = (3,0) The next rules are strictly ordered: p2, p3, p4, p5, p6, p7, p10, p11, p12, p13, p14, p15, p18, p19, p20, p21 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: U11#(tt(),V2) -> isNat#(activate(V2)) p2: isNat#(n__plus(V1,V2)) -> isNat#(activate(V1)) p3: isNat#(n__plus(V1,V2)) -> U11#(isNat(activate(V1)),activate(V2)) p4: U42#(tt(),M,N) -> activate#(M) p5: U42#(tt(),M,N) -> activate#(N) and R consists of: r1: U11(tt(),V2) -> U12(isNat(activate(V2))) r2: U12(tt()) -> tt() r3: U21(tt()) -> tt() r4: U31(tt(),N) -> activate(N) r5: U41(tt(),M,N) -> U42(isNat(activate(N)),activate(M),activate(N)) r6: U42(tt(),M,N) -> s(plus(activate(N),activate(M))) r7: isNat(n__0()) -> tt() r8: isNat(n__plus(V1,V2)) -> U11(isNat(activate(V1)),activate(V2)) r9: isNat(n__s(V1)) -> U21(isNat(activate(V1))) r10: plus(N,|0|()) -> U31(isNat(N),N) r11: plus(N,s(M)) -> U41(isNat(M),M,N) r12: |0|() -> n__0() r13: plus(X1,X2) -> n__plus(X1,X2) r14: s(X) -> n__s(X) r15: activate(n__0()) -> |0|() r16: activate(n__plus(X1,X2)) -> plus(X1,X2) r17: activate(n__s(X)) -> s(X) r18: 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: U11#(tt(),V2) -> isNat#(activate(V2)) p2: isNat#(n__plus(V1,V2)) -> U11#(isNat(activate(V1)),activate(V2)) p3: isNat#(n__plus(V1,V2)) -> isNat#(activate(V1)) and R consists of: r1: U11(tt(),V2) -> U12(isNat(activate(V2))) r2: U12(tt()) -> tt() r3: U21(tt()) -> tt() r4: U31(tt(),N) -> activate(N) r5: U41(tt(),M,N) -> U42(isNat(activate(N)),activate(M),activate(N)) r6: U42(tt(),M,N) -> s(plus(activate(N),activate(M))) r7: isNat(n__0()) -> tt() r8: isNat(n__plus(V1,V2)) -> U11(isNat(activate(V1)),activate(V2)) r9: isNat(n__s(V1)) -> U21(isNat(activate(V1))) r10: plus(N,|0|()) -> U31(isNat(N),N) r11: plus(N,s(M)) -> U41(isNat(M),M,N) r12: |0|() -> n__0() r13: plus(X1,X2) -> n__plus(X1,X2) r14: s(X) -> n__s(X) r15: activate(n__0()) -> |0|() r16: activate(n__plus(X1,X2)) -> plus(X1,X2) r17: activate(n__s(X)) -> s(X) r18: activate(X) -> X The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16, r17, r18 Take the reduction pair: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: U11#_A(x1,x2) = ((0,0),(1,0)) x1 + ((0,0),(1,0)) x2 + (0,2) tt_A() = (1,6) isNat#_A(x1) = ((0,0),(1,0)) x1 activate_A(x1) = ((1,0),(1,0)) x1 + (2,1) n__plus_A(x1,x2) = ((1,0),(1,1)) x1 + ((1,0),(1,0)) x2 + (8,11) isNat_A(x1) = x1 + (1,1) U42_A(x1,x2,x3) = x3 + (4,18) s_A(x1) = ((0,0),(1,0)) x1 + (3,4) plus_A(x1,x2) = x1 + ((1,0),(1,1)) x2 + (9,10) U12_A(x1) = ((0,0),(1,0)) x1 + (2,11) U31_A(x1,x2) = x2 + (3,0) U41_A(x1,x2,x3) = ((0,0),(1,0)) x1 + ((0,0),(1,0)) x2 + ((1,0),(1,1)) x3 + (7,18) U11_A(x1,x2) = x1 + (2,13) U21_A(x1) = ((0,0),(1,0)) x1 + (2,4) |0|_A() = (2,3) n__0_A() = (1,4) n__s_A(x1) = ((0,0),(1,0)) x1 + (2,5) The next rules are strictly ordered: p1, p2, p3 We remove them from the problem. Then no dependency pair remains.