YES We show the termination of the TRS R: even(|0|()) -> true() even(s(|0|())) -> false() even(s(s(x))) -> even(x) half(|0|()) -> |0|() half(s(s(x))) -> s(half(x)) plus(|0|(),y) -> y plus(s(x),y) -> s(plus(x,y)) times(|0|(),y) -> |0|() times(s(x),y) -> if_times(even(s(x)),s(x),y) if_times(true(),s(x),y) -> plus(times(half(s(x)),y),times(half(s(x)),y)) if_times(false(),s(x),y) -> plus(y,times(x,y)) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: even#(s(s(x))) -> even#(x) p2: half#(s(s(x))) -> half#(x) p3: plus#(s(x),y) -> plus#(x,y) p4: times#(s(x),y) -> if_times#(even(s(x)),s(x),y) p5: times#(s(x),y) -> even#(s(x)) p6: if_times#(true(),s(x),y) -> plus#(times(half(s(x)),y),times(half(s(x)),y)) p7: if_times#(true(),s(x),y) -> times#(half(s(x)),y) p8: if_times#(true(),s(x),y) -> half#(s(x)) p9: if_times#(false(),s(x),y) -> plus#(y,times(x,y)) p10: if_times#(false(),s(x),y) -> times#(x,y) and R consists of: r1: even(|0|()) -> true() r2: even(s(|0|())) -> false() r3: even(s(s(x))) -> even(x) r4: half(|0|()) -> |0|() r5: half(s(s(x))) -> s(half(x)) r6: plus(|0|(),y) -> y r7: plus(s(x),y) -> s(plus(x,y)) r8: times(|0|(),y) -> |0|() r9: times(s(x),y) -> if_times(even(s(x)),s(x),y) r10: if_times(true(),s(x),y) -> plus(times(half(s(x)),y),times(half(s(x)),y)) r11: if_times(false(),s(x),y) -> plus(y,times(x,y)) The estimated dependency graph contains the following SCCs: {p4, p7, p10} {p1} {p2} {p3} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: if_times#(false(),s(x),y) -> times#(x,y) p2: times#(s(x),y) -> if_times#(even(s(x)),s(x),y) p3: if_times#(true(),s(x),y) -> times#(half(s(x)),y) and R consists of: r1: even(|0|()) -> true() r2: even(s(|0|())) -> false() r3: even(s(s(x))) -> even(x) r4: half(|0|()) -> |0|() r5: half(s(s(x))) -> s(half(x)) r6: plus(|0|(),y) -> y r7: plus(s(x),y) -> s(plus(x,y)) r8: times(|0|(),y) -> |0|() r9: times(s(x),y) -> if_times(even(s(x)),s(x),y) r10: if_times(true(),s(x),y) -> plus(times(half(s(x)),y),times(half(s(x)),y)) r11: if_times(false(),s(x),y) -> plus(y,times(x,y)) The set of usable rules consists of r1, r2, r3, r4, r5 Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: if_times#_A(x1,x2,x3) = max{x1 - 13, x2 + 8} false_A = 17 s_A(x1) = max{16, x1 + 7} times#_A(x1,x2) = x1 + 9 even_A(x1) = x1 + 8 true_A = 5 half_A(x1) = max{12, x1 - 1} |0|_A = 11 precedence: s > if_times# = false = even = true = half > times# = |0| partial status: pi(if_times#) = [2] pi(false) = [] pi(s) = [1] pi(times#) = [1] pi(even) = [1] pi(true) = [] pi(half) = [] pi(|0|) = [] 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: times#(s(x),y) -> if_times#(even(s(x)),s(x),y) p2: if_times#(true(),s(x),y) -> times#(half(s(x)),y) and R consists of: r1: even(|0|()) -> true() r2: even(s(|0|())) -> false() r3: even(s(s(x))) -> even(x) r4: half(|0|()) -> |0|() r5: half(s(s(x))) -> s(half(x)) r6: plus(|0|(),y) -> y r7: plus(s(x),y) -> s(plus(x,y)) r8: times(|0|(),y) -> |0|() r9: times(s(x),y) -> if_times(even(s(x)),s(x),y) r10: if_times(true(),s(x),y) -> plus(times(half(s(x)),y),times(half(s(x)),y)) r11: if_times(false(),s(x),y) -> plus(y,times(x,y)) The estimated dependency graph contains the following SCCs: {p1, p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: times#(s(x),y) -> if_times#(even(s(x)),s(x),y) p2: if_times#(true(),s(x),y) -> times#(half(s(x)),y) and R consists of: r1: even(|0|()) -> true() r2: even(s(|0|())) -> false() r3: even(s(s(x))) -> even(x) r4: half(|0|()) -> |0|() r5: half(s(s(x))) -> s(half(x)) r6: plus(|0|(),y) -> y r7: plus(s(x),y) -> s(plus(x,y)) r8: times(|0|(),y) -> |0|() r9: times(s(x),y) -> if_times(even(s(x)),s(x),y) r10: if_times(true(),s(x),y) -> plus(times(half(s(x)),y),times(half(s(x)),y)) r11: if_times(false(),s(x),y) -> plus(y,times(x,y)) The set of usable rules consists of r1, r2, r3, r4, r5 Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: times#_A(x1,x2) = max{x1 + 10, x2 + 24} s_A(x1) = x1 + 15 if_times#_A(x1,x2,x3) = max{x1 + 3, x2 + 10, x3 + 24} even_A(x1) = x1 + 6 true_A = 5 half_A(x1) = max{13, x1 - 1} |0|_A = 4 false_A = 3 precedence: even = true = |0| > times# = s = if_times# = half = false partial status: pi(times#) = [1] pi(s) = [1] pi(if_times#) = [2] pi(even) = [1] pi(true) = [] pi(half) = [] pi(|0|) = [] pi(false) = [] 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: times#(s(x),y) -> if_times#(even(s(x)),s(x),y) and R consists of: r1: even(|0|()) -> true() r2: even(s(|0|())) -> false() r3: even(s(s(x))) -> even(x) r4: half(|0|()) -> |0|() r5: half(s(s(x))) -> s(half(x)) r6: plus(|0|(),y) -> y r7: plus(s(x),y) -> s(plus(x,y)) r8: times(|0|(),y) -> |0|() r9: times(s(x),y) -> if_times(even(s(x)),s(x),y) r10: if_times(true(),s(x),y) -> plus(times(half(s(x)),y),times(half(s(x)),y)) r11: if_times(false(),s(x),y) -> plus(y,times(x,y)) The estimated dependency graph contains the following SCCs: (no SCCs) -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: even#(s(s(x))) -> even#(x) and R consists of: r1: even(|0|()) -> true() r2: even(s(|0|())) -> false() r3: even(s(s(x))) -> even(x) r4: half(|0|()) -> |0|() r5: half(s(s(x))) -> s(half(x)) r6: plus(|0|(),y) -> y r7: plus(s(x),y) -> s(plus(x,y)) r8: times(|0|(),y) -> |0|() r9: times(s(x),y) -> if_times(even(s(x)),s(x),y) r10: if_times(true(),s(x),y) -> plus(times(half(s(x)),y),times(half(s(x)),y)) r11: if_times(false(),s(x),y) -> plus(y,times(x,y)) The set of usable rules consists of (no rules) Take the monotone reduction pair: weighted path order base order: max/plus interpretations on natural numbers: even#_A(x1) = x1 + 5 s_A(x1) = x1 + 2 precedence: even# = s partial status: pi(even#) = [1] pi(s) = [1] The next rules are strictly ordered: p1 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: half#(s(s(x))) -> half#(x) and R consists of: r1: even(|0|()) -> true() r2: even(s(|0|())) -> false() r3: even(s(s(x))) -> even(x) r4: half(|0|()) -> |0|() r5: half(s(s(x))) -> s(half(x)) r6: plus(|0|(),y) -> y r7: plus(s(x),y) -> s(plus(x,y)) r8: times(|0|(),y) -> |0|() r9: times(s(x),y) -> if_times(even(s(x)),s(x),y) r10: if_times(true(),s(x),y) -> plus(times(half(s(x)),y),times(half(s(x)),y)) r11: if_times(false(),s(x),y) -> plus(y,times(x,y)) The set of usable rules consists of (no rules) Take the monotone reduction pair: weighted path order base order: max/plus interpretations on natural numbers: half#_A(x1) = x1 + 5 s_A(x1) = x1 + 2 precedence: half# = s partial status: pi(half#) = [1] pi(s) = [1] The next rules are strictly ordered: p1 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: plus#(s(x),y) -> plus#(x,y) and R consists of: r1: even(|0|()) -> true() r2: even(s(|0|())) -> false() r3: even(s(s(x))) -> even(x) r4: half(|0|()) -> |0|() r5: half(s(s(x))) -> s(half(x)) r6: plus(|0|(),y) -> y r7: plus(s(x),y) -> s(plus(x,y)) r8: times(|0|(),y) -> |0|() r9: times(s(x),y) -> if_times(even(s(x)),s(x),y) r10: if_times(true(),s(x),y) -> plus(times(half(s(x)),y),times(half(s(x)),y)) r11: if_times(false(),s(x),y) -> plus(y,times(x,y)) The set of usable rules consists of (no rules) Take the reduction pair: weighted path order base order: max/plus interpretations on natural numbers: plus#_A(x1,x2) = max{0, x1 - 2} s_A(x1) = max{3, x1 + 1} precedence: plus# = s partial status: pi(plus#) = [] pi(s) = [1] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.