YES We show the termination of the TRS R: a__U11(tt(),V2) -> a__U12(a__isNat(V2)) a__U12(tt()) -> tt() a__U21(tt()) -> tt() a__U31(tt(),N) -> mark(N) a__U41(tt(),M,N) -> a__U42(a__isNat(N),M,N) a__U42(tt(),M,N) -> s(a__plus(mark(N),mark(M))) a__isNat(|0|()) -> tt() a__isNat(plus(V1,V2)) -> a__U11(a__isNat(V1),V2) a__isNat(s(V1)) -> a__U21(a__isNat(V1)) a__plus(N,|0|()) -> a__U31(a__isNat(N),N) a__plus(N,s(M)) -> a__U41(a__isNat(M),M,N) mark(U11(X1,X2)) -> a__U11(mark(X1),X2) mark(U12(X)) -> a__U12(mark(X)) mark(isNat(X)) -> a__isNat(X) mark(U21(X)) -> a__U21(mark(X)) mark(U31(X1,X2)) -> a__U31(mark(X1),X2) mark(U41(X1,X2,X3)) -> a__U41(mark(X1),X2,X3) mark(U42(X1,X2,X3)) -> a__U42(mark(X1),X2,X3) mark(plus(X1,X2)) -> a__plus(mark(X1),mark(X2)) mark(tt()) -> tt() mark(s(X)) -> s(mark(X)) mark(|0|()) -> |0|() a__U11(X1,X2) -> U11(X1,X2) a__U12(X) -> U12(X) a__isNat(X) -> isNat(X) a__U21(X) -> U21(X) a__U31(X1,X2) -> U31(X1,X2) a__U41(X1,X2,X3) -> U41(X1,X2,X3) a__U42(X1,X2,X3) -> U42(X1,X2,X3) a__plus(X1,X2) -> plus(X1,X2) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: a__U11#(tt(),V2) -> a__U12#(a__isNat(V2)) p2: a__U11#(tt(),V2) -> a__isNat#(V2) p3: a__U31#(tt(),N) -> mark#(N) p4: a__U41#(tt(),M,N) -> a__U42#(a__isNat(N),M,N) p5: a__U41#(tt(),M,N) -> a__isNat#(N) p6: a__U42#(tt(),M,N) -> a__plus#(mark(N),mark(M)) p7: a__U42#(tt(),M,N) -> mark#(N) p8: a__U42#(tt(),M,N) -> mark#(M) p9: a__isNat#(plus(V1,V2)) -> a__U11#(a__isNat(V1),V2) p10: a__isNat#(plus(V1,V2)) -> a__isNat#(V1) p11: a__isNat#(s(V1)) -> a__U21#(a__isNat(V1)) p12: a__isNat#(s(V1)) -> a__isNat#(V1) p13: a__plus#(N,|0|()) -> a__U31#(a__isNat(N),N) p14: a__plus#(N,|0|()) -> a__isNat#(N) p15: a__plus#(N,s(M)) -> a__U41#(a__isNat(M),M,N) p16: a__plus#(N,s(M)) -> a__isNat#(M) p17: mark#(U11(X1,X2)) -> a__U11#(mark(X1),X2) p18: mark#(U11(X1,X2)) -> mark#(X1) p19: mark#(U12(X)) -> a__U12#(mark(X)) p20: mark#(U12(X)) -> mark#(X) p21: mark#(isNat(X)) -> a__isNat#(X) p22: mark#(U21(X)) -> a__U21#(mark(X)) p23: mark#(U21(X)) -> mark#(X) p24: mark#(U31(X1,X2)) -> a__U31#(mark(X1),X2) p25: mark#(U31(X1,X2)) -> mark#(X1) p26: mark#(U41(X1,X2,X3)) -> a__U41#(mark(X1),X2,X3) p27: mark#(U41(X1,X2,X3)) -> mark#(X1) p28: mark#(U42(X1,X2,X3)) -> a__U42#(mark(X1),X2,X3) p29: mark#(U42(X1,X2,X3)) -> mark#(X1) p30: mark#(plus(X1,X2)) -> a__plus#(mark(X1),mark(X2)) p31: mark#(plus(X1,X2)) -> mark#(X1) p32: mark#(plus(X1,X2)) -> mark#(X2) p33: mark#(s(X)) -> mark#(X) and R consists of: r1: a__U11(tt(),V2) -> a__U12(a__isNat(V2)) r2: a__U12(tt()) -> tt() r3: a__U21(tt()) -> tt() r4: a__U31(tt(),N) -> mark(N) r5: a__U41(tt(),M,N) -> a__U42(a__isNat(N),M,N) r6: a__U42(tt(),M,N) -> s(a__plus(mark(N),mark(M))) r7: a__isNat(|0|()) -> tt() r8: a__isNat(plus(V1,V2)) -> a__U11(a__isNat(V1),V2) r9: a__isNat(s(V1)) -> a__U21(a__isNat(V1)) r10: a__plus(N,|0|()) -> a__U31(a__isNat(N),N) r11: a__plus(N,s(M)) -> a__U41(a__isNat(M),M,N) r12: mark(U11(X1,X2)) -> a__U11(mark(X1),X2) r13: mark(U12(X)) -> a__U12(mark(X)) r14: mark(isNat(X)) -> a__isNat(X) r15: mark(U21(X)) -> a__U21(mark(X)) r16: mark(U31(X1,X2)) -> a__U31(mark(X1),X2) r17: mark(U41(X1,X2,X3)) -> a__U41(mark(X1),X2,X3) r18: mark(U42(X1,X2,X3)) -> a__U42(mark(X1),X2,X3) r19: mark(plus(X1,X2)) -> a__plus(mark(X1),mark(X2)) r20: mark(tt()) -> tt() r21: mark(s(X)) -> s(mark(X)) r22: mark(|0|()) -> |0|() r23: a__U11(X1,X2) -> U11(X1,X2) r24: a__U12(X) -> U12(X) r25: a__isNat(X) -> isNat(X) r26: a__U21(X) -> U21(X) r27: a__U31(X1,X2) -> U31(X1,X2) r28: a__U41(X1,X2,X3) -> U41(X1,X2,X3) r29: a__U42(X1,X2,X3) -> U42(X1,X2,X3) r30: a__plus(X1,X2) -> plus(X1,X2) The estimated dependency graph contains the following SCCs: {p3, p4, p6, p7, p8, p13, p15, p18, p20, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33} {p2, p9, p10, p12} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: a__U42#(tt(),M,N) -> mark#(M) p2: mark#(s(X)) -> mark#(X) p3: mark#(plus(X1,X2)) -> mark#(X2) p4: mark#(plus(X1,X2)) -> mark#(X1) p5: mark#(plus(X1,X2)) -> a__plus#(mark(X1),mark(X2)) p6: a__plus#(N,s(M)) -> a__U41#(a__isNat(M),M,N) p7: a__U41#(tt(),M,N) -> a__U42#(a__isNat(N),M,N) p8: a__U42#(tt(),M,N) -> mark#(N) p9: mark#(U42(X1,X2,X3)) -> mark#(X1) p10: mark#(U42(X1,X2,X3)) -> a__U42#(mark(X1),X2,X3) p11: a__U42#(tt(),M,N) -> a__plus#(mark(N),mark(M)) p12: a__plus#(N,|0|()) -> a__U31#(a__isNat(N),N) p13: a__U31#(tt(),N) -> mark#(N) p14: mark#(U41(X1,X2,X3)) -> mark#(X1) p15: mark#(U41(X1,X2,X3)) -> a__U41#(mark(X1),X2,X3) p16: mark#(U31(X1,X2)) -> mark#(X1) p17: mark#(U31(X1,X2)) -> a__U31#(mark(X1),X2) p18: mark#(U21(X)) -> mark#(X) p19: mark#(U12(X)) -> mark#(X) p20: mark#(U11(X1,X2)) -> mark#(X1) and R consists of: r1: a__U11(tt(),V2) -> a__U12(a__isNat(V2)) r2: a__U12(tt()) -> tt() r3: a__U21(tt()) -> tt() r4: a__U31(tt(),N) -> mark(N) r5: a__U41(tt(),M,N) -> a__U42(a__isNat(N),M,N) r6: a__U42(tt(),M,N) -> s(a__plus(mark(N),mark(M))) r7: a__isNat(|0|()) -> tt() r8: a__isNat(plus(V1,V2)) -> a__U11(a__isNat(V1),V2) r9: a__isNat(s(V1)) -> a__U21(a__isNat(V1)) r10: a__plus(N,|0|()) -> a__U31(a__isNat(N),N) r11: a__plus(N,s(M)) -> a__U41(a__isNat(M),M,N) r12: mark(U11(X1,X2)) -> a__U11(mark(X1),X2) r13: mark(U12(X)) -> a__U12(mark(X)) r14: mark(isNat(X)) -> a__isNat(X) r15: mark(U21(X)) -> a__U21(mark(X)) r16: mark(U31(X1,X2)) -> a__U31(mark(X1),X2) r17: mark(U41(X1,X2,X3)) -> a__U41(mark(X1),X2,X3) r18: mark(U42(X1,X2,X3)) -> a__U42(mark(X1),X2,X3) r19: mark(plus(X1,X2)) -> a__plus(mark(X1),mark(X2)) r20: mark(tt()) -> tt() r21: mark(s(X)) -> s(mark(X)) r22: mark(|0|()) -> |0|() r23: a__U11(X1,X2) -> U11(X1,X2) r24: a__U12(X) -> U12(X) r25: a__isNat(X) -> isNat(X) r26: a__U21(X) -> U21(X) r27: a__U31(X1,X2) -> U31(X1,X2) r28: a__U41(X1,X2,X3) -> U41(X1,X2,X3) r29: a__U42(X1,X2,X3) -> U42(X1,X2,X3) r30: a__plus(X1,X2) -> plus(X1,X2) 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, r19, r20, r21, r22, r23, r24, r25, r26, r27, r28, r29, r30 Take the reduction pair: matrix interpretations: carrier: N^4 order: lexicographic order interpretations: a__U42#_A(x1,x2,x3) = ((1,0,0,0),(1,1,0,0),(1,1,1,0),(1,1,0,0)) x1 + ((1,0,0,0),(0,1,0,0),(1,1,0,0),(0,0,0,0)) x2 + ((1,0,0,0),(1,1,0,0),(0,0,0,0),(1,0,0,0)) x3 + (8,2,2,36) tt_A() = (17,1,73,42) mark#_A(x1) = ((1,0,0,0),(1,0,0,0),(0,0,0,0),(1,0,0,0)) x1 + (0,21,92,53) s_A(x1) = ((1,0,0,0),(0,0,0,0),(1,0,0,0),(0,0,0,0)) x1 + (3,1,1,0) plus_A(x1,x2) = ((1,0,0,0),(1,0,0,0),(0,1,0,0),(1,0,0,0)) x1 + ((1,0,0,0),(0,0,0,0),(1,0,0,0),(0,0,0,0)) x2 + (25,1,0,2) a__plus#_A(x1,x2) = x1 + ((1,0,0,0),(1,1,0,0),(0,0,0,0),(0,0,0,0)) x2 + (24,36,94,77) mark_A(x1) = ((1,0,0,0),(1,0,0,0),(0,0,0,0),(0,0,0,0)) x1 + (0,31,58,0) a__U41#_A(x1,x2,x3) = ((1,0,0,0),(0,1,0,0),(0,0,1,0),(1,0,0,0)) x1 + x2 + x3 + (9,0,24,59) a__isNat_A(x1) = (17,22,56,41) U42_A(x1,x2,x3) = x1 + x2 + x3 + (11,2,0,4) |0|_A() = (29,1,0,0) a__U31#_A(x1,x2) = ((1,0,0,0),(1,1,0,0),(1,1,1,0),(0,1,1,0)) x1 + ((1,0,0,0),(0,0,0,0),(0,0,0,0),(1,0,0,0)) x2 + (0,26,0,0) U41_A(x1,x2,x3) = ((1,0,0,0),(0,1,0,0),(0,0,1,0),(1,0,0,1)) x1 + ((1,0,0,0),(0,0,0,0),(0,0,0,0),(1,0,0,0)) x2 + ((1,0,0,0),(0,0,0,0),(0,0,0,0),(1,0,0,0)) x3 + (11,1,0,3) U31_A(x1,x2) = ((1,0,0,0),(1,0,0,0),(0,0,0,0),(0,0,0,0)) x1 + ((1,0,0,0),(1,0,0,0),(0,0,0,0),(0,0,0,0)) x2 + (37,15,0,1) U21_A(x1) = ((1,0,0,0),(0,0,0,0),(1,1,0,0),(0,0,1,0)) x1 + (0,0,0,26) U12_A(x1) = x1 + (0,1,0,1) U11_A(x1,x2) = x1 + (0,22,1,1) a__U11_A(x1,x2) = ((1,0,0,0),(0,0,0,0),(0,0,0,0),(1,0,0,0)) x1 + (0,22,55,23) a__U12_A(x1) = ((1,0,0,0),(0,0,0,0),(1,0,0,0),(1,1,0,0)) x1 + (0,22,0,0) a__U21_A(x1) = ((1,0,0,0),(0,0,0,0),(1,0,0,0),(1,1,0,0)) x1 + (0,2,57,25) a__U31_A(x1,x2) = ((1,0,0,0),(1,0,0,0),(1,1,0,0),(0,0,0,0)) x1 + ((1,0,0,0),(1,0,0,0),(0,0,0,0),(0,0,0,0)) x2 + (37,15,15,0) a__U41_A(x1,x2,x3) = x1 + ((1,0,0,0),(0,0,0,0),(0,0,0,0),(0,1,0,0)) x2 + x3 + (11,11,28,2) a__U42_A(x1,x2,x3) = ((1,0,0,0),(0,0,0,0),(1,0,0,0),(0,0,0,0)) x1 + ((1,0,0,0),(0,0,0,0),(0,0,0,0),(1,0,0,0)) x2 + x3 + (11,2,10,3) a__plus_A(x1,x2) = ((1,0,0,0),(1,0,0,0),(0,1,0,0),(0,0,0,0)) x1 + ((1,0,0,0),(0,0,0,0),(1,0,0,0),(0,0,0,0)) x2 + (25,33,26,1) isNat_A(x1) = (17,0,0,42) The next rules are strictly ordered: p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: mark#(U21(X)) -> mark#(X) p2: mark#(U12(X)) -> mark#(X) p3: mark#(U11(X1,X2)) -> mark#(X1) and R consists of: r1: a__U11(tt(),V2) -> a__U12(a__isNat(V2)) r2: a__U12(tt()) -> tt() r3: a__U21(tt()) -> tt() r4: a__U31(tt(),N) -> mark(N) r5: a__U41(tt(),M,N) -> a__U42(a__isNat(N),M,N) r6: a__U42(tt(),M,N) -> s(a__plus(mark(N),mark(M))) r7: a__isNat(|0|()) -> tt() r8: a__isNat(plus(V1,V2)) -> a__U11(a__isNat(V1),V2) r9: a__isNat(s(V1)) -> a__U21(a__isNat(V1)) r10: a__plus(N,|0|()) -> a__U31(a__isNat(N),N) r11: a__plus(N,s(M)) -> a__U41(a__isNat(M),M,N) r12: mark(U11(X1,X2)) -> a__U11(mark(X1),X2) r13: mark(U12(X)) -> a__U12(mark(X)) r14: mark(isNat(X)) -> a__isNat(X) r15: mark(U21(X)) -> a__U21(mark(X)) r16: mark(U31(X1,X2)) -> a__U31(mark(X1),X2) r17: mark(U41(X1,X2,X3)) -> a__U41(mark(X1),X2,X3) r18: mark(U42(X1,X2,X3)) -> a__U42(mark(X1),X2,X3) r19: mark(plus(X1,X2)) -> a__plus(mark(X1),mark(X2)) r20: mark(tt()) -> tt() r21: mark(s(X)) -> s(mark(X)) r22: mark(|0|()) -> |0|() r23: a__U11(X1,X2) -> U11(X1,X2) r24: a__U12(X) -> U12(X) r25: a__isNat(X) -> isNat(X) r26: a__U21(X) -> U21(X) r27: a__U31(X1,X2) -> U31(X1,X2) r28: a__U41(X1,X2,X3) -> U41(X1,X2,X3) r29: a__U42(X1,X2,X3) -> U42(X1,X2,X3) r30: a__plus(X1,X2) -> plus(X1,X2) 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: mark#(U21(X)) -> mark#(X) p2: mark#(U11(X1,X2)) -> mark#(X1) p3: mark#(U12(X)) -> mark#(X) and R consists of: r1: a__U11(tt(),V2) -> a__U12(a__isNat(V2)) r2: a__U12(tt()) -> tt() r3: a__U21(tt()) -> tt() r4: a__U31(tt(),N) -> mark(N) r5: a__U41(tt(),M,N) -> a__U42(a__isNat(N),M,N) r6: a__U42(tt(),M,N) -> s(a__plus(mark(N),mark(M))) r7: a__isNat(|0|()) -> tt() r8: a__isNat(plus(V1,V2)) -> a__U11(a__isNat(V1),V2) r9: a__isNat(s(V1)) -> a__U21(a__isNat(V1)) r10: a__plus(N,|0|()) -> a__U31(a__isNat(N),N) r11: a__plus(N,s(M)) -> a__U41(a__isNat(M),M,N) r12: mark(U11(X1,X2)) -> a__U11(mark(X1),X2) r13: mark(U12(X)) -> a__U12(mark(X)) r14: mark(isNat(X)) -> a__isNat(X) r15: mark(U21(X)) -> a__U21(mark(X)) r16: mark(U31(X1,X2)) -> a__U31(mark(X1),X2) r17: mark(U41(X1,X2,X3)) -> a__U41(mark(X1),X2,X3) r18: mark(U42(X1,X2,X3)) -> a__U42(mark(X1),X2,X3) r19: mark(plus(X1,X2)) -> a__plus(mark(X1),mark(X2)) r20: mark(tt()) -> tt() r21: mark(s(X)) -> s(mark(X)) r22: mark(|0|()) -> |0|() r23: a__U11(X1,X2) -> U11(X1,X2) r24: a__U12(X) -> U12(X) r25: a__isNat(X) -> isNat(X) r26: a__U21(X) -> U21(X) r27: a__U31(X1,X2) -> U31(X1,X2) r28: a__U41(X1,X2,X3) -> U41(X1,X2,X3) r29: a__U42(X1,X2,X3) -> U42(X1,X2,X3) r30: a__plus(X1,X2) -> plus(X1,X2) The set of usable rules consists of (no rules) Take the reduction pair: matrix interpretations: carrier: N^4 order: lexicographic order interpretations: mark#_A(x1) = ((1,0,0,0),(1,1,0,0),(0,0,1,0),(1,0,0,1)) x1 U21_A(x1) = ((1,0,0,0),(1,1,0,0),(1,1,1,0),(1,1,1,1)) x1 + (0,1,0,0) U11_A(x1,x2) = ((1,0,0,0),(0,1,0,0),(0,1,1,0),(1,1,1,1)) x1 + ((0,0,0,0),(1,0,0,0),(1,0,0,0),(1,1,0,0)) x2 + (1,1,1,1) U12_A(x1) = ((1,0,0,0),(1,1,0,0),(1,1,1,0),(1,1,1,1)) x1 + (0,1,1,1) The next rules are strictly ordered: p1, p2, p3 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: a__U11#(tt(),V2) -> a__isNat#(V2) p2: a__isNat#(s(V1)) -> a__isNat#(V1) p3: a__isNat#(plus(V1,V2)) -> a__isNat#(V1) p4: a__isNat#(plus(V1,V2)) -> a__U11#(a__isNat(V1),V2) and R consists of: r1: a__U11(tt(),V2) -> a__U12(a__isNat(V2)) r2: a__U12(tt()) -> tt() r3: a__U21(tt()) -> tt() r4: a__U31(tt(),N) -> mark(N) r5: a__U41(tt(),M,N) -> a__U42(a__isNat(N),M,N) r6: a__U42(tt(),M,N) -> s(a__plus(mark(N),mark(M))) r7: a__isNat(|0|()) -> tt() r8: a__isNat(plus(V1,V2)) -> a__U11(a__isNat(V1),V2) r9: a__isNat(s(V1)) -> a__U21(a__isNat(V1)) r10: a__plus(N,|0|()) -> a__U31(a__isNat(N),N) r11: a__plus(N,s(M)) -> a__U41(a__isNat(M),M,N) r12: mark(U11(X1,X2)) -> a__U11(mark(X1),X2) r13: mark(U12(X)) -> a__U12(mark(X)) r14: mark(isNat(X)) -> a__isNat(X) r15: mark(U21(X)) -> a__U21(mark(X)) r16: mark(U31(X1,X2)) -> a__U31(mark(X1),X2) r17: mark(U41(X1,X2,X3)) -> a__U41(mark(X1),X2,X3) r18: mark(U42(X1,X2,X3)) -> a__U42(mark(X1),X2,X3) r19: mark(plus(X1,X2)) -> a__plus(mark(X1),mark(X2)) r20: mark(tt()) -> tt() r21: mark(s(X)) -> s(mark(X)) r22: mark(|0|()) -> |0|() r23: a__U11(X1,X2) -> U11(X1,X2) r24: a__U12(X) -> U12(X) r25: a__isNat(X) -> isNat(X) r26: a__U21(X) -> U21(X) r27: a__U31(X1,X2) -> U31(X1,X2) r28: a__U41(X1,X2,X3) -> U41(X1,X2,X3) r29: a__U42(X1,X2,X3) -> U42(X1,X2,X3) r30: a__plus(X1,X2) -> plus(X1,X2) The set of usable rules consists of r1, r2, r3, r7, r8, r9, r23, r24, r25, r26 Take the reduction pair: matrix interpretations: carrier: N^4 order: lexicographic order interpretations: a__U11#_A(x1,x2) = ((1,0,0,0),(0,0,0,0),(0,0,0,0),(0,1,0,0)) x2 + (0,0,0,1) tt_A() = (1,7,8,3) a__isNat#_A(x1) = ((1,0,0,0),(0,0,0,0),(0,0,0,0),(0,1,0,0)) x1 s_A(x1) = ((1,0,0,0),(0,0,0,0),(0,1,0,0),(1,1,1,0)) x1 + (2,1,1,0) plus_A(x1,x2) = ((1,0,0,0),(0,1,0,0),(0,0,0,0),(1,1,1,0)) x1 + ((1,0,0,0),(1,1,0,0),(0,0,1,0),(1,1,1,1)) x2 + (0,2,1,0) a__isNat_A(x1) = ((1,0,0,0),(0,0,0,0),(0,0,0,0),(1,0,0,0)) x1 + (4,6,7,1) a__U12_A(x1) = ((0,0,0,0),(1,0,0,0),(1,0,0,0),(0,0,0,0)) x1 + (2,0,1,2) U12_A(x1) = ((0,0,0,0),(1,0,0,0),(0,0,0,0),(0,0,0,0)) x1 + (1,1,0,3) a__U11_A(x1,x2) = ((0,0,0,0),(0,0,0,0),(0,0,0,0),(1,0,0,0)) x1 + x2 + (3,5,6,0) a__U21_A(x1) = ((1,0,0,0),(0,1,0,0),(0,0,1,0),(1,0,0,1)) x1 + (1,1,1,0) U11_A(x1,x2) = (0,6,7,1) U21_A(x1) = (0,2,2,1) |0|_A() = (1,1,1,0) isNat_A(x1) = (0,0,0,2) The next rules are strictly ordered: p1, p2, p3, p4 We remove them from the problem. Then no dependency pair remains.