YES We show the termination of the relative TRS R/S: R: half(|0|()) -> |0|() half(s(|0|())) -> |0|() half(s(s(x))) -> s(half(x)) lastbit(|0|()) -> |0|() lastbit(s(|0|())) -> s(|0|()) lastbit(s(s(x))) -> lastbit(x) conv(|0|()) -> cons(nil(),|0|()) conv(s(x)) -> cons(conv(half(s(x))),lastbit(s(x))) S: rand(x) -> x rand(x) -> rand(s(x)) -- SCC decomposition. Consider the non-minimal dependency pair problem (P, R), where P consists of p1: half#(s(s(x))) -> half#(x) p2: lastbit#(s(s(x))) -> lastbit#(x) p3: conv#(s(x)) -> conv#(half(s(x))) p4: conv#(s(x)) -> half#(s(x)) p5: conv#(s(x)) -> lastbit#(s(x)) and R consists of: r1: half(|0|()) -> |0|() r2: half(s(|0|())) -> |0|() r3: half(s(s(x))) -> s(half(x)) r4: lastbit(|0|()) -> |0|() r5: lastbit(s(|0|())) -> s(|0|()) r6: lastbit(s(s(x))) -> lastbit(x) r7: conv(|0|()) -> cons(nil(),|0|()) r8: conv(s(x)) -> cons(conv(half(s(x))),lastbit(s(x))) r9: rand(x) -> x r10: rand(x) -> rand(s(x)) The estimated dependency graph contains the following SCCs: {p3} {p1} {p2} -- Reduction pair. Consider the non-minimal dependency pair problem (P, R), where P consists of p1: conv#(s(x)) -> conv#(half(s(x))) and R consists of: r1: half(|0|()) -> |0|() r2: half(s(|0|())) -> |0|() r3: half(s(s(x))) -> s(half(x)) r4: lastbit(|0|()) -> |0|() r5: lastbit(s(|0|())) -> s(|0|()) r6: lastbit(s(s(x))) -> lastbit(x) r7: conv(|0|()) -> cons(nil(),|0|()) r8: conv(s(x)) -> cons(conv(half(s(x))),lastbit(s(x))) r9: rand(x) -> x r10: rand(x) -> rand(s(x)) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8, r9, r10 Take the reduction pair: lexicographic combination of reduction pairs: 1. matrix interpretations: carrier: N^4 order: lexicographic order interpretations: conv#_A(x1) = ((1,0,0,0),(0,1,0,0),(0,0,0,0),(0,1,1,0)) x1 s_A(x1) = x1 + (0,1,2,0) half_A(x1) = x1 + (0,0,1,0) |0|_A() = (1,1,0,0) lastbit_A(x1) = x1 + (1,1,1,0) conv_A(x1) = ((1,0,0,0),(1,0,0,0),(1,0,0,0),(1,1,0,0)) x1 + (1,2,2,1) cons_A(x1,x2) = ((1,0,0,0),(0,0,0,0),(1,1,0,0),(0,0,1,0)) x1 + ((0,0,0,0),(0,0,0,0),(0,0,0,0),(1,0,0,0)) x2 + (0,1,0,0) nil_A() = (1,1,1,1) rand_A(x1) = x1 + (1,1,1,1) 2. lexicographic path order with precedence: precedence: rand > half > s > conv# > lastbit > conv > |0| > nil > cons argument filter: pi(conv#) = [] pi(s) = [] pi(half) = [] pi(|0|) = [] pi(lastbit) = [] pi(conv) = [] pi(cons) = [] pi(nil) = [] pi(rand) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the non-minimal dependency pair problem (P, R), where P consists of p1: half#(s(s(x))) -> half#(x) and R consists of: r1: half(|0|()) -> |0|() r2: half(s(|0|())) -> |0|() r3: half(s(s(x))) -> s(half(x)) r4: lastbit(|0|()) -> |0|() r5: lastbit(s(|0|())) -> s(|0|()) r6: lastbit(s(s(x))) -> lastbit(x) r7: conv(|0|()) -> cons(nil(),|0|()) r8: conv(s(x)) -> cons(conv(half(s(x))),lastbit(s(x))) r9: rand(x) -> x r10: rand(x) -> rand(s(x)) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8, r9, r10 Take the reduction pair: lexicographic combination of reduction pairs: 1. matrix interpretations: carrier: N^4 order: lexicographic order interpretations: half#_A(x1) = x1 s_A(x1) = ((1,0,0,0),(0,1,0,0),(0,0,1,0),(0,1,0,1)) x1 + (0,6,4,1) half_A(x1) = ((1,0,0,0),(0,1,0,0),(0,0,1,0),(1,1,0,1)) x1 + (1,1,0,0) |0|_A() = (1,1,3,4) lastbit_A(x1) = ((1,0,0,0),(0,0,0,0),(1,1,0,0),(0,0,1,0)) x1 + (3,8,0,0) conv_A(x1) = x1 + (4,1,1,2) cons_A(x1,x2) = ((1,0,0,0),(0,0,0,0),(0,0,0,0),(1,0,0,0)) x2 + (0,2,2,0) nil_A() = (1,1,1,1) rand_A(x1) = x1 + (1,1,1,1) 2. lexicographic path order with precedence: precedence: half > lastbit > rand > nil > s > conv > cons > half# > |0| argument filter: pi(half#) = [] pi(s) = [] pi(half) = [] pi(|0|) = [] pi(lastbit) = [] pi(conv) = [] pi(cons) = [] pi(nil) = [] pi(rand) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the non-minimal dependency pair problem (P, R), where P consists of p1: lastbit#(s(s(x))) -> lastbit#(x) and R consists of: r1: half(|0|()) -> |0|() r2: half(s(|0|())) -> |0|() r3: half(s(s(x))) -> s(half(x)) r4: lastbit(|0|()) -> |0|() r5: lastbit(s(|0|())) -> s(|0|()) r6: lastbit(s(s(x))) -> lastbit(x) r7: conv(|0|()) -> cons(nil(),|0|()) r8: conv(s(x)) -> cons(conv(half(s(x))),lastbit(s(x))) r9: rand(x) -> x r10: rand(x) -> rand(s(x)) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8, r9, r10 Take the reduction pair: lexicographic combination of reduction pairs: 1. matrix interpretations: carrier: N^4 order: lexicographic order interpretations: lastbit#_A(x1) = x1 s_A(x1) = ((1,0,0,0),(0,1,0,0),(0,0,1,0),(1,1,0,1)) x1 + (0,1,1,1) half_A(x1) = ((1,0,0,0),(0,1,0,0),(0,1,1,0),(0,0,0,1)) x1 + (1,1,1,1) |0|_A() = (1,1,0,1) lastbit_A(x1) = x1 + (1,1,1,1) conv_A(x1) = ((1,0,0,0),(1,0,0,0),(1,0,0,0),(1,0,0,0)) x1 + (2,1,0,4) cons_A(x1,x2) = ((0,0,0,0),(0,0,0,0),(0,0,0,0),(1,0,0,0)) x1 + ((1,0,0,0),(0,1,0,0),(0,0,1,0),(1,1,1,1)) x2 nil_A() = (1,1,1,1) rand_A(x1) = x1 + (1,1,1,1) 2. lexicographic path order with precedence: precedence: rand > nil > lastbit# > s > conv > lastbit > half > |0| > cons argument filter: pi(lastbit#) = 1 pi(s) = 1 pi(half) = [] pi(|0|) = [] pi(lastbit) = [1] pi(conv) = [] pi(cons) = [] pi(nil) = [] pi(rand) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.