YES We show the termination of the TRS R: a__from(X) -> cons(mark(X),from(s(X))) a__length(nil()) -> |0|() a__length(cons(X,Y)) -> s(a__length1(Y)) a__length1(X) -> a__length(X) mark(from(X)) -> a__from(mark(X)) mark(length(X)) -> a__length(X) mark(length1(X)) -> a__length1(X) mark(cons(X1,X2)) -> cons(mark(X1),X2) mark(s(X)) -> s(mark(X)) mark(nil()) -> nil() mark(|0|()) -> |0|() a__from(X) -> from(X) a__length(X) -> length(X) a__length1(X) -> length1(X) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: a__from#(X) -> mark#(X) p2: a__length#(cons(X,Y)) -> a__length1#(Y) p3: a__length1#(X) -> a__length#(X) p4: mark#(from(X)) -> a__from#(mark(X)) p5: mark#(from(X)) -> mark#(X) p6: mark#(length(X)) -> a__length#(X) p7: mark#(length1(X)) -> a__length1#(X) p8: mark#(cons(X1,X2)) -> mark#(X1) p9: mark#(s(X)) -> mark#(X) and R consists of: r1: a__from(X) -> cons(mark(X),from(s(X))) r2: a__length(nil()) -> |0|() r3: a__length(cons(X,Y)) -> s(a__length1(Y)) r4: a__length1(X) -> a__length(X) r5: mark(from(X)) -> a__from(mark(X)) r6: mark(length(X)) -> a__length(X) r7: mark(length1(X)) -> a__length1(X) r8: mark(cons(X1,X2)) -> cons(mark(X1),X2) r9: mark(s(X)) -> s(mark(X)) r10: mark(nil()) -> nil() r11: mark(|0|()) -> |0|() r12: a__from(X) -> from(X) r13: a__length(X) -> length(X) r14: a__length1(X) -> length1(X) The estimated dependency graph contains the following SCCs: {p1, p4, p5, p8, p9} {p2, p3} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: a__from#(X) -> mark#(X) p2: mark#(s(X)) -> mark#(X) p3: mark#(cons(X1,X2)) -> mark#(X1) p4: mark#(from(X)) -> mark#(X) p5: mark#(from(X)) -> a__from#(mark(X)) and R consists of: r1: a__from(X) -> cons(mark(X),from(s(X))) r2: a__length(nil()) -> |0|() r3: a__length(cons(X,Y)) -> s(a__length1(Y)) r4: a__length1(X) -> a__length(X) r5: mark(from(X)) -> a__from(mark(X)) r6: mark(length(X)) -> a__length(X) r7: mark(length1(X)) -> a__length1(X) r8: mark(cons(X1,X2)) -> cons(mark(X1),X2) r9: mark(s(X)) -> s(mark(X)) r10: mark(nil()) -> nil() r11: mark(|0|()) -> |0|() r12: a__from(X) -> from(X) r13: a__length(X) -> length(X) r14: a__length1(X) -> length1(X) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: a__from#_A(x1) = ((1,0),(0,0)) x1 + (7,1) mark#_A(x1) = ((1,0),(0,0)) x1 + (6,9) s_A(x1) = ((1,0),(0,0)) x1 + (0,1) cons_A(x1,x2) = ((1,0),(0,0)) x1 + ((0,0),(1,0)) x2 + (0,4) from_A(x1) = ((1,0),(1,1)) x1 + (5,8) mark_A(x1) = ((1,0),(1,1)) x1 + (2,5) a__from_A(x1) = ((1,0),(1,1)) x1 + (5,10) a__length_A(x1) = (2,2) nil_A() = (2,2) |0|_A() = (1,1) a__length1_A(x1) = (2,3) length_A(x1) = (1,1) length1_A(x1) = (1,2) precedence: nil = a__length1 > mark = a__from = a__length > length > |0| > length1 > from > a__from# = mark# = s = cons partial status: pi(a__from#) = [] pi(mark#) = [] pi(s) = [] pi(cons) = [] pi(from) = [1] pi(mark) = [1] pi(a__from) = [1] pi(a__length) = [] pi(nil) = [] pi(|0|) = [] pi(a__length1) = [] pi(length) = [] pi(length1) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: a__from#_A(x1) = (0,1) mark#_A(x1) = (0,1) s_A(x1) = (1,0) cons_A(x1,x2) = (0,0) from_A(x1) = x1 + (0,2) mark_A(x1) = ((1,0),(1,1)) x1 a__from_A(x1) = (2,1) a__length_A(x1) = (2,2) nil_A() = (1,1) |0|_A() = (0,3) a__length1_A(x1) = (3,0) length_A(x1) = (2,1) length1_A(x1) = (1,0) precedence: |0| > a__length > nil > s = mark = a__from > from > a__from# = mark# > cons = a__length1 = length = length1 partial status: pi(a__from#) = [] pi(mark#) = [] pi(s) = [] pi(cons) = [] pi(from) = [] pi(mark) = [] pi(a__from) = [] pi(a__length) = [] pi(nil) = [] pi(|0|) = [] pi(a__length1) = [] pi(length) = [] pi(length1) = [] The next rules are strictly ordered: p4 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: a__from#(X) -> mark#(X) p2: mark#(s(X)) -> mark#(X) p3: mark#(cons(X1,X2)) -> mark#(X1) p4: mark#(from(X)) -> a__from#(mark(X)) and R consists of: r1: a__from(X) -> cons(mark(X),from(s(X))) r2: a__length(nil()) -> |0|() r3: a__length(cons(X,Y)) -> s(a__length1(Y)) r4: a__length1(X) -> a__length(X) r5: mark(from(X)) -> a__from(mark(X)) r6: mark(length(X)) -> a__length(X) r7: mark(length1(X)) -> a__length1(X) r8: mark(cons(X1,X2)) -> cons(mark(X1),X2) r9: mark(s(X)) -> s(mark(X)) r10: mark(nil()) -> nil() r11: mark(|0|()) -> |0|() r12: a__from(X) -> from(X) r13: a__length(X) -> length(X) r14: a__length1(X) -> length1(X) The estimated dependency graph contains the following SCCs: {p1, p2, p3, p4} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: a__from#(X) -> mark#(X) p2: mark#(from(X)) -> a__from#(mark(X)) p3: mark#(cons(X1,X2)) -> mark#(X1) p4: mark#(s(X)) -> mark#(X) and R consists of: r1: a__from(X) -> cons(mark(X),from(s(X))) r2: a__length(nil()) -> |0|() r3: a__length(cons(X,Y)) -> s(a__length1(Y)) r4: a__length1(X) -> a__length(X) r5: mark(from(X)) -> a__from(mark(X)) r6: mark(length(X)) -> a__length(X) r7: mark(length1(X)) -> a__length1(X) r8: mark(cons(X1,X2)) -> cons(mark(X1),X2) r9: mark(s(X)) -> s(mark(X)) r10: mark(nil()) -> nil() r11: mark(|0|()) -> |0|() r12: a__from(X) -> from(X) r13: a__length(X) -> length(X) r14: a__length1(X) -> length1(X) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: a__from#_A(x1) = ((1,0),(0,0)) x1 + (4,2) mark#_A(x1) = ((1,0),(0,0)) x1 + (0,3) from_A(x1) = ((1,0),(0,0)) x1 + (4,6) mark_A(x1) = x1 + (0,2) cons_A(x1,x2) = ((1,0),(0,0)) x1 + (3,6) s_A(x1) = ((1,0),(0,0)) x1 + (0,3) a__from_A(x1) = ((1,0),(0,0)) x1 + (4,7) a__length_A(x1) = (2,4) nil_A() = (1,2) |0|_A() = (1,1) a__length1_A(x1) = ((0,0),(1,0)) x1 + (2,5) length_A(x1) = (2,3) length1_A(x1) = ((0,0),(1,0)) x1 + (2,4) precedence: a__from# > mark# > mark = nil = a__length1 > a__from > from = cons = length1 > a__length > length > s = |0| partial status: pi(a__from#) = [] pi(mark#) = [] pi(from) = [] pi(mark) = [1] pi(cons) = [] pi(s) = [] pi(a__from) = [] pi(a__length) = [] pi(nil) = [] pi(|0|) = [] pi(a__length1) = [] pi(length) = [] pi(length1) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: a__from#_A(x1) = (1,1) mark#_A(x1) = (2,2) from_A(x1) = (6,2) mark_A(x1) = ((1,0),(0,0)) x1 + (8,0) cons_A(x1,x2) = (6,0) s_A(x1) = (3,4) a__from_A(x1) = (7,3) a__length_A(x1) = (4,5) nil_A() = (6,7) |0|_A() = (5,6) a__length1_A(x1) = (5,6) length_A(x1) = (1,1) length1_A(x1) = (4,7) precedence: |0| > mark = a__from = a__length > nil > length > from > cons = a__length1 = length1 > mark# = s > a__from# partial status: pi(a__from#) = [] pi(mark#) = [] pi(from) = [] pi(mark) = [] pi(cons) = [] pi(s) = [] pi(a__from) = [] pi(a__length) = [] pi(nil) = [] pi(|0|) = [] pi(a__length1) = [] pi(length) = [] pi(length1) = [] 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: mark#(from(X)) -> a__from#(mark(X)) p2: mark#(cons(X1,X2)) -> mark#(X1) p3: mark#(s(X)) -> mark#(X) and R consists of: r1: a__from(X) -> cons(mark(X),from(s(X))) r2: a__length(nil()) -> |0|() r3: a__length(cons(X,Y)) -> s(a__length1(Y)) r4: a__length1(X) -> a__length(X) r5: mark(from(X)) -> a__from(mark(X)) r6: mark(length(X)) -> a__length(X) r7: mark(length1(X)) -> a__length1(X) r8: mark(cons(X1,X2)) -> cons(mark(X1),X2) r9: mark(s(X)) -> s(mark(X)) r10: mark(nil()) -> nil() r11: mark(|0|()) -> |0|() r12: a__from(X) -> from(X) r13: a__length(X) -> length(X) r14: a__length1(X) -> length1(X) The estimated dependency graph contains the following SCCs: {p2, p3} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: mark#(cons(X1,X2)) -> mark#(X1) p2: mark#(s(X)) -> mark#(X) and R consists of: r1: a__from(X) -> cons(mark(X),from(s(X))) r2: a__length(nil()) -> |0|() r3: a__length(cons(X,Y)) -> s(a__length1(Y)) r4: a__length1(X) -> a__length(X) r5: mark(from(X)) -> a__from(mark(X)) r6: mark(length(X)) -> a__length(X) r7: mark(length1(X)) -> a__length1(X) r8: mark(cons(X1,X2)) -> cons(mark(X1),X2) r9: mark(s(X)) -> s(mark(X)) r10: mark(nil()) -> nil() r11: mark(|0|()) -> |0|() r12: a__from(X) -> from(X) r13: a__length(X) -> length(X) r14: a__length1(X) -> length1(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: mark#_A(x1) = x1 cons_A(x1,x2) = ((1,0),(1,1)) x1 + ((1,0),(1,1)) x2 + (1,1) s_A(x1) = ((1,0),(1,1)) x1 + (1,1) precedence: mark# = cons = s partial status: pi(mark#) = [1] pi(cons) = [1, 2] pi(s) = [1] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: mark#_A(x1) = ((1,0),(1,0)) x1 cons_A(x1,x2) = ((1,0),(0,0)) x1 + x2 + (1,1) s_A(x1) = ((1,0),(0,0)) x1 + (1,1) precedence: s > mark# = cons partial status: pi(mark#) = [] pi(cons) = [2] pi(s) = [] The next rules are strictly ordered: p1, p2 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__length#(cons(X,Y)) -> a__length1#(Y) p2: a__length1#(X) -> a__length#(X) and R consists of: r1: a__from(X) -> cons(mark(X),from(s(X))) r2: a__length(nil()) -> |0|() r3: a__length(cons(X,Y)) -> s(a__length1(Y)) r4: a__length1(X) -> a__length(X) r5: mark(from(X)) -> a__from(mark(X)) r6: mark(length(X)) -> a__length(X) r7: mark(length1(X)) -> a__length1(X) r8: mark(cons(X1,X2)) -> cons(mark(X1),X2) r9: mark(s(X)) -> s(mark(X)) r10: mark(nil()) -> nil() r11: mark(|0|()) -> |0|() r12: a__from(X) -> from(X) r13: a__length(X) -> length(X) r14: a__length1(X) -> length1(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: a__length#_A(x1) = x1 cons_A(x1,x2) = x1 + x2 + (2,2) a__length1#_A(x1) = ((1,0),(0,0)) x1 + (1,1) precedence: cons = a__length1# > a__length# partial status: pi(a__length#) = [1] pi(cons) = [1, 2] pi(a__length1#) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: a__length#_A(x1) = ((1,0),(1,1)) x1 + (1,1) cons_A(x1,x2) = x1 + ((0,0),(1,0)) x2 + (2,3) a__length1#_A(x1) = (2,2) precedence: a__length# = cons = a__length1# partial status: pi(a__length#) = [1] pi(cons) = [] pi(a__length1#) = [] 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: a__length#(cons(X,Y)) -> a__length1#(Y) and R consists of: r1: a__from(X) -> cons(mark(X),from(s(X))) r2: a__length(nil()) -> |0|() r3: a__length(cons(X,Y)) -> s(a__length1(Y)) r4: a__length1(X) -> a__length(X) r5: mark(from(X)) -> a__from(mark(X)) r6: mark(length(X)) -> a__length(X) r7: mark(length1(X)) -> a__length1(X) r8: mark(cons(X1,X2)) -> cons(mark(X1),X2) r9: mark(s(X)) -> s(mark(X)) r10: mark(nil()) -> nil() r11: mark(|0|()) -> |0|() r12: a__from(X) -> from(X) r13: a__length(X) -> length(X) r14: a__length1(X) -> length1(X) The estimated dependency graph contains the following SCCs: (no SCCs)