YES We show the termination of the TRS R: cond(true(),x) -> cond(odd(x),p(x)) odd(|0|()) -> false() odd(s(|0|())) -> true() odd(s(s(x))) -> odd(x) p(|0|()) -> |0|() p(s(x)) -> x -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: cond#(true(),x) -> cond#(odd(x),p(x)) p2: cond#(true(),x) -> odd#(x) p3: cond#(true(),x) -> p#(x) p4: odd#(s(s(x))) -> odd#(x) and R consists of: r1: cond(true(),x) -> cond(odd(x),p(x)) r2: odd(|0|()) -> false() r3: odd(s(|0|())) -> true() r4: odd(s(s(x))) -> odd(x) r5: p(|0|()) -> |0|() r6: p(s(x)) -> x The estimated dependency graph contains the following SCCs: {p1} {p4} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: cond#(true(),x) -> cond#(odd(x),p(x)) and R consists of: r1: cond(true(),x) -> cond(odd(x),p(x)) r2: odd(|0|()) -> false() r3: odd(s(|0|())) -> true() r4: odd(s(s(x))) -> odd(x) r5: p(|0|()) -> |0|() r6: p(s(x)) -> x The set of usable rules consists of r2, r3, r4, r5, r6 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: max/plus interpretation on natural numbers: cond#_A(x1,x2) = max{17, x1 + 12} true_A = 1 odd_A(x1) = 5 p_A(x1) = max{3, x1 - 5} |0|_A = 2 false_A = 1 s_A(x1) = max{13, x1 + 6} base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: cond#_A(x1,x2) = max{0, x1 - 10, x2 - 5} true_A = 8 odd_A(x1) = max{0, x1 - 1} p_A(x1) = max{4, x1 - 3} |0|_A = 0 false_A = 0 s_A(x1) = max{9, x1 + 3} cond#!_A(x1,x2) = max{x1 - 1, x2 + 2} true!_A = 5 odd!_A(x1) = max{4, x1 + 1} p!_A(x1) = max{8, x1 - 6} |0|!_A = 6 false!_A = 2 s!_A(x1) = max{1, x1 - 10} partial status: pi(cond#) = [1] pi(true) = [] pi(odd) = [] pi(p) = [] pi(|0|) = [] pi(false) = [] pi(s) = [1] The following rules are removed: p1 Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: odd#(s(s(x))) -> odd#(x) and R consists of: r1: cond(true(),x) -> cond(odd(x),p(x)) r2: odd(|0|()) -> false() r3: odd(s(|0|())) -> true() r4: odd(s(s(x))) -> odd(x) r5: p(|0|()) -> |0|() r6: p(s(x)) -> x The set of usable rules consists of r1, r2, r3, r4, r5, r6 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: max/plus interpretation on natural numbers: odd#_A(x1) = max{13, x1 - 15} s_A(x1) = max{14, x1 + 6} cond_A(x1,x2) = max{14, x1 - 14, x2 - 4} true_A = 1 odd_A(x1) = max{13, x1 - 15} p_A(x1) = max{3, x1 - 5} |0|_A = 2 false_A = 0 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: odd#_A(x1) = x1 s_A(x1) = max{12, x1 + 8} cond_A(x1,x2) = max{0, x1 - 3, x2 - 14} true_A = 1 odd_A(x1) = max{2, x1 - 13} p_A(x1) = max{13, x1 - 1} |0|_A = 0 false_A = 0 odd#!_A(x1) = max{1, x1 - 17} s!_A(x1) = max{3, x1 - 13} cond!_A(x1,x2) = max{4, x1 - 3, x2 - 16} true!_A = 1 odd!_A(x1) = max{2, x1 - 17} p!_A(x1) = max{3, x1 - 17} |0|!_A = 2 false!_A = 0 partial status: pi(odd#) = [] pi(s) = [1] pi(cond) = [] pi(true) = [] pi(odd) = [] pi(p) = [] pi(|0|) = [] pi(false) = [] The following rules are removed: p1 Then no dependency pair remains.