YES We show the termination of the TRS R: a__eq(|0|(),|0|()) -> true() a__eq(s(X),s(Y)) -> a__eq(X,Y) a__eq(X,Y) -> false() a__inf(X) -> cons(X,inf(s(X))) a__take(|0|(),X) -> nil() a__take(s(X),cons(Y,L)) -> cons(Y,take(X,L)) a__length(nil()) -> |0|() a__length(cons(X,L)) -> s(length(L)) mark(eq(X1,X2)) -> a__eq(X1,X2) mark(inf(X)) -> a__inf(mark(X)) mark(take(X1,X2)) -> a__take(mark(X1),mark(X2)) mark(length(X)) -> a__length(mark(X)) mark(|0|()) -> |0|() mark(true()) -> true() mark(s(X)) -> s(X) mark(false()) -> false() mark(cons(X1,X2)) -> cons(X1,X2) mark(nil()) -> nil() a__eq(X1,X2) -> eq(X1,X2) a__inf(X) -> inf(X) a__take(X1,X2) -> take(X1,X2) a__length(X) -> length(X) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: a__eq#(s(X),s(Y)) -> a__eq#(X,Y) p2: mark#(eq(X1,X2)) -> a__eq#(X1,X2) p3: mark#(inf(X)) -> a__inf#(mark(X)) p4: mark#(inf(X)) -> mark#(X) p5: mark#(take(X1,X2)) -> a__take#(mark(X1),mark(X2)) p6: mark#(take(X1,X2)) -> mark#(X1) p7: mark#(take(X1,X2)) -> mark#(X2) p8: mark#(length(X)) -> a__length#(mark(X)) p9: mark#(length(X)) -> mark#(X) and R consists of: r1: a__eq(|0|(),|0|()) -> true() r2: a__eq(s(X),s(Y)) -> a__eq(X,Y) r3: a__eq(X,Y) -> false() r4: a__inf(X) -> cons(X,inf(s(X))) r5: a__take(|0|(),X) -> nil() r6: a__take(s(X),cons(Y,L)) -> cons(Y,take(X,L)) r7: a__length(nil()) -> |0|() r8: a__length(cons(X,L)) -> s(length(L)) r9: mark(eq(X1,X2)) -> a__eq(X1,X2) r10: mark(inf(X)) -> a__inf(mark(X)) r11: mark(take(X1,X2)) -> a__take(mark(X1),mark(X2)) r12: mark(length(X)) -> a__length(mark(X)) r13: mark(|0|()) -> |0|() r14: mark(true()) -> true() r15: mark(s(X)) -> s(X) r16: mark(false()) -> false() r17: mark(cons(X1,X2)) -> cons(X1,X2) r18: mark(nil()) -> nil() r19: a__eq(X1,X2) -> eq(X1,X2) r20: a__inf(X) -> inf(X) r21: a__take(X1,X2) -> take(X1,X2) r22: a__length(X) -> length(X) The estimated dependency graph contains the following SCCs: {p4, p6, p7, p9} {p1} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: mark#(length(X)) -> mark#(X) p2: mark#(take(X1,X2)) -> mark#(X2) p3: mark#(take(X1,X2)) -> mark#(X1) p4: mark#(inf(X)) -> mark#(X) and R consists of: r1: a__eq(|0|(),|0|()) -> true() r2: a__eq(s(X),s(Y)) -> a__eq(X,Y) r3: a__eq(X,Y) -> false() r4: a__inf(X) -> cons(X,inf(s(X))) r5: a__take(|0|(),X) -> nil() r6: a__take(s(X),cons(Y,L)) -> cons(Y,take(X,L)) r7: a__length(nil()) -> |0|() r8: a__length(cons(X,L)) -> s(length(L)) r9: mark(eq(X1,X2)) -> a__eq(X1,X2) r10: mark(inf(X)) -> a__inf(mark(X)) r11: mark(take(X1,X2)) -> a__take(mark(X1),mark(X2)) r12: mark(length(X)) -> a__length(mark(X)) r13: mark(|0|()) -> |0|() r14: mark(true()) -> true() r15: mark(s(X)) -> s(X) r16: mark(false()) -> false() r17: mark(cons(X1,X2)) -> cons(X1,X2) r18: mark(nil()) -> nil() r19: a__eq(X1,X2) -> eq(X1,X2) r20: a__inf(X) -> inf(X) r21: a__take(X1,X2) -> take(X1,X2) r22: a__length(X) -> length(X) The set of usable rules consists of (no rules) Take the monotone reduction pair: lexicographic combination of reduction pairs: 1. matrix interpretations: carrier: N^2 order: standard order interpretations: mark#_A(x1) = ((1,1),(1,0)) x1 length_A(x1) = ((1,1),(1,1)) x1 + (1,1) take_A(x1,x2) = ((1,1),(1,1)) x1 + ((1,1),(1,1)) x2 + (1,1) inf_A(x1) = ((1,1),(1,1)) x1 + (1,1) 2. matrix interpretations: carrier: N^2 order: standard order interpretations: mark#_A(x1) = ((1,0),(1,1)) x1 length_A(x1) = ((1,0),(1,1)) x1 + (1,1) take_A(x1,x2) = ((1,1),(1,1)) x1 + ((1,1),(0,1)) x2 + (1,1) inf_A(x1) = ((1,1),(1,1)) x1 + (1,1) The next rules are strictly ordered: p1, p2, p3, p4 r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16, r17, r18, r19, r20, r21, r22 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__eq#(s(X),s(Y)) -> a__eq#(X,Y) and R consists of: r1: a__eq(|0|(),|0|()) -> true() r2: a__eq(s(X),s(Y)) -> a__eq(X,Y) r3: a__eq(X,Y) -> false() r4: a__inf(X) -> cons(X,inf(s(X))) r5: a__take(|0|(),X) -> nil() r6: a__take(s(X),cons(Y,L)) -> cons(Y,take(X,L)) r7: a__length(nil()) -> |0|() r8: a__length(cons(X,L)) -> s(length(L)) r9: mark(eq(X1,X2)) -> a__eq(X1,X2) r10: mark(inf(X)) -> a__inf(mark(X)) r11: mark(take(X1,X2)) -> a__take(mark(X1),mark(X2)) r12: mark(length(X)) -> a__length(mark(X)) r13: mark(|0|()) -> |0|() r14: mark(true()) -> true() r15: mark(s(X)) -> s(X) r16: mark(false()) -> false() r17: mark(cons(X1,X2)) -> cons(X1,X2) r18: mark(nil()) -> nil() r19: a__eq(X1,X2) -> eq(X1,X2) r20: a__inf(X) -> inf(X) r21: a__take(X1,X2) -> take(X1,X2) r22: a__length(X) -> length(X) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. matrix interpretations: carrier: N^2 order: standard order interpretations: a__eq#_A(x1,x2) = ((1,1),(0,0)) x1 + ((1,1),(1,1)) x2 s_A(x1) = ((1,1),(1,1)) x1 + (1,1) 2. matrix interpretations: carrier: N^2 order: standard order interpretations: a__eq#_A(x1,x2) = ((0,1),(1,0)) x1 + ((1,1),(0,1)) x2 s_A(x1) = ((0,1),(1,1)) x1 + (1,1) The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.